From c4facb5d53bd37095084c752a1e7d68abcd61f5d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 29 Oct 2026 09:20:09 +0800 Subject: [PATCH 1/2] feat(Dom2Image): update SnapDOM to v3.6.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../wwwroot/lib/snapdom.mjs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs b/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs index 49fe5cd1..d4adcf62 100644 --- a/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs +++ b/src/components/BootstrapBlazor.Dom2Image/wwwroot/lib/snapdom.mjs @@ -1,19 +1,19 @@ /* * SnapDOM -* v3.5.0 +* v3.6.0 * License: MIT */ -var _c=Object.defineProperty;var ut=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var pe=(t,e)=>{for(var n in e)_c(t,n,{get:e[n],enumerable:!0})};function Ti(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function $i(t="soft"){t==="disabled"&&(j.computedStyle=new WeakMap,j.measureHints=new WeakMap,j.baseStyle=new gt(50),j.defaultStyle=new gt(64),j.image=new gt(100),j.background=new gt(100),j.resource=new gt(150),j.compress=new gt(50))}var gt,j,Mt=ut(()=>{"use strict";gt=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)}},j={image:new gt(100),background:new gt(100),resource:new gt(150),defaultStyle:new gt(64),baseStyle:new gt(50),compress:new gt(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function he(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Rc(t){let e=[],n=0,o=0,i="";for(let r=0;rr.dppx-s.dppx),(o.find(r=>r.dppx>=e)||o[o.length-1]).url):null}function Ko(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==6?`matrix(${o})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==16?`matrix3d(${o})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function ee(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Jo(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function fn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function Qo(t){return"\u2022".repeat(String(t??"").length)}function lt(t,e){return t?.nodeType===1&&t.localName===e}function Rt(t){return t?.nodeType===1&&t.namespaceURI===Fc}function Ot(t){return t?.nodeType===1&&t.namespaceURI===Tc}function Xt(t){return t?.nodeType===11&&!!t.host}function Wt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function Zo(t){return t?.nodeType===9}var Yo,Ec,Fc,Tc,Ft=ut(()=>{"use strict";Yo=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,Ec=Yo;Fc="http://www.w3.org/1999/xhtml",Tc="http://www.w3.org/2000/svg"});function $c(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,i=0;function r(s,a,l){if(i>=n)return;let u=Date.now();(o.get(a)||0)>u||(o.set(a,u+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){r("warn",s,a)},errorOnce(s,a){r("error",s,a)},reset(){o.clear(),i=0}}}function Li(t,e,n){if(Yt.size>=Ni){let o=Date.now();for(let[i,r]of Yt)r.until<=o&&Yt.delete(i);for(;Yt.size>=Ni;)Yt.delete(Yt.keys().next().value)}Yt.set(t,{until:Date.now()+n,result:e})}function Pc(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Nc(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(o||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Lc(t,e){if(!e||Pc(t)||Nc(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 Ic(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>ee(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}${ee(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Ii(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,i=>i.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function Oc(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function Oi(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function er(t,e){try{t.onError?.(e)}catch{}}async function dt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,i=e.useProxy||"",r=e.errorTTL??8e3,s=e.headers||{},a=!!e.debug;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[,p="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(p)?atob(y):decodeURIComponent(y),S=new Uint8Array([...w].map(C=>C.charCodeAt(0))),v=new Blob([S],{type:(p||"").split(";")[0]||""});return{ok:!0,data:v,status:200,url:t,fromCache:!1,mime:v.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let p=await fetch(t);if(!p.ok)return{ok:!1,data:null,status:p.status,url:t,fromCache:!1,reason:"http_error"};let y=await p.blob(),b=y.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ii(y),blob:y,status:p.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:p.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:p.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=Oc(t,{as:n,timeout:o,useProxy:i,errorTTL:r,credentials:e.credentials,headers:s})}catch{let p={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return er(e,p),p}let u=Yt.get(l);if(u&&u.until>Date.now())return{...u.result,fromCache:!0};u&&Yt.delete(l);let c=tr.get(l);if(c)return c;let f=Lc(t,i)?Ic(t,i):t,d=e.credentials;if(!d)try{let p=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,p);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),o),g=(async()=>{try{let p=await fetch(f,{signal:h.signal,credentials:d,headers:s});if(!p.ok){let w={ok:!1,data:null,status:p.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&r>0&&Li(l,w,r),a){let S=`${p.status} ${p.statusText||""}`.trim();Pi.warnOnce(`http:${p.status}:${n}:${Oi(t)}`,`Couldn't load ${t} (HTTP ${S}).`)}return er(e,w),w}if(n==="text")return{ok:!0,data:await p.text(),status:p.status,url:f,fromCache:!1};let y=await p.blob(),b=y.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ii(y),blob:y,status:p.status,url:f,fromCache:!1,mime:b}:{ok:!0,data:y,status:p.status,url:f,fromCache:!1,mime:b}}catch(p){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":p&&typeof p=="object"&&p.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&r>0&&Li(l,b,r),a){let w=`${y}:${n}:${Oi(t)}`,S=y==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;Pi.errorOnce(w,S)}return er(e,b),b}finally{clearTimeout(m),tr.delete(l)}})();return l!==null&&tr.set(l,g),g}var Pi,tr,Ni,Yt,me=ut(()=>{"use strict";Ft();Pi=$c("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),tr=new Map,Ni=50,Yt=new Map});async function $e(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let o=cn(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??he(t);if(!o)return t;let i=Jo(o),r=ee(i),s=(e.useProxy||"")+"|"+r;if(j.background.has(s)){let a=j.background.get(s);return a?`url("${a}")`:"none"}try{let a=await dt(r,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return a.ok?(j.background.set(s,a.data),`url("${a.data}")`):(j.background.set(s,null),"none")}catch{return j.background.set(s,null),"none"}}var Wi=ut(()=>{"use strict";Mt();Ft();me()});function Ui(t,e){if(Wc.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function ji(t){let e=t.replace(Hc,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Vi(t,e,n,o){for(let i=0;i5&&(d[0]==="m"||d[0]==="p")){let h=d.startsWith("margin")?"marginUnstable":d.startsWith("padding")?"paddingUnstable":null;h&&!o[h]&&zc.test(s.getPropertyValue(d))&&(o[h]=!0)}}}let u=r.selectorText;if(u&&u.includes(":has(")&&(o.usesHas=!0),u&&/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i.test(u)&&(o.leaksAcrossSubtrees=!0),s&&(s.counterReset||s.counterIncrement||s.counterSet||s.content&&s.content.includes("counter"))&&(o.leaksAcrossSubtrees=!0),u&&u.includes("&"))for(let c=r.parentRule;c&&u.includes("&");c=c.parentRule)c.selectorText&&(u=u.replace(/&/g,`:is(${c.selectorText})`));if(u&&(o.inContainer||Bi.test(u)||u.includes("+")||u.includes("~")))for(let c of Wn(u,",")){let f=c.trim();f&&(o.inContainer||Bi.test(f)||f.includes("+")||f.includes("~"))&&o.shareUnsafeSels.add(f)}if((a||l)&&jc(r,u,a,o),u&&u.includes(":"))for(let c in Di)Di[c].test(u)&&n[c].push(ji(u));if(r.styleSheet){if(!On(r.styleSheet,e,n,o))return!1}else if(r.cssRules&&r.cssRules.length){let c=r.constructor?.name==="CSSContainerRule",f=r.constructor?.name==="CSSScopeRule";c&&o.inContainer++,f&&(o.inScope=(o.inScope||0)+1);let d=Vi(r.cssRules,e,n,o);if(c&&o.inContainer--,f&&o.inScope--,!d)return!1}}return!0}function jc(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}let i=n?o.svgGeometrySels:o.svgAnimSels;for(let r of Wn(e,",")){let s=r.trim();s&&i.add(zi.test(s)?ji(s):s)}}function On(t,e,n,o){let i;try{i=t.cssRules}catch{i=o.crossOriginRules?.(t)}return i?Vi(i,e,n,o):!1}function or(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let i of o)for(let r of Object.keys(i))r==="offset"||r==="easing"||r==="composite"||r==="computedOffset"||e.add(r.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Gi(t){let e=new Set;return On(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:Hi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Wn(t,e){if(!t.includes(e))return[t];let n=[],o=0,i=null,r=0;for(let s=0;s"||f==="+"||f==="~")&&(o=c+1)}let i="",r=0;for(let c of t.slice(o))c==="("||c==="["?r++:c===")"||c==="]"?r--:r===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let u=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return u?"t"+u.toLowerCase():null}function qi(t,e){if(!e.length)return"";if(e.some(o=>o.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Gc(t,e){let n=t.createElement("div"),o={};for(let i in e){let r=e[i];(i==="before"||i==="after")&&r.push("q"),o[i]=qi(n,r)}return o}function Xi(t,e){let n={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let o=new Set(nr),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},r={budget:Hi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,svgGeometry:new Set,svgGeometrySels:new Set,svgAnimSels:new Set,svgKeyframes:!1,svgGeometryAll:!1,inScope:0,crossOriginRules:e};for(let f of t.styleSheets)if(!On(f,o,i,r))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let f of s)if(!On(f,o,i,r))return n}if(typeof t.getAnimations=="function"){let f=new Set;or(t.getAnimations(),f);for(let d of f)o.add(d),Ui(r.svgGeometry,d)&&(r.svgGeometryAll=!0)}if(r.svgKeyframes)for(let f of r.svgAnimSels)r.svgGeometrySels.add(f);let a=r.svgGeometryAll?null:Array.from(r.svgGeometrySels).join(","),l=Array.from(r.shareUnsafeSels),u=qi(t.createElement("div"),l)===null?null:l.map(f=>({sel:f,key:Vc(f)})),c=new Set(Uc);for(let f of Bc)o.has(f)&&c.add(f);for(let f of r.pseudoProps)c.add(f);return(r.pseudoProps.has("transform")||r.pseudoProps.has("rotate")||r.pseudoProps.has("scale"))&&c.add("transform-origin"),r.pseudoProps.has("perspective")&&c.add("perspective-origin"),{universe:o,pseudoUniverse:c,svgGeometry:r.svgGeometry,svgGeometrySel:a,pseudoGates:Gc(t,i),usesHas:r.usesHas,leaksAcrossSubtrees:r.leaksAcrossSubtrees,shareGate:u,marginUnstable:r.marginUnstable,paddingUnstable:r.paddingUnstable,importantProps:r.importantProps}}catch{return n}}var Wc,Dc,nr,Bc,Uc,zi,Hi,zc,Di,Hc,Bi,Dn=ut(()=>{"use strict";Wc=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);Dc=/^(?:animation|transition)/,nr=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","vertical-align","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],Bc=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],Uc=["display","width","height","min-width","min-height"],zi=/::?(?:before|after|first-letter|first-line|marker)/,Hi=2e4,zc=/%|\bauto\b|calc\(|var\(/i,Di={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Hc=/::?(?:before|after|first-letter|first-line|marker)\b/g;Bi=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function tt(t){return Yi.add(t),t.setAttribute("data-snapdom-internal",""),t}function ne(t){return Yi.has(t)}var Yi,Tt=ut(()=>{"use strict";Yi=new WeakSet});function ir(t){if(t=String(t).toLowerCase(),un.has(t)){let r={};return j.defaultStyle.set(t,r),r}if(j.defaultStyle.has(t))return j.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(ne);e||(e=document.createElement("div"),tt(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),i={};for(let r of o){if(Pe(r))continue;let s=o.getPropertyValue(r);i[r]=s}for(let r of nr)!(r in i)&&!Pe(r)&&(i[r]=o.getPropertyValue(r));return e.removeChild(n),j.defaultStyle.set(t,i),i}function Pe(t){let e=Ki.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Yc.has(n)||Xc.test(n)||qc.test(n),Ki.set(t,e)}return e}function Zi(t,e){let n=tf.get(t);if(n===void 0||e[n]!==e[t])return!1;let o=e["writing-mode"];if(o&&o!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function Bn(t,e){return!Jc.has(t)&&(e==="inline"||Kc.has(t)||Qi.has(t))}function sr(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||Qi.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let r=(e.position||"static").toLowerCase();return r==="absolute"||r==="fixed"?!1:!nf.has(o)}function Ne(t,e,n=!0,o=!1){if(e=String(e||"").toLowerCase(),un.has(e))return"";let i=[],r=ir(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=Bn(e,s),u=t["text-wrap-mode"]||t["white-space"]||"",c=u==="nowrap"||u==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if(Pe(m)||Zi(m,t))continue;let g=t[m];if(!(Ji.has(m)&&Qc.has(e))){if(d){if(Ji.has(m))continue;if(Zc.has(m)){g&&g!==r[m]&&(i.push(`${m}:${g}`),g!=="auto"&&(h=!0));continue}}if(g&&g!==r[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&g.endsWith("px")&&g.includes(".")){let y=parseFloat(g);if(Number.isFinite(y)){i.push(`${m}:${(y+ef).toFixed(3)}px`);continue}}i.push(`${m}:${g}`)}}}if(d&&!a&&!o&&!h){let m=t.width;m&&m!=="auto"&&m!==r.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function ar(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 lr(t,e=null){let n=new Map;for(let s of t){let a=ir(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Zi(d,a)).map(([d,h])=>`${d}:${h};`).sort(),f=c.join("");f&&(n.has(f)||n.set(f,{tagList:[],declarations:c}),n.get(f).tagList.push(s))}let o=[...n.values()],i=null;for(let{declarations:s}of o){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let r="";if(i.size&&o.length>1){let s=o.flatMap(a=>a.tagList);r+=`${s.join(",")} { ${[...i].join("")} } +var Pc=Object.defineProperty;var ot=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var oe=(t,e)=>{for(var n in e)Pc(t,n,{get:e[n],enumerable:!0})};function Li(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function Ii(t="soft"){t==="disabled"&&(j.computedStyle=new WeakMap,j.measureHints=new WeakMap,j.baseStyle=new gt(50),j.defaultStyle=new gt(64),j.image=new gt(100),j.background=new gt(100),j.resource=new gt(150),j.compress=new gt(50))}var gt,j,Mt=ot(()=>{"use strict";gt=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)}},j={image:new gt(100),background:new gt(100),resource:new gt(150),defaultStyle:new gt(64),baseStyle:new gt(50),compress:new gt(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function me(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Lc(t){let e=[],n=0,o=0,i="";for(let r=0;rr.dppx-s.dppx),(o.find(r=>r.dppx>=e)||o[o.length-1]).url):null}function er(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==6?`matrix(${o})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,o)=>{let i=o.split(",").map(r=>r.trim());return i.length!==16?`matrix3d(${o})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function re(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function nr(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function dn(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function or(t){return"\u2022".repeat(String(t??"").length)}function ct(t,e){return t?.nodeType===1&&t.localName===e}function Tt(t){return t?.nodeType===1&&t.namespaceURI===Ic}function Ot(t){return t?.nodeType===1&&t.namespaceURI===Wc}function Kt(t){return t?.nodeType===11&&!!t.host}function Dt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function rr(t){return t?.nodeType===9}var tr,Nc,Ic,Wc,$t=ot(()=>{"use strict";tr=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,Nc=tr;Ic="http://www.w3.org/1999/xhtml",Wc="http://www.w3.org/2000/svg"});function Oc(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let o=new Map,i=0;function r(s,a,l){if(i>=n)return;let u=Date.now();(o.get(a)||0)>u||(o.set(a,u+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){r("warn",s,a)},errorOnce(s,a){r("error",s,a)},reset(){o.clear(),i=0}}}function Di(t,e,n){if(Jt.size>=Oi){let o=Date.now();for(let[i,r]of Jt)r.until<=o&&Jt.delete(i);for(;Jt.size>=Oi;)Jt.delete(Jt.keys().next().value)}Jt.set(t,{until:Date.now()+n,result:e})}function Dc(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Bc(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",o=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(o||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function zc(t,e){if(!e||Dc(t)||Bc(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 Uc(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>re(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}${re(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function Bi(t){return new Promise((e,n)=>{let o=new FileReader;o.onload=()=>e(String(o.result||"").replace(/^data:[^,]*/,i=>i.replace(/\s+/g,""))),o.onerror=()=>n(new Error("read_failed")),o.readAsDataURL(t)})}function Hc(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function zi(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function sr(t,e){try{t.onError?.(e)}catch{}}async function dt(t,e={}){let n=e.as??"blob",o=e.timeout??3e3,i=e.useProxy||"",r=e.errorTTL??8e3,s=e.headers||{},a=!!e.debug;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[,p="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(p)?atob(y):decodeURIComponent(y),C=new Uint8Array([...w].map(v=>v.charCodeAt(0))),S=new Blob([C],{type:(p||"").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 p=await fetch(t);if(!p.ok)return{ok:!1,data:null,status:p.status,url:t,fromCache:!1,reason:"http_error"};let y=await p.blob(),b=y.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Bi(y),blob:y,status:p.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:p.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:p.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=Hc(t,{as:n,timeout:o,useProxy:i,errorTTL:r,credentials:e.credentials,headers:s})}catch{let p={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return sr(e,p),p}let u=Jt.get(l);if(u&&u.until>Date.now())return{...u.result,fromCache:!0};u&&Jt.delete(l);let c=ir.get(l);if(c)return c;let f=zc(t,i)?Uc(t,i):t,d=e.credentials;if(!d)try{let p=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,p);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),o),g=(async()=>{try{let p=await fetch(f,{signal:h.signal,credentials:d,headers:s});if(!p.ok){let w={ok:!1,data:null,status:p.status,url:f,fromCache:!1,reason:"http_error"};if(l!==null&&r>0&&Di(l,w,r),a){let C=`${p.status} ${p.statusText||""}`.trim();Wi.warnOnce(`http:${p.status}:${n}:${zi(t)}`,`Couldn't load ${t} (HTTP ${C}).`)}return sr(e,w),w}if(n==="text")return{ok:!0,data:await p.text(),status:p.status,url:f,fromCache:!1};let y=await p.blob(),b=y.type||p.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Bi(y),blob:y,status:p.status,url:f,fromCache:!1,mime:b}:{ok:!0,data:y,status:p.status,url:f,fromCache:!1,mime:b}}catch(p){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":p&&typeof p=="object"&&p.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&r>0&&Di(l,b,r),a){let w=`${y}:${n}:${zi(t)}`,C=y==="timeout"?`Timed out loading ${t} after ${o}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;Wi.errorOnce(w,C)}return sr(e,b),b}finally{clearTimeout(m),ir.delete(l)}})();return l!==null&&ir.set(l,g),g}var Wi,ir,Oi,Jt,ge=ot(()=>{"use strict";$t();Wi=Oc("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),ir=new Map,Oi=50,Jt=new Map});async function Ne(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let o=un(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??me(t);if(!o)return t;let i=nr(o),r=re(i),s=(e.useProxy||"")+"|"+r;if(j.background.has(s)){let a=j.background.get(s);return a?`url("${a}")`:"none"}try{let a=await dt(r,{as:"dataURL",useProxy:e.useProxy,debug:e.debug});return a.ok?(j.background.set(s,a.data),`url("${a.data}")`):(j.background.set(s,null),"none")}catch{return j.background.set(s,null),"none"}}var Ui=ot(()=>{"use strict";Mt();$t();ge()});function Vi(t,e){if(jc.has(e))t.add(e);else if(e.startsWith("transform-origin-"))t.add("transform-origin");else return!1;return!0}function Xi(t){let e=t.replace(Yc,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function Yi(t,e,n,o){for(let i=0;i5&&(d[0]==="m"||d[0]==="p")){let h=d.startsWith("margin")?"marginUnstable":d.startsWith("padding")?"paddingUnstable":null;h&&!o[h]&&Xc.test(s.getPropertyValue(d))&&(o[h]=!0)}}}let u=r.selectorText;if(u&&u.includes(":has(")&&(o.usesHas=!0),u&&/[+~]|:has\(|:nth-(?:last-)?child\([^)]*\bof\b/i.test(u)&&(o.leaksAcrossSubtrees=!0),s&&(s.counterReset||s.counterIncrement||s.counterSet||s.content&&s.content.includes("counter"))&&(o.leaksAcrossSubtrees=!0),u&&u.includes("&"))for(let c=r.parentRule;c&&u.includes("&");c=c.parentRule)c.selectorText&&(u=u.replace(/&/g,`:is(${c.selectorText})`));if(u&&(o.inContainer||ji.test(u)||u.includes("+")||u.includes("~")))for(let c of Un(u,",")){let f=c.trim();f&&(o.inContainer||ji.test(f)||f.includes("+")||f.includes("~"))&&o.shareUnsafeSels.add(f)}if((a||l)&&Kc(r,u,a,o),u&&u.includes(":"))for(let c in Hi)Hi[c].test(u)&&n[c].push(Xi(u));if(r.styleSheet){if(!zn(r.styleSheet,e,n,o))return!1}else if(r.cssRules&&r.cssRules.length){let c=r.constructor?.name==="CSSContainerRule",f=r.constructor?.name==="CSSScopeRule";c&&o.inContainer++,f&&(o.inScope=(o.inScope||0)+1);let d=Yi(r.cssRules,e,n,o);if(c&&o.inContainer--,f&&o.inScope--,!d)return!1}}return!0}function Kc(t,e,n,o){if(n&&t.constructor?.name==="CSSKeyframeRule"){o.svgKeyframes=!0;return}if(!e||o.inScope){n&&(o.svgGeometryAll=!0);return}let i=n?o.svgGeometrySels:o.svgAnimSels;for(let r of Un(e,",")){let s=r.trim();s&&i.add(Gi.test(s)?Xi(s):s)}}function zn(t,e,n,o){let i;try{i=t.cssRules}catch{i=o.crossOriginRules?.(t)}return i?Yi(i,e,n,o):!1}function lr(t,e){for(let n of t){let o=n.effect?.getKeyframes?.()||[];for(let i of o)for(let r of Object.keys(i))r==="offset"||r==="easing"||r==="composite"||r==="computedOffset"||e.add(r.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function Ki(t){let e=new Set;return zn(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:qi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Un(t,e){if(!t.includes(e))return[t];let n=[],o=0,i=null,r=0;for(let s=0;s"||f==="+"||f==="~")&&(o=c+1)}let i="",r=0;for(let c of t.slice(o))c==="("||c==="["?r++:c===")"||c==="]"?r--:r===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let u=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return u?"t"+u.toLowerCase():null}function Ji(t,e){if(!e.length)return"";if(e.some(o=>o.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Qc(t,e){let n=t.createElement("div"),o={};for(let i in e){let r=e[i];(i==="before"||i==="after")&&r.push("q"),o[i]=Ji(n,r)}return o}function Qi(t,e){let n={universe:null,pseudoUniverse:null,svgGeometry:null,svgGeometrySel:null,usesHas:!0,leaksAcrossSubtrees:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let o=new Set(ar),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},r={budget:qi,usesHas:!1,leaksAcrossSubtrees:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,svgGeometry:new Set,svgGeometrySels:new Set,svgAnimSels:new Set,svgKeyframes:!1,svgGeometryAll:!1,inScope:0,crossOriginRules:e};for(let f of t.styleSheets)if(!zn(f,o,i,r))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let f of s)if(!zn(f,o,i,r))return n}if(typeof t.getAnimations=="function"){let f=new Set;lr(t.getAnimations(),f);for(let d of f)o.add(d),Vi(r.svgGeometry,d)&&(r.svgGeometryAll=!0)}if(r.svgKeyframes)for(let f of r.svgAnimSels)r.svgGeometrySels.add(f);let a=r.svgGeometryAll?null:Array.from(r.svgGeometrySels).join(","),l=Array.from(r.shareUnsafeSels),u=Ji(t.createElement("div"),l)===null?null:l.map(f=>({sel:f,key:Jc(f)})),c=new Set(qc);for(let f of Gc)o.has(f)&&c.add(f);for(let f of r.pseudoProps)c.add(f);return(r.pseudoProps.has("transform")||r.pseudoProps.has("rotate")||r.pseudoProps.has("scale"))&&c.add("transform-origin"),r.pseudoProps.has("perspective")&&c.add("perspective-origin"),{universe:o,pseudoUniverse:c,svgGeometry:r.svgGeometry,svgGeometrySel:a,pseudoGates:Qc(t,i),usesHas:r.usesHas,leaksAcrossSubtrees:r.leaksAcrossSubtrees,shareGate:u,marginUnstable:r.marginUnstable,paddingUnstable:r.paddingUnstable,importantProps:r.importantProps}}catch{return n}}var jc,Vc,ar,Gc,qc,Gi,qi,Xc,Hi,Yc,ji,Hn=ot(()=>{"use strict";jc=new Set(["r","cx","cy","rx","ry","x","y","width","height","d","transform","translate","rotate","scale","transform-origin","transform-box","vector-effect"]);Vc=/^(?:animation|transition)/,ar=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","vertical-align","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],Gc=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],qc=["display","width","height","min-width","min-height"],Gi=/::?(?:before|after|first-letter|first-line|marker)/,qi=2e4,Xc=/%|\bauto\b|calc\(|var\(/i,Hi={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Yc=/::?(?:before|after|first-letter|first-line|marker)\b/g;ji=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function Q(t){return Zi.add(t),t.setAttribute("data-snapdom-internal",""),t}function qt(t){return Zi.has(t)}var Zi,At=ot(()=>{"use strict";Zi=new WeakSet});function fr(t){if(t=String(t).toLowerCase(),pn.has(t)){let r={};return j.defaultStyle.set(t,r),r}if(j.defaultStyle.has(t))return j.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(qt);e||(e=document.createElement("div"),Q(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let o=getComputedStyle(n),i={};for(let r of o){if(Le(r))continue;let s=o.getPropertyValue(r);i[r]=s}for(let r of ar)!(r in i)&&!Le(r)&&(i[r]=o.getPropertyValue(r));return e.removeChild(n),j.defaultStyle.set(t,i),i}function Le(t){let e=ts.get(t);if(e===void 0){let n=String(t).toLowerCase();e=ef.has(n)||tf.test(n)||Zc.test(n),ts.set(t,e)}return e}function os(t,e){let n=af.get(t);if(n===void 0||e[n]!==e[t])return!1;let o=e["writing-mode"];if(o&&o!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function jn(t,e){return!of.has(t)&&(e==="inline"||nf.has(t)||ns.has(t))}function ur(t,e,n){let o=(e.display||"").toLowerCase();if(o==="inline"||ns.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let r=(e.position||"static").toLowerCase();return r==="absolute"||r==="fixed"?!1:!cf.has(o)}function Ie(t,e,n=!0,o=!1){if(e=String(e||"").toLowerCase(),pn.has(e))return"";let i=[],r=fr(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=jn(e,s),u=t["text-wrap-mode"]||t["white-space"]||"",c=u==="nowrap"||u==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if(Le(m)||os(m,t))continue;let g=t[m];if(!(es.has(m)&&rf.has(e))){if(d){if(es.has(m))continue;if(sf.has(m)){g&&g!==r[m]&&(i.push(`${m}:${g}`),g!=="auto"&&(h=!0));continue}}if(g&&g!==r[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&g.endsWith("px")&&g.includes(".")){let y=parseFloat(g);if(Number.isFinite(y)){i.push(`${m}:${(y+lf).toFixed(3)}px`);continue}}i.push(`${m}:${g}`)}}}if(d&&!a&&!o&&!h){let m=t.width;m&&m!=="auto"&&m!==r.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function dr(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 pr(t,e=null){let n=new Map;for(let s of t){let a=fr(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!os(d,a)).map(([d,h])=>`${d}:${h};`).sort(),f=c.join("");f&&(n.has(f)||n.set(f,{tagList:[],declarations:c}),n.get(f).tagList.push(s))}let o=[...n.values()],i=null;for(let{declarations:s}of o){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let r="";if(i.size&&o.length>1){let s=o.flatMap(a=>a.tagList);r+=`${s.join(",")} { ${[...i].join("")} } `}for(let{tagList:s,declarations:a}of o){let l=o.length>1?a.filter(c=>!i.has(c)):a;if(!l.length)continue;let u=l.join("");r+=`${s.join(",")} { ${u} } -`}return r}function dn(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,o=1;for(let i of e)n.set(i,`c${o++}`);return n}function of(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{let r={length:0,getPropertyValue:()=>"",item:()=>""};return r[Symbol.iterator]=function*(){},r};if(t?.nodeType!==1){let r=typeof window<"u"?window:null;if(r&&typeof r.getComputedStyle=="function")try{return r.getComputedStyle(t,e)||n()}catch{return n()}return n()}let o=j.computedStyle.get(t);o||(o=new Map,j.computedStyle.set(t,o));let i=o.get(e);if(!i){let r=of(t),s=null;try{s=r&&typeof r.getComputedStyle=="function"?r.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),o.set(e,i)}return i}function Le(t,e=null){let n={};for(let o of e||t){let i=t.getPropertyValue(o);i&&(n[o]=i)}for(let o of rf){let i=n[`border-${o}-style`],r=n[`border-${o}-width`];(i==="none"||i==="hidden"||r==="0px")&&(delete n[`border-${o}-style`],delete n[`border-${o}-width`],delete n[`border-${o}-color`])}return n}function oe(t){let e=[],n=0,o=0,i="";for(let r=0;r{"use strict";Mt();Dn();Tt();rr=new Set(["meta","script","noscript","title","link","template"]),un=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);qc=/(?:^|-)(animation|transition)(?:-|$)/i,Xc=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Yc=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Ki=new Map;Kc=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Qi=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Jc=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Ji=new Set(["width","max-width","inline-size","max-inline-size"]),Qc=new Set(["mi","mn","mo","ms","mtext"]),Zc=new Set(["min-width","min-inline-size"]),tf=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));ef=.001;nf=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);rf=["top","right","bottom","left"]});function St(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,o=()=>{n||(n=!0,e())};try{requestAnimationFrame(o)}catch{o();return}setTimeout(o,t)})}async function pn(t=document){let e=t.fonts,n=!1,o=e.ready.then(()=>{n=!0},()=>{n=!0});for(;!n&&e.status==="loading";){let i=[...e].filter(r=>r.status==="loading");if(!i.length)return;await Promise.race([o,Promise.allSettled(i.map(r=>r.loaded))])}}function es(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?sf:ts),n=null,o={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let r=()=>{n=null,o.yielded=!0,e=performance.now()+ts,i()},s=new MessageChannel;s.port1.onmessage=r,s.port2.postMessage(0)}))};return o}function hn(){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 Y(){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),i=/mobile/i.test(t),r=!/safari/i.test(t),s=o&&i&&r,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),u=/ipad|iphone|ipod/.test(e)&&o;return n||s||a||l||u}function At(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var ts,sf,yt=ut(()=>{"use strict";ts=16,sf=40});function D(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))}function et(t,e,n,o){let i=t&&t.warnings;i&&i.length{"use strict";af=50});var _t=ut(()=>{"use strict";Wi();Ie();yt();Ft();vt()});var tc={};pe(tc,{MAX_RASTER_AREA:()=>ue,MAX_RASTER_SIDE:()=>Ht,WEBP_MAX_SIDE:()=>wi,__setDecodeFrameIdleMs:()=>Ph,cropSvgText:()=>Uo,decodeSvgFromDataURL:()=>Me,encodeSvgToDataURL:()=>Ae,fixSafariShadows:()=>Ho,peekSvgHeader:()=>zo,toCanvas:()=>Jt});function vh(t,e){let n=e.__session;try{let o=t.match(/]*>/i);if(!o)return t;let i=o[0],r=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),s=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(s)||r<=0||s<=0)return t;let a=Math.min(1,Ht/r,Ht/s,Math.sqrt(ue/(r*s)));if(a>=1)return t;let l=Math.max(1,Math.floor(r*a)),u=Math.max(1,Math.floor(s*a));return et(n,"raster-clamp",`capture ${Math.round(r)}x${Math.round(s)}px exceeds decode limits; downscaled to ${l}x${u}px`),D(e,`${Math.round(r)}\xD7${Math.round(s)}px is too large for the browser to draw; scaled down to ${l}\xD7${u}px. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),t.replace(i,i.replace(/(\bwidth=")[\d.]+/i,`$1${l}`).replace(/(\bheight=")[\d.]+/i,`$1${u}`))}catch{return t}}function Uo(t,e,{shiftContent:n=Y()}={}){let o=["x","y","width","height"].map(T=>Number(e?.[T]));if(!o.every(Number.isFinite)||o[2]<=0||o[3]<=0)throw new RangeError("[SnapDOM] crop needs finite x/y and a positive width/height.");let i=t.match(/]*>/i);if(!i)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let r=i[0],s=(r.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(s||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[SnapDOM] Can't crop: the SVG has no valid viewBox.");let[l,u,c,f]=a,d=Math.max(l,o[0]),h=Math.max(u,o[1]),m=Math.min(l+c,o[0]+o[2]),g=Math.min(u+f,o[1]+o[3]);if(!(m>d)||!(g>h))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let p=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]),b=Number.isFinite(p)&&p>0?p/c:1,w=Number.isFinite(y)&&y>0?y/f:1,S=Math.max(1,(m-d)*b),v=Math.max(1,(g-h)*w),C=r.replace(/(\bwidth=")[^"]*/i,`$1${S}`).replace(/(\bheight=")[^"]*/i,`$1${v}`),A=n?Ch(t,r,d,h):null;if(A)return C.replace(/(\bviewBox=")[^"]*/i,(M,x)=>`${x}0 0 ${m-d} ${g-h}`)+A.slice(r.length);let F=C.replace(/(\bviewBox=")[^"]*/i,`$1${d} ${h} ${m-d} ${g-h}`);return t.replace(r,F)}function Ch(t,e,n,o){if(!t.startsWith(e))return null;let i=/^\s*]*>/i.exec(t.slice(e.length,e.length+2048));if(!i)return null;let r=i[0],s=(u,c,f)=>{let d=new RegExp(`(\\s${c}=")([^"]*)`),h=u.match(d),m=h?parseFloat(h[2]):0;return Number.isFinite(m)?h?u.replace(d,(g,p)=>`${p}${m-f}`):u.replace(/^(\s*`${p} ${c}="${-f}"`):null},a=s(r,"x",n),l=a&&s(a,"y",o);return l?e+l+t.slice(e.length+r.length):null}function mi(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Me(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function zo(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 Ae(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function Kl(t){let e=[],n="",o=0;for(let i=0;ii.trim()).filter(Boolean)}function kh(t){let e=[],n="",o=0;for(let r=0;r`${a}:${l}`).join(";")}function Mh(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,o)=>`${n}{${Jl(o)}}`)}function Ah(t){return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,Mh(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,o)=>`style=${n}${Jl(o)}${n}`),t}function _h(){return Oo||(Oo=(async()=>{try{let t='
',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 i=o.getImageData(2,18,1,1).data[3]>128,r=o.getImageData(2,2,1,1).data[3]>128;return{native:i||r,flippedY:r&&!i}}catch{return{native:!1,flippedY:!1}}})(),Oo)}function Eh(t){let e=[],n=0,o=0;for(let i=0;i{let r=0,s=0,a="",l=0;for(;lKl(o).map(i=>{let r=i.indexOf(":");if(r<0)return i;let s=i.slice(0,r).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${Eh(i.slice(r+1))}`:i}).join(";");return t=t.replace(/]*>([\s\S]*?)<\/style>/gi,(o,i)=>o.replace(i,i.replace(/([^{}]+)\{([^}]*)\}/g,(r,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(o,i,r)=>`style=${i}${n(r)}${i}`),t}async function Ho(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:o}=await _h();try{let i=t;return n||(i=Ah(i)),o&&(i=Rh(i,n)),{svg:i,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}function Fh(t,e,n){let o=t.naturalWidth,i=t.naturalHeight,r=Math.min(8,i),s=document.createElement("canvas");s.width=Math.max(1,Math.ceil(o*e)),s.height=Math.max(1,Math.ceil(r*6*n));let a=s.getContext("2d",{willReadFrequently:!0});return!a||!(o>0&&i>0)?null:()=>{a.clearRect(0,0,s.width,s.height);for(let f=0;f<6;f++){let d=Math.floor((i-r)*f/5);a.drawImage(t,0,d,o,r,0,f*r*n,o*e,r*n)}let l=a.getImageData(0,0,s.width,s.height).data,u=!1,c=0;for(let f=3;f0&&(u=!0),c=c*31+l[f-3]+l[f-2]*7+l[f-1]*13+l[f]|0;return{ink:u,sig:c}}}async function Th(t,e,n){tt(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await Wo(),await Wo(),!1;let o=performance.now()+(e?600:150),i=null;for(;;){let r;try{r=n()}catch{return!1}if(r.ink&&(!e||r.sig===i))return!0;if(i=r.sig,performance.now()>o)return r.ink;await Wo()}}finally{try{t.remove()}catch{}}}function Bo(){clearTimeout(xi),fe?.remove(),fe=null,Do=0}function Ph(t){Zl=t??Ql}function Xl(t){if(typeof document>"u"||!document.body)return new Image;if(clearTimeout(xi),fe&&!fe.contentDocument&&Bo(),fe&&Do>$h&&$n===0&&Bo(),!fe){let n=document.createElement("iframe");tt(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)fe=n,Do=0;else{try{n.remove()}catch{}return new Image}}Do+=t.length,$n+=1;let e=fe.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function yi(t,e=!1){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,$n=Math.max(0,$n-1),e&&(gi=!0),!($n>0)&&(gi?(gi=!1,Bo()):xi=setTimeout(Bo,Zl)))}function Yl(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function Wh(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),o=0,i=0;for(let r=e;r+48<=t.length;r+=n){let s=t.slice(r,r+48);o++,Oh.some(a=>s.includes(a))||i++}return i*2>o}function bi(t,e,n,o,i){if(!e.naturalWidth){t.drawImage(e,0,0,n,o);return}let r=n*o,s=r>Nh&&!Wh(i)?Math.min(Ih,Math.ceil(r/Lh)):1;if(s===1){t.drawImage(e,0,0,n,o);return}let a=e.naturalWidth,l=e.naturalHeight/o;for(let u=0;u]*>/i)||[])[0]||"",g=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(g)&&Number.isFinite(p)&&g>0&&p>0&&Math.min(1,Ht/g,Ht/p,Math.sqrt(ue/(g*p)))<1;if(l||y||Y())try{let b=Me(t);if(l&&(b=Uo(b,l)),Y()){let w=await Ho(b);b=w.svg,f=w.naturalOnly,d=/@font-face|data:image\//i.test(b)}(y||l)&&(b=vh(b,e)),c=Ae(b)}catch(b){if(l)throw b;c=t}}let h=u||Xl(c);try{u||await Yl(h,c)}catch(m){if(!h.__snapdomDecodeFrame)throw m;let g=h;h=Xl(c),yi(g);try{await Yl(h,c)}catch(p){throw yi(h,e.__releaseDecodeFrame),p}}try{!u&&!Y()&&mi(c)&&(At()?/.data(?:%3A|:)image(?:%2F|\/)svg/i:/(?:%40|@)font-face/i).test(c)&&await new Promise(N=>{let B=new MessageChannel;B.port1.onmessage=()=>{B.port1.close(),B.port2.close(),N()},B.port2.postMessage(0)});let m=u?u.width:h.naturalWidth,g=u?u.height:h.naturalHeight,p=l?m:Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:m,y=l?g:Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:g,b,w,S=Number.isFinite(n),v=Number.isFinite(o);if(S&&v)b=Math.max(1,n),w=Math.max(1,o);else if(S){let N=n/Math.max(1,p);b=n,w=y*N}else if(v){let N=o/Math.max(1,y);w=o,b=p*N}else{let N=u&&Number.isFinite(s.vbW)&&Number.isFinite(s.vbH);b=N?s.vbW:m,w=N?s.vbH:g}!S&&!v&&(b=b*i,w=w*i);let C=b*r,A=w*r,F=Math.max(C/Ht,A/Ht,Math.sqrt(C*A/ue)),T=e.__encodeFormat==="webp"?Math.max(C,A)/wi:0,M=Math.max(F,T);if(M>1){let N=F<=1;et(e.__session,"canvas-clamp",`output ${Math.round(C)}x${Math.round(A)}px exceeds ${N?"WebP":"canvas"} limits; downscaled`),D(e,N?`${Math.round(C)}\xD7${Math.round(A)}px is larger than WebP can encode (${wi}px per side); scaled down. For full size, export a PNG, an SVG, or crop.`:`${Math.round(C)}\xD7${Math.round(A)}px is larger than a canvas allows; scaled down. For full size, export ${typeof CompressionStream=="function"?"a PNG or JPEG":"a JPEG"} blob, an SVG, or crop.`),b/=M,w/=M}let x=Rt(e.canvas)&<(e.canvas,"canvas")?e.canvas:document.createElement("canvas");x.width=Math.max(1,b*r),x.height=Math.max(1,w*r),x.style.width=`${b}px`,x.style.height=`${w}px`;let E=x.getContext("2d");if(!E)throw new Error("[SnapDOM] The canvas you passed has no 2D context (is it already used for WebGL?).");let _=null,$=e.__layoutZoom||1;if(!u&&At()){let N=$*p/(b*r),B=Math.round(b*r*N),z=Math.round(w*r*N);N>1.01&&B<=Ht&&z<=Ht&&B*z<=ue&&(_={w:B,h:z})}let R=f&&(Math.round(b*r)!==m||Math.round(w*r)!==g),O=R?m:_?_.w:b*r,k=R?g:_?_.h:w*r,I=Y()&&!u?Fh(h,O/Math.max(1,m),k/Math.max(1,g)):null,L=!1;I&&(L=await Th(h,d,I));let P=()=>{if(E.save(),r!==1&&E.scale(r,r),a&&(E.save(),E.fillStyle=a,E.fillRect(0,0,b,w),E.restore()),R){let N=document.createElement("canvas");N.width=m,N.height=g,bi(N.getContext("2d"),h,m,g,c),E.drawImage(N,0,0,b,w)}else{if(E.save(),E.setTransform(1,0,0,1,0,0),_){let N=document.createElement("canvas");for(N.width=_.w,N.height=_.h,bi(N.getContext("2d"),h,_.w,_.h,c);N.width>b*r*2;){let B=document.createElement("canvas");B.width=Math.ceil(N.width/2),B.height=Math.ceil(N.height/2),B.getContext("2d").drawImage(N,0,0,B.width,B.height),N=B}E.imageSmoothingQuality="high",E.drawImage(N,0,0,b*r,w*r)}else bi(E,h,b*r,w*r,c);E.restore()}E.restore()};if(P(),I&&L&&d){let N=!0;try{N=I().ink}catch{}if(!N){let B=performance.now()+600;do{await Wo();try{N=I().ink}catch{break}}while(!N&&performance.now(){"use strict";yt();vt();Ft();Tt();Ht=Y()?16384:32767,ue=16384*16384,wi=16383;Oo=null;Wo=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});$h=24*1024*1024,Ql=5e3,fe=null,Do=0,$n=0,gi=!1,Zl=Ql,xi=0;Nh=4e6,Lh=2e6,Ih=8,Oh=["%3C","%3E","%20","%7B","%7D","%3B"]});var Pn={};pe(Pn,{rasterize:()=>Si});async function Si(t,e){let n=await Jt(t,{...e,__encodeFormat:e.format}),r=n.width*n.height<=2e6?n.toDataURL(`image/${e.format}`,e.quality):await new Promise(a=>{let l=()=>a(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(u=>{if(!u)return l();let c=new FileReader;c.onload=()=>a(String(c.result||"")),c.onerror=l,c.readAsDataURL(u)},`image/${e.format}`,e.quality)}catch{l()}}),s=new Image;return s.src=r,Y()?await s.decode():await new Promise((a,l)=>{if(s.complete&&s.naturalWidth)return a();s.onload=a,s.onerror=l}),s.style.width=`${n.width/e.dpr}px`,s.style.height=`${n.height/e.dpr}px`,s}var rn=ut(()=>{"use strict";_e();yt()});var vi={};pe(vi,{toImg:()=>Dh,toSvg:()=>Dh});async function Dh(t,e){let{scale:n=1,width:o,height:i,meta:r={}}=e,s=Number.isFinite(o),a=Number.isFinite(i),l=Number.isFinite(n)&&n!==1||s||a;if(Y()&&l)try{let{svg:d}=await Ho(Me(t)),h=(d.match(/]*>/i)||[])[0]||"",m=parseFloat((h.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((h.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(m)||!Number.isFinite(g))throw new Error("The SVG has no size.");let p=Number.isFinite(r.vbW)?r.vbW:Number.isFinite(r.w0)?r.w0:m,y=Number.isFinite(r.vbH)?r.vbH:Number.isFinite(r.h0)?r.h0:g,b,w;s&&a?(b=o,w=i):s?(b=o,w=Math.max(1,Math.round(y*(o/Math.max(1,p))))):a?(w=i,b=Math.max(1,Math.round(p*(i/Math.max(1,y))))):(b=Math.max(1,Math.round(m*n)),w=Math.max(1,Math.round(g*n)));let S=d.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${w}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=Ae(S),await v.decode(),v.style.width=`${b}px`,v.style.height=`${w}px`,v}catch(d){return et(e.__session,"safari-png-fallback","Safari vector toImg failed; using PNG",d),D(e,"Safari couldn't show the SVG; used a PNG.",d),Si(t,{...e,format:"png",quality:1,meta:r})}let u=t,c=!1;if(!s&&!a&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let d=Me(t),h=(d.match(/]*>/i)||[])[0]||"",m=Number((h.match(/\bwidth="([\d.]+)"/i)||[])[1]),g=Number((h.match(/\bheight="([\d.]+)"/i)||[])[1]);if(m>0&&g>0){let p=h.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(m*n))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(g*n))}"`);u=Ae(d.replace(h,p)),c=!0}}catch{}let f=new Image;f.decoding="sync",f.loading="eager",f.src=u;try{await f.decode()}catch(d){if(!c)throw d;f.src=t,c=!1,await f.decode()}if(s&&a)f.style.width=`${o}px`,f.style.height=`${i}px`;else if(s){let d=Number.isFinite(r.vbW)?r.vbW:Number.isFinite(r.w0)?r.w0:f.naturalWidth,h=Number.isFinite(r.vbH)?r.vbH:Number.isFinite(r.h0)?r.h0:f.naturalHeight,m=o/Math.max(1,d);f.style.width=`${o}px`,f.style.height=`${Math.max(1,Math.round(h*m))}px`}else if(a){let d=Number.isFinite(r.vbW)?r.vbW:Number.isFinite(r.w0)?r.w0:f.naturalWidth,h=Number.isFinite(r.vbH)?r.vbH:Number.isFinite(r.h0)?r.h0:f.naturalHeight,m=i/Math.max(1,h);f.style.height=`${i}px`,f.style.width=`${Math.max(1,Math.round(d*m))}px`}else{let d=Math.max(1,Math.round(f.naturalWidth*(c?1:n))),h=Math.max(1,Math.round(f.naturalHeight*(c?1:n)));if(f.style.width=`${d}px`,f.style.height=`${h}px`,!c&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let g=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${d}"`).replace(/height="[^"]*"/,`height="${h}"`);f.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,await f.decode()}catch(m){D(e,"Couldn't size the SVG image.",m),f.src!==t&&(f.src=t,await f.decode().catch(()=>{}))}}return f}var Ci=ut(()=>{"use strict";_t();vt();rn();_e()});var nc={};pe(nc,{encodePng:()=>Bh});function jo(t,e=new Uint8Array(0)){let n=new Uint8Array(e.length+12),o=new DataView(n.buffer);o.setUint32(0,e.length);for(let r=0;r<4;r++)n[r+4]=t.charCodeAt(r);n.set(e,8);let i=4294967295;for(let r=4;r>>8;return o.setUint32(n.length-4,(i^4294967295)>>>0),n}async function Bh(t,e,n){if(![t,e].every(g=>Number.isInteger(g)&&g>0&&g<=2147483647))throw new RangeError("[SnapDOM] PNG dimensions must be integers from 1 to 2147483647");let o=new Uint8Array(13),i=new DataView(o.buffer);i.setUint32(0,t),i.setUint32(4,e),o[8]=8,o[9]=6;let r=[new Uint8Array([137,80,78,71,13,10,26,10]),jo("IHDR",o),jo("sRGB",new Uint8Array([0]))],s=t*4,a=Math.max(1,Math.floor(65536/(s+1))),l=new Uint8Array(s),u=0,c=new CompressionStream("deflate"),f=c.writable.getWriter(),d=c.readable.getReader(),h,m=(async()=>{try{for(;;){let{done:g,value:p}=await d.read();if(g)return;r.push(jo("IDAT",p))}}catch(g){h=g,await f.abort(g).catch(()=>{})}})();try{for await(let g of n){if(!(g instanceof Uint8Array||g instanceof Uint8ClampedArray)||!g.length||g.length%s)throw new RangeError("[SnapDOM] PNG input must contain complete RGBA rows");let p=g.length/s;if(u+p>e)throw new RangeError("[SnapDOM] PNG input exceeds the declared height");for(let y=0;y{"use strict";ec=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;ec[t]=e}});var uc={};pe(uc,{encodeJpeg:()=>jh});function sc(t){let e=[0,240];for(let n=0;n<16;n++)for(let o=1;o<=10;o++)e.push(n<<4|o);return t.concat(e.filter(n=>!t.includes(n)).sort((n,o)=>n-o))}function Hh(t){for(let e=0;e<64;e+=8)cc(t,e,1);for(let e=0;e<8;e++)cc(t,e,8)}function cc(t,e,n){let o=t[e]+t[e+7*n],i=t[e]-t[e+7*n],r=t[e+n]+t[e+6*n],s=t[e+n]-t[e+6*n],a=t[e+2*n]+t[e+5*n],l=t[e+2*n]-t[e+5*n],u=t[e+3*n]+t[e+4*n],c=t[e+3*n]-t[e+4*n],f=o+u,d=o-u,h=r+a,m=r-a;t[e]=f+h,t[e+4*n]=f-h;let g=(m+d)*.707106781;t[e+2*n]=d+g,t[e+6*n]=d-g,f=c+l,h=l+s,m=s+i;let p=(f-m)*.382683433,y=.5411961*f+p,b=1.306562965*m+p,w=h*.707106781,S=i+w,v=i-w;t[e+5*n]=v+y,t[e+3*n]=v-y,t[e+n]=S+b,t[e+7*n]=S-b}async function jh(t,e,n,o){if(![t,e].every(R=>Number.isInteger(R)&&R>0&&R<=65535))throw new RangeError("[SnapDOM] JPEG dimensions must be integers from 1 to 65535");let i=Math.min(100,Math.max(1,Math.round((typeof o=="number"&&o>=0&&o<=1?o:.92)*100))),r=i<50?5e3/i:200-i*2,s=i<90?1:0,a=8<{let k=new Uint8Array(64),I=new Float32Array(64);for(let L=0;L<64;L++){let P=Math.min(255,Math.max(1,Math.floor((R[L]*r+50)/100)));k[rc[L]]=P,I[L]=1/(P*ic[L>>3]*ic[L&7]*8)}return l.push(...O?[1]:[],...k),I}),c=(R,O)=>[255,R,O.length+2>>8,O.length+2&255,...O],f=[255,216,...c(224,[74,70,73,70,0,1,1,0,0,1,0,1,0,0]),...c(219,l),...c(192,[8,e>>8,e&255,t>>8,t&255,3,1,s?34:17,0,2,17,1,3,17,1]),...c(196,fc.flatMap(([R,,O,k])=>[R,...O,...k])),...c(218,[3,1,0,2,17,3,17,0,63,0])],d=[new Uint8Array(f)],h=new Uint8Array(65536),m=0,g=0,p=0;function y(R,O){for(g=g<=8;){p-=8;let k=g>>>p&255;m>=h.length-1&&(d.push(h.subarray(0,m)),h=new Uint8Array(65536),m=0),h[m++]=k,k===255&&(h[m++]=0)}g&=(1<15;B-=16)y(L[240][0],L[240][1]);N=32-Math.clz32(Math.abs(P));let V=L[B<<4|N];y(V[0],V[1]),y((P<0?P-1:P)&(1<>s)*8+(L>>s);T[V]+=(-.168736*N-.331264*B+.5*z)*x,M[V]+=(.5*N-.418688*B-.081312*z)*x}}for(let k=0;k<(s?4:1);k++){let I=(k>>1)*128+(k&1)*8;for(let L=0;L<64;L++)b[L]=F[I+(L>>3)*a+(L&7)];v(0,0)}b.set(T),v(1,1),b.set(M),v(2,1)}}let _=0,$=0;for await(let R of n){if(!(R instanceof Uint8Array||R instanceof Uint8ClampedArray)||!R.length||R.length%C)throw new RangeError("[SnapDOM] JPEG input must contain complete RGBA rows");let O=R.length/C;if(_+O>e)throw new RangeError("[SnapDOM] JPEG input exceeds the declared height");for(let k=0;k{"use strict";rc=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Uh=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],zh=Array.from({length:64},(t,e)=>(e&7)<4&&e<32?[17,18,24,47,18,21,26,66,24,26,56,99,47,66,99,99][(e>>3)*4+(e&7)]:99),ic=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379];ac=[0,1,2,3,4,5,6,7,8,9,10,11],fc=[[0,0,[0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],ac],[16,0,[0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],sc([1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130])],[1,1,[0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],ac],[17,1,[0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],sc([0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241])]],lc=fc.map(([,,t,e])=>{let n=[],o=0,i=0;for(let r=1;r<=16;r++,o<<=1)for(let s=0;s]*>/i)?.[0];if(!o)return null;let i=e.crop?Uo(o,e.crop):o,r=parseFloat(i.match(/\bwidth="([^"]+)/i)?.[1]),s=parseFloat(i.match(/\bheight="([^"]+)/i)?.[1]),a=(i.match(/\bviewBox="([^"]+)/i)?.[1]||"").trim().split(/[\s,]+/).map(Number);if(!(r>0&&s>0)||a.length!==4||!a.every(Number.isFinite)||!(a[2]>0&&a[3]>0))return null;let l=Number.isFinite(e.width),u=Number.isFinite(e.height),c=e.meta||{},f=Math.max(1,Math.floor(r)),d=Math.max(1,Math.floor(s)),h=e.crop?f:Number.isFinite(c.vbW)?c.vbW:Number.isFinite(c.w0)?c.w0:f,m=e.crop?d:Number.isFinite(c.vbH)?c.vbH:Number.isFinite(c.h0)?c.h0:d,g=e.dpr??1,p=e.scale??1,y=(l&&u?Math.max(1,e.width):l?e.width:u?e.height*h/Math.max(1,m):f*p)*g,b=(l&&u?Math.max(1,e.height):u?e.height:l?e.width*m/Math.max(1,h):d*p)*g;if(Math.max(r,s,y,b)<=Ht&&r*s<=ue&&y*b<=ue||(n==="png"?typeof CompressionStream!="function":Math.max(y,b)>=65536))return null;return w();async function w(){let S=Math.max(1,Math.floor(y)),v=Math.max(1,Math.floor(b)),C=Me(t),A=C.slice(C.indexOf(o)+o.length,C.lastIndexOf("")),F=i.match(/\bpreserveAspectRatio="([^"]*)"/i)?.[1]||"xMidYMid meet",T=r/a[2],M=s/a[3],x=0,E=0;/\bnone\b/.test(F)||(T=M=/\bslice\b/.test(F)?Math.max(T,M):Math.min(T,M),x=(r-a[2]*T)*(/xMin/.test(F)?0:/xMax/.test(F)?1:.5),E=(s-a[3]*M)*(/YMin/.test(F)?0:/YMax/.test(F)?1:.5)),x-=a[0]*T,E-=a[1]*M;let _=i.replace(/\s(?:width|height|preserveAspectRatio)="[^"]*"/gi,"").slice(0,-1),$=Y()&&/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(C),R=r/y,O=s/b,k=Math.max(1,Math.min(8192,Math.floor(4*1024*1024/S),$?Math.floor(2046/O):8192)),I=Math.max(1,Math.min(8192,S,$?Math.floor(2046/R):8192));async function*L(){for(let P=0;P${A}`,X=await Jt(Ae(q),{width:ot,height:pt,dpr:1,backgroundColor:$?null:e.backgroundColor,__session:e.__session,__releaseDecodeFrame:!0}),G=X;try{if($){G=document.createElement("canvas"),G.width=V,G.height=N;let nt=G.getContext("2d");e.backgroundColor&&(nt.fillStyle=e.backgroundColor,nt.fillRect(0,0,V,N)),nt.drawImage(X,z*R-U,P*O-st,V*R,N*O,0,0,V,N)}let ht=G.getContext("2d").getImageData(0,0,V,N).data;for(let nt=0;nt(oc(),nc))).encodePng(S,v,L()):(await Promise.resolve().then(()=>(dc(),uc))).encodeJpeg(S,v,L(),e.quality)}}var ki=ut(()=>{"use strict";_e();yt()});var pc={};pe(pc,{toBlob:()=>Mi});async function Mi(t,e){let n=e.format||e.type||"svg";if(n==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[SnapDOM] html-in-canvas makes a raster capture, not an SVG; ask for png, jpeg or webp.");let s=decodeURIComponent(t.split(",")[1]);return new Blob([s],{type:"image/svg+xml"})}let o=n==="jpg"?"jpeg":n,i=(o==="png"||o==="jpeg")&&Vo(t,e,o);if(i)return i;let r=await Jt(t,{...e,__encodeFormat:o});return new Promise(s=>r.toBlob(a=>s(a),`image/${o}`,e.quality))}var Ai=ut(()=>{"use strict";_e();ki()});var mc={};pe(mc,{download:()=>Vh});async function hc(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 Vh(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),o=(e?.type||"").toLowerCase(),i=n.has(o)?o:"",r=(e?.format||i||"").toLowerCase(),s=r==="jpg"?"jpeg":r||"png",a=e?.filename||"snapdom",l=/\.(png|jpe?g|webp|svg)$/i.test(a)?a:`${a}.${s}`,u={...e||{},format:s,type:s};u.dpr=1;let c=hn(),f=(s==="png"||s==="jpeg")&&Vo(t,u,s);if(s==="svg"||f){let m=f?await f:await Mi(t,{...u,type:"svg"});if(c&&await hc(m,l))return;let g=URL.createObjectURL(m),p=document.createElement("a");p.href=g,p.download=l,document.body.appendChild(p),p.click(),setTimeout(()=>URL.revokeObjectURL(g),1e3),p.remove();return}let d=await Jt(t,{...u,__encodeFormat:s});if(c){let m=`image/${s}`,g=await new Promise(p=>d.toBlob(p,m,e?.quality));if(g&&await hc(g,l))return}let h=document.createElement("a");h.href=d.toDataURL(`image/${s}`,e?.quality),h.download=l,document.body.appendChild(h),h.click(),h.remove()}var gc=ut(()=>{"use strict";Ai();_e();ki();yt()});_t();_t();yt();Mt();Dn();Tt();me();var se=new WeakMap,ns=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"],cr=new Map,lf=2e3,We=0;function Dt(){We++}function zn(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(ne(e))return!0;e.parentElement?e=e.parentElement:e=Wt(e)}return!1}function jn(t){for(let e of t)if(be(e))return!0;return!1}function be(t){if(zn(t.target))return!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!zn(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!zn(n)){e=!1;break}}if(e)return!1}return!0}var Oe=new WeakMap;function fs(t){for(let e of t){if(!be(e))continue;let n=e.target.ownerDocument||document;Oe.set(n,(Oe.get(n)||0)+1);let o=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;o;o=o.parentElement||Wt(o))Oe.set(o,(Oe.get(o)||0)+1)}}function bn(t){let e=t.ownerDocument||document;return Ue(e),(Oe.get(e)||0)-(Oe.get(t)||0)}var $t=0;function De(t=document){return Ue(t),$t}function we(){return Ue(),We}function wn(t){return t?(Ue(t.ownerDocument||document),Vn(t,gr(t))):0}function Be(){Dt(),$t++}var ye=new WeakMap,re=0,ie=0;function cf(t){ye.set(t,++re)}function hr(t){if(!t||t.nodeType!==1)return;re++,ye.set(t,re);let e=t.querySelectorAll("*");for(let n=0;nn?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let o=n.target,i=o&&(o.nodeType===1?o:o.parentElement);if(i&&(i.tagName==="STYLE"||i.tagName==="LINK"))return i.ownerDocument||document;for(let r of n.addedNodes)if(e(r))return r.ownerDocument||document;for(let r of n.removedNodes)if(e(r))return r.ownerDocument||o&&o.ownerDocument||document}return null}var ur=new WeakSet,mn=[];function us(t){if(!jn(t))return;fs(t),Dt();let e=new Set;for(let n of t){if(!be(n))continue;let o=n.target.getRootNode&&n.target.getRootNode();if(!o||o.nodeType!==11||e.has(o))continue;e.add(o),o.host?hr(o.host):re++;let i=o.querySelectorAll("*");for(let r=0;r{jn(i)&&(Dt(),$t++)},o=()=>{Dt(),$t++};try{let i=new MutationObserver(ds);i.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),yn.push({o:i,env:!1,doc:t})}catch{}try{let i=new MutationObserver(n);i.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),yn.push({o:i,env:!0,doc:t})}catch{}try{e?.addEventListener("resize",o,{passive:!0})}catch{}try{let i=r=>{Dt();let s=r.composedPath?.()[0]||r.target;s&&s.nodeType===1&&!zn(s)&&yr(s.ownerDocument||t)?mr(s):ie++};t.addEventListener("focusin",i,{capture:!0,passive:!0}),t.addEventListener("focusout",i,{capture:!0,passive:!0}),t.addEventListener("change",i,{capture:!0,passive:!0}),t.addEventListener("pointerdown",i,{capture:!0,passive:!0}),t.addEventListener("pointerup",i,{capture:!0,passive:!0}),t.addEventListener("pointercancel",i,{capture:!0,passive:!0}),t.addEventListener("keydown",i,{capture:!0,passive:!0}),t.addEventListener("keyup",i,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",i,{capture:!0,passive:!0}),t.addEventListener("toggle",i,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{Dt(),ie++},{passive:!0})}catch{}try{let i=t.fonts;i&&(i.addEventListener?.("loadingdone",o),i.status==="loading"&&i.ready?.then(o).catch(()=>{}))}catch{}}var os=new WeakMap;function rs(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let o=os.get(t)||[];if(o.length===n.length&&o.every((r,s)=>r===n[s]))return;if(os.set(t,n),Dt(),t.nodeType===11){t.host?hr(t.host):re++;for(let r of t.querySelectorAll("*"))ye.set(r,re);return}let i=o.filter(r=>!n.includes(r)).concat(n.filter(r=>!o.includes(r)));for(let r of i)if(r.isConnected)if(yr(e))mr(r);else{ie++;return}}function Gn(t,e=null){if(!t)return;rs(t,t);let n=e||mn.filter(({root:o})=>o.host?.isConnected).map(({root:o})=>o);for(let o of n)rs(o,t)}function Bt(){Ue();try{for(let t=yn.length-1;t>=0;t--){let{o:e,env:n,doc:o}=yn[t];if(o!==document&&!o.defaultView){try{e.disconnect()}catch{}dr.delete(o),gn===o&&(gn=null),yn.splice(t,1);continue}let i=e.takeRecords();i.length&&(n?jn(i)&&(Dt(),$t++):ds(i))}for(let t=mn.length-1;t>=0;t--){let{o:e,root:n}=mn[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}ur.delete(n),mn.splice(t,1);continue}let o=e.takeRecords();o.length&&us(o)}}catch{}}function xe(t){if(!(!t||t.nodeType!==1)){se.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)se.delete(e.currentNode)}catch{}}}var uf=["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 wr(t){let e=se.get(t);if(e&&qn(e,t)){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function ps(t){let e=se.get(t);if(!e||!qn(e,t))return null;let n=e.snapshot;return!n||n.__bgClipTextFix?null:n}var is=new WeakMap,Un=new Map;function df(t){let e=t.href;return!e||typeof CSSStyleSheet!="function"?null:Un.has(e)?Un.get(e):(Un.set(e,null),dt(e,{as:"text"}).then(n=>{if(!n.ok||typeof n.data!="string"||/@import/i.test(n.data))return;let o=new CSSStyleSheet;o.replaceSync(n.data),Un.set(e,o.cssRules),Dt(),$t++}).catch(()=>{}),null)}function Ut(t){let e=is.get(t);if(!e||e.epoch!==We){let n=e&&e.universe;e={epoch:We,...Xi(t,df)};let o=e.universe;if(n&&o&&n.size===o.size){let i=!0;for(let r of o)if(!n.has(r)){i=!1;break}i&&(e.universe=n)}is.set(t,e)}return e}function hs(t){return Ut(t).leaksAcrossSubtrees}function ms(t){try{let e=Ut(t.ownerDocument||document).shareGate;if(e===null)return!1;if(!e.length)return!0;let n=new Set,o=s=>{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let l=0;l{for(;Xt(a)&&!i.roots.has(a);a=a.host.getRootNode()){i.roots.add(a);for(let l of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let u=ss.get(l);if((!u||u.epoch!==We)&&ss.set(l,u={epoch:We,props:Gi(l)}),!u.props)return!1;for(let c of u.props)i.universe.add(c)}or(a.getAnimations(),i.universe)}return!0},s=r(e)&&(!t.shadowRoot||r(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=r(a.getRootNode());return s?i.universe:o.__shadowUniverse=null}function Hn(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Ut(e).pseudoUniverse}function gs(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Ut(e).svgGeometry}function ys(t){let e=Ut(t.ownerDocument||document).svgGeometrySel;if(e==null)return!0;if(!e)return!1;try{return t.matches(e)}catch{return!0}}var mf={before:null,after:null,firstLetter:null,marker:null,firstLine:null};function ae(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?mf:Ut(e).pseudoGates}function gf(t,e={},n=null,o=null){let i={},r=e.excludeStyleProps,s=h=>{if(i[h]!==void 0||Pe(h)||r&&(r instanceof RegExp&&r.test(h)||typeof r=="function"&&r(h)))return;let m=t.getPropertyValue(h);m&&((h==="background-image"||h==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),i[h]=m)};if(o){for(let m of o)s(m);let h=n&&n.style;if(h&&h.length)for(let m=0;mr==="transparent"||r==="rgba(0, 0, 0, 0)",o=t["-webkit-text-fill-color"];if(!n(o!==void 0?o:t.color))return;let i=xf(t["background-image"],t["background-color"]);i&&(n(t.color)&&(t.color=i),o!==void 0&&(t["-webkit-text-fill-color"]=i),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:i,enumerable:!1}))}function bf(t,e,n){let o=n.textShadow;if(!o||o==="none"||!(parseFloat(n.webkitTextStrokeWidth)>0)||t.firstElementChild||n.backgroundImage!=="none"||n.boxShadow!=="none"||bs(n.backgroundColor)[3]!==0||["Top","Right","Bottom","Left"].some(u=>parseFloat(n[`border${u}Width`])>0)||o.replace(/\([^)]*\)/g,"").includes(","))return;let i=(o.match(/(?:rgba?|hsla?|color|oklch|oklab|lab|lch)\([^)]*\)|#[\da-f]+|\b[a-z]+\b/i)||[])[0],[r=0,s=0,a=0]=(o.match(/-?[\d.]+px/g)||[]).map(parseFloat);if(!i)return;let l=n.filter&&n.filter!=="none"?`${n.filter} `:"";e.style.setProperty("text-shadow","none","important"),e.style.setProperty("filter",`${l}drop-shadow(${r}px ${s}px ${a/2}px ${i})`,"important")}var wf=/(?:rgba?|hsla?|oklch|oklab|lab|lch|color)\([^()]*\)/g,ge;function bs(t){if(!ge){let e=document.createElement("canvas");e.width=e.height=1,ge=e.getContext("2d",{willReadFrequently:!0})}return ge.clearRect(0,0,1,1),ge.fillStyle="transparent",ge.fillStyle=t,ge.fillRect(0,0,1,1),ge.getImageData(0,0,1,1).data}function xf(t,e){let n=r=>{let s=[];for(let a of(r||"").match(wf)||[]){let[l,u,c,f]=bs(a);f>13&&s.push([l,u,c])}return s},o=n(t);if(o.length||(o=n(e)),!o.length)return null;let i=[0,0,0];for(let[r,s,a]of o)i[0]+=r,i[1]+=s,i[2]+=a;return`rgb(${i.map(r=>Math.round(r/o.length)).join(", ")})`}function ws(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let i of uf){let r=t.getPropertyValue(i);if(r&&r!=="none")return!0}let o=t.getPropertyValue("background");return!!(o&&/url\s*\(/i.test(o))}function Sf(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=W(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function vf(t,e,n){try{if(typeof t.computedStyleMap=="function"){let i=t.computedStyleMap().get("width");if(i!=null)return!as(String(i).trim().toLowerCase())}}catch{}let o=t.style&&(t.style.width||t.style.inlineSize);return o&&!as(String(o).trim().toLowerCase())?!0:kf(t,e)?n||Mf(t,e):!1}var Cf=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function as(t){return Cf.has(t)||t.startsWith("fit-content")}function kf(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let o=1/0,i=-1/0,r=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(r=r||document.createRange(),r.selectNode(s),a=r.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let l=W(s);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.lefti&&(i=a.right)}return i===-1/0?!1:i-o0?Math.abs(t.getBoundingClientRect().width-i)>.5:!1}var pr=new WeakMap;function Af(t,e){let n=pr.get(t);if(n)return n;let o=[e];for(let i in t)o.push(i,t[i]);return n=o.join(""),pr.set(t,n),n}function qn(t,e){return t.env===$t&&t.stamp===Vn(e,t.hosts)}var _f=/^(width|height|inline-size|block-size|top|right|bottom|left|transform-origin|perspective-origin)$|^inset-/,Ef=/(margin|padding)[a-z-]*\s*:[^;]*(%|\bauto\b|calc\(|var\()/i,Rf=new Set(["INPUT","TEXTAREA","SELECT","OPTION","OPTGROUP","PROGRESS","METER","BUTTON","DATALIST"]);function Ff(t){let e=t.__styleShare;return e||(e=t.__styleShare={ids:new WeakMap,intern:new Map,snaps:new Map,rootSeen:!1}),e}function Tf(t,e){let n=e.ids.get(t);if(n!==void 0)return n;let o=t.parentElement,i;if(!o)i="R";else if(i=e.ids.get(o),i===void 0){if(e.rootSeen)return e.ids.set(t,-1),-1;i="R"}if(e.rootSeen=!0,i===-1)return e.ids.set(t,-1),-1;let r="",s=t.attributes;if(s&&s.length)if(s.length===1)r=s[0].name+"="+s[0].value;else{let l=[];for(let u=0;uu[g])),h&&c.push(""+h),pr.set(u,f.sig+""+c.join("")+("height"in u?"":"")+("block-size"in u?"":"")));let m=gr(t);return se.set(t,{env:$t,stamp:Vn(t,m),hosts:m,snapshot:u,embedFonts:s,excludeStyleProps:a}),u}function Pf(t,e){if(t&&t.session&&t.persist)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.__ctx;return(!n||t.__ctxOpts!==e)&&(n={session:t,persist:{snapshotKeyCache:cr,defaultStyle:j.defaultStyle,baseStyle:j.baseStyle,image:j.image,resource:j.resource,background:j.background},options:e||{}},t.__ctx=n,t.__ctxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},persist:{snapshotKeyCache:cr,defaultStyle:j.defaultStyle,baseStyle:j.baseStyle,image:j.image,resource:j.resource,background:j.background},options:t||e||{}}}var Nf=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Lf=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA";function If(t,e,n){if(!t.style||t.style.length===0)return;let o=pf(t),i=o!=null&&!Nf.test(t.getAttribute("style")||""),r;for(let s=0;sf.snapshot[d]===c)||n.borderWidth===c}if(i&&!o.has(a)&&(!l||r)&&!(a.startsWith("background")&&Lf(t)))continue;let u=n.getPropertyValue(a);u&&(!l||u!==t.style.getPropertyValue(a))&&e.style.setProperty(a,u,t.style.getPropertyPriority(a))}}function wt(t,e,n,o){if(t.tagName==="STYLE")return;let i=Pf(n,o),r=i.options&&i.options.cache||"soft";r!=="disabled"&&Ue(t.ownerDocument),r==="disabled"&&!i.session.__bumpedForDisabled&&(Dt(),cr.clear(),i.session.__bumpedForDisabled=!0);let{session:s,persist:a}=i;if(!s.styleCache.has(t)){let y=null;try{y=getComputedStyle(t)}catch{}s.styleCache.set(t,y||getComputedStyle((t.ownerDocument||document).documentElement))}let l=s.styleCache.get(t);t.getAttribute?.("style")&&If(t,e,l);let u=l.getPropertyValue("animation-name");e&&e.style&&u&&u!=="none"&&e.style.setProperty("animation","none","important");let c=t.tagName?.toLowerCase()||"div";if(un.has(c)){let y={};Object.defineProperty(y,"__needsBgInline",{value:ws(l),enumerable:!1});let b=gr(t);se.set(t,{env:$t,stamp:Vn(t,b),hosts:b,snapshot:y,embedFonts:!!(i.options&&i.options.embedFonts),excludeStyleProps:i.options&&i.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let f=null;if(i.options&&i.options.__styleShare&&s.styleMap){let y=Ff(s),b=Tf(t,y),w=t.ownerDocument||document,S=w.activeElement;b!==-1&&!Rf.has(t.tagName)&&!(S&&S!==w.body&&S!==w.documentElement&&S===t)&&(!t.getRootNode||t.getRootNode()===w)&&!t.shadowRoot&&!t.assignedSlot&&(f={st:y,id:b})}let d=$f(t,l,i.options,f,s);if(t.getAttribute?.("style"))for(let y of["top","right","bottom","left"]){let b=`margin-${y}`;d[b]==="auto"&&e.style.setProperty(b,"auto","important")}d.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",d.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",d.__bgClipTextFix,"important"),(s.bgClipText||=[]).push([t,e])),Y()&&bf(t,e,l),Of(t,l,d),e.style?.length&&d["box-sizing"]==="border-box"&&l.getPropertyValue("box-sizing")!=="border-box"&&Uf(t,e,d);let h=As(t);if(Hf(t,e,d,h,s),h){let y=l.getPropertyValue("min-width");if(!y||y==="auto"||y==="0px"){d["min-width"]="0px";let b=l.getPropertyValue("overflow-x"),w=t.parentElement;if(y==="auto"&&(b==="visible"||b==="clip")&&w&&W(w).display.includes("flex")){let S=s.flexOverflow||(s.flexOverflow=new WeakMap),v=S.get(w);if(v===void 0){if(v=w.scrollWidth>w.clientWidth,!v){let C=W(w),A=_=>parseFloat(C.getPropertyValue(_))||0,F=A("width")-(C.boxSizing==="border-box"?A("padding-left")+A("padding-right")+A("border-left-width")+A("border-right-width"):0),M=C.flexDirection.startsWith("row")===(C.writingMode==="horizontal-tb")&&C.flexWrap==="nowrap",x=0,E=0;for(let _ of w.children){s.styleCache.has(_)||s.styleCache.set(_,getComputedStyle(_));let $=s.styleCache.get(_);if($.display==="none"||$.position==="absolute"||$.position==="fixed")continue;let R=k=>parseFloat($.getPropertyValue(k))||0,O=R("width")+R("margin-left")+R("margin-right")+($.boxSizing==="border-box"?0:R("padding-left")+R("padding-right")+R("border-left-width")+R("border-right-width"));x=M?x+O:Math.max(x,O),E++}v=x+(M?Math.max(0,E-1)*A("column-gap"):0)>F+E/60}S.set(w,v)}v&&(d["min-width"]=d.width)}}}let m=Af(d,c),g=!0;if(Bn(c,(d.display||"").toLowerCase())){g=Sf(t),g&&sr(c,d,h)&&vf(t,l,h)&&(g=!1),m=`${m}${g?"|c":""}${h?"|f":""}`;let y=d["text-wrap-mode"]||d["white-space"]||"";g&&y!=="nowrap"&&y!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let p=a.snapshotKeyCache.get(m);p===void 0&&(p=Ne(d,c,g,h),a.snapshotKeyCache.size>=lf&&a.snapshotKeyCache.delete(a.snapshotKeyCache.keys().next().value),a.snapshotKeyCache.set(m,p)),s.styleMap.set(e,p)}function Of(t,e,n){let o=e.getPropertyValue("overflow-x"),i=e.getPropertyValue("overflow-y");if((o==="visible"||!o)&&(i==="visible"||!i)||e.getPropertyValue("box-sizing")==="border-box"||typeof t.clientWidth!="number"||!t.offsetWidth)return;let r=u=>parseFloat(u)||0,s=t.offsetWidth-t.clientWidth-r(e.getPropertyValue("border-left-width"))-r(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-r(e.getPropertyValue("border-top-width"))-r(e.getPropertyValue("border-bottom-width")),l=(u,c)=>{let f=n[u];if(!f||!f.endsWith("px"))return;let d=parseFloat(f);Number.isFinite(d)&&(n[u]=`${Math.round((d+c)*1e3)/1e3}px`)};s>=2&&(l("width",s),l("inline-size",s)),a>=2&&(l("height",a),l("block-size",a))}var vs=["border-top-width","border-right-width","border-bottom-width","border-left-width"],Cs=["width","inline-size","height","block-size"];function Wf(t,e,n){if(!vs.some(l=>n[l]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let l of["width","height"]){let u=n[`min-${l}`],c=n[`max-${l}`];if(u&&u!=="0px"&&u!=="auto"||c&&c!=="none")return""}let o=l=>parseFloat(n[l])||0,i=o("padding-left")+o("padding-right")+o("border-left-width")+o("border-right-width"),r=o("padding-top")+o("padding-bottom")+o("border-top-width")+o("border-bottom-width"),s=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let l of Cs){let u=n[l];if(!u||!u.endsWith("px"))continue;let f=l==="width"||l==="inline-size"&&!s||l==="block-size"&&s?i:r;n[l]=`${Math.round((parseFloat(u)+f)*1e3)/1e3}px`}n["box-sizing"]="border-box";let a="";if(e.getPropertyValue("overflow-x")==="auto"){let l=t.scrollWidth<=t.clientWidth;n["overflow-x"]=l?"hidden":"auto",l&&(a+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let l=t.scrollHeight<=t.clientHeight;n["overflow-y"]=l?"hidden":"auto",l&&(a+="y")}return a}var Df=["box-sizing",...Cs,"overflow-x","overflow-y"],Bf=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function Uf(t,e,n){if(Bf.test(t.getAttribute("style")))for(let o of Df)e.style.getPropertyValue(o)&&n[o]&&e.style.setProperty(o,n[o],e.style.getPropertyPriority(o))}function zf(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"}var ls=typeof CSS<"u"&&CSS.supports?.("text-wrap-mode","nowrap")?"text-wrap-mode":"white-space";function Hf(t,e,n,o,i){let r=n.display||"";if(!o&&!r.startsWith("inline-")&&(n.float||"none")==="none"&&n.position!=="absolute"&&n.position!=="fixed")return;let s=n["text-wrap-mode"]||n["white-space"]||"";if(s==="nowrap"||s==="pre"||ls==="white-space"&&s!=="normal"||(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb"||!e.style)return;let a=i.__oneLine||=new WeakSet;for(let l=t.parentElement;l;l=l.parentElement)if(a.has(l))return;jf(t,n,i)&&(a.add(t),e.style.setProperty(ls,"nowrap"))}function jf(t,e,n){let o=t.clientHeight-(parseFloat(e["padding-top"])||0)-(parseFloat(e["padding-bottom"])||0);if(o>3*(parseFloat(e["font-size"])||16)||e["word-break"]==="normal"&&e["overflow-wrap"]==="normal"&&/^[\w\u00C0-\u024F.,:;!?'"()%]*$/.test(t.textContent.trim()))return!1;let i=t.ownerDocument||document,r=i.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),s=i.createRange(),a=null,l=0,u=0;for(let d=r.nextNode();d;d=r.nextNode()){if(d.nodeType===1){if(d.shadowRoot||d.localName==="br"||d.localName==="textarea")return!1;continue}if(/\S/.test(d.data)){if(++u>64)return!1;s.selectNodeContents(d);for(let h of s.getClientRects())if(h.height){if(a||=h,Math.min(a.bottom,h.bottom)-Math.max(a.top,h.top)2||(delete n.height,delete n["block-size"])}Ie();var Yf=new Set(["symbol","defs"]),Kf=new Set(["mask","clipPath","linearGradient","radialGradient","pattern","marker","filter"]),xr=new WeakMap,_s=-1;function Xn(t){let e=we();return e!==_s&&(xr=new WeakMap,_s=e),Es(t)}function Es(t){let e=xr.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(Kf.has(t.localName)?n=!1:Yf.has(t.localName)&&(n=!0)),n===void 0){let o=t.parentNode;n=!!(o&&o.nodeType===1)&&Es(o)}return xr.set(t,n),n}function Rs(t,e){if(t?.nodeType!==1||e?.nodeType!==1||Xn(t))return;let n=t.getAttribute?.("style"),o=!!(n&&n.includes("var("));if(!o&&t.attributes?.length){let r=t.attributes;for(let s=0;sr.d-s.d);let i=window.devicePixelRatio||1;return(o.find(r=>r.d>=i)||o[o.length-1]).url}function Fs(t,e){let n=t.currentSrc||"";if(n&&!ze(n))return n;let o=e.querySelectorAll("source[srcset]"),i=null;for(let r of o){let s=r.getAttribute("srcset");if(!s||ze(s))continue;let a=r.getAttribute("type");if(a&&!Yo.test(a.trim()))continue;let l=r.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return He(s,t)}catch{}i||(i=He(s,t))}return i}function Ts(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&&!ze(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&&!ze(o))return o}return null}Tt();yt();function Jf(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var Qf=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,Zf=/^::?(?:before|after|first-letter)$/;function tu(t,e,n=!0,o){return Wn(t,",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")&&i.includes("data-sd")||i.startsWith("@"))return i;let r=i.match(Qf);if(r&&Zf.test(r[0]))return":not(*)";let s=r?i.slice(0,r.index).trim():i,a=n?Jf(s,o):s;return`:where(${e} ${a})${r?r[0]:""}`}).join(", ")}function Ls(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(o,i)=>`:where(:where(${i.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(o,i)=>`:where(${e}:is(${i.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(o,i)=>`:where(${e} ${i.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(o,i,r,s)=>{let a=tu(s,e,!0,n);return`${i}${r}${a}{`}),t):""}function Is(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function Se(t){let e="";for(let n of t)if(n.media&&n.cssRules){let o=!1;try{o=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}o&&(e+=Se(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${Se(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let o=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=o+(n.style?n.style.cssText:"")+Se(n.cssRules)+"}"}else e+=n.cssText+` -`;return e}function Os(t){let e="";try{t.querySelectorAll("style").forEach(o=>{let i=null;try{i=o.sheet&&o.sheet.cssRules}catch{}e+=(i?Se(i):o.textContent||"")+` -`});let n=t.adoptedStyleSheets||[];for(let o of n)try{o&&o.cssRules&&(e+=Se(o.cssRules))}catch{}}catch{}return e}function Ws(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 Ds(t,e,n={}){try{let o=null,i=W(t).content;if(i&&i.includes("url(")){let u=i.match(/url\(["']?([^"')]+)["']?\)/);u&&(o=u[1])}let r=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",l=o||(r?Fs(t,r):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||He(a,t)||t.src||"";if((!l||ze(l))&&n.resolvePicturePlaceholders!==!1){let u=Ts(t);u&&(l=u)}if(!l)return;e.getAttribute("src")!==l&&e.setAttribute("src",l),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Bs(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 eu(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 Us(t,e,n){let o=[];for(let i of e){let r=eu(t,i);r&&o.push(`${i}: ${r};`)}return o.length?`${n}{${o.join("")}} -`:""}function zs(t,e){if(!t)return;let n=o=>{let i=o.getAttribute("data-sd-slotted")||"";e?` ${i} `.includes(` ${e} `)||o.setAttribute("data-sd-slotted",i?`${i} ${e}`:e):o.setAttribute("data-sd-slotted",i)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}async function nu(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},o=n(),i=0;for(;isetTimeout(r,0)),o=n(),i++;return o&&(o.body||o.documentElement)?o:null}function ou(t){let e=t.getBoundingClientRect(),n=0,o=0,i=0,r=0;try{let l=getComputedStyle(t);n=parseFloat(l.borderLeftWidth)||0,o=parseFloat(l.borderRightWidth)||0,i=parseFloat(l.borderTopWidth)||0,r=parseFloat(l.borderBottomWidth)||0}catch{}let s=Math.max(0,Math.round(e.width-(n+o))),a=Math.max(0,Math.round(e.height-(i+r)));return{contentWidth:s,contentHeight:a,rect:e}}function Et(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 i=parseFloat(o.width);!isNaN(i)&&i>0&&(e=i)}if(n===0){let i=parseFloat(o.height);!isNaN(i)&&i>0&&(n=i)}}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}}var $s=new WeakMap;function ru(t,e,n){let o=t.defaultView,i=o?o.scrollX:0,r=o?o.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,u=t.documentElement?t.documentElement.scrollTop:0,c=0,f=0,d=0,h=0;try{let p=o&&t.body?o.getComputedStyle(t.body):null;p&&(c=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),f=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),h=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}let m=`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: ${c}px ${f}px ${d}px ${h}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,g;try{let p=$s.get(t);p||$s.set(t,p=new o.CSSStyleSheet),p.replaceSync(m),t.adoptedStyleSheets=[...t.adoptedStyleSheets,p],g=()=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter(y=>y!==p)}}catch{let p=t.createElement("style");p.setAttribute("data-sd-iframe-pin",""),tt(p),p.textContent=m,(t.head||t.documentElement).appendChild(p),g=()=>p.remove()}if(xe(t.documentElement),i||r)try{t.body&&(t.body.scrollLeft=i,t.body.scrollTop=r),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=i),t.documentElement.scrollTop||(t.documentElement.scrollTop=r))}catch{}return()=>{try{g()}catch{}try{o&&typeof o.scrollTo=="function"&&o.scrollTo(i,r),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=u)}catch{}xe(t.documentElement)}}async function Sr(t,e,n){let o=await nu(t,3);if(!o)throw new Error("The iframe document isn't ready.");let{contentWidth:i,contentHeight:r,rect:s}=ou(t),a=n?.snap;if(!a||typeof a.toPng!="function")throw new Error("Iframes are only captured through snapdom(el).");let l={...n,scale:1,clip:null,__pinned:!0},u=ru(o,i,r),c;try{c=await a.toPng(o.documentElement,l)}finally{u()}c.style.display="block",c.style.width=`${i}px`,c.style.height=`${r}px`;let f=document.createElement("div");return e.nodeMap.set(f,t),wt(t,f,e,n),f.style.overflow="hidden",f.style.display="block",f.style.width||(f.style.width=`${Math.round(s.width)}px`),f.style.height||(f.style.height=`${Math.round(s.height)}px`),f.appendChild(c),f}function Hs(t){try{let e=t&&t.accentColor;if(e&&e!=="auto"&&e!=="none")return e;let n=t&&t.color;if(n)return n}catch{}return"#0a6ed1"}function js(t){let{width:e,height:n}=Et(t),o=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let r=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Number.isFinite(r)&&r>0?r:e||o.width||128,l=Number.isFinite(s)&&s>0?s:n||o.height||16,u=Number.parseFloat(t.min)||0,c=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,f=Number.parseFloat(t.value),d=c-u,h=d>0&&Number.isFinite(f)?Math.min(1,Math.max(0,(f-u)/d)):.5,m="middle";try{i&&i.verticalAlign&&(m=i.verticalAlign)}catch{}let g=document.createElement("div");g.setAttribute("data-snapdom-input-replacement","range"),g.style.cssText=`display:inline-block;width:${a}px;height:${l}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width",String(a)),p.setAttribute("height",String(l)),p.setAttribute("viewBox",`0 0 ${a} ${l}`),p.style.cssText=`width:${a}px;height:${l}px;overflow:visible`,g.appendChild(p);function y(){let b=Hs(i),w=!!t.disabled,S=Math.max(2,Math.min(4,l)),v=(l-S)/2,C=Math.max(10,Math.min(14,Math.max(l,10))),A=C/2,F=A+h*Math.max(0,a-C);p.innerHTML="";let T=(x,E,_,$)=>{let R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("x",String(x)),R.setAttribute("y",String(v)),R.setAttribute("width",String(Math.max(0,E))),R.setAttribute("height",String(S)),R.setAttribute("rx",String(S/2)),R.setAttribute("fill",_),$&&R.setAttribute("fill-opacity",$),p.appendChild(R)};T(0,a,"#808080","0.4"),T(0,F,b);let M=document.createElementNS("http://www.w3.org/2000/svg","circle");M.setAttribute("cx",String(F)),M.setAttribute("cy",String(l/2)),M.setAttribute("r",String(A)),M.setAttribute("fill",b),p.appendChild(M),w&&p.setAttribute("opacity","0.5"),g.style.setProperty("width",`${a}px`,"important"),g.style.setProperty("height",`${l}px`,"important"),g.style.setProperty("min-width",`${a}px`,"important"),g.style.setProperty("min-height",`${l}px`,"important")}return y(),{el:g,applyVisual:y}}function Vs(t){let{width:e,height:n}=Et(t),o=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let r=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Math.round(e||o.width||0),l=Math.round(n||o.height||0),u=Number.isFinite(r)&&r>0?Math.round(r):Math.max(12,a||16),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,l||16),f=(t.type||"text").toLowerCase()==="checkbox",d=!!t.checked,h=!!t.indeterminate,g=Math.max(Math.min(u,c),12),p=Math.max(u,g),y=Math.max(c,g),b="middle";try{i&&i.verticalAlign&&(b=i.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:${y}px;vertical-align:${b};flex-shrink:0;line-height:0;`;let S=document.createElementNS("http://www.w3.org/2000/svg","svg");S.setAttribute("width",String(p)),S.setAttribute("height",String(y)),S.setAttribute("viewBox",`0 0 ${g} ${g}`),S.style.cssText=`width:${p}px;height:${y}px`,w.appendChild(S);function v(){let C=Hs(i),A=2,F=A/2,T=g-A;if(S.innerHTML="",f){let M=document.createElementNS("http://www.w3.org/2000/svg","rect");if(M.setAttribute("x",String(F)),M.setAttribute("y",String(F)),M.setAttribute("width",String(T)),M.setAttribute("height",String(T)),M.setAttribute("rx","2"),M.setAttribute("ry","2"),M.setAttribute("fill",d?C:"none"),M.setAttribute("stroke",C),M.setAttribute("stroke-width",String(A)),S.appendChild(M),d){let x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",`M ${F+2} ${g/2} L ${g/2-1} ${g-F-2} L ${g-F-2} ${F+2}`),x.setAttribute("stroke","white"),x.setAttribute("stroke-width",String(Math.max(1.5,A))),x.setAttribute("fill","none"),x.setAttribute("stroke-linecap","round"),x.setAttribute("stroke-linejoin","round"),S.appendChild(x)}else if(h){let x=document.createElementNS("http://www.w3.org/2000/svg","rect"),E=Math.max(6,T-4);x.setAttribute("x",String((g-E)/2)),x.setAttribute("y",String((g-A)/2)),x.setAttribute("width",String(E)),x.setAttribute("height",String(A)),x.setAttribute("fill",C),x.setAttribute("rx","1"),S.appendChild(x)}}else{let M=document.createElementNS("http://www.w3.org/2000/svg","circle");if(M.setAttribute("cx",String(g/2)),M.setAttribute("cy",String(g/2)),M.setAttribute("r",String((g-A)/2)),M.setAttribute("fill",d?C:"none"),M.setAttribute("stroke",C),M.setAttribute("stroke-width",String(A)),S.appendChild(M),d){let x=document.createElementNS("http://www.w3.org/2000/svg","circle"),E=Math.max(2,(g-A*2)*.35);x.setAttribute("cx",String(g/2)),x.setAttribute("cy",String(g/2)),x.setAttribute("r",String(E)),x.setAttribute("fill","white"),S.appendChild(x)}}w.style.setProperty("width",`${p}px`,"important"),w.style.setProperty("height",`${y}px`,"important"),w.style.setProperty("min-width",`${p}px`,"important"),w.style.setProperty("min-height",`${y}px`,"important")}return v(),{el:w,applyVisual:v}}var Sn=new gt(80);async function iu(t){if(j.resource?.has(t))return j.resource.get(t);if(Sn.has(t))return Sn.get(t);let e=(async()=>{let n=await dt(t,{as:"dataURL"});if(!n.ok||typeof n.data!="string")throw new Error(`Couldn't read ${t}`);return j.resource?.set(t,n.data),n.data})();Sn.set(t,e);try{let n=await e;return Sn.set(t,n),n}catch(n){throw Sn.delete(t),n}}var Ps=/\bblob:[^)"'\s]+/g;function Yn(t){return typeof t=="string"&&t.startsWith("blob:")}function su(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 au(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function vn(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function Kn(t,e=null){if(!t)return;let n=e,o=new Set,i=[],r=new Map,s=(g,p,y,b)=>{o.add(y),i.push(()=>{r.has(y)&&(g.setAttribute(p,r.get(y)),b?.())})},a=(g,p)=>{if(!g||!g.includes("blob:"))return;let y=g.match(Ps)||[];if(y.length){for(let b of y)o.add(b);i.push(()=>{let b=g.replace(Ps,w=>r.get(w)||w);b!==g&&p(b)})}},l=vn(t,"img");for(let g of l)try{let y=g.getAttribute("src")||g.currentSrc||"";Yn(y)&&s(g,"src",y);let b=g.getAttribute("srcset");if(b&&b.includes("blob:")){let w=su(b);for(let S of w)Yn(S.url)&&o.add(S.url);i.push(()=>{let S=!1;for(let v of w)r.has(v.url)&&(v.url=r.get(v.url),S=!0);S&&g.setAttribute("srcset",au(w))})}}catch(p){D(n,"Couldn't inline a blob: image.",p)}let u=vn(t,"image");for(let g of u)try{let p="http://www.w3.org/1999/xlink",y=g.getAttribute("href")||g.getAttributeNS?.(p,"href");Yn(y)&&s(g,"href",y,()=>g.removeAttributeNS?.(p,"href"))}catch(p){D(n,"Couldn't inline a blob: SVG image.",p)}let c=vn(t,"[style*='blob:']");for(let g of c)try{let p=g.getAttribute("style");a(p,y=>g.setAttribute("style",y))}catch(p){D(n,"Couldn't inline blob: URLs in a style attribute.",p)}let f=vn(t,"style");for(let g of f)try{let p=g.textContent||"";a(p,y=>{g.textContent=y})}catch(p){D(n,"Couldn't inline blob: URLs in a ");if(n===-1)return t;let o=/]*>[\s\S]*?<\/style>/g,i=[],r=n,s;for(o.lastIndex=n;s=o.exec(t);)i.push({text:t.slice(r,s.index),intern:!0}),i.push({text:s[0],intern:!1}),r=o.lastIndex;i.push({text:t.slice(r),intern:!0});let a=new Map,l=/ style="([^"]*)"/g,u;for(let y of i)if(y.intern)for(l.lastIndex=0;u=l.exec(y.text);)a.set(u[1],(a.get(u[1])||0)+1);let c=0;for(let[y,b]of a)b>1&&(c+=(b-1)*y.length);if(c<2048||t.includes(" data-sdi="))return t;let f=Kp(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(f===null)return t;let d=new Map,h=0,m=[],g=(y,b)=>{if((a.get(b)||0)<2||f.has(b))return y;let w=d.get(b);return w===void 0&&(w="i"+(h++).toString(36),d.set(b,w),m.push(`[data-sdi="${w}"]{${b}}`)),` data-sdi="${w}"`},p="";for(let y of i)p+=y.intern?y.text.replace(l,g):y.text;return t.slice(0,n)+m.join("")+p}function Kp(t,e,n){let o=new Set;if(!e&&!n)return o;if(!t||t.querySelector("[data-sdi]"))return null;let i=l=>{let u=l.getAttribute("style");u&&o.add(u)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let l=u=>{for(let c of u){if(c.type===CSSRule.IMPORT_RULE||c.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(c.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(c.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(c.selectorText).forEach(i)}c.cssRules&&l(c.cssRules)}};for(let u of[...t.querySelectorAll("style")].slice(1)){let c=u.textContent||"";if(/@import\b/i.test(c))return null;let f=new CSSStyleSheet;f.replaceSync(c),l(f.cssRules)}}catch{return null}let r=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of o){s.setAttribute("style",l);let u=a.serializeToString(s).match(/ style="([^"]*)"/);u&&r.add(u[1])}return r}async function To(t,e){let{clipWindow:n,outerTransforms:o,outerShadows:i,rootTransform2D:r,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:J,...Z}=t;t=Object.assign(a,Z),Object.defineProperty(t,"options",{value:t,configurable:!0})}let l,u;Ja(t,s),await Kt("beforeRender",t);let c=W(t.element),f=t.element.getBoundingClientRect(),d=Math.max(1,H(t.element.offsetWidth||parseFloat(c.width)||f.width||1)),h=Math.max(1,H(t.element.offsetHeight||parseFloat(c.height)||f.height||1)),m=t.element.ownerDocument||document,g=!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned,p=null,y=null,b=0;if(g){let J=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),Z=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0),rt=Math.max(d,H(Z)),ft=t.element===m.body,jt=ft&&W(m.documentElement).direction==="rtl",xt=K=>{K>0&&(jt?b=Math.max(b,H(K-f.width)):d=Math.max(d,H(K)))};if(ft&&m.documentElement){let K=m.documentElement.getBoundingClientRect(),it={top:Math.max(0,f.top-K.top),right:Math.max(0,K.right-f.right),bottom:Math.max(0,K.bottom-f.bottom),left:Math.max(0,f.left-K.left)};if(p=it,i!=="subtree"&&(it.top||it.right||it.bottom||it.left)){let bt=t.__session?.styleMap,ln=new Map,In=new Map;for(let[te,Lt]of t.nodeMap){let It=bt?.get(te);if(It){let Xo=ln.get(It);if(Xo===void 0&&ln.set(It,Xo=Xp.test(It)),!Xo)continue}In.set(te,Lt)}let Vt=Dr(t.element,In,t.styleCache,f.width>0?d/f.width:1,f.height>0?h/f.height:1);y={top:Math.min(Vt.top,it.top),right:Math.min(Vt.right,it.right),bottom:Math.min(Vt.bottom,it.bottom),left:Math.min(Vt.left,it.left)}}J=Math.max(t.element.scrollHeight||0,tn(J,K.height,f.top-K.top,f.bottom-K.top)),Z=Math.max(t.element.scrollWidth||0,jt?tn(Z,K.width,K.right-f.right,K.right-f.left):tn(Z,K.width,f.left-K.left,f.right-K.left))}J>0&&(h=Math.max(h,H(J))),xt(Z);try{let K=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,it=j.measureHints.get(t.element);if(it&&it.cssLen===K&&it.w0===rt&&it.docH===J&&it.docW===Z)it.csh>0&&(h=Math.max(h,H(it.csh))),xt(it.csw);else{let bt=m.createElement("div");tt(bt),bt.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+rt+"px!important;overflow:visible!important;visibility:hidden!important;";let ln=bt.attachShadow({mode:"open"});Gr(ln,(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS);let In=ln.appendChild(Vr(t.clone));m.body.appendChild(bt);let Vt=bt.scrollHeight,te=bt.scrollWidth;if(ft){let Lt=bt.getBoundingClientRect(),It=In.getBoundingClientRect();Vt=tn(Vt,Lt.height,It.top-Lt.top,It.bottom-Lt.top),te=jt?tn(te,Lt.width,Lt.right-It.right,Lt.right-It.left):tn(te,Lt.width,It.left-Lt.left,It.right-Lt.left)}m.body.removeChild(bt),j.measureHints.set(t.element,{cssLen:K,w0:rt,docH:J,docW:Z,csh:Vt,csw:te}),Vt>0&&(h=Math.max(h,H(Vt))),xt(te)}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let J=jr(t.element,t.options),Z=1,rt=jr(t.element,{}),ft=Math.max(2,h*.15);Number.isFinite(rt)&&rt>=h-ft&&Number.isFinite(J)&&J>0&&(h=Math.max(1,Math.min(h,H(J+Z))))}if(t.options?.reconcile)try{let J=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;Ka(t.element,t.clone,J,t.nodeMap,d,h)}catch(J){et(t.options.__session,"reconcile-failed","reconcile pass failed",J),D(t.options,"reconcile couldn't run; captured without it.",J)}let w=(J,Z=NaN)=>{let rt=typeof J=="string"?parseFloat(J):J;return Number.isFinite(rt)?rt:Z},S=w(t.options.width),v=w(t.options.height),C=n?H(n.width):d,A=n?H(n.height):h,F=C,T=A,M=Number.isFinite(S),x=Number.isFinite(v),E=A>0?C/A:1;M&&x?(F=Math.max(1,H(S)),T=Math.max(1,H(v))):M?(F=Math.max(1,H(S)),T=Math.max(1,H(F/(E||1)))):x&&(T=Math.max(1,H(v)),F=Math.max(1,H(T*(E||1))));let _=0,$=0,R=d,O=h;if(n){let J=0,Z=0;if(ei(t.element)){let ft=null;if(!o&&r&&Number.isFinite(r.a))ft={a:r.a,b:r.b||0,c:r.c||0,d:r.d||1,e:0,f:0};else{let jt=ve(t.element),xt=Hr(c.transform&&c.transform!=="none"?c.transform:"",jt);xt&&xt.is2D&&(ft={a:xt.a,b:xt.b,c:xt.c,d:xt.d,e:0,f:0})}if(ft&&!(ft.a===1&&ft.b===0&&ft.c===0&&ft.d===1)){let{ox:jt,oy:xt}=_n(c,d,h),K=Xe(d,h,ft,jt,xt);J=K.minX,Z=K.minY}}let rt=Y()?0:(a.dpr||1)*(M||x?F/C:a.scale||1);_=H(rt?Math.round((n.x+J)*rt)/rt:n.x+J),$=H(rt?Math.round((n.y+Z)*rt)/rt:n.y+Z),R=H(_+n.width),O=H($+n.height)}else if(!o&&r&&Number.isFinite(r.a)){let J={a:r.a,b:r.b||0,c:r.c||0,d:r.d||1,e:0,f:0},Z=Xe(d,h,J,0,0);_=H(Z.minX),$=H(Z.minY),R=H(Z.maxX),O=H(Z.maxY)}else if(o&&ei(t.element)){let Z=c.transform&&c.transform!=="none"?c.transform:"",rt=ve(t.element),ft=ce({baseTransform:Z,rotate:rt.rotate||"0deg",scale:rt.scale,translate:rt.translate,width:d,height:h}),{ox:jt,oy:xt}=_n(c,d,h),K=ft.is2D?ft:new DOMMatrix(ft.toString()),it={a:K.a,b:K.b,c:K.c,d:K.d,e:0,f:0},bt=Xe(d,h,it,jt,xt);_=H(bt.minX),$=H(bt.minY),R=H(bt.maxX),O=H(bt.maxY)}let k=Nr(c),I=Lr(c),L=Ir(c),P=Or(c),N=Wr(c),B=f.width>0?(R-_)/f.width:1,z=f.height>0?(O-$)/f.height:1,V=i==="subtree"&&!n?Dr(t.element,t.nodeMap,t.styleCache,B,z):{top:0,right:0,bottom:0,left:0};y&&(V={top:y.top,right:Math.max(0,y.right-(d-f.width)),bottom:Math.max(0,y.bottom-(h-f.height)),left:y.left}),b>0&&(V={...V,left:Math.max(V.left,b)});let U=n?{top:0,right:0,bottom:0,left:0}:i?{top:H(Math.max(k.top,I.top,V.top)+L.top+P.top+N.bleed.top),right:H(Math.max(k.right,I.right,V.right)+L.right+P.right+N.bleed.right),bottom:H(Math.max(k.bottom,I.bottom,V.bottom)+L.bottom+P.bottom+N.bleed.bottom),left:H(Math.max(k.left,I.left,V.left)+L.left+P.left+N.bleed.left)}:{top:H(L.top+V.top),right:H(L.right+V.right),bottom:H(L.bottom+V.bottom),left:H(L.left+V.left)};_=H(_-U.left),$=H($-U.top),R=H(R+U.right),O=H(O+U.bottom);let st=Math.max(1,H(R-_)),ot=Math.max(1,H(O-$)),pt="http://www.w3.org/2000/svg",kt=ei(t.element)?2:0,at=H(kt+(o?0:1)),qt=a.__subpixel?.x||0,Ee=a.__subpixel?.y||0,q=Math.ceil(st+at*2+qt),X=Math.ceil(ot+at*2+Ee),G=H(-(H(_)-at)),ht=H(-(H($)-at)),nt=m.defaultView||window,ct=!Y()&&CSS.supports("zoom","2")?Jp(nt):1;a.__layoutZoom=ct;let Re=n&&!Y(),Qt=Re?H(G-Math.floor(G*ct+.01)/ct):0,Fe=Re?H(ht-Math.floor(ht*ct+.01)/ct):0,Zt=Math.min(0,G-Qt)-(Qt?1/ct:0),sn=Math.min(0,ht-Fe)-(Fe?1/ct:0),Nt=G-Qt-Zt+qt,Te=ht-Fe-sn+Ee,Nn=H(q-Zt),an=H(X-sn),mt=document.createElementNS(pt,"foreignObject");mt.setAttribute("x",String(Zt*ct)),mt.setAttribute("y",String(sn*ct)),mt.setAttribute("width",String(Nn*ct)),mt.setAttribute("height",String(an*ct)),mt.style.overflow="visible";let Ri=document.createElement("style"),wc="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Ri.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+wc+t.classCSS,mt.appendChild(Ri);let Ln=document.createElement("div");Ln.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Ln.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${a.__subpixel?H(Nt+f.width):Nn}px;height:${an}px`+(Nt!==0||Te!==0?`;padding:${Te}px 0 0 ${Nt}px !important`:"")+(ct!==1?`;zoom:${ct} !important`:"")+";direction:ltr !important"+(p?qp(m):""),p&&(Nt!==p.left||Te!==p.top)&&t.__session&&ja(t.element,t.nodeMap,t.__session.styleMap,t.styleCache,Nt-p.left,Te-p.top),Ln.appendChild(t.clone),mt.appendChild(Ln);let xc=new XMLSerializer().serializeToString(mt),Fi=M||x,Sc=Object.freeze({w0:C,h0:A,vbW:q,vbH:X,targetW:F,targetH:T,contentX:H(G+(n?_:0)),contentY:H(ht+(n?$:0)),clip:n?Object.freeze({x:H(_),y:H($),width:C,height:A}):null});Object.defineProperty(a,"meta",{value:Sc,enumerable:!0,writable:!1,configurable:!0});let vc=!Fi||Y()?q:M?F:H(q*(T/X)),Cc=!Fi||Y()?X:x?T:H(X*(F/q)),kc=parseFloat(W(m.documentElement)?.fontSize)||16,Go=[Qt||Fe?`translate(${Qt} ${Fe})`:"",ct!==1?`scale(${1/ct})`:""].join(" ").trim(),Mc=`${Go?``:""}`,Ac=Go?"":"";u=Mc+Yp(xc,mt)+Ac,l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u)}`,t.svgString=u,t.dataURL=l,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await Kt("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let qo=[...document.querySelectorAll("#snapdom-sandbox")].find(ne);return qo&&qo.style.position==="absolute"&&qo.remove(),t.dataURL}function ei(t){return Ba(t)}function Jp(t){let e=t.devicePixelRatio||1;if(e===1)return 1;let n=t.document,o=e;try{let i=n.createElement("div");tt(i),i.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:0!important;height:0!important;visibility:hidden!important;pointer-events:none!important;border:0 solid transparent!important;border-top-width:0.5px!important",(n.body||n.documentElement).appendChild(i);let r=parseFloat(t.getComputedStyle(i).borderTopWidth);i.remove(),r>=1&&(o=1)}catch{}return o}function Qp(t){let e=Array.isArray(t.plugins)?t.plugins:Qr(),n=[];for(let o of e){let i=Ze(o);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function vl(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.__session=Yr(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=Qp(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let o,i,r,s,a,l,u,c,f="",d=null,h=e.needs||Ct,m=n.format,g=n.type;await Kt("beforeSnap",n);let p=n.format!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),y=n.type!==g&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(p||y){let _=String(p?n.format:n.type).toLowerCase();n.format=_==="jpg"?"jpeg":_,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await Kt("beforeClone",n);let b=n.outerTransforms!==!1,w=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,S=n.clip?go(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=ms(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let v=es(e.fast);for(;;){e.__slicer=v;let _=Co(n.element,S);try{({clone:o,classCSS:i,classPrefixCSS:r,styleCache:s,nodeMap:a,reconcileRisk:l,clipWindow:u,standIns:c}=await Za(n.element,n.options)),l>0&&!e.reconcile&&(et(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),e.debug&&!j.warnedReconcile&&(j.warnedReconcile=!0,D(e,"Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!b&&o&&(d=Da(n.element,o)),!w&&o&&Ga(n.element,o,n.options),o&&(Xa(n.element,o,a,c),qa(n.element,o))}finally{_()}if(!v?.yielded||!e.__tornSinceStart?.())break;v=null,e.__session=Yr(e.cache)}if(e.__slicer=null,n.clone=o,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await Kt("afterClone",n),!Je(h,"render"))return null;if(v?.due()&&await v.pause(),yo(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{Ya(n.element,n.clone,n.styleCache,n.nodeMap)}catch(_){et(e.__session,"shrink-failed","shrink pass failed",_),D(e,"Couldn't close the gaps left by removed elements.",_)}try{await no(n.clone,n.element,n.nodeMap)}catch{}try{let _=e.__session?.styleMap;_&&oo(_.keys(),_,n.nodeMap,n.options.__iconMatchers)}catch{}let C=_=>Promise.resolve().then(_),A=(async()=>{await Promise.all([C(()=>wo(n.clone,n.options)),C(()=>So(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{nl(n.element,n.clone,n.nodeMap)}catch(_){et(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",_),D(e,"Couldn't reproduce a backdrop-filter; captured without it.",_)}if(e.compress&&(e.__compressionClip=u,e.__compressionRootTransform=d,await C(()=>Fo(n.clone,n.options,n.nodeMap))),e.captureSelection)try{Js(n.nodeMap)}catch(_){et(e.__session,"selection-compose-failed","field selection compose failed",_)}})(),F=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(F=C(async()=>{let _=n.element.ownerDocument||document,$=S?L=>{try{let P=L.getBoundingClientRect();return P.right>=S.left-200&&P.left<=S.right+200&&P.bottom>=S.top-200&&P.top<=S.bottom+200}catch{return!0}}:null,{required:R,usedCodepoints:O}=!S&&e.__fontUsage||fo(n.element,$),k=R,I=R;if(e.embedFonts==="auto"){let{declared:L,drawn:P}=co(_),N=B=>Mn(B).toLowerCase();if(k=new Set(Array.from(R).filter(B=>P.has(N(B)))),!k.size)return;I=new Set(Array.from(R).filter(B=>P.has(N(B))||!L.has(N(B))))}Y()&&await uo(k,O,_),f=await Sa({required:I,usedCodepoints:O,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:_,debug:n.options.debug})})),await Promise.all([A,F]);let M=(n.options.plugins||[]).some(_=>_&&(typeof _.beforeRender=="function"||typeof _.afterRender=="function"));n.options.engine,v?.due()&&await v.pause();let x=n.clone;Ro(x,e.__compressedAssets);let E=await To(n,{clipWindow:u,outerTransforms:b,outerShadows:w,rootTransform2D:d,fontsCSS:f});if(e.__compressedSnapshot=Eo(x,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:o,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:r,fontsCSS:f,clipWindow:u,outerTransforms:b,outerShadows:w,rootTransform2D:d,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return E}Mt();Ft();vt();var Zp=new Set(["png","jpeg","jpg","webp","svg"]);function Cl(t={}){let e=typeof t.type=="string"&&Zp.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let o=t.format!=null?n:e==="jpg"?"jpeg":e,i=Ti(t.cache),r=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let f of r)if(typeof f=="string")try{document.createDocumentFragment().querySelector(f),s.push(f)}catch{D(t,`Invalid exclude selector "${f}"; ignored.`)}else typeof f=="function"?a.push(f):f!=null&&D(t,"Ignored an exclude entry: use a CSS selector or a function.",f);let l=t.excludeMode??"hide",u=f=>{if(!f||f.nodeType!==1)return!1;if(f.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(f.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(f))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(f))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:u,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:lt(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:ua(t.iconFonts,t),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:o,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,__subpixel:t.__subpixel??null,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}yt();vt();_t();var kl="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function th(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var eh=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function nh(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(eh.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function oh(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(r=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(r.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let o=[t];t.querySelectorAll&&o.push(...t.querySelectorAll("*"));for(let i of o){let r=getComputedStyle(i),s=r.getPropertyValue("backdrop-filter")||r.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var rh=1/16;function ih(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),o=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n-o)<=rh}var $o=new Map,sh=["width","height","min-width","min-height"];function ah(t){let e=$o.get(t);if(e===void 0){e=null;for(let n of sh){let o=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));o&&o[1].endsWith("px")&&((e||={})[n]=o[1])}$o.size>5e3&&$o.clear(),$o.set(t,e)}return e}function lh(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function ch(t,e){let n=[t];for(;n.length;){let o=n.pop();if(o.nodeType===1){let i=e.nodeMap.get(o);i!==void 0&&(e.nodeMap.delete(o),e.srcToClone.get(i)===o&&e.srcToClone.delete(i)),e.styleMap.delete(o)}for(let i=o.firstChild;i;i=i.nextSibling)n.push(i)}}var ni={attempts:0,served:0,reconciled:0};async function Ml(t,e,n){ni.attempts++;try{let o=await fh(t,e,n);return o&&ni.served++,o}catch{return null}}async function fh(t,e,n){let o=e.retained;if(!o||!o.clone||!o.styleMap||!o.srcToClone||n.reconcile||n.clip||n.captureSelection||o.clipWindow||t.scrollTop||t.scrollLeft||th(t)||nh(o)||o.fontsCSS||Mo(n))return null;for(let d of n.plugins||[])if(d&&(typeof d.beforeSnap=="function"||typeof d.beforeClone=="function"||typeof d.resolveNode=="function"||typeof d.afterClone=="function"))return null;if(o.classPrefixCSS&&(o.classPrefixCSS.includes("::marker")||o.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,r=xn(t);if(!r||hs(i))return null;let s=[];t:for(let d of e.dirtyRoots){if(!d.isConnected||d===t||!t.contains(d))return null;for(let h of e.dirtyRoots)if(h!==d&&h!==t&&h.contains(d))continue t;s.push(d)}if(!s.length)return null;n.__compressedAssets=o.__compressedAssets,n.__compressionDensity=o.__compressionDensity,n.__compressionRootTransform=o.rootTransform2D;for(let d of s){if(d.parentElement===t||d.matches?.(kl)||d.querySelector?.(kl)||oh(d,r))return null;let h=o.srcToClone.get(d);if(!h||!h.parentNode)return null;let m=new Map,g={styleMap:o.styleMap,styleCache:o.styleCache,nodeMap:m,options:n},p=Co(d,null),y=mo(d),b;try{b=await le(d,g,n)}finally{y(),p()}if(!b||b.nodeType!==1||b.querySelector?.("style[data-sd]")||(await qe(d,b,g,n),g.__pseudoCSS)||g.__usesPlaceholder&&!o.classPrefixCSS?.includes("[data-sd-ph]"))return null;await Kn(b,g),yo(b);try{await no(b,d,m)}catch{}try{oo([b,...b.querySelectorAll("*")],o.styleMap,m,n.__iconMatchers)}catch{}if(await Promise.all([wo(b,n),So(d,b,o.styleCache,n,m)]),n.compress)try{await Fo(b,n,m)}catch{}for(let[w,S]of m.entries())Xr(w,S,m,o.styleCache);h.replaceWith(b),ch(h,o);for(let[w,S]of m.entries())o.nodeMap.set(w,S),o.srcToClone.set(S,w)}let a={styleMap:o.styleMap,styleCache:o.styleCache,nodeMap:o.nodeMap,options:n},l=new WeakSet;for(let[d,h]of o.nodeMap.entries()){if(!h||h.nodeType!==1||!h.isConnected)continue;let m=o.styleMap.get(d);if(!m)continue;let g=ah(m);if(!g)continue;let p=null,y=!1;for(let b in g){p||=getComputedStyle(h);let w=p.getPropertyValue(b);if(b==="min-width"&&w==="auto"&&!l.has(h.parentElement)){let S=parseFloat(p.width);p.boxSizing!=="border-box"&&m.includes("box-sizing:border-box")&&(S+=["padding-left","padding-right","border-left-width","border-right-width"].reduce((v,C)=>v+(parseFloat(p.getPropertyValue(C))||0),0)),w=`${S}px`}if(!ih(w,g[b])){y=!0;break}}if(y){if(n.__compressedAssets?.has(d))return null;l.add(h),ni.reconciled++,await wt(h,d,a,n)}}let u=dn(o.styleMap);for(let[d,h]of o.styleMap.entries())lh(d),qr(d,h,u);let c=(o.classPrefixCSS||"")+Array.from(u.entries()).map(([d,h])=>`.${h}{${d}}`).join("");Ro(o.clone,n.__compressedAssets);let f=await To({element:t,options:n,plugins:n.plugins,clone:o.clone,classCSS:c,styleCache:o.styleCache,nodeMap:o.nodeMap},{clipWindow:null,outerTransforms:o.outerTransforms,outerShadows:o.outerShadows,rootTransform2D:o.rootTransform2D,fontsCSS:o.fontsCSS||""});return n.__compressedSnapshot=Eo(o.clone,n.__compressedAssets),o.__compressedAssets=n.__compressedAssets,o.__compressionDensity=n.__compressionDensity,f}Ft();var ri=new WeakMap,No=new WeakMap,Il=new WeakSet,oi=new WeakMap,uh=64,Fn=new Map,Ol=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],dh=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function ph(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":dh.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function Al(t){let e=[];for(let n=t;n;){try{let o=n.getBoundingClientRect();e.push(o.x,o.y,o.width,o.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Wt(n)||null}return e.join("|")}function _l(t,e){if(e.disposed||(Fn.delete(t),Fn.set(t,e),Fn.size<=uh))return;let[n,o]=Fn.entries().next().value;Wl(n,o)}function Wl(t,e){e.disposed=!0,Fn.delete(t),ri.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of Ol)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let o of si)n.removeEventListener(o,e.onMediaDirty,!0);for(let[n,o]of e.trackedImages)n.removeEventListener("load",o),n.removeEventListener("error",o);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function Dl(t){if(Il.has(t))return!1;No.delete(t);let e=[t],n=[],o=[];for(let i=0;i=0&&e.observers.splice(s,1)}for(let i of o)if(!e.trackedShadowRoots.has(i))try{let r=new MutationObserver(e.markDirty);r.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),r.__flush=e.markDirty,e.observers.push(r),e.trackedShadowRoots.set(i,r);for(let s of si)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var si=["scroll","change","beforetoggle","toggle"];function Lo(t,e){return[t,...e.trackedShadowRoots.keys()]}function ai(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let o of Lo(t,e))o.querySelectorAll&&n.push(...o.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let o=new Set(n);for(let[i,r]of e.trackedImages)o.has(i)||(i.removeEventListener("load",r),i.removeEventListener("error",r),e.trackedImages.delete(i))}for(let o of n){if(o.complete||e.trackedImages.has(o))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,o.removeEventListener("load",i),o.removeEventListener("error",i),e.trackedImages.delete(o)};e.trackedImages.set(o,i),o.addEventListener("load",i),o.addEventListener("error",i)}}function El(t){let e=new Map,n=new Map,o=new Map;for(let i of t)if(be(i))if(i.type==="attributes"){let r=e.get(i.target);r||e.set(i.target,r=new Map),r.has(i.attributeName)||r.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let r=o.get(i.target);r||o.set(i.target,r=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;r.set(s.data,(r.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;r.set(s.data,(r.get(s.data)||0)-1)}}else return!0;for(let[i,r]of e)for(let[s,a]of r)if(i.getAttribute(s)!==a)return!0;for(let[i,r]of n)if(i.data!==r)return!0;for(let i of o.values())for(let r of i.values())if(r!==0)return!0;return!1}var hh=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,nn=t=>t&&(typeof t=="object"||typeof t=="function")?Po(t):"-";function mh(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let o=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(o)){let r=Math.ceil(e/3)*4;return atob(i.slice(0,r-r%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(r,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function gh(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=mh(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function Rl(t){let e=String(t||"").trim();return e?hh.test(e)?!0:/^data:/i.test(e)?gh(e):!1:!1}function on(t){let e=String(t||"");if(Rl(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(Rl(n[1]??n[2]??n[3]))return!0;return!1}function Fl(t,e=null){let n=t&&t.clone;if(!n)return!1;let o=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of o)for(let r of Bl(i))if(on(r.getAttribute?.("src"))||on(r.getAttribute?.("href"))||on(r.getAttribute?.("style"))||on(t.styleMap?.get(r)))return!0;return!1}function Bl(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function li(t,e){let n=[],o=new Set,i=r=>{r&&!o.has(r)&&(o.add(r),n.push(r))};t.matches?.("input,textarea,select,option")&&i(t);for(let r of Lo(t,e))try{for(let s of r.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function ci(t,e){let n=[],o=new Set,i=(r,s=!1)=>{if(!(!r||o.has(r))){o.add(r);try{(s||r.scrollLeft||r.scrollTop||r.scrollWidth>r.clientWidth||r.scrollHeight>r.clientHeight)&&n.push(r)}catch{}}};for(let r=t;r;r=r.parentElement)i(r,!0);for(let r of Lo(t,e))for(let s of Bl(r))i(s);e.scrollNodes=n}function Tl(t,e){let n=t.ownerDocument||document,o=n.defaultView,i=[o?.location?.hash||"",ph(n),o?.innerWidth||0,o?.innerHeight||0,o?.devicePixelRatio||1,o?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(nn))}catch{}for(let c of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...c.adoptedStyleSheets||[]].map(nn))}catch{}let r=n.activeElement,s=n.fullscreenElement;(r?.contains(t)||t.contains(r))&&i.push(nn(r)),(s?.contains(t)||t.contains(s))&&i.push(nn(s));let a=[o?.scrollX||0,o?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls){let f=String(c.localName||"").toLowerCase();f==="input"?l.push(c.type,fn(c)?c.value.length:c.value,c.checked?1:0,c.indeterminate?1:0):f==="textarea"?l.push(c.value):f==="select"?l.push(c.selectedIndex,c.value):l.push(c.selected?1:0)}let u=[];for(let c of e.images){let f="";try{f=c.currentSrc||c.src||""}catch{}u.push(f,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:l,images:u,frameDriven:e.retainedFrameDriven}}function en(t,e,n){if(!t)return!1;let o=t[n],i=e[n];if(o===i)return!0;if(!Array.isArray(o)||o.length!==i.length)return!1;for(let r=0;r[nn(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function yh(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let o of e.trackedShadowRoots.keys())if(o.contains(n))return o;return null}function bh(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:De(),styleEpoch:we(),styleStamp:wn(t),outsideMutations:bn(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},o=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},i=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)be(l)&&(e.dirty=!0,o(l.target))},r=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=r;try{for(let a of Ol)t.addEventListener(a,r,{capture:!0,passive:!0})}catch{}return ii(t,e)||li(t,e),ci(t,e),ai(t,e),e}var wh=0,Nl=new WeakMap;function Po(t){let e=Nl.get(t);return e||(e="@"+ ++wh,Nl.set(t,e)),e}function fi(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(Po(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(Po(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let r=[];for(let s of t){let a=fi(s,e);if(a===null)return null;r.push(a)}return"["+r.join(",")+"]"}let o=Object.getPrototypeOf(t);if(o!==Object.prototype&&o!==null)return JSON.stringify(Po(t));let i=[];for(let r of Object.keys(t).sort()){let s=t[r];if(s===void 0)continue;let a=fi(s,e);if(a===null)return null;i.push(JSON.stringify(r)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function Ll(t,e){let{burst:n,invalidate:o,...i}=t||{};try{let r=fi(i,new Set);return r===null?null:`${(e||[]).map(nn).join(",")}:${r}`}catch{return null}}function Ul(t,e,n,o,i=null){let r=ri.get(t);r||(r=bh(t),r.baselineSignature=Ll(e,n.plugins),ri.set(t,r));let s=Ll(e,n.plugins),a=async()=>{if(r.disposed)return o();let u=s===null||s!==r.baselineSignature;u&&s!==null?r.pendingSig===s?(r.baselineSignature=s,r.last=null,r.dirty=!0,r.dirtyRoots=null,r.pendingSig=null,u=!1):r.pendingSig=s:r.pendingSig=null,ii(t,r),ai(t,r);for(let A of r.observers)A.__flush(A.takeRecords());Bt();let c=bn(t);r.dirty&&r.outsideMutations!==c&&r.dirtyAll(),r.outsideMutations=c;let f=t.getRootNode?.(),d=[...r.trackedShadowRoots.keys()];f?.nodeType===11&&!d.includes(f)&&d.push(f),Gn(t.ownerDocument||document,d);let h=wn(t);r.styleStamp!==h&&(r.styleStamp=h,r.dirty||r.dirtyAll());let m=Tl(t,r),g=$l(t,r);m.animation=Pl(g),r.renderState&&(!en(r.renderState,m,"style")&&(Be(),r.dirtyAll()),en(r.renderState,m,"scroll")||r.dirtyAll(),en(r.renderState,m,"controls")||(xe(t),r.dirtyAll()),!en(r.renderState,m,"images")&&!r.dirty&&r.dirtyAll());let p=De();r.envEpoch!==p&&(r.dirtyAll(),r.envEpoch=p);let y=we();if(r.styleEpoch!==y&&(r.styleEpoch=y,!r.dirty)){let A=Al(t);r.geometry!==null&&A!==r.geometry&&(xe(t),r.dirtyAll()),r.geometry=A}n.invalidate&&r.dirtyAll();let b=!1,w=!!r.renderState&&!en(r.renderState,m,"animation");try{let A=new Set;w&&g.length===0&&(A=null);for(let F of g){let T=F.playState==="running";if(!T&&!w)continue;T&&(b=!0),w=!0;let M=F.effect?.target;if(yh(t,r,M)===t)A.add(M);else{A=null;break}}if(w&&A&&A.size&&r.retained){r.dirty=!0;for(let F of A)r.dirtyRoots&&r.dirtyRoots.add(F),xe(F)}else w&&!A&&r.dirtyAll()}catch{}let S=m.frameDriven,v=b||S;if(v&&(r.last=null),S&&r.dirtyAll(),!u&&!v&&!r.dirty&&r.last)return _l(t,r),r.last;r.capturing=!0;let C=null;try{let A=null,F=!1,T=null;if(!u&&r.dirty&&r.retained&&r.dirtyRoots&&r.dirtyRoots.size&&i){T=[...r.dirtyRoots];let M=await Ml(t,r,n);M&&(A=await i(M),F=!0)}if(A||(u||(n.__retain=M=>{let x=new Map;for(let[E,_]of M.nodeMap.entries())x.set(_,E);C={...M,srcToClone:x}}),n.__tornSinceStart=()=>{for(let M of r.observers)for(let x of M.takeRecords())r.pending.push(x);return Bt(),r.torn||El(r.pending)||bn(t)!==c},A=await o()),!u&&!r.disposed){r.dirty=!1,r.dirtyRoots=new Set,C?(r.retained=C,r.retainedFrameDriven=Fl(C),li(t,r),ci(t,r)):F&&(r.retainedFrameDriven||=Fl(r.retained,T),li(t,r),ci(t,r));let M=Tl(t,r);M.animation=Pl($l(t,r));let x=["style","scroll","controls","images"];b||x.push("animation");let E=x.every(_=>en(m,M,_));r.renderState=M,r.styleEpoch=we(),r.styleStamp=wn(t),r.geometry=Al(t),r.renderState.frameDriven?(Il.add(t),Wl(t,r)):E?!v&&!r.renderState.frameDriven&&(r.last=A,_l(t,r)):(r.dirtyAll(),r.last=null)}return A}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let F of r.observers)for(let T of F.takeRecords())r.pending.push(T);Bt();let A=bn(t);(r.torn||El(r.pending)||A!==c)&&(r.dirtyAll(),r.last=null),r.outsideMutations=A,r.styleEpoch=we(),r.styleStamp=wn(t),r.pending.length=0,r.torn=!1,r.capturing=!1,r.disposed||(ii(t,r),ai(t,r))}},l=r.inflight.then(a,a);return r.inflight=l.catch(()=>{}),l}var Io=null;function jl(t){Io=t}var xh='button, a[href], [role="button"], input, select, summary, label, [tabindex]',ui=!1,Tn=null,di=new WeakMap,zl=!1;function Vl(t,e){!ui||!Tn||e&&e.burst===!1||di.set(Tn.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function Gl(t){let e={control:t};Tn=e,setTimeout(()=>{Tn===e&&(Tn=null)},0)}function hi(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(xh):null}function Hl(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=hi(t);e&&(Gl(e),pi(t,!1))}function Sh(t){let e=hi(t);e&&Gl(e)}function pi(t,e=!0){if(!Io||document.visibilityState==="hidden")return;let n=hi(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let o=di.get(n);if(o){if(!o.element.isConnected){di.delete(n);return}Io(o.element,o.options).catch(()=>{});return}e&&!zl&&(zl=!0,Io(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function ql(){if(ui||typeof document>"u"||typeof document.addEventListener!="function")return;ui=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",Hl,t),document.addEventListener("keydown",Hl,t),document.addEventListener("click",Sh,t),document.addEventListener("pointerenter",pi,t),document.addEventListener("focusin",pi,t)}Tt();function Gh(...t){return Jr(...t),Q}async function qh(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");tt(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await St();let o=Array.from(n.childNodes).some(r=>r.nodeType===3&&r.textContent.trim()),i=n.children.length===1&&!o?n.firstElementChild:n;return await Ei(i,{...e||{},burst:!1})}finally{n.remove()}}var Xh="3.5.0",Q=Object.assign(Ei,{plugins:Gh,fromString:qh,version:Xh,preCapture:ql});jl(Ei);var _i=Symbol("snapdom.internal"),Yh=Symbol("snapdom.internal.silent"),yc=new Set(["png","jpeg","jpg","webp","svg"]);async function Ei(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=Cl(e);n.element=t,n.invalidate&&Be(),dl(n,e&&e.plugins);let{stage:o,loweredBy:i}=ll(n);n.needs=o,n.__needsLoweredBy=i;let r=Je(o,"render"),s=n.burst===!0||!Mo(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",u=r&&!n.captureSelection&&n.burst!==!1&&s&&!a&&Dl(t);return u&&Vl(t,e),n.snap||(n.snap={toPng:(c,f)=>Q.toPng(c,f),toSvg:(c,f)=>Q.toSvg(c,f)}),u?Ul(t,e,n,()=>Q.capture(t,n,_i),c=>bc(c,n)):Q.capture(t,n,_i)}Q.capture=async(t,e,n)=>{if(n!==_i)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if(Je(e.needs||Ct,"render")&&Y()){if(e.embedFonts)try{let r=t.ownerDocument||document,s=null;if(e.embedFonts==="auto"&&(t.getBoundingClientRect(),s=co(r).drawn,s.size===0))throw null;let a=fo(t);e.clip||(e.__fontUsage=a);let l=a.required;if(s&&(l=new Set([...l].filter(u=>s.has(Mn(u).toLowerCase()))),l.size===0))throw null;await uo(l,a.usedCodepoints,r)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let r of i)try{if(kn(r))continue;let s=r.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){D(e,"Couldn't prepare canvases for Safari.",s)}}let o=await vl(t,e);return bc(o,e)};async function bc(t,e){let n=e.needs||Ct,o=Je(n,"render"),i=k=>fl(n,e.__needsLoweredBy||[],k),r=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=r?null:t,a=()=>s??=r.toDataURL(),l=r||t;r&&(t="");let u=e.__compressedSnapshot,c=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let f,d=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!Y(),g=m?Number.isFinite(e.width)?d.targetW/d.vbW:d.targetH/d.vbH:1,p=m?Number.isFinite(e.height)?d.targetH/d.vbH:d.targetW/d.vbW:1,y=k=>{if(r||!u?.size)return l;let I=d.vbW,L=d.vbH,P=k.crop;P&&(I=Math.max(1,Math.min(I,P.x+P.width)-Math.max(0,P.x)),L=Math.max(1,Math.min(L,P.y+P.height)-Math.max(0,P.y)));let N=Number.isFinite(k.width),B=Number.isFinite(k.height);return(N&&B?Math.max(k.width/I,k.height/L):N?k.width/I*(P?Math.max(1,p/g):1):B?k.height/L*(P?Math.max(1,g/p):1):(k.scale||1)*Math.max(g,p))*(k.dpr||1)<=c?l:f??=bl(a(),u)},b=async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(rn(),Pn));return L(l,{...k,...I||{},format:"png"})},w=()=>{if(!o)throw i("svgString");if(r)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let k=t.indexOf(",");return k>=0?decodeURIComponent(t.slice(k+1)):""},S=k=>Object.defineProperty({...k||{},svgString:w},"url",o?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),v={img:async(k,I)=>{if(r)return b(k,I);let{toImg:L}=await Promise.resolve().then(()=>(Ci(),vi)),P={...k,...I||{}};return L(y(P),P)},svg:async(k,I)=>{if(r)return b(k,I);let{toSvg:L}=await Promise.resolve().then(()=>(Ci(),vi)),P={...k,...I||{}};return L(y(P),P)},canvas:async(k,I)=>{let{toCanvas:L}=await Promise.resolve().then(()=>(_e(),tc)),P={...k,...I||{}};return L(y(P),P)},blob:async(k,I)=>{let{toBlob:L}=await Promise.resolve().then(()=>(Ai(),pc)),P={...k,...I||{}};return L(y(P),P)},png:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(rn(),Pn)),P={...k,...I||{},format:"png"};return L(y(P),P)},jpeg:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(rn(),Pn)),P={...k,...I||{},format:"jpeg"};return L(y(P),P)},webp:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(rn(),Pn)),P={...k,...I||{},format:"webp"};return L(y(P),P)},download:async(k,I)=>{let{download:L}=await Promise.resolve().then(()=>(gc(),mc)),P={...k,...I||{}};return L(y(P),P)}};if(!o)for(let k of Object.keys(v)){let I=k==="download"?"download()":`to${k.charAt(0).toUpperCase()}${k.slice(1)}()`;v[k]=async()=>{throw i(I)}}let C={};for(let k of["img","svg","canvas","blob","png","jpeg","webp"])C[k]=async I=>v[k](e,{...E(k,I||{}),[Yh]:!0});C.jpg=C.jpeg;let A=k=>Object.defineProperty({...e,...k},"options",{value:e,configurable:!0}),F=A({artifacts:e.__artifacts||null,export:S(),exports:C}),T=await ko("defineExports",F),M=Object.assign({},...T.filter(k=>k&&typeof k=="object").reverse()),x={...v,...M};x.jpeg&&!x.jpg&&(x.jpg=(k,I)=>x.jpeg(k,I));function E(k,I){let L=I||{},P={...e,...L},N=typeof L.type=="string"?L.type.toLowerCase():"",B=typeof L.format=="string"?L.format.toLowerCase():yc.has(N)?N:"";B&&(P.format=B==="jpg"?"jpeg":B),P.__explicitFormat=B?P.format:e.__explicitFormat??null,k==="blob"&&!P.__explicitFormat&&(P.format=r?"png":"svg"),P.type=P.format;let z=U=>U==="jpeg"||U==="jpg"||U==="webp";return[k,P.format,N].map(U=>typeof U=="string"?U.toLowerCase():"").find(z)&&(P.backgroundColor==null||P.backgroundColor==="transparent")&&(P.backgroundColor="#ffffff"),P.scale!==1&&(Number.isFinite(P.width)||Number.isFinite(P.height))&&D(P,"scale ignored: width/height already set the size."),P}let _=!1,$=Promise.resolve();async function R(k,I){let L=Object.freeze(I&&typeof I=="object"?{...I}:{}),P=async()=>{let B=x[k];if(!B)throw new Error(`[SnapDOM] Unknown export type: ${k}`);let z=E(k,L),V=A({artifacts:e.__artifacts||null,export:S({type:k,options:z,requestedOptions:L})}),U=z.format,st=z.type;await ko("beforeExport",V,{format:k,options:z});let ot=z.format!==U?z.format:z.type!==st?z.type:"",pt=typeof ot=="string"?ot.toLowerCase():"";yc.has(pt)&&(z.format=pt==="jpg"?"jpeg":pt,z.type=z.format,z.__explicitFormat=z.format,/^(?:jpeg|webp)$/.test(z.format)&&(z.backgroundColor==null||z.backgroundColor==="transparent")&&(z.backgroundColor="#ffffff"));let kt=await B(V,z);return await ko("afterExport",V,{format:k,options:z,result:kt}),_||(_=!0,await Kt("afterSnap",e)),kt},N=$.then(P);return $=N.catch(()=>{}),N}let O={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!o)throw i("toRaw()");return a()},to:(k,I)=>R(k,I),toImg:k=>R("img",k),toSvg:k=>R("svg",k),toCanvas:k=>R("canvas",k),toBlob:k=>R("blob",k),toPng:k=>R("png",k),toJpg:k=>R("jpg",k),toWebp:k=>R("webp",k),download:k=>R("download",k)};o?r&&Object.defineProperty(O,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(O,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(O,"meta",o?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let k of Object.keys(x)){let I="to"+k.charAt(0).toUpperCase()+k.slice(1);O[I]||(O[I]=L=>R(k,L))}return O}Q.toRaw=(t,e)=>Q(t,e).then(n=>n.toRaw());Q.toImg=(t,e)=>Q(t,e).then(n=>n.toImg());Q.toSvg=(t,e)=>Q(t,e).then(n=>n.toSvg());Q.toCanvas=(t,e)=>Q(t,e).then(n=>n.toCanvas());Q.toBlob=(t,e)=>Q(t,e).then(n=>n.toBlob());Q.toPng=(t,e)=>Q(t,{...e,format:"png"}).then(n=>n.toPng());Q.toJpg=(t,e)=>Q(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Q.toWebp=(t,e)=>Q(t,{...e,format:"webp"}).then(n=>n.toWebp());Q.download=(t,e)=>Q(t,e).then(n=>n.download());export{Ct as DEFAULT_STAGE,Ke as STAGES,cl as assertNeeds,Cp as clearPlugins,Qr as getGlobalPlugins,Ze as normalizePlugin,Jr as registerPlugins,Q as snapdom}; +}`,zp=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),Xt=null,Up=0,Hp=0,Me=new Map;function kl(){for(let t of Me.values())t(void 0);if(Me.clear(),Array.isArray(Xt))for(let t of Xt)try{t?.terminate()}catch{}Xt=!1}function jp(){let t,e=null;try{t=URL.createObjectURL(new Blob([Bp],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let o=Me.get(n.data.id);o&&(Me.delete(n.data.id),o(n.data.error?void 0:n.data.url??null))},e.onerror=kl}catch{e=null}return t&&URL.revokeObjectURL(t),e}function Vp(){if(Xt===!1)return!1;if(Xt===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return Xt=!1;Xt=[]}let t=Up++%zp;if(!Xt[t]){let e=jp();if(!e)return kl(),!1;Xt[t]=e}return Xt[t]}var Gp=5e3;function qp(t,e,n,o,i){let r=Vp();return r?new Promise(s=>{let a=++Hp,l=setTimeout(()=>{Me.delete(a),s(void 0)},Gp);Me.set(a,u=>{clearTimeout(l),s(u)});try{r.postMessage({id:a,dataURL:i?"":t,blob:i,srcLength:t.length,targetW:e,targetH:n,resFactor:Cl,quality:vl,mime:o})}catch{clearTimeout(l),Me.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function ri(t,e,n,o){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let i=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,r=j.compress,s=r.get(i);if(s?.source===t)return s.result;let a=To.get(i);if(a?.source===t&&a.cache===r)return a.promise;let l=(async()=>{let c=Lp(t),f=c==="image/jpeg"?"image/jpeg":c==="image/webp"?"image/webp":"image/png",d=Dp(t);if(d&&d.w>0&&d.h>0&&!bl(d.w,d.h,e,n))return null;if(t.length>=Ip){let v=await qp(t,e,n,f,o);if(v!==void 0)return v}let h;try{h=await Np(t)}catch{return null}let m=h.naturalWidth||h.width,g=h.naturalHeight||h.height;if(!m||!g)return null;let p=bl(m,g,e,n);if(!p)return null;let y=p*Cl,b=Math.max(1,Math.round(m*y)),w=Math.max(1,Math.round(g*y)),C=document.createElement("canvas");C.width=b,C.height=w;let S=C.getContext("2d");if(!S)return null;S.imageSmoothingEnabled=!0,S.imageSmoothingQuality="high",S.drawImage(h,0,0,b,w);try{let v=C.toDataURL(f,vl);if(typeof v=="string"&&v.startsWith("data:image")&&v.length{let f=c.getAttribute("src")||"";if(!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,h=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!h)return;let m=o.value||=oi(t,e),g=m.density*m.stretch(n.get(c)||c),p=await ri(f,d*g,h*g,c.__snapdomBlob);p&&(r++,s+=f.length,a+=p.length,c.setAttribute("src",p),$o(c,"attribute","src",f,p,e))},u=6;for(let c=0;c{let c=n.get(u);if(!c||!c.isConnected)return;let f;try{f=getComputedStyle(c)}catch{return}if((f.backgroundRepeat||"repeat").toLowerCase().split(",").some(F=>F.trim()!=="no-repeat"))return;let h=(u.style.backgroundSize||f.backgroundSize||"auto").toLowerCase();if(h.split(",").some(F=>!Yp.test(F.trim())))return;let{w:m,h:g}=Kp(c);if(!m||!g)return;let p=Math.max(1,...(h.match(/\d+(?:\.\d+)?%/g)||[]).map(F=>parseFloat(F)/100)),y=o.value||=oi(t,e),b=y.density*y.stretch(c)*p,w=m*b,C=g*b,S=u.style.backgroundImage,v=[...S.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],M=S;for(let F of v){let T=F[2];if(T.startsWith("data:image/svg"))continue;let A=await ri(T,w,C);A&&(M=M.split(T).join(A),s++)}M!==S&&(u.style.setProperty("background-image",M,u.style.getPropertyPriority("background-image")),$o(u,"style","background-image",S,u.style.backgroundImage,e))},l=6;for(let u=0;u{let u=l.getAttribute("href")||(typeof l.getAttributeNS=="function"?l.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!u||!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let c=l.getAttribute("width")||"",f=l.getAttribute("height")||"";if(c.includes("%")||f.includes("%"))return;let d=n.get(l),h=d?D(d):l.style,m=(C,S)=>{if(/^\d+(?:\.\d+)?px$/.test(h?.[C]||""))return parseFloat(h[C]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(S.trim()))return parseFloat(S);try{return d?.[C]?.baseVal?.value||0}catch{return 0}},g=m("width",c),p=m("height",f);if(!g||!p)return;let y=o.value||=oi(t,e),b=y.density*y.stretch(d||l),w=await ri(u,g*b,p*b);w&&(l.setAttribute("href",w),$o(l,"attribute","href",u,w,e),l.hasAttribute("xlink:href")&&(l.setAttributeNS(wl,"xlink:href",w),$o(l,"attribute","xlink:href",u,w,e)),r++)},a=6;for(let l=0;le+.5?t-n:o-n}function Zp(t){let e=i=>i&&i!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(i),n=D(t.documentElement).backgroundColor,o=e(n)?n:D(t.body).backgroundColor;return e(o)?`;background-color:${o} !important`:""}var th=/(?:^|;)(?:box-shadow|text-shadow|outline-style|filter|-webkit-filter):/;function eh(t,e){if(Y())return t;let n=t.indexOf("");if(n===-1)return t;let o=/]*>[\s\S]*?<\/style>/g,i=[],r=n,s;for(o.lastIndex=n;s=o.exec(t);)i.push({text:t.slice(r,s.index),intern:!0}),i.push({text:s[0],intern:!1}),r=o.lastIndex;i.push({text:t.slice(r),intern:!0});let a=new Map,l=/ style="([^"]*)"/g,u;for(let y of i)if(y.intern)for(l.lastIndex=0;u=l.exec(y.text);)a.set(u[1],(a.get(u[1])||0)+1);let c=0;for(let[y,b]of a)b>1&&(c+=(b-1)*y.length);if(c<2048||t.includes(" data-sdi="))return t;let f=nh(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(f===null)return t;let d=new Map,h=0,m=[],g=(y,b)=>{if((a.get(b)||0)<2||f.has(b))return y;let w=d.get(b);return w===void 0&&(w="i"+(h++).toString(36),d.set(b,w),m.push(`[data-sdi="${w}"]{${b}}`)),` data-sdi="${w}"`},p="";for(let y of i)p+=y.intern?y.text.replace(l,g):y.text;return t.slice(0,n)+m.join("")+p}function nh(t,e,n){let o=new Set;if(!e&&!n)return o;if(!t||t.querySelector("[data-sdi]"))return null;let i=l=>{let u=l.getAttribute("style");u&&o.add(u)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let l=u=>{for(let c of u){if(c.type===CSSRule.IMPORT_RULE||c.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(c.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(c.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(c.selectorText).forEach(i)}c.cssRules&&l(c.cssRules)}};for(let u of[...t.querySelectorAll("style")].slice(1)){let c=u.textContent||"";if(/@import\b/i.test(c))return null;let f=new CSSStyleSheet;f.replaceSync(c),l(f.cssRules)}}catch{return null}let r=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of o){s.setAttribute("style",l);let u=a.serializeToString(s).match(/ style="([^"]*)"/);u&&r.add(u[1])}return r}async function Io(t,e){let{clipWindow:n,outerTransforms:o,outerShadows:i,rootTransform2D:r,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:J,...tt}=t;t=Object.assign(a,tt),Object.defineProperty(t,"options",{value:t,configurable:!0})}let l,u;vo(t,s),await Qt("beforeRender",t);let c=D(t.element),f=t.element.getBoundingClientRect(),d=Math.max(1,H(t.element.offsetWidth||parseFloat(c.width)||f.width||1)),h=Math.max(1,H(t.element.offsetHeight||parseFloat(c.height)||f.height||1)),m=t.element.ownerDocument||document,g=!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned,p=null,y=null,b=0;if(g){let J=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),tt=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0),it=Math.max(d,H(tt)),ut=t.element===m.body,Vt=ut&&D(m.documentElement).direction==="rtl",St=K=>{K>0&&(Vt?b=Math.max(b,H(K-f.width)):d=Math.max(d,H(K)))};if(ut&&m.documentElement){let K=m.documentElement.getBoundingClientRect(),st={top:Math.max(0,f.top-K.top),right:Math.max(0,K.right-f.right),bottom:Math.max(0,K.bottom-f.bottom),left:Math.max(0,f.left-K.left)};if(p=st,i!=="subtree"&&(st.top||st.right||st.bottom||st.left)){let bt=t.__session?.styleMap,fn=new Map,Bn=new Map;for(let[ne,It]of t.nodeMap){let Wt=bt?.get(ne);if(Wt){let Zo=fn.get(Wt);if(Zo===void 0&&fn.set(Wt,Zo=th.test(Wt)),!Zo)continue}Bn.set(ne,It)}let Gt=jr(t.element,Bn,t.styleCache,f.width>0?d/f.width:1,f.height>0?h/f.height:1);y={top:Math.min(Gt.top,st.top),right:Math.min(Gt.right,st.right),bottom:Math.min(Gt.bottom,st.bottom),left:Math.min(Gt.left,st.left)}}J=Math.max(t.element.scrollHeight||0,nn(J,K.height,f.top-K.top,f.bottom-K.top)),tt=Math.max(t.element.scrollWidth||0,Vt?nn(tt,K.width,K.right-f.right,K.right-f.left):nn(tt,K.width,f.left-K.left,f.right-K.left))}J>0&&(h=Math.max(h,H(J))),St(tt);try{let K=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,st=j.measureHints.get(t.element);if(st&&st.cssLen===K&&st.w0===it&&st.docH===J&&st.docW===tt)st.csh>0&&(h=Math.max(h,H(st.csh))),St(st.csw);else{let bt=m.createElement("div");Q(bt),bt.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+it+"px!important;overflow:visible!important;visibility:hidden!important;";let fn=bt.attachShadow({mode:"open"});$n(fn,(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS);let Bn=fn.appendChild(Kr(t.clone));m.body.appendChild(bt);let Gt=bt.scrollHeight,ne=bt.scrollWidth;if(ut){let It=bt.getBoundingClientRect(),Wt=Bn.getBoundingClientRect();Gt=nn(Gt,It.height,Wt.top-It.top,Wt.bottom-It.top),ne=Vt?nn(ne,It.width,It.right-Wt.right,It.right-Wt.left):nn(ne,It.width,Wt.left-It.left,Wt.right-It.left)}m.body.removeChild(bt),j.measureHints.set(t.element,{cssLen:K,w0:it,docH:J,docW:tt,csh:Gt,csw:ne}),Gt>0&&(h=Math.max(h,H(Gt))),St(ne)}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let J=Yr(t.element,t.options),tt=1,it=Yr(t.element,{}),ut=Math.max(2,h*.15);Number.isFinite(it)&&it>=h-ut&&Number.isFinite(J)&&J>0&&(h=Math.max(1,Math.min(h,H(J+tt))))}if(t.options?.reconcile)try{let J=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;tl(t.element,t.clone,J,t.nodeMap,d,h)}catch(J){et(t.options.__session,"reconcile-failed","reconcile pass failed",J),O(t.options,"reconcile couldn't run; captured without it.",J)}let w=(J,tt=NaN)=>{let it=typeof J=="string"?parseFloat(J):J;return Number.isFinite(it)?it:tt},C=w(t.options.width),S=w(t.options.height),v=n?H(n.width):d,M=n?H(n.height):h,F=v,T=M,A=Number.isFinite(C),x=Number.isFinite(S),_=M>0?v/M:1;A&&x?(F=Math.max(1,H(C)),T=Math.max(1,H(S))):A?(F=Math.max(1,H(C)),T=Math.max(1,H(F/(_||1)))):x&&(T=Math.max(1,H(S)),F=Math.max(1,H(T*(_||1))));let E=0,$=0,R=d,W=h;if(n){let J=0,tt=0;if(ii(t.element)){let ut=null;if(!o&&r&&Number.isFinite(r.a))ut={a:r.a,b:r.b||0,c:r.c||0,d:r.d||1,e:0,f:0};else{let Vt=Ce(t.element),St=Xr(c.transform&&c.transform!=="none"?c.transform:"",Vt);St&&St.is2D&&(ut={a:St.a,b:St.b,c:St.c,d:St.d,e:0,f:0})}if(ut&&!(ut.a===1&&ut.b===0&&ut.c===0&&ut.d===1)){let{ox:Vt,oy:St}=Rn(c,d,h),K=Ke(d,h,ut,Vt,St);J=K.minX,tt=K.minY}}let it=Y()?0:(a.dpr||1)*(A||x?F/v:a.scale||1);E=H(it?Math.round((n.x+J)*it)/it:n.x+J),$=H(it?Math.round((n.y+tt)*it)/it:n.y+tt),R=H(E+n.width),W=H($+n.height)}else if(!o&&r&&Number.isFinite(r.a)){let J={a:r.a,b:r.b||0,c:r.c||0,d:r.d||1,e:0,f:0},tt=Ke(d,h,J,0,0);E=H(tt.minX),$=H(tt.minY),R=H(tt.maxX),W=H(tt.maxY)}else if(o&&ii(t.element)){let tt=c.transform&&c.transform!=="none"?c.transform:"",it=Ce(t.element),ut=ue({baseTransform:tt,rotate:it.rotate||"0deg",scale:it.scale,translate:it.translate,width:d,height:h}),{ox:Vt,oy:St}=Rn(c,d,h),K=ut.is2D?ut:new DOMMatrix(ut.toString()),st={a:K.a,b:K.b,c:K.c,d:K.d,e:0,f:0},bt=Ke(d,h,st,Vt,St);E=H(bt.minX),$=H(bt.minY),R=H(bt.maxX),W=H(bt.maxY)}let k=Dr(c),I=Br(c),L=zr(c),P=Ur(c),N=Hr(c),B=f.width>0?(R-E)/f.width:1,U=f.height>0?(W-$)/f.height:1,V=i==="subtree"&&!n?jr(t.element,t.nodeMap,t.styleCache,B,U):{top:0,right:0,bottom:0,left:0};y&&(V={top:y.top,right:Math.max(0,y.right-(d-f.width)),bottom:Math.max(0,y.bottom-(h-f.height)),left:y.left}),b>0&&(V={...V,left:Math.max(V.left,b)});let z=n?{top:0,right:0,bottom:0,left:0}:i?{top:H(Math.max(k.top,I.top,V.top)+L.top+P.top+N.bleed.top),right:H(Math.max(k.right,I.right,V.right)+L.right+P.right+N.bleed.right),bottom:H(Math.max(k.bottom,I.bottom,V.bottom)+L.bottom+P.bottom+N.bleed.bottom),left:H(Math.max(k.left,I.left,V.left)+L.left+P.left+N.bleed.left)}:{top:H(L.top+V.top),right:H(L.right+V.right),bottom:H(L.bottom+V.bottom),left:H(L.left+V.left)};E=H(E-z.left),$=H($-z.top),R=H(R+z.right),W=H(W+z.bottom);let at=Math.max(1,H(R-E)),rt=Math.max(1,H(W-$)),pt="http://www.w3.org/2000/svg",kt=ii(t.element)?2:0,lt=H(kt+(o?0:1)),Yt=a.__subpixel?.x||0,Fe=a.__subpixel?.y||0,q=Math.ceil(at+lt*2+Yt),X=Math.ceil(rt+lt*2+Fe),G=H(-(H(E)-lt)),ht=H(-(H($)-lt)),nt=m.defaultView||window,ft=!Y()&&CSS.supports("zoom","2")?oh(nt):1;a.__layoutZoom=ft;let Te=n&&!Y(),te=Te?H(G-Math.floor(G*ft+.01)/ft):0,$e=Te?H(ht-Math.floor(ht*ft+.01)/ft):0,ee=Math.min(0,G-te)-(te?1/ft:0),ln=Math.min(0,ht-$e)-($e?1/ft:0),Lt=G-te-ee+Yt,Pe=ht-$e-ln+Fe,On=H(q-ee),cn=H(X-ln),mt=document.createElementNS(pt,"foreignObject");mt.setAttribute("x",String(ee*ft)),mt.setAttribute("y",String(ln*ft)),mt.setAttribute("width",String(On*ft)),mt.setAttribute("height",String(cn*ft)),mt.style.overflow="visible";let Pi=document.createElement("style"),Mc="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Pi.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+Mc+t.classCSS,mt.appendChild(Pi);let Dn=document.createElement("div");Dn.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Dn.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${a.__subpixel?H(Lt+f.width):On}px;height:${cn}px`+(Lt!==0||Pe!==0?`;padding:${Pe}px 0 0 ${Lt}px !important`:"")+(ft!==1?`;zoom:${ft} !important`:"")+";direction:ltr !important"+(p?Zp(m):""),p&&(Lt!==p.left||Pe!==p.top)&&t.__session&&Xa(t.element,t.nodeMap,t.__session.styleMap,t.styleCache,Lt-p.left,Pe-p.top),Dn.appendChild(t.clone),mt.appendChild(Dn);let Ac=new XMLSerializer().serializeToString(mt),Ni=A||x,Ec=Object.freeze({w0:v,h0:M,vbW:q,vbH:X,targetW:F,targetH:T,contentX:H(G+(n?E:0)),contentY:H(ht+(n?$:0)),clip:n?Object.freeze({x:H(E),y:H($),width:v,height:M}):null});Object.defineProperty(a,"meta",{value:Ec,enumerable:!0,writable:!1,configurable:!0});let _c=!Ni||Y()?q:A?F:H(q*(T/X)),Rc=!Ni||Y()?X:x?T:H(X*(F/q)),Fc=parseFloat(D(m.documentElement)?.fontSize)||16,Jo=[te||$e?`translate(${te} ${$e})`:"",ft!==1?`scale(${1/ft})`:""].join(" ").trim(),Tc=`${Jo?``:""}`,$c=Jo?"":"";u=Tc+eh(Ac,mt)+$c,l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u)}`,t.svgString=u,t.dataURL=l,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await Qt("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let Qo=[...document.querySelectorAll("#snapdom-sandbox")].find(qt);return Qo&&Qo.style.position==="absolute"&&Qo.remove(),t.dataURL}function ii(t){return ja(t)}function oh(t){let e=t.devicePixelRatio||1;if(e===1)return 1;let n=t.document,o=e;try{let i=n.createElement("div");Q(i),i.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:0!important;height:0!important;visibility:hidden!important;pointer-events:none!important;border:0 solid transparent!important;border-top-width:0.5px!important",(n.body||n.documentElement).appendChild(i);let r=parseFloat(t.getComputedStyle(i).borderTopWidth);i.remove(),r>=1&&(o=1)}catch{}return o}ke();Fn();function sh(t){let e=Array.isArray(t.plugins)?t.plugins:ni(),n=[];for(let o of e){let i=en(o);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function _l(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.__session=Zr(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=sh(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let o,i,r,s,a,l,u,c,f="",d=null,h=e.needs||Ct,m=n.format,g=n.type;await Qt("beforeSnap",n);let p=n.format!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),y=n.type!==g&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(p||y){let E=String(p?n.format:n.type).toLowerCase();n.format=E==="jpg"?"jpeg":E,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await Qt("beforeClone",n);let b=n.outerTransforms!==!1,w=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,C=n.clip?xo(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=ws(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let S=is(e.fast);for(;;){e.__slicer=S;let E=_o(n.element,C);try{({clone:o,classCSS:i,classPrefixCSS:r,styleCache:s,nodeMap:a,reconcileRisk:l,clipWindow:u,standIns:c}=await nl(n.element,n.options)),l>0&&!e.reconcile&&(et(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),e.debug&&!j.warnedReconcile&&(j.warnedReconcile=!0,O(e,"Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!b&&o&&(d=Ha(n.element,o)),!w&&o&&Ka(n.element,o,n.options),o&&(Qa(n.element,o,a,c),Ja(n.element,o))}finally{E()}if(!S?.yielded||!e.__tornSinceStart?.())break;S=null,e.__session=Zr(e.cache)}if(e.__slicer=null,n.clone=o,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await Qt("afterClone",n),!Ze(h,"render"))return null;if(S?.due()&&await S.pause(),So(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{Za(n.element,n.clone,n.styleCache,n.nodeMap)}catch(E){et(e.__session,"shrink-failed","shrink pass failed",E),O(e,"Couldn't close the gaps left by removed elements.",E)}try{await so(n.clone,n.element,n.nodeMap)}catch{}try{let E=e.__session?.styleMap;E&&ao(E.keys(),E,n.nodeMap,n.options.__iconMatchers)}catch{}let v=E=>Promise.resolve().then(E),M=(async()=>{await Promise.all([v(()=>ko(n.clone,n.options)),v(()=>Ao(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{il(n.element,n.clone,n.nodeMap)}catch(E){et(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",E),O(e,"Couldn't reproduce a backdrop-filter; captured without it.",E)}if(e.compress&&(e.__compressionClip=u,e.__compressionRootTransform=d,await v(()=>Lo(n.clone,n.options,n.nodeMap))),e.captureSelection)try{ea(n.nodeMap)}catch(E){et(e.__session,"selection-compose-failed","field selection compose failed",E)}})(),F=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(F=v(async()=>{let E=n.element.ownerDocument||document,$=C?L=>{try{let P=L.getBoundingClientRect();return P.right>=C.left-200&&P.left<=C.right+200&&P.bottom>=C.top-200&&P.top<=C.bottom+200}catch{return!0}}:null,{required:R,usedCodepoints:W}=!C&&e.__fontUsage||mo(n.element,$),k=R,I=R;if(e.embedFonts==="auto"){let{declared:L,drawn:P}=ho(E),N=B=>En(B).toLowerCase();if(k=new Set(Array.from(R).filter(B=>P.has(N(B)))),!k.size)return;I=new Set(Array.from(R).filter(B=>P.has(N(B))||!L.has(N(B))))}Y()&&await go(k,W,E),f=await Ma({required:I,usedCodepoints:W,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:E,debug:n.options.debug})})),await Promise.all([M,F]);let A=(n.options.plugins||[]).some(E=>E&&(typeof E.beforeRender=="function"||typeof E.afterRender=="function"));if(n.options.engine==="html-in-canvas"&&!A){let{tryCanvasEngine:E}=await Promise.resolve().then(()=>(El(),Al));vo(n,f);let $=await E(n,n.options);if($)return $}S?.due()&&await S.pause();let x=n.clone;No(x,e.__compressedAssets);let _=await Io(n,{clipWindow:u,outerTransforms:b,outerShadows:w,rootTransform2D:d,fontsCSS:f});if(e.__compressedSnapshot=Po(x,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:o,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:r,fontsCSS:f,clipWindow:u,outerTransforms:b,outerShadows:w,rootTransform2D:d,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return _}Mt();$t();wt();var ah=new Set(["png","jpeg","jpg","webp","svg"]);function Rl(t={}){let e=typeof t.type=="string"&&ah.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let o=t.format!=null?n:e==="jpg"?"jpeg":e,i=Li(t.cache),r=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let f of r)if(typeof f=="string")try{document.createDocumentFragment().querySelector(f),s.push(f)}catch{O(t,`Invalid exclude selector "${f}"; ignored.`)}else typeof f=="function"?a.push(f):f!=null&&O(t,"Ignored an exclude entry: use a CSS selector or a function.",f);let l=t.excludeMode??"hide",u=f=>{if(!f||f.nodeType!==1)return!1;if(f.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(f.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(f))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(f))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:u,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:ct(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:ma(t.iconFonts,t),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:o,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,__subpixel:t.__subpixel??null,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}yt();wt();Rt();Rt();Rt();_t();ke();var Fl="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function lh(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var ch=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function fh(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(ch.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function uh(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(r=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(r.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let o=[t];t.querySelectorAll&&o.push(...t.querySelectorAll("*"));for(let i of o){let r=getComputedStyle(i),s=r.getPropertyValue("backdrop-filter")||r.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var dh=1/16;function ph(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),o=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n-o)<=dh}var Wo=new Map,hh=["width","height","min-width","min-height"];function mh(t){let e=Wo.get(t);if(e===void 0){e=null;for(let n of hh){let o=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));o&&o[1].endsWith("px")&&((e||={})[n]=o[1])}Wo.size>5e3&&Wo.clear(),Wo.set(t,e)}return e}function gh(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function yh(t,e){let n=[t];for(;n.length;){let o=n.pop();if(o.nodeType===1){let i=e.nodeMap.get(o);i!==void 0&&(e.nodeMap.delete(o),e.srcToClone.get(i)===o&&e.srcToClone.delete(i)),e.styleMap.delete(o)}for(let i=o.firstChild;i;i=i.nextSibling)n.push(i)}}var si={attempts:0,served:0,reconciled:0};async function Tl(t,e,n){si.attempts++;try{let o=await bh(t,e,n);return o&&si.served++,o}catch{return null}}async function bh(t,e,n){let o=e.retained;if(!o||!o.clone||!o.styleMap||!o.srcToClone||n.reconcile||n.clip||n.captureSelection||o.clipWindow||t.scrollTop||t.scrollLeft||lh(t)||fh(o)||o.fontsCSS||Fo(n))return null;for(let d of n.plugins||[])if(d&&(typeof d.beforeSnap=="function"||typeof d.beforeClone=="function"||typeof d.resolveNode=="function"||typeof d.afterClone=="function"))return null;if(o.classPrefixCSS&&(o.classPrefixCSS.includes("::marker")||o.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,r=vn(t);if(!r||bs(i))return null;let s=[];t:for(let d of e.dirtyRoots){if(!d.isConnected||d===t||!t.contains(d))return null;for(let h of e.dirtyRoots)if(h!==d&&h!==t&&h.contains(d))continue t;s.push(d)}if(!s.length)return null;n.__compressedAssets=o.__compressedAssets,n.__compressionDensity=o.__compressionDensity,n.__compressionRootTransform=o.rootTransform2D;for(let d of s){if(d.parentElement===t||d.matches?.(Fl)||d.querySelector?.(Fl)||uh(d,r))return null;let h=o.srcToClone.get(d);if(!h||!h.parentNode)return null;let m=new Map,g={styleMap:o.styleMap,styleCache:o.styleCache,nodeMap:m,options:n},p=_o(d,null),y=wo(d),b;try{b=await fe(d,g,n)}finally{y(),p()}if(!b||b.nodeType!==1||b.querySelector?.("style[data-sd]")||(await Ye(d,b,g,n),g.__pseudoCSS)||g.__usesPlaceholder&&!o.classPrefixCSS?.includes("[data-sd-ph]"))return null;await to(b,g),So(b);try{await so(b,d,m)}catch{}try{ao([b,...b.querySelectorAll("*")],o.styleMap,m,n.__iconMatchers)}catch{}if(await Promise.all([ko(b,n),Ao(d,b,o.styleCache,n,m)]),n.compress)try{await Lo(b,n,m)}catch{}for(let[w,C]of m.entries())Qr(w,C,m,o.styleCache);h.replaceWith(b),yh(h,o);for(let[w,C]of m.entries())o.nodeMap.set(w,C),o.srcToClone.set(C,w)}let a={styleMap:o.styleMap,styleCache:o.styleCache,nodeMap:o.nodeMap,options:n},l=new WeakSet;for(let[d,h]of o.nodeMap.entries()){if(!h||h.nodeType!==1||!h.isConnected)continue;let m=o.styleMap.get(d);if(!m)continue;let g=mh(m);if(!g)continue;let p=null,y=!1;for(let b in g){p||=getComputedStyle(h);let w=p.getPropertyValue(b);if(b==="min-width"&&w==="auto"&&!l.has(h.parentElement)){let C=parseFloat(p.width);p.boxSizing!=="border-box"&&m.includes("box-sizing:border-box")&&(C+=["padding-left","padding-right","border-left-width","border-right-width"].reduce((S,v)=>S+(parseFloat(p.getPropertyValue(v))||0),0)),w=`${C}px`}if(!ph(w,g[b])){y=!0;break}}if(y){if(n.__compressedAssets?.has(d))return null;l.add(h),si.reconciled++,await xt(h,d,a,n)}}let u=hn(o.styleMap);for(let[d,h]of o.styleMap.entries())gh(d),Jr(d,h,u);let c=(o.classPrefixCSS||"")+Array.from(u.entries()).map(([d,h])=>`.${h}{${d}}`).join("");No(o.clone,n.__compressedAssets);let f=await Io({element:t,options:n,plugins:n.plugins,clone:o.clone,classCSS:c,styleCache:o.styleCache,nodeMap:o.nodeMap},{clipWindow:null,outerTransforms:o.outerTransforms,outerShadows:o.outerShadows,rootTransform2D:o.rootTransform2D,fontsCSS:o.fontsCSS||""});return n.__compressedSnapshot=Po(o.clone,n.__compressedAssets),o.__compressedAssets=n.__compressedAssets,o.__compressionDensity=n.__compressionDensity,f}$t();var li=new WeakMap,Do=new WeakMap,Ul=new WeakSet,ai=new WeakMap,wh=64,Nn=new Map,Hl=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],xh=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function Sh(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":xh.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function $l(t){let e=[];for(let n=t;n;){try{let o=n.getBoundingClientRect();e.push(o.x,o.y,o.width,o.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Dt(n)||null}return e.join("|")}function Pl(t,e){if(e.disposed||(Nn.delete(t),Nn.set(t,e),Nn.size<=wh))return;let[n,o]=Nn.entries().next().value;jl(n,o)}function jl(t,e){e.disposed=!0,Nn.delete(t),li.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of Hl)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let o of fi)n.removeEventListener(o,e.onMediaDirty,!0);for(let[n,o]of e.trackedImages)n.removeEventListener("load",o),n.removeEventListener("error",o);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function Vl(t){if(Ul.has(t))return!1;Do.delete(t);let e=[t],n=[],o=[];for(let i=0;i=0&&e.observers.splice(s,1)}for(let i of o)if(!e.trackedShadowRoots.has(i))try{let r=new MutationObserver(e.markDirty);r.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),r.__flush=e.markDirty,e.observers.push(r),e.trackedShadowRoots.set(i,r);for(let s of fi)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var fi=["scroll","change","beforetoggle","toggle"];function Bo(t,e){return[t,...e.trackedShadowRoots.keys()]}function ui(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let o of Bo(t,e))o.querySelectorAll&&n.push(...o.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let o=new Set(n);for(let[i,r]of e.trackedImages)o.has(i)||(i.removeEventListener("load",r),i.removeEventListener("error",r),e.trackedImages.delete(i))}for(let o of n){if(o.complete||e.trackedImages.has(o))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,o.removeEventListener("load",i),o.removeEventListener("error",i),e.trackedImages.delete(o)};e.trackedImages.set(o,i),o.addEventListener("load",i),o.addEventListener("error",i)}}function Nl(t){let e=new Map,n=new Map,o=new Map;for(let i of t)if(we(i))if(i.type==="attributes"){let r=e.get(i.target);r||e.set(i.target,r=new Map),r.has(i.attributeName)||r.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let r=o.get(i.target);r||o.set(i.target,r=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;r.set(s.data,(r.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;r.set(s.data,(r.get(s.data)||0)-1)}}else return!0;for(let[i,r]of e)for(let[s,a]of r)if(i.getAttribute(s)!==a)return!0;for(let[i,r]of n)if(i.data!==r)return!0;for(let i of o.values())for(let r of i.values())if(r!==0)return!0;return!1}var vh=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,rn=t=>t&&(typeof t=="object"||typeof t=="function")?Oo(t):"-";function Ch(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let o=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(o)){let r=Math.ceil(e/3)*4;return atob(i.slice(0,r-r%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(r,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function kh(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Ch(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function Ll(t){let e=String(t||"").trim();return e?vh.test(e)?!0:/^data:/i.test(e)?kh(e):!1:!1}function sn(t){let e=String(t||"");if(Ll(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(Ll(n[1]??n[2]??n[3]))return!0;return!1}function Il(t,e=null){let n=t&&t.clone;if(!n)return!1;let o=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of o)for(let r of Gl(i))if(sn(r.getAttribute?.("src"))||sn(r.getAttribute?.("href"))||sn(r.getAttribute?.("style"))||sn(t.styleMap?.get(r)))return!0;return!1}function Gl(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function di(t,e){let n=[],o=new Set,i=r=>{r&&!o.has(r)&&(o.add(r),n.push(r))};t.matches?.("input,textarea,select,option")&&i(t);for(let r of Bo(t,e))try{for(let s of r.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function pi(t,e){let n=[],o=new Set,i=(r,s=!1)=>{if(!(!r||o.has(r))){o.add(r);try{(s||r.scrollLeft||r.scrollTop||r.scrollWidth>r.clientWidth||r.scrollHeight>r.clientHeight)&&n.push(r)}catch{}}};for(let r=t;r;r=r.parentElement)i(r,!0);for(let r of Bo(t,e))for(let s of Gl(r))i(s);e.scrollNodes=n}function Wl(t,e){let n=t.ownerDocument||document,o=n.defaultView,i=[o?.location?.hash||"",Sh(n),o?.innerWidth||0,o?.innerHeight||0,o?.devicePixelRatio||1,o?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(rn))}catch{}for(let c of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...c.adoptedStyleSheets||[]].map(rn))}catch{}let r=n.activeElement,s=n.fullscreenElement;(r?.contains(t)||t.contains(r))&&i.push(rn(r)),(s?.contains(t)||t.contains(s))&&i.push(rn(s));let a=[o?.scrollX||0,o?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls){let f=String(c.localName||"").toLowerCase();f==="input"?l.push(c.type,dn(c)?c.value.length:c.value,c.checked?1:0,c.indeterminate?1:0):f==="textarea"?l.push(c.value):f==="select"?l.push(c.selectedIndex,c.value):l.push(c.selected?1:0)}let u=[];for(let c of e.images){let f="";try{f=c.currentSrc||c.src||""}catch{}u.push(f,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:l,images:u,frameDriven:e.retainedFrameDriven}}function on(t,e,n){if(!t)return!1;let o=t[n],i=e[n];if(o===i)return!0;if(!Array.isArray(o)||o.length!==i.length)return!1;for(let r=0;r[rn(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Mh(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let o of e.trackedShadowRoots.keys())if(o.contains(n))return o;return null}function Ah(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:ze(),styleEpoch:xe(),styleStamp:Sn(t),outsideMutations:xn(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},o=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},i=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)we(l)&&(e.dirty=!0,o(l.target))},r=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=r;try{for(let a of Hl)t.addEventListener(a,r,{capture:!0,passive:!0})}catch{}return ci(t,e)||di(t,e),pi(t,e),ui(t,e),e}var Eh=0,Bl=new WeakMap;function Oo(t){let e=Bl.get(t);return e||(e="@"+ ++Eh,Bl.set(t,e)),e}function hi(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(Oo(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(Oo(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let r=[];for(let s of t){let a=hi(s,e);if(a===null)return null;r.push(a)}return"["+r.join(",")+"]"}let o=Object.getPrototypeOf(t);if(o!==Object.prototype&&o!==null)return JSON.stringify(Oo(t));let i=[];for(let r of Object.keys(t).sort()){let s=t[r];if(s===void 0)continue;let a=hi(s,e);if(a===null)return null;i.push(JSON.stringify(r)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function zl(t,e){let{burst:n,invalidate:o,...i}=t||{};try{let r=hi(i,new Set);return r===null?null:`${(e||[]).map(rn).join(",")}:${r}`}catch{return null}}function ql(t,e,n,o,i=null){let r=li.get(t);r||(r=Ah(t),r.baselineSignature=zl(e,n.plugins),li.set(t,r));let s=zl(e,n.plugins),a=async()=>{if(r.disposed)return o();let u=s===null||s!==r.baselineSignature;u&&s!==null?r.pendingSig===s?(r.baselineSignature=s,r.last=null,r.dirty=!0,r.dirtyRoots=null,r.pendingSig=null,u=!1):r.pendingSig=s:r.pendingSig=null,ci(t,r),ui(t,r);for(let M of r.observers)M.__flush(M.takeRecords());zt();let c=xn(t);r.dirty&&r.outsideMutations!==c&&r.dirtyAll(),r.outsideMutations=c;let f=t.getRootNode?.(),d=[...r.trackedShadowRoots.keys()];f?.nodeType===11&&!d.includes(f)&&d.push(f),Kn(t.ownerDocument||document,d);let h=Sn(t);r.styleStamp!==h&&(r.styleStamp=h,r.dirty||r.dirtyAll());let m=Wl(t,r),g=Ol(t,r);m.animation=Dl(g),r.renderState&&(!on(r.renderState,m,"style")&&(Ue(),r.dirtyAll()),on(r.renderState,m,"scroll")||r.dirtyAll(),on(r.renderState,m,"controls")||(Se(t),r.dirtyAll()),!on(r.renderState,m,"images")&&!r.dirty&&r.dirtyAll());let p=ze();r.envEpoch!==p&&(r.dirtyAll(),r.envEpoch=p);let y=xe();if(r.styleEpoch!==y&&(r.styleEpoch=y,!r.dirty)){let M=$l(t);r.geometry!==null&&M!==r.geometry&&(Se(t),r.dirtyAll()),r.geometry=M}n.invalidate&&r.dirtyAll();let b=!1,w=!!r.renderState&&!on(r.renderState,m,"animation");try{let M=new Set;w&&g.length===0&&(M=null);for(let F of g){let T=F.playState==="running";if(!T&&!w)continue;T&&(b=!0),w=!0;let A=F.effect?.target;if(Mh(t,r,A)===t)M.add(A);else{M=null;break}}if(w&&M&&M.size&&r.retained){r.dirty=!0;for(let F of M)r.dirtyRoots&&r.dirtyRoots.add(F),Se(F)}else w&&!M&&r.dirtyAll()}catch{}let C=m.frameDriven,S=b||C;if(S&&(r.last=null),C&&r.dirtyAll(),!u&&!S&&!r.dirty&&r.last)return Pl(t,r),r.last;r.capturing=!0;let v=null;try{let M=null,F=!1,T=null;if(!u&&r.dirty&&r.retained&&r.dirtyRoots&&r.dirtyRoots.size&&i){T=[...r.dirtyRoots];let A=await Tl(t,r,n);A&&(M=await i(A),F=!0)}if(M||(u||(n.__retain=A=>{let x=new Map;for(let[_,E]of A.nodeMap.entries())x.set(E,_);v={...A,srcToClone:x}}),n.__tornSinceStart=()=>{for(let A of r.observers)for(let x of A.takeRecords())r.pending.push(x);return zt(),r.torn||Nl(r.pending)||xn(t)!==c},M=await o()),!u&&!r.disposed){r.dirty=!1,r.dirtyRoots=new Set,v?(r.retained=v,r.retainedFrameDriven=Il(v),di(t,r),pi(t,r)):F&&(r.retainedFrameDriven||=Il(r.retained,T),di(t,r),pi(t,r));let A=Wl(t,r);A.animation=Dl(Ol(t,r));let x=["style","scroll","controls","images"];b||x.push("animation");let _=x.every(E=>on(m,A,E));r.renderState=A,r.styleEpoch=xe(),r.styleStamp=Sn(t),r.geometry=$l(t),r.renderState.frameDriven?(Ul.add(t),jl(t,r)):_?!S&&!r.renderState.frameDriven&&(r.last=M,Pl(t,r)):(r.dirtyAll(),r.last=null)}return M}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let F of r.observers)for(let T of F.takeRecords())r.pending.push(T);zt();let M=xn(t);(r.torn||Nl(r.pending)||M!==c)&&(r.dirtyAll(),r.last=null),r.outsideMutations=M,r.styleEpoch=xe(),r.styleStamp=Sn(t),r.pending.length=0,r.torn=!1,r.capturing=!1,r.disposed||(ci(t,r),ui(t,r))}},l=r.inflight.then(a,a);return r.inflight=l.catch(()=>{}),l}var zo=null;function Kl(t){zo=t}var _h='button, a[href], [role="button"], input, select, summary, label, [tabindex]',mi=!1,Ln=null,gi=new WeakMap,Xl=!1;function Jl(t,e){!mi||!Ln||e&&e.burst===!1||gi.set(Ln.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function Ql(t){let e={control:t};Ln=e,setTimeout(()=>{Ln===e&&(Ln=null)},0)}function bi(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(_h):null}function Yl(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=bi(t);e&&(Ql(e),yi(t,!1))}function Rh(t){let e=bi(t);e&&Ql(e)}function yi(t,e=!0){if(!zo||document.visibilityState==="hidden")return;let n=bi(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let o=gi.get(n);if(o){if(!o.element.isConnected){gi.delete(n);return}zo(o.element,o.options).catch(()=>{});return}e&&!Xl&&(Xl=!0,zo(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function Zl(){if(mi||typeof document>"u"||typeof document.addEventListener!="function")return;mi=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",Yl,t),document.addEventListener("keydown",Yl,t),document.addEventListener("click",Rh,t),document.addEventListener("pointerenter",yi,t),document.addEventListener("focusin",yi,t)}At();function tm(...t){return ei(...t),Z}async function em(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");Q(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await vt();let o=Array.from(n.childNodes).some(r=>r.nodeType===3&&r.textContent.trim()),i=n.children.length===1&&!o?n.firstElementChild:n;return await $i(i,{...e||{},burst:!1})}finally{n.remove()}}var nm="3.6.0",Z=Object.assign($i,{plugins:tm,fromString:em,version:nm,preCapture:Zl});Kl($i);var Ti=Symbol("snapdom.internal"),om=Symbol("snapdom.internal.silent"),Cc=new Set(["png","jpeg","jpg","webp","svg"]);async function $i(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=Rl(e);n.element=t,n.invalidate&&Ue(),ml(n,e&&e.plugins);let{stage:o,loweredBy:i}=ul(n);n.needs=o,n.__needsLoweredBy=i;let r=Ze(o,"render"),s=n.burst===!0||!Fo(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",u=r&&!n.captureSelection&&n.burst!==!1&&s&&!a&&Vl(t);return u&&Jl(t,e),n.snap||(n.snap={toPng:(c,f)=>Z.toPng(c,f),toSvg:(c,f)=>Z.toSvg(c,f)}),u?ql(t,e,n,()=>Z.capture(t,n,Ti),c=>kc(c,n)):Z.capture(t,n,Ti)}Z.capture=async(t,e,n)=>{if(n!==Ti)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if(Ze(e.needs||Ct,"render")&&Y()){if(e.embedFonts)try{let r=t.ownerDocument||document,s=null;if(e.embedFonts==="auto"&&(t.getBoundingClientRect(),s=ho(r).drawn,s.size===0))throw null;let a=mo(t);e.clip||(e.__fontUsage=a);let l=a.required;if(s&&(l=new Set([...l].filter(u=>s.has(En(u).toLowerCase()))),l.size===0))throw null;await go(l,a.usedCodepoints,r)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let r of i)try{if(An(r))continue;let s=r.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){O(e,"Couldn't prepare canvases for Safari.",s)}}let o=await _l(t,e);return kc(o,e)};async function kc(t,e){let n=e.needs||Ct,o=Ze(n,"render"),i=k=>pl(n,e.__needsLoweredBy||[],k),r=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=r?null:t,a=()=>s??=r.toDataURL(),l=r||t;r&&(t="");let u=e.__compressedSnapshot,c=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let f,d=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!Y(),g=m?Number.isFinite(e.width)?d.targetW/d.vbW:d.targetH/d.vbH:1,p=m?Number.isFinite(e.height)?d.targetH/d.vbH:d.targetW/d.vbW:1,y=k=>{if(r||!u?.size)return l;let I=d.vbW,L=d.vbH,P=k.crop;P&&(I=Math.max(1,Math.min(I,P.x+P.width)-Math.max(0,P.x)),L=Math.max(1,Math.min(L,P.y+P.height)-Math.max(0,P.y)));let N=Number.isFinite(k.width),B=Number.isFinite(k.height);return(N&&B?Math.max(k.width/I,k.height/L):N?k.width/I*(P?Math.max(1,p/g):1):B?k.height/L*(P?Math.max(1,g/p):1):(k.scale||1)*Math.max(g,p))*(k.dpr||1)<=c?l:f??=Sl(a(),u)},b=async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(an(),Wn));return L(l,{...k,...I||{},format:"png"})},w=()=>{if(!o)throw i("svgString");if(r)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let k=t.indexOf(",");return k>=0?decodeURIComponent(t.slice(k+1)):""},C=k=>Object.defineProperty({...k||{},svgString:w},"url",o?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),S={img:async(k,I)=>{if(r)return b(k,I);let{toImg:L}=await Promise.resolve().then(()=>(Ei(),Ai)),P={...k,...I||{}};return L(y(P),P)},svg:async(k,I)=>{if(r)return b(k,I);let{toSvg:L}=await Promise.resolve().then(()=>(Ei(),Ai)),P={...k,...I||{}};return L(y(P),P)},canvas:async(k,I)=>{let{toCanvas:L}=await Promise.resolve().then(()=>(Re(),sc)),P={...k,...I||{}};return L(y(P),P)},blob:async(k,I)=>{let{toBlob:L}=await Promise.resolve().then(()=>(Fi(),wc)),P={...k,...I||{}};return L(y(P),P)},png:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(an(),Wn)),P={...k,...I||{},format:"png"};return L(y(P),P)},jpeg:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(an(),Wn)),P={...k,...I||{},format:"jpeg"};return L(y(P),P)},webp:async(k,I)=>{let{rasterize:L}=await Promise.resolve().then(()=>(an(),Wn)),P={...k,...I||{},format:"webp"};return L(y(P),P)},download:async(k,I)=>{let{download:L}=await Promise.resolve().then(()=>(vc(),Sc)),P={...k,...I||{}};return L(y(P),P)}};if(!o)for(let k of Object.keys(S)){let I=k==="download"?"download()":`to${k.charAt(0).toUpperCase()}${k.slice(1)}()`;S[k]=async()=>{throw i(I)}}let v={};for(let k of["img","svg","canvas","blob","png","jpeg","webp"])v[k]=async I=>S[k](e,{..._(k,I||{}),[om]:!0});v.jpg=v.jpeg;let M=k=>Object.defineProperty({...e,...k},"options",{value:e,configurable:!0}),F=M({artifacts:e.__artifacts||null,export:C(),exports:v}),T=await Ro("defineExports",F),A=Object.assign({},...T.filter(k=>k&&typeof k=="object").reverse()),x={...S,...A};x.jpeg&&!x.jpg&&(x.jpg=(k,I)=>x.jpeg(k,I));function _(k,I){let L=I||{},P={...e,...L},N=typeof L.type=="string"?L.type.toLowerCase():"",B=typeof L.format=="string"?L.format.toLowerCase():Cc.has(N)?N:"";B&&(P.format=B==="jpg"?"jpeg":B),P.__explicitFormat=B?P.format:e.__explicitFormat??null,k==="blob"&&!P.__explicitFormat&&(P.format=r?"png":"svg"),P.type=P.format;let U=z=>z==="jpeg"||z==="jpg"||z==="webp";return[k,P.format,N].map(z=>typeof z=="string"?z.toLowerCase():"").find(U)&&(P.backgroundColor==null||P.backgroundColor==="transparent")&&(P.backgroundColor="#ffffff"),P.scale!==1&&(Number.isFinite(P.width)||Number.isFinite(P.height))&&O(P,"scale ignored: width/height already set the size."),P}let E=!1,$=Promise.resolve();async function R(k,I){let L=Object.freeze(I&&typeof I=="object"?{...I}:{}),P=async()=>{let B=x[k];if(!B)throw new Error(`[SnapDOM] Unknown export type: ${k}`);let U=_(k,L),V=M({artifacts:e.__artifacts||null,export:C({type:k,options:U,requestedOptions:L})}),z=U.format,at=U.type;await Ro("beforeExport",V,{format:k,options:U});let rt=U.format!==z?U.format:U.type!==at?U.type:"",pt=typeof rt=="string"?rt.toLowerCase():"";Cc.has(pt)&&(U.format=pt==="jpg"?"jpeg":pt,U.type=U.format,U.__explicitFormat=U.format,/^(?:jpeg|webp)$/.test(U.format)&&(U.backgroundColor==null||U.backgroundColor==="transparent")&&(U.backgroundColor="#ffffff"));let kt=await B(V,U);return await Ro("afterExport",V,{format:k,options:U,result:kt}),E||(E=!0,await Qt("afterSnap",e)),kt},N=$.then(P);return $=N.catch(()=>{}),N}let W={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!o)throw i("toRaw()");return a()},to:(k,I)=>R(k,I),toImg:k=>R("img",k),toSvg:k=>R("svg",k),toCanvas:k=>R("canvas",k),toBlob:k=>R("blob",k),toPng:k=>R("png",k),toJpg:k=>R("jpg",k),toWebp:k=>R("webp",k),download:k=>R("download",k)};o?r&&Object.defineProperty(W,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(W,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(W,"meta",o?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let k of Object.keys(x)){let I="to"+k.charAt(0).toUpperCase()+k.slice(1);W[I]||(W[I]=L=>R(k,L))}return W}Z.toRaw=(t,e)=>Z(t,e).then(n=>n.toRaw());Z.toImg=(t,e)=>Z(t,e).then(n=>n.toImg());Z.toSvg=(t,e)=>Z(t,e).then(n=>n.toSvg());Z.toCanvas=(t,e)=>Z(t,e).then(n=>n.toCanvas());Z.toBlob=(t,e)=>Z(t,e).then(n=>n.toBlob());Z.toPng=(t,e)=>Z(t,{...e,format:"png"}).then(n=>n.toPng());Z.toJpg=(t,e)=>Z(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Z.toWebp=(t,e)=>Z(t,{...e,format:"webp"}).then(n=>n.toWebp());Z.download=(t,e)=>Z(t,e).then(n=>n.download());export{Ct as DEFAULT_STAGE,Qe as STAGES,dl as assertNeeds,Rp as clearPlugins,ni as getGlobalPlugins,en as normalizePlugin,ei as registerPlugins,Z as snapdom}; From 8eda114db1fe24e6c2d56f89745f82fd3f01b423 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 29 Oct 2026 09:22:04 +0800 Subject: [PATCH 2/2] chore: bump version 11.0.0-rc.3.2 --- .../BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj b/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj index ac4aa99f..6a7c5ff9 100644 --- a/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj +++ b/src/components/BootstrapBlazor.Dom2Image/BootstrapBlazor.Dom2Image.csproj @@ -1,7 +1,7 @@ - 11.0.0-rc.3.1 + 11.0.0-rc.3.2