very-happy-dom 0.3.5 → 0.3.6
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/CHANGELOG.md +14 -0
- package/dist/chunk-01cx557f.js +2 -0
- package/dist/chunk-7nvqhgy6.js +2 -0
- package/dist/chunk-bmdkjp4f.js +3 -0
- package/dist/{chunk-1rvpej1f.js → chunk-bp62z0j0.js} +2 -2
- package/dist/chunk-ebdfrfsg.js +2 -0
- package/dist/chunk-f0ngsq86.js +2 -0
- package/dist/{chunk-stw0qehr.js → chunk-fhfrv3f8.js} +3 -3
- package/dist/{chunk-14m9hw4k.js → chunk-h327p3as.js} +1 -1
- package/dist/{chunk-a5gtqx99.js → chunk-hwgwz1m6.js} +2 -2
- package/dist/chunk-j3zvhv0k.js +3 -0
- package/dist/{chunk-65zj7vm5.js → chunk-jdkvaaa4.js} +2 -2
- package/dist/chunk-jxznxddr.js +11 -0
- package/dist/{chunk-m0c56871.js → chunk-mjqapq3f.js} +2 -2
- package/dist/{chunk-yh7sqskw.js → chunk-mvaxw3g5.js} +1 -1
- package/dist/{chunk-t1v0nj69.js → chunk-p69ye760.js} +2 -2
- package/dist/chunk-rq690b5e.js +2 -0
- package/dist/chunk-s7n7ce71.js +2 -0
- package/dist/chunk-tvh31r81.js +2 -0
- package/dist/chunk-v3raywwq.js +8 -0
- package/dist/{chunk-w2g7xbfh.js → chunk-ye61xwrm.js} +2 -2
- package/dist/index.js +8 -8
- package/dist/jsdom/index.js +1 -1
- package/dist/matchers.js +2 -2
- package/dist/nodes/inert.d.ts +4 -0
- package/dist/register.js +1 -1
- package/dist/screenshot/webview.js +1 -1
- package/dist/webcomponents/CustomElementRegistry.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-2fj4bj05.js +0 -2
- package/dist/chunk-4pj9whd6.js +0 -2
- package/dist/chunk-4rkv71j2.js +0 -8
- package/dist/chunk-7e10724v.js +0 -11
- package/dist/chunk-8npp472f.js +0 -2
- package/dist/chunk-a6pxryjh.js +0 -2
- package/dist/chunk-axyyzc2e.js +0 -3
- package/dist/chunk-cv38mg46.js +0 -2
- package/dist/chunk-d5edpdkj.js +0 -3
- package/dist/chunk-gx33dcgq.js +0 -2
- package/dist/chunk-k63rmfca.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
[Compare changes](https://github.com/stacksjs/very-happy-dom/compare/v0.3.5...v0.3.6)
|
|
2
|
+
|
|
3
|
+
## 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **dom**: clone constructs custom elements; template content is inert ([6475fcb](https://github.com/stacksjs/very-happy-dom/commit/6475fcb)) _(by Chris <chrisbreuer93@gmail.com>)_
|
|
6
|
+
|
|
7
|
+
## 🔧 Chores
|
|
8
|
+
|
|
9
|
+
- release v0.3.6 ([29dbe9a](https://github.com/stacksjs/very-happy-dom/commit/29dbe9a)) _(by Chris <chrisbreuer93@gmail.com>)_
|
|
10
|
+
|
|
11
|
+
## Contributors
|
|
12
|
+
|
|
13
|
+
- _Chris <chrisbreuer93@gmail.com>_
|
|
14
|
+
|
|
1
15
|
[Compare changes](https://github.com/stacksjs/very-happy-dom/compare/v0.3.4...HEAD)
|
|
2
16
|
|
|
3
17
|
## 🐛 Bug Fixes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{o,c,d}from"./chunk-j3zvhv0k.js";var B=0;function Ce(){return B>0}function F(e){B++;try{return e()}finally{B--}}function Qi(e){let a=e?.parentNode;while(a){if(a._isTemplateContent)return!0;a=a.parentNode}return!1}var M={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",divide:"\xF7",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A"};function A(e){return e.replace(/&(#x?[0-9a-f]+|[a-z]+);/gi,(a,t)=>{if(t.startsWith("#x")||t.startsWith("#X")){let E=Number.parseInt(t.slice(2),16);return Number.isNaN(E)?`&${t};`:String.fromCodePoint(E)}if(t.startsWith("#")){let E=Number.parseInt(t.slice(1),10);return Number.isNaN(E)?`&${t};`:String.fromCodePoint(E)}return M[t]??M[t.toLowerCase()]??`&${t};`})}function et(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function fi(e){return et(e).replace(/"/g,""")}class x extends d{nodeType=c;nodeKind="comment";nodeName="#comment";nodeValue;constructor(e){super();this.nodeValue=e}get textContent(){return this.nodeValue||""}set textContent(e){this.nodeValue=e}get data(){return this.nodeValue||""}set data(e){this.nodeValue=e}get length(){return(this.nodeValue||"").length}substringData(e,a){let t=this.nodeValue||"";if(e<0||e>t.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");return t.slice(e,e+a)}appendData(e){this.nodeValue=(this.nodeValue||"")+e}insertData(e,a){let t=this.nodeValue||"";if(e<0||e>t.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.nodeValue=t.slice(0,e)+a+t.slice(e)}deleteData(e,a){let t=this.nodeValue||"";if(e<0||e>t.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.nodeValue=t.slice(0,e)+t.slice(e+a)}replaceData(e,a,t){let E=this.nodeValue||"";if(e<0||e>E.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.nodeValue=E.slice(0,e)+t+E.slice(e+a)}cloneNode(){return new x(this.nodeValue)}}var w="http://www.w3.org/2000/svg",z="http://www.w3.org/1998/Math/MathML",D=null;function K(){if(!D)D={VirtualElement:import.meta.require("./chunk-tvh31r81.js").VirtualElement,VirtualSVGElement:import.meta.require("./chunk-01cx557f.js").VirtualSVGElement};return D}function m(e,a){let t=0,E=e.toLowerCase();function i(){return e[t]||""}function g(){return e[t++]||""}function N(){while(/\s/.test(i()))g()}function h(u,n=null){if(a){if(n)return a.createElementNS?.(n,u);return a.createElement(u)}let{VirtualElement:r,VirtualSVGElement:f}=K(),p=n===w?new f(u):new r(u);if(n&&n!==w)p.namespaceURI=n;return p}function T(u){let n=a?.createTextNode?.(u)??new o(u);if(!n.ownerDocument&&a)n.ownerDocument=a;return n}function L(u){let n=a?.createComment?.(u)??new x(u);if(!n.ownerDocument&&a)n.ownerDocument=a;return n}function y(u){if(e.slice(t,t+2)!=="</")return!1;let n=e.indexOf(">",t+2);if(n===-1)return!1;if(e.slice(t+2,n).trim().toLowerCase()!==u.toLowerCase())return!1;return t=n+1,!0}function P(u){let n=`</${u.toLowerCase()}`,r=E.indexOf(n,t);if(r===-1){let p=e.slice(t);return t=e.length,p}let f=e.slice(t,r);return t=r,f}function k(){if(i()!=="<"||e.slice(t,t+2)==="</"||e.slice(t,t+4)==="<!--"||e.slice(t,t+2)==="<!")return null;let u=t+1,n="";while(e[u]&&/[a-z0-9-]/i.test(e[u]))n+=e[u],u++;return n?n.toLowerCase():null}function I(){if(e.slice(t,t+2)!=="</")return null;let u=t+2,n="";while(e[u]&&/[a-z0-9-]/i.test(e[u]))n+=e[u],u++;return n?n.toLowerCase():null}function G(u,n){if(!n)return!1;return{li:["li"],p:["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"],dt:["dt","dd"],dd:["dt","dd"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tr:["tr","tbody","thead","tfoot"],td:["td","th","tr","tbody","thead","tfoot"],th:["td","th","tr","tbody","thead","tfoot"]}[u]?.includes(n)??!1}function H(u,n){if(n.nodeType!==1){u.appendChild(n);return}let r=u.tagName.toLowerCase(),p=n.tagName.toLowerCase();if(r==="table"&&p==="tr"){let l=u.lastChild;if(!l||l.nodeType!==1||l.tagName!=="TBODY")l=h("tbody",u.namespaceURI),u.appendChild(l);l.appendChild(n);return}if(r==="table"&&(p==="td"||p==="th")){let l=u.lastChild;if(!l||l.nodeType!==1||l.tagName!=="TBODY")l=h("tbody",u.namespaceURI),u.appendChild(l);let C=l.lastChild;if(!C||C.nodeType!==1||C.tagName!=="TR")C=h("tr",u.namespaceURI),l.appendChild(C);C.appendChild(n);return}if((r==="tbody"||r==="thead"||r==="tfoot")&&(p==="td"||p==="th")){let l=u.lastChild;if(!l||l.nodeType!==1||l.tagName!=="TR")l=h("tr",u.namespaceURI),u.appendChild(l);l.appendChild(n);return}u.appendChild(n)}function U(u=null){if(i()!=="<")return null;if(g(),e.slice(t,t+3)==="!--"){t+=3;let s=e.indexOf("-->",t);if(s===-1)throw Error("Unclosed comment");let V=e.slice(t,s);return t=s+3,L(V)}if(e.slice(t,t+8).toUpperCase()==="!DOCTYPE"){let s=e.indexOf(">",t);if(s===-1)throw Error("Unclosed DOCTYPE");return t=s+1,null}if(i()==="/"){g();let s=e.indexOf(">",t);if(s===-1)throw Error("Unclosed tag");return t=s+1,null}let n="";while(i()&&/[a-z0-9-]/i.test(i()))n+=g();if(!n)throw Error("Invalid tag name");let r=n.toLowerCase(),f=u===w||u===z?u:r==="svg"?w:r==="math"?z:null,p=h(n,f),l=f===w&&r==="foreignobject"?null:f;while(i()&&i()!==">"&&i()!=="/"){if(N(),i()===">"||i()==="/")break;let s="";while(i()&&!/[\s/>="']/.test(i()))s+=g();if(!s){g();continue}N();let V="",S=!1;if(i()==="=")if(S=!0,g(),N(),i()==='"'||i()==="'"){let q=g();while(i()&&i()!==q)V+=g();if(i()===q)g()}else while(i()&&!/[\s>]/.test(i()))V+=g();p.setAttribute(s,S?A(V):"")}let C=i()==="/";if(C)g();if(i()===">")g();if(C||["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(r))return p;let R=new Set(["script","style"]),O=new Set(["textarea","title"]);if(R.has(r)||O.has(r)){let s=P(n);if(s)p.appendChild(T(O.has(r)?A(s):s));return y(n),p}let _=r==="template"?F(()=>b(r,l)):b(r,l);for(let s of _)H(p,s);return p}function v(){if(i()!=="<")return!1;let u=e[t+1];if(u===void 0)return!1;if(/[a-z]/i.test(u))return!0;if(u==="/")return/[a-z]/i.test(e[t+2]??"");if(u==="!")return e.slice(t+1,t+4)==="!--"||e.slice(t+1,t+9).toUpperCase()==="!DOCTYPE";return!1}function Y(){let u="";while(i()&&!v())u+=g();if(!u)return null;return T(A(u))}function b(u,n=null){let r=[];while(t<e.length){if(u&&y(u))break;if(u&&I())break;if(u&&G(u,k()))break;if(v()){let f=U(n);if(f===null)continue;r.push(f)}else{let f=Y();if(f)r.push(f)}}return r}return b()}
|
|
3
|
+
export{Ce,F,Qi,et,fi,x,m};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Z={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:255},white:{r:255,g:255,b:255,a:255},red:{r:255,g:0,b:0,a:255},green:{r:0,g:128,b:0,a:255},blue:{r:0,g:0,b:255,a:255},yellow:{r:255,g:255,b:0,a:255},cyan:{r:0,g:255,b:255,a:255},magenta:{r:255,g:0,b:255,a:255},gray:{r:128,g:128,b:128,a:255},grey:{r:128,g:128,b:128,a:255},silver:{r:192,g:192,b:192,a:255},maroon:{r:128,g:0,b:0,a:255},olive:{r:128,g:128,b:0,a:255},lime:{r:0,g:255,b:0,a:255},aqua:{r:0,g:255,b:255,a:255},teal:{r:0,g:128,b:128,a:255},navy:{r:0,g:0,b:128,a:255},fuchsia:{r:255,g:0,b:255,a:255},purple:{r:128,g:0,b:128,a:255},orange:{r:255,g:165,b:0,a:255},pink:{r:255,g:192,b:203,a:255},brown:{r:165,g:42,b:42,a:255},gold:{r:255,g:215,b:0,a:255},indigo:{r:75,g:0,b:130,a:255},violet:{r:238,g:130,b:238,a:255},coral:{r:255,g:127,b:80,a:255},salmon:{r:250,g:128,b:114,a:255},khaki:{r:240,g:230,b:140,a:255},plum:{r:221,g:160,b:221,a:255},orchid:{r:218,g:112,b:214,a:255},turquoise:{r:64,g:224,b:208,a:255},tan:{r:210,g:180,b:140,a:255},chocolate:{r:210,g:105,b:30,a:255},tomato:{r:255,g:99,b:71,a:255},crimson:{r:220,g:20,b:60,a:255},darkblue:{r:0,g:0,b:139,a:255},darkgreen:{r:0,g:100,b:0,a:255},darkred:{r:139,g:0,b:0,a:255},darkorange:{r:255,g:140,b:0,a:255},lightblue:{r:173,g:216,b:230,a:255},lightgreen:{r:144,g:238,b:144,a:255},lightgray:{r:211,g:211,b:211,a:255},lightgrey:{r:211,g:211,b:211,a:255},lightpink:{r:255,g:182,b:193,a:255},lightyellow:{r:255,g:255,b:224,a:255},darkgray:{r:169,g:169,b:169,a:255},darkgrey:{r:169,g:169,b:169,a:255},slategray:{r:112,g:128,b:144,a:255},slategrey:{r:112,g:128,b:144,a:255},dimgray:{r:105,g:105,b:105,a:255},dimgrey:{r:105,g:105,b:105,a:255},whitesmoke:{r:245,g:245,b:245,a:255},snow:{r:255,g:250,b:250,a:255},ivory:{r:255,g:255,b:240,a:255},beige:{r:245,g:245,b:220,a:255},linen:{r:250,g:240,b:230,a:255},aliceblue:{r:240,g:248,b:255,a:255},antiquewhite:{r:250,g:235,b:215,a:255},azure:{r:240,g:255,b:255,a:255},bisque:{r:255,g:228,b:196,a:255},blanchedalmond:{r:255,g:235,b:205,a:255},burlywood:{r:222,g:184,b:135,a:255},cadetblue:{r:95,g:158,b:160,a:255},chartreuse:{r:127,g:255,b:0,a:255},cornflowerblue:{r:100,g:149,b:237,a:255},cornsilk:{r:255,g:248,b:220,a:255},deeppink:{r:255,g:20,b:147,a:255},deepskyblue:{r:0,g:191,b:255,a:255},dodgerblue:{r:30,g:144,b:255,a:255},firebrick:{r:178,g:34,b:34,a:255},floralwhite:{r:255,g:250,b:240,a:255},forestgreen:{r:34,g:139,b:34,a:255},gainsboro:{r:220,g:220,b:220,a:255},ghostwhite:{r:248,g:248,b:255,a:255},greenyellow:{r:173,g:255,b:47,a:255},honeydew:{r:240,g:255,b:240,a:255},hotpink:{r:255,g:105,b:180,a:255},indianred:{r:205,g:92,b:92,a:255},lavender:{r:230,g:230,b:250,a:255},lavenderblush:{r:255,g:240,b:245,a:255},lawngreen:{r:124,g:252,b:0,a:255},lemonchiffon:{r:255,g:250,b:205,a:255},lightcoral:{r:240,g:128,b:128,a:255},lightcyan:{r:224,g:255,b:255,a:255},lightgoldenrodyellow:{r:250,g:250,b:210,a:255},lightsalmon:{r:255,g:160,b:122,a:255},lightseagreen:{r:32,g:178,b:170,a:255},lightskyblue:{r:135,g:206,b:250,a:255},lightslategray:{r:119,g:136,b:153,a:255},lightslategrey:{r:119,g:136,b:153,a:255},lightsteelblue:{r:176,g:196,b:222,a:255},limegreen:{r:50,g:205,b:50,a:255},mediumaquamarine:{r:102,g:205,b:170,a:255},mediumblue:{r:0,g:0,b:205,a:255},mediumorchid:{r:186,g:85,b:211,a:255},mediumpurple:{r:147,g:112,b:219,a:255},mediumseagreen:{r:60,g:179,b:113,a:255},mediumslateblue:{r:123,g:104,b:238,a:255},mediumspringgreen:{r:0,g:250,b:154,a:255},mediumturquoise:{r:72,g:209,b:204,a:255},mediumvioletred:{r:199,g:21,b:133,a:255},midnightblue:{r:25,g:25,b:112,a:255},mintcream:{r:245,g:255,b:250,a:255},mistyrose:{r:255,g:228,b:225,a:255},moccasin:{r:255,g:228,b:181,a:255},navajowhite:{r:255,g:222,b:173,a:255},oldlace:{r:253,g:245,b:230,a:255},olivedrab:{r:107,g:142,b:35,a:255},orangered:{r:255,g:69,b:0,a:255},palegoldenrod:{r:238,g:232,b:170,a:255},palegreen:{r:152,g:251,b:152,a:255},paleturquoise:{r:175,g:238,b:238,a:255},palevioletred:{r:219,g:112,b:147,a:255},papayawhip:{r:255,g:239,b:213,a:255},peachpuff:{r:255,g:218,b:185,a:255},peru:{r:205,g:133,b:63,a:255},powderblue:{r:176,g:224,b:230,a:255},rosybrown:{r:188,g:143,b:143,a:255},royalblue:{r:65,g:105,b:225,a:255},saddlebrown:{r:139,g:69,b:19,a:255},sandybrown:{r:244,g:164,b:96,a:255},seagreen:{r:46,g:139,b:87,a:255},seashell:{r:255,g:245,b:238,a:255},sienna:{r:160,g:82,b:45,a:255},skyblue:{r:135,g:206,b:235,a:255},slateblue:{r:106,g:90,b:205,a:255},springgreen:{r:0,g:255,b:127,a:255},steelblue:{r:70,g:130,b:180,a:255},thistle:{r:216,g:191,b:216,a:255},wheat:{r:245,g:222,b:179,a:255},yellowgreen:{r:154,g:205,b:50,a:255}};function S(r){if(!r)return{r:0,g:0,b:0,a:0};if(r=r.trim().toLowerCase(),Z[r])return{...Z[r]};if(r.startsWith("#"))return dr(r);if(r.startsWith("rgb"))return cr(r);if(r.startsWith("hsl"))return lr(r);return{r:0,g:0,b:0,a:0}}function dr(r){r=r.slice(1);let o,e,a,t=255;if(r.length===3)o=Number.parseInt(r[0]+r[0],16),e=Number.parseInt(r[1]+r[1],16),a=Number.parseInt(r[2]+r[2],16);else if(r.length===4)o=Number.parseInt(r[0]+r[0],16),e=Number.parseInt(r[1]+r[1],16),a=Number.parseInt(r[2]+r[2],16),t=Number.parseInt(r[3]+r[3],16);else if(r.length===6)o=Number.parseInt(r.slice(0,2),16),e=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16);else if(r.length===8)o=Number.parseInt(r.slice(0,2),16),e=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16),t=Number.parseInt(r.slice(6,8),16);else return{r:0,g:0,b:0,a:0};return{r:o,g:e,b:a,a:t}}function cr(r){let o=r.match(/rgba?\s*\(\s*([^)]+)\s*\)/);if(!o)return{r:0,g:0,b:0,a:0};let e=o[1].split(/[\s,/]+/).map((b)=>b.trim()).filter(Boolean),a=w(e[0],255),t=w(e[1],255),n=w(e[2],255),g=e[3]!==void 0?w(e[3],1)*255:255;return{r:Math.round(Math.min(255,Math.max(0,a))),g:Math.round(Math.min(255,Math.max(0,t))),b:Math.round(Math.min(255,Math.max(0,n))),a:Math.round(Math.min(255,Math.max(0,g)))}}function lr(r){let o=r.match(/hsla?\s*\(\s*([^)]+)\s*\)/);if(!o)return{r:0,g:0,b:0,a:0};let e=o[1].split(/[\s,/]+/).map((p)=>p.trim()).filter(Boolean),a=ur(e[0]),t=w(e[1],100)/100,n=w(e[2],100)/100,g=e[3]!==void 0?w(e[3],1):1,{r:b,g:s,b:l}=mr(a,t,n);return{r:Math.round(b),g:Math.round(s),b:Math.round(l),a:Math.round(g*255)}}function w(r,o){if(!r)return 0;if(r.endsWith("%"))return Number.parseFloat(r)/100*o;return Number.parseFloat(r)}function ur(r){if(!r)return 0;if(r=r.toLowerCase(),r.endsWith("deg"))return Number.parseFloat(r)/360;if(r.endsWith("rad"))return Number.parseFloat(r)/(2*Math.PI);if(r.endsWith("grad"))return Number.parseFloat(r)/400;if(r.endsWith("turn"))return Number.parseFloat(r);return Number.parseFloat(r)/360}function mr(r,o,e){let a,t,n;if(o===0)a=t=n=e*255;else{let g=(l,p,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return l+(p-l)*6*i;if(i<0.5)return p;if(i<0.6666666666666666)return l+(p-l)*(0.6666666666666666-i)*6;return l},b=e<0.5?e*(1+o):e+o-e*o,s=2*e-b;a=g(s,b,r+0.3333333333333333)*255,t=g(s,b,r)*255,n=g(s,b,r-0.3333333333333333)*255}return{r:a,g:t,b:n}}function c(r,o=0,e=0){if(!r)return o;if(r=r.trim().toLowerCase(),r==="auto")return o;if(r.endsWith("px"))return Number.parseFloat(r);if(r.endsWith("%"))return Number.parseFloat(r)/100*e;if(r.endsWith("em"))return Number.parseFloat(r)*16;if(r.endsWith("rem"))return Number.parseFloat(r)*16;if(r.endsWith("vw"))return Number.parseFloat(r)/100*e;if(r.endsWith("vh"))return Number.parseFloat(r)/100*e;let a=Number.parseFloat(r);return Number.isNaN(a)?o:a}function z(r){if(!r)return[0,0,0,0];let e=r.trim().split(/\s+/).map((a)=>c(a,0));switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return[e[0],e[1],e[2],e[3]];default:return[0,0,0,0]}}function v(r){let o={};if(!r)return o;let e=r.split(";");for(let a of e){let[t,...n]=a.split(":");if(t&&n.length>0){let g=t.trim().toLowerCase(),b=n.join(":").trim();o[g]=b}}return o}function $i(r,o){let e=r.a/255,a=o.a/255,t=e+a*(1-e);if(t===0)return{r:0,g:0,b:0,a:0};return{r:Math.round((r.r*e+o.r*a*(1-e))/t),g:Math.round((r.g*e+o.g*a*(1-e))/t),b:Math.round((r.b*e+o.b*a*(1-e))/t),a:Math.round(t*255)}}var or={backgroundColor:{r:0,g:0,b:0,a:0},color:{r:0,g:0,b:0,a:255},borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderTopColor:{r:0,g:0,b:0,a:255},borderRightColor:{r:0,g:0,b:0,a:255},borderBottomColor:{r:0,g:0,b:0,a:255},borderLeftColor:{r:0,g:0,b:0,a:255},borderRadius:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,fontSize:16,fontWeight:"normal",fontFamily:"sans-serif",textAlign:"left",display:"block",position:"static",top:0,right:0,bottom:0,left:0,opacity:1,overflow:"visible",boxShadow:null},ar=new Set(["div","p","h1","h2","h3","h4","h5","h6","section","article","header","footer","main","nav","aside","ul","ol","li","dl","dt","dd","table","tr","th","td","thead","tbody","tfoot","form","fieldset","legend","blockquote","pre","address","hr","figure","figcaption"]);function pr(r){let o={tagName:"div",attributes:{},children:[]},e=[o],a=o,t=0,n=(g)=>g.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/&#(\d+);/g,(b,s)=>String.fromCharCode(Number.parseInt(s))).replace(/&#x([0-9a-f]+);/gi,(b,s)=>String.fromCharCode(Number.parseInt(s,16))).replace(/ /g," ");while(t<r.length){let g=r.indexOf("<",t);if(g>t||g===-1){let i=g===-1?r.length:g,u=n(r.slice(t,i).trim());if(u)a.children.push(u);if(g===-1)break;t=g}if(r.slice(t,t+4)==="<!--"){let i=r.indexOf("-->",t+4);t=i===-1?r.length:i+3;continue}if(r.slice(t,t+2).toLowerCase()==="<!"){let i=r.indexOf(">",t);t=i===-1?r.length:i+1;continue}let b=r.indexOf(">",t);if(b===-1)break;let s=r.slice(t+1,b),l=s.endsWith("/")||s.endsWith("/");if(s.startsWith("/")){let i=s.slice(1).trim().toLowerCase().split(/\s/)[0];while(e.length>1){let u=e.pop();if(a=e[e.length-1],u.tagName===i)break}}else{let i=s.search(/\s/),u=i===-1?s:s.slice(0,i);u=u.replace(/\/$/,"").toLowerCase();let h={};if(i!==-1){let M=s.slice(i).replace(/\/$/,""),d=/([a-z-]+)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/gi,f;while((f=d.exec(M))!==null){let G=f[1].toLowerCase(),P=f[2]??f[3]??f[4]??"";h[G]=n(P)}}let N={tagName:u,attributes:h,children:[]};if(a.children.push(N),!l&&!new Set(["br","hr","img","input","meta","link","area","base","col","embed","param","source","track","wbr"]).has(u))e.push(N),a=N}t=b+1}return o}function rr(r){let o=[];r=r.replace(/\/\*[\s\S]*?\*\//g,"");let e=/([^{}]+)\{([^}]*)\}/g,a;while((a=e.exec(r))!==null){let t=a[1].trim(),n={},b=a[2].split(";");for(let s of b){let l=s.indexOf(":");if(l!==-1){let p=s.slice(0,l).trim().toLowerCase(),i=s.slice(l+1).trim();if(p&&i)n[p]=i}}if(Object.keys(n).length>0)o.push({selector:t,properties:n})}return o}function hr(r,o){if(o=o.trim(),o==="*")return!0;if(/^[a-z][a-z0-9-]*$/i.test(o))return r.tagName===o.toLowerCase();if(o.startsWith(".")){let g=o.slice(1);return(r.attributes.class||"").split(/\s+/).includes(g)}if(o.startsWith("#")){let g=o.slice(1);return r.attributes.id===g}let e=o.match(/^([a-z][a-z0-9-]*)/i),a=o.match(/\.([a-z][a-z0-9-]*)/gi)||[],t=o.match(/#([a-z][a-z0-9-]*)/i),n=!0;if(e)n=n&&r.tagName===e[1].toLowerCase();if(t)n=n&&r.attributes.id===t[1];for(let g of a){let b=g.slice(1),s=(r.attributes.class||"").split(/\s+/);n=n&&s.includes(b)}return n}function tr(r,o,e,a){let t={...or};t.color={...e.color},t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.fontWeight=e.fontWeight;for(let g of o){let b=g.selector.split(",").map((s)=>s.trim());for(let s of b)if(hr(r,s))er(t,g.properties,a)}let n=v(r.attributes.style);if(er(t,n,a),t.display==="block"&&!n.display)t.display=ar.has(r.tagName)?"block":"inline";return t}function er(r,o,e){for(let[a,t]of Object.entries(o))switch(a){case"background":case"background-color":r.backgroundColor=S(t);break;case"color":r.color=S(t);break;case"border":{let n=t.match(/(\d+(?:px)?)\s+(\w+)\s+(\S+)/);if(n){let g=c(n[1],0),b=S(n[3]);r.borderTopWidth=r.borderRightWidth=r.borderBottomWidth=r.borderLeftWidth=g,r.borderTopColor=r.borderRightColor=r.borderBottomColor=r.borderLeftColor={...b}}break}case"border-width":{let[n,g,b,s]=z(t);r.borderTopWidth=n,r.borderRightWidth=g,r.borderBottomWidth=b,r.borderLeftWidth=s;break}case"border-color":{let n=S(t);r.borderTopColor=r.borderRightColor=r.borderBottomColor=r.borderLeftColor={...n};break}case"border-top-width":r.borderTopWidth=c(t,0);break;case"border-right-width":r.borderRightWidth=c(t,0);break;case"border-bottom-width":r.borderBottomWidth=c(t,0);break;case"border-left-width":r.borderLeftWidth=c(t,0);break;case"border-top-color":r.borderTopColor=S(t);break;case"border-right-color":r.borderRightColor=S(t);break;case"border-bottom-color":r.borderBottomColor=S(t);break;case"border-left-color":r.borderLeftColor=S(t);break;case"border-radius":r.borderRadius=c(t,0);break;case"padding":{let[n,g,b,s]=z(t);r.paddingTop=n,r.paddingRight=g,r.paddingBottom=b,r.paddingLeft=s;break}case"padding-top":r.paddingTop=c(t,0,e);break;case"padding-right":r.paddingRight=c(t,0,e);break;case"padding-bottom":r.paddingBottom=c(t,0,e);break;case"padding-left":r.paddingLeft=c(t,0,e);break;case"margin":{let[n,g,b,s]=z(t);r.marginTop=n,r.marginRight=g,r.marginBottom=b,r.marginLeft=s;break}case"margin-top":r.marginTop=c(t,0,e);break;case"margin-right":r.marginRight=c(t,0,e);break;case"margin-bottom":r.marginBottom=c(t,0,e);break;case"margin-left":r.marginLeft=c(t,0,e);break;case"font-size":r.fontSize=c(t,16);break;case"font-weight":r.fontWeight=t;break;case"font-family":r.fontFamily=t.split(",")[0].trim().replace(/['"]/g,"");break;case"text-align":r.textAlign=t;break;case"display":r.display=t;break;case"position":r.position=t;break;case"top":r.top=c(t,0,e);break;case"right":r.right=c(t,0,e);break;case"bottom":r.bottom=c(t,0,e);break;case"left":r.left=c(t,0,e);break;case"opacity":r.opacity=Number.parseFloat(t)||1;break;case"overflow":r.overflow=t;break;case"width":break;case"height":break;case"box-shadow":r.boxShadow=t;break}}function yi(r,o,e,a){let t=pr(r),n=rr(o),g=(i)=>{let u="";if(i.tagName==="style"){for(let h of i.children)if(typeof h==="string")u+=h}for(let h of i.children)if(typeof h!=="string")u+=g(h);return u},b=g(t),s=[...n,...rr(b)];function l(i,u,h,N,B,M){let d=tr(i,s,u,B);if(d.display==="none")return{tagName:i.tagName,box:{x:0,y:0,width:0,height:0},styles:d,text:null,children:[],visible:!1};let{marginLeft:f,marginTop:G,marginRight:P,marginBottom:fr,borderLeftWidth:T,borderTopWidth:D,borderRightWidth:V,borderBottomWidth:nr,paddingLeft:E,paddingTop:Y,paddingRight:K,paddingBottom:ir}=d,U=null;if(i.attributes.style){let m=i.attributes.style.match(/width\s*:\s*(\S+)/);if(m)U=c(m[1],B,B)}let L=U??B-f-P-T-V-E-K,X=null;if(i.attributes.style){let m=i.attributes.style.match(/height\s*:\s*(\S+)/);if(m)X=c(m[1],0,M)}let A=h+f,O=N+G;if(d.position==="absolute"||d.position==="fixed"){if(d.left!==0)A=d.left;if(d.top!==0)O=d.top}let J=[],H=A+T+E,q=O+D+Y,F=0,x=0,C=0,y=0;for(let m of i.children){if(typeof m==="string")continue;let k=tr(m,s,d,L);if(k.display==="none")continue;let _=k.display==="block"||ar.has(m.tagName);if(_&&y>0)q+=C,x+=C,C=0,y=0,H=A+T+E;let R=l(m,d,H,q,_?L:L-y,M-x);if(J.push(R),R.visible)if(_){let W=R.box.height+k.marginTop+k.marginBottom;q+=W,x+=W,F=Math.max(F,R.box.width)}else{let W=R.box.width+k.marginLeft+k.marginRight;y+=W,H+=W,C=Math.max(C,R.box.height+k.marginTop+k.marginBottom),F=Math.max(F,y)}}if(C>0)x+=C;let I=null,j=[];for(let m of i.children)if(typeof m==="string")j.push(m);if(j.length>0)I=j.join(" ");let Q=0;if(I)Q=(Math.ceil(I.length*d.fontSize*0.6/L)||1)*d.fontSize*1.2;let gr=Math.max(x,Q,X??0),sr=T+E+L+K+V,br=D+Y+gr+ir+nr;return{tagName:i.tagName,box:{x:A,y:O,width:sr,height:br},styles:d,text:I,children:J,visible:!0}}let p={...or,backgroundColor:{r:255,g:255,b:255,a:255}};return l(t,p,0,0,e,a)}
|
|
3
|
-
export{S
|
|
2
|
+
var Z={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:255},white:{r:255,g:255,b:255,a:255},red:{r:255,g:0,b:0,a:255},green:{r:0,g:128,b:0,a:255},blue:{r:0,g:0,b:255,a:255},yellow:{r:255,g:255,b:0,a:255},cyan:{r:0,g:255,b:255,a:255},magenta:{r:255,g:0,b:255,a:255},gray:{r:128,g:128,b:128,a:255},grey:{r:128,g:128,b:128,a:255},silver:{r:192,g:192,b:192,a:255},maroon:{r:128,g:0,b:0,a:255},olive:{r:128,g:128,b:0,a:255},lime:{r:0,g:255,b:0,a:255},aqua:{r:0,g:255,b:255,a:255},teal:{r:0,g:128,b:128,a:255},navy:{r:0,g:0,b:128,a:255},fuchsia:{r:255,g:0,b:255,a:255},purple:{r:128,g:0,b:128,a:255},orange:{r:255,g:165,b:0,a:255},pink:{r:255,g:192,b:203,a:255},brown:{r:165,g:42,b:42,a:255},gold:{r:255,g:215,b:0,a:255},indigo:{r:75,g:0,b:130,a:255},violet:{r:238,g:130,b:238,a:255},coral:{r:255,g:127,b:80,a:255},salmon:{r:250,g:128,b:114,a:255},khaki:{r:240,g:230,b:140,a:255},plum:{r:221,g:160,b:221,a:255},orchid:{r:218,g:112,b:214,a:255},turquoise:{r:64,g:224,b:208,a:255},tan:{r:210,g:180,b:140,a:255},chocolate:{r:210,g:105,b:30,a:255},tomato:{r:255,g:99,b:71,a:255},crimson:{r:220,g:20,b:60,a:255},darkblue:{r:0,g:0,b:139,a:255},darkgreen:{r:0,g:100,b:0,a:255},darkred:{r:139,g:0,b:0,a:255},darkorange:{r:255,g:140,b:0,a:255},lightblue:{r:173,g:216,b:230,a:255},lightgreen:{r:144,g:238,b:144,a:255},lightgray:{r:211,g:211,b:211,a:255},lightgrey:{r:211,g:211,b:211,a:255},lightpink:{r:255,g:182,b:193,a:255},lightyellow:{r:255,g:255,b:224,a:255},darkgray:{r:169,g:169,b:169,a:255},darkgrey:{r:169,g:169,b:169,a:255},slategray:{r:112,g:128,b:144,a:255},slategrey:{r:112,g:128,b:144,a:255},dimgray:{r:105,g:105,b:105,a:255},dimgrey:{r:105,g:105,b:105,a:255},whitesmoke:{r:245,g:245,b:245,a:255},snow:{r:255,g:250,b:250,a:255},ivory:{r:255,g:255,b:240,a:255},beige:{r:245,g:245,b:220,a:255},linen:{r:250,g:240,b:230,a:255},aliceblue:{r:240,g:248,b:255,a:255},antiquewhite:{r:250,g:235,b:215,a:255},azure:{r:240,g:255,b:255,a:255},bisque:{r:255,g:228,b:196,a:255},blanchedalmond:{r:255,g:235,b:205,a:255},burlywood:{r:222,g:184,b:135,a:255},cadetblue:{r:95,g:158,b:160,a:255},chartreuse:{r:127,g:255,b:0,a:255},cornflowerblue:{r:100,g:149,b:237,a:255},cornsilk:{r:255,g:248,b:220,a:255},deeppink:{r:255,g:20,b:147,a:255},deepskyblue:{r:0,g:191,b:255,a:255},dodgerblue:{r:30,g:144,b:255,a:255},firebrick:{r:178,g:34,b:34,a:255},floralwhite:{r:255,g:250,b:240,a:255},forestgreen:{r:34,g:139,b:34,a:255},gainsboro:{r:220,g:220,b:220,a:255},ghostwhite:{r:248,g:248,b:255,a:255},greenyellow:{r:173,g:255,b:47,a:255},honeydew:{r:240,g:255,b:240,a:255},hotpink:{r:255,g:105,b:180,a:255},indianred:{r:205,g:92,b:92,a:255},lavender:{r:230,g:230,b:250,a:255},lavenderblush:{r:255,g:240,b:245,a:255},lawngreen:{r:124,g:252,b:0,a:255},lemonchiffon:{r:255,g:250,b:205,a:255},lightcoral:{r:240,g:128,b:128,a:255},lightcyan:{r:224,g:255,b:255,a:255},lightgoldenrodyellow:{r:250,g:250,b:210,a:255},lightsalmon:{r:255,g:160,b:122,a:255},lightseagreen:{r:32,g:178,b:170,a:255},lightskyblue:{r:135,g:206,b:250,a:255},lightslategray:{r:119,g:136,b:153,a:255},lightslategrey:{r:119,g:136,b:153,a:255},lightsteelblue:{r:176,g:196,b:222,a:255},limegreen:{r:50,g:205,b:50,a:255},mediumaquamarine:{r:102,g:205,b:170,a:255},mediumblue:{r:0,g:0,b:205,a:255},mediumorchid:{r:186,g:85,b:211,a:255},mediumpurple:{r:147,g:112,b:219,a:255},mediumseagreen:{r:60,g:179,b:113,a:255},mediumslateblue:{r:123,g:104,b:238,a:255},mediumspringgreen:{r:0,g:250,b:154,a:255},mediumturquoise:{r:72,g:209,b:204,a:255},mediumvioletred:{r:199,g:21,b:133,a:255},midnightblue:{r:25,g:25,b:112,a:255},mintcream:{r:245,g:255,b:250,a:255},mistyrose:{r:255,g:228,b:225,a:255},moccasin:{r:255,g:228,b:181,a:255},navajowhite:{r:255,g:222,b:173,a:255},oldlace:{r:253,g:245,b:230,a:255},olivedrab:{r:107,g:142,b:35,a:255},orangered:{r:255,g:69,b:0,a:255},palegoldenrod:{r:238,g:232,b:170,a:255},palegreen:{r:152,g:251,b:152,a:255},paleturquoise:{r:175,g:238,b:238,a:255},palevioletred:{r:219,g:112,b:147,a:255},papayawhip:{r:255,g:239,b:213,a:255},peachpuff:{r:255,g:218,b:185,a:255},peru:{r:205,g:133,b:63,a:255},powderblue:{r:176,g:224,b:230,a:255},rosybrown:{r:188,g:143,b:143,a:255},royalblue:{r:65,g:105,b:225,a:255},saddlebrown:{r:139,g:69,b:19,a:255},sandybrown:{r:244,g:164,b:96,a:255},seagreen:{r:46,g:139,b:87,a:255},seashell:{r:255,g:245,b:238,a:255},sienna:{r:160,g:82,b:45,a:255},skyblue:{r:135,g:206,b:235,a:255},slateblue:{r:106,g:90,b:205,a:255},springgreen:{r:0,g:255,b:127,a:255},steelblue:{r:70,g:130,b:180,a:255},thistle:{r:216,g:191,b:216,a:255},wheat:{r:245,g:222,b:179,a:255},yellowgreen:{r:154,g:205,b:50,a:255}};function S(r){if(!r)return{r:0,g:0,b:0,a:0};if(r=r.trim().toLowerCase(),Z[r])return{...Z[r]};if(r.startsWith("#"))return dr(r);if(r.startsWith("rgb"))return cr(r);if(r.startsWith("hsl"))return lr(r);return{r:0,g:0,b:0,a:0}}function dr(r){r=r.slice(1);let o,e,a,t=255;if(r.length===3)o=Number.parseInt(r[0]+r[0],16),e=Number.parseInt(r[1]+r[1],16),a=Number.parseInt(r[2]+r[2],16);else if(r.length===4)o=Number.parseInt(r[0]+r[0],16),e=Number.parseInt(r[1]+r[1],16),a=Number.parseInt(r[2]+r[2],16),t=Number.parseInt(r[3]+r[3],16);else if(r.length===6)o=Number.parseInt(r.slice(0,2),16),e=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16);else if(r.length===8)o=Number.parseInt(r.slice(0,2),16),e=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16),t=Number.parseInt(r.slice(6,8),16);else return{r:0,g:0,b:0,a:0};return{r:o,g:e,b:a,a:t}}function cr(r){let o=r.match(/rgba?\s*\(\s*([^)]+)\s*\)/);if(!o)return{r:0,g:0,b:0,a:0};let e=o[1].split(/[\s,/]+/).map((b)=>b.trim()).filter(Boolean),a=w(e[0],255),t=w(e[1],255),n=w(e[2],255),g=e[3]!==void 0?w(e[3],1)*255:255;return{r:Math.round(Math.min(255,Math.max(0,a))),g:Math.round(Math.min(255,Math.max(0,t))),b:Math.round(Math.min(255,Math.max(0,n))),a:Math.round(Math.min(255,Math.max(0,g)))}}function lr(r){let o=r.match(/hsla?\s*\(\s*([^)]+)\s*\)/);if(!o)return{r:0,g:0,b:0,a:0};let e=o[1].split(/[\s,/]+/).map((p)=>p.trim()).filter(Boolean),a=ur(e[0]),t=w(e[1],100)/100,n=w(e[2],100)/100,g=e[3]!==void 0?w(e[3],1):1,{r:b,g:s,b:l}=mr(a,t,n);return{r:Math.round(b),g:Math.round(s),b:Math.round(l),a:Math.round(g*255)}}function w(r,o){if(!r)return 0;if(r.endsWith("%"))return Number.parseFloat(r)/100*o;return Number.parseFloat(r)}function ur(r){if(!r)return 0;if(r=r.toLowerCase(),r.endsWith("deg"))return Number.parseFloat(r)/360;if(r.endsWith("rad"))return Number.parseFloat(r)/(2*Math.PI);if(r.endsWith("grad"))return Number.parseFloat(r)/400;if(r.endsWith("turn"))return Number.parseFloat(r);return Number.parseFloat(r)/360}function mr(r,o,e){let a,t,n;if(o===0)a=t=n=e*255;else{let g=(l,p,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return l+(p-l)*6*i;if(i<0.5)return p;if(i<0.6666666666666666)return l+(p-l)*(0.6666666666666666-i)*6;return l},b=e<0.5?e*(1+o):e+o-e*o,s=2*e-b;a=g(s,b,r+0.3333333333333333)*255,t=g(s,b,r)*255,n=g(s,b,r-0.3333333333333333)*255}return{r:a,g:t,b:n}}function c(r,o=0,e=0){if(!r)return o;if(r=r.trim().toLowerCase(),r==="auto")return o;if(r.endsWith("px"))return Number.parseFloat(r);if(r.endsWith("%"))return Number.parseFloat(r)/100*e;if(r.endsWith("em"))return Number.parseFloat(r)*16;if(r.endsWith("rem"))return Number.parseFloat(r)*16;if(r.endsWith("vw"))return Number.parseFloat(r)/100*e;if(r.endsWith("vh"))return Number.parseFloat(r)/100*e;let a=Number.parseFloat(r);return Number.isNaN(a)?o:a}function z(r){if(!r)return[0,0,0,0];let e=r.trim().split(/\s+/).map((a)=>c(a,0));switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return[e[0],e[1],e[2],e[3]];default:return[0,0,0,0]}}function v(r){let o={};if(!r)return o;let e=r.split(";");for(let a of e){let[t,...n]=a.split(":");if(t&&n.length>0){let g=t.trim().toLowerCase(),b=n.join(":").trim();o[g]=b}}return o}function zi(r,o){let e=r.a/255,a=o.a/255,t=e+a*(1-e);if(t===0)return{r:0,g:0,b:0,a:0};return{r:Math.round((r.r*e+o.r*a*(1-e))/t),g:Math.round((r.g*e+o.g*a*(1-e))/t),b:Math.round((r.b*e+o.b*a*(1-e))/t),a:Math.round(t*255)}}var or={backgroundColor:{r:0,g:0,b:0,a:0},color:{r:0,g:0,b:0,a:255},borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderTopColor:{r:0,g:0,b:0,a:255},borderRightColor:{r:0,g:0,b:0,a:255},borderBottomColor:{r:0,g:0,b:0,a:255},borderLeftColor:{r:0,g:0,b:0,a:255},borderRadius:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,fontSize:16,fontWeight:"normal",fontFamily:"sans-serif",textAlign:"left",display:"block",position:"static",top:0,right:0,bottom:0,left:0,opacity:1,overflow:"visible",boxShadow:null},ar=new Set(["div","p","h1","h2","h3","h4","h5","h6","section","article","header","footer","main","nav","aside","ul","ol","li","dl","dt","dd","table","tr","th","td","thead","tbody","tfoot","form","fieldset","legend","blockquote","pre","address","hr","figure","figcaption"]);function pr(r){let o={tagName:"div",attributes:{},children:[]},e=[o],a=o,t=0,n=(g)=>g.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/&#(\d+);/g,(b,s)=>String.fromCharCode(Number.parseInt(s))).replace(/&#x([0-9a-f]+);/gi,(b,s)=>String.fromCharCode(Number.parseInt(s,16))).replace(/ /g," ");while(t<r.length){let g=r.indexOf("<",t);if(g>t||g===-1){let i=g===-1?r.length:g,u=n(r.slice(t,i).trim());if(u)a.children.push(u);if(g===-1)break;t=g}if(r.slice(t,t+4)==="<!--"){let i=r.indexOf("-->",t+4);t=i===-1?r.length:i+3;continue}if(r.slice(t,t+2).toLowerCase()==="<!"){let i=r.indexOf(">",t);t=i===-1?r.length:i+1;continue}let b=r.indexOf(">",t);if(b===-1)break;let s=r.slice(t+1,b),l=s.endsWith("/")||s.endsWith("/");if(s.startsWith("/")){let i=s.slice(1).trim().toLowerCase().split(/\s/)[0];while(e.length>1){let u=e.pop();if(a=e[e.length-1],u.tagName===i)break}}else{let i=s.search(/\s/),u=i===-1?s:s.slice(0,i);u=u.replace(/\/$/,"").toLowerCase();let h={};if(i!==-1){let M=s.slice(i).replace(/\/$/,""),d=/([a-z-]+)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/gi,f;while((f=d.exec(M))!==null){let G=f[1].toLowerCase(),P=f[2]??f[3]??f[4]??"";h[G]=n(P)}}let N={tagName:u,attributes:h,children:[]};if(a.children.push(N),!l&&!new Set(["br","hr","img","input","meta","link","area","base","col","embed","param","source","track","wbr"]).has(u))e.push(N),a=N}t=b+1}return o}function rr(r){let o=[];r=r.replace(/\/\*[\s\S]*?\*\//g,"");let e=/([^{}]+)\{([^}]*)\}/g,a;while((a=e.exec(r))!==null){let t=a[1].trim(),n={},b=a[2].split(";");for(let s of b){let l=s.indexOf(":");if(l!==-1){let p=s.slice(0,l).trim().toLowerCase(),i=s.slice(l+1).trim();if(p&&i)n[p]=i}}if(Object.keys(n).length>0)o.push({selector:t,properties:n})}return o}function hr(r,o){if(o=o.trim(),o==="*")return!0;if(/^[a-z][a-z0-9-]*$/i.test(o))return r.tagName===o.toLowerCase();if(o.startsWith(".")){let g=o.slice(1);return(r.attributes.class||"").split(/\s+/).includes(g)}if(o.startsWith("#")){let g=o.slice(1);return r.attributes.id===g}let e=o.match(/^([a-z][a-z0-9-]*)/i),a=o.match(/\.([a-z][a-z0-9-]*)/gi)||[],t=o.match(/#([a-z][a-z0-9-]*)/i),n=!0;if(e)n=n&&r.tagName===e[1].toLowerCase();if(t)n=n&&r.attributes.id===t[1];for(let g of a){let b=g.slice(1),s=(r.attributes.class||"").split(/\s+/);n=n&&s.includes(b)}return n}function tr(r,o,e,a){let t={...or};t.color={...e.color},t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.fontWeight=e.fontWeight;for(let g of o){let b=g.selector.split(",").map((s)=>s.trim());for(let s of b)if(hr(r,s))er(t,g.properties,a)}let n=v(r.attributes.style);if(er(t,n,a),t.display==="block"&&!n.display)t.display=ar.has(r.tagName)?"block":"inline";return t}function er(r,o,e){for(let[a,t]of Object.entries(o))switch(a){case"background":case"background-color":r.backgroundColor=S(t);break;case"color":r.color=S(t);break;case"border":{let n=t.match(/(\d+(?:px)?)\s+(\w+)\s+(\S+)/);if(n){let g=c(n[1],0),b=S(n[3]);r.borderTopWidth=r.borderRightWidth=r.borderBottomWidth=r.borderLeftWidth=g,r.borderTopColor=r.borderRightColor=r.borderBottomColor=r.borderLeftColor={...b}}break}case"border-width":{let[n,g,b,s]=z(t);r.borderTopWidth=n,r.borderRightWidth=g,r.borderBottomWidth=b,r.borderLeftWidth=s;break}case"border-color":{let n=S(t);r.borderTopColor=r.borderRightColor=r.borderBottomColor=r.borderLeftColor={...n};break}case"border-top-width":r.borderTopWidth=c(t,0);break;case"border-right-width":r.borderRightWidth=c(t,0);break;case"border-bottom-width":r.borderBottomWidth=c(t,0);break;case"border-left-width":r.borderLeftWidth=c(t,0);break;case"border-top-color":r.borderTopColor=S(t);break;case"border-right-color":r.borderRightColor=S(t);break;case"border-bottom-color":r.borderBottomColor=S(t);break;case"border-left-color":r.borderLeftColor=S(t);break;case"border-radius":r.borderRadius=c(t,0);break;case"padding":{let[n,g,b,s]=z(t);r.paddingTop=n,r.paddingRight=g,r.paddingBottom=b,r.paddingLeft=s;break}case"padding-top":r.paddingTop=c(t,0,e);break;case"padding-right":r.paddingRight=c(t,0,e);break;case"padding-bottom":r.paddingBottom=c(t,0,e);break;case"padding-left":r.paddingLeft=c(t,0,e);break;case"margin":{let[n,g,b,s]=z(t);r.marginTop=n,r.marginRight=g,r.marginBottom=b,r.marginLeft=s;break}case"margin-top":r.marginTop=c(t,0,e);break;case"margin-right":r.marginRight=c(t,0,e);break;case"margin-bottom":r.marginBottom=c(t,0,e);break;case"margin-left":r.marginLeft=c(t,0,e);break;case"font-size":r.fontSize=c(t,16);break;case"font-weight":r.fontWeight=t;break;case"font-family":r.fontFamily=t.split(",")[0].trim().replace(/['"]/g,"");break;case"text-align":r.textAlign=t;break;case"display":r.display=t;break;case"position":r.position=t;break;case"top":r.top=c(t,0,e);break;case"right":r.right=c(t,0,e);break;case"bottom":r.bottom=c(t,0,e);break;case"left":r.left=c(t,0,e);break;case"opacity":r.opacity=Number.parseFloat(t)||1;break;case"overflow":r.overflow=t;break;case"width":break;case"height":break;case"box-shadow":r.boxShadow=t;break}}function vi(r,o,e,a){let t=pr(r),n=rr(o),g=(i)=>{let u="";if(i.tagName==="style"){for(let h of i.children)if(typeof h==="string")u+=h}for(let h of i.children)if(typeof h!=="string")u+=g(h);return u},b=g(t),s=[...n,...rr(b)];function l(i,u,h,N,B,M){let d=tr(i,s,u,B);if(d.display==="none")return{tagName:i.tagName,box:{x:0,y:0,width:0,height:0},styles:d,text:null,children:[],visible:!1};let{marginLeft:f,marginTop:G,marginRight:P,marginBottom:fr,borderLeftWidth:T,borderTopWidth:D,borderRightWidth:V,borderBottomWidth:nr,paddingLeft:E,paddingTop:Y,paddingRight:K,paddingBottom:ir}=d,U=null;if(i.attributes.style){let m=i.attributes.style.match(/width\s*:\s*(\S+)/);if(m)U=c(m[1],B,B)}let L=U??B-f-P-T-V-E-K,X=null;if(i.attributes.style){let m=i.attributes.style.match(/height\s*:\s*(\S+)/);if(m)X=c(m[1],0,M)}let A=h+f,O=N+G;if(d.position==="absolute"||d.position==="fixed"){if(d.left!==0)A=d.left;if(d.top!==0)O=d.top}let J=[],H=A+T+E,q=O+D+Y,F=0,x=0,C=0,y=0;for(let m of i.children){if(typeof m==="string")continue;let k=tr(m,s,d,L);if(k.display==="none")continue;let _=k.display==="block"||ar.has(m.tagName);if(_&&y>0)q+=C,x+=C,C=0,y=0,H=A+T+E;let R=l(m,d,H,q,_?L:L-y,M-x);if(J.push(R),R.visible)if(_){let W=R.box.height+k.marginTop+k.marginBottom;q+=W,x+=W,F=Math.max(F,R.box.width)}else{let W=R.box.width+k.marginLeft+k.marginRight;y+=W,H+=W,C=Math.max(C,R.box.height+k.marginTop+k.marginBottom),F=Math.max(F,y)}}if(C>0)x+=C;let I=null,j=[];for(let m of i.children)if(typeof m==="string")j.push(m);if(j.length>0)I=j.join(" ");let Q=0;if(I)Q=(Math.ceil(I.length*d.fontSize*0.6/L)||1)*d.fontSize*1.2;let gr=Math.max(x,Q,X??0),sr=T+E+L+K+V,br=D+Y+gr+ir+nr;return{tagName:i.tagName,box:{x:A,y:O,width:sr,height:br},styles:d,text:I,children:J,visible:!0}}let p={...or,backgroundColor:{r:255,g:255,b:255,a:255}};return l(t,p,0,0,e,a)}
|
|
3
|
+
export{S,zi,vi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Buffer as C}from"buffer";function g(){let t=globalThis.Bun?.WebView;return typeof t==="function"?t:null}function
|
|
3
|
-
`);if(a||r)s.push(`<style>${a}${r??""}</style>`);let u=s.join("");if(/<\/head>/i.test(e))return e.replace(/<\/head>/i,`${u}</head>`);let l=/<html\b[^>]*>/i.exec(e);if(l)return e.replace(l[0],`${l[0]}<head>${u}</head>`);return`<!DOCTYPE html><html><head>${u}</head><body>${e}</body></html>`}function f(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}async function
|
|
4
|
-
export{
|
|
2
|
+
import{Buffer as C}from"buffer";function g(){let t=globalThis.Bun?.WebView;return typeof t==="function"?t:null}function io(){return g()!==null}var m=null,c=null;async function oo(e=3000){if(m!==null)return m;if(c)return c;return c=(async()=>{let t=g();if(!t)return!1;let r=(async()=>{let n=null;try{n=new t({width:1,height:1,headless:!0,dataStore:"ephemeral"})}catch{return!1}try{await n.navigate("data:text/html,<!doctype html>");let i=await n.screenshot({encoding:"buffer",format:"png",quality:80});return C.isBuffer(i)&&i.length>0}catch{return!1}finally{p(n)}})();return Promise.race([r,new Promise((n)=>setTimeout(()=>n(!1),e))])})().then((t)=>(m=t,c=null,t)),c}class Xi extends Error{constructor(){super("Bun.WebView is not available in this runtime. Requires a Bun version that ships WebView, and (on non-macOS) a Chromium backend.");this.name="WebViewUnavailableError"}}class Ji extends Error{constructor(e,t){super(`Bun.WebView ${e} timed out after ${t}ms`);this.name="WebViewTimeoutError"}}class we{init;pooled=null;pooledKey="";constructor(e={}){this.init=e}async capture(e,t={}){let r=g();if(!r)throw new Xi;let{width:n=this.init.width??1024,height:i=this.init.height??768,format:d="png",quality:s=90,encoding:a="buffer",backend:u=this.init.backend,headless:l=this.init.headless??!0,dataStore:o=this.init.dataStore??"ephemeral",waitFor:b=0,timeout:h,path:y,console:B=this.init.console}=t,S=a==="binary"?"buffer":a,v={width:n,height:i,backend:u,headless:l,dataStore:o,console:B},w=this.acquire(r,v);try{if(await V(w.navigate(e),h,"navigate"),b>0)await new Promise((x)=>setTimeout(x,b));let W=await V(w.screenshot({encoding:S,format:d,quality:s}),h,"screenshot");if(y)await O(y,W);return W}finally{this.release(w)}}async captureHtml(e,t={}){let r=k(e,t),n=`data:text/html;charset=utf-8,${encodeURIComponent(r)}`;return this.capture(n,t)}async captureUrl(e,t={}){return this.capture(e,t)}dispose(){if(this.pooled)p(this.pooled),this.pooled=null,this.pooledKey=""}[Symbol.dispose](){this.dispose()}acquire(e,t){if(!this.init.reuse)return new e(t);let r=P(t);if(this.pooled&&this.pooledKey===r)return this.pooled;if(this.pooled)p(this.pooled);return this.pooled=new e(t),this.pooledKey=r,this.pooled}release(e){if(this.init.reuse&&this.pooled===e)return;p(e)}}function p(e){let t=e.close??e[Symbol.dispose];if(typeof t==="function")t.call(e)}function P(e){let t=typeof e.dataStore==="string"?e.dataStore:e.dataStore?.directory??"";return`${e.width??""}x${e.height??""}|${e.backend??""}|${e.headless??""}|${t}`}async function V(e,t,r){if(!t||t<=0)return e;let n,i=new Promise((d,s)=>{n=setTimeout(()=>s(new Ji(r,t)),t)});try{return await Promise.race([e,i])}finally{if(n)clearTimeout(n)}}async function O(e,t){if(typeof t==="object"&&t!==null&&"name"in t&&"size"in t)return;await Bun.write(e,t)}function k(e,t){let{css:r,baseUrl:n,fonts:i}=t;if(!Boolean(r||n||i&&i.length>0))return e;let s=[];if(n)s.push(`<base href="${f(n)}">`);let a=(i??[]).map((o)=>{let b=o.weight!=null?` font-weight: ${o.weight};`:"",h=o.style?` font-style: ${o.style};`:"";return`@font-face { font-family: '${f(o.family)}'; src: url('${f(o.url)}');${b}${h} }`}).join(`
|
|
3
|
+
`);if(a||r)s.push(`<style>${a}${r??""}</style>`);let u=s.join("");if(/<\/head>/i.test(e))return e.replace(/<\/head>/i,`${u}</head>`);let l=/<html\b[^>]*>/i.exec(e);if(l)return e.replace(l[0],`${l[0]}<head>${u}</head>`);return`<!DOCTYPE html><html><head>${u}</head><body>${e}</body></html>`}function f(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}async function so(e,t={}){return new we().captureHtml(e,t)}async function ao(e,t={}){return new we().captureUrl(e,t)}
|
|
4
|
+
export{io,oo,Xi,Ji,we,so,ao};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{e}from"./chunk-
|
|
2
|
+
import{e}from"./chunk-v3raywwq.js";class r extends e{constructor(t){super(t);this.tagName=t,this.nodeName=t,this.namespaceURI="http://www.w3.org/2000/svg"}}
|
|
3
3
|
export{r};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var o=["height","width","max-height","max-width"];function i(t){let e=String(t??"").trim().toLowerCase();if(e===""||e==="auto"||e==="none")return!1;let n=Number.parseFloat(e);return Number.isFinite(n)&&n===0}function a(t){return o.some((e)=>i(t.getPropertyValue?.(e)))}function u(t){return(t.ownerDocument?.defaultView??t.ownerDocument)?.getComputedStyle?.(t)??null}function
|
|
3
|
-
export{
|
|
2
|
+
var o=["height","width","max-height","max-width"];function i(t){let e=String(t??"").trim().toLowerCase();if(e===""||e==="auto"||e==="none")return!1;let n=Number.parseFloat(e);return Number.isFinite(n)&&n===0}function a(t){return o.some((e)=>i(t.getPropertyValue?.(e)))}function u(t){return(t.ownerDocument?.defaultView??t.ownerDocument)?.getComputedStyle?.(t)??null}function Wi(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if($i(e))return!1;return!0}function $i(t,e){if(t.hasAttribute?.("hidden"))return!0;let n=e??u(t)??t.style;if(!n?.getPropertyValue)return!1;if(n.length===0)return!1;if(n.getPropertyValue("display")==="none")return!0;let r=n.getPropertyValue("visibility");if(r==="hidden"||r==="collapse")return!0;return a(n)}function tt(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if(e.getAttribute?.("aria-hidden")==="true")return!1;return Wi(t)}
|
|
3
|
+
export{Wi,$i,tt};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function g(e,r,s){try{e[r]=s;return}catch{}try{Object.defineProperty(e,r,{configurable:!0,enumerable:r!=="_path",writable:!0,value:s})}catch{}}function C(e,r){return Boolean(e?.[r])}function se(e){return Boolean(e&&typeof e==="object")}function F(e){return se(e)?e.parentNode??null:null}function B(e){return e?.nodeType===11&&e?.nodeName==="#shadow-root"&&e?.host}function de(e,r){let s=[],u=e;while(u){if(s.push(u),B(u)&&r?.composed!==!0)break;u=u._getEventParent?.()??null}return s}function ue(e){let r=e;while(r){if(B(r))return r;r=F(r)}return null}function ce(e,r){let s=e;while(s){if(s===r)return!0;s=F(s)}return!1}function L(e,r){let s=ue(e);if(!s)return e;if(r===s||ce(r,s))return e;return s.host??e}class f{_eventListeners=new Map;addEventListener(e,r,s={}){if(!r)return;let u=s!==void 0&&s!==!1&&s!==!0&&typeof s==="object",N=u?s.capture??!1:s===!0,p=u?s.once??!1:!1,T=u?s.passive??!1:!1,h=u?s.signal:void 0;if(h?.aborted)return;let y=this._eventListeners.get(e);if(y){for(let _=0;_<y.length;_++)if(y[_].listener===r&&y[_].options.capture===N)return;y.push({listener:r,options:{capture:N,once:p,passive:T},signal:h})}else this._eventListeners.set(e,[{listener:r,options:{capture:N,once:p,passive:T},signal:h}]);if(h)h.addEventListener("abort",()=>{this.removeEventListener(e,r,{capture:N})},{once:!0})}removeEventListener(e,r,s={}){if(!r)return;let u=this._eventListeners.get(e);if(!u)return;let N=typeof s==="boolean"?{capture:s}:{capture:s.capture??!1},p=u.findIndex((T)=>T.listener===r&&T.options.capture===N.capture);if(p!==-1)u.splice(p,1);if(u.length===0)this._eventListeners.delete(e)}dispatchEvent(e){if(!e||typeof e.type!=="string"||!e.type)throw Error("Failed to execute dispatchEvent: event.type must be a non-empty string");let r=de(this,e);if(r.length===1){if(g(e,"target",this),g(e,"eventPhase",2),g(e,"currentTarget",this),typeof e.composedPath!=="function")g(e,"composedPath",()=>[this]);g(e,"_path",[this]);let h=()=>!1;return this._invokeEventListeners(e,!0,h),this._invokeEventListeners(e,!1,h),g(e,"eventPhase",0),g(e,"currentTarget",null),!e.defaultPrevented}let s=this,u=e?.relatedTarget??null,N=(h,y)=>{if(g(e,"eventPhase",y),g(e,"currentTarget",h),h){if(g(e,"target",L(s,h)),u)g(e,"relatedTarget",L(u,h))}};if(g(e,"target",s),g(e,"_path",[...r]),typeof e.composedPath!=="function")g(e,"composedPath",()=>[...r]);let p=()=>C(e,"_propagationStopped")||C(e,"propagationStopped"),T=()=>C(e,"_immediatePropagationStopped")||C(e,"immediatePropagationStopped");for(let h=r.length-1;h>=1;h--){if(p())break;N(r[h],1),r[h]._invokeEventListeners(e,!0,T)}if(!p()){if(N(this,2),this._invokeEventListeners(e,!0,T),!T())this._invokeEventListeners(e,!1,T)}if(e.bubbles===!0&&!p())for(let h=1;h<r.length;h++){if(p())break;N(r[h],3),r[h]._invokeEventListeners(e,!1,T)}if(g(e,"eventPhase",0),g(e,"currentTarget",null),g(e,"target",s),u)g(e,"relatedTarget",u);return!Boolean(e.defaultPrevented)}_getEventParent(){return null}_invokeEventListeners(e,r,s){let u=this._eventListeners.get(e.type);if(!u||u.length===0)return;let N=u.length===1?u:[...u];for(let p of N){if((p.options.capture??!1)!==r)continue;if(s())break;if(p.options.passive){let T=e.preventDefault;e.preventDefault=()=>{};try{p.listener.call(this,e)}catch(h){console.error("Error in event listener:",h)}e.preventDefault=T}else try{p.listener.call(this,e)}catch(T){console.error("Error in event listener:",T)}if(p.options.once)this.removeEventListener(e.type,p.listener,{capture:r})}}}var t=1,z=2,i=3,Y=4,q=5,W=6,H=7,c=8,a=9,K=10,V=11,X=12,x=1,m=2,ne=4,M=8,Ae=16,w=32;function qi(e){return e?.nodeType===t}function j(e,r){let s=e.nodeType===a?e:e.ownerDocument,u=s?.createTextNode?.(`${r}`);if(u)return u;let{VirtualTextNode:N}=import.meta.require("./chunk-ebdfrfsg.js"),p=new N(`${r}`);return p.ownerDocument=s??null,p}function O(e){let r=e.nodeType===a?e:e.ownerDocument,s=r?.createDocumentFragment?.();if(s)return s;let{VirtualDocumentFragment:u}=import.meta.require("./chunk-7nvqhgy6.js"),N=new u;return N.ownerDocument=r??null,N}function b(e,r){return r.map((s)=>typeof s==="string"?j(e,s):s)}function J(e,r){if(e===r)return!0;if(!e||!r)return!1;if(e.nodeType!==r.nodeType||e.nodeName!==r.nodeName||e.nodeValue!==r.nodeValue)return!1;if(e.attributes.size!==r.attributes.size)return!1;for(let[s,u]of e.attributes)if(r.attributes.get(s)!==u)return!1;if(e.childNodes.length!==r.childNodes.length)return!1;for(let s=0;s<e.childNodes.length;s++)if(!J(e.childNodes[s],r.childNodes[s]))return!1;return!0}class d extends f{static ELEMENT_NODE=t;static ATTRIBUTE_NODE=z;static TEXT_NODE=i;static CDATA_SECTION_NODE=Y;static ENTITY_REFERENCE_NODE=q;static ENTITY_NODE=W;static PROCESSING_INSTRUCTION_NODE=H;static COMMENT_NODE=c;static DOCUMENT_NODE=a;static DOCUMENT_TYPE_NODE=K;static DOCUMENT_FRAGMENT_NODE=V;static NOTATION_NODE=X;static DOCUMENT_POSITION_DISCONNECTED=x;static DOCUMENT_POSITION_PRECEDING=m;static DOCUMENT_POSITION_FOLLOWING=ne;static DOCUMENT_POSITION_CONTAINS=M;static DOCUMENT_POSITION_CONTAINED_BY=Ae;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=w;ELEMENT_NODE=t;ATTRIBUTE_NODE=z;TEXT_NODE=i;CDATA_SECTION_NODE=Y;ENTITY_REFERENCE_NODE=q;ENTITY_NODE=W;PROCESSING_INSTRUCTION_NODE=H;COMMENT_NODE=c;DOCUMENT_NODE=a;DOCUMENT_TYPE_NODE=K;DOCUMENT_FRAGMENT_NODE=V;NOTATION_NODE=X;DOCUMENT_POSITION_DISCONNECTED=x;DOCUMENT_POSITION_PRECEDING=m;DOCUMENT_POSITION_FOLLOWING=ne;DOCUMENT_POSITION_CONTAINS=M;DOCUMENT_POSITION_CONTAINED_BY=Ae;DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=w;nodeValue=null;attributes=new Map;childNodes=[];parentNode=null;ownerDocument=null;get children(){let e=this.childNodes,r=[];for(let s=0;s<e.length;s++)if(e[s].nodeType===t)r.push(e[s]);return r}get firstElementChild(){return this.childNodes.find((e)=>e.nodeType===t)??null}get lastElementChild(){for(let e=this.childNodes.length-1;e>=0;e--)if(this.childNodes[e].nodeType===t)return this.childNodes[e];return null}get childElementCount(){let e=0;for(let r of this.childNodes)if(r.nodeType===t)e++;return e}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}get previousSibling(){if(!this.parentNode)return null;let e=this.parentNode.childNodes;for(let r=0;r<e.length;r++)if(e[r]===this)return r>0?e[r-1]:null;return null}get nextSibling(){if(!this.parentNode)return null;let e=this.parentNode.childNodes;for(let r=0;r<e.length;r++)if(e[r]===this)return r<e.length-1?e[r+1]:null;return null}get parentElement(){return qi(this.parentNode)?this.parentNode:null}get isConnected(){let e=this;while(e){if(e.nodeType===a)return!0;e=e.parentNode}return!1}hasChildNodes(){return this.childNodes.length>0}get baseURI(){return this.ownerDocument?.baseURI||""}append(...e){let r=this;if(typeof r.appendChild!=="function")throw Error("This node type does not support append()");let s=b(this,e);if(s.length===0)return;if(s.length===1){r.appendChild(s[0]);return}let u=O(this);for(let N of s)u.appendChild(N);r.appendChild(u)}prepend(...e){let r=this;if(typeof r.insertBefore!=="function")throw Error("This node type does not support prepend()");let s=b(this,e);if(s.length===0)return;if(s.length===1){r.insertBefore(s[0],this.firstChild??null);return}let u=O(this);for(let N of s)u.appendChild(N);r.insertBefore(u,this.firstChild??null)}before(...e){if(!this.parentNode)return;let r=this.parentNode,s=b(this.parentNode,e);if(s.length===0)return;if(s.length===1){r.insertBefore(s[0],this);return}let u=O(this.parentNode);for(let N of s)u.appendChild(N);r.insertBefore(u,this)}after(...e){if(!this.parentNode)return;let r=this.parentNode,s=this.nextSibling,u=b(this.parentNode,e);if(u.length===0)return;if(u.length===1){r.insertBefore(u[0],s??null);return}let N=O(this.parentNode);for(let p of u)N.appendChild(p);r.insertBefore(N,s??null)}replaceWith(...e){if(!this.parentNode)return;let r=this.parentNode,s=b(this.parentNode,e);if(s.length===0){r.removeChild(this);return}if(s.length===1){r.replaceChild(s[0],this);return}let u=O(this.parentNode);for(let N of s)u.appendChild(N);r.replaceChild(u,this)}remove(){if(this.parentNode)this.parentNode.removeChild(this)}replaceChildren(...e){let r=this;if(typeof r.removeChild!=="function"||typeof r.appendChild!=="function")throw Error("This node type does not support replaceChildren()");while(this.childNodes.length>0)r.removeChild(this.childNodes[this.childNodes.length-1]);for(let s of e)if(typeof s==="string")r.appendChild(j(this,s));else r.appendChild(s)}isSameNode(e){return this===e}isEqualNode(e){return J(this,e)}getRootNode(e={}){let r=this,s=this;while(r.parentNode){let u=r.parentNode;if(s=u,u.nodeType===V&&u.host&&e.composed!==!0)return u;r=u}return s}contains(e){if(!e)return!1;let r=e;while(r){if(r===this)return!0;r=r.parentNode}return!1}normalize(){let e=0;while(e<this.childNodes.length){let r=this.childNodes[e];if(r.nodeType===i){let s=r.nodeValue||"",u=e+1;while(u<this.childNodes.length&&this.childNodes[u].nodeType===i)s+=this.childNodes[u].nodeValue||"",this.childNodes.splice(u,1);if(s===""){this.childNodes.splice(e,1),r.parentNode=null;continue}r.nodeValue=s}else if(typeof r.normalize==="function")r.normalize();e++}}compareDocumentPosition(e){if(e===this)return 0;let r=this._virtualRootNode(this),s=this._virtualRootNode(e);if(r!==s)return x|w;if(this!==e&&this.contains(e))return M|m;if(e!==this&&this._virtualNodeContains(e,this))return Ae|ne;let u=this._virtualDocumentOrder(r);return u.indexOf(this)<u.indexOf(e)?ne:m}_getEventParent(){if(this.parentNode)return this.parentNode;if(this.nodeType===a)return this.defaultView??null;return null}_virtualRootNode(e){let r=e;while(r.parentNode)r=r.parentNode;return r}_virtualNodeContains(e,r){return e!==r&&typeof e.contains==="function"?e.contains(r):!1}_virtualDocumentOrder(e){let r=[],s=(u)=>{r.push(u);for(let N of u.childNodes)s(N)};return s(e),r}}function Ne(e){let r=e?.constructor;if(!r||!Array.isArray(r.observedAttributes))return[];return r.observedAttributes.map((s)=>`${s}`.toLowerCase())}function Q(e){return e._getInternalShadowRoot?.()??null}function Z(e){return e.tagName==="TEMPLATE"?e.content??null:null}function D(e,r){if(e.nodeType===t)r(e);let s=Q(e);if(s)D(s,r);if(Z(e))return;for(let u of e.childNodes)D(u,r)}function v(e,r){if(e.nodeType===t)r(e);let s=Q(e);if(s)v(s,r);let u=Z(e);if(u){v(u,r);return}for(let N of e.childNodes)v(N,r)}function Ve(e){D(e,(r)=>{if(r.isConnected)r.ownerDocument?.defaultView?.customElements?._upgradeElement?.(r);if(typeof r.connectedCallback==="function"&&r.isConnected)r.connectedCallback()})}function I(e){D(e,(r)=>{if(typeof r.disconnectedCallback==="function")r.disconnectedCallback()})}function ee(e,r,s){if(!r||!s||r===s)return;v(e,(u)=>{if(typeof u.adoptedCallback==="function")u.adoptedCallback()})}function Me(e,r,s,u){if(typeof e?.attributeChangedCallback!=="function")return;if(s===u)return;if(!Ne(e).includes(r.toLowerCase()))return;e.attributeChangedCallback(r,s,u)}class n{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3;type;target=null;currentTarget=null;bubbles;cancelable;composed;defaultPrevented=!1;propagationStopped=!1;immediatePropagationStopped=!1;eventPhase=0;timeStamp;isTrusted=!1;_path=[];_propagationStopped=!1;_immediatePropagationStopped=!1;constructor(e,r={}){this.type=e,this.bubbles=r.bubbles??!1,this.cancelable=r.cancelable??!1,this.composed=r.composed??!1,this.timeStamp=Date.now()}initEvent(e,r=!1,s=!1){this.type=e,this.bubbles=r,this.cancelable=s,this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this._propagationStopped=!1,this._immediatePropagationStopped=!1}preventDefault(){if(this.cancelable)this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0,this._propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=!0,this.propagationStopped=!0,this._immediatePropagationStopped=!0,this._propagationStopped=!0}composedPath(){return[...this._path]}get cancelBubble(){return this.propagationStopped}set cancelBubble(e){if(e)this.stopPropagation()}get returnValue(){return!this.defaultPrevented}set returnValue(e){if(!e)this.preventDefault()}get srcElement(){return this.target}}var te=new WeakMap,P=new WeakSet;function oe(e){return e?.nodeType===11&&e?.nodeName==="#shadow-root"&&Boolean(e.host)}function re(e){let r=e;while(r){if(oe(r))return r;r=r.parentNode}return null}function ie(e){return e?._getInternalShadowRoot?.()?.querySelectorAll?.("slot")??[]}function pe(e,r){return e.length===r.length&&e.every((s,u)=>s===r[u])}function he(e){if(P.has(e))return;P.add(e),queueMicrotask(()=>{P.delete(e);let r=te.get(e)??[],s=yi(e);if(te.set(e,s),!pe(r,s))e.dispatchEvent(new n("slotchange"))})}function yi(e,r={}){let s=re(e);if(!s)return[];let u=e.getAttribute?.("name")??"";if(ie(s.host).find((h)=>(h.getAttribute?.("name")??"")===u)!==e)return[];let p=(s.host?.childNodes??[]).filter((h)=>{if(h.nodeType!==t&&h.nodeType!==i)return!1;return(h.nodeType===t?h.getAttribute?.("slot")??"":"")===u});if(!r.flatten)return p;return(p.length>0?p:e.childNodes??[]).flatMap((h)=>{if(h?.tagName==="SLOT"&&typeof h.assignedNodes==="function")return h.assignedNodes({flatten:!0});return[h]})}function to(e,r={}){return yi(e,r).filter((s)=>s.nodeType===t)}function G(e){let r=e?._getInternalShadowRoot?.()?e:null,s=oe(e)?e:re(e),u=e?.parentNode?._getInternalShadowRoot?.()?e.parentNode:null,N=r??s?.host??u;if(!N)return;for(let p of ie(N))he(p)}function S(e,r,s,u,N){if(r.length===0&&s.length===0)return;l._queueMutationRecord({type:"childList",target:e,addedNodes:r,removedNodes:s,previousSibling:u,nextSibling:N,attributeName:null,attributeNamespace:null,oldValue:null}),G(e)}function ae(e){return e.nodeType===a?e:e.ownerDocument}function fe(e){return e._getInternalShadowRoot?.()??null}function Ee(e){return e.tagName==="TEMPLATE"?e.content??null:null}function R(e){if(!e._lastTraversalParent&&!e._lastTraversalNextSibling)return;e._lastTraversalParent=null,e._lastTraversalNextSibling=null;for(let r of e.childNodes)R(r)}function E(e,r){if(e.ownerDocument===r&&e.nodeType!==a)return;let s=e.ownerDocument??null;if(e.nodeType!==a)e.ownerDocument=r;if(e.nodeType===t){let u=e.attributes?.get("id");if(u!==void 0){if(s?._idIndex)s._idIndex.delete(u);if(r?._idIndex)r._idIndex.set(u,e)}let N=fe(e);if(N)E(N,r);let p=Ee(e);if(p)p.ownerDocument=r}ee(e,s,r);for(let u of e.childNodes)E(u,r)}function Oe(e,r){let s=r;while(s){if(s===e)return!0;s=s.parentNode}return!1}function Re(e){let r=e.ownerDocument;if(!r||!r._idIndex||r._idIndex.size===0)return;if(e.nodeType===t){let s=e.attributes?.get("id");if(s!==void 0)r._idIndex.delete(s);for(let u of e.childNodes)if(u.nodeType===t)Re(u)}}function le(e){let r=e.isConnected===!0;if(!e.parentNode)return;Re(e);let s=e.parentNode,u=s.childNodes,N=u.indexOf(e),p=N>=0&&N<u.length-1?u[N+1]:null;if(N!==-1)u.splice(N,1);if(e._lastTraversalParent=s,e._lastTraversalNextSibling=p,e.parentNode=null,G(s),r)I(e)}function A(e,r){if(r===e||Oe(r,e))throw Error("The new child element contains the parent");if(r.nodeType===V){let s=[...r.childNodes];r.childNodes=[];let u=ae(e);for(let N of s){if(N.parentNode)le(N),R(N);N.parentNode=e,E(N,u)}return s}if(r.parentNode)le(r),R(r);return r.parentNode=e,E(r,ae(e)),[r]}function k(e,r){let s=A(e,r),u=e.childNodes.length>0?e.childNodes[e.childNodes.length-1]:null;if(s.length===1)e.childNodes.push(s[0]);else e.childNodes.push(...s);for(let N of s)if(N.isConnected===!0)Ve(N);return S(e,s,[],u,null),r}function nt(e,r,s){if(s===null)return k(e,r);let u=e.childNodes.indexOf(s);if(u===-1)throw Error("Reference node not found");let N=A(e,r),p=u>0?e.childNodes[u-1]:null;e.childNodes.splice(u,0,...N);for(let T of N)if(T.isConnected===!0)Ve(T);return S(e,N,[],p,s),r}function Le(e,r){let s=e.childNodes.indexOf(r);if(s===-1)throw Error("Child node not found");Re(r);let u=r.isConnected===!0,N=s>0?e.childNodes[s-1]:null,p=s<e.childNodes.length-1?e.childNodes[s+1]:null;if(e.childNodes.splice(s,1),r._lastTraversalParent=e,r._lastTraversalNextSibling=p,r.parentNode=null,u)I(r);return S(e,[],[r],N,p),r}function rt(e,r,s){let u=e.childNodes.indexOf(s);if(u===-1)throw Error("Old node not found");Re(s);let N=A(e,r),p=s.isConnected===!0,T=u>0?e.childNodes[u-1]:null,h=u<e.childNodes.length-1?e.childNodes[u+1]:null;if(e.childNodes.splice(u,1,...N),s._lastTraversalParent=e,s._lastTraversalNextSibling=h,s.parentNode=null,p)I(s);for(let y of N)if(y.isConnected===!0)Ve(y);return S(e,N,[s],T,h),s}function U(e){if(e.nodeType===i)return e.nodeValue||"";if(e.nodeType===c)return"";let r="";for(let s of e.childNodes)r+=U(s);return r}function Te(e,r,s,u){if(e===r)return!0;if(!s)return!1;let N=e.parentNode;while(N){if(N===r)return!0;N=N.parentNode}for(let p of u)if(e===p||Oe(p,e))return!0;return!1}function ge(e,r){if(e.type==="childList")return r.childList===!0;if(e.type==="attributes"){if(r.attributes!==!0)return!1;if(r.attributeFilter&&e.attributeName)return r.attributeFilter.map((s)=>s.toLowerCase()).includes(e.attributeName.toLowerCase());return!0}if(e.type==="characterData")return r.characterData===!0;return!1}function ye(e){let r={...e};if(r.attributeOldValue===!0||r.attributeFilter){if(r.attributes===!1)throw TypeError("Failed to execute observe: attributeOldValue/attributeFilter requires attributes to be true");r.attributes=!0}if(r.characterDataOldValue===!0){if(r.characterData===!1)throw TypeError("Failed to execute observe: characterDataOldValue requires characterData to be true");r.characterData=!0}if(r.childList!==!0&&r.attributes!==!0&&r.characterData!==!0)throw TypeError("Failed to execute observe: at least one of childList, attributes, or characterData must be true");return r}class l{static _observers=new Set;_callback;_records=[];_observations=new Map;_scheduled=!1;_transientRoots=new Set;constructor(e){this._callback=e}observe(e,r={}){let s=ye(r),u=this._observations.get(e);if(u){let N={...u,...s};if(u.attributeFilter&&s.attributeFilter){let p=new Set([...u.attributeFilter,...s.attributeFilter]);N.attributeFilter=Array.from(p)}this._observations.set(e,N)}else this._observations.set(e,s);l._observers.add(this)}disconnect(){this._observations.clear(),l._observers.delete(this),this._records=[],this._scheduled=!1,this._transientRoots.clear()}takeRecords(){let e=this._records;return this._records=[],e}_addRecord(e){if(this._records.push(e),this._scheduled)return;this._scheduled=!0,queueMicrotask(()=>{if(this._scheduled=!1,this._records.length>0){let r=this.takeRecords();this._callback(r,this)}this._transientRoots.clear()})}static _queueMutationRecord(e){if(l._observers.size===0)return;for(let r of l._observers)for(let[s,u]of r._observations){if(!Te(e.target,s,u.subtree===!0,r._transientRoots))continue;if(e.type==="childList"&&e.removedNodes.length>0&&u.subtree===!0)for(let p of e.removedNodes)r._transientRoots.add(p);if(!ge(e,u))continue;r._addRecord({...e,oldValue:e.type==="attributes"?u.attributeOldValue?e.oldValue:null:e.type==="characterData"?u.characterDataOldValue?e.oldValue:null:null})}}}class o extends d{nodeType=i;nodeKind="text";nodeName="#text";nodeValue;constructor(e){super();this.nodeValue=e}get textContent(){return this.nodeValue||""}set textContent(e){let r=this.nodeValue||"";this.nodeValue=e,l._queueMutationRecord({type:"characterData",target:this,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:r})}get data(){return this.nodeValue||""}set data(e){this.textContent=e}get length(){return(this.nodeValue||"").length}substringData(e,r){let s=this.nodeValue||"";if(e<0||e>s.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");return s.slice(e,e+r)}appendData(e){this.textContent=(this.nodeValue||"")+e}insertData(e,r){let s=this.nodeValue||"";if(e<0||e>s.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.textContent=s.slice(0,e)+r+s.slice(e)}deleteData(e,r){let s=this.nodeValue||"";if(e<0||e>s.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.textContent=s.slice(0,e)+s.slice(e+r)}replaceData(e,r,s){let u=this.nodeValue||"";if(e<0||e>u.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");this.textContent=u.slice(0,e)+s+u.slice(e+r)}splitText(e){let r=this.nodeValue||"";if(e<0||e>r.length)throw new DOMException("The index is not in the allowed range.","IndexSizeError");let s=r.slice(e);this.textContent=r.slice(0,e);let u=new o(s);if(u.ownerDocument=this.ownerDocument,this.parentNode){let N=this.parentNode,p=N.childNodes,T=p.indexOf(this);if(T!==-1&&T<p.length-1)N.insertBefore(u,p[T+1]);else N.appendChild(u)}return u}get wholeText(){let e="",r=this;while(r?.previousSibling?.nodeType===i)r=r.previousSibling;while(r&&r.nodeType===i)e+=r.nodeValue||"",r=r.nextSibling;return e}cloneNode(){return new o(this.nodeValue)}}
|
|
3
|
+
export{f,n,Ve,Me,yi,to,G,E,Oe,Re,k,nt,Le,rt,U,l,o,t,i,c,a,V,ne,Ae,qi,d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{b}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{b}from"./chunk-jxznxddr.js";var l=new Set(["constructor","prototype","__proto__","globalThis","global","self","window","parent","top","frames"]),c=new Set(["navigator","localStorage","sessionStorage","location","history","innerWidth","innerHeight","outerWidth","outerHeight","devicePixelRatio","scrollX","scrollY","pageXOffset","pageYOffset","matchMedia","getComputedStyle","getSelection","customElements","indexedDB","addEventListener","removeEventListener","dispatchEvent","postMessage","alert","confirm","prompt","scrollTo","scroll","scrollBy","requestAnimationFrame","cancelAnimationFrame","requestIdleCallback","cancelIdleCallback","BroadcastChannel","MessageChannel","MessagePort","EventSource","PerformanceObserver","MutationObserver","IntersectionObserver","ResizeObserver","CustomElementRegistry","HTMLElement","Event","CustomEvent","MouseEvent","KeyboardEvent","FocusEvent","InputEvent","SubmitEvent","PointerEvent","TouchEvent","WheelEvent","DragEvent","ClipboardEvent","AnimationEvent","TransitionEvent","ProgressEvent","MessageEvent","CloseEvent","StorageEvent","PopStateEvent","HashChangeEvent","ErrorEvent","MediaQueryListEvent","CompositionEvent","Document","Element","Node","Text","Comment","DocumentFragment","HTMLTemplateElement","SVGElement","NodeFilter","NodeIterator","TreeWalker","Range","Selection","DOMParser","XMLSerializer","XMLHttpRequest","WebSocket","File","FileReader","FileList","HTMLCanvasElement","CanvasRenderingContext2D","Image","Audio","IDBFactory","IDBDatabase","IDBObjectStore","IDBTransaction","IDBRequest","IDBOpenDBRequest","Notification","DataTransfer","FormData"]),i=null,s=new Map;function f(e){try{return Reflect.construct(String,[],e),!0}catch{return!1}}function u(e,t){if(typeof e.value==="function"&&f(e.value))return e;if(typeof e.value==="function")return{...e,value:e.value.bind(t)};if(typeof e.get==="function"||typeof e.set==="function"){let o={configurable:e.configurable,enumerable:e.enumerable};if(e.get)o.get=e.get.bind(t);if(e.set)o.set=e.set.bind(t);return o}return e}function a(e,t){if(!s.has(e))s.set(e,Object.getOwnPropertyDescriptor(globalThis,e));Object.defineProperty(globalThis,e,{...t,configurable:!0})}class De{static register(e={}){if(i)throw Error("GlobalRegistrator: already registered. Call unregister() first.");let t=new b(e);i=t;for(let n of Object.getOwnPropertyNames(t)){if(l.has(n))continue;if(n in globalThis&&!c.has(n))continue;let r=Object.getOwnPropertyDescriptor(t,n);if(!r)continue;a(n,u(r,t))}let o=Object.getPrototypeOf(t);for(let n of Object.getOwnPropertyNames(o)){if(l.has(n))continue;if(n in globalThis&&!c.has(n))continue;let r=Object.getOwnPropertyDescriptor(o,n);if(!r)continue;a(n,u(r,t))}a("window",{value:t,writable:!0}),a("document",{value:t.document,writable:!0})}static unregister(){if(!i)return;for(let[e,t]of s)try{if(t)Object.defineProperty(globalThis,e,t);else delete globalThis[e]}catch{}s.clear(),i=null}}
|
|
3
|
+
export{De};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{f,n,Ve,Me,yi,to,E,k,l,o,t,i,c,a,V,ne,Ae,d}from"./chunk-j3zvhv0k.js";import{I,y,_}from"./chunk-ye61xwrm.js";import{Ce,F,x,m}from"./chunk-bmdkjp4f.js";import{ee,H,te,_e,Se,ze,Ke,je,Ye,Xe,Je,Qe,Te,xe,Ze,Ne,hi,mi,e}from"./chunk-v3raywwq.js";import{r}from"./chunk-h327p3as.js";class ot{_marks=new Map;_measures=new Map;_startTime=Date.now();now(){return Date.now()-this._startTime}mark(s){this._marks.set(s,this.now())}measure(s,S,T){let C=T?this._marks.get(T):this.now(),D=S?this._marks.get(S):0;if(C!==void 0&&D!==void 0)this._measures.set(s,{start:D,duration:C-D})}clearMarks(s){if(s)this._marks.delete(s);else this._marks.clear()}clearMeasures(s){if(s)this._measures.delete(s);else this._measures.clear()}getEntriesByName(s){let S=[];if(this._marks.has(s))S.push({name:s,entryType:"mark",startTime:this._marks.get(s)});if(this._measures.has(s)){let T=this._measures.get(s);S.push({name:s,entryType:"measure",startTime:T.start,duration:T.duration})}return S}}class st{_coords=null;_setPosition(s){this._coords=s}_position(){return{coords:{latitude:this._coords?.latitude??37.7749,longitude:this._coords?.longitude??-122.4194,accuracy:this._coords?.accuracy??10,altitude:null,altitudeAccuracy:null,heading:null,speed:null},timestamp:Date.now()}}getCurrentPosition(s,S,T){setTimeout(()=>{s(this._position())},0)}watchPosition(s,S,T){return setInterval(()=>{s(this._position())},1000)}clearWatch(s){clearInterval(s)}}class at{static permission="default";title;body;icon;tag;onclick=null;onclose=null;onerror=null;onshow=null;constructor(s,S){this.title=s,this.body=S?.body,this.icon=S?.icon,this.tag=S?.tag,setTimeout(()=>{if(this.onshow)this.onshow({})},0)}static requestPermission(){return Promise.resolve("granted")}close(){if(this.onclose)this.onclose({})}}class Ki{_groups=[];_timers=new Map;log(...s){console.log(...this._prefix(),...s)}warn(...s){console.warn(...this._prefix(),...s)}error(...s){console.error(...this._prefix(),...s)}info(...s){console.info(...this._prefix(),...s)}debug(...s){console.debug(...this._prefix(),...s)}table(s){console.table(s)}group(s){if(s)this._groups.push(s),console.log(...this._prefix(),`\u25BC ${s}`)}groupCollapsed(s){this.group(s)}groupEnd(){this._groups.pop()}time(s){this._timers.set(s,Date.now())}timeEnd(s){let S=this._timers.get(s);if(S){let T=Date.now()-S;console.log(...this._prefix(),`${s}: ${T}ms`),this._timers.delete(s)}}timeLog(s,...S){let T=this._timers.get(s);if(T){let C=Date.now()-T;console.log(...this._prefix(),`${s}: ${C}ms`,...S)}}clear(){console.clear()}count(s="default"){console.log(...this._prefix(),s)}assert(s,...S){if(!s)console.error(...this._prefix(),"Assertion failed:",...S)}trace(...s){console.trace(...this._prefix(),...s)}_prefix(){return this._groups.map(()=>" ")}}class lt{_data=new Map;dropEffect="none";effectAllowed="uninitialized";files=[];items=[];types=[];setData(s,S){if(this._data.set(s,S),!this.types.includes(s))this.types.push(s)}getData(s){return this._data.get(s)||""}clearData(s){if(s){this._data.delete(s);let S=this.types.indexOf(s);if(S!==-1)this.types.splice(S,1)}else this._data.clear(),this.types=[]}setDragImage(s,S,T){}}class q{_properties=new Map;get length(){return this._properties.size}getPropertyValue(s){return this._properties.get(s)?.value??""}setProperty(s,S,T){this._properties.set(s,{value:S,priority:T??""})}removeProperty(s){let S=this.getPropertyValue(s);return this._properties.delete(s),S}getPropertyPriority(s){return this._properties.get(s)?.priority??""}get cssText(){return Array.from(this._properties.entries()).map(([s,{value:S,priority:T}])=>`${s}: ${S}${T?" !important":""}`).join("; ")}set cssText(s){this._properties.clear();for(let S of s.split(";")){let[T,...C]=S.split(":");if(T&&C.length){let D=C.join(":").trim(),w=D.endsWith("!important");this.setProperty(T.trim(),w?D.replace(/\s*!important\s*$/,"").trim():D,w?"important":"")}}}item(s){return Array.from(this._properties.keys())[s]??""}[Symbol.iterator](){return this._properties.keys()}}class oe{_media=[];get mediaText(){return this._media.join(", ")}set mediaText(s){this._media=s?s.split(",").map((S)=>S.trim()):[]}get length(){return this._media.length}item(s){return this._media[s]??null}appendMedium(s){if(!this._media.includes(s))this._media.push(s)}deleteMedium(s){this._media=this._media.filter((S)=>S!==s)}toString(){return this.mediaText}}class h{static STYLE_RULE=1;static CHARSET_RULE=2;static IMPORT_RULE=3;static MEDIA_RULE=4;static FONT_FACE_RULE=5;static PAGE_RULE=6;static KEYFRAMES_RULE=7;static KEYFRAME_RULE=8;static NAMESPACE_RULE=10;static COUNTER_STYLE_RULE=11;static SUPPORTS_RULE=12;static FONT_FEATURE_VALUES_RULE=14;static CONTAINER_RULE=17;type;cssText="";parentRule=null;parentStyleSheet=null;constructor(s){this.type=s}}function as(s,S){for(let T of s.split(";")){let C=T.indexOf(":");if(C===-1)continue;let D=T.slice(0,C).trim(),w=T.slice(C+1).trim();if(!D||!w)continue;let G=/!\s*important$/i.test(w),P=G?w.replace(/\s*!\s*important$/i,"").trim():w;if(P)S.style.setProperty(D,P,G?"important":"")}}function ts(s,S){let T=[];for(let C of ls(s)){let D=C.trim();if(!D)continue;let w=D.indexOf("{");if(w===-1)continue;let G=D.slice(0,w).trim(),P=D.slice(w+1,D.lastIndexOf("}")).trim(),B=/^@media\b(.*)$/is.exec(G);if(B){let U=new Pe,Q=B[1].trim();U.conditionText=Q,U.media.mediaText=Q,U.parentStyleSheet=S;let ie=U.cssRules;for(let Z of ts(P,S))Z.parentRule=U,ie.push(Z);T.push(U);continue}let W=new K;W.selectorText=G,W.parentStyleSheet=S,as(P,W),T.push(W)}return T}class se extends h{cssRules=[];insertRule(s,S=0){let T=new K;return T.cssText=s,T.parentRule=this,T.parentStyleSheet=this.parentStyleSheet,this.cssRules.splice(S,0,T),S}deleteRule(s){this.cssRules.splice(s,1)}}class z extends se{conditionText=""}class K extends h{selectorText="";style=new q;constructor(){super(h.STYLE_RULE)}}class Pe extends z{media=new oe;constructor(){super(h.MEDIA_RULE)}}class Ie extends h{keyText="";style=new q;constructor(){super(h.KEYFRAME_RULE)}}class ut extends h{name="";cssRules=[];constructor(){super(h.KEYFRAMES_RULE)}appendRule(s){let S=new Ie;S.cssText=s,S.parentRule=this,S.parentStyleSheet=this.parentStyleSheet,this.cssRules.push(S)}deleteRule(s){let S=this.cssRules.findIndex((T)=>T.keyText===s);if(S!==-1)this.cssRules.splice(S,1)}findRule(s){return this.cssRules.find((S)=>S.keyText===s)??null}}class ct extends h{style=new q;constructor(){super(h.FONT_FACE_RULE)}}class dt extends z{constructor(){super(h.SUPPORTS_RULE)}}class ht extends z{containerName="";containerQuery="";constructor(){super(h.CONTAINER_RULE)}}class mt extends se{start="";end="";constructor(){super(h.STYLE_RULE)}}class ae{cssRules=[];disabled=!1;href=null;media=new oe;ownerNode=null;ownerRule=null;parentStyleSheet=null;title=null;type="text/css";insertRule(s,S=0){let T=new K;return T.cssText=s,T.parentStyleSheet=this,this.cssRules.splice(S,0,T),S}deleteRule(s){this.cssRules.splice(s,1)}replace(s){return this.replaceSync(s),Promise.resolve(this)}replaceSync(s){let S=this.cssRules;S.length=0;for(let T of ts(s,this))S.push(T)}}function ls(s){let S=[],T=0,C=0;for(let D=0;D<s.length;D++){let w=s[D];if(w==="{")T++;else if(w==="}"){if(T--,T===0)S.push(s.slice(C,D+1)),C=D+1}}return S}var qe=/^[\w-]+$/,es=/^\w+\(.+\)$/,pt={escape(s){return s.replace(/([^\w-])/g,"\\$1")},supports(s,S){if(S===void 0){let C=s.trim();if(!C)return!1;if(C.startsWith("not ")){let D=C.slice(4).trim().replace(/^\(|\)$/g,""),w=D.indexOf(":");if(w===-1)return!1;return!pt.supports(D.slice(0,w).trim(),D.slice(w+1).trim())}return!0}if(!s||!S)return!1;if(!qe.test(s))return!1;let T=S.trim();if(!T)return!1;if(qe.test(T))return!0;if(es.test(T))return!0;if(/^-?\d+(?:\.\d+)?(?:[a-z%]+)?$/i.test(T))return!0;if(/^#[0-9a-f]{3,8}$/i.test(T))return!0;return T.split(/\s+/).every((C)=>qe.test(C)||es.test(C)||/^-?\d+(?:\.\d+)?(?:[a-z%]+)?$/i.test(C)||/^#[0-9a-f]{3,8}$/i.test(C))}};class ke{get size(){return 0}has(s){return!1}get(s){return}getAll(s){return[]}forEach(s){}entries(){return[][Symbol.iterator]()}keys(){return[][Symbol.iterator]()}values(){return[][Symbol.iterator]()}}class ft extends ke{set(s,...S){}append(s,...S){}delete(s){}clear(){}}class le{fillStyle="#000000";strokeStyle="#000000";globalAlpha=1;globalCompositeOperation="source-over";lineWidth=1;lineCap="butt";lineJoin="miter";miterLimit=10;lineDashOffset=0;shadowOffsetX=0;shadowOffsetY=0;shadowBlur=0;shadowColor="rgba(0, 0, 0, 0)";font="10px sans-serif";textAlign="start";textBaseline="alphabetic";canvas;savedStates=[];currentPath=[];transformMatrix=[1,0,0,1,0,0];constructor(s){this.canvas=s}save(){this.savedStates.push({fillStyle:this.fillStyle,strokeStyle:this.strokeStyle,globalAlpha:this.globalAlpha,globalCompositeOperation:this.globalCompositeOperation,lineWidth:this.lineWidth,lineCap:this.lineCap,lineJoin:this.lineJoin,miterLimit:this.miterLimit,lineDashOffset:this.lineDashOffset,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,font:this.font,textAlign:this.textAlign,textBaseline:this.textBaseline,transformMatrix:[...this.transformMatrix]})}restore(){let s=this.savedStates.pop();if(s)Object.assign(this,s)}scale(s,S){this.transformMatrix[0]*=s,this.transformMatrix[3]*=S}rotate(s){let S=Math.cos(s),T=Math.sin(s),[C,D,w,G,P,B]=this.transformMatrix;this.transformMatrix[0]=C*S+w*T,this.transformMatrix[1]=D*S+G*T,this.transformMatrix[2]=w*S-C*T,this.transformMatrix[3]=G*S-D*T}translate(s,S){this.transformMatrix[4]+=s,this.transformMatrix[5]+=S}transform(s,S,T,C,D,w){let[G,P,B,W,U,Q]=this.transformMatrix;this.transformMatrix[0]=G*s+B*S,this.transformMatrix[1]=P*s+W*S,this.transformMatrix[2]=G*T+B*C,this.transformMatrix[3]=P*T+W*C,this.transformMatrix[4]=G*D+B*w+U,this.transformMatrix[5]=P*D+W*w+Q}setTransform(s,S,T,C,D,w){this.transformMatrix=[s,S,T,C,D,w]}resetTransform(){this.transformMatrix=[1,0,0,1,0,0]}beginPath(){this.currentPath=[]}closePath(){this.currentPath.push({type:"closePath",args:[]})}moveTo(s,S){this.currentPath.push({type:"moveTo",args:[s,S]})}lineTo(s,S){this.currentPath.push({type:"lineTo",args:[s,S]})}arc(s,S,T,C,D,w=!1){this.currentPath.push({type:"arc",args:[s,S,T,C,D,w]})}arcTo(s,S,T,C,D){this.currentPath.push({type:"arcTo",args:[s,S,T,C,D]})}quadraticCurveTo(s,S,T,C){this.currentPath.push({type:"quadraticCurveTo",args:[s,S,T,C]})}bezierCurveTo(s,S,T,C,D,w){this.currentPath.push({type:"bezierCurveTo",args:[s,S,T,C,D,w]})}rect(s,S,T,C){this.currentPath.push({type:"rect",args:[s,S,T,C]})}ellipse(s,S,T,C,D,w,G,P=!1){this.currentPath.push({type:"ellipse",args:[s,S,T,C,D,w,G,P]})}fill(){}stroke(){}clip(){}fillRect(s,S,T,C){}strokeRect(s,S,T,C){}clearRect(s,S,T,C){}fillText(s,S,T,C){}strokeText(s,S,T,C){}measureText(s){let S=s.length*8;return{width:S,actualBoundingBoxLeft:0,actualBoundingBoxRight:S,fontBoundingBoxAscent:10,fontBoundingBoxDescent:2,actualBoundingBoxAscent:10,actualBoundingBoxDescent:2,emHeightAscent:10,emHeightDescent:2,hangingBaseline:8,alphabeticBaseline:0,ideographicBaseline:-2}}drawImage(s,...S){}createImageData(s,S){if(typeof s==="number"&&typeof S==="number"){let T=new Uint8ClampedArray(s*S*4);return{width:s,height:S,data:T}}else{let T=s;return this.createImageData(T.width,T.height)}}getImageData(s,S,T,C){let D=new Uint8ClampedArray(T*C*4);return{width:T,height:C,data:D}}putImageData(...s){}createLinearGradient(s,S,T,C){let D=new Map;return{addColorStop(w,G){D.set(w,G)}}}createRadialGradient(s,S,T,C,D,w){let G=new Map;return{addColorStop(P,B){G.set(P,B)}}}createPattern(s,S){return{setTransform(T){}}}_lineDash=[];setLineDash(s){this._lineDash=[...s]}getLineDash(){return[...this._lineDash]}isPointInPath(s,S){return!1}isPointInStroke(s,S){return!1}}class Be{types;_data;constructor(s){this._data=new Map(Object.entries(s)),this.types=Array.from(this._data.keys())}async getType(s){let S=this._data.get(s);if(S===void 0)throw new DOMException(`Type "${s}" not available on ClipboardItem`,"NotFoundError");let T=await S;if(T instanceof Blob)return T;return new Blob([T],{type:s})}static supports(s){return typeof s==="string"&&s.length>0}}class wi{_text="";async writeText(s){this._text=s}async readText(){return this._text}async write(s){for(let S of s)for(let T of S.types){let C=await S.getType(T);if(T==="text/plain")this._text=await C.text()}}async read(){let s=new Blob([this._text],{type:"text/plain"});return[new Be({"text/plain":s})]}}function us(){if(typeof process<"u"&&process.platform)switch(process.platform){case"darwin":return"MacIntel";case"win32":return"Win32";case"linux":return"Linux x86_64";default:return process.platform}return"Linux x86_64"}class _i{_granted=null;query(s){return Promise.resolve(new Ti(s.name,this._stateFor(s.name)))}_stateFor(s){if(this._granted===null)return"granted";return this._granted.has(s)?"granted":"prompt"}_grant(s){this._granted=new Set([...this._granted??[],...s])}_clearGrants(){this._granted=new Set}}class Si{async estimate(){return{usage:0,quota:1073741824}}async persist(){return!0}async persisted(){return!0}async getDirectory(){throw new DOMException("OPFS not supported","NotSupportedError")}}class Ti{name;state;onchange=null;constructor(s,S){this.name=s,this.state=S}}class gt{clipboard=new wi;geolocation=new st;permissions=new _i;storage=new Si;userAgent="Mozilla/5.0 (X11; Linux x64) AppleWebKit/537.36 (KHTML, like Gecko) VeryHappyDOM/1.0.0";language=typeof process<"u"&&process.env?.LANG?process.env.LANG.split(".")[0].replace("_","-"):"en-US";languages=["en-US","en"];platform=us();cookieEnabled=!0;onLine=!0;hardwareConcurrency=typeof navigator<"u"&&"hardwareConcurrency"in navigator?navigator.hardwareConcurrency:4;maxTouchPoints=0;vendor="";doNotTrack=null;sendBeacon(s,S){try{return globalThis.fetch(s,{method:"POST",body:S??void 0,keepalive:!0}).catch(()=>{}),!0}catch{return!1}}}class bt extends Blob{name;lastModified;constructor(s,S,T){super(s,T);this.name=S,this.lastModified=T?.lastModified||Date.now()}}class u{static EMPTY=0;static LOADING=1;static DONE=2;readyState=u.EMPTY;result=null;error=null;onload=null;onerror=null;onloadstart=null;onloadend=null;onprogress=null;onabort=null;_eventListeners=new Map;readAsText(s,S="UTF-8"){this.readyState=u.LOADING,this._trigger("loadstart"),s.text().then((T)=>{this.result=T,this.readyState=u.DONE,this._trigger("load"),this._trigger("loadend")}).catch((T)=>{this.error=T,this.readyState=u.DONE,this._trigger("error"),this._trigger("loadend")})}readAsDataURL(s){this.readyState=u.LOADING,this._trigger("loadstart"),s.arrayBuffer().then((S)=>{let T=Buffer.from(S).toString("base64");this.result=`data:${s.type};base64,${T}`,this.readyState=u.DONE,this._trigger("load"),this._trigger("loadend")}).catch((S)=>{this.error=S,this.readyState=u.DONE,this._trigger("error"),this._trigger("loadend")})}readAsArrayBuffer(s){this.readyState=u.LOADING,this._trigger("loadstart"),s.arrayBuffer().then((S)=>{this.result=S,this.readyState=u.DONE,this._trigger("load"),this._trigger("loadend")}).catch((S)=>{this.error=S,this.readyState=u.DONE,this._trigger("error"),this._trigger("loadend")})}readAsBinaryString(s){this.readyState=u.LOADING,this._trigger("loadstart"),s.arrayBuffer().then((S)=>{this.result=String.fromCharCode(...new Uint8Array(S)),this.readyState=u.DONE,this._trigger("load"),this._trigger("loadend")}).catch((S)=>{this.error=S,this.readyState=u.DONE,this._trigger("error"),this._trigger("loadend")})}abort(){this.readyState=u.DONE,this._trigger("abort"),this._trigger("loadend")}addEventListener(s,S){if(!this._eventListeners.has(s))this._eventListeners.set(s,new Set);this._eventListeners.get(s).add(S)}removeEventListener(s,S){let T=this._eventListeners.get(s);if(T)T.delete(S)}_trigger(s){let S={type:s,lengthComputable:!1,loaded:0,total:0},T=this._eventListeners.get(s);if(T)for(let D of T)D(S);let C=this[`on${s}`];if(C)C.call(this,S)}}class yt{_files=[];constructor(s=[]){this._files=s}get length(){return this._files.length}item(s){return this._files[s]||null}[Symbol.iterator](){return this._files[Symbol.iterator]()}}class v extends n{detail;view;which;constructor(s,S={}){super(s,S);this.detail=S.detail??0,this.view=S.view??null,this.which=S.which??0}}class M extends v{clientX;clientY;screenX;screenY;pageX;pageY;offsetX;offsetY;movementX;movementY;button;buttons;ctrlKey;shiftKey;altKey;metaKey;relatedTarget;constructor(s,S={}){super(s,S);this.clientX=S.clientX??0,this.clientY=S.clientY??0,this.screenX=S.screenX??0,this.screenY=S.screenY??0,this.pageX=S.pageX??0,this.pageY=S.pageY??0,this.offsetX=S.offsetX??0,this.offsetY=S.offsetY??0,this.movementX=S.movementX??0,this.movementY=S.movementY??0,this.button=S.button??0,this.buttons=S.buttons??0,this.ctrlKey=S.ctrlKey??!1,this.shiftKey=S.shiftKey??!1,this.altKey=S.altKey??!1,this.metaKey=S.metaKey??!1,this.relatedTarget=S.relatedTarget??null}}class ue extends v{key;code;location;repeat;ctrlKey;shiftKey;altKey;metaKey;isComposing;charCode;keyCode;constructor(s,S={}){super(s,S);this.key=S.key??"",this.code=S.code??"",this.location=S.location??0,this.repeat=S.repeat??!1,this.ctrlKey=S.ctrlKey??!1,this.shiftKey=S.shiftKey??!1,this.altKey=S.altKey??!1,this.metaKey=S.metaKey??!1,this.isComposing=S.isComposing??!1,this.charCode=S.charCode??0,this.keyCode=S.keyCode??0}}class ce extends v{relatedTarget;constructor(s,S={}){super(s,S);this.relatedTarget=S.relatedTarget??null}}class Et extends v{data;inputType;isComposing;dataTransfer;constructor(s,S={}){super(s,S);this.data=S.data??null,this.inputType=S.inputType??"",this.isComposing=S.isComposing??!1,this.dataTransfer=S.dataTransfer??null}}class vt extends M{static DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;deltaX;deltaY;deltaZ;deltaMode;constructor(s,S={}){super(s,S);this.deltaX=S.deltaX??0,this.deltaY=S.deltaY??0,this.deltaZ=S.deltaZ??0,this.deltaMode=S.deltaMode??0}}class wt extends M{pointerId;width;height;pressure;tangentialPressure;tiltX;tiltY;twist;pointerType;isPrimary;constructor(s,S={}){super(s,S);this.pointerId=S.pointerId??0,this.width=S.width??1,this.height=S.height??1,this.pressure=S.pressure??0,this.tangentialPressure=S.tangentialPressure??0,this.tiltX=S.tiltX??0,this.tiltY=S.tiltY??0,this.twist=S.twist??0,this.pointerType=S.pointerType??"",this.isPrimary=S.isPrimary??!1}}class _t extends v{touches;targetTouches;changedTouches;ctrlKey;shiftKey;altKey;metaKey;constructor(s,S={}){super(s,S);this.touches=S.touches??[],this.targetTouches=S.targetTouches??[],this.changedTouches=S.changedTouches??[],this.ctrlKey=S.ctrlKey??!1,this.shiftKey=S.shiftKey??!1,this.altKey=S.altKey??!1,this.metaKey=S.metaKey??!1}}class St extends n{animationName;elapsedTime;pseudoElement;constructor(s,S={}){super(s,S);this.animationName=S.animationName??"",this.elapsedTime=S.elapsedTime??0,this.pseudoElement=S.pseudoElement??""}}class Tt extends n{propertyName;elapsedTime;pseudoElement;constructor(s,S={}){super(s,S);this.propertyName=S.propertyName??"",this.elapsedTime=S.elapsedTime??0,this.pseudoElement=S.pseudoElement??""}}class xt extends n{clipboardData;constructor(s,S={}){super(s,S);this.clipboardData=S.clipboardData??null}}class Nt extends M{dataTransfer;constructor(s,S={}){super(s,S);this.dataTransfer=S.dataTransfer??null}}class de extends n{message;filename;lineno;colno;error;constructor(s,S={}){super(s,S);this.message=S.message??"",this.filename=S.filename??"",this.lineno=S.lineno??0,this.colno=S.colno??0,this.error=S.error??null}}class Ct extends n{oldURL;newURL;constructor(s,S={}){super(s,S);this.oldURL=S.oldURL??"",this.newURL=S.newURL??""}}class Vt extends n{state;constructor(s,S={}){super(s,S);this.state=S.state??null}}class Mt extends n{lengthComputable;loaded;total;constructor(s,S={}){super(s,S);this.lengthComputable=S.lengthComputable??!1,this.loaded=S.loaded??0,this.total=S.total??0}}class O extends n{data;origin;lastEventId;source;ports;constructor(s,S={}){super(s,S);this.data=S.data??null,this.origin=S.origin??"",this.lastEventId=S.lastEventId??"",this.source=S.source??null,this.ports=S.ports??[]}}class Ot extends n{code;reason;wasClean;constructor(s,S={}){super(s,S);this.code=S.code??0,this.reason=S.reason??"",this.wasClean=S.wasClean??!1}}class Rt extends n{key;oldValue;newValue;url;storageArea;constructor(s,S={}){super(s,S);this.key=S.key??null,this.oldValue=S.oldValue??null,this.newValue=S.newValue??null,this.url=S.url??"",this.storageArea=S.storageArea??null}}class Lt extends n{submitter;constructor(s,S={}){super(s,S);this.submitter=S.submitter??null}}class At extends n{matches;media;constructor(s,S={}){super(s,S);this.matches=S.matches??!1,this.media=S.media??""}}class Dt extends v{data;constructor(s,S={}){super(s,S);this.data=S.data??""}}class Pt{identifier;target;clientX;clientY;screenX;screenY;pageX;pageY;radiusX;radiusY;rotationAngle;force;constructor(s){this.identifier=s.identifier,this.target=s.target,this.clientX=s.clientX??0,this.clientY=s.clientY??0,this.screenX=s.screenX??0,this.screenY=s.screenY??0,this.pageX=s.pageX??0,this.pageY=s.pageY??0,this.radiusX=s.radiusX??0,this.radiusY=s.radiusY??0,this.rotationAngle=s.rotationAngle??0,this.force=s.force??0}}var De=new Map;class It extends f{name;_closed=!1;onmessage=null;onmessageerror=null;constructor(s){super();this.name=String(s);let S=De.get(this.name);if(!S)S=new Set,De.set(this.name,S);S.add(this)}postMessage(s){if(this._closed)throw Error("InvalidStateError: BroadcastChannel is closed");let S=De.get(this.name);if(!S)return;queueMicrotask(()=>{for(let T of S){if(T===this||T._closed)continue;let C=new O("message",{data:s,origin:""});try{T.onmessage?.(C)}catch{}T.dispatchEvent(C)}})}close(){if(this._closed)return;this._closed=!0;let s=De.get(this.name);if(s){if(s.delete(this),s.size===0)De.delete(this.name)}}}class he extends f{_onmessage=null;onmessageerror=null;get onmessage(){return this._onmessage}set onmessage(s){if(this._onmessage=s,s)this.start()}_peer=null;_started=!1;_queue=[];_closed=!1;postMessage(s){if(this._closed||!this._peer)return;let S=new O("message",{data:s,origin:""}),T=this._peer;queueMicrotask(()=>{if(T._closed)return;if(T._started)T._deliver(S);else T._queue.push(S)})}start(){if(this._started)return;this._started=!0;let s=this._queue;this._queue=[];for(let S of s)this._deliver(S)}close(){this._closed=!0}_deliver(s){try{this._onmessage?.(s)}catch{}this.dispatchEvent(s)}addEventListener(s,S,T){if(super.addEventListener(s,S,T),s==="message")this.start()}}class kt{port1;port2;constructor(){this.port1=new he,this.port2=new he,this.port1._peer=this.port2,this.port2._peer=this.port1}}class R extends f{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;url;withCredentials;readyState=R.CONNECTING;onopen=null;onmessage=null;onerror=null;_abort;_reconnectTimeout=3000;_lastEventId="";_closed=!1;constructor(s,S={}){super();this.url=typeof s==="string"?s:s.href,this.withCredentials=S.withCredentials===!0,this._abort=new AbortController,this._connect()}close(){this._closed=!0,this.readyState=R.CLOSED,this._abort.abort()}async _connect(){while(!this._closed){try{let s=await globalThis.fetch(this.url,{signal:this._abort.signal,headers:{Accept:"text/event-stream",...this._lastEventId?{"Last-Event-ID":this._lastEventId}:{}},credentials:this.withCredentials?"include":"same-origin"});if(!s.ok||!s.body){this._fireError();return}this.readyState=R.OPEN;let S=new n("open");try{this.onopen?.(S)}catch{}this.dispatchEvent(S),await this._pump(s.body)}catch{if(this._closed)return;this._fireError()}if(this._closed)return;await new Promise((s)=>setTimeout(s,this._reconnectTimeout)),this.readyState=R.CONNECTING}}async _pump(s){let S=s.getReader(),T=new TextDecoder,C="";try{while(!this._closed){let{value:D,done:w}=await S.read();if(w)return;C+=T.decode(D,{stream:!0});let G;while((G=C.indexOf(`
|
|
3
|
+
|
|
4
|
+
`))>=0||(G=C.indexOf(`\r
|
|
5
|
+
\r
|
|
6
|
+
`))>=0){let P=C[G+1]===`
|
|
7
|
+
`?4:2,B=C.slice(0,G);C=C.slice(G+P),this._dispatchFrame(B)}}}finally{S.releaseLock()}}_dispatchFrame(s){let S="message",T=[],C;for(let w of s.split(/\r?\n/)){if(!w||w.startsWith(":"))continue;let G=w.indexOf(":"),P=G===-1?w:w.slice(0,G),B=G===-1?"":w.slice(G+1);if(B.startsWith(" "))B=B.slice(1);switch(P){case"event":S=B;break;case"data":T.push(B);break;case"id":C=B;break;case"retry":{let W=Number(B);if(Number.isFinite(W))this._reconnectTimeout=W;break}}}if(C!==void 0)this._lastEventId=C;if(T.length===0)return;let D=new O(S,{data:T.join(`
|
|
8
|
+
`),lastEventId:this._lastEventId,origin:new URL(this.url,"http://localhost").origin});if(S==="message")try{this.onmessage?.(D)}catch{}this.dispatchEvent(D)}_fireError(){this.readyState=R.CLOSED;let s=new de("error");try{this.onerror?.(s)}catch{}this.dispatchEvent(s)}}var et=globalThis.FormData;function ji(s,S){let T=new et;if(!s||typeof s!=="object")return T;let C=s;if(C.tagName!=="FORM")return T;let D=C.elements?Array.from(C.elements):C.querySelectorAll?Array.from(C.querySelectorAll("input,select,textarea,button")):[];for(let w of D){let G=w,P=G.name;if(!P||G.disabled)continue;let B=(G.tagName??"").toUpperCase(),W=(G.type??"").toLowerCase();if(B==="BUTTON"||W==="button"||W==="reset"){if(G!==S)continue}if(W==="submit"&&G!==S)continue;if((W==="checkbox"||W==="radio")&&!G.checked)continue;if(W==="file"){let U=G.files;if(!U||U.length===0)T.append(P,new File([],"",{type:"application/octet-stream"}));else for(let Q of U)T.append(P,Q);continue}if(B==="SELECT"){let U=G.multiple&&G.options?G.options.filter((Q)=>Q.selected).map((Q)=>Q.value):[G.value??""];for(let Q of U)T.append(P,Q);continue}T.append(P,G.value??"")}return T}var xi=new Proxy(et,{construct(s,S){let[T,C]=S;if(T===void 0)return new et;return ji(T,C)}});class tt extends Array{contains(s){return this.includes(s)}item(s){return this[s]??null}}class me extends f{result=void 0;error=null;source=null;transaction=null;readyState="pending";onsuccess=null;onerror=null;_resolve(s){this.result=s,this.readyState="done",queueMicrotask(()=>{let S=new n("success");try{this.onsuccess?.(S)}catch{}this.dispatchEvent(S),this._notifyTransaction()})}_reject(s){this.error=s,this.readyState="done",queueMicrotask(()=>{let S=new n("error");try{this.onerror?.(S)}catch{}this.dispatchEvent(S),this._notifyTransaction()})}_notifyTransaction(){this.transaction?._settled?.()}}class pe extends me{onupgradeneeded=null;onblocked=null}class He{name;keyPath;autoIncrement;indexNames=[];transaction=null;_data=new Map;_autoKey=1;constructor(s,S={}){this.name=s,this.keyPath=S.keyPath??null,this.autoIncrement=S.autoIncrement===!0}add(s,S){return this._put(s,S,!0)}put(s,S){return this._put(s,S,!1)}get(s){let S=this._request();return S._resolve(this._data.get(String(s))),S}getAll(){let s=this._request();return s._resolve(Array.from(this._data.values())),s}delete(s){let S=this._request();return this._beforeWrite(),this._data.delete(String(s)),S._resolve(void 0),S}clear(){let s=this._request();return this._beforeWrite(),this._data.clear(),s._resolve(void 0),s}count(){let s=this._request();return s._resolve(this._data.size),s}createIndex(){throw Error("IDBObjectStore.createIndex not supported in the stub")}_put(s,S,T){let C=this._request(),D;if(S!==void 0)D=String(S);else if(this.keyPath&&typeof s==="object"&&s!==null){let w=Array.isArray(this.keyPath)?this.keyPath[0]:this.keyPath;D=String(s[w])}else if(this.autoIncrement)D=String(this._autoKey++);else return C._reject(new DOMException("No key specified","DataError")),C;if(T&&this._data.has(D))return C._reject(new DOMException("Key already exists","ConstraintError")),C;return this._beforeWrite(),this._data.set(D,s),C._resolve(D),C}_request(){let s=new me;return s.source=this,s.transaction=this.transaction,this.transaction?._pending(1),s}_beforeWrite(){this.transaction?._noteWrite(this)}_snapshot(){return{data:new Map(this._data),autoKey:this._autoKey}}_restore(s){this._data=new Map(s.data),this._autoKey=s.autoKey}}class Fe extends f{mode;objectStoreNames;db;error=null;oncomplete=null;onabort=null;onerror=null;_snapshots=new Map;_outstanding=0;_settledOnce=!1;_done=!1;_didAbort=!1;constructor(s,S,T){super();this.db=s,this.objectStoreNames=new tt(...S),this.mode=T,queueMicrotask(()=>{this._settledOnce=!0,this._maybeComplete()})}objectStore(s){let S=this.db._getStore(s);if(!S)throw new DOMException(`No object store named "${s}"`,"NotFoundError");return S.transaction=this,S}abort(){if(this._done)return;this._done=!0,this._didAbort=!0;for(let[S,T]of this._snapshots)S._restore(T);this._snapshots.clear();let s=new n("abort");try{this.onabort?.(s)}catch{}this.dispatchEvent(s)}_noteWrite(s){if(this.mode==="readonly"||this._done||this._snapshots.has(s))return;this._snapshots.set(s,s._snapshot())}_pending(s){this._outstanding+=s}_settled(){this._outstanding--,queueMicrotask(()=>this._maybeComplete())}_maybeComplete(){if(this._done||!this._settledOnce||this._outstanding>0)return;this._done=!0,this._snapshots.clear();let s=new n("complete");try{this.oncomplete?.(s)}catch{}this.dispatchEvent(s)}get aborted(){return this._didAbort}}class Ge extends f{name;version;objectStoreNames=new tt;_stores=new Map;onabort=null;onclose=null;onerror=null;onversionchange=null;constructor(s,S){super();this.name=s,this.version=S}createObjectStore(s,S){let T=new He(s,S);return this._stores.set(s,T),this.objectStoreNames.push(s),T}deleteObjectStore(s){this._stores.delete(s);let S=this.objectStoreNames.indexOf(s);if(S>=0)this.objectStoreNames.splice(S,1)}transaction(s,S="readonly"){let T=Array.isArray(s)?s:[s];return new Fe(this,T,S)}close(){}_getStore(s){return this._stores.get(s)}}class Ue{_dbs=new Map;open(s,S=1){let T=new pe,C=this._dbs.get(s),D=!C||C.version<S,w=C??new Ge(s,S);if(this._dbs.set(s,w),D)queueMicrotask(()=>{let G=new n("upgradeneeded"),P=G;P.oldVersion=C?.version??0,P.newVersion=S,T.result=w;try{T.onupgradeneeded?.(G),T.dispatchEvent(G)}catch(B){T._reject(B instanceof DOMException?B:new DOMException(String(B?.message??B),"AbortError"));return}T._resolve(w)});else T._resolve(w);return T}deleteDatabase(s){let S=new pe;return this._dbs.delete(s),S._resolve(void 0),S}databases(){return Promise.resolve(Array.from(this._dbs.values()).map((s)=>({name:s.name,version:s.version})))}cmp(s,S){let T=String(s),C=String(S);return T<C?-1:T>C?1:0}}function Ni(){return new Ue}var cs=Object.freeze(["mark","measure","resource","navigation","paint","longtask","element","event"]);class Bt{static supportedEntryTypes=cs;_callback;_types=new Set;_records=[];constructor(s){this._callback=s}observe(s={}){if(s.entryTypes)for(let S of s.entryTypes)this._types.add(S);else if(s.type)this._types.add(s.type)}disconnect(){this._types.clear(),this._records=[]}takeRecords(){let s=this._records;return this._records=[],s}_push(s){if(!this._types.has(s.entryType))return;this._records.push(s);let S={getEntries:()=>this._records.slice(),getEntriesByType:(T)=>this._records.filter((C)=>C.entryType===T),getEntriesByName:(T,C)=>this._records.filter((D)=>D.name===T&&(!C||D.entryType===C))};try{this._callback(S,this)}catch{}}}class fe extends n{detail;constructor(s,S={}){super(s,S);this.detail=S.detail}}class g{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;readyState=g.UNSENT;response=null;responseText="";responseType="";responseURL="";responseXML=null;status=0;statusText="";timeout=0;upload=new ns;withCredentials=!1;onreadystatechange=null;onload=null;onerror=null;onabort=null;onloadstart=null;onloadend=null;onprogress=null;ontimeout=null;_method="";_url="";_requestHeaders=new Map;_responseHeaders=new Map;_aborted=!1;_eventListeners=new Map;constructor(){}open(s,S,T=!0,C,D){this._method=s.toUpperCase(),this._url=S,this.readyState=g.OPENED,this._triggerEvent("readystatechange")}send(s){if(this.readyState!==g.OPENED)throw Error("InvalidStateError: Object state must be OPENED");this._triggerEvent("loadstart",!0);let S={};for(let[w,G]of this._requestHeaders)S[w]=G;let T={method:this._method,headers:S,body:s,credentials:this.withCredentials?"include":"same-origin"},C=new AbortController,D=null;if(this.timeout>0)D=setTimeout(()=>{C.abort(),this._triggerEvent("timeout",!0)},this.timeout);fetch(this._url,{...T,signal:C.signal}).then(async(w)=>{if(D)clearTimeout(D);if(this._aborted)return;if(this.status=w.status,this.statusText=w.statusText,this.responseURL=w.url,w.headers.forEach((G,P)=>{this._responseHeaders.set(P.toLowerCase(),G)}),this.readyState=g.HEADERS_RECEIVED,this._triggerEvent("readystatechange"),this.readyState=g.LOADING,this._triggerEvent("readystatechange"),this.responseType===""||this.responseType==="text")this.responseText=await w.text(),this.response=this.responseText;else if(this.responseType==="json")this.response=await w.json(),this.responseText=JSON.stringify(this.response);else if(this.responseType==="arraybuffer")this.response=await w.arrayBuffer();else if(this.responseType==="blob")this.response=await w.blob();this.readyState=g.DONE,this._triggerEvent("readystatechange"),this._triggerEvent("load",!0),this._triggerEvent("loadend",!0)}).catch(()=>{if(D)clearTimeout(D);if(this._aborted){this._triggerEvent("abort",!0),this._triggerEvent("loadend",!0);return}this.readyState=g.DONE,this._triggerEvent("readystatechange"),this._triggerEvent("error",!0),this._triggerEvent("loadend",!0)})}abort(){if(this._aborted=!0,this.readyState!==g.UNSENT&&this.readyState!==g.DONE)this.readyState=g.UNSENT,this._triggerEvent("abort",!0),this._triggerEvent("loadend",!0)}setRequestHeader(s,S){if(this.readyState!==g.OPENED)throw Error("InvalidStateError: Object state must be OPENED");this._requestHeaders.set(s.toLowerCase(),S)}getResponseHeader(s){return this._responseHeaders.get(s.toLowerCase())||null}getAllResponseHeaders(){let s=[];for(let[S,T]of this._responseHeaders)s.push(`${S}: ${T}`);return s.join(`\r
|
|
9
|
+
`)}overrideMimeType(s){}addEventListener(s,S){if(!this._eventListeners.has(s))this._eventListeners.set(s,new Set);this._eventListeners.get(s).add(S)}removeEventListener(s,S){let T=this._eventListeners.get(s);if(T)T.delete(S)}dispatchEvent(s){let S=this._eventListeners.get(s.type);if(S)for(let C of S)C(s);let T=this[`on${s.type}`];if(T)T.call(this,s);return!0}_triggerEvent(s,S=!1){let T=S?{type:s,lengthComputable:!1,loaded:0,total:0}:{type:s};this.dispatchEvent(T)}}class ns{onprogress=null;onload=null;onerror=null;addEventListener(s,S){}removeEventListener(s,S){}dispatchEvent(s){return!0}}class Ht{static CONNECTING=0;static OPEN=1;static CLOSING=2;static CLOSED=3;readyState=0;url;protocol="";extensions="";binaryType="blob";bufferedAmount=0;onopen=null;onmessage=null;onerror=null;onclose=null;_ws=null;_eventListeners=new Map;constructor(s,S){this.url=s;try{this._ws=new WebSocket(s,S),this._ws.addEventListener("open",(T)=>{if(this.readyState=1,this._ws)this.protocol=this._ws.protocol||"",this.extensions=this._ws.extensions||"";this.dispatchEvent({type:"open"})}),this._ws.addEventListener("message",(T)=>{let C={type:"message",data:T.data,origin:this.url,lastEventId:"",source:null,ports:[]};this.dispatchEvent(C)}),this._ws.addEventListener("error",(T)=>{this.dispatchEvent({type:"error"})}),this._ws.addEventListener("close",(T)=>{this.readyState=3;let C={type:"close",code:T.code||1000,reason:T.reason||"",wasClean:T.wasClean!==!1};this.dispatchEvent(C)})}catch{setTimeout(()=>{this.readyState=3,this.dispatchEvent({type:"error"})},0)}}send(s){if(this.readyState!==1)throw Error(`WebSocket is not open: readyState ${this.readyState}`);if(this._ws)if(s instanceof Blob)s.arrayBuffer().then((S)=>{this._ws?.send(S)});else this._ws.send(s)}close(s,S){if(this.readyState===2||this.readyState===3)return;if(this.readyState=2,this._ws)this._ws.close(s,S)}addEventListener(s,S){if(!this._eventListeners.has(s))this._eventListeners.set(s,new Set);this._eventListeners.get(s).add(S)}removeEventListener(s,S){let T=this._eventListeners.get(s);if(T)T.delete(S)}dispatchEvent(s){let S=this._eventListeners.get(s.type);if(S)for(let C of S)C(s);let T=this[`on${s.type}`];if(T)T.call(this,s);return!0}}var Ci;((C)=>{C.none="None";C.lax="Lax";C.strict="Strict"})(Ci||={});function ds(s,S,T){if(T)return s===S;return s===S||s.endsWith(`.${S}`)}function ps(s,S){if(s===S)return!0;if(!s.startsWith(S))return!1;if(S.endsWith("/"))return!0;return s[S.length]==="/"}class L{_cookies=[];addCookies(s){for(let S of s){let T=(S.domain||new URL(S.originURL).hostname).replace(/^\./,"").toLowerCase(),C=S.path||"/";if(this._cookies=this._cookies.filter((D)=>!(D.key===S.key&&(D.domain||new URL(D.originURL).hostname).toLowerCase()===T&&(D.path||"/")===C)),S.expires&&S.expires<=new Date)continue;this._cookies.push({...S,value:S.value||"",domain:T,hostOnly:S.hostOnly??!S.domain,path:C,expires:S.expires,httpOnly:S.httpOnly||!1,secure:S.secure||!1,sameSite:S.sameSite||"Lax"})}}getCookies(s,S=!1){let T=new URL(s),C=T.hostname.toLowerCase(),D=T.pathname,w=T.protocol==="https:",G=new Date;return this._cookies.filter((P)=>{if(P.expires&&P.expires<G)return!1;if(P.httpOnly&&!S)return!1;if(P.secure&&!w)return!1;let B=(P.domain||new URL(P.originURL).hostname).toLowerCase();if(!ds(C,B,P.hostOnly===!0))return!1;let W=P.path||"/";if(!ps(D,W))return!1;return!0}).sort((P,B)=>(B.path?.length||0)-(P.path?.length||0))}getAllCookies(){return[...this._cookies]}clearCookies(){this._cookies=[]}}var A=1,j=2,Ft=3,We=4294967295,Vi=1,Mi=4,Oi=128,Ri=256,Li=1024,Ai={FILTER_ACCEPT:A,FILTER_REJECT:j,FILTER_SKIP:Ft,SHOW_ALL:We,SHOW_ELEMENT:Vi,SHOW_TEXT:Mi,SHOW_COMMENT:Oi,SHOW_DOCUMENT:Ri,SHOW_DOCUMENT_FRAGMENT:Li};function ms(s){switch(s.nodeType){case t:return Vi;case i:return Mi;case c:return Oi;case a:return Ri;case V:return Li;default:return 0}}function hs(s){if(!s)return null;if(typeof s==="function")return s;return typeof s.acceptNode==="function"?s.acceptNode.bind(s):null}function we(s,S,T){if(!(S===We||(S&ms(s))!==0))return Ft;let D=A,w=hs(T);if(!w)return D;let G=w(s);return G===A||G===j||G===Ft?G:D}function gs(s){let S=[],T=(C)=>{S.push(C);for(let D of C.childNodes)T(D)};return T(s),S}function Oe(s,S,T){let C=[],D=(w)=>{let G=we(w,S,T);if(G===A)C.push(w);if(G!==j)for(let P of w.childNodes)D(P)};return D(s),C}function nt(s,S,T){let C=we(s,S,T);if(C===A)return s;if(C===j)return null;for(let D of s.childNodes){let w=nt(D,S,T);if(w)return w}return null}function rt(s,S,T){let C=we(s,S,T);if(C!==j)for(let D=s.childNodes.length-1;D>=0;D--){let w=rt(s.childNodes[D],S,T);if(w)return w}return C===A?s:null}function rs(s,S){let T=s;while(T){if(T===S)return!0;T=T.parentNode}return!1}function fs(s){if(s.nodeType===i||s.nodeType===c)return s.nodeValue?.length||0;return s.childNodes.length}function re(s){if(!s.parentNode)return 0;return s.parentNode.childNodes.indexOf(s)}function ve(s,S,T,C){if(s===T)return S===C?0:S<C?-1:1;if(typeof s.contains==="function"&&s.contains(T)){let P=T;while(P.parentNode!==s&&P.parentNode)P=P.parentNode;return S<=re(P)?-1:1}if(typeof T.contains==="function"&&T.contains(s)){let P=s;while(P.parentNode!==T&&P.parentNode)P=P.parentNode;return re(P)<C?-1:1}let G=s.compareDocumentPosition?.(T);if((G&ne)===ne)return-1;if((G&Ae)===Ae)return-1;return 1}function bs(s,S){let T=new Set,C=s;while(C)T.add(C),C=C.parentNode;C=S;while(C){if(T.has(C))return C;C=C.parentNode}return s}function it(s,S,T){if(!s.parentNode&&s!==S){let{_lastTraversalParent:D,_lastTraversalNextSibling:w}=s;if(D&&rs(D,S)){if(w&&w.parentNode===D)return w;return it(D,S,!0)}}if(!T&&s.childNodes.length>0)return s.childNodes[0];let C=s;while(C&&C!==S){let D=C.parentNode;if(!D)return null;let w=D.childNodes,G=w.indexOf(C);if(G>=0&&G+1<w.length)return w[G+1];C=D}return null}class ge{root;whatToShow;filter;currentNode;constructor(s,S=We,T=null){this.root=s,this.whatToShow=S,this.filter=T,this.currentNode=s}parentNode(){let s=this.currentNode.parentNode;while(s&&rs(s,this.root)){if(we(s,this.whatToShow,this.filter)===A)return this.currentNode=s,s;s=s.parentNode}return null}firstChild(){for(let s of this.currentNode.childNodes){let S=nt(s,this.whatToShow,this.filter);if(S)return this.currentNode=S,S}return null}lastChild(){for(let s=this.currentNode.childNodes.length-1;s>=0;s--){let S=rt(this.currentNode.childNodes[s],this.whatToShow,this.filter);if(S)return this.currentNode=S,S}return null}previousSibling(){if(!this.currentNode.parentNode)return null;let s=this.currentNode.parentNode.childNodes,S=s.indexOf(this.currentNode);for(let T=S-1;T>=0;T--){let C=rt(s[T],this.whatToShow,this.filter);if(C)return this.currentNode=C,C}return null}nextSibling(){if(!this.currentNode.parentNode)return null;let s=this.currentNode.parentNode.childNodes,S=s.indexOf(this.currentNode);for(let T=S+1;T<s.length;T++){let C=nt(s[T],this.whatToShow,this.filter);if(C)return this.currentNode=C,C}return null}previousNode(){let s=gs(this.root),S=new Set(Oe(this.root,this.whatToShow,this.filter)),T=s.indexOf(this.currentNode);for(let C=T-1;C>=0;C--)if(S.has(s[C]))return this.currentNode=s[C],s[C];return null}nextNode(){let s=it(this.currentNode,this.root,!1);while(s){let S=we(s,this.whatToShow,this.filter);if(S===A)return this.currentNode=s,s;s=it(s,this.root,S===j)}return null}}class be{root;whatToShow;filter;_cursor=-1;constructor(s,S=We,T=null){this.root=s,this.whatToShow=S,this.filter=T}get referenceNode(){let s=Oe(this.root,this.whatToShow,this.filter);return this._cursor>=0?s[Math.min(this._cursor,s.length-1)]??this.root:this.root}get pointerBeforeReferenceNode(){return this._cursor<0}nextNode(){let s=Oe(this.root,this.whatToShow,this.filter);if(this._cursor+1>=s.length)return null;return this._cursor++,s[this._cursor]??null}previousNode(){let s=Oe(this.root,this.whatToShow,this.filter);if(this._cursor<0||this._cursor>=s.length)return null;let S=s[this._cursor]??null;return this._cursor--,S}detach(){}}class p{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;START_TO_START=p.START_TO_START;START_TO_END=p.START_TO_END;END_TO_END=p.END_TO_END;END_TO_START=p.END_TO_START;startContainer;startOffset;endContainer;endOffset;_document;constructor(s){this._document=s;let S=s.body||s.documentElement||s;this.startContainer=S,this.startOffset=0,this.endContainer=S,this.endOffset=0}get collapsed(){return this.startContainer===this.endContainer&&this.startOffset===this.endOffset}get commonAncestorContainer(){return bs(this.startContainer,this.endContainer)}setStart(s,S){if(this.startContainer=s,this.startOffset=S,ve(this.startContainer,this.startOffset,this.endContainer,this.endOffset)>0)this.endContainer=s,this.endOffset=S}setEnd(s,S){if(this.endContainer=s,this.endOffset=S,ve(this.startContainer,this.startOffset,this.endContainer,this.endOffset)>0)this.startContainer=s,this.startOffset=S}setStartBefore(s){if(!s.parentNode)return;this.setStart(s.parentNode,re(s))}setStartAfter(s){if(!s.parentNode)return;this.setStart(s.parentNode,re(s)+1)}setEndBefore(s){if(!s.parentNode)return;this.setEnd(s.parentNode,re(s))}setEndAfter(s){if(!s.parentNode)return;this.setEnd(s.parentNode,re(s)+1)}selectNode(s){if(!s.parentNode)return;let S=re(s);this.startContainer=s.parentNode,this.startOffset=S,this.endContainer=s.parentNode,this.endOffset=S+1}selectNodeContents(s){this.startContainer=s,this.startOffset=0,this.endContainer=s,this.endOffset=fs(s)}collapse(s=!1){if(s)this.endContainer=this.startContainer,this.endOffset=this.startOffset;else this.startContainer=this.endContainer,this.startOffset=this.endOffset}cloneRange(){let s=new p(this._document);return s.startContainer=this.startContainer,s.startOffset=this.startOffset,s.endContainer=this.endContainer,s.endOffset=this.endOffset,s}compareBoundaryPoints(s,S){if(s===p.START_TO_START)return ve(this.startContainer,this.startOffset,S.startContainer,S.startOffset);if(s===p.START_TO_END)return ve(this.startContainer,this.startOffset,S.endContainer,S.endOffset);if(s===p.END_TO_END)return ve(this.endContainer,this.endOffset,S.endContainer,S.endOffset);return ve(this.endContainer,this.endOffset,S.startContainer,S.startOffset)}_removeContents(){if(this.collapsed)return;if(this.startContainer===this.endContainer){if(this.startContainer.nodeType===i||this.startContainer.nodeType===c){let S=this.startContainer.nodeValue||"";this.startContainer.nodeValue=`${S.slice(0,this.startOffset)}${S.slice(this.endOffset)}`,this.collapse(!0);return}let s=this.startContainer.childNodes.slice(this.startOffset,this.endOffset);for(let S of s)this.startContainer.removeChild(S);this.setEnd(this.startContainer,this.startOffset);return}this.collapse(!0)}cloneContents(){let s=this._document.createDocumentFragment();if(this.collapsed)return s;if(this.startContainer===this.endContainer){if(this.startContainer.nodeType===i||this.startContainer.nodeType===c){let T=(this.startContainer.nodeValue||"").slice(this.startOffset,this.endOffset);if(T)s.appendChild(this._document.createTextNode(T));return s}for(let T of this.startContainer.childNodes.slice(this.startOffset,this.endOffset))s.appendChild(T.cloneNode(!0));return s}let S=this.toString();if(S)s.appendChild(this._document.createTextNode(S));return s}deleteContents(){this._removeContents()}extractContents(){let s=this.cloneContents();return this._removeContents(),s}surroundContents(s){if(this.collapsed){this.insertNode(s),this.selectNode(s);return}if(this.startContainer!==this.endContainer&&(this.startContainer.nodeType!==i||this.endContainer.nodeType!==i))throw Error("Failed to execute surroundContents on Range: unsupported partially selected non-Text nodes");let S=this.extractContents();while(s.childNodes.length>0)s.removeChild(s.childNodes[0]);this.insertNode(s);while(S.childNodes.length>0)s.appendChild(S.childNodes[0]);this.selectNode(s)}insertNode(s){if(this.startContainer.nodeType===i&&this.startContainer.parentNode){let C=this.startContainer.nodeValue||"",D=C.slice(0,this.startOffset),w=C.slice(this.startOffset);this.startContainer.nodeValue=D;let G=this._document.createTextNode(w),P=this.startContainer.parentNode,B=this.startContainer.parentNode.childNodes,W=B.indexOf(this.startContainer),U=B[W+1]??null;P.insertBefore(s,U),P.insertBefore(G,U),this.setStart(P,re(s)),this.setEnd(P,re(s)+1);return}let S=this.startContainer,T=this.startContainer.childNodes[this.startOffset]??null;S.insertBefore(s,T),this.setStart(S,this.startOffset),this.setEnd(S,this.startOffset+1)}toString(){if(this.collapsed)return"";if(this.startContainer===this.endContainer){if(this.startContainer.nodeType===i||this.startContainer.nodeType===c)return(this.startContainer.nodeValue||"").slice(this.startOffset,this.endOffset);return this.startContainer.childNodes.slice(this.startOffset,this.endOffset).map((s)=>s.textContent).join("")}return this.cloneContents().textContent||""}createContextualFragment(s){let S=this.startContainer.ownerDocument??this.startContainer,T=S.createDocumentFragment();if(s){let{parseHTML:C}=import.meta.require("./chunk-rq690b5e.js"),D=C(s,S);for(let w of D)T.appendChild(w)}return T}getBoundingClientRect(){return{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0}}getClientRects(){return[]}detach(){}}class ye{_document;_range=null;constructor(s){this._document=s}get anchorNode(){return this._range?.startContainer??null}get anchorOffset(){return this._range?.startOffset??0}get focusNode(){return this._range?.endContainer??null}get focusOffset(){return this._range?.endOffset??0}get isCollapsed(){return this._range?.collapsed??!0}get rangeCount(){return this._range?1:0}get type(){if(!this._range)return"None";return this._range.collapsed?"Caret":"Range"}addRange(s){this._range=s}getRangeAt(s){if(s!==0||!this._range)throw Error("Failed to execute getRangeAt on Selection: index is out of range");return this._range}removeRange(s){if(this._range===s)this._range=null}removeAllRanges(){this._range=null}empty(){this.removeAllRanges()}collapse(s,S=0){if(s===null){this.removeAllRanges();return}let T=this._document.createRange();T.setStart(s,S),T.collapse(!0),this._range=T}setPosition(s,S=0){this.collapse(s,S)}selectAllChildren(s){let S=this._document.createRange();S.selectNodeContents(s),this._range=S}containsNode(s,S=!1){if(!this._range)return!1;try{let T=this._range.compareBoundaryPoints(p.START_TO_START,(()=>{let D=this._document.createRange();return D.selectNode(s),D})()),C=this._range.compareBoundaryPoints(p.END_TO_END,(()=>{let D=this._document.createRange();return D.selectNode(s),D})());if(S)return T<=0||C>=0;return T<=0&&C>=0}catch{return!1}}deleteFromDocument(){this._range?.deleteContents()}toString(){return this._range?.toString()??""}}var Di;((U)=>{U[U.ANY_TYPE=0]="ANY_TYPE";U[U.NUMBER_TYPE=1]="NUMBER_TYPE";U[U.STRING_TYPE=2]="STRING_TYPE";U[U.BOOLEAN_TYPE=3]="BOOLEAN_TYPE";U[U.UNORDERED_NODE_ITERATOR_TYPE=4]="UNORDERED_NODE_ITERATOR_TYPE";U[U.ORDERED_NODE_ITERATOR_TYPE=5]="ORDERED_NODE_ITERATOR_TYPE";U[U.UNORDERED_NODE_SNAPSHOT_TYPE=6]="UNORDERED_NODE_SNAPSHOT_TYPE";U[U.ORDERED_NODE_SNAPSHOT_TYPE=7]="ORDERED_NODE_SNAPSHOT_TYPE";U[U.ANY_UNORDERED_NODE_TYPE=8]="ANY_UNORDERED_NODE_TYPE";U[U.FIRST_ORDERED_NODE_TYPE=9]="FIRST_ORDERED_NODE_TYPE"})(Di||={});class Gt{resultType;numberValue;stringValue;booleanValue;singleNodeValue;snapshotLength;_nodes=[];_iteratorIndex=0;constructor(s,S=[],T=0,C="",D=!1){this.resultType=s,this._nodes=S,this.numberValue=T,this.stringValue=C,this.booleanValue=D,this.singleNodeValue=S.length>0?S[0]:null,this.snapshotLength=S.length}iterateNext(){if(this._iteratorIndex<this._nodes.length)return this._nodes[this._iteratorIndex++];return null}snapshotItem(s){return this._nodes[s]||null}}class Ut{evaluate(s,S,T=null,C=0,D=null){let w=this._evaluateExpression(s,S),G=C;if(C===0)G=7;return new Gt(G,w)}_evaluateExpression(s,S){let T=s.trim();if(T===".")return[S];if(T==="..")return S.parentNode?[S.parentNode]:[];if(T.startsWith("//")){let C=T.substring(2);return this._findDescendants(S,C)}if(T.startsWith("/")){let C=T.substring(1);return this._findChildren(S,C)}if(T.startsWith("@")){let C=T.substring(1);if(S.nodeType===t){let D=S.getAttribute(C);if(D!==null)return[new o(D)]}return[]}return this._findDescendants(S,T)}_findChildren(s,S){let T=[],C=S.split("/").filter((G)=>G.trim());if(C.length===0)return T;let[D,...w]=C;for(let G of s.children||[])if(this._matchesExpression(G,D))if(w.length===0)T.push(G);else T.push(...this._findChildren(G,w.join("/")));return T}_findDescendants(s,S){let T=[],C=S.split("/").filter((P)=>P.trim());if(C.length===0)return T;let[D,...w]=C,G=(P)=>{if(this._matchesExpression(P,D))if(w.length===0)T.push(P);else T.push(...this._findChildren(P,w.join("/")));for(let B of P.children||[])G(B)};return G(s),T}_matchesExpression(s,S){if(S==="*")return s.nodeType===t;if(S==="text()")return s.nodeType===i;if(S==="node()")return!0;let T=S.match(/^(\w+)\[(.+)\]$/);if(T){let[,C,D]=T;if(s.nodeType!==t)return!1;let w=s;if(C!=="*"&&w.tagName!==C.toUpperCase())return!1;return this._evaluatePredicate(w,D)}if(s.nodeType===t)return s.tagName===S.toUpperCase();return!1}_evaluatePredicate(s,S){let T=S.match(/^@(\w+)=['"](.+)['"]$/);if(T){let[,D,w]=T;return s.getAttribute(D)===w}if(S.startsWith("@")){let D=S.substring(1);return s.getAttribute(D)!==null}let C=S.match(/^(\d+)$/);if(C){let D=Number.parseInt(C[1]),w=s.parentNode;if(w)return w.children.filter((P)=>P.nodeType===t).indexOf(s)===D-1}return!1}_parseTagName(s){let S=s.match(/^(\w+)/);return S?S[1]:s}}class Y extends e{content;constructor(){super("template");this.content=new _,this.content._isTemplateContent=!0,Object.defineProperty(this,"childNodes",{configurable:!0,enumerable:!0,get:()=>this.content.childNodes,set:(s)=>{this.content.childNodes=s}})}appendChild(s){return this.content.appendChild(s)}removeChild(s){return this.content.removeChild(s)}insertBefore(s,S){return this.content.insertBefore(s,S)}replaceChild(s,S){return this.content.replaceChild(s,S)}cloneNode(s=!1){let S=new Y;S.namespaceURI=this.namespaceURI,S.nodeName=this.nodeName,S.tagName=this.tagName,S.ownerDocument=this.ownerDocument,S.content.ownerDocument=this.content.ownerDocument||this.ownerDocument;for(let[T,C]of this.attributes)S.setAttribute(T,C);if(s)F(()=>{for(let T of this.content.childNodes){let C=T.cloneNode?.(!0);if(C)S.appendChild(C)}});return S}}class Wt extends e{constructor(){super("a")}}class $t extends e{constructor(){super("area")}}class qt extends e{constructor(){super("audio")}}class zt extends e{constructor(){super("base")}}class Kt extends e{constructor(){super("body")}}class jt extends e{constructor(){super("br")}}class Yt extends e{constructor(){super("button")}}class Xt extends e{constructor(){super("data")}}class Jt extends e{constructor(){super("datalist")}}class Qt extends e{constructor(){super("details")}}class Zt extends e{constructor(){super("dialog")}}class en extends e{constructor(){super("div")}}class tn extends e{constructor(){super("dl")}}class nn extends e{constructor(){super("embed")}}class rn extends e{constructor(){super("fieldset")}}class on extends e{constructor(){super("form")}}class sn extends e{constructor(){super("head")}}class an extends e{constructor(){super("h1")}}class ln extends e{constructor(){super("hr")}}class un extends e{constructor(){super("html")}}class cn extends e{constructor(){super("iframe")}}class dn extends e{constructor(){super("img")}}class hn extends e{constructor(){super("input")}}class mn extends e{constructor(){super("label")}}class pn extends e{constructor(){super("legend")}}class fn extends e{constructor(){super("li")}}class gn extends e{constructor(){super("link")}}class bn extends e{constructor(){super("map")}}class yn extends e{constructor(){super("video")}}class En extends e{constructor(){super("menu")}}class vn extends e{constructor(){super("meta")}}class wn extends e{constructor(){super("meter")}}class _n extends e{constructor(){super("ins")}}class Sn extends e{constructor(){super("object")}}class Tn extends e{constructor(){super("ol")}}class xn extends e{constructor(){super("optgroup")}}class Nn extends e{constructor(){super("option")}}class Cn extends e{constructor(){super("output")}}class Vn extends e{constructor(){super("p")}}class Mn extends e{constructor(){super("param")}}class On extends e{constructor(){super("picture")}}class Rn extends e{constructor(){super("pre")}}class Ln extends e{constructor(){super("progress")}}class An extends e{constructor(){super("blockquote")}}class Dn extends e{constructor(){super("script")}}class Pn extends e{constructor(){super("select")}}class X extends e{constructor(){super("slot")}cloneNode(s=!1){let S=new X;S.namespaceURI=this.namespaceURI,S.nodeName=this.nodeName,S.tagName=this.tagName,S.ownerDocument=this.ownerDocument;for(let[T,C]of this.attributes)S.setAttribute(T,C);if(s)for(let T of this.childNodes){let C=T.cloneNode?.(!0);if(C)S.appendChild(C)}return S}assignedNodes(s={}){return yi(this,s)}assignedElements(s={}){return to(this,s)}}class In extends e{constructor(){super("source")}}class kn extends e{constructor(){super("span")}}class Bn extends e{constructor(){super("style")}}class Hn extends e{constructor(){super("caption")}}class Fn extends e{constructor(){super("td")}}class Gn extends e{constructor(){super("col")}}class Un extends e{constructor(){super("table")}}class Wn extends e{constructor(){super("tr")}}class $n extends e{constructor(){super("tbody")}}class qn extends e{constructor(){super("textarea")}}class zn extends e{constructor(){super("time")}}class Kn extends e{constructor(){super("title")}}class jn extends e{constructor(){super("track")}}class Yn extends e{constructor(){super("ul")}}class Xn extends e{constructor(){super("unknown")}}class Jn extends e{constructor(){super("video")}}class Qn extends e{constructor(s,S){super("img");if(s!==void 0)this.setAttribute("width",String(s));if(S!==void 0)this.setAttribute("height",String(S))}}class Zn extends e{constructor(s){super("audio");if(s!==void 0)this.setAttribute("src",s)}}var ys=300,Es=150;function ss(s,S){if(s===null)return S;let T=Number.parseInt(s,10);return Number.isNaN(T)||T<0?S:T}class J extends e{context2d=null;constructor(){super("canvas")}get width(){return ss(this.getAttribute("width"),ys)}set width(s){this.setAttribute("width",String(s))}get height(){return ss(this.getAttribute("height"),Es)}set height(s){this.setAttribute("height",String(s))}cloneNode(s=!1){let S=new J;S.namespaceURI=this.namespaceURI,S.nodeName=this.nodeName,S.tagName=this.tagName,S.ownerDocument=this.ownerDocument;for(let[T,C]of this.attributes)S.setAttribute(T,C);if(s)for(let T of this.childNodes){let C=T.cloneNode?.(!0);if(C)S.appendChild(C)}return S}getContext(s){if(s==="2d"){if(!this.context2d)this.context2d=new le(this);return this.context2d}return null}toDataURL(s,S){return`data:${s||"image/png"};base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==`}toBlob(s,S,T){setTimeout(()=>{let C=new Blob(["fake canvas data"],{type:S||"image/png"});s(C)},0)}async toBlobAsync(s,S){return new Promise((T)=>{this.toBlob((C)=>{if(C)T(C)},s,S)})}}var Le=Symbol("very-happy-dom.custom-element-owner-document");function Re(s,S,...T){let C=s,D=Object.prototype.hasOwnProperty.call(C,Le),w=C[Le];C[Le]=S;try{return new s(...T)}finally{if(D)C[Le]=w;else delete C[Le]}}function os(s){return s[Le]??null}class N extends d{nodeType=a;nodeKind="document";nodeName="#document";defaultView=null;_idIndex=new Map;get parentWindow(){return this.defaultView}documentElement=null;location;history;get head(){return this._documentElementChild("HEAD")}set head(s){this._replaceDocumentElementChild("HEAD",s)}get body(){return this._documentElementChild("BODY")}set body(s){this._replaceDocumentElementChild("BODY",s)}_documentElementChild(s){let S=this.documentElement?.childNodes;if(!S)return null;for(let T of S)if(T.nodeType===t&&T.tagName===s)return T;return null}_replaceDocumentElementChild(s,S){let T=this._documentElementChild(s);if(T===S)return;if(!this.documentElement)return;if(T&&S)this.documentElement.replaceChild(S,T);else if(T)this.documentElement.removeChild(T);else if(S)this.documentElement.appendChild(S)}_fallbackTitle="";get title(){return this.head?.querySelector("title")?.textContent??this._fallbackTitle}set title(s){if(this._fallbackTitle=s,!this.head)return;let S=this.head.querySelector("title");if(!S){if(S=this.createElement("title"),!S)return;this.head.appendChild(S)}S.textContent=s}readyState="complete";compatMode="CSS1Compat";contentType="text/html";characterSet="UTF-8";doctype=null;hidden=!1;visibilityState="visible";dir="";referrer="";designMode="off";get charset(){return this.characterSet}get inputEncoding(){return this.characterSet}get URL(){return this.location.href}get documentURI(){return this.URL}get baseURI(){let S=(this.head?.querySelector("base[href]")||this.querySelector("base[href]"))?.getAttribute("href");return S?this._resolveAgainstDocumentURL(S):this._getDocumentURLForResolution()}get domain(){if(this._locationState.hostname)return this._locationState.hostname;try{return new URL(this._getDocumentURLForResolution()).hostname}catch{return""}}get lastModified(){return new Date().toLocaleString()}_focusedElement=null;get activeElement(){return this._focusedElement||this.body}get scrollingElement(){return this.documentElement}get forms(){return this.querySelectorAll("form")}get images(){return this.querySelectorAll("img")}get links(){return this.querySelectorAll("a[href], area[href]")}get scripts(){return this.querySelectorAll("script")}get anchors(){return this.querySelectorAll("a[name]")}get embeds(){return this.querySelectorAll("embed")}get plugins(){return this.embeds}currentScript=null;_adoptedStyleSheets=[];_parsedStyleSheets=new WeakMap;get styleSheets(){let s=[];for(let S of this.querySelectorAll("style")){let T=S.textContent??"",C=this._parsedStyleSheets.get(S);if(C&&C.text===T){s.push(C.sheet);continue}let D=new ae;D.replaceSync(T),this._parsedStyleSheets.set(S,{text:T,sheet:D}),s.push(D)}return s}get adoptedStyleSheets(){return this._adoptedStyleSheets}set adoptedStyleSheets(s){this._adoptedStyleSheets=s}implementation={createHTMLDocument:(s)=>{let S=new N;if(s!==void 0)S.title=s;return S},hasFeature:()=>!0};_historyStack=[];_historyIndex=-1;_xpathEvaluator=new Ut;_cookieContainer=new L;_setCookieContainer(s){this._cookieContainer=s}_getCookieContainer(){return this._cookieContainer}_selection=null;_locationState={href:"",protocol:"",host:"",hostname:"",port:"",pathname:"",search:"",hash:"",origin:""};constructor(){super();this.documentElement=new e("html"),this.documentElement.appendChild(new e("head")),this.documentElement.appendChild(new e("body")),this.appendChild(this.documentElement),this.location=this._createLocation();let s=this;this.history={get length(){return s._historyStack.length},get state(){return s._historyStack[s._historyIndex]?.state||null},pushState(S,T,C){let D=C?s._resolveLocationString(C):s.location.href;if(s._historyStack=s._historyStack.slice(0,s._historyIndex+1),s._historyStack.push({state:S,title:T,url:D}),s._historyIndex++,C)s._updateLocation(D,{triggerHashchange:!1})},replaceState(S,T,C){let D=C?s._resolveLocationString(C):s.location.href;if(s._historyIndex>=0)s._historyStack[s._historyIndex]={state:S,title:T,url:D};if(C)s._updateLocation(D,{triggerHashchange:!1})},back(){if(s._historyIndex>0){s._historyIndex--;let S=s._historyStack[s._historyIndex];if(S.url)s._updateLocation(S.url,{triggerPopstate:!0,popState:S.state})}},forward(){if(s._historyIndex<s._historyStack.length-1){s._historyIndex++;let S=s._historyStack[s._historyIndex];if(S.url)s._updateLocation(S.url,{triggerPopstate:!0,popState:S.state})}},go(S){let T=s._historyIndex+S;if(T>=0&&T<s._historyStack.length){s._historyIndex=T;let C=s._historyStack[s._historyIndex];if(C.url)s._updateLocation(C.url,{triggerPopstate:!0,popState:C.state})}}}}_createLocation(){let s={},S=(T)=>{let C=new URL(this._getDocumentURLForResolution(),"http://localhost/");T(C),this._updateLocation(C.href)};return Object.defineProperties(s,{href:{enumerable:!0,get:()=>this._locationState.href,set:(T)=>{this._updateLocation(`${T}`)}},protocol:{enumerable:!0,get:()=>this._locationState.protocol,set:(T)=>S((C)=>{C.protocol=T.endsWith(":")?T:`${T}:`})},host:{enumerable:!0,get:()=>this._locationState.host,set:(T)=>S((C)=>{C.host=T})},hostname:{enumerable:!0,get:()=>this._locationState.hostname,set:(T)=>S((C)=>{C.hostname=T})},port:{enumerable:!0,get:()=>this._locationState.port,set:(T)=>S((C)=>{C.port=T})},pathname:{enumerable:!0,get:()=>this._locationState.pathname,set:(T)=>S((C)=>{C.pathname=T.startsWith("/")?T:`/${T}`})},search:{enumerable:!0,get:()=>this._locationState.search,set:(T)=>S((C)=>{C.search=T?T.startsWith("?")?T:`?${T}`:""})},hash:{enumerable:!0,get:()=>this._locationState.hash,set:(T)=>S((C)=>{C.hash=T?T.startsWith("#")?T:`#${T}`:""})},origin:{enumerable:!0,get:()=>this._locationState.origin}}),s.assign=(T)=>{this._updateLocation(T)},s.replace=(T)=>{this._updateLocation(T)},s.reload=()=>{},s.toString=()=>this._locationState.href,s}_getDocumentURLForResolution(){return this.location.href||this.defaultView?.location?.href||"http://localhost/"}_resolveAgainstDocumentURL(s){try{return new URL(s,this._getDocumentURLForResolution()).href}catch{return s}}_resolveLocationString(s){try{return new URL(s,this._getDocumentURLForResolution()).href}catch{return s}}_updateLocation(s,S={}){let{triggerHashchange:T=!0,triggerPopstate:C=!1,popState:D=null}=S,w=this._locationState.href,G=this._locationState.hash;try{let P=this.location.href||this.defaultView?.location?.href||"",B;if(P&&!P.startsWith("about:"))B=new URL(s,P);else B=new URL(s);this._locationState.href=B.href,this._locationState.protocol=B.protocol,this._locationState.host=B.host,this._locationState.hostname=B.hostname,this._locationState.port=B.port,this._locationState.pathname=B.pathname,this._locationState.search=B.search,this._locationState.hash=B.hash,this._locationState.origin=B.origin}catch{this._locationState.href=s,this._locationState.protocol="",this._locationState.host="",this._locationState.hostname="",this._locationState.port="",this._locationState.pathname="",this._locationState.search="",this._locationState.hash="",this._locationState.origin=""}if(T&&w&&G!==this._locationState.hash)this._dispatchWindowEvent("hashchange",{oldURL:w,newURL:this._locationState.href});if(C)this._dispatchWindowEvent("popstate",{state:D})}_dispatchWindowEvent(s,S){if(!this.defaultView)return;let T=new n(s);for(let[C,D]of Object.entries(S))T[C]=D;this.defaultView.dispatchEvent(T)}_getCookieOrigin(){let s=this._getDocumentURLForResolution();if(!s||s==="about:blank"||s.startsWith("about:"))return"http://localhost/";try{let S=new URL(s,"http://localhost/");if(S.protocol!=="http:"&&S.protocol!=="https:")return"http://localhost/";return S.href}catch{return"http://localhost/"}}_getDefaultCookiePath(){let s="/";try{s=new URL(this._getDocumentURLForResolution(),"http://localhost/").pathname||"/"}catch{s=this.location.pathname||"/"}if(!s.startsWith("/"))return"/";if(s==="/")return"/";let S=s.lastIndexOf("/");if(S<=0)return"/";return s.slice(0,S+1)}get textContent(){return this.documentElement?.textContent||""}set textContent(s){if(this.documentElement)this.documentElement.textContent=s}appendChild(s){return k(this,s)}_setOwnerDocumentRecursive(s,S){E(s,S)}createElement(s){if(s.toLowerCase()==="canvas"){let C=new J;return C.ownerDocument=this,C}if(s.toLowerCase()==="template"){let C=new Y;return C.ownerDocument=this,C.content.ownerDocument=this,C}if(s.toLowerCase()==="slot"){let C=new X;return C.ownerDocument=this,C}let S=Ce()?void 0:this.defaultView?.customElements?.get?.(s.toLowerCase()),T=S?Re(S,this,s):new e(s);return T.ownerDocument=this,T}createElementNS(s,S){let T;if(s==="http://www.w3.org/2000/svg")T=new r(S);else T=new e(S),T.namespaceURI=s;return T.ownerDocument=this,T}createTextNode(s){let S=new o(s);return S.ownerDocument=this,S}createComment(s){let S=new x(s);return S.ownerDocument=this,S}createDocumentFragment(){let s=new _;return s.ownerDocument=this,s}_setFocusedElement(s){this._focusedElement=s}createEvent(s){switch(s.toLowerCase()){case"customevent":case"customevents":return new fe("");case"mouseevent":case"mouseevents":return new M("");case"keyboardevent":return new ue("");case"focusevent":return new ce("");case"uievent":case"uievents":return new v("");default:return new n("")}}createAttribute(s){return{name:s.toLowerCase(),value:"",specified:!0}}importNode(s,S=!1){if(typeof s.cloneNode!=="function")throw Error("Failed to execute 'importNode': parameter 1 is not of type 'Node'.");let T=s.cloneNode(S);return this._setOwnerDocumentRecursive(T,this),this.defaultView?.customElements?.upgrade?.(T),T}adoptNode(s){if(s.parentNode)s.parentNode.removeChild(s);return this._setOwnerDocumentRecursive(s,this),s}hasFocus(){return this._focusedElement!==null}execCommand(s,S,T){return!1}queryCommandEnabled(s){return!1}queryCommandSupported(s){return!1}createTreeWalker(s,S=4294967295,T=null){return new ge(s,S,T)}createNodeIterator(s,S=4294967295,T=null){return new be(s,S,T)}createRange(){return new p(this)}getSelection(){if(!this._selection)this._selection=new ye(this);return this._selection}querySelector(s){return I(this,s)}querySelectorAll(s){return y(this,s)}getElementById(s){return this._idIndex.get(s)??null}getElementsByTagName(s){return this.querySelectorAll(s)}getElementsByName(s){return this.querySelectorAll(`[name="${s}"]`)}getElementsByClassName(s){let S=s.trim().split(/\s+/).filter(Boolean);if(S.length===0)return[];return this.querySelectorAll(S.map((T)=>`.${T}`).join(""))}parseHTML(s){let S=m(s,this);if(this.body){this.body.childNodes=[];for(let T of S)this.body.appendChild(T)}}write(s){let S=m(s,this);for(let T of S)if(T.nodeType===t){let C=T;if(C.tagName==="HTML"){this.childNodes=[],this.documentElement=C,this.appendChild(C);return}}if(this.body)for(let T of S)this.body.appendChild(T)}open(){if(this.body)this.body.childNodes=[];return this}close(){}writeln(s){this.write(`${s}
|
|
10
|
+
`)}getComputedStyle(s,S){let T={ADDRESS:"block",ARTICLE:"block",ASIDE:"block",BLOCKQUOTE:"block",BODY:"block",DETAILS:"block",DIALOG:"block",DIV:"block",DL:"block",DT:"block",FIELDSET:"block",FIGCAPTION:"block",FIGURE:"block",FOOTER:"block",FORM:"block",H1:"block",H2:"block",H3:"block",H4:"block",H5:"block",H6:"block",HEADER:"block",HR:"block",HTML:"block",LEGEND:"block",MAIN:"block",NAV:"block",OL:"block",P:"block",PRE:"block",SECTION:"block",UL:"block",LI:"list-item",TABLE:"table",CAPTION:"table-caption",THEAD:"table-header-group",TBODY:"table-row-group",TFOOT:"table-footer-group",TR:"table-row",TH:"table-cell",TD:"table-cell",COLGROUP:"table-column-group",COL:"table-column",BUTTON:"inline-block",INPUT:"inline-block",SELECT:"inline-block",TEXTAREA:"inline-block",A:"inline",ABBR:"inline",B:"inline",CITE:"inline",CODE:"inline",DFN:"inline",EM:"inline",I:"inline",KBD:"inline",LABEL:"inline",MARK:"inline",Q:"inline",S:"inline",SAMP:"inline",SMALL:"inline",SPAN:"inline",STRONG:"inline",SUB:"inline",SUP:"inline",TIME:"inline",U:"inline",VAR:"inline",IMG:"inline",BR:"inline",SCRIPT:"none",STYLE:"none",HEAD:"none",TITLE:"none",META:"none",LINK:"none"},C=(B,W)=>{switch(B){case"display":return T[W]||"inline";case"visibility":return"visible";case"opacity":return"1";case"position":return"static";case"float":return"none";case"clear":return"none";case"overflow":case"overflow-x":case"overflow-y":return"visible";case"box-sizing":return"content-box";case"z-index":return"auto";case"flex-direction":return"row";case"flex-wrap":return"nowrap";case"justify-content":return"normal";case"align-items":return"normal";case"align-content":return"normal";case"text-align":return"start";case"text-transform":return"none";case"text-decoration":case"text-decoration-line":return"none";case"font-size":return"16px";case"font-family":return"serif";case"font-weight":return"400";case"font-style":return"normal";case"line-height":return"normal";case"color":return"rgb(0, 0, 0)";case"background-color":return"rgba(0, 0, 0, 0)";case"border-width":case"border-top-width":case"border-right-width":case"border-bottom-width":case"border-left-width":return"0px";case"border-style":case"border-top-style":case"border-right-style":case"border-bottom-style":case"border-left-style":return"none";case"margin":case"margin-top":case"margin-right":case"margin-bottom":case"margin-left":case"padding":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":return"0px";case"width":case"height":case"min-width":case"min-height":return"auto";case"max-width":case"max-height":return"none";case"cursor":return"auto";case"pointer-events":return"auto";default:return""}},D=s,w=null,G=()=>{if(!w)w=hi(D,[...this.styleSheets,...this._adoptedStyleSheets],this.defaultView?._mediaContext?.());return w},P=(B)=>{let W=mi(B,D.style,G());if(W!==null)return W;return C(B,D.tagName)};return new Proxy({getPropertyValue(B){return P(B)},getPropertyPriority(B){if(D.style.getPropertyPriority(B)==="important")return"important";return G().important.has(B)?"important":""}},{get(B,W){if(W==="getPropertyValue")return B.getPropertyValue;if(W==="getPropertyPriority")return B.getPropertyPriority;if(typeof W!=="string")return;let U=W.replace(/[A-Z]/g,(Q)=>`-${Q.toLowerCase()}`);return P(U)}})}addEventListener(s,S,T={}){super.addEventListener(s,S,T)}removeEventListener(s,S,T={}){super.removeEventListener(s,S,T)}dispatchEvent(s){return super.dispatchEvent(s)}evaluate(s,S=this,T=null,C=0,D=null){let w=S===this?this.documentElement||this:S;return this._xpathEvaluator.evaluate(s,w,T,C,D)}createExpression(s,S=null){return{evaluate:(T,C=0)=>{let D=T===this?this.documentElement||this:T;return this._xpathEvaluator.evaluate(s,D,S,C,null)}}}get cookie(){return this._cookieContainer.getCookies(this._getCookieOrigin()).map((s)=>`${s.key}=${s.value||""}`).join("; ")}set cookie(s){let S=s.split(";").map((B)=>B.trim()).filter(Boolean),[T,...C]=S;if(!T)return;let D=T.indexOf("="),w=(D===-1?T:T.slice(0,D)).trim(),G=D===-1?"":T.slice(D+1).trim();if(!w)return;let P={key:w,value:G,originURL:this._getCookieOrigin(),path:this._getDefaultCookiePath(),hostOnly:!0};for(let B of C){let[W,...U]=B.split("="),Q=W.trim().toLowerCase(),ie=U.join("=").trim();if(Q==="expires"){let Z=new Date(ie);if(!Number.isNaN(Z.getTime()))P.expires=Z}else if(Q==="max-age"){let Z=Number.parseInt(ie,10);if(!Number.isNaN(Z))P.expires=new Date(Date.now()+Z*1000)}else if(Q==="path")P.path=ie||"/";else if(Q==="domain")P.domain=ie.replace(/^\./,""),P.hostOnly=!1;else if(Q==="secure")P.secure=!0;else if(Q==="httponly")P.httpOnly=!0;else if(Q==="samesite"){let Z=ie.toLowerCase();P.sameSite=Z==="strict"?"Strict":Z==="none"?"None":"Lax"}}this._cookieContainer.addCookies([P])}getElementsByTagNameNS(s,S){return this.getElementsByTagName(S)}createAttributeNS(s,S){return{name:S.toLowerCase(),value:"",namespaceURI:s,specified:!0}}createProcessingInstruction(s,S){return new x(`?${s} ${S}?`)}elementFromPoint(s,S){return this.body}elementsFromPoint(s,S){return this.body?[this.body]:[]}}function no(){return new N}class er{root;rootMargin;thresholds;_callback;_observedElements=new Set;_pendingEntries=[];constructor(s,S={}){if(this._callback=s,this.root=S.root||null,this.rootMargin=S.rootMargin||"0px",S.threshold===void 0)this.thresholds=[0];else if(Array.isArray(S.threshold))this.thresholds=S.threshold;else this.thresholds=[S.threshold]}observe(s){if(this._observedElements.has(s))return;this._observedElements.add(s);let S=this._createEntry(s,!0);this._pendingEntries.push(S),setTimeout(()=>{if(this._observedElements.has(s)){let T=this._pendingEntries.indexOf(S);if(T!==-1)this._pendingEntries.splice(T,1);this._callback([S],this)}},0)}unobserve(s){this._observedElements.delete(s)}disconnect(){this._observedElements.clear()}takeRecords(){return this._pendingEntries.splice(0)}_createEntry(s,S){let T=this._getBoundingClientRect(s);return{boundingClientRect:T,intersectionRatio:S?1:0,intersectionRect:S?T:this._createEmptyRect(),isIntersecting:S,rootBounds:this.root?this._getBoundingClientRect(this.root):null,target:s,time:Date.now()}}_getBoundingClientRect(s){return{x:0,y:0,width:100,height:100,top:0,right:100,bottom:100,left:0}}_createEmptyRect(){return{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0}}}class tr{_callback;_observedElements=new Set;constructor(s){this._callback=s}observe(s,S){if(this._observedElements.has(s))return;this._observedElements.add(s),setTimeout(()=>{if(this._observedElements.has(s)){let T=this._createEntry(s);this._callback([T],this)}},0)}unobserve(s){this._observedElements.delete(s)}disconnect(){this._observedElements.clear()}_createEntry(s){let S=this._getContentRect(s),T={inlineSize:S.width,blockSize:S.height};return{target:s,contentRect:S,borderBoxSize:[T],contentBoxSize:[T],devicePixelContentBoxSize:[T]}}_getContentRect(s){return{x:0,y:0,width:100,height:100,top:0,right:100,bottom:100,left:0}}}class Pi{_data=new Map;get length(){return this._data.size}key(s){return Array.from(this._data.keys())[s]??null}getItem(s){return this._data.get(s)??null}setItem(s,S){this._data.set(s,String(S))}removeItem(s){this._data.delete(s)}clear(){this._data.clear()}}function Ee(){let s=new Pi;return new Proxy(s,{get(S,T){if(T in S||typeof T==="symbol")return S[T];return S.getItem(T)},set(S,T,C){if(T in S)return S[T]=C,!0;return S.setItem(T,C),!0},deleteProperty(S,T){return S.removeItem(T),!0},has(S,T){return T in S||S.getItem(T)!==null}})}class nr{_timeouts=new Map;_intervals=new Map;_animationFrames=new Map;_nextId=1;_aborted=!1;setTimeout(s,S=0,...T){if(this._aborted)return-1;let C=this._nextId++,D=globalThis.setTimeout(()=>{if(this._timeouts.delete(C),!this._aborted)s(...T)},S);return this._timeouts.set(C,D),C}clearTimeout(s){let S=this._timeouts.get(s);if(S)globalThis.clearTimeout(S),this._timeouts.delete(s)}setInterval(s,S=0,...T){if(this._aborted)return-1;let C=this._nextId++,D=globalThis.setInterval(()=>{if(!this._aborted)s(...T)},S);return this._intervals.set(C,D),C}clearInterval(s){let S=this._intervals.get(s);if(S)globalThis.clearInterval(S),this._intervals.delete(s)}requestAnimationFrame(s){if(this._aborted)return-1;let S=this._nextId++,T=globalThis.setTimeout(()=>{if(this._animationFrames.delete(S),!this._aborted)s(Date.now())},16);return this._animationFrames.set(S,T),S}cancelAnimationFrame(s){let S=this._animationFrames.get(s);if(S)globalThis.clearTimeout(S),this._animationFrames.delete(s)}hasPendingTimers(){return this._timeouts.size>0||this._animationFrames.size>0}async waitForTimers(){while(this._timeouts.size>0||this._animationFrames.size>0)await new Promise((s)=>globalThis.setTimeout(s,10))}clearAll(){for(let s of this._timeouts.values())globalThis.clearTimeout(s);this._timeouts.clear();for(let s of this._intervals.values())globalThis.clearInterval(s);this._intervals.clear();for(let s of this._animationFrames.values())globalThis.clearTimeout(s);this._animationFrames.clear()}abort(){this._aborted=!0,this.clearAll()}}var vs=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),Ss=new Set(["attributes","childNodes","namespaceURI","nodeKind","nodeName","nodeType","nodeValue","ownerDocument","parentNode","tagName"]);function is(s){return/^[a-z][.0-9_a-z-]*-[.0-9_a-z-]*$/.test(s)&&!vs.has(s)}function _s(s,S){if(!(s instanceof Map)||!(S instanceof Map))return s??S;for(let[T,C]of S){let D=s.get(T)??[];s.set(T,[...D,...C])}return s}function Ts(s,S){let T=s._getInternalShadowRoot?.()??null,C=Re(S,s.ownerDocument),D=C._getInternalShadowRoot?.()??null,w=s._eventListeners;for(let P of Reflect.ownKeys(C))if(!Ss.has(P))s[P]=C[P];if(s._eventListeners=_s(w,C._eventListeners),T){if(D){for(let P of Reflect.ownKeys(s))if(s[P]===D)s[P]=T}s._shadowRoot=T}let G=s._getInternalShadowRoot?.();if(G){G.host=s,G.parentNode=s;let P=(B)=>{B.ownerDocument=s.ownerDocument;for(let W of B.childNodes??[])P(W)};P(G)}}class rr{_definitions=new Map;_document=null;_whenDefinedPromises=new Map;define(s,S,T){if(!is(s))throw Error(`Failed to execute 'define' on 'CustomElementRegistry': "${s}" is not a valid custom element name`);if(this._definitions.has(s))throw Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${s}" has already been used`);if([...this._definitions.values()].includes(S))throw Error("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used");if(S.__veryHappyCustomElementName=s,this._definitions.set(s,S),this._document)this.upgrade(this._document);let C=this._whenDefinedPromises.get(s);if(C)C.forEach((D)=>D.resolve()),this._whenDefinedPromises.delete(s)}get(s){return this._definitions.get(s)}whenDefined(s){if(!is(s))return Promise.reject(Error(`Failed to execute 'whenDefined' on 'CustomElementRegistry': "${s}" is not a valid custom element name`));if(this._definitions.has(s))return Promise.resolve(this._definitions.get(s));return new Promise((S,T)=>{if(!this._whenDefinedPromises.has(s))this._whenDefinedPromises.set(s,[]);this._whenDefinedPromises.get(s).push({resolve:()=>S(this._definitions.get(s)),reject:T})})}_setDocument(s){this._document=s}upgrade(s){let S=(T)=>{if(this._upgradeElement(T)&&T.isConnected)Ve(T);let C=T?._getInternalShadowRoot?.();if(C)S(C);if(T?.tagName==="TEMPLATE")return;for(let D of T?.childNodes??[])S(D)};S(s)}_upgradeElement(s){if(!s?.tagName)return!1;let S=`${s.tagName}`.toLowerCase(),T=this._definitions.get(S);if(!T||s instanceof T)return!1;Ts(s,T),Object.setPrototypeOf(s,T.prototype),s.__veryHappyCustomElementName=S;for(let[C,D]of s.attributes??[])Me(s,C,null,D);return!0}}class ir extends e{constructor(s){let S=new.target;super(s||S.__veryHappyCustomElementName||"div");this.ownerDocument=os(S)}static get observedAttributes(){return[]}}class or extends r{constructor(){super("svg")}}class sr extends r{constructor(){super("g")}}class ar extends r{constructor(){super("path")}}class lr extends r{constructor(){super("animate")}}class ur extends r{constructor(){super("circle")}}class cr extends r{constructor(){super("clipPath")}}class dr extends r{constructor(){super("defs")}}class hr extends r{constructor(){super("desc")}}class mr extends r{constructor(){super("ellipse")}}class pr extends r{constructor(){super("filter")}}class fr extends r{constructor(){super("foreignObject")}}class gr extends r{constructor(){super("g")}}class br extends r{constructor(){super("image")}}class yr extends r{constructor(){super("line")}}class Er extends r{constructor(){super("linearGradient")}}class vr extends r{constructor(){super("marker")}}class wr extends r{constructor(){super("mask")}}class _r extends r{constructor(){super("metadata")}}class Sr extends r{constructor(){super("path")}}class Tr extends r{constructor(){super("pattern")}}class xr extends r{constructor(){super("polygon")}}class Nr extends r{constructor(){super("polyline")}}class Cr extends r{constructor(){super("radialGradient")}}class Vr extends r{constructor(){super("rect")}}class Mr extends r{constructor(){super("script")}}class Or extends r{constructor(){super("stop")}}class Rr extends r{constructor(){super("style")}}class Lr extends r{constructor(){super("switch")}}class Ar extends r{constructor(){super("symbol")}}class Dr extends r{constructor(){super("text")}}class Pr extends r{constructor(){super("textPath")}}class Ir extends r{constructor(){super("title")}}class kr extends r{constructor(){super("tspan")}}class Br extends r{constructor(){super("use")}}class Hr extends r{constructor(){super("view")}}class Fr extends r{constructor(){super("feBlend")}}class Gr extends r{constructor(){super("feColorMatrix")}}class Ur extends r{constructor(){super("feComponentTransfer")}}class Wr extends r{constructor(){super("feComposite")}}class $r extends r{constructor(){super("feConvolveMatrix")}}class qr extends r{constructor(){super("feDiffuseLighting")}}class zr extends r{constructor(){super("feDisplacementMap")}}class Kr extends r{constructor(){super("feDistantLight")}}class jr extends r{constructor(){super("feFlood")}}class Yr extends r{constructor(){super("feGaussianBlur")}}class Xr extends r{constructor(){super("feImage")}}class Jr extends r{constructor(){super("feMerge")}}class Qr extends r{constructor(){super("feMergeNode")}}class Zr extends r{constructor(){super("feMorphology")}}class ei extends r{constructor(){super("feOffset")}}class ti extends r{constructor(){super("fePointLight")}}class ni extends r{constructor(){super("feSpecularLighting")}}class ri extends r{constructor(){super("feSpotLight")}}class ii extends r{constructor(){super("feTile")}}class oi extends r{constructor(){super("feTurbulence")}}class si{static SVG_ANGLETYPE_UNKNOWN=0;static SVG_ANGLETYPE_UNSPECIFIED=1;static SVG_ANGLETYPE_DEG=2;static SVG_ANGLETYPE_RAD=3;static SVG_ANGLETYPE_GRAD=4;unitType=0;value=0;valueInSpecifiedUnits=0;valueAsString="0"}class ai{static SVG_LENGTHTYPE_UNKNOWN=0;static SVG_LENGTHTYPE_NUMBER=1;static SVG_LENGTHTYPE_PERCENTAGE=2;static SVG_LENGTHTYPE_PX=5;unitType=0;value=0;valueInSpecifiedUnits=0;valueAsString="0"}class li{value=0}class ui{x=0;y=0}class ci{x=0;y=0;width=0;height=0}class $e{a=1;b=0;c=0;d=1;e=0;f=0}class di{static SVG_TRANSFORM_UNKNOWN=0;static SVG_TRANSFORM_MATRIX=1;static SVG_TRANSFORM_TRANSLATE=2;static SVG_TRANSFORM_SCALE=3;static SVG_TRANSFORM_ROTATE=4;static SVG_TRANSFORM_SKEWX=5;static SVG_TRANSFORM_SKEWY=6;type=0;matrix=new $e;angle=0}class b extends f{document;happyDOM;console;navigator;customElements;HTMLElement=ir;localStorage;sessionStorage;fetch=globalThis.fetch.bind(globalThis);Request=globalThis.Request;Response=globalThis.Response;Headers=globalThis.Headers;FormData=xi;ClipboardItem=Be;URL=globalThis.URL;URLSearchParams=globalThis.URLSearchParams;AbortController=globalThis.AbortController;AbortSignal=globalThis.AbortSignal;Blob=globalThis.Blob;TextEncoder=globalThis.TextEncoder;TextDecoder=globalThis.TextDecoder;ReadableStream=globalThis.ReadableStream;WritableStream=globalThis.WritableStream;TransformStream=globalThis.TransformStream;CustomEvent=fe;MutationObserver=l;IntersectionObserver=er;ResizeObserver=tr;XMLHttpRequest=g;WebSocket=Ht;File=bt;FileReader=u;FileList=yt;HTMLCanvasElement=J;CanvasRenderingContext2D=le;HTMLAnchorElement=Wt;HTMLAreaElement=$t;HTMLAudioElement=qt;HTMLBaseElement=zt;HTMLBodyElement=Kt;HTMLBRElement=jt;HTMLButtonElement=Yt;HTMLDataElement=Xt;HTMLDataListElement=Jt;HTMLDetailsElement=Qt;HTMLDialogElement=Zt;HTMLDivElement=en;HTMLDListElement=tn;HTMLEmbedElement=nn;HTMLFieldSetElement=rn;HTMLFormElement=on;HTMLHeadElement=sn;HTMLHeadingElement=an;HTMLHRElement=ln;HTMLHtmlElement=un;HTMLIFrameElement=cn;HTMLImageElement=dn;HTMLInputElement=hn;HTMLLabelElement=mn;HTMLLegendElement=pn;HTMLLIElement=fn;HTMLLinkElement=gn;HTMLMapElement=bn;HTMLMediaElement=yn;HTMLMenuElement=En;HTMLMetaElement=vn;HTMLMeterElement=wn;HTMLModElement=_n;HTMLObjectElement=Sn;HTMLOListElement=Tn;HTMLOptGroupElement=xn;HTMLOptionElement=Nn;HTMLOutputElement=Cn;HTMLParagraphElement=Vn;HTMLParamElement=Mn;HTMLPictureElement=On;HTMLPreElement=Rn;HTMLProgressElement=Ln;HTMLQuoteElement=An;HTMLScriptElement=Dn;HTMLSelectElement=Pn;HTMLSlotElement=X;HTMLSourceElement=In;HTMLSpanElement=kn;HTMLStyleElement=Bn;HTMLTableCaptionElement=Hn;HTMLTableCellElement=Fn;HTMLTableColElement=Gn;HTMLTableElement=Un;HTMLTableRowElement=Wn;HTMLTableSectionElement=$n;HTMLTextAreaElement=qn;HTMLTimeElement=zn;HTMLTitleElement=Kn;HTMLTrackElement=jn;HTMLUListElement=Yn;HTMLUnknownElement=Xn;HTMLVideoElement=Jn;Image=Qn;Audio=Zn;Document=N;Element=e;HTMLTemplateElement=Y;Node=d;NodeFilter=Ai;NodeIterator=be;Range=p;Selection=ye;Text=o;TreeWalker=ge;Comment=x;DocumentFragment=_;Event=n;SVGElement=r;SVGSVGElement=or;SVGGraphicsElement=sr;SVGGeometryElement=ar;SVGAnimationElement=lr;SVGCircleElement=ur;SVGClipPathElement=cr;SVGDefsElement=dr;SVGDescElement=hr;SVGEllipseElement=mr;SVGFilterElement=pr;SVGForeignObjectElement=fr;SVGGElement=gr;SVGImageElement=br;SVGLineElement=yr;SVGLinearGradientElement=Er;SVGMarkerElement=vr;SVGMaskElement=wr;SVGMetadataElement=_r;SVGPathElement=Sr;SVGPatternElement=Tr;SVGPolygonElement=xr;SVGPolylineElement=Nr;SVGRadialGradientElement=Cr;SVGRectElement=Vr;SVGScriptElement=Mr;SVGStopElement=Or;SVGStyleElement=Rr;SVGSwitchElement=Lr;SVGSymbolElement=Ar;SVGTextElement=Dr;SVGTextPathElement=Pr;SVGTitleElement=Ir;SVGTSpanElement=kr;SVGUseElement=Br;SVGViewElement=Hr;SVGFEBlendElement=Fr;SVGFEColorMatrixElement=Gr;SVGFEComponentTransferElement=Ur;SVGFECompositeElement=Wr;SVGFEConvolveMatrixElement=$r;SVGFEDiffuseLightingElement=qr;SVGFEDisplacementMapElement=zr;SVGFEDistantLightElement=Kr;SVGFEFloodElement=jr;SVGFEGaussianBlurElement=Yr;SVGFEImageElement=Xr;SVGFEMergeElement=Jr;SVGFEMergeNodeElement=Qr;SVGFEMorphologyElement=Zr;SVGFEOffsetElement=ei;SVGFEPointLightElement=ti;SVGFESpecularLightingElement=ni;SVGFESpotLightElement=ri;SVGFETileElement=ii;SVGFETurbulenceElement=oi;SVGAngle=si;SVGLength=ai;SVGNumber=li;SVGPoint=ui;SVGRect=ci;SVGMatrix=$e;SVGTransform=di;CSSStyleSheet=ae;CSSStyleDeclaration=q;CSSRule=h;CSSStyleRule=K;CSSMediaRule=Pe;CSSKeyframesRule=ut;CSSKeyframeRule=Ie;CSSFontFaceRule=ct;CSSSupportsRule=dt;CSSContainerRule=ht;CSSConditionRule=z;CSSGroupingRule=se;CSSScopeRule=mt;CSS=pt;MediaList=oe;StylePropertyMap=ft;StylePropertyMapReadOnly=ke;DOMRect=H;DOMRectReadOnly=ee;DOMPoint=_e;DOMPointReadOnly=te;DOMMatrix=ze;DOMMatrixReadOnly=Se;NodeList=Ke;HTMLCollection=je;NamedNodeMap=Xe;Attr=Ye;XMLSerializer=Je;ValidityState=Qe;Screen=Te;MediaQueryList=xe;DocumentType=Ze;HTMLDocument=N;XMLDocument=N;UIEvent=v;MouseEvent=M;KeyboardEvent=ue;FocusEvent=ce;InputEvent=Et;WheelEvent=vt;PointerEvent=wt;TouchEvent=_t;Touch=Pt;AnimationEvent=St;TransitionEvent=Tt;ClipboardEvent=xt;DragEvent=Nt;ErrorEvent=de;HashChangeEvent=Ct;PopStateEvent=Vt;ProgressEvent=Mt;MessageEvent=O;CloseEvent=Ot;StorageEvent=Rt;SubmitEvent=Lt;MediaQueryListEvent=At;CompositionEvent=Dt;performance=new ot;Notification=at;DataTransfer=lt;crypto=globalThis.crypto;BroadcastChannel=It;MessageChannel=kt;MessagePort=he;EventSource=R;PerformanceObserver=Bt;indexedDB=Ni();IDBFactory=Ue;IDBDatabase=Ge;IDBObjectStore=He;IDBTransaction=Fe;IDBRequest=me;IDBOpenDBRequest=pe;DOMParser=class{parseFromString(S,T){let C=new N;if(T==="text/html"||T==="application/xhtml+xml"){let D=m(S,C);for(let w of D)if(w.tagName==="HTML"){C.childNodes=[],C.documentElement=w,C.appendChild(w);for(let G of w.children)if(G.tagName==="HEAD")C.head=G;else if(G.tagName==="BODY")C.body=G;return C}if(C.body){C.body.childNodes=[];for(let w of D)C.body.appendChild(w)}}else if(T==="text/xml"||T==="application/xml"||T==="image/svg+xml"){let D=m(S,C);C.childNodes=[];for(let w of D)C.appendChild(w)}return C}};get self(){return this}get window(){return this}get parent(){return this}get top(){return this}get frames(){return this}frameElement=null;opener=null;name="";closed=!1;scrollX=0;scrollY=0;get pageXOffset(){return this.scrollX}get pageYOffset(){return this.scrollY}devicePixelRatio=1;atob(s){return globalThis.atob(s)}btoa(s){return globalThis.btoa(s)}queueMicrotask(s){globalThis.queueMicrotask(s)}structuredClone(s,S){return globalThis.structuredClone(s,S)}_location;_settings;_width;_height;_timerManager;_idleCallbackId=0;constructor(s={}){super();let{url:S="about:blank",width:T=1024,height:C=768,console:D,settings:w={}}=s;if(this._width=T,this._height=C,this._settings={navigator:{userAgent:w.navigator?.userAgent||"Mozilla/5.0 (X11; Linux x64) AppleWebKit/537.36 (KHTML, like Gecko) VeryHappyDOM/1.0.0"},device:{prefersColorScheme:w.device?.prefersColorScheme||"light"}},this.console=D||globalThis.console,this.navigator=new gt,this.navigator.userAgent=this._settings.navigator.userAgent,this.customElements=new rr,this.localStorage=Ee(),this.sessionStorage=Ee(),this._timerManager=new nr,this.document=new N,this.document.defaultView=this,this.customElements._setDocument(this.document),S)try{this.document.location.href=S}catch{}this._location=this._createLocation(S);let{DetachedWindowAPI:G}=import.meta.require("./chunk-s7n7ce71.js");this.happyDOM=new G(this)}get location(){return this.document?.location??this._location}set location(s){let S=typeof s==="string"?s:s.href;if(this.document)this.document.location.href=S;else this._location=this._createLocation(S)}get innerWidth(){return this._width}get innerHeight(){return this._height}get outerWidth(){return this._width}get outerHeight(){return this._height}getSelection(){return this.document.getSelection()}_createLocation(s){try{let S=new URL(s);return{href:S.href,origin:S.origin,protocol:S.protocol,host:S.host,hostname:S.hostname,port:S.port,pathname:S.pathname,search:S.search,hash:S.hash,assign:(T)=>{this.location=T},replace:(T)=>{this.location=T},reload:()=>{},toString:()=>S.href}}catch{return{href:s,origin:"",protocol:"",host:"",hostname:"",port:"",pathname:"",search:"",hash:"",assign:(S)=>{this.location=S},replace:(S)=>{this.location=S},reload:()=>{},toString:()=>s}}}get settings(){return this._settings}setTimeout(s,S,...T){return this._timerManager.setTimeout(s,S,...T)}clearTimeout(s){this._timerManager.clearTimeout(s)}setInterval(s,S,...T){return this._timerManager.setInterval(s,S,...T)}clearInterval(s){this._timerManager.clearInterval(s)}requestAnimationFrame(s){return this._timerManager.requestAnimationFrame(s)}cancelAnimationFrame(s){this._timerManager.cancelAnimationFrame(s)}getComputedStyle(s,S){return this.document.getComputedStyle(s)}get screen(){return new Te(this._width,this._height)}get isSecureContext(){return this._location.protocol==="https:"}get origin(){return this._location.origin}_mediaContext(){return{width:this._width,height:this._height,colorScheme:this._settings.device.prefersColorScheme,reducedMotion:this._settings.device.prefersReducedMotion??"no-preference",forcedColors:this._settings.device.forcedColors??"none",type:this._settings.device.mediaType??"screen"}}matchMedia(s){return new xe(s,Ne(s,this._mediaContext()))}get history(){return this.document.history}postMessage(s,S){let T=typeof S==="string"?S:S?.targetOrigin??"*";setTimeout(()=>{let C=new n("message");C.data=s,C.origin=T==="*"?this._location.origin:T,C.source=this,C.ports=[],this.dispatchEvent(C)},0)}requestIdleCallback(s,S){let T=++this._idleCallbackId,C=S?.timeout??50;return this._timerManager.setTimeout(()=>{s({didTimeout:!1,timeRemaining:()=>Math.max(0,C)})},0),T}cancelIdleCallback(s){}focus(){}blur(){}print(){}stop(){}open(s="about:blank",S="_blank",T=""){let C=String(s||"about:blank");try{C=new URL(C,this.location.href).href}catch{}let D=new b({url:C,width:this._width,height:this._height,console:this.console,settings:this._settings});D.name=S&&S!=="_blank"?S:"";let w=T.split(/[\s,]+/).map((G)=>G.split("=",1)[0]?.toLowerCase());return D.opener=w.includes("noopener")||w.includes("noreferrer")?null:this,D}close(){this.closed=!0}resizeTo(s,S){}resizeBy(s,S){}moveTo(s,S){}moveBy(s,S){}scrollTo(s,S){if(typeof s==="object"&&s!==null){if(typeof s.left==="number")this.scrollX=s.left;if(typeof s.top==="number")this.scrollY=s.top;return}if(typeof s==="number")this.scrollX=s;if(typeof S==="number")this.scrollY=S}scroll(s,S){this.scrollTo(s,S)}scrollBy(s,S){if(typeof s==="object"&&s!==null){if(typeof s.left==="number")this.scrollX+=s.left;if(typeof s.top==="number")this.scrollY+=s.top;return}if(typeof s==="number")this.scrollX+=s;if(typeof S==="number")this.scrollY+=S}alert(s){}confirm(s){return!1}prompt(s,S){return null}_getTimerManager(){return this._timerManager}}
|
|
11
|
+
export{ot,st,at,Ki,lt,q,oe,h,se,z,K,Pe,Ie,ut,ct,dt,ht,mt,ae,pt,ke,ft,le,Be,wi,_i,Si,Ti,gt,bt,u,yt,v,M,ue,ce,Et,vt,wt,_t,St,Tt,xt,Nt,de,Ct,Vt,Mt,O,Ot,Rt,Lt,At,Dt,Pt,It,he,kt,R,ji,xi,me,pe,He,Fe,Ge,Ue,Ni,Bt,fe,g,Ht,Ci,L,A,j,Ft,We,Vi,Mi,Oi,Ri,Li,Ai,ge,be,p,ye,Di,Gt,Ut,Y,Wt,$t,qt,zt,Kt,jt,Yt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,sn,an,ln,un,cn,dn,hn,mn,pn,fn,gn,bn,yn,En,vn,wn,_n,Sn,Tn,xn,Nn,Cn,Vn,Mn,On,Rn,Ln,An,Dn,Pn,X,In,kn,Bn,Hn,Fn,Gn,Un,Wn,$n,qn,zn,Kn,jn,Yn,Xn,Jn,Qn,Zn,J,N,no,er,tr,Pi,Ee,nr,rr,ir,or,sr,ar,lr,ur,cr,dr,hr,mr,pr,fr,gr,br,yr,Er,vr,wr,_r,Sr,Tr,xr,Nr,Cr,Vr,Mr,Or,Rr,Lr,Ar,Dr,Pr,Ir,kr,Br,Hr,Fr,Gr,Ur,Wr,$r,qr,zr,Kr,jr,Yr,Xr,Jr,Qr,Zr,ei,ti,ni,ri,ii,oi,si,ai,li,ui,ci,$e,di,b};
|