@zumer/snapdom 2.0.0-dev.3 → 2.0.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -9
- package/dist/modules/chunks/chunk-23Q2XEDO.js +7 -0
- package/dist/modules/chunks/chunk-2FBS3OGP.js +7 -0
- package/dist/modules/chunks/chunk-43NWAKSV.js +7 -0
- package/dist/modules/chunks/chunk-5EIHY65Z.js +7 -0
- package/dist/modules/chunks/chunk-6FO4Y3OG.js +10 -0
- package/dist/modules/chunks/chunk-AOOOETXS.js +7 -0
- package/dist/modules/chunks/chunk-DV3SVS7E.js +10 -0
- package/dist/modules/chunks/chunk-FPOOW4FJ.js +7 -0
- package/dist/modules/chunks/chunk-FQFF5KMG.js +7 -0
- package/dist/modules/chunks/chunk-GU6SHZKJ.js +7 -0
- package/dist/modules/chunks/chunk-JUQT3OWD.js +7 -0
- package/dist/modules/chunks/chunk-LO3HOQZX.js +8 -0
- package/dist/modules/chunks/chunk-MI3WCG7V.js +8 -0
- package/dist/modules/chunks/chunk-R6NINER4.js +7 -0
- package/dist/modules/chunks/chunk-TWGUMDQG.js +10 -0
- package/dist/modules/chunks/chunk-UI252PBJ.js +7 -0
- package/dist/modules/chunks/chunk-XUQSCYHL.js +10 -0
- package/dist/modules/chunks/chunk-ZHRUQIHZ.js +7 -0
- package/dist/modules/chunks/rasterize-NVVIIRN2.js +7 -0
- package/dist/modules/chunks/rasterize-XGEI2GKT.js +7 -0
- package/dist/modules/exporters/download.js +7 -0
- package/dist/modules/exporters/toBlob.js +7 -0
- package/dist/modules/exporters/toCanvas.js +7 -0
- package/dist/modules/exporters/toImg.js +7 -0
- package/dist/modules/exporters/toJpg.js +7 -0
- package/dist/modules/exporters/toPng.js +7 -0
- package/dist/modules/exporters/toSvg.js +7 -0
- package/dist/modules/exporters/toWebp.js +7 -0
- package/dist/modules/plugins.js +7 -0
- package/dist/modules/preCache.js +7 -0
- package/dist/modules/snapdom.js +7 -0
- package/dist/snapdom.js +13 -5187
- package/dist/snapdom.mjs +1569 -1328
- package/package.json +29 -24
- package/dist/snapdom.min.js +0 -8
- package/dist/snapdom.min.mjs +0 -8
package/package.json
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zumer/snapdom",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.4",
|
|
4
4
|
"description": "snapDOM captures HTML elements to images with exceptional speed and accuracy.",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/snapdom.js",
|
|
7
|
+
"module": "./dist/modules/snapdom.js",
|
|
8
|
+
"types": "./types/snapdom.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./types/snapdom.d.ts",
|
|
13
|
+
"import": "./dist/modules/snapdom.js",
|
|
14
|
+
"require": "./dist/snapdom.js",
|
|
15
|
+
"default": "./dist/snapdom.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./preCache": {
|
|
18
|
+
"import": "./dist/modules/preCache.js"
|
|
19
|
+
},
|
|
20
|
+
"./plugins": {
|
|
21
|
+
"import": "./dist/modules/plugins.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/",
|
|
26
|
+
"types/snapdom.d.ts",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
7
29
|
"scripts": {
|
|
30
|
+
"compile": "node esbuild.config.mjs",
|
|
8
31
|
"lint": "eslint src __tests__ --ext .js",
|
|
9
32
|
"lint:fix": "eslint src __tests__ --ext .js --fix",
|
|
10
33
|
"test": "npm run lint:fix && npx vitest run --browser.headless --reporter=verbose",
|
|
11
34
|
"test:benchmark": "npx vitest bench --browser.headless --watch=false",
|
|
12
|
-
"compile-browser": "npx @zumerbox/build -n snapdom -j src/index.browser.js -t es2015",
|
|
13
|
-
"compile-esm": "npx @zumerbox/build -n snapdom -j src/index.js -p neutral -x",
|
|
14
|
-
"compile": "npm run compile-browser && npm run compile-esm",
|
|
15
|
-
"build": "npm run compile && npm pack",
|
|
16
35
|
"bump:dry": "npx @zumerbox/bump -d",
|
|
17
36
|
"bump": "npx @zumerbox/bump && npx @zumerbox/changelog",
|
|
37
|
+
"build": "npm run compile && npm pack",
|
|
18
38
|
"prebuild": "git add CHANGELOG.md && git commit -m \"Bumped version\" && git push --follow-tags"
|
|
19
39
|
},
|
|
20
40
|
"repository": {
|
|
21
41
|
"type": "git",
|
|
22
42
|
"url": "git+https://github.com/zumerlab/snapdom.git"
|
|
23
43
|
},
|
|
24
|
-
"types": "types/snapdom.d.ts",
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./types/snapdom.d.ts",
|
|
28
|
-
"import": "./dist/snapdom.mjs",
|
|
29
|
-
"require": "./dist/snapdom.js"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"files": [
|
|
33
|
-
"dist/snapdom.js",
|
|
34
|
-
"dist/snapdom.min.js",
|
|
35
|
-
"dist/snapdom.min.mjs",
|
|
36
|
-
"dist/snapdom.mjs",
|
|
37
|
-
"types/snapdom.d.ts",
|
|
38
|
-
"README.md"
|
|
39
|
-
],
|
|
40
44
|
"keywords": [
|
|
41
45
|
"zumerlab",
|
|
42
46
|
"snapDOM",
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
"@vitest/coverage-v8": "^3.1.2",
|
|
73
77
|
"eslint": "^9.36.0",
|
|
74
78
|
"globals": "^16.4.0",
|
|
75
|
-
"playwright": "^1.52.0"
|
|
79
|
+
"playwright": "^1.52.0",
|
|
80
|
+
"esbuild": "^0.24.0"
|
|
76
81
|
}
|
|
77
82
|
}
|
package/dist/snapdom.min.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
(()=>{var Zn=Object.defineProperty,tr=Object.defineProperties;var er=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable;var ee=Math.pow,Ee=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e)=>{for(var n in e||(e={}))nr.call(e,n)&&Ee(t,n,e[n]);if(ve)for(var n of ve(e))rr.call(e,n)&&Ee(t,n,e[n]);return t},O=(t,e)=>tr(t,er(e));var k=(t,e,n)=>new Promise((r,s)=>{var o=c=>{try{u(n.next(c))}catch(l){s(l)}},i=c=>{try{u(n.throw(c))}catch(l){s(l)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,i);u((n=n.apply(t,e)).next())});var x={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function Ot(t="soft"){switch(x.session.__counterEpoch=(x.session.__counterEpoch||0)+1,t){case"auto":{x.session.styleMap=new Map,x.session.nodeMap=new Map;return}case"soft":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap,x.computedStyle=new WeakMap,x.baseStyle=new Map,x.defaultStyle=new Map,x.image=new Map,x.background=new Map,x.resource=new Map,x.font=new Set;return}default:{x.session.styleMap=new Map,x.session.nodeMap=new Map,x.session.styleCache=new WeakMap;return}}}function ht(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function ne(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let s=r.split(",").map(o=>o.trim());return s.length!==6?`matrix(${r})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let s=r.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${r})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function dt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch(e){return t}}function or(t="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,s=0;function o(i,u,c){if(s>=n)return;let l=Date.now();(r.get(u)||0)>l||(r.set(u,l+e),s++,i==="warn"&&console&&console.warn?console.warn(`${t} ${c}`):console&&console.error&&console.error(`${t} ${c}`))}return{warnOnce(i,u){o("warn",i,u)},errorOnce(i,u){o("error",i,u)},reset(){r.clear(),s=0}}}var Fe=or("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),re=new Map,Ut=new Map;function sr(t){return/^data:|^blob:|^about:blank$/i.test(t)}function ir(t,e){try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",r=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(r||".",n),o=new URL(t,n);if(o.origin===s.origin)return!0;let i=o.searchParams;if(i&&(i.has("url")||i.has("target")))return!0}catch(n){}return!1}function ar(t,e){if(!e||sr(t)||ir(t,e))return!1;try{let n=typeof location!="undefined"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location!="undefined"?r.origin!==location.origin:!0}catch(n){return!!e}}function cr(t,e){if(!e)return t;if(e.includes("{url}"))return e.replace("{urlRaw}",dt(t)).replace("{url}",encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${dt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function $e(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function lr(t,e){var n,r;return[e.as||"blob",(n=e.timeout)!=null?n:3e3,e.useProxy||"",(r=e.errorTTL)!=null?r:8e3,t].join("|")}function Y(n){return k(this,arguments,function*(t,e={}){var y,w,C;let r=(y=e.as)!=null?y:"blob",s=(w=e.timeout)!=null?w:3e3,o=e.useProxy||"",i=(C=e.errorTTL)!=null?C:8e3,u=e.headers||{},c=!!e.silent;if(/^data:/i.test(t))try{if(r==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(r==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,S="",v=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],E=/;base64/i.test(S)?atob(v):decodeURIComponent(v),A=new Uint8Array([...E].map(R=>R.charCodeAt(0))),N=new Blob([A],{type:(S||"").split(";")[0]||""});return{ok:!0,data:N,status:200,url:t,fromCache:!1,mime:N.type||""}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let S=yield fetch(t);if(!S.ok)return{ok:!1,data:null,status:S.status,url:t,fromCache:!1,reason:"http_error"};let v=yield S.blob(),b=v.type||S.headers.get("content-type")||"";return r==="dataURL"?{ok:!0,data:yield $e(v),status:S.status,url:t,fromCache:!1,mime:b}:r==="text"?{ok:!0,data:yield v.text(),status:S.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:v,status:S.status,url:t,fromCache:!1,mime:b}}catch(S){return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return r==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:r==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l=lr(t,{as:r,timeout:s,useProxy:o,errorTTL:i}),d=Ut.get(l);if(d&&d.until>Date.now())return O(F({},d.result),{fromCache:!0});d&&Ut.delete(l);let f=re.get(l);if(f)return f;let h=ar(t,o)?cr(t,o):t,g=e.credentials;if(!g)try{let S=typeof location!="undefined"&&location.href?location.href:"http://localhost/",v=new URL(t,S);g=typeof location!="undefined"&&v.origin===location.origin?"include":"omit"}catch(S){g="omit"}let m=new AbortController,a=setTimeout(()=>m.abort("timeout"),s),p=k(null,null,function*(){var S,v;try{let b=yield fetch(h,{signal:m.signal,credentials:g,headers:u});if(!b.ok){let N={ok:!1,data:null,status:b.status,url:h,fromCache:!1,reason:"http_error"};if(i>0&&Ut.set(l,{until:Date.now()+i,result:N}),!c){let R=`${b.status} ${b.statusText||""}`.trim();Fe.warnOnce(`http:${b.status}:${r}:${new URL(t,(S=location==null?void 0:location.href)!=null?S:"http://localhost/").origin}`,`HTTP error ${R} while fetching ${r} ${t}`)}return e.onError&&e.onError(N),N}if(r==="text")return{ok:!0,data:yield b.text(),status:b.status,url:h,fromCache:!1};let E=yield b.blob(),A=E.type||b.headers.get("content-type")||"";return r==="dataURL"?{ok:!0,data:yield $e(E),status:b.status,url:h,fromCache:!1,mime:A}:{ok:!0,data:E,status:b.status,url:h,fromCache:!1,mime:A}}catch(b){let E=b&&typeof b=="object"&&"name"in b&&b.name==="AbortError"?String(b.message||"").includes("timeout")?"timeout":"abort":"network",A={ok:!1,data:null,status:0,url:h,fromCache:!1,reason:E};if(!/^blob:/i.test(t)&&i>0&&Ut.set(l,{until:Date.now()+i,result:A}),!c){let N=`${E}:${r}:${new URL(t,(v=location==null?void 0:location.href)!=null?v:"http://localhost/").origin}`,R=E==="timeout"?`Timeout after ${s}ms. Consider increasing timeout or using a proxy for ${t}`:E==="abort"?`Request aborted while fetching ${r} ${t}`:`Network/CORS issue while fetching ${r} ${t}. A proxy may be required`;Fe.errorOnce(N,R)}return e.onError&&e.onError(A),A}finally{clearTimeout(a),re.delete(l)}});return re.set(l,p),p})}function gt(n){return k(this,arguments,function*(t,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let s=ht(t);if(!s)return t;let o=dt(s);if(x.background.has(o)){let i=x.background.get(o);return i?`url("${i}")`:"none"}try{let i=yield Y(o,{as:"dataURL",useProxy:e.useProxy});return i.ok?(x.background.set(o,i.data),`url("${i.data}")`):(x.background.set(o,null),"none")}catch(i){return x.background.set(o,null),"none"}})}var Bt=new Set(["meta","script","noscript","title","link","template"]),xt=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),ur=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function oe(){for(let t of ur){let e=String(t).toLowerCase();Bt.has(e)||xt.has(e)||se(e)}}function se(t){if(t=String(t).toLowerCase(),xt.has(t)){let o={};return x.defaultStyle.set(t,o),o}if(x.defaultStyle.has(t))return x.defaultStyle.get(t);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),s={};for(let o of r){if(Ie(o))continue;let i=r.getPropertyValue(o);s[o]=i}return e.removeChild(n),x.defaultStyle.set(t,s),s}var fr=/(?:^|-)(animation|transition)(?:-|$)/i,dr=/^(--|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,mr=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"]);function Ie(t){let e=String(t).toLowerCase();return!!(mr.has(e)||dr.test(e)||fr.test(e))}function St(t,e){if(e=String(e||"").toLowerCase(),xt.has(e))return"";let n=[],r=se(e);for(let[s,o]of Object.entries(t)){if(Ie(s))continue;let i=r[s];o&&o!==i&&n.push(`${s}:${o}`)}return n.sort(),n.join(";")}function ie(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 ae(t){let e=new Map;for(let r of t){let s=x.defaultStyle.get(r);if(!s)continue;let o=Object.entries(s).map(([i,u])=>`${i}:${u};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(r))}let n="";for(let[r,s]of e.entries())n+=`${s.join(",")} { ${r} }
|
|
2
|
-
`;return n}function ce(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let s of e)n.set(s,`c${r++}`);return n}function yt(t,e=null){if(!(t instanceof Element))return window.getComputedStyle(t,e);let n=x.computedStyle.get(t);if(n||(n=new Map,x.computedStyle.set(t,n)),!n.has(e)){let r=window.getComputedStyle(t,e);n.set(e,r)}return n.get(e)}function Dt(t){let e={};for(let n of t)e[n]=t.getPropertyValue(n);return e}function Ft(t){let e=[],n=0,r=0;for(let s=0;s<t.length;s++){let o=t[s];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,s).trim()),r=s+1)}return e.push(t.slice(r).trim()),e}function ct(t,{fast:e=!1}={}){if(e)return t();"requestIdleCallback"in window?requestIdleCallback(t,{timeout:50}):setTimeout(t,1)}function G(){if(typeof navigator=="undefined")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),s=/mobile/i.test(t),o=!/safari/i.test(t),i=r&&s&&o,u=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),c=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),l=/ipad|iphone|ipod/.test(e)&&r;return n||i||u||c||l}var Le=new WeakMap,le=new Map,ue=0;function $t(){ue++}var Re=!1;function pr(t=document.documentElement){var e,n;if(!Re){Re=!0;try{new MutationObserver(()=>$t()).observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch(r){}try{new MutationObserver(()=>$t()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch(r){}try{let r=document.fonts;r&&((e=r.addEventListener)==null||e.call(r,"loadingdone",$t),(n=r.ready)==null||n.then(()=>$t()).catch(()=>{}))}catch(r){}}}function hr(t,e={}){let n={},r=t.getPropertyValue("visibility");for(let o=0;o<t.length;o++){let i=t[o],u=t.getPropertyValue(i);(i==="background-image"||i==="content")&&u.includes("url(")&&!u.includes("data:")&&(u="none"),n[i]=u}let s=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let o of s)if(!n[o])try{let i=t.getPropertyValue(o);i&&(n[o]=i)}catch(i){}if(e.embedFonts){let o=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let i of o)if(!n[i])try{let u=t.getPropertyValue(i);u&&(n[i]=u)}catch(u){}}return r==="hidden"&&(n.opacity="0"),n}var Ne=new WeakMap;function gr(t){let e=Ne.get(t);return e||(e=Object.entries(t).sort((r,s)=>r[0]<s[0]?-1:r[0]>s[0]?1:0).map(([r,s])=>`${r}:${s}`).join(";"),Ne.set(t,e),e)}function yr(t,e=null,n={}){let r=Le.get(t);if(r&&r.epoch===ue)return r.snapshot;let s=e||getComputedStyle(t),o=hr(s,n);return kr(t,s,o),Le.set(t,{epoch:ue,snapshot:o}),o}function br(t,e){return t&&t.session&&t.persist?t:t&&(t.styleMap||t.styleCache||t.nodeMap)?{session:t,persist:{snapshotKeyCache:le,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:e||{}}:{session:x.session,persist:{snapshotKeyCache:le,defaultStyle:x.defaultStyle,baseStyle:x.baseStyle,image:x.image,resource:x.resource,background:x.background,font:x.font},options:t||e||{}}}function mt(t,e,n,r){return k(this,null,function*(){var h,g,m;if(t.tagName==="STYLE")return;let s=br(n,r),o=s.options&&s.options.cache||"auto";if(o!=="disabled"&&pr(document.documentElement),o==="disabled"&&!s.session.__bumpedForDisabled&&($t(),le.clear(),s.session.__bumpedForDisabled=!0),xt.has((h=t.tagName)==null?void 0:h.toLowerCase())){let a=(g=t.getAttribute)==null?void 0:g.call(t,"style");a&&e.setAttribute("style",a)}let{session:i,persist:u}=s;i.styleCache.has(t)||i.styleCache.set(t,getComputedStyle(t));let c=i.styleCache.get(t),l=yr(t,c,s.options),d=gr(l),f=u.snapshotKeyCache.get(d);if(!f){let a=((m=t.tagName)==null?void 0:m.toLowerCase())||"div";f=St(l,a),u.snapshotKeyCache.set(d,f)}i.styleMap.set(e,f)})}function wr(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function xr(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}function Sr(t){let e=t.parentElement;if(!e)return!1;let n=getComputedStyle(e).display||"";return n.includes("flex")||n.includes("grid")}function Cr(t,e){if(t.textContent&&/\S/.test(t.textContent))return!0;let n=t.firstElementChild,r=t.lastElementChild;if(n&&n.tagName==="BR"||r&&r.tagName==="BR")return!0;let s=t.scrollHeight;if(s===0)return!1;let o=parseFloat(e.paddingTop)||0,i=parseFloat(e.paddingBottom)||0;return s>o+i}function kr(t,e,n){if(t instanceof HTMLElement&&t.style&&t.style.height)return;let r=e.display||"";if(r.includes("flex")||r.includes("grid")||wr(t))return;let s=e.position;s==="absolute"||s==="fixed"||s==="sticky"||e.transform==="none"&&(xr(e)||Sr(t)||Cr(t,e)&&(delete n.height,delete n["block-size"]))}var Pe=["fill","stroke","color","background-color","stop-color"],Te=new Map;function Ar(t,e){let n=e+"::"+t.toLowerCase(),r=Te.get(n);if(r)return r;let s=document,o=e==="http://www.w3.org/2000/svg"?s.createElementNS(e,t):s.createElement(t),i=s.createElement("div");i.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",i.appendChild(o),s.documentElement.appendChild(i);let u=getComputedStyle(o),c={};for(let l of Pe)c[l]=u.getPropertyValue(l)||"";return i.remove(),Te.set(n,c),c}function _e(t,e){var o,i,u;if(!(t instanceof Element)||!(e instanceof Element))return;let n=(o=t.getAttribute)==null?void 0:o.call(t,"style"),r=!!(n&&n.includes("var("));if(!r&&((i=t.attributes)!=null&&i.length)){let c=t.attributes;for(let l=0;l<c.length;l++){let d=c[l];if(d&&typeof d.value=="string"&&d.value.includes("var(")){r=!0;break}}}let s=null;if(r)try{s=getComputedStyle(t)}catch(c){}if(r){let c=t.style;if(c&&c.length)for(let l=0;l<c.length;l++){let d=c[l],f=c.getPropertyValue(d);if(!f||!f.includes("var("))continue;let h=s&&s.getPropertyValue(d);if(h)try{e.style.setProperty(d,h.trim(),c.getPropertyPriority(d))}catch(g){}}}if(r&&((u=t.attributes)!=null&&u.length)){let c=t.attributes;for(let l=0;l<c.length;l++){let d=c[l];if(!d||typeof d.value!="string"||!d.value.includes("var("))continue;let f=d.name,h=s&&s.getPropertyValue(f);if(h)try{e.style.setProperty(f,h.trim())}catch(g){}}}if(!r){if(!s)try{s=getComputedStyle(t)}catch(d){s=null}if(!s)return;let c=t.namespaceURI||"html",l=Ar(t.tagName,c);for(let d of Pe){let f=s.getPropertyValue(d)||"",h=l[d]||"";if(f&&f!==h)try{e.style.setProperty(d,f.trim())}catch(g){}}}}function qt(t,e,n){return Promise.all(t.map(r=>new Promise(s=>{function o(){ct(i=>{(i&&typeof i.timeRemaining=="function"?i.timeRemaining()>0:!0)?e(r,s):o()},{fast:n})}o()})))}function Mr(t){return t=t.trim(),!t||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(t)?t:`${t}:not([data-sd-slotted])`}function vr(t,e,n=!0){return t.split(",").map(r=>r.trim()).filter(Boolean).map(r=>{if(r.startsWith(":where(")||r.startsWith("@"))return r;let s=n?Mr(r):r;return`:where(${e} ${s})`}).join(", ")}function Oe(t,e){return t?(t=t.replace(/:host\(([^)]+)\)/g,(n,r)=>`:where(${e}:is(${r.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/:host-context\(([^)]+)\)/g,(n,r)=>`:where(:where(${r.trim()}) ${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(n,r)=>`:where(${e} ${r.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(n,r,s,o)=>{let i=vr(o,e,!0);return`${r}${s}${i}{`}),t):""}function Ue(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function Be(t){let e="";try{t.querySelectorAll("style").forEach(r=>{e+=(r.textContent||"")+`
|
|
3
|
-
`});let n=t.adoptedStyleSheets||[];for(let r of n)try{if(r&&r.cssRules)for(let s of r.cssRules)e+=s.cssText+`
|
|
4
|
-
`}catch(s){}}catch(n){}return e}function De(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function He(t,e){try{let n=t.currentSrc||t.src||"";if(!n)return;e.setAttribute("src",n),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch(n){}}function qe(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function Er(t,e){try{let r=getComputedStyle(t).getPropertyValue(e).trim();if(r)return r}catch(n){}try{let r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(r)return r}catch(n){}return""}function ze(t,e,n){let r=[];for(let s of e){let o=Er(t,s);o&&r.push(`${s}: ${o};`)}return r.length?`${n}{${r.join("")}}
|
|
5
|
-
`:""}function je(t){t&&(t.nodeType===Node.ELEMENT_NODE&&t.setAttribute("data-sd-slotted",""),t.querySelectorAll&&t.querySelectorAll("*").forEach(e=>e.setAttribute("data-sd-slotted","")))}function Fr(t,e=3){return k(this,null,function*(){let n=()=>{var o;try{return t.contentDocument||((o=t.contentWindow)==null?void 0:o.document)||null}catch(i){return null}},r=n(),s=0;for(;s<e&&(!r||!r.body&&!r.documentElement);)yield new Promise(o=>setTimeout(o,0)),r=n(),s++;return r&&(r.body||r.documentElement)?r:null})}function $r(t){let e=t.getBoundingClientRect(),n=0,r=0,s=0,o=0;try{let c=getComputedStyle(t);n=parseFloat(c.borderLeftWidth)||0,r=parseFloat(c.borderRightWidth)||0,s=parseFloat(c.borderTopWidth)||0,o=parseFloat(c.borderBottomWidth)||0}catch(c){}let i=Math.max(0,Math.round(e.width-(n+r))),u=Math.max(0,Math.round(e.height-(s+o)));return{contentWidth:i,contentHeight:u,rect:e}}function Ir(t,e,n){let r=t.createElement("style");return r.setAttribute("data-sd-iframe-pin",""),r.textContent=`html, body {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;}`,(t.head||t.documentElement).appendChild(r),()=>{try{r.remove()}catch(s){}}}function Ve(t,e,n){return k(this,null,function*(){let r=yield Fr(t,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:s,contentHeight:o,rect:i}=$r(t),u=n==null?void 0:n.snap;if(!u||typeof u.toPng!="function")throw new Error("snapdom.toPng not available in iframe or window");let c=O(F({},n),{scale:1}),l=Ir(r,s,o),d;try{d=yield u.toPng(r.documentElement,c)}finally{l()}d.style.display="block",d.style.width=`${s}px`,d.style.height=`${o}px`;let f=document.createElement("div");return e.nodeMap.set(f,t),mt(t,f,e,n),f.style.overflow="hidden",f.style.display="block",f.style.width||(f.style.width=`${Math.round(i.width)}px`),f.style.height||(f.style.height=`${Math.round(i.height)}px`),f.appendChild(d),f})}var It=new Map;function Lt(t){return k(this,null,function*(){var n;if((n=x.resource)!=null&&n.has(t))return x.resource.get(t);if(It.has(t))return It.get(t);let e=k(null,null,function*(){var s;let r=yield Y(t,{as:"dataURL",silent:!0});if(!r.ok||typeof r.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${t}`);return(s=x.resource)==null||s.set(t,r.data),r.data});It.set(t,e);try{let r=yield e;return It.set(t,r),r}catch(r){throw It.delete(t),r}})}var Lr=/\bblob:[^)"'\s]+/g;function We(t){return k(this,null,function*(){if(!t||t.indexOf("blob:")===-1)return t;let e=Array.from(new Set(t.match(Lr)||[]));if(e.length===0)return t;let n=t;for(let r of e)try{let s=yield Lt(r);n=n.split(r).join(s)}catch(s){}return n})}function Ht(t){return typeof t=="string"&&t.startsWith("blob:")}function Rr(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 Nr(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function Xe(t){return k(this,null,function*(){var i,u;if(!t)return;let e=t.querySelectorAll?t.querySelectorAll("img"):[];for(let c of e)try{let d=c.getAttribute("src")||c.currentSrc||"";if(Ht(d)){let h=yield Lt(d);c.setAttribute("src",h)}let f=c.getAttribute("srcset");if(f&&f.includes("blob:")){let h=Rr(f),g=!1;for(let m of h)if(Ht(m.url))try{m.url=yield Lt(m.url),g=!0}catch(a){}g&&c.setAttribute("srcset",Nr(h))}}catch(l){}let n=t.querySelectorAll?t.querySelectorAll("image"):[];for(let c of n)try{let l="http://www.w3.org/1999/xlink",d=c.getAttribute("href")||((i=c.getAttributeNS)==null?void 0:i.call(c,l,"href"));if(Ht(d)){let f=yield Lt(d);c.setAttribute("href",f),(u=c.removeAttributeNS)==null||u.call(c,l,"href")}}catch(l){}let r=t.querySelectorAll?t.querySelectorAll("[style*='blob:']"):[];for(let c of r)try{let l=c.getAttribute("style");if(l&&l.includes("blob:")){let d=yield We(l);c.setAttribute("style",d)}}catch(l){}let s=t.querySelectorAll?t.querySelectorAll("style"):[];for(let c of s)try{let l=c.textContent||"";l.includes("blob:")&&(c.textContent=yield We(l))}catch(l){}let o=["poster"];for(let c of o){let l=t.querySelectorAll?t.querySelectorAll(`[${c}^='blob:']`):[];for(let d of l)try{let f=d.getAttribute(c);Ht(f)&&d.setAttribute(c,yield Lt(f))}catch(f){}}})}function Rt(t,e,n){return k(this,null,function*(){var l,d,f,h,g,m;if(!t)throw new Error("Invalid node");let r=new Set,s=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let a=(t.localName||t.tagName||"").toLowerCase();if(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox")||Bt.has(a))return null}if(t.nodeType===Node.TEXT_NODE||t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide"){let a=document.createElement("div"),p=t.getBoundingClientRect();return a.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,a}else if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let a of n.exclude)try{if((l=t.matches)!=null&&l.call(t,a)){if(n.excludeMode==="hide"){let p=document.createElement("div"),y=t.getBoundingClientRect();return p.style.cssText=`display:inline-block;width:${y.width}px;height:${y.height}px;visibility:hidden;`,p}else if(n.excludeMode==="remove")return null}}catch(p){console.warn(`Invalid selector in exclude option: ${a}`,p)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide"){let a=document.createElement("div"),p=t.getBoundingClientRect();return a.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,a}else if(n.filterMode==="remove")return null}}catch(a){console.warn("Error in filter function:",a)}if(t.tagName==="IFRAME"){let a=!1;try{a=!!(t.contentDocument||(d=t.contentWindow)!=null&&d.document)}catch(p){a=!1}if(a)try{return yield Ve(t,e,n)}catch(p){console.warn("[SnapDOM] iframe rasterization failed, fallback:",p)}if(n.placeholders){let p=document.createElement("div");return p.style.cssText=`width:${t.offsetWidth}px;height:${t.offsetHeight}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,mt(t,p,e,n),p}else{let p=t.getBoundingClientRect(),y=document.createElement("div");return y.style.cssText=`display:inline-block;width:${p.width}px;height:${p.height}px;visibility:hidden;`,mt(t,y,e,n),y}}if(t.getAttribute("data-capture")==="placeholder"){let a=t.cloneNode(!1);e.nodeMap.set(a,t),mt(t,a,e,n);let p=document.createElement("div");return p.textContent=t.getAttribute("data-placeholder-text")||"",p.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",a.appendChild(p),a}if(t.tagName==="CANVAS"){let a="";try{let y=t.getContext("2d",{willReadFrequently:!0});try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),a=t.toDataURL("image/png"),!a||a==="data:,"){try{y&&y.getImageData(0,0,1,1)}catch(w){}if(yield new Promise(w=>requestAnimationFrame(w)),a=t.toDataURL("image/png"),!a||a==="data:,"){let w=document.createElement("canvas");w.width=t.width,w.height=t.height;let C=w.getContext("2d");C&&(C.drawImage(t,0,0),a=w.toDataURL("image/png"))}}}catch(y){}let p=document.createElement("img");try{p.decoding="sync",p.loading="eager"}catch(y){}a&&(p.src=a),p.width=t.width,p.height=t.height;try{let y=getComputedStyle(t);y.width&&(p.style.width=y.width),y.height&&(p.style.height=y.height)}catch(y){}return e.nodeMap.set(p,t),mt(t,p,e,n),p}let i;try{if(i=t.cloneNode(!1),_e(t,i),e.nodeMap.set(i,t),t.tagName==="IMG"){He(t,i);try{let a=t.getBoundingClientRect(),p=Math.round(a.width||0),y=Math.round(a.height||0);if(!p||!y){let w=window.getComputedStyle(t),C=parseFloat(w.width)||0,S=parseFloat(w.height)||0,v=parseInt(t.getAttribute("width")||"",10)||0,b=parseInt(t.getAttribute("height")||"",10)||0,E=t.width||t.naturalWidth||0,A=t.height||t.naturalHeight||0;p=Math.round(p||C||v||E||0),y=Math.round(y||S||b||A||0)}p&&(i.dataset.snapdomWidth=String(p)),y&&(i.dataset.snapdomHeight=String(y))}catch(a){}}}catch(a){throw console.error("[Snapdom] Failed to clone node:",t,a),a}if(t instanceof HTMLTextAreaElement){let a=t.getBoundingClientRect();i.style.width=`${a.width}px`,i.style.height=`${a.height}px`}if(t instanceof HTMLInputElement&&(i.value=t.value,i.setAttribute("value",t.value),t.checked!==void 0&&(i.checked=t.checked,t.checked&&i.setAttribute("checked",""),t.indeterminate&&(i.indeterminate=t.indeterminate))),t instanceof HTMLSelectElement&&(s=t.value),t instanceof HTMLTextAreaElement&&(o=t.value),mt(t,i,e,n),t.shadowRoot){let b=function(A,N){if(A.nodeType===Node.ELEMENT_NODE&&A.tagName==="STYLE")return N(null);Rt(A,e,n).then(R=>{N(R||null)}).catch(()=>{N(null)})};try{let A=t.shadowRoot.querySelectorAll("slot");for(let N of A){let R=[];try{R=((f=N.assignedNodes)==null?void 0:f.call(N,{flatten:!0}))||((h=N.assignedNodes)==null?void 0:h.call(N))||[]}catch(U){R=((g=N.assignedNodes)==null?void 0:g.call(N))||[]}for(let U of R)r.add(U)}}catch(A){}let a=Ue(e),p=`[data-sd="${a}"]`;try{i.setAttribute("data-sd",a)}catch(A){}let y=Be(t.shadowRoot),w=Oe(y,p),C=qe(y),S=ze(t,C,p);De(i,S+w,a);let v=document.createDocumentFragment(),E=yield qt(Array.from(t.shadowRoot.childNodes),b,n.fast);v.append(...E.filter(A=>!!A)),i.appendChild(v)}if(t.tagName==="SLOT"){let w=function(S,v){Rt(S,e,n).then(b=>{b&&je(b),v(b||null)}).catch(()=>{v(null)})},a=((m=t.assignedNodes)==null?void 0:m.call(t,{flatten:!0}))||[],p=a.length>0?a:Array.from(t.childNodes),y=document.createDocumentFragment(),C=yield qt(Array.from(p),w,n.fast);return y.append(...C.filter(S=>!!S)),y}function u(a,p){if(r.has(a))return p(null);Rt(a,e,n).then(y=>{p(y||null)}).catch(()=>{p(null)})}let c=yield qt(Array.from(t.childNodes),u,n.fast);if(i.append(...c.filter(a=>!!a)),s!==null&&i instanceof HTMLSelectElement){i.value=s;for(let a of i.options)a.value===s?a.setAttribute("selected",""):a.removeAttribute("selected")}return o!==null&&i instanceof HTMLTextAreaElement&&(i.textContent=o),i})}var Tr=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Ct=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window!="undefined"&&window.__SNAPDOM_ICON_FONTS__||{}),fe=[];function Ke(t){let e=Array.isArray(t)?t:[t];for(let n of e)n instanceof RegExp?fe.push(n):typeof n=="string"?fe.push(new RegExp(n,"i")):console.warn("[snapdom] Ignored invalid iconFont value:",n)}function tt(t){let e=typeof t=="string"?t:"",n=[...Tr,...fe];for(let r of n)if(r instanceof RegExp&&r.test(e))return!0;return!!(/icon/i.test(e)||/glyph/i.test(e)||/symbols/i.test(e)||/feather/i.test(e)||/fontawesome/i.test(e))}function Pr(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Ye=new Map;function _r(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,s;for(;s=r.exec(n);)e[s[1].toUpperCase()]=Number(s[2]);return e}function Wr(t,e,n){return k(this,null,function*(){var h;let r=String(t||""),s=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(s)&&!/\bsymbols\b/.test(s))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(s))return{familyForMeasure:r,familyForCanvas:r};let u=n&&((h=n.FILL)!=null?h:n.fill),c="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?c="rounded":/\bsharp\b/.test(o)?c="sharp":/\boutlined\b/.test(o)&&(c="outlined");let l=u===1,d=null;if(l&&(c==="outlined"&&Ct.materialIconsFilled?d={url:Ct.materialIconsFilled,alias:"snapdom-mi-filled"}:c==="rounded"&&Ct.materialIconsRound?d={url:Ct.materialIconsRound,alias:"snapdom-mi-round"}:c==="sharp"&&Ct.materialIconsSharp&&(d={url:Ct.materialIconsSharp,alias:"snapdom-mi-sharp"})),!d)return{familyForMeasure:r,familyForCanvas:r};if(!Ye.has(d.alias))try{let g=new FontFace(d.alias,`url(${d.url})`,{style:"normal",weight:"400"});document.fonts.add(g),yield g.load(),Ye.set(d.alias,!0)}catch(g){return{familyForMeasure:r,familyForCanvas:r}}let f=`"${d.alias}"`;return{familyForMeasure:f,familyForCanvas:f}})}function Or(t="Material Icons",e=24){return k(this,null,function*(){try{yield Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch(n){}})}function Ur(t){var s,o;let e=((s=t.getPropertyValue("-webkit-text-fill-color"))==null?void 0:s.trim())||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let r=(o=t.color)==null?void 0:o.trim();return r&&r!=="inherit"?r:"#000"}function Br(u){return k(this,arguments,function*(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:s="#000",variation:o="",className:i=""}={}){let c=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,d=_r(o),{familyForMeasure:f,familyForCanvas:h}=yield Wr(c,i,d);yield Or(h.replace(/^["']+|["']+$/g,""),r);let g=document.createElement("span");g.textContent=t,g.style.position="absolute",g.style.visibility="hidden",g.style.left="-99999px",g.style.whiteSpace="nowrap",g.style.fontFamily=f,g.style.fontWeight=String(n||"normal"),g.style.fontSize=`${r}px`,g.style.lineHeight="1",g.style.margin="0",g.style.padding="0",g.style.fontFeatureSettings="'liga' 1",g.style.fontVariantLigatures="normal",g.style.color=s,document.body.appendChild(g);let m=g.getBoundingClientRect(),a=Math.max(1,Math.ceil(m.width)),p=Math.max(1,Math.ceil(m.height));document.body.removeChild(g);let y=document.createElement("canvas");y.width=a*l,y.height=p*l;let w=y.getContext("2d");w.scale(l,l),w.font=`${n?`${n} `:""}${r}px ${h}`,w.textAlign="left",w.textBaseline="top",w.fillStyle=s;try{w.fontKerning="normal"}catch(C){}return w.fillText(t,0,0),{dataUrl:y.toDataURL(),width:a,height:p}})}function Ge(t,e){return k(this,null,function*(){if(!(t instanceof Element))return 0;let n='.material-icons, [class*="material-symbols"]',r=Array.from(t.querySelectorAll(n)).filter(i=>i&&i.textContent&&i.textContent.trim());if(r.length===0)return 0;let s=e instanceof Element?Array.from(e.querySelectorAll(n)).filter(i=>i&&i.textContent&&i.textContent.trim()):[],o=0;for(let i=0;i<r.length;i++){let u=r[i],c=s[i]||null;try{let l=getComputedStyle(c||u),d=l.fontFamily||"Material Icons";if(!Pr(d))continue;let f=(c||u).textContent.trim();if(!f)continue;let h=parseInt(l.fontSize,10)||24,g=l.fontWeight&&l.fontWeight!=="normal"?l.fontWeight:"normal",m=Ur(l),a=l.fontVariationSettings&&l.fontVariationSettings!=="normal"?l.fontVariationSettings:"",p=(c||u).className||"",{dataUrl:y,width:w,height:C}=yield Br(f,{family:d,weight:g,fontSize:h,color:m,variation:a,className:p});u.textContent="";let S=u.ownerDocument.createElement("img");S.src=y,S.alt=f,S.style.height=`${h}px`,S.style.width=`${Math.max(1,Math.round(w/C*h))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(u).verticalAlign||"baseline",u.appendChild(S),o++}catch(l){}}return o})}function Ze(t,e,n,r=32,s="#000"){return k(this,null,function*(){e=e.replace(/^['"]+|['"]+$/g,"");let o=window.devicePixelRatio||1;try{yield document.fonts.ready}catch(h){}let i=document.createElement("span");i.textContent=t,i.style.position="absolute",i.style.visibility="hidden",i.style.fontFamily=`"${e}"`,i.style.fontWeight=n||"normal",i.style.fontSize=`${r}px`,i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.padding="0",i.style.margin="0",document.body.appendChild(i);let u=i.getBoundingClientRect(),c=Math.ceil(u.width),l=Math.ceil(u.height);document.body.removeChild(i);let d=document.createElement("canvas");d.width=Math.max(1,c*o),d.height=Math.max(1,l*o);let f=d.getContext("2d");return f.scale(o,o),f.font=n?`${n} ${r}px "${e}"`:`${r}px "${e}"`,f.textAlign="left",f.textBaseline="top",f.fillStyle=s,f.fillText(t,0,0),{dataUrl:d.toDataURL(),width:c,height:l}})}var Dr=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]);function Vt(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Dr.has(n.toLowerCase()))return n}return""}function zt(t){let e=String(t!=null?t:"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function de(t){let e=String(t!=null?t:"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Hr(t){let e=String(t!=null?t:"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function qr(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let s=zt(n[1]),o=zt(n[2]);return{min:Math.min(s,o),max:Math.max(s,o)}}let r=zt(e);return{min:r,max:r}}function zr(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function jr(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),i=parseFloat(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),s=r?parseFloat(r[1]):100;return{min:s,max:s}}function Vr(t,e){if(!t)return!1;try{let n=new URL(t,location.href);if(n.origin===location.origin)return!0;let s=n.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com"].some(u=>s.endsWith(u)))return!0;let i=(n.pathname+n.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i))return!0;for(let u of e){let c=u.toLowerCase().replace(/\s+/g,"+"),l=u.toLowerCase().replace(/\s+/g,"-");if(i.includes(c)||i.includes(l))return!0}return!1}catch(n){return!1}}function Xr(t){var n;let e=new Set;for(let r of t||[]){let s=(n=String(r).split("__")[0])==null?void 0:n.trim();s&&e.add(s)}return e}function Qe(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,s)=>{let o=(s||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let i=o;try{i=new URL(o,e||location.href).href}catch(u){}return`url("${i}")`})}var me=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,jt=4;function Yr(t,e,n){return k(this,null,function*(){if(!t)return t;let r=new Set;function s(u,c){try{return new URL(u,c||location.href).href}catch(l){return u}}function o(u,c,l=0){return k(this,null,function*(){if(l>jt)return console.warn(`[snapDOM] @import depth exceeded (${jt}) at ${c}`),u;let d="",f=0,h;for(;h=me.exec(u);){d+=u.slice(f,h.index),f=me.lastIndex;let g=(h[2]||h[4]||"").trim(),m=s(g,c);if(r.has(m)){console.warn(`[snapDOM] Skipping circular @import: ${m}`);continue}r.add(m);let a="";try{let p=yield Y(m,{as:"text",useProxy:n,silent:!0});p.ok&&typeof p.data=="string"&&(a=p.data)}catch(p){}a?(a=Qe(a,m),a=yield o(a,m,l+1),d+=`
|
|
6
|
-
/* inlined: ${m} */
|
|
7
|
-
${a}
|
|
8
|
-
`):d+=h[0]}return d+=u.slice(f),d})}let i=Qe(t,e||location.href);return i=yield o(i,e||location.href,0),i})}var tn=/url\((["']?)([^"')]+)\1\)/g,Kr=/@font-face[^{}]*\{[^}]*\}/g;function en(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let s=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!s)continue;let o=s[1],i=s[2],u=c=>{if(!c.includes("?"))return parseInt(c,16);let l=parseInt(c.replace(/\?/g,"0"),16),d=parseInt(c.replace(/\?/g,"F"),16);return[l,d]};if(i){let c=u(o),l=u(i),d=Array.isArray(c)?c[0]:c,f=Array.isArray(l)?l[1]:l;e.push([Math.min(d,f),Math.max(d,f)])}else{let c=u(o);Array.isArray(c)?e.push([c[0],c[1]]):e.push([c,c])}}return e}function nn(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,s]of e)if(n>=r&&n<=s)return!0;return!1}function pe(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(tn)){let s=(r[2]||"").trim();if(!(!s||s.startsWith("data:"))){if(!/^https?:/i.test(s))try{s=new URL(s,e||location.href).href}catch(o){}n.push(s)}}return n}function rn(t,e,n=""){return k(this,null,function*(){var s,o,i,u,c;let r=t;for(let l of t.matchAll(tn)){let d=ht(l[0]);if(!d)continue;let f=d;if(!f.startsWith("http")&&!f.startsWith("data:"))try{f=new URL(f,e||location.href).href}catch(h){}if(!tt(f)){if((s=x.resource)!=null&&s.has(f)){(o=x.font)==null||o.add(f),r=r.replace(l[0],`url(${x.resource.get(f)})`);continue}if(!((i=x.font)!=null&&i.has(f)))try{let h=yield Y(f,{as:"dataURL",useProxy:n,silent:!0});if(h.ok&&typeof h.data=="string"){let g=h.data;(u=x.resource)==null||u.set(f,g),(c=x.font)==null||c.add(f),r=r.replace(l[0],`url(${g})`)}}catch(h){console.warn("[snapDOM] Failed to fetch font resource:",f)}}}return r})}function Gr(t){if(!t.length)return null;let e=(u,c)=>t.some(([l,d])=>!(d<u||l>c)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),s=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":s?"greek":r?"latin-ext":n?"latin":null}function Je(t={}){let e=new Set((t.families||[]).map(s=>String(s).toLowerCase())),n=new Set((t.domains||[]).map(s=>String(s).toLowerCase())),r=new Set((t.subsets||[]).map(s=>String(s).toLowerCase()));return(s,o)=>{if(e.size&&e.has(s.family.toLowerCase()))return!0;if(n.size)for(let i of s.srcUrls)try{if(n.has(new URL(i).host.toLowerCase()))return!0}catch(u){}if(r.size){let i=Gr(o);if(i&&r.has(i))return!0}return!1}}function Qr(t){var o,i,u,c,l,d;if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let f of t.match(e)||[]){let h=((o=f.match(/font-family:\s*([^;]+);/i))==null?void 0:o[1])||"",g=Vt(h),m=(((i=f.match(/font-weight:\s*([^;]+);/i))==null?void 0:i[1])||"400").trim(),a=(((u=f.match(/font-style:\s*([^;]+);/i))==null?void 0:u[1])||"normal").trim(),p=(((c=f.match(/font-stretch:\s*([^;]+);/i))==null?void 0:c[1])||"100%").trim(),y=(((l=f.match(/unicode-range:\s*([^;]+);/i))==null?void 0:l[1])||"").trim(),w=(((d=f.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:d[1])||"").trim(),C=pe(w,location.href),S=C.length?C.map(b=>String(b).toLowerCase()).sort().join("|"):w.toLowerCase(),v=[String(g||"").toLowerCase(),m,a,p,y.toLowerCase(),S].join("|");n.has(v)||(n.add(v),r.push(f))}if(r.length===0)return t;let s=0;return t.replace(e,()=>r[s++]||"")}function Jr(t,e,n,r){let s=Array.from(t||[]).sort().join("|"),o=e?JSON.stringify({families:(e.families||[]).map(c=>String(c).toLowerCase()).sort(),domains:(e.domains||[]).map(c=>String(c).toLowerCase()).sort(),subsets:(e.subsets||[]).map(c=>String(c).toLowerCase()).sort()}):"",i=(n||[]).map(c=>`${(c.family||"").toLowerCase()}::${c.weight||"normal"}::${c.style||"normal"}::${c.src||""}`).sort().join("|");return`fonts-embed-css::req=${s}::ex=${o}::lf=${i}::px=${r||""}`}function on(t,e,n,r){return k(this,null,function*(){let s;try{s=t.cssRules||[]}catch(i){return}let o=(i,u)=>{try{return new URL(i,u||location.href).href}catch(c){return i}};for(let i of s){if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){let u=i.href?o(i.href,e):e;if(r.depth>=jt){console.warn(`[snapDOM] CSSOM import depth exceeded (${jt}) at ${u}`);continue}if(u&&r.visitedSheets.has(u)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${u}`);continue}u&&r.visitedSheets.add(u);let c=O(F({},r),{depth:(r.depth||0)+1});yield on(i.styleSheet,u,n,c);continue}if(i.type===CSSRule.FONT_FACE_RULE){let u=(i.style.getPropertyValue("font-family")||"").trim(),c=Vt(u);if(!c||tt(c))continue;let l=(i.style.getPropertyValue("font-weight")||"400").trim(),d=(i.style.getPropertyValue("font-style")||"normal").trim(),f=(i.style.getPropertyValue("font-stretch")||"100%").trim(),h=(i.style.getPropertyValue("src")||"").trim(),g=(i.style.getPropertyValue("unicode-range")||"").trim();if(!r.faceMatchesRequired(c,d,l,f))continue;let m=en(g);if(!nn(r.usedCodepoints,m))continue;let a={family:c,weightSpec:l,styleSpec:d,stretchSpec:f,unicodeRange:g,srcRaw:h,srcUrls:pe(h,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(a,m))continue;if(/url\(/i.test(h)){let p=yield rn(h,e||location.href,r.useProxy);yield n(`@font-face{font-family:${c};src:${p};font-style:${d};font-weight:${l};font-stretch:${f};${g?`unicode-range:${g};`:""}}`)}else yield n(`@font-face{font-family:${c};src:${h};font-style:${d};font-weight:${l};font-stretch:${f};${g?`unicode-range:${g};`:""}}`)}}})}function Xt(){return k(this,arguments,function*({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:s=""}={}){var a,p,y,w,C,S,v,b,E,A,N,R,U,V,X,J,ut,Z;t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let o=new Map;for(let M of t){let[L,T,D,$]=String(M).split("__");if(!L)continue;let P=o.get(L)||[];P.push({w:parseInt(T,10),s:D,st:parseInt($,10)}),o.set(L,P)}function i(M,L,T,D){if(!o.has(M))return!1;let $=o.get(M),P=qr(T),q=zr(L),z=jr(D),et=P.min!==P.max,W=P.min,H=_=>q.kind==="normal"&&_==="normal"||q.kind!=="normal"&&(_==="italic"||_==="oblique"),j=!1;for(let _ of $){let K=et?_.w>=P.min&&_.w<=P.max:_.w===W,Q=H(de(_.s)),ft=_.st>=z.min&&_.st<=z.max;if(K&&Q&&ft){j=!0;break}}if(j)return!0;if(!et)for(let _ of $){let K=H(de(_.s)),Q=_.st>=z.min&&_.st<=z.max;if(Math.abs(W-_.w)<=300&&K&&Q)return!0}return!1}let u=Je(n),c=Jr(t,n,r,s);if((a=x.resource)!=null&&a.has(c))return x.resource.get(c);let l=Xr(t),d=[],f=me;for(let M of document.querySelectorAll("style")){let L=M.textContent||"";for(let T of L.matchAll(f)){let D=(T[2]||T[4]||"").trim();if(!D||tt(D))continue;!!document.querySelector(`link[rel="stylesheet"][href="${D}"]`)||d.push(D)}}d.length&&(yield Promise.all(d.map(M=>new Promise(L=>{if(document.querySelector(`link[rel="stylesheet"][href="${M}"]`))return L(null);let T=document.createElement("link");T.rel="stylesheet",T.href=M,T.setAttribute("data-snapdom","injected-import"),T.onload=()=>L(T),T.onerror=()=>L(null),document.head.appendChild(T)}))));let h="",g=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter(M=>!!M.href);for(let M of g)try{if(tt(M.href))continue;let L="",T=!1;try{T=new URL(M.href,location.href).origin===location.origin}catch($){}if(!T&&!Vr(M.href,l))continue;if(T){let $=Array.from(document.styleSheets).find(P=>P.href===M.href);if($)try{let P=$.cssRules||[];L=Array.from(P).map(q=>q.cssText).join("")}catch(P){}}if(!L&&(L=(yield Y(M.href,{as:"text",useProxy:s})).data,tt(M.href)))continue;L=yield Yr(L,M.href,s);let D="";for(let $ of L.match(Kr)||[]){let P=(((p=$.match(/font-family:\s*([^;]+);/i))==null?void 0:p[1])||"").trim(),q=Vt(P);if(!q||tt(q))continue;let z=(((y=$.match(/font-weight:\s*([^;]+);/i))==null?void 0:y[1])||"400").trim(),et=(((w=$.match(/font-style:\s*([^;]+);/i))==null?void 0:w[1])||"normal").trim(),W=(((C=$.match(/font-stretch:\s*([^;]+);/i))==null?void 0:C[1])||"100%").trim(),H=(((S=$.match(/unicode-range:\s*([^;]+);/i))==null?void 0:S[1])||"").trim(),j=(((v=$.match(/src\s*:\s*([^;}]+)[;}]/i))==null?void 0:v[1])||"").trim(),_=pe(j,M.href);if(!i(q,et,z,W))continue;let K=en(H);if(!nn(e,K))continue;let Q={family:q,weightSpec:z,styleSpec:et,stretchSpec:W,unicodeRange:H,srcRaw:j,srcUrls:_,href:M.href};if(n&&u(Q,K))continue;let ft=/url\(/i.test(j)?yield rn($,M.href,s):$;D+=ft}D.trim()&&(h+=D)}catch(L){console.warn("[snapDOM] Failed to process stylesheet:",M.href)}let m={requiredIndex:o,usedCodepoints:e,faceMatchesRequired:i,simpleExcluder:n?Je(n):null,useProxy:s,visitedSheets:new Set,depth:0};for(let M of document.styleSheets)if(!(M.href&&g.some(L=>L.href===M.href)))try{let L=M.href||location.href;L&&m.visitedSheets.add(L),yield on(M,L,T=>k(null,null,function*(){h+=T}),m)}catch(L){}try{for(let M of document.fonts||[]){if(!M||!M.family||M.status!=="loaded"||!M._snapdomSrc)continue;let L=String(M.family).replace(/^['"]+|['"]+$/g,"");if(tt(L)||!o.has(L)||n!=null&&n.families&&n.families.some(D=>String(D).toLowerCase()===L.toLowerCase()))continue;let T=M._snapdomSrc;if(!String(T).startsWith("data:")){if((b=x.resource)!=null&&b.has(M._snapdomSrc))T=x.resource.get(M._snapdomSrc),(E=x.font)==null||E.add(M._snapdomSrc);else if(!((A=x.font)!=null&&A.has(M._snapdomSrc)))try{let D=yield Y(M._snapdomSrc,{as:"dataURL",useProxy:s,silent:!0});if(D.ok&&typeof D.data=="string")T=D.data,(N=x.resource)==null||N.set(M._snapdomSrc,T),(R=x.font)==null||R.add(M._snapdomSrc);else continue}catch(D){console.warn("[snapDOM] Failed to fetch dynamic font src:",M._snapdomSrc);continue}}h+=`@font-face{font-family:'${L}';src:url(${T});font-style:${M.style||"normal"};font-weight:${M.weight||"normal"};}`}}catch(M){}for(let M of r){if(!M||typeof M!="object")continue;let L=String(M.family||"").replace(/^['"]+|['"]+$/g,"");if(!L||tt(L)||!o.has(L)||n!=null&&n.families&&n.families.some(z=>String(z).toLowerCase()===L.toLowerCase()))continue;let T=M.weight!=null?String(M.weight):"normal",D=M.style!=null?String(M.style):"normal",$=M.stretchPct!=null?`${M.stretchPct}%`:"100%",P=String(M.src||""),q=P;if(!q.startsWith("data:")){if((U=x.resource)!=null&&U.has(P))q=x.resource.get(P),(V=x.font)==null||V.add(P);else if(!((X=x.font)!=null&&X.has(P)))try{let z=yield Y(P,{as:"dataURL",useProxy:s,silent:!0});if(z.ok&&typeof z.data=="string")q=z.data,(J=x.resource)==null||J.set(P,q),(ut=x.font)==null||ut.add(P);else continue}catch(z){console.warn("[snapDOM] Failed to fetch localFonts src:",P);continue}}h+=`@font-face{font-family:'${L}';src:url(${q});font-style:${D};font-weight:${T};font-stretch:${$};}`}return h&&(h=Qr(h),(Z=x.resource)==null||Z.set(c,h)),h})}function Yt(t){let e=new Set;if(!t)return e;let n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null),r=i=>{let u=Vt(i.fontFamily);if(!u)return;let c=(l,d,f)=>`${u}__${zt(l)}__${de(d)}__${Hr(f)}`;e.add(c(i.fontWeight,i.fontStyle,i.fontStretch))};r(getComputedStyle(t));let s=getComputedStyle(t,"::before");s&&s.content&&s.content!=="none"&&r(s);let o=getComputedStyle(t,"::after");for(o&&o.content&&o.content!=="none"&&r(o);n.nextNode();){let i=n.currentNode,u=getComputedStyle(i);r(u);let c=getComputedStyle(i,"::before");c&&c.content&&c.content!=="none"&&r(c);let l=getComputedStyle(i,"::after");l&&l.content&&l.content!=="none"&&r(l)}return e}function Kt(t){let e=new Set,n=s=>{if(s)for(let o of s)e.add(o.codePointAt(0))},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;r.nextNode();){let s=r.currentNode;if(s.nodeType===Node.TEXT_NODE)n(s.nodeValue||"");else if(s.nodeType===Node.ELEMENT_NODE){let o=s;for(let i of["::before","::after"]){let u=getComputedStyle(o,i),c=u==null?void 0:u.getPropertyValue("content");if(!(!c||c==="none"))if(/^"/.test(c)||/^'/.test(c))n(c.slice(1,-1));else{let l=c.match(/\\[0-9A-Fa-f]{1,6}/g);if(l)for(let d of l)try{e.add(parseInt(d.slice(1),16))}catch(f){}}}}}return e}function Gt(t,e=2){return k(this,null,function*(){try{yield document.fonts.ready}catch(s){}let n=Array.from(t||[]).filter(Boolean);if(n.length===0)return;let r=()=>{let s=document.createElement("div");s.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let o of n){let i=document.createElement("span");i.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",i.style.fontFamily=`"${o}"`,i.style.fontWeight="700",i.style.fontStyle="italic",i.style.fontSize="32px",i.style.lineHeight="1",i.style.whiteSpace="nowrap",i.style.margin="0",i.style.padding="0",s.appendChild(i)}document.body.appendChild(s),s.offsetWidth,document.body.removeChild(s)};for(let s=0;s<Math.max(1,e);s++)r(),yield new Promise(o=>requestAnimationFrame(()=>requestAnimationFrame(o)))})}function ln(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Zr(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function sn(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function an(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,t)),s="";for(let[o,i]of n)for(;r>=o;)s+=i,r-=o;return e?s:s.toLowerCase()}function cn(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(Math.max(0,t));case"decimal-leading-zero":return(t<10?"0":"")+String(Math.max(0,t));case"lower-alpha":return sn(t,!1);case"upper-alpha":return sn(t,!0);case"lower-roman":return an(t,!1);case"upper-roman":return an(t,!0);default:return String(Math.max(0,t))}}function un(t){let e=()=>{var h,g,m;return(m=(g=(h=x)==null?void 0:h.session)==null?void 0:g.__counterEpoch)!=null?m:0},n=e(),r=new WeakMap,s=t instanceof Document?t.documentElement:t,o=h=>h&&h.tagName==="LI",i=h=>{let g=0,m=h==null?void 0:h.parentElement;if(!m)return 0;for(let a of m.children){if(a===h)break;a.tagName==="LI"&&g++}return g},u=h=>{let g=new Map;for(let[m,a]of h)g.set(m,a.slice());return g},c=(h,g,m)=>{var w,C;let a=u(h),p;try{p=((w=m.style)==null?void 0:w.counterReset)||getComputedStyle(m).counterReset}catch(S){}if(p&&p!=="none")for(let S of p.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):0;if(!b)continue;let A=g.get(b);if(A&&A.length){let N=A.slice();N.push(E),a.set(b,N)}else a.set(b,[E])}let y;try{y=((C=m.style)==null?void 0:C.counterIncrement)||getComputedStyle(m).counterIncrement}catch(S){}if(y&&y!=="none")for(let S of y.split(",")){let v=S.trim().split(/\s+/),b=v[0],E=Number.isFinite(Number(v[1]))?Number(v[1]):1;if(!b)continue;let A=a.get(b)||[];A.length===0&&A.push(0),A[A.length-1]+=E,a.set(b,A)}try{if(getComputedStyle(m).display==="list-item"&&o(m)){let v=m.parentElement,b=1;if(v&&v.tagName==="OL"){let A=v.getAttribute("start"),N=Number.isFinite(Number(A))?Number(A):1,R=i(m),U=m.getAttribute("value");b=Number.isFinite(Number(U))?Number(U):N+R}else b=1+i(m);let E=a.get("list-item")||[];E.length===0&&E.push(0),E[E.length-1]=b,a.set("list-item",E)}}catch(S){}return a},l=(h,g,m)=>{let a=c(m,g,h);r.set(h,a);let p=a;for(let y of h.children)p=l(y,a,p);return a},d=new Map;l(s,d,d);function f(){let h=e();if(h!==n){n=h;let g=new Map;l(s,g,g)}}return{get(h,g){var a;f();let m=(a=r.get(h))==null?void 0:a.get(g);return m&&m.length?m[m.length-1]:0},getStack(h,g){var a;f();let m=(a=r.get(h))==null?void 0:a.get(g);return m?m.slice():[]}}}function fn(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g,s=t.replace(r,(o,i,u)=>{var l,d,f,h;let c=String(u).split(",").map(g=>g.trim());if(i==="counter"){let g=(l=c[0])==null?void 0:l.replace(/^["']|["']$/g,""),m=(c[1]||"decimal").toLowerCase(),a=n.get(e,g);return cn(a,m)}else{let g=(d=c[0])==null?void 0:d.replace(/^["']|["']$/g,""),m=(h=(f=c[1])==null?void 0:f.replace(/^["']|["']$/g,""))!=null?h:"",a=(c[2]||"decimal").toLowerCase(),p=n.getStack(e,g);return p.length?p.map(w=>cn(w,a)).join(m):""}});return Zr(s)}catch(r){return"- "}}var kt=new WeakMap,dn=300;function to(t,e){let n=gn(t);return e?(e.__pseudoPreflightFp!==n&&(e.__pseudoPreflight=pn(t),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):pn(t)}function he(t){try{return t&&t.cssRules?t.cssRules:null}catch(e){return null}}function gn(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.tagName==="STYLE"){let u=i.textContent?i.textContent.length:0;n+=`S${u}|`;let c=i.sheet,l=c?he(c):null;l&&(r+=l.length)}else{let u=i.getAttribute("href")||"",c=i.getAttribute("media")||"all";n+=`L${u}|m:${c}|`;let l=i.sheet,d=l?he(l):null;d&&(r+=d.length)}}let s=t.adoptedStyleSheets;return n+=`ass:${Array.isArray(s)?s.length:0}|tr:${r}`,n}function mn(t,e,n){let r=he(t);if(!r)return!1;for(let s=0;s<r.length;s++){if(n.budget<=0)return!1;let o=r[s],i=o&&o.cssText?o.cssText:"";n.budget--;for(let u of e)if(i.includes(u))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let u=0;u<o.cssRules.length&&n.budget>0;u++){let c=o.cssRules[u],l=c&&c.cssText?c.cssText:"";n.budget--;for(let d of e)if(l.includes(d))return!0}if(n.budget<=0)return!1}return!1}function pn(t=document){let e=gn(t),n=kt.get(t);if(n&&n.fingerprint===e)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],s=t.querySelectorAll("style");for(let i=0;i<s.length;i++){let u=s[i].textContent||"";for(let c of r)if(u.includes(c))return kt.set(t,{fingerprint:e,result:!0}),!0}let o=t.adoptedStyleSheets;if(Array.isArray(o)&&o.length){let i={budget:dn};try{for(let u of o)if(mn(u,r,i))return kt.set(t,{fingerprint:e,result:!0}),!0}catch(u){}}{let i=t.querySelectorAll('style,link[rel~="stylesheet"]'),u={budget:dn};for(let c=0;c<i.length&&u.budget>0;c++){let l=i[c],d=null;if(l.tagName,d=l.sheet||null,d&&mn(d,r,u))return kt.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(kt.set(t,{fingerprint:e,result:!0}),!0):(kt.set(t,{fingerprint:e,result:!1}),!1)}var At=new WeakMap,hn=-1;function eo(t){return(t||"").replace(/"([^"]*)"/g,"$1")}function no(t){if(!t)return"";let e=[],n=/"([^"]*)"/g,r;for(;r=n.exec(t);)e.push(r[1]);return e.length?e.join(""):eo(t)}function ge(t,e){let n=t.parentElement,r=n?At.get(n):null;return r?{get(s,o){let i=e.get(s,o),u=r.get(o);return typeof u=="number"?Math.max(i,u):i},getStack(s,o){let i=e.getStack(s,o);if(!i.length)return i;let u=r.get(o);if(typeof u=="number"){let c=i.slice();return c[c.length-1]=Math.max(c[c.length-1],u),c}return i}}:e}function ye(t,e,n){let r=new Map;function s(c){let l=[];if(!c||c==="none")return l;for(let d of String(c).split(",")){let f=d.trim().split(/\s+/),h=f[0],g=Number.isFinite(Number(f[1]))?Number(f[1]):void 0;h&&l.push({name:h,num:g})}return l}let o=s(e==null?void 0:e.counterReset),i=s(e==null?void 0:e.counterIncrement);function u(c){if(r.has(c))return r.get(c).slice();let l=n.getStack(t,c);l=l.length?l.slice():[];let d=o.find(h=>h.name===c);if(d){let h=Number.isFinite(d.num)?d.num:0;l=l.length?[...l,h]:[h]}let f=i.find(h=>h.name===c);if(f){let h=Number.isFinite(f.num)?f.num:1;l.length===0&&(l=[0]),l[l.length-1]+=h}return r.set(c,l.slice()),l}return{get(c,l){let d=u(l);return d.length?d[d.length-1]:0},getStack(c,l){return u(l)},__incs:i}}function ro(t,e,n){let r;try{r=getComputedStyle(t,e)}catch(l){}let s=r==null?void 0:r.content;if(!s||s==="none"||s==="normal")return{text:"",incs:[]};let o=ge(t,n),i=ye(t,r,o),u=ln(s)?fn(s,t,i):s;return{text:no(u),incs:i.__incs||[]}}function be(t,e,n,r){return k(this,null,function*(){var l,d,f,h,g;if(!(t instanceof Element)||!(e instanceof Element))return;let s=t.ownerDocument||document;if(!to(s,n))return;let o=(f=(d=(l=x)==null?void 0:l.session)==null?void 0:d.__counterEpoch)!=null?f:0;if(hn!==o&&(At=new WeakMap,n&&(n.__counterCtx=null),hn=o),!n.__counterCtx)try{n.__counterCtx=un(t.ownerDocument||document)}catch(m){}let i=n.__counterCtx;for(let m of["::before","::after","::first-letter"])try{let a=yt(t,m);if(!a||a.content==="none"&&a.backgroundImage==="none"&&a.backgroundColor==="transparent"&&(a.borderStyle==="none"||parseFloat(a.borderWidth)===0)&&(!a.transform||a.transform==="none")&&a.display==="inline")continue;if(m==="::first-letter"){let W=getComputedStyle(t);if(!(a.color!==W.color||a.fontSize!==W.fontSize||a.fontWeight!==W.fontWeight))continue;let j=Array.from(e.childNodes).find(_t=>{var Et;return _t.nodeType===Node.TEXT_NODE&&((Et=_t.textContent)==null?void 0:Et.trim().length)>0});if(!j)continue;let _=j.textContent,K=_.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u),Q=K==null?void 0:K[0],ft=_.slice((Q==null?void 0:Q.length)||0);if(!Q||/[\uD800-\uDFFF]/.test(Q))continue;let vt=document.createElement("span");vt.textContent=Q,vt.dataset.snapdomPseudo="::first-letter";let nt=Dt(a),rt=St(nt,"span");n.styleMap.set(vt,rt);let Pt=document.createTextNode(ft);e.replaceChild(Pt,j),e.insertBefore(vt,Pt);continue}let y=(h=a.content)!=null?h:"",w=y===""||y==="none"||y==="normal",{text:C,incs:S}=ro(t,m,i),v=a.backgroundImage,b=a.backgroundColor,E=a.fontFamily,A=parseInt(a.fontSize)||32,N=parseInt(a.fontWeight)||!1,R=a.color||"#000",U=a.borderStyle,V=parseFloat(a.borderWidth),X=a.transform,J=tt(E),ut=!w&&C!=="",Z=v&&v!=="none",M=b&&b!=="transparent"&&b!=="rgba(0, 0, 0, 0)",L=U&&U!=="none"&&V>0,T=X&&X!=="none";if(!(ut||Z||M||L||T)){if(S&&S.length&&t.parentElement){let W=At.get(t.parentElement)||new Map;for(let{name:H}of S){if(!H)continue;let j=ge(t,i),K=ye(t,getComputedStyle(t,m),j).get(t,H);W.set(H,K)}At.set(t.parentElement,W)}continue}let $=document.createElement("span");$.dataset.snapdomPseudo=m,$.style.pointerEvents="none";let P=Dt(a),q=St(P,"span");if(n.styleMap.set($,q),J&&C&&C.length===1){let{dataUrl:W,width:H,height:j}=yield Ze(C,E,N,A,R),_=document.createElement("img");_.src=W,_.style=`height:${A}px;width:${H/j*A}px;object-fit:contain;`,$.appendChild(_),e.dataset.snapdomHasIcon="true"}else if(C&&C.startsWith("url(")){let W=ht(C);if(W!=null&&W.trim())try{let H=document.createElement("img"),j=yield Y(dt(W),{as:"dataURL",useProxy:r.useProxy});H.src=j.data,H.style=`width:${A}px;height:auto;object-fit:contain;`,$.appendChild(H)}catch(H){console.error(`[snapdom] Error in pseudo ${m} for`,t,H)}}else!J&&ut&&($.textContent=C);$.style.backgroundImage="none","maskImage"in $.style&&($.style.maskImage="none"),"webkitMaskImage"in $.style&&($.style.webkitMaskImage="none");try{$.style.backgroundRepeat=a.backgroundRepeat,$.style.backgroundSize=a.backgroundSize,a.backgroundPositionX&&a.backgroundPositionY?($.style.backgroundPositionX=a.backgroundPositionX,$.style.backgroundPositionY=a.backgroundPositionY):$.style.backgroundPosition=a.backgroundPosition,$.style.backgroundOrigin=a.backgroundOrigin,$.style.backgroundClip=a.backgroundClip,$.style.backgroundAttachment=a.backgroundAttachment,$.style.backgroundBlendMode=a.backgroundBlendMode}catch(W){}if(Z)try{let W=Ft(v),H=yield Promise.all(W.map(gt));$.style.backgroundImage=H.join(", ")}catch(W){console.warn(`[snapdom] Failed to inline background-image for ${m}`,W)}M&&($.style.backgroundColor=b);let et=$.childNodes.length>0||((g=$.textContent)==null?void 0:g.trim())!==""||Z||M||L||T;if(S&&S.length&&t.parentElement){let W=At.get(t.parentElement)||new Map,H=ge(t,i),j=ye(t,getComputedStyle(t,m),H);for(let{name:_}of S){if(!_)continue;let K=j.get(t,_);W.set(_,K)}At.set(t.parentElement,W)}if(!et)continue;m==="::before"?e.insertBefore($,e.firstChild):e.appendChild($)}catch(a){console.warn(`[snapdom] Failed to capture ${m} for`,t,a)}let u=Array.from(t.children),c=Array.from(e.children).filter(m=>!m.dataset.snapdomPseudo);for(let m=0;m<Math.min(u.length,c.length);m++)yield be(u[m],c[m],n,r)})}function yn(t,e){var w,C,S,v;if(!t||!(t instanceof Element))return;let n=t.ownerDocument||document,r=e||n,s=t instanceof SVGSVGElement?[t]:Array.from(t.querySelectorAll("svg"));if(s.length===0)return;let o=/url\(\s*#([^)]+)\)/g,i=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],u=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),c=new Set(Array.from(t.querySelectorAll("[id]")).map(b=>b.id)),l=new Set,d=!1,f=b=>{if(!b)return;o.lastIndex=0;let E;for(;E=o.exec(b);){d=!0;let A=(E[1]||"").trim();A&&!c.has(A)&&l.add(A)}},h=b=>{let E=b.querySelectorAll('use[href^="#"], use[xlink\\:href^="#"]');for(let R of E){let U=R.getAttribute("href")||R.getAttribute("xlink:href");if(!U||!U.startsWith("#"))continue;d=!0;let V=U.slice(1).trim();V&&!c.has(V)&&l.add(V)}let N=b.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("], *[clip-path^="url("],*[mask^="url("],*[marker^="url("], *[marker-start^="url("],*[marker-mid^="url("], *[marker-end^="url("]');for(let R of N){f(R.getAttribute("style")||"");for(let U of i)f(R.getAttribute(U))}};for(let b of s)h(b);if(!d)return;let g=t.querySelector("svg.inline-defs-container");g||(g=n.createElementNS("http://www.w3.org/2000/svg","svg"),g.classList.add("inline-defs-container"),g.setAttribute("aria-hidden","true"),g.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(g,t.firstChild||null));let m=g.querySelector("defs")||null,a=b=>{if(!b||c.has(b))return null;let E=u(b),A=N=>{let R=r.querySelector(N);return R&&!t.contains(R)?R:null};return A(`svg defs > *#${E}`)||A(`svg > symbol#${E}`)||A(`*#${E}`)};if(!l.size)return;let p=new Set(l),y=new Set;for(;p.size;){let b=p.values().next().value;if(p.delete(b),!b||c.has(b)||y.has(b))continue;let E=a(b);if(!E){y.add(b);continue}m||(m=n.createElementNS("http://www.w3.org/2000/svg","defs"),g.appendChild(m));let A=E.cloneNode(!0);A.id||A.setAttribute("id",b),m.appendChild(A),y.add(b),c.add(b);let N=[A,...A.querySelectorAll("*")];for(let R of N){let U=((w=R.getAttribute)==null?void 0:w.call(R,"href"))||((C=R.getAttribute)==null?void 0:C.call(R,"xlink:href"));if(U&&U.startsWith("#")){let X=U.slice(1).trim();X&&!c.has(X)&&!y.has(X)&&p.add(X)}let V=((S=R.getAttribute)==null?void 0:S.call(R,"style"))||"";V&&f(V);for(let X of i){let J=(v=R.getAttribute)==null?void 0:v.call(R,X);J&&f(J)}}}}function wn(t,e){var u;if(!t||!e)return;let n=t.scrollTop||0;if(!n)return;getComputedStyle(e).position==="static"&&(e.style.position="relative");let r=t.getBoundingClientRect(),s=t.clientHeight,o="data-snap-ph",i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;i.nextNode();){let c=i.currentNode,l=getComputedStyle(c),d=l.position;if(d!=="sticky"&&d!=="-webkit-sticky")continue;let f=bn(l.top),h=bn(l.bottom);if(f==null&&h==null)continue;let g=oo(c,t),m=so(e,g,o);if(!m)continue;let a=c.getBoundingClientRect(),p=a.width,y=a.height,w=a.left-r.left;if(!(p>0&&y>0)||!Number.isFinite(w))continue;let C=f!=null?f+n:n+(s-y-h);if(!Number.isFinite(C))continue;let S=Number.parseInt(l.zIndex,10),v=Number.isFinite(S),b=v?Math.max(S,1)+1:2,E=v?S-1:0,A=m.cloneNode(!1);A.setAttribute(o,"1"),A.style.position="sticky",A.style.left=`${w}px`,A.style.top=`${C}px`,A.style.width=`${p}px`,A.style.height=`${y}px`,A.style.visibility="hidden",A.style.zIndex=String(E),A.style.overflow="hidden",A.style.background="transparent",A.style.boxShadow="none",A.style.filter="none",(u=m.parentElement)==null||u.insertBefore(A,m),m.style.position="absolute",m.style.left=`${w}px`,m.style.top=`${C}px`,m.style.bottom="auto",m.style.zIndex=String(b),m.style.pointerEvents="none"}}function bn(t){if(!t||t==="auto")return null;let e=Number.parseFloat(t);return Number.isFinite(e)?e:null}function oo(t,e){let n=[];for(let r=t;r&&r!==e;){let s=r.parentElement;if(!s)break;n.push(Array.prototype.indexOf.call(s.children,r)),r=s}return n.reverse()}function so(t,e,n){let r=t;for(let s=0;s<e.length;s++)if(r=io(r,n)[e[s]],!r)return null;return r instanceof HTMLElement?r:null}function io(t,e){let n=[],r=t.children;for(let s=0;s<r.length;s++){let o=r[s];o.hasAttribute(e)||n.push(o)}return n}function xn(t){let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,s=e.borderStyle,o=e.borderWidth,i=n!=="none"&&parseFloat(r)>0,u=s==="none"||parseFloat(o)===0;i&&u&&(t.style.border=`${r} solid transparent`)}function Sn(n){return k(this,arguments,function*(t,e={}){var l,d;let r={styleMap:x.session.styleMap,styleCache:x.session.styleCache,nodeMap:x.session.nodeMap},s,o="",i="";xn(t);try{yn(t)}catch(f){console.warn("inlineExternal defs or symbol failed:",f)}try{s=yield Rt(t,r,e,t)}catch(f){throw console.warn("deepClone failed:",f),f}try{yield be(t,s,r,e)}catch(f){console.warn("inlinePseudoElements failed:",f)}yield Xe(s);try{let f=s.querySelectorAll("style[data-sd]");for(let h of f)i+=h.textContent||"",h.remove()}catch(f){}let u=ce(r.styleMap);o=Array.from(u.entries()).map(([f,h])=>`.${h}{${f}}`).join(""),o=i+o;for(let[f,h]of r.styleMap.entries()){if(f.tagName==="STYLE")continue;if(f.getRootNode&&f.getRootNode()instanceof ShadowRoot){f.setAttribute("style",h.replace(/;/g,"; "));continue}let g=u.get(h);g&&f.classList.add(g);let m=(l=f.style)==null?void 0:l.backgroundImage,a=(d=f.dataset)==null?void 0:d.snapdomHasIcon;m&&m!=="none"&&(f.style.backgroundImage=m),a&&(f.style.verticalAlign="middle",f.style.display="inline")}for(let[f,h]of r.nodeMap.entries()){let g=h.scrollLeft,m=h.scrollTop;if((g||m)&&f instanceof HTMLElement){f.style.overflow="hidden",f.style.scrollbarWidth="none",f.style.msOverflowStyle="none";let p=document.createElement("div");for(p.style.transform=`translate(${-g}px, ${-m}px)`,p.style.willChange="transform",p.style.display="inline-block",p.style.width="100%";f.firstChild;)p.appendChild(f.firstChild);f.appendChild(p)}}let c=s instanceof HTMLElement&&s.firstElementChild instanceof HTMLElement?s.firstElementChild:s;if(wn(t,c),t===r.nodeMap.get(s)){let f=r.styleCache.get(t)||window.getComputedStyle(t);r.styleCache.set(t,f);let h=ne(f.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=h||""}for(let[f,h]of r.nodeMap.entries())h.tagName==="PRE"&&(f.style.marginTop="0",f.style.marginBlockStart="0");return{clone:s,classCSS:o,styleCache:r.styleCache}})}function ao(t){var l,d,f,h;let e=parseInt(((l=t.dataset)==null?void 0:l.snapdomWidth)||"",10)||0,n=parseInt(((d=t.dataset)==null?void 0:d.snapdomHeight)||"",10)||0,r=parseInt(t.getAttribute("width")||"",10)||0,s=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(((f=t.style)==null?void 0:f.width)||"")||0,i=parseFloat(((h=t.style)==null?void 0:h.height)||"")||0,u=e||o||r||t.width||t.naturalWidth||100,c=n||i||s||t.height||t.naturalHeight||100;return{width:u,height:c}}function Cn(n){return k(this,arguments,function*(t,e={}){let r=Array.from(t.querySelectorAll("img")),s=o=>k(null,null,function*(){if(!o.getAttribute("src")){let f=o.currentSrc||o.src||"";f&&o.setAttribute("src",f)}o.removeAttribute("srcset"),o.removeAttribute("sizes");let i=o.src||"";if(!i)return;let u=yield Y(i,{as:"dataURL",useProxy:e.useProxy});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){o.src=u.data,o.width||(o.width=o.naturalWidth||100),o.height||(o.height=o.naturalHeight||100);return}let{width:c,height:l}=ao(o),{fallbackURL:d}=e||{};if(d)try{let f=typeof d=="function"?yield d({width:c,height:l,src:i,element:o}):d;if(f){let h=yield Y(f,{as:"dataURL",useProxy:e.useProxy});o.src=h.data,o.width||(o.width=c),o.height||(o.height=l);return}}catch(f){}if(e.placeholders!==!1){let f=document.createElement("div");f.style.cssText=[`width:${c}px`,`height:${l}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${l}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),f.textContent="img",o.replaceWith(f)}else{let f=document.createElement("div");f.style.cssText=`display:inline-block;width:${c}px;height:${l}px;visibility:hidden;`,o.replaceWith(f)}});for(let o=0;o<r.length;o+=4){let i=r.slice(o,o+4).map(s);yield Promise.allSettled(i)}})}function Qt(s,o,i){return k(this,arguments,function*(t,e,n,r={}){let u=[[t,e]],c=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],l=["mask-position","mask-size","mask-repeat","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],d=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],f=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;u.length;){let[h,g]=u.shift(),m=n.get(h)||yt(h);n.has(h)||n.set(h,m);let a=(()=>{let w=m.getPropertyValue("border-image"),C=m.getPropertyValue("border-image-source");return w&&w!=="none"||C&&C!=="none"})();for(let w of d){let C=m.getPropertyValue(w);C&&g.style.setProperty(w,C)}for(let w of c){let C=m.getPropertyValue(w);if(!C||C==="none")continue;let S=Ft(C),v=yield Promise.all(S.map(b=>gt(b,r)));v.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&g.style.setProperty(w,v.join(", "))}for(let w of l){let C=m.getPropertyValue(w);!C||C==="initial"||g.style.setProperty(w,C)}if(a)for(let w of f){let C=m.getPropertyValue(w);!C||C==="initial"||g.style.setProperty(w,C)}let p=Array.from(h.children),y=Array.from(g.children).filter(w=>!(w.dataset&&w.dataset.snapdomPseudo));for(let w=0;w<Math.min(p.length,y.length);w++)u.push([p[w],y[w]])}})}function kn(t){var l;if(!t)return()=>{};let e=co(t);if(e<=0)return()=>{};if(!fo(t))return()=>{};let n=getComputedStyle(t),r=Math.round(lo(n)*e+uo(n)),s=(l=t.textContent)!=null?l:"",o=s;if(t.scrollHeight<=r+.5)return()=>{};let i=0,u=s.length,c=-1;for(;i<=u;){let d=i+u>>1;t.textContent=s.slice(0,d)+"\u2026",t.scrollHeight<=r+.5?(c=d,i=d+1):u=d-1}return t.textContent=(c>=0?s.slice(0,c):"")+"\u2026",()=>{t.textContent=o}}function co(t){let e=getComputedStyle(t),n=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");n=(n||"").trim();let r=parseInt(n,10);return Number.isFinite(r)&&r>0?r:0}function lo(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function uo(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function fo(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Nt=[];function An(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function we(...t){let e=t.flat();for(let n of e){let r=An(n);r&&(Nt.some(s=>s&&s.name&&r.name&&s.name===r.name)||Nt.push(r))}}function Mn(t){return(t&&Array.isArray(t.plugins)?t.plugins:Nt)||Nt}function st(t,e,n){return k(this,null,function*(){let r=n,s=Mn(e);for(let o of s){let i=o&&typeof o[t]=="function"?o[t]:null;if(!i)continue;let u=yield i(e,r);typeof u!="undefined"&&(r=u)}return r})}function vn(t,e,n){return k(this,null,function*(){let r=[],s=Mn(e);for(let o of s){let i=o&&typeof o[t]=="function"?o[t]:null;if(!i)continue;let u=yield i(e,n);typeof u!="undefined"&&r.push(u)}return r})}function mo(t){let e=[];if(Array.isArray(t))for(let n of t){let r=An(n);if(!r||!r.name)continue;let s=e.findIndex(o=>o&&o.name===r.name);s>=0&&e.splice(s,1),e.push(r)}for(let n of Nt)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function En(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=mo(e)),t}function Fn(t,e){if(!t||!e||!e.style)return;let n=getComputedStyle(t);try{e.style.boxShadow="none"}catch(o){}try{e.style.textShadow="none"}catch(o){}try{e.style.outline="none"}catch(o){}let s=(n.filter||"").replace(/\bblur\([^()]*\)\s*/gi,"").replace(/\bdrop-shadow\([^()]*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=s.length?s:"none"}catch(o){}}function po(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT),n=[];for(;e.nextNode();)n.push(e.currentNode);for(let r of n)r.remove()}function ho(t,e={}){let{stripFrameworkDirectives:n=!0}=e,r=new Set(["xml","xlink"]),s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;s.nextNode();){let o=s.currentNode;for(let i of Array.from(o.attributes)){let u=i.name;if(u.includes("@")){o.removeAttribute(u);continue}if(u.includes(":")){let c=u.split(":",1)[0];if(!r.has(c)){o.removeAttribute(u);continue}}if(n&&(u.startsWith("x-")||u.startsWith("v-")||u.startsWith(":")||u.startsWith("on:")||u.startsWith("bind:")||u.startsWith("let:")||u.startsWith("class:"))){o.removeAttribute(u);continue}}}}function $n(t,e={}){t&&(ho(t,e),po(t))}function go(t){var e;try{let n=((e=t.getAttribute)==null?void 0:e.call(t,"style"))||"";return/\b(height|width|block-size|inline-size)\s*:/.test(n)}catch(n){return!1}}function yo(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof HTMLIFrameElement||t instanceof SVGElement||t instanceof HTMLObjectElement||t instanceof HTMLEmbedElement}function bo(t,e){if(!(t instanceof Element)||go(t)||yo(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function In(t,e,n=new Map){function r(s,o){if(!(s instanceof Element)||!(o instanceof Element))return;let i=s.childElementCount>o.childElementCount,u=n.get(s)||getComputedStyle(s);if(n.has(s)||n.set(s,u),i&&bo(s,u)){o.style.height||(o.style.height="auto"),o.style.width||(o.style.width="auto"),o.style.removeProperty("block-size"),o.style.removeProperty("inline-size"),o.style.minHeight||(o.style.minHeight="0"),o.style.minWidth||(o.style.minWidth="0"),o.style.maxHeight||(o.style.maxHeight="none"),o.style.maxWidth||(o.style.maxWidth="none");let d=u.overflowY||u.overflowBlock||"visible",f=u.overflowX||u.overflowInline||"visible";(d!=="visible"||f!=="visible")&&(o.style.overflow="visible")}let c=Array.from(s.children),l=Array.from(o.children);for(let d=0;d<Math.min(c.length,l.length);d++)r(c[d],l[d])}r(t,e)}function wo(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed"||e.position==="sticky"||(e.cssFloat||e.float||"none")!=="none"||e.transform&&e.transform!=="none")}function xo(t,e){if(!(t instanceof Element))return!1;if(t.getAttribute("data-capture")==="exclude"&&(e==null?void 0:e.excludeMode)==="remove")return!0;if(Array.isArray(e==null?void 0:e.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){}return!1}function Ln(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),s=1/0,o=-1/0,i=!1,u=Array.from(t.children);for(let g of u){if(xo(g,e)||!wo(g))continue;let m=g.getBoundingClientRect(),a=m.top-r.top,p=m.bottom-r.top;p<=a||(a<s&&(s=a),p>o&&(o=p),i=!0)}let c=i?Math.max(0,o-s):0,l=parseFloat(n.borderTopWidth)||0,d=parseFloat(n.borderBottomWidth)||0,f=parseFloat(n.paddingTop)||0,h=parseFloat(n.paddingBottom)||0;return l+d+f+h+c}var I=(t,e=3)=>Number.isFinite(t)?Math.round(t*ee(10,e))/ee(10,e):t;function Rn(t){var u;let e=t.boxShadow||"";if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let n=e.split(/\),(?=(?:[^()]*\([^()]*\))*[^()]*$)/).map(c=>c.trim()),r=0,s=0,o=0,i=0;for(let c of n){let l=((u=c.match(/-?\d+(\.\d+)?px/g))==null?void 0:u.map(p=>parseFloat(p)))||[];if(l.length<2)continue;let[d,f,h=0,g=0]=l,m=Math.abs(d)+h+g,a=Math.abs(f)+h+g;s=Math.max(s,m+Math.max(d,0)),i=Math.max(i,m+Math.max(-d,0)),o=Math.max(o,a+Math.max(f,0)),r=Math.max(r,a+Math.max(-f,0))}return{top:Math.ceil(r),right:Math.ceil(s),bottom:Math.ceil(o),left:Math.ceil(i)}}function Nn(t){let e=(t.filter||"").match(/blur\(\s*([0-9.]+)px\s*\)/),n=e?Math.ceil(parseFloat(e[1])||0):0;return{top:n,right:n,bottom:n,left:n}}function Tn(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0);return{top:e,right:e,bottom:e,left:e}}function Pn(t){var c;let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,s=0,o=0,i=0,u=!1;for(let l of n){u=!0;let d=((c=l.match(/-?\d+(?:\.\d+)?px/gi))==null?void 0:c.map(p=>parseFloat(p)))||[],[f=0,h=0,g=0]=d,m=Math.abs(f)+g,a=Math.abs(h)+g;s=Math.max(s,m+Math.max(f,0)),i=Math.max(i,m+Math.max(-f,0)),o=Math.max(o,a+Math.max(h,0)),r=Math.max(r,a+Math.max(-h,0))}return{bleed:{top:I(r),right:I(s),bottom:I(o),left:I(i)},has:u}}function _n(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch(o){}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch(o){}let r=n.transform||"none";if(!r||r==="none")try{let o=Dn(t);if(o.a===1&&o.b===0&&o.c===0&&o.d===1)return e.style.transform="none",{a:1,b:0,c:0,d:1}}catch(o){}let s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let o=s[1].split(",").map(i=>parseFloat(i.trim()));if(o.length===6&&o.every(Number.isFinite)){let[i,u,c,l]=o,d=Math.sqrt(i*i+u*u)||0,f=0,h=0,g=0,m=0,a=0,p=0;d>0&&(f=i/d,h=u/d,g=f*c+h*l,m=c-f*g,a=l-h*g,p=Math.sqrt(m*m+a*a)||0,p>0?g=g/p:g=0);let y=d,w=0,C=g*p,S=p;try{e.style.transform=`matrix(${y}, ${w}, ${C}, ${S}, 0, 0)`}catch(v){}return{a:y,b:w,c:C,d:S}}}try{let o=String(r).trim();return e.style.transform=o+" translate(0px, 0px) rotate(0deg)",null}catch(o){return null}}function Se(t,e,n,r,s){let o=n.a,i=n.b,u=n.c,c=n.d,l=n.e||0,d=n.f||0;function f(y,w){let C=y-r,S=w-s,v=o*C+u*S,b=i*C+c*S;return v+=r+l,b+=s+d,[v,b]}let h=[f(0,0),f(t,0),f(0,e),f(t,e)],g=1/0,m=1/0,a=-1/0,p=-1/0;for(let[y,w]of h)y<g&&(g=y),w<m&&(m=w),y>a&&(a=y),w>p&&(p=w);return{minX:g,minY:m,maxX:a,maxY:p,width:a-g,height:p-m}}function Wn(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[s,o]=[r[0]||"0",r[1]||"0"],i=(u,c)=>{let l=u.toLowerCase();return l==="left"||l==="top"?0:l==="center"?c/2:l==="right"||l==="bottom"?c:l.endsWith("px")?parseFloat(l)||0:l.endsWith("%")?(parseFloat(l)||0)*c/100:/^-?\d+(\.\d+)?$/.test(l)&&parseFloat(l)||0};return{ox:i(s,e),oy:i(o,n)}}function On(t){var s,o,i,u,c,l,d,f;let e={rotate:"0deg",scale:null,translate:null},n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null;if(n){let h=p=>{try{return typeof n.has=="function"&&!n.has(p)||typeof n.get!="function"?null:n.get(p)}catch(y){return null}},g=h("rotate");if(g)if(g.angle){let p=g.angle;e.rotate=p.unit==="rad"?p.value*180/Math.PI+"deg":p.value+p.unit}else g.unit?e.rotate=g.unit==="rad"?g.value*180/Math.PI+"deg":g.value+g.unit:e.rotate=String(g);else{let p=getComputedStyle(t);e.rotate=p.rotate&&p.rotate!=="none"?p.rotate:"0deg"}let m=h("scale");if(m){let p="x"in m&&((s=m.x)==null?void 0:s.value)!=null?m.x.value:Array.isArray(m)?(o=m[0])==null?void 0:o.value:Number(m)||1,y="y"in m&&((i=m.y)==null?void 0:i.value)!=null?m.y.value:Array.isArray(m)?(u=m[1])==null?void 0:u.value:p;e.scale=`${p} ${y}`}else{let p=getComputedStyle(t);e.scale=p.scale&&p.scale!=="none"?p.scale:null}let a=h("translate");if(a){let p="x"in a&&"value"in a.x?a.x.value:Array.isArray(a)?(c=a[0])==null?void 0:c.value:0,y="y"in a&&"value"in a.y?a.y.value:Array.isArray(a)?(l=a[1])==null?void 0:l.value:0,w="x"in a&&((d=a.x)!=null&&d.unit)?a.x.unit:"px",C="y"in a&&((f=a.y)!=null&&f.unit)?a.y.unit:"px";e.translate=`${p}${w} ${y}${C}`}else{let p=getComputedStyle(t);e.translate=p.translate&&p.translate!=="none"?p.translate:null}return e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var xe=null;function So(){if(xe)return xe;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),xe=t,t}function Un(t){let e=So(),n=document.createElement("div");n.style.transformOrigin="0 0",t.baseTransform&&(n.style.transform=t.baseTransform),t.rotate&&(n.style.rotate=t.rotate),t.scale&&(n.style.scale=t.scale),t.translate&&(n.style.translate=t.translate),e.appendChild(n);let r=Dn(n);return e.removeChild(n),r}function Bn(t){let e=getComputedStyle(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let s=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",i=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(s||o||i)}function Dn(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch(n){return new WebKitCSSMatrix(e)}}function Ce(t,e){return k(this,null,function*(){var w;if(!t)throw new Error("Element cannot be null or undefined");Ot(e.cache);let n=e.fast,r=e.outerTransforms!==!1,s=!!e.outerShadows,o={element:t,options:e,plugins:e.plugins},i,u,c,l="",d="",f,h,g=null;yield st("beforeSnap",o),yield st("beforeClone",o);let m=kn(o.element);try{({clone:i,classCSS:u,styleCache:c}=yield Sn(o.element,o.options)),!r&&i&&(g=_n(o.element,i)),!s&&i&&Fn(o.element,i)}finally{m()}if(o=F({clone:i,classCSS:u,styleCache:c},o),yield st("afterClone",o),$n(o.clone),((w=o.options)==null?void 0:w.excludeMode)==="remove")try{In(o.element,o.clone,o.styleCache)}catch(C){console.warn("[snapdom] shrink pass failed:",C)}try{yield Ge(o.clone,o.element)}catch(C){}yield new Promise(C=>{ct(()=>k(null,null,function*(){yield Cn(o.clone,o.options),C()}),{fast:n})}),yield new Promise(C=>{ct(()=>k(null,null,function*(){yield Qt(o.element,o.clone,o.styleCache,o.options),C()}),{fast:n})}),e.embedFonts&&(yield new Promise(C=>{ct(()=>k(null,null,function*(){let S=Yt(o.element),v=Kt(o.element);if(G()){let b=new Set(Array.from(S).map(E=>String(E).split("__")[0]).filter(Boolean));yield Gt(b,1)}l=yield Xt({required:S,usedCodepoints:v,preCached:!1,exclude:o.options.excludeFonts,useProxy:o.options.useProxy}),C()}),{fast:n})}));let a=ie(o.clone).sort(),p=a.join(",");x.baseStyle.has(p)?d=x.baseStyle.get(p):yield new Promise(C=>{ct(()=>{d=ae(a),x.baseStyle.set(p,d),C()},{fast:n})}),o=F({fontsCSS:l,baseCSS:d},o),yield st("beforeRender",o),yield new Promise(C=>{ct(()=>{var Me;let S=getComputedStyle(o.element),v=o.element.getBoundingClientRect(),b=Math.max(1,I(o.element.offsetWidth||parseFloat(S.width)||v.width||1)),E=Math.max(1,I(o.element.offsetHeight||parseFloat(S.height)||v.height||1));if(((Me=o.options)==null?void 0:Me.excludeMode)==="remove"){let ot=Ln(o.element,o.options);Number.isFinite(ot)&&ot>0&&(E=Math.max(1,Math.min(E,I(ot+1))))}let A=(ot,at=NaN)=>{let wt=typeof ot=="string"?parseFloat(ot):ot;return Number.isFinite(wt)?wt:at},N=A(o.options.width),R=A(o.options.height),U=b,V=E,X=Number.isFinite(N),J=Number.isFinite(R),ut=E>0?b/E:1;X&&J?(U=Math.max(1,I(N)),V=Math.max(1,I(R))):X?(U=Math.max(1,I(N)),V=Math.max(1,I(U/(ut||1)))):J?(V=Math.max(1,I(R)),U=Math.max(1,I(V*(ut||1)))):(U=b,V=E);let Z=0,M=0,L=b,T=E;if(!r&&g&&Number.isFinite(g.a)){let ot={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0},at=Se(b,E,ot,0,0);Z=I(at.minX),M=I(at.minY),L=I(at.maxX),T=I(at.maxY)}else if(r&&Co(o.element)){let at=S.transform&&S.transform!=="none"?S.transform:"",wt=On(o.element),te=Un({baseTransform:at,rotate:wt.rotate||"0deg",scale:wt.scale,translate:wt.translate}),{ox:Gn,oy:Qn}=Wn(S,b,E),Jn=te.is2D?te:new DOMMatrix(te.toString()),Wt=Se(b,E,Jn,Gn,Qn);Z=I(Wt.minX),M=I(Wt.minY),L=I(Wt.maxX),T=I(Wt.maxY)}let D=Rn(S),$=Nn(S),P=Tn(S),q=Pn(S),z=s?{top:I(D.top+$.top+P.top+q.bleed.top),right:I(D.right+$.right+P.right+q.bleed.right),bottom:I(D.bottom+$.bottom+P.bottom+q.bleed.bottom),left:I(D.left+$.left+P.left+q.bleed.left)}:{top:0,right:0,bottom:0,left:0};Z=I(Z-z.left),M=I(M-z.top),L=I(L+z.right),T=I(T+z.bottom);let et=Math.max(1,I(L-Z)),W=Math.max(1,I(T-M)),H=X||J?I(U/b):1,j=J||X?I(V/E):1,_=Math.max(1,I(et*H)),K=Math.max(1,I(W*j)),Q="http://www.w3.org/2000/svg",ft=G()?1:0,nt=I(ft+(r?0:1)),rt=document.createElementNS(Q,"foreignObject"),Pt=I(Z),_t=I(M);rt.setAttribute("x",String(I(-(Pt-nt)))),rt.setAttribute("y",String(I(-(_t-nt)))),rt.setAttribute("width",String(I(b+nt*2))),rt.setAttribute("height",String(I(E+nt*2))),rt.style.overflow="visible";let Et=document.createElement("style");Et.textContent=o.baseCSS+o.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+o.classCSS,rt.appendChild(Et);let bt=document.createElement("div");bt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),bt.style.width=`${I(b)}px`,bt.style.height=`${I(E)}px`,bt.style.overflow="visible",o.clone.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),bt.appendChild(o.clone),rt.appendChild(bt);let Xn=new XMLSerializer().serializeToString(rt),Jt=I(et+nt*2),Zt=I(W+nt*2),Ae=X||J;e.meta={w0:b,h0:E,vbW:Jt,vbH:Zt,targetW:U,targetH:V};let Yn=G()&&Ae?Jt:I(_+nt*2),Kn=G()&&Ae?Zt:I(K+nt*2);h=`<svg xmlns="${Q}" width="${Yn}" height="${Kn}" viewBox="0 0 ${Jt} ${Zt}">`+Xn+"</svg>",f=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`,o=F({svgString:h,dataURL:f},o),C()},{fast:n})}),yield st("afterRender",o);let y=document.getElementById("snapdom-sandbox");return y&&y.style.position==="absolute"&&y.remove(),o.dataURL})}function Co(t){return Bn(t)}function ko(t){if(typeof t=="string"){let e=t.toLowerCase().trim();if(e==="disabled"||e==="full"||e==="auto"||e==="soft")return e}return"soft"}function Hn(t={}){var r,s,o,i,u,c,l,d,f,h,g,m,a,p,y,w,C,S,v,b;let e=(r=t.format)!=null?r:"png";e==="jpg"&&(e="jpeg");let n=ko(t.cache);return{debug:(s=t.debug)!=null?s:!1,fast:(o=t.fast)!=null?o:!0,scale:(i=t.scale)!=null?i:1,exclude:(u=t.exclude)!=null?u:[],excludeMode:(c=t.excludeMode)!=null?c:"hide",filter:(l=t.filter)!=null?l:null,filterMode:(d=t.filterMode)!=null?d:"hide",placeholders:t.placeholders!==!1,embedFonts:(f=t.embedFonts)!=null?f:!1,iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:(h=t.excludeFonts)!=null?h:void 0,fallbackURL:(g=t.fallbackURL)!=null?g:void 0,cache:n,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:(m=t.width)!=null?m:null,height:(a=t.height)!=null?a:null,format:e,type:(p=t.type)!=null?p:"svg",quality:(y=t.quality)!=null?y:.92,dpr:(w=t.dpr)!=null?w:window.devicePixelRatio||1,backgroundColor:(C=t.backgroundColor)!=null?C:["jpeg","webp"].includes(e)?"#ffffff":null,filename:(S=t.filename)!=null?S:"snapDOM",outerTransforms:(v=t.outerTransforms)!=null?v:!0,outerShadows:(b=t.outerShadows)!=null?b:!1}}function Ao(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function Mo(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function vo(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function Eo(t){let e=[],n="",r=0;for(let s=0;s<t.length;s++){let o=t[s];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(s=>s.trim()).filter(Boolean)}function Fo(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let i=t[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===","&&r===0?(e.push(n.trim()),n=""):n+=i}n.trim()&&e.push(n.trim());let s=[];for(let o of e){if(/\binset\b/i.test(o))continue;let i=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[u="0px",c="0px",l="0px"]=i,d=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),f=!!d&&d!==",";s.push(`drop-shadow(${u} ${c} ${l}${f?` ${d}`:""})`)}return s.join(" ")}function qn(t){let e=Eo(t),n=null,r=null,s=null,o=[];for(let u of e){let c=u.indexOf(":");if(c<0)continue;let l=u.slice(0,c).trim().toLowerCase(),d=u.slice(c+1).trim();l==="box-shadow"?s=d:l==="filter"?n=d:l==="-webkit-filter"?r=d:o.push([l,d])}if(s){let u=Fo(s);u&&(n=n?`${n} ${u}`:u,r=r?`${r} ${u}`:u)}let i=[...o];return n&&i.push(["filter",n]),r&&i.push(["-webkit-filter",r]),i.map(([u,c])=>`${u}:${c}`).join(";")}function $o(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${qn(r)}}`)}function Io(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,$o(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${qn(r)}${n}`),t}function Lo(t){if(!G()||!Ao(t))return t;try{let e=Mo(t),n=Io(e);return vo(n)}catch(e){return t}}function lt(t,e){return k(this,null,function*(){let{width:n,height:r,scale:s=1,dpr:o=1,meta:i={},backgroundColor:u}=e;t=Lo(t);let c=new Image;c.loading="eager",c.decoding="sync",c.crossOrigin="anonymous",c.src=t,yield c.decode();let l=c.naturalWidth,d=c.naturalHeight,f=Number.isFinite(i.w0)?i.w0:l,h=Number.isFinite(i.h0)?i.h0:d,g,m,a=Number.isFinite(n),p=Number.isFinite(r);if(a&&p)g=Math.max(1,n),m=Math.max(1,r);else if(a){let C=n/Math.max(1,f);g=n,m=h*C}else if(p){let C=r/Math.max(1,h);m=r,g=f*C}else g=l,m=d;g=g*s,m=m*s;let y=document.createElement("canvas");y.width=g*o,y.height=m*o,y.style.width=`${g}px`,y.style.height=`${m}px`;let w=y.getContext("2d");return o!==1&&w.scale(o,o),u&&(w.save(),w.fillStyle=u,w.fillRect(0,0,g,m),w.restore()),w.drawImage(c,0,0,g,m),y})}function it(t,e){return k(this,null,function*(){let n=yield lt(t,e),r=new Image;return r.src=n.toDataURL(`image/${e.format}`,e.quality),yield r.decode(),r.style.width=`${n.width/e.dpr}px`,r.style.height=`${n.height/e.dpr}px`,r})}function Mt(t,e){return k(this,null,function*(){let{scale:n=1,width:r,height:s,meta:o={}}=e,i=Number.isFinite(r),u=Number.isFinite(s),c=Number.isFinite(n)&&n!==1||i||u;if(G()&&c)return yield it(t,O(F({},e),{format:"png",quality:1,meta:o}));let l=new Image;if(l.decoding="sync",l.loading="eager",l.src=t,yield l.decode(),i&&u)l.style.width=`${r}px`,l.style.height=`${s}px`;else if(i){let d=Number.isFinite(o.w0)?o.w0:l.naturalWidth,f=Number.isFinite(o.h0)?o.h0:l.naturalHeight,h=r/Math.max(1,d);l.style.width=`${r}px`,l.style.height=`${Math.round(f*h)}px`}else if(u){let d=Number.isFinite(o.w0)?o.w0:l.naturalWidth,f=Number.isFinite(o.h0)?o.h0:l.naturalHeight,h=s/Math.max(1,f);l.style.height=`${s}px`,l.style.width=`${Math.round(d*h)}px`}else{let d=Math.round(l.naturalWidth*n),f=Math.round(l.naturalHeight*n);if(l.style.width=`${d}px`,l.style.height=`${f}px`,typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let g=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${d}"`).replace(/height="[^"]*"/,`height="${f}"`);t=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g)}`,l.src=t}catch(h){}}return l})}function Tt(t,e){return k(this,null,function*(){let n=e.type;if(n==="svg"){let s=decodeURIComponent(t.split(",")[1]);return new Blob([s],{type:"image/svg+xml"})}let r=yield lt(t,e);return new Promise(s=>r.toBlob(o=>s(o),`image/${n}`,e.quality))})}function zn(t,e){return k(this,null,function*(){if(e.dpr=1,e.format==="svg"){let s=yield Tt(t,O(F({},e),{type:"svg"})),o=URL.createObjectURL(s),i=document.createElement("a");i.href=o,i.download=e.filename,i.click(),URL.revokeObjectURL(o);return}let n=yield lt(t,e),r=document.createElement("a");r.href=n.toDataURL(`image/${e.format}`,e.quality),r.download=e.filename,r.click()})}B.plugins=(...t)=>(we(...t),B);var jn=Symbol("snapdom.internal"),pt=Symbol("snapdom.internal.silent"),ke=!1;function B(t,e){return k(this,null,function*(){if(!t)throw new Error("Element cannot be null or undefined");let n=Hn(e);if(En(n,e&&e.plugins),G()&&(n.embedFonts===!0||No(t)))for(let r=0;r<3;r++)try{yield Ro(t,e),console.log("safariWarmup:",r),ke=!1}catch(s){}return n.iconFonts&&n.iconFonts.length>0&&Ke(n.iconFonts),n.snap||(n.snap={toPng:(r,s)=>B.toPng(r,s),toSvg:(r,s)=>B.toSvg(r,s)}),B.capture(t,n,jn)})}B.plugins=(...t)=>(we(...t),B);B.capture=(t,e,n)=>k(null,null,function*(){if(n!==jn)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let r=yield Ce(t,e),s={img:(a,p)=>k(null,null,function*(){return Mt(r,F(F({},a),p||{}))}),svg:(a,p)=>k(null,null,function*(){return Mt(r,F(F({},a),p||{}))}),canvas:(a,p)=>k(null,null,function*(){return lt(r,F(F({},a),p||{}))}),blob:(a,p)=>k(null,null,function*(){return Tt(r,F(F({},a),p||{}))}),png:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"png"}))}),jpeg:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"jpeg"}))}),webp:(a,p)=>k(null,null,function*(){return it(r,O(F(F({},a),p||{}),{format:"webp"}))}),download:(a,p)=>k(null,null,function*(){return zn(r,F(F({},a),p||{}))})},o={svg:a=>Mt(r,O(F(F({},e),a||{}),{[pt]:!0})),canvas:a=>lt(r,O(F(F({},e),a||{}),{[pt]:!0})),png:a=>it(r,O(F(F({},e),a||{}),{format:"png",[pt]:!0})),jpeg:a=>it(r,O(F(F({},e),a||{}),{format:"jpeg",[pt]:!0})),jpg:a=>it(r,O(F(F({},e),a||{}),{format:"jpeg",[pt]:!0})),webp:a=>it(r,O(F(F({},e),a||{}),{format:"webp",[pt]:!0})),blob:a=>Tt(r,O(F(F({},e),a||{}),{[pt]:!0})),img:a=>Mt(r,O(F(F({},e),a||{}),{[pt]:!0}))},i=O(F({},e),{export:{url:r},exports:o}),u=yield vn("defineExports",i),c=Object.assign({},...u.filter(a=>a&&typeof a=="object")),l=F(F({},s),c);l.jpeg&&!l.jpg&&(l.jpg=(a,p)=>l.jpeg(a,p));function d(a,p){let y=F(F({},e),p||{});return(a==="jpeg"||a==="jpg")&&(y.backgroundColor==null||y.backgroundColor==="transparent")&&(y.backgroundColor="#ffffff"),y}let f=!1,h=Promise.resolve();function g(a,p){return k(this,null,function*(){let y=()=>k(null,null,function*(){let w=l[a];if(!w)throw new Error(`[snapdom] Unknown export type: ${a}`);let C=d(a,p),S=O(F({},e),{export:{type:a,options:C,url:r}});yield st("beforeExport",S);let v=yield w(S,C);return yield st("afterExport",S,v),f||(f=!0,yield st("afterSnap",e)),v});return h=h.then(y)})}let m={url:r,toRaw:()=>r,to:(a,p)=>g(a,p),toImg:a=>g("img",a),toSvg:a=>g("svg",a),toCanvas:a=>g("canvas",a),toBlob:a=>g("blob",a),toPng:a=>g("png",a),toJpg:a=>g("jpg",a),toWebp:a=>g("webp",a),download:a=>g("download",a)};for(let a of Object.keys(l)){let p="to"+a.charAt(0).toUpperCase()+a.slice(1);m[p]||(m[p]=y=>g(a,y))}return m});B.toRaw=(t,e)=>B(t,e).then(n=>n.toRaw());B.toImg=(t,e)=>B(t,e).then(n=>n.toImg());B.toSvg=(t,e)=>B(t,e).then(n=>n.toSvg());B.toCanvas=(t,e)=>B(t,e).then(n=>n.toCanvas());B.toBlob=(t,e)=>B(t,e).then(n=>n.toBlob());B.toPng=(t,e)=>B(t,O(F({},e),{format:"png"})).then(n=>n.toPng());B.toJpg=(t,e)=>B(t,O(F({},e),{format:"jpeg"})).then(n=>n.toJpg());B.toWebp=(t,e)=>B(t,O(F({},e),{format:"webp"})).then(n=>n.toWebp());B.download=(t,e)=>B(t,e).then(n=>n.download());function Ro(t,e){return k(this,null,function*(){if(ke)return;let n=O(F({},e),{fast:!0,embedFonts:!0,scale:.2}),r;try{r=yield Ce(t,n)}catch(s){}yield new Promise(s=>requestAnimationFrame(()=>requestAnimationFrame(s))),r&&(yield new Promise(s=>{let o=new Image;try{o.decoding="sync",o.loading="eager"}catch(i){}o.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",o.src=r,document.body.appendChild(o),k(null,null,function*(){try{typeof o.decode=="function"&&(yield o.decode())}catch(u){}let i=performance.now();for(;!(o.complete&&o.naturalWidth>0)&&performance.now()-i<900;)yield new Promise(u=>setTimeout(u,50));yield new Promise(u=>requestAnimationFrame(u));try{o.remove()}catch(u){}s()})})),t.querySelectorAll("canvas").forEach(s=>{try{let o=s.getContext("2d",{willReadFrequently:!0});o&&o.getImageData(0,0,1,1)}catch(o){}}),ke=!0})}function No(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();){let n=e.currentNode,r=getComputedStyle(n),s=r.backgroundImage&&r.backgroundImage!=="none",o=r.maskImage&&r.maskImage!=="none"||r.webkitMaskImage&&r.webkitMaskImage!=="none";if(s||o||n.tagName==="CANVAS")return!0}return!1}function Vn(){return k(this,arguments,function*(t=document,e={}){var c,l,d,f,h,g;let{embedFonts:n=!0,useProxy:r=""}=e,s=(l=(c=e.cache)!=null?c:e.cacheOpt)!=null?l:"full";Ot(s);try{yield(d=document.fonts)==null?void 0:d.ready}catch(m){}try{oe()}catch(m){}x.session=x.session||{},x.session.styleCache||(x.session.styleCache=new WeakMap),x.image=x.image||new Map,x.background=x.background||new Map;try{yield Qt(t,void 0,x.session.styleCache,{useProxy:r})}catch(m){}let o=[],i=[];try{if(t&&t.nodeType===1){let m=t.querySelectorAll?Array.from(t.querySelectorAll("*")):[];i=[t,...m],o=[],t.tagName==="IMG"&&t.getAttribute("src")&&o.push(t),o.push(...Array.from(((f=t.querySelectorAll)==null?void 0:f.call(t,"img[src]"))||[]))}else t!=null&&t.querySelectorAll&&(o=Array.from(t.querySelectorAll("img[src]")),i=Array.from(t.querySelectorAll("*")))}catch(m){}let u=[];for(let m of o){let a=(m==null?void 0:m.currentSrc)||(m==null?void 0:m.src);if(a&&!x.image.has(a)){let p=Promise.resolve().then(()=>k(null,null,function*(){let y=yield Y(a,{as:"dataURL",useProxy:r});y!=null&&y.ok&&typeof y.data=="string"&&x.image.set(a,y.data)})).catch(()=>{});u.push(p)}}for(let m of i){let a="";try{a=((h=m==null?void 0:m.style)==null?void 0:h.backgroundImage)||"",(!a||a==="none")&&(a=yt(m).backgroundImage)}catch(p){}if(a&&a!=="none"){let p=a.match(/url\((?:[^()"']+|"(?:[^"]*)"|'(?:[^']*)')\)/gi)||[];for(let y of p){let w=Promise.resolve().then(()=>gt(y,O(F({},e),{useProxy:r}))).catch(()=>{});u.push(w)}}}if(n)try{let m=Yt(t),a=Kt(t);if(typeof G=="function"?G():!!G){let y=new Set(Array.from(m).map(w=>String(w).split("__")[0]).filter(Boolean));yield Gt(y,3)}yield Xt({required:m,usedCodepoints:a,exclude:e.excludeFonts,localFonts:e.localFonts,useProxy:(g=e.useProxy)!=null?g:r})}catch(m){}yield Promise.allSettled(u)})}typeof window!="undefined"&&(window.snapdom=B,window.preCache=Vn);})();
|