very-happy-dom 0.3.0 → 0.3.2

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 CHANGED
@@ -1,3 +1,31 @@
1
+ [Compare changes](https://github.com/stacksjs/very-happy-dom/compare/v0.3.1...HEAD)
2
+
3
+ ## 🐛 Bug Fixes
4
+
5
+ - **build**: emit the missing webview declaration ([4c69500](https://github.com/stacksjs/very-happy-dom/commit/4c69500)) _(by glennmichael123 <gtorregosa@gmail.com>)_
6
+
7
+ ## 🤖 Continuous Integration
8
+
9
+ - **release**: fetch the tag so its message is actually there ([2c56942](https://github.com/stacksjs/very-happy-dom/commit/2c56942)) _(by glennmichael123 <gtorregosa@gmail.com>)_
10
+
11
+ ## Contributors
12
+
13
+ - _glennmichael123 <gtorregosa@gmail.com>_
14
+
15
+ [Compare changes](https://github.com/stacksjs/very-happy-dom/compare/v0.3.0...HEAD)
16
+
17
+ ## 🐛 Bug Fixes
18
+
19
+ - **dialog**: emit a declaration that parses ([55aa421](https://github.com/stacksjs/very-happy-dom/commit/55aa421)) _(by glennmichael123 <gtorregosa@gmail.com>)_
20
+
21
+ ## 🤖 Continuous Integration
22
+
23
+ - **release**: pass the tag's notes to the GitHub Release ([3550904](https://github.com/stacksjs/very-happy-dom/commit/3550904)) _(by glennmichael123 <gtorregosa@gmail.com>)_
24
+
25
+ ## Contributors
26
+
27
+ - _glennmichael123 <gtorregosa@gmail.com>_
28
+
1
29
  [Compare changes](https://github.com/stacksjs/very-happy-dom/compare/v0.2.0...HEAD)
2
30
 
3
31
  ## 🚀 Features
@@ -26,9 +26,8 @@ export type DialogType = 'alert' | 'confirm' | 'prompt';
26
26
  export declare class Dialog {
27
27
  readonly type: DialogType;
28
28
  readonly message: string;
29
- readonly or an empty string. */
30
- defaultValue?: string;
31
- constructor(type: DialogType, message: string);
29
+ readonly defaultValue?: string;
30
+ constructor(type: DialogType, message: string, defaultValue?: string);
32
31
  accept(promptText?: string): Promise<void>;
33
32
  dismiss(): Promise<void>;
34
33
  get _wasSettled(): boolean;
@@ -1,11 +1,11 @@
1
1
  // @bun
2
- import{f,n,xe,Ne,gi,Xi,E,k,l,o,t,i,c,a,V,te,Oe,d}from"./chunk-ha2jjx02.js";import{I,y,_}from"./chunk-7vtf83p2.js";import{x,p}from"./chunk-gbbkvps6.js";import{Z,H,ee,ve,we,We,$e,qe,ze,Ke,je,Ye,_e,Se,Xe,Te,ci,di,e}from"./chunk-jfqdhrwq.js";import{r}from"./chunk-8r26c3ah.js";class rt{_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 it{_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 ot{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 qi{_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 st{_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 W{_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 ie{_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(),F=/^@media\b(.*)$/is.exec(G);if(F){let B=new Le,Q=F[1].trim();B.conditionText=Q,B.media.mediaText=Q,B.parentStyleSheet=S;let re=B.cssRules;for(let J of ts(P,S))J.parentRule=B,re.push(J);T.push(B);continue}let U=new z;U.selectorText=G,U.parentStyleSheet=S,as(P,U),T.push(U)}return T}class oe extends h{cssRules=[];insertRule(s,S=0){let T=new z;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 q extends oe{conditionText=""}class z extends h{selectorText="";style=new W;constructor(){super(h.STYLE_RULE)}}class Le extends q{media=new ie;constructor(){super(h.MEDIA_RULE)}}class Ae extends h{keyText="";style=new W;constructor(){super(h.KEYFRAME_RULE)}}class at extends h{name="";cssRules=[];constructor(){super(h.KEYFRAMES_RULE)}appendRule(s){let S=new Ae;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 lt extends h{style=new W;constructor(){super(h.FONT_FACE_RULE)}}class ut extends q{constructor(){super(h.SUPPORTS_RULE)}}class ct extends q{containerName="";containerQuery="";constructor(){super(h.CONTAINER_RULE)}}class dt extends oe{start="";end="";constructor(){super(h.STYLE_RULE)}}class se{cssRules=[];disabled=!1;href=null;media=new ie;ownerNode=null;ownerRule=null;parentStyleSheet=null;title=null;type="text/css";insertRule(s,S=0){let T=new z;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+\(.+\)$/,ht={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!ht.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 De{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 mt extends De{set(s,...S){}append(s,...S){}delete(s){}clear(){}}class ae{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,F]=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,F,U,B,Q]=this.transformMatrix;this.transformMatrix[0]=G*s+F*S,this.transformMatrix[1]=P*s+U*S,this.transformMatrix[2]=G*T+F*C,this.transformMatrix[3]=P*T+U*C,this.transformMatrix[4]=G*D+F*w+B,this.transformMatrix[5]=P*D+U*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,F){G.set(P,F)}}}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 Pe{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 Ei{_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 Pe({"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 vi{_granted=null;query(s){return Promise.resolve(new _i(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 wi{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 _i{name;state;onchange=null;constructor(s,S){this.name=s,this.state=S}}class pt{clipboard=new Ei;geolocation=new it;permissions=new vi;storage=new wi;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 ft 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 gt{_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 le 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 ue extends v{relatedTarget;constructor(s,S={}){super(s,S);this.relatedTarget=S.relatedTarget??null}}class bt 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 yt 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 Et 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 vt 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 wt 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 _t 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 St extends n{clipboardData;constructor(s,S={}){super(s,S);this.clipboardData=S.clipboardData??null}}class Tt extends M{dataTransfer;constructor(s,S={}){super(s,S);this.dataTransfer=S.dataTransfer??null}}class ce 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 xt extends n{oldURL;newURL;constructor(s,S={}){super(s,S);this.oldURL=S.oldURL??"",this.newURL=S.newURL??""}}class Nt extends n{state;constructor(s,S={}){super(s,S);this.state=S.state??null}}class Ct 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 Vt 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 Mt 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 Ot extends n{submitter;constructor(s,S={}){super(s,S);this.submitter=S.submitter??null}}class Rt extends n{matches;media;constructor(s,S={}){super(s,S);this.matches=S.matches??!1,this.media=S.media??""}}class Lt extends v{data;constructor(s,S={}){super(s,S);this.data=S.data??""}}class At{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 Ce=new Map;class Dt extends f{name;_closed=!1;onmessage=null;onmessageerror=null;constructor(s){super();this.name=String(s);let S=Ce.get(this.name);if(!S)S=new Set,Ce.set(this.name,S);S.add(this)}postMessage(s){if(this._closed)throw Error("InvalidStateError: BroadcastChannel is closed");let S=Ce.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=Ce.get(this.name);if(s){if(s.delete(this),s.size===0)Ce.delete(this.name)}}}class de 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 Pt{port1;port2;constructor(){this.port1=new de,this.port2=new de,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(`
2
+ import{f,n,Ne,Ce,gi,Qi,E,k,l,o,t,i,c,a,V,te,Re,d}from"./chunk-acwj66tt.js";import{I,y,_}from"./chunk-bbr3a3qm.js";import{x,p}from"./chunk-hvd1s737.js";import{Z,H,ee,we,_e,$e,qe,ze,Ke,je,Ye,Xe,Se,Te,Je,xe,ci,di,e}from"./chunk-ekpt3ds6.js";import{r}from"./chunk-9fvq7nz7.js";class rt{_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 it{_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 ot{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 qi{_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 st{_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 W{_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 ie{_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(),F=/^@media\b(.*)$/is.exec(G);if(F){let B=new Ae,Q=F[1].trim();B.conditionText=Q,B.media.mediaText=Q,B.parentStyleSheet=S;let re=B.cssRules;for(let J of ts(P,S))J.parentRule=B,re.push(J);T.push(B);continue}let U=new z;U.selectorText=G,U.parentStyleSheet=S,as(P,U),T.push(U)}return T}class oe extends h{cssRules=[];insertRule(s,S=0){let T=new z;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 q extends oe{conditionText=""}class z extends h{selectorText="";style=new W;constructor(){super(h.STYLE_RULE)}}class Ae extends q{media=new ie;constructor(){super(h.MEDIA_RULE)}}class De extends h{keyText="";style=new W;constructor(){super(h.KEYFRAME_RULE)}}class at extends h{name="";cssRules=[];constructor(){super(h.KEYFRAMES_RULE)}appendRule(s){let S=new De;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 lt extends h{style=new W;constructor(){super(h.FONT_FACE_RULE)}}class ut extends q{constructor(){super(h.SUPPORTS_RULE)}}class ct extends q{containerName="";containerQuery="";constructor(){super(h.CONTAINER_RULE)}}class dt extends oe{start="";end="";constructor(){super(h.STYLE_RULE)}}class se{cssRules=[];disabled=!1;href=null;media=new ie;ownerNode=null;ownerRule=null;parentStyleSheet=null;title=null;type="text/css";insertRule(s,S=0){let T=new z;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 We=/^[\w-]+$/,es=/^\w+\(.+\)$/,ht={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!ht.supports(D.slice(0,w).trim(),D.slice(w+1).trim())}return!0}if(!s||!S)return!1;if(!We.test(s))return!1;let T=S.trim();if(!T)return!1;if(We.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)=>We.test(C)||es.test(C)||/^-?\d+(?:\.\d+)?(?:[a-z%]+)?$/i.test(C)||/^#[0-9a-f]{3,8}$/i.test(C))}};class Pe{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 mt extends Pe{set(s,...S){}append(s,...S){}delete(s){}clear(){}}class ae{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,F]=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,F,U,B,Q]=this.transformMatrix;this.transformMatrix[0]=G*s+F*S,this.transformMatrix[1]=P*s+U*S,this.transformMatrix[2]=G*T+F*C,this.transformMatrix[3]=P*T+U*C,this.transformMatrix[4]=G*D+F*w+B,this.transformMatrix[5]=P*D+U*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,F){G.set(P,F)}}}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 Ie{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 Ei{_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 Ie({"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 vi{_granted=null;query(s){return Promise.resolve(new _i(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 wi{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 _i{name;state;onchange=null;constructor(s,S){this.name=s,this.state=S}}class pt{clipboard=new Ei;geolocation=new it;permissions=new vi;storage=new wi;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 ft 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 gt{_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 le 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 ue extends v{relatedTarget;constructor(s,S={}){super(s,S);this.relatedTarget=S.relatedTarget??null}}class bt 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 yt 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 Et 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 vt 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 wt 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 _t 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 St extends n{clipboardData;constructor(s,S={}){super(s,S);this.clipboardData=S.clipboardData??null}}class Tt extends M{dataTransfer;constructor(s,S={}){super(s,S);this.dataTransfer=S.dataTransfer??null}}class ce 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 xt extends n{oldURL;newURL;constructor(s,S={}){super(s,S);this.oldURL=S.oldURL??"",this.newURL=S.newURL??""}}class Nt extends n{state;constructor(s,S={}){super(s,S);this.state=S.state??null}}class Ct 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 Vt 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 Mt 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 Ot extends n{submitter;constructor(s,S={}){super(s,S);this.submitter=S.submitter??null}}class Rt extends n{matches;media;constructor(s,S={}){super(s,S);this.matches=S.matches??!1,this.media=S.media??""}}class Lt extends v{data;constructor(s,S={}){super(s,S);this.data=S.data??""}}class At{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 Ve=new Map;class Dt extends f{name;_closed=!1;onmessage=null;onmessageerror=null;constructor(s){super();this.name=String(s);let S=Ve.get(this.name);if(!S)S=new Set,Ve.set(this.name,S);S.add(this)}postMessage(s){if(this._closed)throw Error("InvalidStateError: BroadcastChannel is closed");let S=Ve.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=Ve.get(this.name);if(s){if(s.delete(this),s.size===0)Ve.delete(this.name)}}}class de 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 Pt{port1;port2;constructor(){this.port1=new de,this.port2=new de,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
3
 
4
4
  `))>=0||(G=C.indexOf(`\r
5
5
  \r
6
6
  `))>=0){let P=C[G+1]===`
7
7
  `?4:2,F=C.slice(0,G);C=C.slice(G+P),this._dispatchFrame(F)}}}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),F=G===-1?"":w.slice(G+1);if(F.startsWith(" "))F=F.slice(1);switch(P){case"event":S=F;break;case"data":T.push(F);break;case"id":C=F;break;case"retry":{let U=Number(F);if(Number.isFinite(U))this._reconnectTimeout=U;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 ce("error");try{this.onerror?.(s)}catch{}this.dispatchEvent(s)}}var Je=globalThis.FormData;function zi(s,S){let T=new Je;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 F=(G.tagName??"").toUpperCase(),U=(G.type??"").toLowerCase();if(F==="BUTTON"||U==="button"||U==="reset"){if(G!==S)continue}if(U==="submit"&&G!==S)continue;if((U==="checkbox"||U==="radio")&&!G.checked)continue;if(U==="file"){let B=G.files;if(!B||B.length===0)T.append(P,new File([],"",{type:"application/octet-stream"}));else for(let Q of B)T.append(P,Q);continue}if(F==="SELECT"){let B=G.multiple&&G.options?G.options.filter((Q)=>Q.selected).map((Q)=>Q.value):[G.value??""];for(let Q of B)T.append(P,Q);continue}T.append(P,G.value??"")}return T}var Si=new Proxy(Je,{construct(s,S){let[T,C]=S;if(T===void 0)return new Je;return zi(T,C)}});class Ze extends Array{contains(s){return this.includes(s)}item(s){return this[s]??null}}class he 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 me extends he{onupgradeneeded=null;onblocked=null}class Ie{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 he;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 ke 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 Ze(...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 Be extends f{name;version;objectStoreNames=new Ze;_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 Ie(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 ke(this,T,S)}close(){}_getStore(s){return this._stores.get(s)}}class He{_dbs=new Map;open(s,S=1){let T=new me,C=this._dbs.get(s),D=!C||C.version<S,w=C??new Be(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(F){T._reject(F instanceof DOMException?F:new DOMException(String(F?.message??F),"AbortError"));return}T._resolve(w)});else T._resolve(w);return T}deleteDatabase(s){let S=new me;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 Ti(){return new He}var cs=Object.freeze(["mark","measure","resource","navigation","paint","longtask","element","event"]);class It{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 pe 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 kt{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 xi;((C)=>{C.none="None";C.lax="Lax";C.strict="Strict"})(xi||={});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 F=(P.domain||new URL(P.originURL).hostname).toLowerCase();if(!ds(C,F,P.hostOnly===!0))return!1;let U=P.path||"/";if(!ps(D,U))return!1;return!0}).sort((P,F)=>(F.path?.length||0)-(P.path?.length||0))}getAllCookies(){return[...this._cookies]}clearCookies(){this._cookies=[]}}var A=1,K=2,Bt=3,Fe=4294967295,Ni=1,Ci=4,Vi=128,Mi=256,Oi=1024,Ri={FILTER_ACCEPT:A,FILTER_REJECT:K,FILTER_SKIP:Bt,SHOW_ALL:Fe,SHOW_ELEMENT:Ni,SHOW_TEXT:Ci,SHOW_COMMENT:Vi,SHOW_DOCUMENT:Mi,SHOW_DOCUMENT_FRAGMENT:Oi};function ms(s){switch(s.nodeType){case t:return Ni;case i:return Ci;case c:return Vi;case a:return Mi;case V:return Oi;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 Me(s,S,T){if(!(S===Fe||(S&ms(s))!==0))return Bt;let D=A,w=hs(T);if(!w)return D;let G=w(s);return G===A||G===K||G===Bt?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 Re(s,S,T){let C=[],D=(w)=>{let G=Me(w,S,T);if(G===A)C.push(w);if(G!==K)for(let P of w.childNodes)D(P)};return D(s),C}function et(s,S,T){let C=Me(s,S,T);if(C===A)return s;if(C===K)return null;for(let D of s.childNodes){let w=et(D,S,T);if(w)return w}return null}function tt(s,S,T){let C=Me(s,S,T);if(C!==K)for(let D=s.childNodes.length-1;D>=0;D--){let w=tt(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 ne(s){if(!s.parentNode)return 0;return s.parentNode.childNodes.indexOf(s)}function Ee(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<=ne(P)?-1:1}if(typeof T.contains==="function"&&T.contains(s)){let P=s;while(P.parentNode!==T&&P.parentNode)P=P.parentNode;return ne(P)<C?-1:1}let G=s.compareDocumentPosition?.(T);if((G&te)===te)return-1;if((G&Oe)===Oe)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 nt(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 nt(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 fe{root;whatToShow;filter;currentNode;constructor(s,S=Fe,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(Me(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=et(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=tt(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=tt(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=et(s[T],this.whatToShow,this.filter);if(C)return this.currentNode=C,C}return null}previousNode(){let s=gs(this.root),S=new Set(Re(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=nt(this.currentNode,this.root,!1);while(s){let S=Me(s,this.whatToShow,this.filter);if(S===A)return this.currentNode=s,s;s=nt(s,this.root,S===K)}return null}}class ge{root;whatToShow;filter;_cursor=-1;constructor(s,S=Fe,T=null){this.root=s,this.whatToShow=S,this.filter=T}get referenceNode(){let s=Re(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=Re(this.root,this.whatToShow,this.filter);if(this._cursor+1>=s.length)return null;return this._cursor++,s[this._cursor]??null}previousNode(){let s=Re(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 m{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;START_TO_START=m.START_TO_START;START_TO_END=m.START_TO_END;END_TO_END=m.END_TO_END;END_TO_START=m.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,Ee(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,Ee(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,ne(s))}setStartAfter(s){if(!s.parentNode)return;this.setStart(s.parentNode,ne(s)+1)}setEndBefore(s){if(!s.parentNode)return;this.setEnd(s.parentNode,ne(s))}setEndAfter(s){if(!s.parentNode)return;this.setEnd(s.parentNode,ne(s)+1)}selectNode(s){if(!s.parentNode)return;let S=ne(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 m(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===m.START_TO_START)return Ee(this.startContainer,this.startOffset,S.startContainer,S.startOffset);if(s===m.START_TO_END)return Ee(this.startContainer,this.startOffset,S.endContainer,S.endOffset);if(s===m.END_TO_END)return Ee(this.endContainer,this.endOffset,S.endContainer,S.endOffset);return Ee(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,F=this.startContainer.parentNode.childNodes,U=F.indexOf(this.startContainer),B=F[U+1]??null;P.insertBefore(s,B),P.insertBefore(G,B),this.setStart(P,ne(s)),this.setEnd(P,ne(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-c2ccy7s1.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 be{_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(m.START_TO_START,(()=>{let D=this._document.createRange();return D.selectNode(s),D})()),C=this._range.compareBoundaryPoints(m.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 Li;((B)=>{B[B.ANY_TYPE=0]="ANY_TYPE";B[B.NUMBER_TYPE=1]="NUMBER_TYPE";B[B.STRING_TYPE=2]="STRING_TYPE";B[B.BOOLEAN_TYPE=3]="BOOLEAN_TYPE";B[B.UNORDERED_NODE_ITERATOR_TYPE=4]="UNORDERED_NODE_ITERATOR_TYPE";B[B.ORDERED_NODE_ITERATOR_TYPE=5]="ORDERED_NODE_ITERATOR_TYPE";B[B.UNORDERED_NODE_SNAPSHOT_TYPE=6]="UNORDERED_NODE_SNAPSHOT_TYPE";B[B.ORDERED_NODE_SNAPSHOT_TYPE=7]="ORDERED_NODE_SNAPSHOT_TYPE";B[B.ANY_UNORDERED_NODE_TYPE=8]="ANY_UNORDERED_NODE_TYPE";B[B.FIRST_ORDERED_NODE_TYPE=9]="FIRST_ORDERED_NODE_TYPE"})(Li||={});class Ht{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 Ft{evaluate(s,S,T=null,C=0,D=null){let w=this._evaluateExpression(s,S),G=C;if(C===0)G=7;return new Ht(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 F of P.children||[])G(F)};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 j extends e{content;constructor(){super("template");this.content=new _,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 j;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)for(let T of this.content.childNodes){let C=T.cloneNode?.(!0);if(C)S.appendChild(C)}return S}}class Gt extends e{constructor(){super("a")}}class Ut extends e{constructor(){super("area")}}class Wt extends e{constructor(){super("audio")}}class $t extends e{constructor(){super("base")}}class qt extends e{constructor(){super("body")}}class zt extends e{constructor(){super("br")}}class Kt extends e{constructor(){super("button")}}class jt extends e{constructor(){super("data")}}class Yt extends e{constructor(){super("datalist")}}class Xt extends e{constructor(){super("details")}}class Jt extends e{constructor(){super("dialog")}}class Qt extends e{constructor(){super("div")}}class Zt extends e{constructor(){super("dl")}}class en extends e{constructor(){super("embed")}}class tn extends e{constructor(){super("fieldset")}}class nn extends e{constructor(){super("form")}}class rn extends e{constructor(){super("head")}}class on extends e{constructor(){super("h1")}}class sn extends e{constructor(){super("hr")}}class an extends e{constructor(){super("html")}}class ln extends e{constructor(){super("iframe")}}class un extends e{constructor(){super("img")}}class cn extends e{constructor(){super("input")}}class dn extends e{constructor(){super("label")}}class hn extends e{constructor(){super("legend")}}class mn extends e{constructor(){super("li")}}class pn extends e{constructor(){super("link")}}class fn extends e{constructor(){super("map")}}class gn extends e{constructor(){super("video")}}class bn extends e{constructor(){super("menu")}}class yn extends e{constructor(){super("meta")}}class En extends e{constructor(){super("meter")}}class vn extends e{constructor(){super("ins")}}class wn extends e{constructor(){super("object")}}class _n extends e{constructor(){super("ol")}}class Sn extends e{constructor(){super("optgroup")}}class Tn extends e{constructor(){super("option")}}class xn extends e{constructor(){super("output")}}class Nn extends e{constructor(){super("p")}}class Cn extends e{constructor(){super("param")}}class Vn extends e{constructor(){super("picture")}}class Mn extends e{constructor(){super("pre")}}class On extends e{constructor(){super("progress")}}class Rn extends e{constructor(){super("blockquote")}}class Ln extends e{constructor(){super("script")}}class An extends e{constructor(){super("select")}}class Y extends e{constructor(){super("slot")}cloneNode(s=!1){let S=new Y;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 gi(this,s)}assignedElements(s={}){return Xi(this,s)}}class Dn extends e{constructor(){super("source")}}class Pn extends e{constructor(){super("span")}}class In extends e{constructor(){super("style")}}class kn extends e{constructor(){super("caption")}}class Bn extends e{constructor(){super("td")}}class Hn extends e{constructor(){super("col")}}class Fn extends e{constructor(){super("table")}}class Gn extends e{constructor(){super("tr")}}class Un extends e{constructor(){super("tbody")}}class Wn extends e{constructor(){super("textarea")}}class $n extends e{constructor(){super("time")}}class qn extends e{constructor(){super("title")}}class zn extends e{constructor(){super("track")}}class Kn extends e{constructor(){super("ul")}}class jn extends e{constructor(){super("unknown")}}class Yn extends e{constructor(){super("video")}}class Xn 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 Jn 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 X 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 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}getContext(s){if(s==="2d"){if(!this.context2d)this.context2d=new ae(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 Ve=Symbol("very-happy-dom.custom-element-owner-document");function Ue(s,S,...T){let C=s,D=Object.prototype.hasOwnProperty.call(C,Ve),w=C[Ve];C[Ve]=S;try{return new s(...T)}finally{if(D)C[Ve]=w;else delete C[Ve]}}function os(s){return s[Ve]??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 se;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 Ft;_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||"",F;if(P&&!P.startsWith("about:"))F=new URL(s,P);else F=new URL(s);this._locationState.href=F.href,this._locationState.protocol=F.protocol,this._locationState.host=F.host,this._locationState.hostname=F.hostname,this._locationState.port=F.port,this._locationState.pathname=F.pathname,this._locationState.search=F.search,this._locationState.hash=F.hash,this._locationState.origin=F.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 X;return C.ownerDocument=this,C}if(s.toLowerCase()==="template"){let C=new j;return C.ownerDocument=this,C.content.ownerDocument=this,C}if(s.toLowerCase()==="slot"){let C=new Y;return C.ownerDocument=this,C}let S=this.defaultView?.customElements?.get?.(s.toLowerCase()),T=S?Ue(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 pe("");case"mouseevent":case"mouseevents":return new M("");case"keyboardevent":return new le("");case"focusevent":return new ue("");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),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 fe(s,S,T)}createNodeIterator(s,S=4294967295,T=null){return new ge(s,S,T)}createRange(){return new m(this)}getSelection(){if(!this._selection)this._selection=new be(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=p(s,this);if(this.body){this.body.childNodes=[];for(let T of S)this.body.appendChild(T)}}write(s){let S=p(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=(F,U)=>{switch(F){case"display":return T[U]||"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=ci(D,[...this.styleSheets,...this._adoptedStyleSheets],this.defaultView?._mediaContext?.());return w},P=(F)=>{let U=di(F,D.style,G());if(U!==null)return U;return C(F,D.tagName)};return new Proxy({getPropertyValue(F){return P(F)},getPropertyPriority(F){if(D.style.getPropertyPriority(F)==="important")return"important";return G().important.has(F)?"important":""}},{get(F,U){if(U==="getPropertyValue")return F.getPropertyValue;if(U==="getPropertyPriority")return F.getPropertyPriority;if(typeof U!=="string")return;let B=U.replace(/[A-Z]/g,(Q)=>`-${Q.toLowerCase()}`);return P(B)}})}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((F)=>F.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 F of C){let[U,...B]=F.split("="),Q=U.trim().toLowerCase(),re=B.join("=").trim();if(Q==="expires"){let J=new Date(re);if(!Number.isNaN(J.getTime()))P.expires=J}else if(Q==="max-age"){let J=Number.parseInt(re,10);if(!Number.isNaN(J))P.expires=new Date(Date.now()+J*1000)}else if(Q==="path")P.path=re||"/";else if(Q==="domain")P.domain=re.replace(/^\./,""),P.hostOnly=!1;else if(Q==="secure")P.secure=!0;else if(Q==="httponly")P.httpOnly=!0;else if(Q==="samesite"){let J=re.toLowerCase();P.sameSite=J==="strict"?"Strict":J==="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 Ji(){return new N}class Qn{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 Zn{_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 Ai{_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 ye(){let s=new Ai;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 er{_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=Ue(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=(F)=>{F.ownerDocument=s.ownerDocument;for(let U of F.childNodes??[])P(U)};P(G)}}class tr{_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(T?.tagName){let D=`${T.tagName}`.toLowerCase(),w=this._definitions.get(D);if(w&&!(T instanceof w)){Ts(T,w),Object.setPrototypeOf(T,w.prototype),T.__veryHappyCustomElementName=D;for(let[G,P]of T.attributes??[])Ne(T,G,null,P);if(T.isConnected)xe(T)}}let C=T?._getInternalShadowRoot?.();if(C)S(C);for(let D of T?.childNodes??[])S(D)};S(s)}}class nr extends e{constructor(s){let S=new.target;super(s||S.__veryHappyCustomElementName||"div");this.ownerDocument=os(S)}static get observedAttributes(){return[]}}class rr extends r{constructor(){super("svg")}}class ir extends r{constructor(){super("g")}}class or extends r{constructor(){super("path")}}class sr extends r{constructor(){super("animate")}}class ar extends r{constructor(){super("circle")}}class lr extends r{constructor(){super("clipPath")}}class ur extends r{constructor(){super("defs")}}class cr extends r{constructor(){super("desc")}}class dr extends r{constructor(){super("ellipse")}}class hr extends r{constructor(){super("filter")}}class mr extends r{constructor(){super("foreignObject")}}class pr extends r{constructor(){super("g")}}class fr extends r{constructor(){super("image")}}class gr extends r{constructor(){super("line")}}class br extends r{constructor(){super("linearGradient")}}class yr extends r{constructor(){super("marker")}}class Er extends r{constructor(){super("mask")}}class vr extends r{constructor(){super("metadata")}}class wr extends r{constructor(){super("path")}}class _r extends r{constructor(){super("pattern")}}class Sr extends r{constructor(){super("polygon")}}class Tr extends r{constructor(){super("polyline")}}class xr extends r{constructor(){super("radialGradient")}}class Nr extends r{constructor(){super("rect")}}class Cr extends r{constructor(){super("script")}}class Vr extends r{constructor(){super("stop")}}class Mr extends r{constructor(){super("style")}}class Or extends r{constructor(){super("switch")}}class Rr extends r{constructor(){super("symbol")}}class Lr extends r{constructor(){super("text")}}class Ar extends r{constructor(){super("textPath")}}class Dr extends r{constructor(){super("title")}}class Pr extends r{constructor(){super("tspan")}}class Ir extends r{constructor(){super("use")}}class kr extends r{constructor(){super("view")}}class Br extends r{constructor(){super("feBlend")}}class Hr extends r{constructor(){super("feColorMatrix")}}class Fr extends r{constructor(){super("feComponentTransfer")}}class Gr extends r{constructor(){super("feComposite")}}class Ur extends r{constructor(){super("feConvolveMatrix")}}class Wr extends r{constructor(){super("feDiffuseLighting")}}class $r extends r{constructor(){super("feDisplacementMap")}}class qr extends r{constructor(){super("feDistantLight")}}class zr extends r{constructor(){super("feFlood")}}class Kr extends r{constructor(){super("feGaussianBlur")}}class jr extends r{constructor(){super("feImage")}}class Yr extends r{constructor(){super("feMerge")}}class Xr extends r{constructor(){super("feMergeNode")}}class Jr extends r{constructor(){super("feMorphology")}}class Qr extends r{constructor(){super("feOffset")}}class Zr extends r{constructor(){super("fePointLight")}}class ei extends r{constructor(){super("feSpecularLighting")}}class ti extends r{constructor(){super("feSpotLight")}}class ni extends r{constructor(){super("feTile")}}class ri extends r{constructor(){super("feTurbulence")}}class ii{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 oi{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 si{value=0}class ai{x=0;y=0}class li{x=0;y=0;width=0;height=0}class Ge{a=1;b=0;c=0;d=1;e=0;f=0}class ui{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 Ge;angle=0}class b extends f{document;happyDOM;console;navigator;customElements;HTMLElement=nr;localStorage;sessionStorage;fetch=globalThis.fetch.bind(globalThis);Request=globalThis.Request;Response=globalThis.Response;Headers=globalThis.Headers;FormData=Si;ClipboardItem=Pe;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=pe;MutationObserver=l;IntersectionObserver=Qn;ResizeObserver=Zn;XMLHttpRequest=g;WebSocket=kt;File=ft;FileReader=u;FileList=gt;HTMLCanvasElement=X;CanvasRenderingContext2D=ae;HTMLAnchorElement=Gt;HTMLAreaElement=Ut;HTMLAudioElement=Wt;HTMLBaseElement=$t;HTMLBodyElement=qt;HTMLBRElement=zt;HTMLButtonElement=Kt;HTMLDataElement=jt;HTMLDataListElement=Yt;HTMLDetailsElement=Xt;HTMLDialogElement=Jt;HTMLDivElement=Qt;HTMLDListElement=Zt;HTMLEmbedElement=en;HTMLFieldSetElement=tn;HTMLFormElement=nn;HTMLHeadElement=rn;HTMLHeadingElement=on;HTMLHRElement=sn;HTMLHtmlElement=an;HTMLIFrameElement=ln;HTMLImageElement=un;HTMLInputElement=cn;HTMLLabelElement=dn;HTMLLegendElement=hn;HTMLLIElement=mn;HTMLLinkElement=pn;HTMLMapElement=fn;HTMLMediaElement=gn;HTMLMenuElement=bn;HTMLMetaElement=yn;HTMLMeterElement=En;HTMLModElement=vn;HTMLObjectElement=wn;HTMLOListElement=_n;HTMLOptGroupElement=Sn;HTMLOptionElement=Tn;HTMLOutputElement=xn;HTMLParagraphElement=Nn;HTMLParamElement=Cn;HTMLPictureElement=Vn;HTMLPreElement=Mn;HTMLProgressElement=On;HTMLQuoteElement=Rn;HTMLScriptElement=Ln;HTMLSelectElement=An;HTMLSlotElement=Y;HTMLSourceElement=Dn;HTMLSpanElement=Pn;HTMLStyleElement=In;HTMLTableCaptionElement=kn;HTMLTableCellElement=Bn;HTMLTableColElement=Hn;HTMLTableElement=Fn;HTMLTableRowElement=Gn;HTMLTableSectionElement=Un;HTMLTextAreaElement=Wn;HTMLTimeElement=$n;HTMLTitleElement=qn;HTMLTrackElement=zn;HTMLUListElement=Kn;HTMLUnknownElement=jn;HTMLVideoElement=Yn;Image=Xn;Audio=Jn;Document=N;Element=e;HTMLTemplateElement=j;Node=d;NodeFilter=Ri;NodeIterator=ge;Range=m;Selection=be;Text=o;TreeWalker=fe;Comment=x;DocumentFragment=_;Event=n;SVGElement=r;SVGSVGElement=rr;SVGGraphicsElement=ir;SVGGeometryElement=or;SVGAnimationElement=sr;SVGCircleElement=ar;SVGClipPathElement=lr;SVGDefsElement=ur;SVGDescElement=cr;SVGEllipseElement=dr;SVGFilterElement=hr;SVGForeignObjectElement=mr;SVGGElement=pr;SVGImageElement=fr;SVGLineElement=gr;SVGLinearGradientElement=br;SVGMarkerElement=yr;SVGMaskElement=Er;SVGMetadataElement=vr;SVGPathElement=wr;SVGPatternElement=_r;SVGPolygonElement=Sr;SVGPolylineElement=Tr;SVGRadialGradientElement=xr;SVGRectElement=Nr;SVGScriptElement=Cr;SVGStopElement=Vr;SVGStyleElement=Mr;SVGSwitchElement=Or;SVGSymbolElement=Rr;SVGTextElement=Lr;SVGTextPathElement=Ar;SVGTitleElement=Dr;SVGTSpanElement=Pr;SVGUseElement=Ir;SVGViewElement=kr;SVGFEBlendElement=Br;SVGFEColorMatrixElement=Hr;SVGFEComponentTransferElement=Fr;SVGFECompositeElement=Gr;SVGFEConvolveMatrixElement=Ur;SVGFEDiffuseLightingElement=Wr;SVGFEDisplacementMapElement=$r;SVGFEDistantLightElement=qr;SVGFEFloodElement=zr;SVGFEGaussianBlurElement=Kr;SVGFEImageElement=jr;SVGFEMergeElement=Yr;SVGFEMergeNodeElement=Xr;SVGFEMorphologyElement=Jr;SVGFEOffsetElement=Qr;SVGFEPointLightElement=Zr;SVGFESpecularLightingElement=ei;SVGFESpotLightElement=ti;SVGFETileElement=ni;SVGFETurbulenceElement=ri;SVGAngle=ii;SVGLength=oi;SVGNumber=si;SVGPoint=ai;SVGRect=li;SVGMatrix=Ge;SVGTransform=ui;CSSStyleSheet=se;CSSStyleDeclaration=W;CSSRule=h;CSSStyleRule=z;CSSMediaRule=Le;CSSKeyframesRule=at;CSSKeyframeRule=Ae;CSSFontFaceRule=lt;CSSSupportsRule=ut;CSSContainerRule=ct;CSSConditionRule=q;CSSGroupingRule=oe;CSSScopeRule=dt;CSS=ht;MediaList=ie;StylePropertyMap=mt;StylePropertyMapReadOnly=De;DOMRect=H;DOMRectReadOnly=Z;DOMPoint=ve;DOMPointReadOnly=ee;DOMMatrix=We;DOMMatrixReadOnly=we;NodeList=$e;HTMLCollection=qe;NamedNodeMap=Ke;Attr=ze;XMLSerializer=je;ValidityState=Ye;Screen=_e;MediaQueryList=Se;DocumentType=Xe;HTMLDocument=N;XMLDocument=N;UIEvent=v;MouseEvent=M;KeyboardEvent=le;FocusEvent=ue;InputEvent=bt;WheelEvent=yt;PointerEvent=Et;TouchEvent=vt;Touch=At;AnimationEvent=wt;TransitionEvent=_t;ClipboardEvent=St;DragEvent=Tt;ErrorEvent=ce;HashChangeEvent=xt;PopStateEvent=Nt;ProgressEvent=Ct;MessageEvent=O;CloseEvent=Vt;StorageEvent=Mt;SubmitEvent=Ot;MediaQueryListEvent=Rt;CompositionEvent=Lt;performance=new rt;Notification=ot;DataTransfer=st;crypto=globalThis.crypto;BroadcastChannel=Dt;MessageChannel=Pt;MessagePort=de;EventSource=R;PerformanceObserver=It;indexedDB=Ti();IDBFactory=He;IDBDatabase=Be;IDBObjectStore=Ie;IDBTransaction=ke;IDBRequest=he;IDBOpenDBRequest=me;DOMParser=class{parseFromString(S,T){let C=new N;if(T==="text/html"||T==="application/xhtml+xml"){let D=p(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=p(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 pt,this.navigator.userAgent=this._settings.navigator.userAgent,this.customElements=new tr,this.localStorage=ye(),this.sessionStorage=ye(),this._timerManager=new er,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-k63rmfca.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 _e(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 Se(s,Te(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{rt,it,ot,qi,st,W,ie,h,oe,q,z,Le,Ae,at,lt,ut,ct,dt,se,ht,De,mt,ae,Pe,Ei,vi,wi,_i,pt,ft,u,gt,v,M,le,ue,bt,yt,Et,vt,wt,_t,St,Tt,ce,xt,Nt,Ct,O,Vt,Mt,Ot,Rt,Lt,At,Dt,de,Pt,R,zi,Si,he,me,Ie,ke,Be,He,Ti,It,pe,g,kt,xi,L,A,K,Bt,Fe,Ni,Ci,Vi,Mi,Oi,Ri,fe,ge,m,be,Li,Ht,Ft,j,Gt,Ut,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,Y,Dn,Pn,In,kn,Bn,Hn,Fn,Gn,Un,Wn,$n,qn,zn,Kn,jn,Yn,Xn,Jn,X,N,Ji,Qn,Zn,Ai,ye,er,tr,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,Ge,ui,b};
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 ce("error");try{this.onerror?.(s)}catch{}this.dispatchEvent(s)}}var Qe=globalThis.FormData;function zi(s,S){let T=new Qe;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 F=(G.tagName??"").toUpperCase(),U=(G.type??"").toLowerCase();if(F==="BUTTON"||U==="button"||U==="reset"){if(G!==S)continue}if(U==="submit"&&G!==S)continue;if((U==="checkbox"||U==="radio")&&!G.checked)continue;if(U==="file"){let B=G.files;if(!B||B.length===0)T.append(P,new File([],"",{type:"application/octet-stream"}));else for(let Q of B)T.append(P,Q);continue}if(F==="SELECT"){let B=G.multiple&&G.options?G.options.filter((Q)=>Q.selected).map((Q)=>Q.value):[G.value??""];for(let Q of B)T.append(P,Q);continue}T.append(P,G.value??"")}return T}var Si=new Proxy(Qe,{construct(s,S){let[T,C]=S;if(T===void 0)return new Qe;return zi(T,C)}});class Ze extends Array{contains(s){return this.includes(s)}item(s){return this[s]??null}}class he 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 me extends he{onupgradeneeded=null;onblocked=null}class ke{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 he;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 Be 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 Ze(...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 He extends f{name;version;objectStoreNames=new Ze;_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 ke(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 Be(this,T,S)}close(){}_getStore(s){return this._stores.get(s)}}class Fe{_dbs=new Map;open(s,S=1){let T=new me,C=this._dbs.get(s),D=!C||C.version<S,w=C??new He(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(F){T._reject(F instanceof DOMException?F:new DOMException(String(F?.message??F),"AbortError"));return}T._resolve(w)});else T._resolve(w);return T}deleteDatabase(s){let S=new me;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 Ti(){return new Fe}var cs=Object.freeze(["mark","measure","resource","navigation","paint","longtask","element","event"]);class It{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 pe 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 kt{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 xi;((C)=>{C.none="None";C.lax="Lax";C.strict="Strict"})(xi||={});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 F=(P.domain||new URL(P.originURL).hostname).toLowerCase();if(!ds(C,F,P.hostOnly===!0))return!1;let U=P.path||"/";if(!ps(D,U))return!1;return!0}).sort((P,F)=>(F.path?.length||0)-(P.path?.length||0))}getAllCookies(){return[...this._cookies]}clearCookies(){this._cookies=[]}}var A=1,K=2,Bt=3,Ge=4294967295,Ni=1,Ci=4,Vi=128,Mi=256,Oi=1024,Ri={FILTER_ACCEPT:A,FILTER_REJECT:K,FILTER_SKIP:Bt,SHOW_ALL:Ge,SHOW_ELEMENT:Ni,SHOW_TEXT:Ci,SHOW_COMMENT:Vi,SHOW_DOCUMENT:Mi,SHOW_DOCUMENT_FRAGMENT:Oi};function ms(s){switch(s.nodeType){case t:return Ni;case i:return Ci;case c:return Vi;case a:return Mi;case V:return Oi;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 Me(s,S,T){if(!(S===Ge||(S&ms(s))!==0))return Bt;let D=A,w=hs(T);if(!w)return D;let G=w(s);return G===A||G===K||G===Bt?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 Le(s,S,T){let C=[],D=(w)=>{let G=Me(w,S,T);if(G===A)C.push(w);if(G!==K)for(let P of w.childNodes)D(P)};return D(s),C}function et(s,S,T){let C=Me(s,S,T);if(C===A)return s;if(C===K)return null;for(let D of s.childNodes){let w=et(D,S,T);if(w)return w}return null}function tt(s,S,T){let C=Me(s,S,T);if(C!==K)for(let D=s.childNodes.length-1;D>=0;D--){let w=tt(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 ne(s){if(!s.parentNode)return 0;return s.parentNode.childNodes.indexOf(s)}function Ee(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<=ne(P)?-1:1}if(typeof T.contains==="function"&&T.contains(s)){let P=s;while(P.parentNode!==T&&P.parentNode)P=P.parentNode;return ne(P)<C?-1:1}let G=s.compareDocumentPosition?.(T);if((G&te)===te)return-1;if((G&Re)===Re)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 nt(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 nt(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 fe{root;whatToShow;filter;currentNode;constructor(s,S=Ge,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(Me(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=et(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=tt(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=tt(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=et(s[T],this.whatToShow,this.filter);if(C)return this.currentNode=C,C}return null}previousNode(){let s=gs(this.root),S=new Set(Le(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=nt(this.currentNode,this.root,!1);while(s){let S=Me(s,this.whatToShow,this.filter);if(S===A)return this.currentNode=s,s;s=nt(s,this.root,S===K)}return null}}class ge{root;whatToShow;filter;_cursor=-1;constructor(s,S=Ge,T=null){this.root=s,this.whatToShow=S,this.filter=T}get referenceNode(){let s=Le(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=Le(this.root,this.whatToShow,this.filter);if(this._cursor+1>=s.length)return null;return this._cursor++,s[this._cursor]??null}previousNode(){let s=Le(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 m{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;START_TO_START=m.START_TO_START;START_TO_END=m.START_TO_END;END_TO_END=m.END_TO_END;END_TO_START=m.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,Ee(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,Ee(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,ne(s))}setStartAfter(s){if(!s.parentNode)return;this.setStart(s.parentNode,ne(s)+1)}setEndBefore(s){if(!s.parentNode)return;this.setEnd(s.parentNode,ne(s))}setEndAfter(s){if(!s.parentNode)return;this.setEnd(s.parentNode,ne(s)+1)}selectNode(s){if(!s.parentNode)return;let S=ne(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 m(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===m.START_TO_START)return Ee(this.startContainer,this.startOffset,S.startContainer,S.startOffset);if(s===m.START_TO_END)return Ee(this.startContainer,this.startOffset,S.endContainer,S.endOffset);if(s===m.END_TO_END)return Ee(this.endContainer,this.endOffset,S.endContainer,S.endOffset);return Ee(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,F=this.startContainer.parentNode.childNodes,U=F.indexOf(this.startContainer),B=F[U+1]??null;P.insertBefore(s,B),P.insertBefore(G,B),this.setStart(P,ne(s)),this.setEnd(P,ne(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-p7sqfk4r.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 be{_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(m.START_TO_START,(()=>{let D=this._document.createRange();return D.selectNode(s),D})()),C=this._range.compareBoundaryPoints(m.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 Li;((B)=>{B[B.ANY_TYPE=0]="ANY_TYPE";B[B.NUMBER_TYPE=1]="NUMBER_TYPE";B[B.STRING_TYPE=2]="STRING_TYPE";B[B.BOOLEAN_TYPE=3]="BOOLEAN_TYPE";B[B.UNORDERED_NODE_ITERATOR_TYPE=4]="UNORDERED_NODE_ITERATOR_TYPE";B[B.ORDERED_NODE_ITERATOR_TYPE=5]="ORDERED_NODE_ITERATOR_TYPE";B[B.UNORDERED_NODE_SNAPSHOT_TYPE=6]="UNORDERED_NODE_SNAPSHOT_TYPE";B[B.ORDERED_NODE_SNAPSHOT_TYPE=7]="ORDERED_NODE_SNAPSHOT_TYPE";B[B.ANY_UNORDERED_NODE_TYPE=8]="ANY_UNORDERED_NODE_TYPE";B[B.FIRST_ORDERED_NODE_TYPE=9]="FIRST_ORDERED_NODE_TYPE"})(Li||={});class Ht{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 Ft{evaluate(s,S,T=null,C=0,D=null){let w=this._evaluateExpression(s,S),G=C;if(C===0)G=7;return new Ht(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 F of P.children||[])G(F)};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 j extends e{content;constructor(){super("template");this.content=new _,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 j;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)for(let T of this.content.childNodes){let C=T.cloneNode?.(!0);if(C)S.appendChild(C)}return S}}class Gt extends e{constructor(){super("a")}}class Ut extends e{constructor(){super("area")}}class Wt extends e{constructor(){super("audio")}}class $t extends e{constructor(){super("base")}}class qt extends e{constructor(){super("body")}}class zt extends e{constructor(){super("br")}}class Kt extends e{constructor(){super("button")}}class jt extends e{constructor(){super("data")}}class Yt extends e{constructor(){super("datalist")}}class Xt extends e{constructor(){super("details")}}class Jt extends e{constructor(){super("dialog")}}class Qt extends e{constructor(){super("div")}}class Zt extends e{constructor(){super("dl")}}class en extends e{constructor(){super("embed")}}class tn extends e{constructor(){super("fieldset")}}class nn extends e{constructor(){super("form")}}class rn extends e{constructor(){super("head")}}class on extends e{constructor(){super("h1")}}class sn extends e{constructor(){super("hr")}}class an extends e{constructor(){super("html")}}class ln extends e{constructor(){super("iframe")}}class un extends e{constructor(){super("img")}}class cn extends e{constructor(){super("input")}}class dn extends e{constructor(){super("label")}}class hn extends e{constructor(){super("legend")}}class mn extends e{constructor(){super("li")}}class pn extends e{constructor(){super("link")}}class fn extends e{constructor(){super("map")}}class gn extends e{constructor(){super("video")}}class bn extends e{constructor(){super("menu")}}class yn extends e{constructor(){super("meta")}}class En extends e{constructor(){super("meter")}}class vn extends e{constructor(){super("ins")}}class wn extends e{constructor(){super("object")}}class _n extends e{constructor(){super("ol")}}class Sn extends e{constructor(){super("optgroup")}}class Tn extends e{constructor(){super("option")}}class xn extends e{constructor(){super("output")}}class Nn extends e{constructor(){super("p")}}class Cn extends e{constructor(){super("param")}}class Vn extends e{constructor(){super("picture")}}class Mn extends e{constructor(){super("pre")}}class On extends e{constructor(){super("progress")}}class Rn extends e{constructor(){super("blockquote")}}class Ln extends e{constructor(){super("script")}}class An extends e{constructor(){super("select")}}class Y extends e{constructor(){super("slot")}cloneNode(s=!1){let S=new Y;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 gi(this,s)}assignedElements(s={}){return Qi(this,s)}}class Dn extends e{constructor(){super("source")}}class Pn extends e{constructor(){super("span")}}class In extends e{constructor(){super("style")}}class kn extends e{constructor(){super("caption")}}class Bn extends e{constructor(){super("td")}}class Hn extends e{constructor(){super("col")}}class Fn extends e{constructor(){super("table")}}class Gn extends e{constructor(){super("tr")}}class Un extends e{constructor(){super("tbody")}}class Wn extends e{constructor(){super("textarea")}}class $n extends e{constructor(){super("time")}}class qn extends e{constructor(){super("title")}}class zn extends e{constructor(){super("track")}}class Kn extends e{constructor(){super("ul")}}class jn extends e{constructor(){super("unknown")}}class Yn extends e{constructor(){super("video")}}class Xn 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 Jn 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 X 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 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}getContext(s){if(s==="2d"){if(!this.context2d)this.context2d=new ae(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 ve=Symbol("very-happy-dom.custom-element-owner-document");function Oe(s,S,...T){let C=s,D=Object.prototype.hasOwnProperty.call(C,ve),w=C[ve];C[ve]=S;try{return new s(...T)}finally{if(D)C[ve]=w;else delete C[ve]}}function os(s){return s[ve]??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 se;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 Ft;_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||"",F;if(P&&!P.startsWith("about:"))F=new URL(s,P);else F=new URL(s);this._locationState.href=F.href,this._locationState.protocol=F.protocol,this._locationState.host=F.host,this._locationState.hostname=F.hostname,this._locationState.port=F.port,this._locationState.pathname=F.pathname,this._locationState.search=F.search,this._locationState.hash=F.hash,this._locationState.origin=F.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 X;return C.ownerDocument=this,C}if(s.toLowerCase()==="template"){let C=new j;return C.ownerDocument=this,C.content.ownerDocument=this,C}if(s.toLowerCase()==="slot"){let C=new Y;return C.ownerDocument=this,C}let S=this.defaultView?.customElements?.get?.(s.toLowerCase()),T=S?Oe(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 pe("");case"mouseevent":case"mouseevents":return new M("");case"keyboardevent":return new le("");case"focusevent":return new ue("");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),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 fe(s,S,T)}createNodeIterator(s,S=4294967295,T=null){return new ge(s,S,T)}createRange(){return new m(this)}getSelection(){if(!this._selection)this._selection=new be(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=p(s,this);if(this.body){this.body.childNodes=[];for(let T of S)this.body.appendChild(T)}}write(s){let S=p(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=(F,U)=>{switch(F){case"display":return T[U]||"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=ci(D,[...this.styleSheets,...this._adoptedStyleSheets],this.defaultView?._mediaContext?.());return w},P=(F)=>{let U=di(F,D.style,G());if(U!==null)return U;return C(F,D.tagName)};return new Proxy({getPropertyValue(F){return P(F)},getPropertyPriority(F){if(D.style.getPropertyPriority(F)==="important")return"important";return G().important.has(F)?"important":""}},{get(F,U){if(U==="getPropertyValue")return F.getPropertyValue;if(U==="getPropertyPriority")return F.getPropertyPriority;if(typeof U!=="string")return;let B=U.replace(/[A-Z]/g,(Q)=>`-${Q.toLowerCase()}`);return P(B)}})}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((F)=>F.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 F of C){let[U,...B]=F.split("="),Q=U.trim().toLowerCase(),re=B.join("=").trim();if(Q==="expires"){let J=new Date(re);if(!Number.isNaN(J.getTime()))P.expires=J}else if(Q==="max-age"){let J=Number.parseInt(re,10);if(!Number.isNaN(J))P.expires=new Date(Date.now()+J*1000)}else if(Q==="path")P.path=re||"/";else if(Q==="domain")P.domain=re.replace(/^\./,""),P.hostOnly=!1;else if(Q==="secure")P.secure=!0;else if(Q==="httponly")P.httpOnly=!0;else if(Q==="samesite"){let J=re.toLowerCase();P.sameSite=J==="strict"?"Strict":J==="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 Zi(){return new N}class Qn{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 Zn{_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 Ai{_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 ye(){let s=new Ai;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 er{_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=Oe(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=(F)=>{F.ownerDocument=s.ownerDocument;for(let U of F.childNodes??[])P(U)};P(G)}}class tr{_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(T?.tagName){let D=`${T.tagName}`.toLowerCase(),w=this._definitions.get(D);if(w&&!(T instanceof w)){Ts(T,w),Object.setPrototypeOf(T,w.prototype),T.__veryHappyCustomElementName=D;for(let[G,P]of T.attributes??[])Ce(T,G,null,P);if(T.isConnected)Ne(T)}}let C=T?._getInternalShadowRoot?.();if(C)S(C);for(let D of T?.childNodes??[])S(D)};S(s)}}class nr extends e{constructor(s){let S=new.target;super(s||S.__veryHappyCustomElementName||"div");this.ownerDocument=os(S)}static get observedAttributes(){return[]}}class rr extends r{constructor(){super("svg")}}class ir extends r{constructor(){super("g")}}class or extends r{constructor(){super("path")}}class sr extends r{constructor(){super("animate")}}class ar extends r{constructor(){super("circle")}}class lr extends r{constructor(){super("clipPath")}}class ur extends r{constructor(){super("defs")}}class cr extends r{constructor(){super("desc")}}class dr extends r{constructor(){super("ellipse")}}class hr extends r{constructor(){super("filter")}}class mr extends r{constructor(){super("foreignObject")}}class pr extends r{constructor(){super("g")}}class fr extends r{constructor(){super("image")}}class gr extends r{constructor(){super("line")}}class br extends r{constructor(){super("linearGradient")}}class yr extends r{constructor(){super("marker")}}class Er extends r{constructor(){super("mask")}}class vr extends r{constructor(){super("metadata")}}class wr extends r{constructor(){super("path")}}class _r extends r{constructor(){super("pattern")}}class Sr extends r{constructor(){super("polygon")}}class Tr extends r{constructor(){super("polyline")}}class xr extends r{constructor(){super("radialGradient")}}class Nr extends r{constructor(){super("rect")}}class Cr extends r{constructor(){super("script")}}class Vr extends r{constructor(){super("stop")}}class Mr extends r{constructor(){super("style")}}class Or extends r{constructor(){super("switch")}}class Rr extends r{constructor(){super("symbol")}}class Lr extends r{constructor(){super("text")}}class Ar extends r{constructor(){super("textPath")}}class Dr extends r{constructor(){super("title")}}class Pr extends r{constructor(){super("tspan")}}class Ir extends r{constructor(){super("use")}}class kr extends r{constructor(){super("view")}}class Br extends r{constructor(){super("feBlend")}}class Hr extends r{constructor(){super("feColorMatrix")}}class Fr extends r{constructor(){super("feComponentTransfer")}}class Gr extends r{constructor(){super("feComposite")}}class Ur extends r{constructor(){super("feConvolveMatrix")}}class Wr extends r{constructor(){super("feDiffuseLighting")}}class $r extends r{constructor(){super("feDisplacementMap")}}class qr extends r{constructor(){super("feDistantLight")}}class zr extends r{constructor(){super("feFlood")}}class Kr extends r{constructor(){super("feGaussianBlur")}}class jr extends r{constructor(){super("feImage")}}class Yr extends r{constructor(){super("feMerge")}}class Xr extends r{constructor(){super("feMergeNode")}}class Jr extends r{constructor(){super("feMorphology")}}class Qr extends r{constructor(){super("feOffset")}}class Zr extends r{constructor(){super("fePointLight")}}class ei extends r{constructor(){super("feSpecularLighting")}}class ti extends r{constructor(){super("feSpotLight")}}class ni extends r{constructor(){super("feTile")}}class ri extends r{constructor(){super("feTurbulence")}}class ii{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 oi{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 si{value=0}class ai{x=0;y=0}class li{x=0;y=0;width=0;height=0}class Ue{a=1;b=0;c=0;d=1;e=0;f=0}class ui{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 Ue;angle=0}class b extends f{document;happyDOM;console;navigator;customElements;HTMLElement=nr;localStorage;sessionStorage;fetch=globalThis.fetch.bind(globalThis);Request=globalThis.Request;Response=globalThis.Response;Headers=globalThis.Headers;FormData=Si;ClipboardItem=Ie;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=pe;MutationObserver=l;IntersectionObserver=Qn;ResizeObserver=Zn;XMLHttpRequest=g;WebSocket=kt;File=ft;FileReader=u;FileList=gt;HTMLCanvasElement=X;CanvasRenderingContext2D=ae;HTMLAnchorElement=Gt;HTMLAreaElement=Ut;HTMLAudioElement=Wt;HTMLBaseElement=$t;HTMLBodyElement=qt;HTMLBRElement=zt;HTMLButtonElement=Kt;HTMLDataElement=jt;HTMLDataListElement=Yt;HTMLDetailsElement=Xt;HTMLDialogElement=Jt;HTMLDivElement=Qt;HTMLDListElement=Zt;HTMLEmbedElement=en;HTMLFieldSetElement=tn;HTMLFormElement=nn;HTMLHeadElement=rn;HTMLHeadingElement=on;HTMLHRElement=sn;HTMLHtmlElement=an;HTMLIFrameElement=ln;HTMLImageElement=un;HTMLInputElement=cn;HTMLLabelElement=dn;HTMLLegendElement=hn;HTMLLIElement=mn;HTMLLinkElement=pn;HTMLMapElement=fn;HTMLMediaElement=gn;HTMLMenuElement=bn;HTMLMetaElement=yn;HTMLMeterElement=En;HTMLModElement=vn;HTMLObjectElement=wn;HTMLOListElement=_n;HTMLOptGroupElement=Sn;HTMLOptionElement=Tn;HTMLOutputElement=xn;HTMLParagraphElement=Nn;HTMLParamElement=Cn;HTMLPictureElement=Vn;HTMLPreElement=Mn;HTMLProgressElement=On;HTMLQuoteElement=Rn;HTMLScriptElement=Ln;HTMLSelectElement=An;HTMLSlotElement=Y;HTMLSourceElement=Dn;HTMLSpanElement=Pn;HTMLStyleElement=In;HTMLTableCaptionElement=kn;HTMLTableCellElement=Bn;HTMLTableColElement=Hn;HTMLTableElement=Fn;HTMLTableRowElement=Gn;HTMLTableSectionElement=Un;HTMLTextAreaElement=Wn;HTMLTimeElement=$n;HTMLTitleElement=qn;HTMLTrackElement=zn;HTMLUListElement=Kn;HTMLUnknownElement=jn;HTMLVideoElement=Yn;Image=Xn;Audio=Jn;Document=N;Element=e;HTMLTemplateElement=j;Node=d;NodeFilter=Ri;NodeIterator=ge;Range=m;Selection=be;Text=o;TreeWalker=fe;Comment=x;DocumentFragment=_;Event=n;SVGElement=r;SVGSVGElement=rr;SVGGraphicsElement=ir;SVGGeometryElement=or;SVGAnimationElement=sr;SVGCircleElement=ar;SVGClipPathElement=lr;SVGDefsElement=ur;SVGDescElement=cr;SVGEllipseElement=dr;SVGFilterElement=hr;SVGForeignObjectElement=mr;SVGGElement=pr;SVGImageElement=fr;SVGLineElement=gr;SVGLinearGradientElement=br;SVGMarkerElement=yr;SVGMaskElement=Er;SVGMetadataElement=vr;SVGPathElement=wr;SVGPatternElement=_r;SVGPolygonElement=Sr;SVGPolylineElement=Tr;SVGRadialGradientElement=xr;SVGRectElement=Nr;SVGScriptElement=Cr;SVGStopElement=Vr;SVGStyleElement=Mr;SVGSwitchElement=Or;SVGSymbolElement=Rr;SVGTextElement=Lr;SVGTextPathElement=Ar;SVGTitleElement=Dr;SVGTSpanElement=Pr;SVGUseElement=Ir;SVGViewElement=kr;SVGFEBlendElement=Br;SVGFEColorMatrixElement=Hr;SVGFEComponentTransferElement=Fr;SVGFECompositeElement=Gr;SVGFEConvolveMatrixElement=Ur;SVGFEDiffuseLightingElement=Wr;SVGFEDisplacementMapElement=$r;SVGFEDistantLightElement=qr;SVGFEFloodElement=zr;SVGFEGaussianBlurElement=Kr;SVGFEImageElement=jr;SVGFEMergeElement=Yr;SVGFEMergeNodeElement=Xr;SVGFEMorphologyElement=Jr;SVGFEOffsetElement=Qr;SVGFEPointLightElement=Zr;SVGFESpecularLightingElement=ei;SVGFESpotLightElement=ti;SVGFETileElement=ni;SVGFETurbulenceElement=ri;SVGAngle=ii;SVGLength=oi;SVGNumber=si;SVGPoint=ai;SVGRect=li;SVGMatrix=Ue;SVGTransform=ui;CSSStyleSheet=se;CSSStyleDeclaration=W;CSSRule=h;CSSStyleRule=z;CSSMediaRule=Ae;CSSKeyframesRule=at;CSSKeyframeRule=De;CSSFontFaceRule=lt;CSSSupportsRule=ut;CSSContainerRule=ct;CSSConditionRule=q;CSSGroupingRule=oe;CSSScopeRule=dt;CSS=ht;MediaList=ie;StylePropertyMap=mt;StylePropertyMapReadOnly=Pe;DOMRect=H;DOMRectReadOnly=Z;DOMPoint=we;DOMPointReadOnly=ee;DOMMatrix=$e;DOMMatrixReadOnly=_e;NodeList=qe;HTMLCollection=ze;NamedNodeMap=je;Attr=Ke;XMLSerializer=Ye;ValidityState=Xe;Screen=Se;MediaQueryList=Te;DocumentType=Je;HTMLDocument=N;XMLDocument=N;UIEvent=v;MouseEvent=M;KeyboardEvent=le;FocusEvent=ue;InputEvent=bt;WheelEvent=yt;PointerEvent=Et;TouchEvent=vt;Touch=At;AnimationEvent=wt;TransitionEvent=_t;ClipboardEvent=St;DragEvent=Tt;ErrorEvent=ce;HashChangeEvent=xt;PopStateEvent=Nt;ProgressEvent=Ct;MessageEvent=O;CloseEvent=Vt;StorageEvent=Mt;SubmitEvent=Ot;MediaQueryListEvent=Rt;CompositionEvent=Lt;performance=new rt;Notification=ot;DataTransfer=st;crypto=globalThis.crypto;BroadcastChannel=Dt;MessageChannel=Pt;MessagePort=de;EventSource=R;PerformanceObserver=It;indexedDB=Ti();IDBFactory=Fe;IDBDatabase=He;IDBObjectStore=ke;IDBTransaction=Be;IDBRequest=he;IDBOpenDBRequest=me;DOMParser=class{parseFromString(S,T){let C=new N;if(T==="text/html"||T==="application/xhtml+xml"){let D=p(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=p(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 pt,this.navigator.userAgent=this._settings.navigator.userAgent,this.customElements=new tr,this.localStorage=ye(),this.sessionStorage=ye(),this._timerManager=new er,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-k63rmfca.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 Se(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 Te(s,xe(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{rt,it,ot,qi,st,W,ie,h,oe,q,z,Ae,De,at,lt,ut,ct,dt,se,ht,Pe,mt,ae,Ie,Ei,vi,wi,_i,pt,ft,u,gt,v,M,le,ue,bt,yt,Et,vt,wt,_t,St,Tt,ce,xt,Nt,Ct,O,Vt,Mt,Ot,Rt,Lt,At,Dt,de,Pt,R,zi,Si,he,me,ke,Be,He,Fe,Ti,It,pe,g,kt,xi,L,A,K,Bt,Ge,Ni,Ci,Vi,Mi,Oi,Ri,fe,ge,m,be,Li,Ht,Ft,j,Gt,Ut,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,Y,Dn,Pn,In,kn,Bn,Hn,Fn,Gn,Un,Wn,$n,qn,zn,Kn,jn,Yn,Xn,Jn,X,N,Zi,Qn,Zn,Ai,ye,er,tr,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,Ue,ui,b};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{n,E}from"./chunk-ha2jjx02.js";import{L,b}from"./chunk-k8rqbg4p.js";function m(e,t){let[o,...s]=e.split(";").map((p)=>p.trim()),r=o.indexOf("="),i=r===-1?o:o.slice(0,r),l=r===-1?"":o.slice(r+1),c={key:i,value:l,originURL:t};for(let p of s){let[d,u=""]=p.split("=").map((a)=>a.trim());switch(d.toLowerCase()){case"domain":c.domain=u.replace(/^\./,"").toLowerCase();break;case"path":c.path=u;break;case"expires":{let a=new Date(u);if(!Number.isNaN(a.getTime()))c.expires=a;break}case"max-age":{let a=Number(u);if(Number.isFinite(a))c.expires=new Date(Date.now()+a*1000);break}case"httponly":c.httpOnly=!0;break;case"secure":c.secure=!0;break;case"samesite":{let a=u.toLowerCase();if(a==="strict"||a==="lax"||a==="none")c.sameSite=a.charAt(0).toUpperCase()+a.slice(1);break}}}return c}function k(e){return e.map((t)=>`${t.key}=${t.value??""}`).join("; ")}class ne{_container;constructor(e){this._container=e??new L}_getContainer(){return this._container}setCookie(e,t,o,s){let r=typeof o==="function"?o:s;try{let i=m(e,t);if(this._container.addCookies([i]),r)return r(null,i);return Promise.resolve(i)}catch(i){if(r)return r(i);return Promise.reject(i)}}getCookies(e,t,o){let s=typeof t==="object"&&t!==null?t:{},r=typeof t==="function"?t:o;try{let i=this._container.getCookies(e,s.http===!0);if(r)return r(null,i);return Promise.resolve(i)}catch(i){if(r)return r(i);return Promise.reject(i)}}getCookieString(e,t){try{let o=k(this._container.getCookies(e));if(t)return t(null,o);return Promise.resolve(o)}catch(o){if(t)return t(o);return Promise.reject(o)}}}import{Buffer as f}from"buffer";class nt{_strictSSL;_proxy;_userAgent;constructor(e={}){this._strictSSL=e.strictSSL??!0,this._proxy=e.proxy,this._userAgent=e.userAgent??"Mozilla/5.0 (VeryHappyDOM)"}get userAgent(){return this._userAgent}fetch(e,t={}){return globalThis.fetch(e,{headers:{"User-Agent":this._userAgent,...t.accept?{Accept:t.accept}:{},...t.referrer?{Referer:t.referrer}:{}}}).then((o)=>o.arrayBuffer()).then((o)=>f.from(o))}}var w=["log","info","warn","error","debug","dir","dirxml","trace","table","group","groupCollapsed","groupEnd","time","timeEnd","timeLog","count","countReset","assert","clear"];class re{_listeners=new Map;_sinks=[];on(e,t){let o=this._listeners.get(e);if(!o)o=new Set,this._listeners.set(e,o);return o.add(t),this}off(e,t){return this._listeners.get(e)?.delete(t),this}removeAllListeners(e){if(e)this._listeners.delete(e);else this._listeners.clear();return this}listeners(e){return Array.from(this._listeners.get(e)??[])}emit(e,...t){let o=this._listeners.get(e),s=!1;if(o&&o.size>0){s=!0;for(let r of o)try{r(...t)}catch{}}for(let r of this._sinks){if(e==="jsdomError"&&r.options.omitJSDOMErrors)continue;let i=r.target[e];if(typeof i==="function")i.apply(r.target,t)}return s}sendTo(e,t={}){return this._sinks.push({target:e,options:t}),this}_asConsole(){let e=this,t={};for(let o of w)t[o]=(...s)=>{e.emit(o,...s)};return t}}class U{window;virtualConsole;cookieJar;constructor(e="",t={}){let{url:o="about:blank",referrer:s,contentType:r="text/html",virtualConsole:i=new re,cookieJar:l=new ne,beforeParse:c,pretendToBeVisual:p=!1,runScripts:d}=t;this.virtualConsole=i,this.cookieJar=l;let u={url:o,console:i._asConsole()};this.window=new b(u);let C=this.window;if(C._cookieJar=l,s)this.window.document.referrer=s;if(r)this.window.document.contentType=r;if(this.window.addEventListener("error",(a)=>{let g=a?.error??a;this.virtualConsole.emit("jsdomError",g)}),d==="outside-only"||d==="dangerously"){let a=this.window;a.eval=globalThis.eval.bind(globalThis),a.Function=globalThis.Function}if(c?.(this.window),this.window.document.readyState="loading",e)this._parse(e,r);if(d==="dangerously")this._executeScripts();queueMicrotask(()=>{this.window.document.readyState="interactive",this.window.document.dispatchEvent(new n("DOMContentLoaded",{bubbles:!0,cancelable:!1})),this.window.document.readyState="complete",this.window.dispatchEvent(new n("load"))})}_executeScripts(){let t=this.window.document.querySelectorAll("script");for(let o of t){if(o.getAttribute("src"))continue;let r=o.getAttribute("type");if(r&&r!=="text/javascript"&&r!=="application/javascript"&&r!=="module")continue;let i=o.textContent??"";if(!i.trim())continue;try{Function("window","document",`with (window) { ${i} }`)(this.window,this.window.document)}catch(l){this.virtualConsole.emit("jsdomError",l)}}}serialize(){let e=this.window.document,t=e.documentElement;if(!t)return"";let o=e.doctype===null?"<!DOCTYPE html>":"",s=t.outerHTML??"";return`${o}${s}`}reconfigure(e){if(e.url!==void 0){let t=this.window;t.location=e.url}}nodeLocation(e){return null}toString(){return this.serialize()}static fragment(e=""){let o=new U().window.document.createElement("template");return o.innerHTML=e,o.content}static async fromURL(e,t={}){let o=await globalThis.fetch(e),s=await o.text(),r=o.headers.get("content-type")??t.contentType;return new U(s,{...t,url:e,contentType:r??void 0})}static async fromFile(e,t={}){let s=await Bun.file(e).text(),r=t.url??`file://${e.startsWith("/")?e:`${process.cwd()}/${e}`}`;return new U(s,{...t,url:r})}_parse(e,t){let o=this.window.document,r=new this.window.DOMParser().parseFromString(e,t);if(r.documentElement)o.documentElement=r.documentElement,o.childNodes=r.childNodes,o.head=r.head,o.body=r.body,E(o.documentElement,o);o.contentType=t}}export{ne,nt,re,U};
2
+ import{n,E}from"./chunk-acwj66tt.js";import{L,b}from"./chunk-0svp3sna.js";function m(e,t){let[o,...s]=e.split(";").map((p)=>p.trim()),r=o.indexOf("="),i=r===-1?o:o.slice(0,r),l=r===-1?"":o.slice(r+1),c={key:i,value:l,originURL:t};for(let p of s){let[d,u=""]=p.split("=").map((a)=>a.trim());switch(d.toLowerCase()){case"domain":c.domain=u.replace(/^\./,"").toLowerCase();break;case"path":c.path=u;break;case"expires":{let a=new Date(u);if(!Number.isNaN(a.getTime()))c.expires=a;break}case"max-age":{let a=Number(u);if(Number.isFinite(a))c.expires=new Date(Date.now()+a*1000);break}case"httponly":c.httpOnly=!0;break;case"secure":c.secure=!0;break;case"samesite":{let a=u.toLowerCase();if(a==="strict"||a==="lax"||a==="none")c.sameSite=a.charAt(0).toUpperCase()+a.slice(1);break}}}return c}function k(e){return e.map((t)=>`${t.key}=${t.value??""}`).join("; ")}class ne{_container;constructor(e){this._container=e??new L}_getContainer(){return this._container}setCookie(e,t,o,s){let r=typeof o==="function"?o:s;try{let i=m(e,t);if(this._container.addCookies([i]),r)return r(null,i);return Promise.resolve(i)}catch(i){if(r)return r(i);return Promise.reject(i)}}getCookies(e,t,o){let s=typeof t==="object"&&t!==null?t:{},r=typeof t==="function"?t:o;try{let i=this._container.getCookies(e,s.http===!0);if(r)return r(null,i);return Promise.resolve(i)}catch(i){if(r)return r(i);return Promise.reject(i)}}getCookieString(e,t){try{let o=k(this._container.getCookies(e));if(t)return t(null,o);return Promise.resolve(o)}catch(o){if(t)return t(o);return Promise.reject(o)}}}import{Buffer as f}from"buffer";class nt{_strictSSL;_proxy;_userAgent;constructor(e={}){this._strictSSL=e.strictSSL??!0,this._proxy=e.proxy,this._userAgent=e.userAgent??"Mozilla/5.0 (VeryHappyDOM)"}get userAgent(){return this._userAgent}fetch(e,t={}){return globalThis.fetch(e,{headers:{"User-Agent":this._userAgent,...t.accept?{Accept:t.accept}:{},...t.referrer?{Referer:t.referrer}:{}}}).then((o)=>o.arrayBuffer()).then((o)=>f.from(o))}}var w=["log","info","warn","error","debug","dir","dirxml","trace","table","group","groupCollapsed","groupEnd","time","timeEnd","timeLog","count","countReset","assert","clear"];class re{_listeners=new Map;_sinks=[];on(e,t){let o=this._listeners.get(e);if(!o)o=new Set,this._listeners.set(e,o);return o.add(t),this}off(e,t){return this._listeners.get(e)?.delete(t),this}removeAllListeners(e){if(e)this._listeners.delete(e);else this._listeners.clear();return this}listeners(e){return Array.from(this._listeners.get(e)??[])}emit(e,...t){let o=this._listeners.get(e),s=!1;if(o&&o.size>0){s=!0;for(let r of o)try{r(...t)}catch{}}for(let r of this._sinks){if(e==="jsdomError"&&r.options.omitJSDOMErrors)continue;let i=r.target[e];if(typeof i==="function")i.apply(r.target,t)}return s}sendTo(e,t={}){return this._sinks.push({target:e,options:t}),this}_asConsole(){let e=this,t={};for(let o of w)t[o]=(...s)=>{e.emit(o,...s)};return t}}class U{window;virtualConsole;cookieJar;constructor(e="",t={}){let{url:o="about:blank",referrer:s,contentType:r="text/html",virtualConsole:i=new re,cookieJar:l=new ne,beforeParse:c,pretendToBeVisual:p=!1,runScripts:d}=t;this.virtualConsole=i,this.cookieJar=l;let u={url:o,console:i._asConsole()};this.window=new b(u);let C=this.window;if(C._cookieJar=l,s)this.window.document.referrer=s;if(r)this.window.document.contentType=r;if(this.window.addEventListener("error",(a)=>{let g=a?.error??a;this.virtualConsole.emit("jsdomError",g)}),d==="outside-only"||d==="dangerously"){let a=this.window;a.eval=globalThis.eval.bind(globalThis),a.Function=globalThis.Function}if(c?.(this.window),this.window.document.readyState="loading",e)this._parse(e,r);if(d==="dangerously")this._executeScripts();queueMicrotask(()=>{this.window.document.readyState="interactive",this.window.document.dispatchEvent(new n("DOMContentLoaded",{bubbles:!0,cancelable:!1})),this.window.document.readyState="complete",this.window.dispatchEvent(new n("load"))})}_executeScripts(){let t=this.window.document.querySelectorAll("script");for(let o of t){if(o.getAttribute("src"))continue;let r=o.getAttribute("type");if(r&&r!=="text/javascript"&&r!=="application/javascript"&&r!=="module")continue;let i=o.textContent??"";if(!i.trim())continue;try{Function("window","document",`with (window) { ${i} }`)(this.window,this.window.document)}catch(l){this.virtualConsole.emit("jsdomError",l)}}}serialize(){let e=this.window.document,t=e.documentElement;if(!t)return"";let o=e.doctype===null?"<!DOCTYPE html>":"",s=t.outerHTML??"";return`${o}${s}`}reconfigure(e){if(e.url!==void 0){let t=this.window;t.location=e.url}}nodeLocation(e){return null}toString(){return this.serialize()}static fragment(e=""){let o=new U().window.document.createElement("template");return o.innerHTML=e,o.content}static async fromURL(e,t={}){let o=await globalThis.fetch(e),s=await o.text(),r=o.headers.get("content-type")??t.contentType;return new U(s,{...t,url:e,contentType:r??void 0})}static async fromFile(e,t={}){let s=await Bun.file(e).text(),r=t.url??`file://${e.startsWith("/")?e:`${process.cwd()}/${e}`}`;return new U(s,{...t,url:r})}_parse(e,t){let o=this.window.document,r=new this.window.DOMParser().parseFromString(e,t);if(r.documentElement)o.documentElement=r.documentElement,o.childNodes=r.childNodes,o.head=r.head,o.body=r.body,E(o.documentElement,o);o.contentType=t}}export{ne,nt,re,U};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{e}from"./chunk-jfqdhrwq.js";class r extends e{constructor(t){super(t);this.tagName=t,this.nodeName=t,this.namespaceURI="http://www.w3.org/2000/svg"}}
2
+ import{e}from"./chunk-ekpt3ds6.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 Gi(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if(Ui(e))return!1;return!0}function Ui(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 Qe(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if(e.getAttribute?.("aria-hidden")==="true")return!1;return Gi(t)}
3
- export{Gi,Ui,Qe};
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 Gi(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if(Ui(e))return!1;return!0}function Ui(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 Ze(t){for(let e=t;e&&e.nodeType===1;e=e.parentNode)if(e.getAttribute?.("aria-hidden")==="true")return!1;return Gi(t)}
3
+ export{Gi,Ui,Ze};