@ctrl/dom 0.1.12 → 0.1.13

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.
@@ -1,19 +1,19 @@
1
- import{AsyncResource as e}from"node:async_hooks";import{clearTimeout as t,setTimeout as n}from"node:timers";import{availableParallelism as r}from"node:os";var i=Object.defineProperty,__name=(e,t)=>i(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n};const a=1,o=2,s=3,c=4,l=5,u=6,d=7,m=8,h=9,_=10,v=11,ee=12,y=1,te=2,ne=4,re=8,b=16,x=32,ie=`http://www.w3.org/1999/xhtml`,ae=`http://www.w3.org/2000/svg`,oe=`http://www.w3.org/1998/Math/MathML`,se=`http://www.w3.org/1999/xlink`,S=`http://www.w3.org/XML/1998/namespace`,ce=`http://www.w3.org/2000/xmlns/`,le=1,ue=2,de=4,fe=8,pe=16,me=32,he=64,ge=128,_e=256,ve=512,ye=1024,be=2048,xe=4096,Se=16384,Ce=32768,we=65536,Te=8192,Ee=1<<17,De=1<<18;function exposeMembers(...e){for(let t of e){let e=t.prototype;for(let t of Object.getOwnPropertyNames(e)){if(t===`constructor`||t.charCodeAt(0)===95)continue;let n=Object.getOwnPropertyDescriptor(e,t);!n.enumerable&&n.configurable&&Object.defineProperty(e,t,{enumerable:!0})}}}function hideInternals(e){for(let t of Reflect.ownKeys(e))(typeof t==`symbol`||t.charCodeAt(0)===95)&&Object.defineProperty(e,t,{enumerable:!1})}function argumentsRequired(e,t,n,r){throw TypeError(`Failed to execute '${e}' on '${t}': ${n} argument${n===1?``:`s`} required, but only ${r} present.`)}const Oe=globalThis.setTimeout,ke=globalThis.clearTimeout,Ae=globalThis.setImmediate,je=globalThis.performance,Me=je.now.bind(je),Ne=process.getActiveResourcesInfo.bind(process),Pe=Symbol(`ctrl-dom.clock`);var TimerRecord=class{id;due;seq;delay;repeat;callback;args;ref;index;handle;real;realDue;cleared;context;constructor(t,n,r,i,a,o,s){this.id=t,this.due=n,this.seq=r,this.delay=i,this.repeat=a,this.callback=o,this.args=s,this.ref=!0,this.index=-1,this.handle=null,this.real=null,this.realDue=0,this.cleared=!1,this.context=new e(`Timeout`)}},VirtualTimeout=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}ref(){return this.#e._setRef(this.#t,!0),this}unref(){return this.#e._setRef(this.#t,!1),this}hasRef(){return this.#t.ref}get _destroyed(){return!this.#e.byId.has(this.#t.id)}refresh(){return this.#e._refresh(this.#t),this}close(){return this.#e.clear(this.#t.id),this}[Symbol.toPrimitive](){return this.#t.id}[Symbol.dispose](){this.#e.clear(this.#t.id)}};function before(e,t){return e.due<t.due||e.due===t.due&&e.seq<t.seq}var VirtualClock=class{skipped;epochOffset;skip;heap;byId;nextId;seq;refCount;hostTimer;hostDue;hostRefd;continuation;driverScheduled;driverImmediate;idleTurns;disposed;ioTypes;ioBaseline;ioCounts;constructor(e={}){this.skipped=0,this.epochOffset=Date.now()-Me(),this.skip=e.skip===!0,this.heap=[],this.byId=/* @__PURE__ */ new Map,this.nextId=1,this.seq=0,this.refCount=0,this.hostTimer=null,this.hostDue=1/0,this.hostRefd=!0,this.continuation=!1,this.driverScheduled=!1,this.driverImmediate=!1,this.idleTurns=0,this.disposed=!1,this.ioTypes=[],this.ioBaseline=[],this.skip&&(typeof process==`object`&&(process.stdin,process.stdout,process.stderr),countIO(this.ioTypes,this.ioBaseline)),this.ioCounts=Array(this.ioTypes.length).fill(0)}now(){return Me()+this.skipped}epochNow(){return Math.floor(this.epochOffset+Me()+this.skipped)}schedule(e,t,n,r){let i=Number(t)|0;i<1&&(i=1);let a=new TimerRecord(this.nextId++,this.now()+i,this.seq++,i,r,e,n),o=new VirtualTimeout(this,a);return a.handle=o,this.disposed||(this.byId.set(a.id,a),this.refCount++,this.push(a),this.armHost(),this.kickDriver()),o}clear(e){let t=typeof e==`number`?e:e instanceof VirtualTimeout?Number(e):NaN,n=this.byId.get(t);return n!==void 0&&(this.byId.delete(t),n.cleared=!0,n.ref&&this.refCount--,n.real!==null&&(ke(n.real),n.real=null),n.index!==-1&&(this.remove(n),this.armHost()),!0)}skipIdle(e){let t=this.heap[0];return t!==void 0&&t.due<=this.now()+e?!1:(this.skipped+=e,!0)}get size(){return this.byId.size}_setRef(e,t){if(e.ref===t)return;e.ref=t;let n=this.byId.has(e.id);n&&(this.refCount+=t?1:-1),n&&this.skip&&(!t&&e.index!==-1?this.toRealTrack(e,Math.max(0,e.due-this.now())):t&&e.real!==null&&this.toVirtualTrack(e)),this.updateHostRef()}toRealTrack(e,t){e.index!==-1&&(this.remove(e),this.armHost()),e.realDue=Me()+t;let n=Oe(()=>this.fireReal(e),t);n.unref?.(),e.real=n}toVirtualTrack(e){ke(e.real),e.real=null,e.due=this.now()+Math.max(0,e.realDue-Me()),e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}fireReal(e){e.real=null,!this.disposed&&this.byId.has(e.id)&&(e.repeat?this.toRealTrack(e,e.delay):this.byId.delete(e.id),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args))}_refresh(e){if(!(e.cleared||this.disposed)){if(e.real!==null)ke(e.real),e.real=null,this.toRealTrack(e,e.delay);else{if(this.byId.has(e.id))e.index!==-1&&this.remove(e);else if(this.byId.set(e.id,e),e.ref)this.refCount++;else if(this.skip){this.toRealTrack(e,e.delay);return}e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}}}dispose(){this.disposed=!0;for(let e of this.byId.values())e.real!==null&&ke(e.real),e.real=null,e.cleared=!0;this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.heap.length=0,this.byId.clear(),this.refCount=0,C===this&&(C=null)}armHost(){if(this.disposed||this.continuation)return;let e=this.heap[0];e===void 0?(this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.hostDue=1/0):(this.hostTimer!==null&&this.hostDue===e.due||(this.hostTimer!==null&&ke(this.hostTimer),this.hostDue=e.due,this.hostTimer=Oe(this.onHostTimer,Math.max(0,e.due-this.now())),this.hostRefd=!0),this.updateHostRef())}updateHostRef(){let e=this.hostTimer,t=this.refCount>0;e!==null&&t!==this.hostRefd&&(this.hostRefd=t,t?e.ref?.():e.unref?.())}fireContinuation=()=>{this.fireNext()};onHostTimer=()=>{this.hostTimer=null,this.hostDue=1/0,this.fireNext()};fireNext(){if(this.continuation=!1,this.disposed)return;let e=this.heap[0];if(e===void 0||e.due>this.now()+1){this.armHost();return}this.skip&&e.due>this.now()&&(this.skipped+=e.due-this.now()),this.pop(),e.repeat?(e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e)):(this.byId.delete(e.id),e.ref&&this.refCount--);let t=this.heap[0];t!==void 0&&t.due<=this.now()+ +!!this.skip?(this.continuation=!0,Ae(this.fireContinuation)):this.armHost(),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args)}kickDriver(){!this.skip||this.driverScheduled||this.disposed||(this.driverScheduled=!0,this.driverImmediate=!0,Ae(this.driverTurn))}get ownImmediates(){return+!!this.driverImmediate+ +!!this.continuation}driverTurn=()=>{if(this.driverScheduled=!1,this.driverImmediate=!1,this.disposed||this.heap.length===0){this.idleTurns=0;return}let e=this.busy();if(e!==null){this.idleTurns=0,e===`immediate`?this.kickDriver():(this.driverScheduled=!0,Oe(()=>{this.driverScheduled=!1,this.kickDriver()},1));return}if(++this.idleTurns<2){this.kickDriver();return}this.idleTurns=0;let t=this.heap[0].due-this.now();t>0&&(this.skipped+=t),this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.hostDue=1/0;try{this.fireNext()}finally{this.kickDriver()}};busy(e=0){let t=Ne(),n=this.ioTypes,r=this.ioBaseline,i=this.ioCounts;for(let e=0;e<i.length;e++)i[e]=0;let a=!1,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(c===`Immediate`){if(++o>e)return`immediate`;continue}if(a||c===`Timeout`)continue;let l=0;for(;l<n.length&&n[l]!==c;)l++;(l===n.length||++i[l]>r[l])&&(a=!0)}return a?`io`:null}push(e){let t=this.heap;e.index=t.length,t.push(e),this.up(e.index)}pop(){let e=this.heap,t=e[0],n=e.pop();return t.index=-1,n!==t&&(e[0]=n,n.index=0,this.down(0)),t}remove(e){let t=this.heap,n=e.index,r=t.pop();e.index=-1,r!==e&&(t[n]=r,r.index=n,this.down(n),this.up(r.index))}up(e){let t=this.heap,n=t[e];for(;e>0;){let r=e-1>>1;if(!before(n,t[r]))break;t[e]=t[r],t[e].index=e,e=r}t[e]=n,n.index=e}down(e){let t=this.heap,n=t.length,r=t[e];for(;;){let i=2*e+1;if(i>=n)break;let a=i+1,o=a<n&&before(t[a],t[i])?a:i;if(!before(t[o],r))break;t[e]=t[o],t[e].index=e,e=o}t[e]=r,r.index=e}};function countIO(e,t){for(let n of Ne()){if(n===`Timeout`||n===`Immediate`)continue;let r=e.indexOf(n);r===-1?(e.push(n),t.push(1)):t[r]++}}let C=null;function clockNow(){return C===null?Me():C.now()}function queueUserAgentTask(e){C===null?n(e,0):C.schedule(e,0,[],!1)}const Fe={setTimeout(e,t){return C===null?n(e,t):C.schedule(e,t,[],!1)},clearTimeout(e){C!==null&&C.clear(e)||t(e)}};function clockSkipping(){return C!==null}function skipIdleTime(e){return C===null||C.skipIdle(e)}function canSkipZeroDelayWait(e){let t=C;if(t===null||!isClockTimer(e.setTimeout))return!1;let n=e.setImmediate;if(typeof n!=`function`||n.clock!==void 0||n._isMockFunction===!0||t.busy(t.ownImmediates)!==null)return!1;let r=t.heap[0];return r===void 0||r.due>t.now()+1}function skipZeroDelayWait(e){return canSkipZeroDelayWait(e)&&C.skipIdle(1)}function isClockTimer(e){return C!==null&&typeof e==`function`&&e[Pe]===C}function foreignImmediatesPending(){let e=Ne(),t=0;for(let n=0;n<e.length;n++)e[n]===`Immediate`&&t++;return t>(C===null?0:C.ownImmediates)}function clockSkipped(){return C===null?0:C.skipped}function clockStats(){return C===null?null:{skippedMs:C.skipped,pendingTimers:C.size}}function virtualDate(e,t){function Date(...n){if(new.target===void 0)return new t(e.epochNow()).toString();let r=n.length===0?new t(e.epochNow()):Reflect.construct(t,n,t);return new.target!==Date&&Object.setPrototypeOf(r,new.target.prototype),r}return Object.defineProperties(Date,{length:{value:7},prototype:{value:t.prototype,writable:!1},now:{value:()=>e.epochNow(),writable:!0,configurable:!0},parse:{value:t.parse,writable:!0,configurable:!0},UTC:{value:t.UTC,writable:!0,configurable:!0}}),Date}function virtualPerformance(e,t){let n=Object.create(Object.getPrototypeOf(t));for(let e=t;e!==null&&e!==Object.prototype;e=Object.getPrototypeOf(e))for(let r of Reflect.ownKeys(e)){if(r===`constructor`||r in n&&Object.hasOwn(n,r))continue;let i=Object.getOwnPropertyDescriptor(e,r);typeof i.value==`function`?Object.defineProperty(n,r,{value:i.value.bind(t),writable:!0,configurable:!0,enumerable:i.enumerable}):i.get!==void 0&&Object.defineProperty(n,r,{get:()=>Reflect.get(t,r),configurable:!0,enumerable:i.enumerable})}Object.defineProperty(n,"now",{value:()=>e.now(),writable:!0,configurable:!0,enumerable:!0});let r=t.mark.bind(t),i=t.measure.bind(t);return Object.defineProperty(n,"mark",{value:(t,n)=>r(t,n?.startTime===void 0?{...n,startTime:e.now()}:n),writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(n,"measure",{value:(t,n,r)=>{if(typeof n==`object`&&n){let r=n.end===void 0&&n.duration===void 0;return i(t,r?{...n,end:e.now()}:n)}return r===void 0?i(t,n===void 0?{end:e.now()}:{start:n,end:e.now()}):i(t,n,r)},writable:!0,configurable:!0,enumerable:!0}),n}function installClock(e,t){let n=/* @__PURE__ */ new Map,define=(e,r)=>{n.set(e,Object.getOwnPropertyDescriptor(t,e)),Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})},r=globalThis.clearInterval,i={setTimeout(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!1)},setInterval(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!0)},clearTimeout(t){t!=null&&(e.clear(t)||ke(t))},clearInterval(t){t!=null&&(e.clear(t)||r(t))}};Object.defineProperty(i.setTimeout,Symbol.for(`nodejs.util.promisify.custom`),{value:(t,n)=>new Promise(r=>e.schedule(r,t,[n],!1))}),Object.defineProperty(i.setTimeout,Pe,{value:e}),Object.defineProperty(i.setInterval,Pe,{value:e});for(let e of[`setTimeout`,`setInterval`,`clearTimeout`,`clearInterval`])define(e,i[e]);return e.skip&&(define(`Date`,virtualDate(e,typeof t.Date==`function`?t.Date:Date)),define(`performance`,virtualPerformance(e,t.performance??je)),C=e),{clock:e,uninstall(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),C===e&&(C=null),e.dispose()}}}function toDOMString(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}function toDouble(e,t){let n=typeof e==`number`?e:Number(e);if(!Number.isFinite(n))throw TypeError(`${t} is not a finite floating-point value.`);return n}function toFloat(e,t){let n=toDouble(e,t),r=Math.fround(n);if(!Number.isFinite(r))throw TypeError(`${t} is outside the range of a float.`);return r}function integerPart(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0}function toLong(e){return typeof e==`number`&&(e|0)===e?e:integerPart(e)|0}function toUnsignedLong$1(e){return typeof e==`number`&&e>>>0===e?e:integerPart(e)>>>0}__name(toUnsignedLong$1,`toUnsignedLong`);function toShort(e){return integerPart(e)<<16>>16}function toUnsignedShort(e){return integerPart(e)&65535}const Ie=Symbol.for(`ctrl-dom._proto__`),Le=Symbol.for(`ctrl-dom.aboutBase`),Re=Symbol.for(`ctrl-dom.active`),ze=Symbol.for(`ctrl-dom.assocGen`),Be=Symbol.for(`ctrl-dom.attr`),Ve=Symbol.for(`ctrl-dom.attributes`),He=Symbol.for(`ctrl-dom.availableToElementInternals`),Ue=Symbol.for(`ctrl-dom.badInput`),We=Symbol.for(`ctrl-dom.baseFor`),Ge=Symbol.for(`ctrl-dom.baseOverride`),Ke=Symbol.for(`ctrl-dom.baseURL`),qe=Symbol.for(`ctrl-dom.baseVersion`),w=Symbol.for(`ctrl-dom.block`),Je=Symbol.for(`ctrl-dom.byCtor`),Ye=Symbol.for(`ctrl-dom.byName`),Xe=Symbol.for(`ctrl-dom.cache`),Ze=Symbol.for(`ctrl-dom.callback`),Qe=Symbol.for(`ctrl-dom.checked`),$e=Symbol.for(`ctrl-dom.checkedSet`),et=Symbol.for(`ctrl-dom.childNodes`),tt=Symbol.for(`ctrl-dom.childWindows`),nt=Symbol.for(`ctrl-dom.children`),rt=Symbol.for(`ctrl-dom.classList`),it=Symbol.for(`ctrl-dom.clipboard`),at=Symbol.for(`ctrl-dom.clonable`),ot=Symbol.for(`ctrl-dom.closed`),st=Symbol.for(`ctrl-dom.compiled`),ct=Symbol.for(`ctrl-dom.compiledFor`),lt=Symbol.for(`ctrl-dom.condition`),ut=Symbol.for(`ctrl-dom.constructed`),dt=Symbol.for(`ctrl-dom.constructingEntryList`),ft=Symbol.for(`ctrl-dom.contentType`),pt=Symbol.for(`ctrl-dom.controlsCache`),mt=Symbol.for(`ctrl-dom.controlsDoc`),ht=Symbol.for(`ctrl-dom.coll`),gt=Symbol.for(`ctrl-dom.controlsVersion`),_t=Symbol.for(`ctrl-dom.cookieJar`),vt=Symbol.for(`ctrl-dom.cookies`),yt=Symbol.for(`ctrl-dom.css`),bt=Symbol.for(`ctrl-dom.current`),xt=Symbol.for(`ctrl-dom.customElements`),T=Symbol.for(`ctrl-dom.customValidity`),St=Symbol.for(`ctrl-dom.cx`),Ct=Symbol.for(`ctrl-dom.data`),wt=Symbol.for(`ctrl-dom.dataset`),Tt=Symbol.for(`ctrl-dom.declarative`),Et=Symbol.for(`ctrl-dom.defaultNamespace`),Dt=Symbol.for(`ctrl-dom.defaultValueOverride`),Ot=Symbol.for(`ctrl-dom.delegatesFocus`),kt=Symbol.for(`ctrl-dom.devicePixelRatio`),At=Symbol.for(`ctrl-dom.dirtiness`),jt=Symbol.for(`ctrl-dom.dirtyChecked`),E=Symbol.for(`ctrl-dom.dirtyValue`),Mt=Symbol.for(`ctrl-dom.disabled`),Nt=Symbol.for(`ctrl-dom.disallowModification`),Pt=Symbol.for(`ctrl-dom.derived`),Ft=Symbol.for(`ctrl-dom.doc`),It=Symbol.for(`ctrl-dom.dropEffect`),D=Symbol.for(`ctrl-dom.ec`),Lt=Symbol.for(`ctrl-dom.effectAllowed`),O=Symbol.for(`ctrl-dom.el`),Rt=Symbol.for(`ctrl-dom.elements`),zt=Symbol.for(`ctrl-dom.entries`),k=Symbol.for(`ctrl-dom.eo`),Bt=Symbol.for(`ctrl-dom.error`),Vt=Symbol.for(`ctrl-dom.file`),Ht=Symbol.for(`ctrl-dom.files`),Ut=Symbol.for(`ctrl-dom.fill`),Wt=Symbol.for(`ctrl-dom.filter`),Gt=Symbol.for(`ctrl-dom.firingSubmissionEvents`),A=Symbol.for(`ctrl-dom.focused`),Kt=Symbol.for(`ctrl-dom.form`),qt=Symbol.for(`ctrl-dom.forms`),Jt=Symbol.for(`ctrl-dom.frameCallbacks`),Yt=Symbol.for(`ctrl-dom.frameElement`),Xt=Symbol.for(`ctrl-dom.frameId`),Zt=Symbol.for(`ctrl-dom.frameTask`),Qt=Symbol.for(`ctrl-dom.frameTime`),$t=Symbol.for(`ctrl-dom.generation`),en=Symbol.for(`ctrl-dom.globalObject`),tn=Symbol.for(`ctrl-dom.hasTransients`),nn=Symbol.for(`ctrl-dom.height`),rn=Symbol.for(`ctrl-dom.history`),an=Symbol.for(`ctrl-dom.home`),j=Symbol.for(`ctrl-dom.host`),sn=Symbol.for(`ctrl-dom.href`),cn=Symbol.for(`ctrl-dom.id`),ln=Symbol.for(`ctrl-dom.idleCallbacks`),un=Symbol.for(`ctrl-dom.idleId`),dn=Symbol.for(`ctrl-dom.ids`),M=Symbol.for(`ctrl-dom.impl`),fn=Symbol.for(`ctrl-dom.implementation`),pn=Symbol.for(`ctrl-dom.indeterminate`),mn=Symbol.for(`ctrl-dom.index`),hn=Symbol.for(`ctrl-dom.indexed`),gn=Symbol.for(`ctrl-dom.inflight`),_n=Symbol.for(`ctrl-dom.info`),vn=Symbol.for(`ctrl-dom.innerHeight`),yn=Symbol.for(`ctrl-dom.innerWidth`),bn=Symbol.for(`ctrl-dom.is2D`),N=Symbol.for(`ctrl-dom.isHTML`),P=Symbol.for(`ctrl-dom.items`),xn=Symbol.for(`ctrl-dom.keyText`),Sn=Symbol.for(`ctrl-dom.kind`),F=Symbol.for(`ctrl-dom.labels`),Cn=Symbol.for(`ctrl-dom.layerName`),wn=Symbol.for(`ctrl-dom.list`),Tn=Symbol.for(`ctrl-dom.listeners`),En=Symbol.for(`ctrl-dom.localStorage`),Dn=Symbol.for(`ctrl-dom.location`),On=Symbol.for(`ctrl-dom.lockedForReset`),I=Symbol.for(`ctrl-dom.m`),kn=Symbol.for(`ctrl-dom.matches`),L=Symbol.for(`ctrl-dom.media`),An=Symbol.for(`ctrl-dom.mediaQueryLists`),jn=Symbol.for(`ctrl-dom.mode`),R=Symbol.for(`ctrl-dom.name`),Mn=Symbol.for(`ctrl-dom.names`),Nn=Symbol.for(`ctrl-dom.namespaces`),Pn=Symbol.for(`ctrl-dom.navigator`),Fn=Symbol.for(`ctrl-dom.nodes`),In=Symbol.for(`ctrl-dom.onchange`),z=Symbol.for(`ctrl-dom.options`),B=Symbol.for(`ctrl-dom.owner`),Ln=Symbol.for(`ctrl-dom.ownerNode`),Rn=Symbol.for(`ctrl-dom.ownerRule`),V=Symbol.for(`ctrl-dom.parent`),zn=Symbol.for(`ctrl-dom.parentRule`),Bn=Symbol.for(`ctrl-dom.parentWindow`),Vn=Symbol.for(`ctrl-dom.pastNames`),Hn=Symbol.for(`ctrl-dom.pointerBeforeReference`),Un=Symbol.for(`ctrl-dom.preApplied`),Wn=Symbol.for(`ctrl-dom.preChecked`),Gn=Symbol.for(`ctrl-dom.preCheckedRadio`),Kn=Symbol.for(`ctrl-dom.preIndeterminate`),qn=Symbol.for(`ctrl-dom.prefix`),Jn=Symbol.for(`ctrl-dom.prelude`),Yn=Symbol.for(`ctrl-dom.presentationStyle`),Xn=Symbol.for(`ctrl-dom.pseudo`),Zn=Symbol.for(`ctrl-dom.queries`),Qn=Symbol.for(`ctrl-dom.ranges`),$n=Symbol.for(`ctrl-dom.rawValue`),er=Symbol.for(`ctrl-dom.readonly`),tr=Symbol.for(`ctrl-dom.readyState`),nr=Symbol.for(`ctrl-dom.rebuildVersion`),rr=Symbol.for(`ctrl-dom.record`),ir=Symbol.for(`ctrl-dom.records`),ar=Symbol.for(`ctrl-dom.rects`),or=Symbol.for(`ctrl-dom.reference`),sr=Symbol.for(`ctrl-dom.result`),cr=Symbol.for(`ctrl-dom.root`),H=Symbol.for(`ctrl-dom.rules`),lr=Symbol.for(`ctrl-dom.running`),ur=Symbol.for(`ctrl-dom.runningFrame`),U=Symbol.for(`ctrl-dom.sc`),dr=Symbol.for(`ctrl-dom.screen`),fr=Symbol.for(`ctrl-dom.scrollRestoration`),pr=Symbol.for(`ctrl-dom.scrollX`),mr=Symbol.for(`ctrl-dom.scrollY`),hr=Symbol.for(`ctrl-dom.selDir`),gr=Symbol.for(`ctrl-dom.selEnd`),_r=Symbol.for(`ctrl-dom.selSet`),vr=Symbol.for(`ctrl-dom.selStart`),yr=Symbol.for(`ctrl-dom.selectedOptions`),br=Symbol.for(`ctrl-dom.selectedness`),xr=Symbol.for(`ctrl-dom.selection`),Sr=Symbol.for(`ctrl-dom.selector`),Cr=Symbol.for(`ctrl-dom.serializable`),wr=Symbol.for(`ctrl-dom.sessionStorage`),Tr=Symbol.for(`ctrl-dom.settled`),W=Symbol.for(`ctrl-dom.shadowRoot`),Er=Symbol.for(`ctrl-dom.shed`),Dr=Symbol.for(`ctrl-dom.sheet`),Or=Symbol.for(`ctrl-dom.sheets`),kr=Symbol.for(`ctrl-dom.slotAssignment`),G=Symbol.for(`ctrl-dom.so`),Ar=Symbol.for(`ctrl-dom.states`),jr=Symbol.for(`ctrl-dom.style`),Mr=Symbol.for(`ctrl-dom.styleVersion`),Nr=Symbol.for(`ctrl-dom.supportsText`),Pr=Symbol.for(`ctrl-dom.systemId`),Fr=Symbol.for(`ctrl-dom.target`),Ir=Symbol.for(`ctrl-dom.targets`),Lr=Symbol.for(`ctrl-dom.tasks`),Rr=Symbol.for(`ctrl-dom.timers`),zr=Symbol.for(`ctrl-dom.title`),Br=Symbol.for(`ctrl-dom.type`),Vr=Symbol.for(`ctrl-dom.types`),Hr=Symbol.for(`ctrl-dom.uiValue`),Ur=Symbol.for(`ctrl-dom.updating`),Wr=Symbol.for(`ctrl-dom.updatingSelectedContent`),Gr=Symbol.for(`ctrl-dom.uri`),K=Symbol.for(`ctrl-dom.url`),Kr=Symbol.for(`ctrl-dom.userActivation`),qr=Symbol.for(`ctrl-dom.userEdited`),Jr=Symbol.for(`ctrl-dom.userValidity`),Yr=Symbol.for(`ctrl-dom.validity`),Xr=Symbol.for(`ctrl-dom.value`),q=Symbol.for(`ctrl-dom.version`),Zr=Symbol.for(`ctrl-dom.visualViewport`),Qr=Symbol.for(`ctrl-dom.w`),$r=Symbol.for(`ctrl-dom.whatToShow`),ei=Symbol.for(`ctrl-dom.whenDefined`),ti=Symbol.for(`ctrl-dom.width`),J=Symbol.for(`ctrl-dom.window`),ni=Symbol.for(`ctrl-dom.writeBuffer`),ri=Symbol.for(`ctrl-dom.x`),ii=Symbol.for(`ctrl-dom.xhr`),ai=Symbol.for(`ctrl-dom.y`),oi=Symbol.for(`ctrl-dom.z`);var EventState=class{flags;type;target;relatedTarget;currentTarget;eventPhase;pathStart;pathLength;touchTargets;timeStamp;constructor(e,t){this.flags=t,this.type=e,this.target=null,this.relatedTarget=null,this.currentTarget=null,this.eventPhase=0,this.pathStart=-1,this.pathLength=0,this.touchTargets=null,this.timeStamp=clockNow()}};function exposedPathItem(e){let t=Y[e];return Y[e+4]&16?exposedWindow(t):t}function exposedWindow(e){return e[en]??e}const Y=[],si={top:0};let ci=!1;function withInternalConstruct(e){let t=ci;ci=!0;try{return e()}finally{ci=t}}function isInternalConstruct(){return ci}const li={get:function isTrusted(){return!!(this._s.flags&128)},enumerable:!0,configurable:!1};var Event=class{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;#e;get _s(){return this.#e}constructor(e,t){if(arguments.length===0)throw TypeError(`Failed to construct '${new.target.name}': 1 argument required, but only 0 present.`);let n=toDOMString(e),r=32;if(t!=null){if(typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Failed to construct '${new.target.name}': The provided value is not of type '${new.target.name}Init'.`);t.bubbles&&(r|=256),t.cancelable&&(r|=512),t.composed&&(r|=16)}this.#e=new EventState(n,r),Object.defineProperty(this,"isTrusted",li)}get type(){return this._s.type}get target(){return this._s.target}get srcElement(){return this._s.target}get currentTarget(){return this._s.currentTarget}get eventPhase(){return this._s.eventPhase}get bubbles(){return!!(this._s.flags&256)}get cancelable(){return!!(this._s.flags&512)}get composed(){return!!(this._s.flags&16)}get timeStamp(){return this._s.timeStamp}get defaultPrevented(){return!!(this._s.flags&4)}get returnValue(){return!(this._s.flags&4)}set returnValue(e){e||setCanceledFlag(this._s)}get cancelBubble(){return!!(this._s.flags&1)}set cancelBubble(e){e&&(this._s.flags|=1)}stopPropagation(){this._s.flags|=1}stopImmediatePropagation(){this._s.flags|=3}preventDefault(){setCanceledFlag(this._s)}composedPath(){let e=this._s,t=[],n=e.pathLength;if(n===0||e.pathStart<0)return t;let r=e.pathStart,i=e.currentTarget;if(i===null)return t;let a=0,o=0;for(let e=n-1;e>=0;e--){let t=r+e*5,n=Y[t+4];if(n&2&&o++,exposedPathItem(t)===i){a=e;break}n&4&&o--}let s=o,c=o,l=[];for(let e=a-1;e>=0;e--){let t=r+e*5,n=Y[t+4];n&2&&s++,s<=c&&l.push(exposedPathItem(t)),n&4&&(s--,s<c&&(c=s))}for(let e=l.length-1;e>=0;e--)t.push(l[e]);t.push(i),s=o,c=o;for(let e=a+1;e<n;e++){let n=r+e*5,i=Y[n+4];i&4&&s++,s<=c&&t.push(exposedPathItem(n)),i&2&&(s--,s<c&&(c=s))}return t}initEvent(e,t=!1,n=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initEvent' on 'Event': 1 argument required, but only 0 present.`);let r=this._s;r.flags&64||initializeEvent(r,toDOMString(e),!!t,!!n)}};Object.defineProperties(Event.prototype,{NONE:{value:0,enumerable:!0},CAPTURING_PHASE:{value:1,enumerable:!0},AT_TARGET:{value:2,enumerable:!0},BUBBLING_PHASE:{value:3,enumerable:!0},[Symbol.toStringTag]:{value:`Event`,configurable:!0}});function setCanceledFlag(e){(e.flags&520)==512&&(e.flags|=4)}function initializeEvent(e,t,n,r){let i=(e.flags|32)&-904;n&&(i|=256),r&&(i|=512),e.flags=i,e.target=null,e.type=t}function setTrusted(e,t=!0){t?e._s.flags|=128:e._s.flags&=-129}function setToStringTag(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),t!==void 0&&Object.defineProperty(e,"length",{value:t,configurable:!0})}setToStringTag(Event,1),exposeMembers(Event);var Listener=class{callback;capture;once;passive;removed;signal;onAbort;constructor(e,t,n,r,i){this.callback=e,this.capture=t,this.once=n,this.passive=r,this.removed=!1,this.signal=i,this.onAbort=null}};const ui=[];var ListenerList=class{items;iterating;constructor(){this.items=ui,this.iterating=0}};function appendListener(e,t){let n=e.items,r=n.length;if(r>=8&&e.iterating===0){n.push(t);return}let i=Array(r+1);for(let e=0;e<r;e++)i[e]=n[e];i[r]=t,e.items=i}const di={capture:!1,once:!1,passive:null,signal:null};function flattenCapture(e){return typeof e==`boolean`?e:e==null?!1:typeof e!=`object`&&typeof e!=`function`?!!e:!!e.capture}function flattenMore(e){if(di.capture=!1,di.once=!1,di.passive=null,di.signal=null,e==null)return di;if(typeof e!=`object`&&typeof e!=`function`)return di.capture=!!e,di;let t=!!e.capture,n=!!e.once,r=e.passive,i=e.signal;if(di.capture=t,di.once=n,di.passive=r===void 0?null:!!r,di.signal=null,i!==void 0){if(typeof i!=`object`||!i||typeof i.aborted!=`boolean`||typeof i.addEventListener!=`function`)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': member signal is not of type 'AbortSignal'.`);di.signal=i}return di}function defaultPassiveValue(e,t){if(e!==`touchstart`&&e!==`touchmove`&&e!==`wheel`&&e!==`mousewheel`)return!1;let n=t,r=n[M];if(r===void 0){let e=n.document;return e!=null&&e[J]===t}if(r.type===9)return!0;let i=r.doc;return i.documentElement===t||i.body===t}function checkCallback(e,t){if(typeof e!=`function`&&(typeof e!=`object`||!e))throw TypeError(`Failed to execute '${t}' on 'EventTarget': parameter 2 is not of type 'Object'.`)}function addEventListener(e,t,n,r){let{capture:i,once:a,passive:o,signal:s}=flattenMore(r);if(s!==null&&s.aborted||n==null)return;checkCallback(n,`addEventListener`);let c=e[Tn],l;if(c==null?c=e[Tn]=/* @__PURE__ */ new Map:l=c.get(t),l===void 0)l=new ListenerList,c.set(t,l);else{let e=l.items;for(let t=0;t<e.length;t++){let r=e[t];if(r.callback===n&&r.capture===i)return}}let u=new Listener(n,i,a,o===null?defaultPassiveValue(t,e):o,s);if(appendListener(l,u),s!==null){let onAbort=()=>removeListener(e,t,u);u.onAbort=onAbort,s.addEventListener(`abort`,onAbort,{once:!0})}}function removeEventListener(e,t,n,r){let i=flattenCapture(r);if(n==null)return;checkCallback(n,`removeEventListener`);let a=e[Tn];if(a==null)return;let o=a.get(t);if(o===void 0)return;let s=o.items;for(let r=0;r<s.length;r++){let a=s[r];if(a.callback===n&&a.capture===i){removeAt(e,t,o,r);return}}}function removeListener(e,t,n){if(n.removed)return;let r=e[Tn]?.get(t);if(r===void 0){n.removed=!0;return}let i=r.items.indexOf(n);i===-1?n.removed=!0:removeAt(e,t,r,i)}function removeAt(e,t,n,r){let i=n.items[r];if(i.removed=!0,i.signal!==null&&i.onAbort!==null&&(i.signal.removeEventListener(`abort`,i.onAbort),i.onAbort=null),n.iterating>0){let e=n.items.slice();e.splice(r,1),n.items=e}else n.items.splice(r,1)}function removeAllEventListeners(e){let t=e[Tn];if(t!=null){for(let[n,r]of t){let t=r.items;for(let i=t.length-1;i>=0;i--)removeAt(e,n,r,i)}e[Tn]=null}}function hasListeners(e,t){let n=e[Tn];if(n==null)return!1;let r=n.get(t);return r!==void 0&&r.items.length>0}function requireArgs$1(e,t,n){if(e<t)throw TypeError(`Failed to construct '${n}': ${t} argument${t>1?`s`:``} required, but only ${e} present.`)}__name(requireArgs$1,`requireArgs`);function dict(e,t){if(e==null)return null;if(typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct '${t}': The provided value is not of type '${t}Init'.`);return e}function isWindow(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.window===e||t.document!=null&&t.document[J]===e}function viewMember(e,t){if(e==null)return null;if(!isWindow(e))throw TypeError(`Failed to construct '${t}': member view is not of type Window.`);return e}function targetMember(e){return e??null}const fi=Object.freeze(Object.create(null)),pi=/* @__PURE__ */ __name((e,t)=>e===void 0?t:toDOMString(e),`str`),mi=/* @__PURE__ */ __name((e,t=0)=>e===void 0?t:toLong(e),`long`),hi=/* @__PURE__ */ __name(e=>e===void 0?0:toUnsignedLong$1(e),`ulong`),double=(e,t,n,r=0)=>e===void 0?r:typeof e==`number`&&Number.isFinite(e)?e:toDouble(e,`Failed to construct '${n}': member ${t}`),float=(e,t,n,r=0)=>{if(e===void 0)return r;if(typeof e==`number`){let t=Math.fround(e);if(Number.isFinite(t))return t}return toFloat(e,`Failed to construct '${n}': member ${t}`)},gi=[[`ctrlKey`,1],[`shiftKey`,2],[`altKey`,4],[`metaKey`,8],[`modifierAltGraph`,16],[`modifierCapsLock`,32],[`modifierFn`,64],[`modifierFnLock`,128],[`modifierHyper`,256],[`modifierNumLock`,512],[`modifierScrollLock`,1024],[`modifierSuper`,2048],[`modifierSymbol`,4096],[`modifierSymbolLock`,8192]];function modifiers(e){let t=0;return e.ctrlKey&&(t|=1),e.shiftKey&&(t|=2),e.altKey&&(t|=4),e.metaKey&&(t|=8),e.modifierAltGraph&&(t|=16),e.modifierCapsLock&&(t|=32),e.modifierFn&&(t|=64),e.modifierFnLock&&(t|=128),e.modifierHyper&&(t|=256),e.modifierNumLock&&(t|=512),e.modifierScrollLock&&(t|=1024),e.modifierSuper&&(t|=2048),e.modifierSymbol&&(t|=4096),e.modifierSymbolLock&&(t|=8192),t}function modifierState(e,t){let n;switch(t){case`Control`:n=1;break;case`Shift`:n=2;break;case`Alt`:n=4;break;case`Meta`:n=8;break;default:{let e=gi.find(e=>e[0]===`modifier`+t);if(e===void 0)return!1;n=e[1]}}return(e&n)!==0}function legacyMods(e,t,n,r,i){let a=i&-16;return e&&(a|=1),t&&(a|=4),n&&(a|=2),r&&(a|=8),a}var UIEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name);let n=dict(t,new.target.name)??fi;super(e,t),this.#e=viewMember(n.view,new.target.name),this.#t=mi(n.detail),this.#n=hi(n.which)}get view(){return this.#e}get detail(){return this.#t}get which(){return this.#n}initUIEvent(e,t=!1,n=!1,r=null,i=0){if(arguments.length===0)throw TypeError(`Failed to execute 'initUIEvent' on 'UIEvent': 1 argument required, but only 0 present.`);if(r!=null&&!isWindow(r))throw TypeError(`Failed to execute 'initUIEvent' on '${this.constructor.name}': parameter 4 is not of type 'Window'.`);this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r??null,this.#t=toLong(i))}};setToStringTag(UIEvent,1);var FocusEvent=class extends UIEvent{constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this._s.relatedTarget=targetMember(t?.relatedTarget)}get relatedTarget(){return this._s.relatedTarget}};setToStringTag(FocusEvent,1);var MouseEvent=class extends UIEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??fi;this.#e=double(r.screenX,`screenX`,n),this.#t=double(r.screenY,`screenY`,n),this.#n=double(r.clientX,`clientX`,n),this.#r=double(r.clientY,`clientY`,n),this.#i=modifiers(r);let i=r.button;this.#a=i===void 0?0:toShort(i);let a=r.buttons;this.#o=a===void 0?0:toUnsignedShort(a),this.#s=double(r.movementX,`movementX`,n),this.#c=double(r.movementY,`movementY`,n),this._s.relatedTarget=targetMember(r.relatedTarget),this._s.flags|=1024}get screenX(){return this.#e}get screenY(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get x(){return this.#n}get y(){return this.#r}get pageX(){return this.#n}get pageY(){return this.#r}get offsetX(){return this.#n}get offsetY(){return this.#r}get movementX(){return this.#s}get movementY(){return this.#c}get ctrlKey(){return!!(this.#i&1)}get shiftKey(){return!!(this.#i&2)}get altKey(){return!!(this.#i&4)}get metaKey(){return!!(this.#i&8)}get button(){return this.#a}get buttons(){return this.#o}get relatedTarget(){return this._s.relatedTarget}getModifierState(e){return modifierState(this.#i,toDOMString(e))}initMouseEvent(e,t=!1,n=!1,r=null,i=0,a=0,o=0,s=0,c=0,l=!1,u=!1,d=!1,m=!1,h=0,_=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initMouseEvent' on 'MouseEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,i),this.#e=toLong(a),this.#t=toLong(o),this.#n=toLong(s),this.#r=toLong(c),this.#i=legacyMods(l,u,d,m,this.#i),this.#a=toShort(h),this._s.relatedTarget=targetMember(_))}};setToStringTag(MouseEvent,1);const _i=180/Math.PI;function spherical2tilt(e,t){let n=0,r=0,i=Math.PI;if(e===0)(t===0||t===2*i)&&(n=i/2),t===i/2&&(r=i/2),t===i&&(n=-i/2),t===3*i/2&&(r=-i/2),t>0&&t<i/2&&(n=i/2,r=i/2),t>i/2&&t<i&&(n=-i/2,r=i/2),t>i&&t<3*i/2&&(n=-i/2,r=-i/2),t>3*i/2&&t<2*i&&(n=i/2,r=-i/2);else{let i=Math.tan(e);n=Math.atan(Math.cos(t)/i),r=Math.atan(Math.sin(t)/i)}return[Math.round(n*_i),Math.round(r*_i)]}function tilt2spherical(e,t){let n=e/_i,r=t/_i,i=0;e===0?t>0?i=Math.PI/2:t<0&&(i=3*Math.PI/2):t===0?e<0&&(i=Math.PI):Math.abs(e)===90||Math.abs(t)===90?i=0:(i=Math.atan2(Math.tan(r),Math.tan(n)),i<0&&(i+=2*Math.PI));let a;return a=Math.abs(e)===90||Math.abs(t)===90?0:e===0?Math.PI/2-Math.abs(r):t===0?Math.PI/2-Math.abs(n):Math.atan(1/Math.sqrt(Math.tan(n)**2+Math.tan(r)**2)),[a,i]}var PointerEvent=class extends MouseEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??fi;this.#e=mi(r.pointerId),this.#t=double(r.width,`width`,n,1),this.#n=double(r.height,`height`,n,1),this.#r=float(r.pressure,`pressure`,n),this.#i=float(r.tangentialPressure,`tangentialPressure`,n);let i=r.tiltX,a=r.tiltY,o=r.altitudeAngle,s=r.azimuthAngle,c=i!==void 0||a!==void 0,l=o!==void 0||s!==void 0,u=mi(i),d=mi(a),m=double(o,`altitudeAngle`,n,Math.PI/2),h=double(s,`azimuthAngle`,n,0);c&&!l?[m,h]=tilt2spherical(u,d):l&&!c&&([u,d]=spherical2tilt(m,h)),this.#a=u,this.#o=d,this.#s=mi(r.twist),this.#c=m,this.#l=h,this.#u=pi(r.pointerType,``),this.#d=!!r.isPrimary,this.#f=mi(r.persistentDeviceId);let _=r.coalescedEvents;this.#p=_==null?[]:Array.from(_);let v=r.predictedEvents;this.#m=v==null?[]:Array.from(v)}get pointerId(){return this.#e}get width(){return this.#t}get height(){return this.#n}get pressure(){return this.#r}get tangentialPressure(){return this.#i}get tiltX(){return this.#a}get tiltY(){return this.#o}get twist(){return this.#s}get altitudeAngle(){return this.#c}get azimuthAngle(){return this.#l}get pointerType(){return this.#u}get isPrimary(){return this.#d}get persistentDeviceId(){return this.#f}getCoalescedEvents(){return this.#p.slice()}getPredictedEvents(){return this.#m.slice()}};setToStringTag(PointerEvent,1);var WheelEvent=class extends MouseEvent{static DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??fi;this.#e=double(r.deltaX,`deltaX`,n),this.#t=double(r.deltaY,`deltaY`,n),this.#n=double(r.deltaZ,`deltaZ`,n),this.#r=hi(r.deltaMode)}get deltaX(){return this.#e}get deltaY(){return this.#t}get deltaZ(){return this.#n}get deltaMode(){return this.#r}};setToStringTag(WheelEvent,1),Object.defineProperties(WheelEvent.prototype,{DOM_DELTA_PIXEL:{value:0,enumerable:!0},DOM_DELTA_LINE:{value:1,enumerable:!0},DOM_DELTA_PAGE:{value:2,enumerable:!0}});var DragEvent=class extends MouseEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=t?.dataTransfer??null}get dataTransfer(){return this.#e}};setToStringTag(DragEvent,1);var KeyboardEvent=class extends UIEvent{static DOM_KEY_LOCATION_STANDARD=0;static DOM_KEY_LOCATION_LEFT=1;static DOM_KEY_LOCATION_RIGHT=2;static DOM_KEY_LOCATION_NUMPAD=3;#e;#t;#n;#r;#i;#a;#o;#s;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??fi;this.#e=pi(n.key,``),this.#t=pi(n.code,``),this.#n=hi(n.location),this.#r=modifiers(n),this.#i=!!n.repeat,this.#a=!!n.isComposing,this.#o=hi(n.charCode),this.#s=hi(n.keyCode)}get key(){return this.#e}get code(){return this.#t}get location(){return this.#n}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get repeat(){return this.#i}get isComposing(){return this.#a}get charCode(){return this.#o}get keyCode(){return this.#s}getModifierState(e){return modifierState(this.#r,toDOMString(e))}initKeyboardEvent(e,t=!1,n=!1,r=null,i=``,a=0,o=!1,s=!1,c=!1,l=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i),this.#n=toUnsignedLong$1(a),this.#r=legacyMods(o,s,c,l,this.#r))}};setToStringTag(KeyboardEvent,1),Object.defineProperties(KeyboardEvent.prototype,{DOM_KEY_LOCATION_STANDARD:{value:0,enumerable:!0},DOM_KEY_LOCATION_LEFT:{value:1,enumerable:!0},DOM_KEY_LOCATION_RIGHT:{value:2,enumerable:!0},DOM_KEY_LOCATION_NUMPAD:{value:3,enumerable:!0}});var InputEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??fi,r=n.data;this.#e=r==null?null:toDOMString(r),this.#t=!!n.isComposing,this.#n=pi(n.inputType,``),this.#r=n.dataTransfer??null}get data(){return this.#e}get isComposing(){return this.#t}get inputType(){return this.#n}get dataTransfer(){return this.#r}};setToStringTag(InputEvent,1);var CompositionEvent=class extends UIEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=pi((t??fi).data,``)}get data(){return this.#e}initCompositionEvent(e,t=!1,n=!1,r=null,i=``){if(arguments.length===0)throw TypeError(`Failed to execute 'initCompositionEvent' on 'CompositionEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(CompositionEvent,1);var TextEvent=class extends UIEvent{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get data(){return this.#e}initTextEvent(e,t=!1,n=!1,r=null,i=`undefined`){this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(TextEvent,1);var Touch=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){requireArgs$1(arguments.length,1,`Touch`);let t=dict(e,`Touch`);if(t===null||t.identifier===void 0)throw TypeError(`Failed to construct 'Touch': required member identifier is undefined.`);if(t.target===void 0)throw TypeError(`Failed to construct 'Touch': required member target is undefined.`);let n=`Touch`;this.#e=toLong(t.identifier),this.#t=t.target,this.#n=double(t.clientX,`clientX`,n),this.#r=double(t.clientY,`clientY`,n),this.#i=double(t.screenX,`screenX`,n),this.#a=double(t.screenY,`screenY`,n),this.#o=double(t.pageX,`pageX`,n),this.#s=double(t.pageY,`pageY`,n),this.#c=float(t.radiusX,`radiusX`,n),this.#l=float(t.radiusY,`radiusY`,n),this.#u=float(t.rotationAngle,`rotationAngle`,n),this.#d=float(t.force,`force`,n),this.#f=double(t.altitudeAngle,`altitudeAngle`,n),this.#p=double(t.azimuthAngle,`azimuthAngle`,n),this.#m=pi(t.touchType,`direct`)}get identifier(){return this.#e}get target(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get screenX(){return this.#i}get screenY(){return this.#a}get pageX(){return this.#o}get pageY(){return this.#s}get radiusX(){return this.#c}get radiusY(){return this.#l}get rotationAngle(){return this.#u}get force(){return this.#d}get altitudeAngle(){return this.#f}get azimuthAngle(){return this.#p}get touchType(){return this.#m}};setToStringTag(Touch,1);var vi=class TouchList{#e;constructor(){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);this.#e=[]}static _create(e){let t=isInternalConstruct()?new TouchList:withInternalConstruct(()=>new TouchList);t.#e=e;for(let n=0;n<e.length;n++)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}get length(){return this.#e.length}item(e){return this.#e[toUnsignedLong$1(e)]??null}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};setToStringTag(vi);function touchSequence(e,t){if(e==null)return[];let n=Array.from(e);for(let e of n)if(e===null||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct 'TouchEvent': Failed to read the '${t}' property from 'TouchEventInit': Failed to convert value to 'Touch'.`);return n}var TouchEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??fi;this.#e=vi._create(touchSequence(n.touches,`touches`)),this.#t=vi._create(touchSequence(n.targetTouches,`targetTouches`)),this.#n=vi._create(touchSequence(n.changedTouches,`changedTouches`)),this.#r=modifiers(n),this._s.flags|=2048}get touches(){return this.#e}get targetTouches(){return this.#t}get changedTouches(){return this.#n}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}getModifierState(e){return modifierState(this.#r,toDOMString(e))}_touchTargetList(){let e=[];for(let t of[this.#e,this.#t,this.#n])for(let n of t){let t=n.target;typeof t==`object`&&t&&e.push(t)}return e}};setToStringTag(TouchEvent,1);var ClipboardEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=t?.clipboardData??null}get clipboardData(){return this.#e}};setToStringTag(ClipboardEvent,1),exposeMembers(UIEvent,FocusEvent,MouseEvent,PointerEvent,WheelEvent,DragEvent,KeyboardEvent,InputEvent,CompositionEvent,TextEvent,Touch,vi,TouchEvent,ClipboardEvent);const get=(e,t)=>e?.[t],yi=/* @__PURE__ */ __name((e,t,n=``)=>{let r=get(e,t);return r===void 0?n:toDOMString(r)},`str`),bi=/* @__PURE__ */ __name((e,t)=>{let n=get(e,t);return n==null?null:toDOMString(n)},`nullableStr`),dbl=(e,t,n)=>{let r=get(e,t);return r===void 0?0:toDouble(r,`Failed to construct '${n}': member ${t}`)};function required(e,t,n){let r=get(e,t);if(r===void 0)throw TypeError(`Failed to construct '${n}': required member ${t} is undefined.`);return r}var CustomEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t?.detail;this.#e=n===void 0?null:n}get detail(){return this.#e}initCustomEvent(e,t=!1,n=!1,r=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initCustomEvent' on 'CustomEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r)}};setToStringTag(CustomEvent,1);var ErrorEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t;this.#e=yi(n,`message`),this.#t=yi(n,`filename`);let r=get(n,`lineno`),i=get(n,`colno`);this.#n=r===void 0?0:toUnsignedLong$1(r),this.#r=i===void 0?0:toUnsignedLong$1(i),this.#i=get(n,`error`)}get message(){return this.#e}get filename(){return this.#t}get lineno(){return this.#n}get colno(){return this.#r}get error(){return this.#i}};setToStringTag(ErrorEvent,1);var PromiseRejectionEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,2,new.target.name);let n=required(t,`promise`,new.target.name);if(n===null||typeof n!=`object`&&typeof n!=`function`)throw TypeError(`Failed to construct '${new.target.name}': member promise is not an object.`);super(e,t),this.#e=n,this.#t=get(t,`reason`)}get promise(){return this.#e}get reason(){return this.#t}};setToStringTag(PromiseRejectionEvent,2);var MessageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t,r=get(n,`data`);this.#e=r===void 0?null:r,this.#t=yi(n,`origin`),this.#n=yi(n,`lastEventId`),this.#r=get(n,`source`)??null;let i=get(n,`ports`);this.#i=Object.freeze(i==null?[]:Array.from(i))}get data(){return this.#e}get origin(){return this.#t}get lastEventId(){return this.#n}get source(){return this.#r}get ports(){return this.#i}initMessageEvent(e,t=!1,n=!1,r=null,i=``,a=``,o=null,s=[]){this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r,this.#t=toDOMString(i),this.#n=toDOMString(a),this.#r=o,this.#i=Object.freeze(Array.from(s)))}};setToStringTag(MessageEvent,1);var ProgressEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`lengthComputable`),this.#t=dbl(t,`loaded`,new.target.name),this.#n=dbl(t,`total`,new.target.name)}get lengthComputable(){return this.#e}get loaded(){return this.#t}get total(){return this.#n}};setToStringTag(ProgressEvent,1);var AnimationEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=yi(t,`animationName`),this.#t=dbl(t,`elapsedTime`,new.target.name),this.#n=yi(t,`pseudoElement`)}get animationName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(AnimationEvent,1);var TransitionEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=yi(t,`propertyName`),this.#t=dbl(t,`elapsedTime`,new.target.name),this.#n=yi(t,`pseudoElement`)}get propertyName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(TransitionEvent,1);var PopStateEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=get(t,`state`);this.#e=n===void 0?null:n,this.#t=!!get(t,`hasUAVisualTransition`)}get state(){return this.#e}get hasUAVisualTransition(){return this.#t}};setToStringTag(PopStateEvent,1);var HashChangeEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=yi(t,`oldURL`),this.#t=yi(t,`newURL`)}get oldURL(){return this.#e}get newURL(){return this.#t}};setToStringTag(HashChangeEvent,1);var PageTransitionEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`persisted`)}get persisted(){return this.#e}};setToStringTag(PageTransitionEvent,1);var StorageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=bi(t,`key`),this.#t=bi(t,`oldValue`),this.#n=bi(t,`newValue`),this.#r=yi(t,`url`),this.#i=get(t,`storageArea`)??null}get key(){return this.#e}get oldValue(){return this.#t}get newValue(){return this.#n}get url(){return this.#r}get storageArea(){return this.#i}initStorageEvent(e,t=!1,n=!1,r=null,i=null,a=null,o=``,s=null){this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r===null?null:toDOMString(r),this.#t=i===null?null:toDOMString(i),this.#n=a===null?null:toDOMString(a),this.#r=toDOMString(o),this.#i=s)}};setToStringTag(StorageEvent,1);var SubmitEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=get(t,`submitter`)??null}get submitter(){return this.#e}};setToStringTag(SubmitEvent,1);var FormDataEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,2,new.target.name);let n=required(t,`formData`,new.target.name);super(e,t),this.#e=n}get formData(){return this.#e}};setToStringTag(FormDataEvent,2);var ToggleEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=yi(t,`oldState`),this.#t=yi(t,`newState`),this.#n=get(t,`source`)??null}get oldState(){return this.#e}get newState(){return this.#t}get source(){return this.#n}};setToStringTag(ToggleEvent,1);var BeforeUnloadEvent=class extends Event{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get returnValue(){return this.#e}set returnValue(e){this.#e=toDOMString(e)}};setToStringTag(BeforeUnloadEvent,1);var CloseEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`wasClean`);let n=get(t,`code`);this.#t=n===void 0?0:toUnsignedShort(n),this.#n=yi(t,`reason`)}get wasClean(){return this.#e}get code(){return this.#t}get reason(){return this.#n}};setToStringTag(CloseEvent,1),exposeMembers(CustomEvent,ErrorEvent,PromiseRejectionEvent,MessageEvent,ProgressEvent,AnimationEvent,TransitionEvent,PopStateEvent,HashChangeEvent,PageTransitionEvent,StorageEvent,SubmitEvent,FormDataEvent,ToggleEvent,BeforeUnloadEvent,CloseEvent);let xi=null;function setCurrentWindow(e){xi=e}function currentWindow(){if(xi===null)throw TypeError(`No active @ctrl/dom window. Create one with createWindow().`);return xi}function currentDocument(){return currentWindow().document}function currentWindowOrNull(){return xi}function defaultUncaughtExceptionHandler(e){let t=typeof e==`object`&&e?e.stack:void 0;console.error(typeof t==`string`?t:`Uncaught ${String(e)}`)}let Si=defaultUncaughtExceptionHandler;function setUncaughtExceptionHandler(e){Si=e??defaultUncaughtExceptionHandler}const Ci=/* @__PURE__ */ new WeakSet;function windowFor(e){if(e!==null){let t=e;if(t[M]!==void 0)return t[M].doc[J];let n=t.document;if(n!=null&&n[J]===e)return e}try{return currentWindow()}catch{return null}}function parseLocation(e){let t=typeof e==`object`&&e?e.stack:void 0;if(typeof t==`string`){let e=t.split(`
2
- `);for(let t=1;t<e.length;t++){let n=/at (?:.+\s+)?\(?(.+?):(\d+):(\d+)\)?$/.exec(e[t].trim());if(n!==null)return{filename:n[1],lineno:Number(n[2]),colno:Number(n[3])}}}return{filename:``,lineno:0,colno:0}}function reportException$1(e,t){let n=windowFor(t);if(n===null||Ci.has(n)){Si(e,null);return}let{filename:r,lineno:i,colno:a}=parseLocation(e),o=new ErrorEvent(`error`,{cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?e.message:`Uncaught ${String(e)}`,filename:r,lineno:i,colno:a,error:e});setTrusted(o),Ci.add(n);let s=!1;try{s=!dispatch(o,n)}finally{Ci.delete(n)}s||Si(e,o)}__name(reportException$1,`reportException`);let wi;function getCurrentEvent(){return wi}let Ti=null;function setPostDispatchHook(e){Ti=e}let Ei=null;function setAssignedSlotLookup(e){Ei=e}function assignedSlot$1(e){if(Ei===null)return null;let t=e.parent;return t===null||!(t.flags&512)||e.type!==1&&e.type!==3?null:Ei(e)}__name(assignedSlot$1,`assignedSlot`);function isAssigned(e){return assignedSlot$1(e)!==null}function treeRoot$1(e){for(;e.parent!==null;)e=e.parent;return e}__name(treeRoot$1,`treeRoot`);function nodeGetTheParent(e,t){let n=e[M],r=n.parent;if(r!==null&&r.flags&512){let e=assignedSlot$1(n);if(e!==null)return e}if(n.flags&32){let r=t._s;if(!(r.flags&16)&&r.pathLength>0){let e=Y[r.pathStart][M];if(e!==void 0&&treeRoot$1(e)===n)return null}return e[j]}return r===null?null:r.node}function isShadowIncludingInclusiveAncestor$4(e,t){let n=t;for(;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null||e[M]===void 0?null:e[M]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$4,`isShadowIncludingInclusiveAncestor`);function inShadowTree(e){if(e===null)return!1;let t=e[M];return t!==void 0&&!!(treeRoot$1(t).flags&32)}function retarget(e,t){for(;;){if(e===null)return null;let n=e[M];if(n===void 0)return e;let r=treeRoot$1(n);if(!(r.flags&32))return e;let i=t[M];if(i!==void 0&&isShadowIncludingInclusiveAncestor$4(r,i))return e;e=r.node[j]}}function retargetList(e,t){if(e===null)return null;let n=[];for(let r=0;r<e.length;r++)n.push(retarget(e[r],t));return n}function isWindowInstance(e){return e[en]!==void 0}function hasActivationBehavior(e){return e._hasActivationBehavior===!0}function appendToEventPath(e,t,n,r,i,a){let o=si.top,s=0;a!==null&&a.flags&32&&(s|=1,e[M]===a&&e.mode===`closed`&&(s|=2)),i&&(s|=4),Y[o]=e,t===null?Y[o+1]=Y[o+1-5]:(s|=8,Y[o+1]=t),Y[o+2]=n,Y[o+3]=r,Y[o+4]=s,si.top=o+5}function dispatch(e,t,n=!1){let r=e._s,i=t;r.flags|=64;let a=n?t.document??t:t,o=null,s=r.relatedTarget,c=inShadowTree(s),l=c?retarget(s,t):s,u=!1,d=si.top;try{if(t!==l||t===s){let n=r.flags&2048?e._touchTargetList():null;r.pathStart=d,r.pathLength=0;let i=t[M],m=i===void 0?null:treeRoot$1(i),h=m,_=h!==null&&!!(h.flags&32),v=i===void 0&&isWindowInstance(t);appendToEventPath(t,v?exposedWindow(t):a,l,retargetList(n,t),!1,m),v&&(Y[d+4]=Y[d+4]|16),r.pathLength=1;let ee=d,y=!!(r.flags&1024)&&r.type===`click`,te=!!(r.flags&256);y&&hasActivationBehavior(t)&&(o=t);let ne=i!==void 0&&isAssigned(i),re=!1,b=i,x=t._getTheParent(e);for(;x!==null;){let i=x[M],a;a=i===void 0?null:b!==void 0&&b.parent===i?m:treeRoot$1(i),ne&&(ne=!1,a!==null&&a.flags&32&&a.node.mode===`closed`&&(re=!0)),i!==void 0&&isAssigned(i)&&(ne=!0),l=c?retarget(s,x):s;let u=retargetList(n,x);i===void 0||h!==null&&(!_||isShadowIncludingInclusiveAncestor$4(h,i))?(y&&te&&o===null&&hasActivationBehavior(x)&&(o=x),appendToEventPath(x,null,l,u,re,a),i===void 0&&isWindowInstance(x)&&(Y[si.top-5+4]=Y[si.top-5+4]|16),r.pathLength++):x===l?x=null:(t=x,h=a,_=h!==null&&!!(h.flags&32),y&&o===null&&hasActivationBehavior(t)&&(o=t),ee=si.top,appendToEventPath(x,t,l,u,re,a),r.pathLength++),x!==null&&(b=i,m=a,x=x._getTheParent(e)),re=!1}let ie=si.top;{let e=ee;if(inShadowTree(Y[e+1])||inShadowTree(Y[e+2]))u=!0;else{let t=Y[e+3];if(t!==null)for(let e=0;e<t.length;e++)inShadowTree(t[e])&&(u=!0)}}o!==null&&o._legacyPreActivationBehavior?.();for(let t=ie-5;t>=d;t-=5)r.eventPhase=Y[t+4]&8?2:1,invoke$1(e,r,t,1);let ae=d;for(let t=d;t<ie;t+=5){if(Y[t+4]&8)r.eventPhase=2;else{if(!te)continue;r.eventPhase=3}ae=t,invoke$1(e,r,t,3)}r.target=Y[ae+1],r.relatedTarget=Y[ae+2],r.touchTargets=Y[ae+3]}}finally{for(let e=d,t=si.top;e<t;e++)Y[e]=null;si.top=d,r.eventPhase=0,r.currentTarget=null,r.pathStart=-1,r.pathLength=0,r.flags&=-76}if(u&&(r.target=null,r.relatedTarget=null,r.touchTargets=null),o!==null){let t=o;r.flags&4?t._legacyCanceledActivationBehavior?.():t._activationBehavior?.(e)}return Ti!==null&&Ti(e,i),!(r.flags&4)}function legacyType(e){switch(e){case`animationend`:return`webkitAnimationEnd`;case`animationiteration`:return`webkitAnimationIteration`;case`animationstart`:return`webkitAnimationStart`;case`transitionend`:return`webkitTransitionEnd`;default:return null}}function invoke$1(e,t,n,r){let i=Y[n],a=i[Tn];if(a==null||(t.target=Y[n+1],t.relatedTarget=Y[n+2],t.touchTargets=Y[n+3],t.flags&1))return;let o=Y[n+4],s=o&16?exposedWindow(i):i;t.currentTarget=s;let c=!!(o&1),l=t.type,u=a.get(l);if(!(u!==void 0&&innerInvoke(e,t,i,s,l,u,r,c))&&t.flags&128){let n=legacyType(l);if(n===null)return;let o=a.get(n);if(o===void 0)return;t.type=n;try{innerInvoke(e,t,i,s,n,o,r,c)}finally{t.type=l}}}__name(invoke$1,`invoke`);function innerInvoke(e,t,n,r,i,a,o,s){let c=!1,l=a.items;a.iterating++;try{for(let a=0;a<l.length;a++){let u=l[a];if(u.removed||(c=!0,o===1?!u.capture:u.capture))continue;u.once&&removeListener(n,i,u);let d=wi;s||(wi=e),u.passive&&(t.flags|=8);let m=u.callback;try{if(typeof m==`function`)m.call(r,e);else{let t=m.handleEvent;if(typeof t!=`function`)throw TypeError(`The provided callback is not a function and has no callable 'handleEvent' property.`);t.call(m,e)}}catch(e){reportException$1(e,n)}if(t.flags&=-9,wi=d,t.flags&2)break}}finally{a.iterating--}return c}var EventTarget=class{constructor(){}addEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);addEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}removeEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'removeEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);removeEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}dispatchEvent(e){if(!(e instanceof Event))throw TypeError(`Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.`);let t=e._s;if(!(t.flags&32))throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is uninitialized.`,`InvalidStateError`);if(t.flags&64||t.eventPhase!==0)throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.`,`InvalidStateError`);return t.flags&=-129,dispatch(e,this)}_getTheParent(e){return null}};Object.defineProperty(EventTarget.prototype,Symbol.toStringTag,{value:`EventTarget`,configurable:!0}),exposeMembers(EventTarget);var AttrRare=class{name;ns;prefix;attr;constructor(e,t,n){this.name=e,this.ns=t,this.prefix=n,this.attr=null}},AttrRecord=class{localName;value;rare;constructor(e,t,n,r){this.localName=e,this.value=t,this.rare=n===null&&r===null?null:new AttrRare(r===null?e:r+`:`+e,n,r)}get name(){let e=this.rare;return e===null?this.localName:e.name}get ns(){let e=this.rare;return e===null?null:e.ns}get prefix(){let e=this.rare;return e===null?null:e.prefix}get attr(){let e=this.rare;return e===null?null:e.attr}set attr(e){if(this.rare===null){if(e===null)return;this.rare=new AttrRare(this.localName,null,null)}this.rare.attr=e}},NodeImpl=class{node;type;doc;parent;first;last;prev;next;childCount;flags;tag;name;ns;prefix;attrs;data;id;classes;cache;constructor(e,t,n){this.node=e,this.type=t,this.doc=n,this.parent=null,this.first=null,this.last=null,this.prev=null,this.next=null,this.childCount=0,this.flags=0,this.tag=0,this.name=``,this.ns=null,this.prefix=null,this.attrs=null,this.data=``,this.id=``,this.classes=null,this.cache=null}};function nextInTree(e,t){let n=e.first;return n===null?nextSkippingChildren(e,t):n}function nextSkippingChildren(e,t){let n=e;for(;n!==null&&n!==t;){let e=n.next;if(e!==null)return e;n=n.parent}return null}function previousInTree(e,t){if(e===t)return null;let n=e.prev;if(n===null)return e.parent;for(;n.last!==null;)n=n.last;return n}function nextElementInTree(e,t){let n=nextInTree(e,t);for(;n!==null&&n.type!==1;)n=nextInTree(n,t);return n}function firstElementChild(e){let t=e.first;for(;t!==null&&t.type!==1;)t=t.next;return t}function lastElementChild(e){let t=e.last;for(;t!==null&&t.type!==1;)t=t.prev;return t}function nextElementSibling(e){let t=e.next;for(;t!==null&&t.type!==1;)t=t.next;return t}function previousElementSibling(e){let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t}function treeRoot(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function isInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;n=n.parent}return!1}function indexOf(e){let t=0;for(let n=e.prev;n!==null;n=n.prev)t++;return t}function childAt(e,t){let n=e.childCount;if(t<0||t>=n)return null;if(t<n>>1){let n=e.first;for(let e=0;e<t;e++)n=n.next;return n}let r=e.last;for(let e=n-1;e>t;e--)r=r.prev;return r}function derivedCache(e,t,n){let r=e[Pt];r===null&&(e[Pt]=r=/* @__PURE__ */ new Map);let i=r.get(t);return i===void 0&&r.set(t,i=n()),i}function peekDerivedCache(e,t){let n=e[Pt];return n===null?void 0:n.get(t)}const Di={},newHolders=()=>/* @__PURE__ */ new Set;function holdSnapshot(e,t,n){n.flags&1&&derivedCache(e,Di,newHolders).add(t)}function dropDerivedCaches(e){let t=e[Pt];e[Pt]=null;let n=t.get(Di);if(n!==void 0)for(let e of n)e._dropSnapshot()}let Oi=null;function setElementClassLookup(e){Oi=e}function createElementImpl(e,t,n,r){return new(Oi(t,n))(e,t,n,r)[M]}let ki=!1,Ai=null;function setCEReactionsPending(e){ki=e}function setCEReactionsFlush(e){Ai=e}function flushCEReactions(){Ai!==null&&Ai()}let ji=null;function setCustomElementCreate(e){ji=e}function createElementImplSync(e,t,n,r,i){if(ji!==null){let a=ji(e,t,n,r,i);if(a!==null)return a}return createElementImpl(e,t,n,r)}let Mi=!1;function setCEActive(){Mi=!0}let Ni=null,Pi=null;function setCustomElementCloneHooks(e,t){Ni=e,Pi=t}function createCloneElementImpl(e,t){return Ni(e,t)}function ceParserCreated(e){Pi(e)}function indexGetterTable(e,t,n=32){let r={proto:e,count:0,item:t};return ensureIndexGetters(r,n),r}function ensureIndexGetters(e,t){if(t<=e.count)return;let n=Math.max(t,e.count*2),r=e.item;for(let t=e.count;t<n;t++)Object.defineProperty(e.proto,t,{get(){return r(this,t)},enumerable:!1,configurable:!0});e.count=n}var CollectionIterator=class extends Iterator{#e;#t;#n;constructor(e,t){super(),this.#e=e,this.#t=0,this.#n=t}next(){let e=this.#e;if(e!==null){let t=this.#t,n=this.#n?e._snapshot():e;if(t<n.length)return this.#t=t+1,{value:n[t],done:!1};this.#e=null}return{value:void 0,done:!0}}};Object.defineProperty(CollectionIterator.prototype,Symbol.toStringTag,{value:`Array Iterator`,configurable:!0});function iterableTarget(e){if(e==null)throw TypeError(`values method called on null or undefined`);return Object(e)}const Fi=/* @__PURE__ */ new Map;function lazyItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}var Ii=class NodeList{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=0;let n=new.target!==NodeList;this.#n=n,n&&!Fi.has(new.target.prototype)&&Fi.set(new.target.prototype,indexGetterTable(new.target.prototype,lazyItem,64))}static _static(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r];return t.#t=n,t}static _staticFromImpls(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r].node;return t.#t=n,t}static _live(e){let t=new NodeList(e);return e.flags|=256,t.#r(),t}#r(){let e=this,t=this.#e,n=0;for(let r=t.first;r!==null;r=r.next)e[n++]=r.node;let r=this.#t;for(let t=n;t<r;t++)delete e[t];this.#t=n}static _appended(e,t){e[e.#t++]=t}static _popped(e){delete e[--e.#t]}static _rebuild(e){e.#e!==null&&e.#r()}_snapshot(){let e=this.#t,t=Array(e);for(let n=0;n<e;n++)t[n]=this[n];return t}get length(){if(this.#n){let e=this._snapshot().length,t=Fi.get(Object.getPrototypeOf(this));return e>t.count&&ensureIndexGetters(t,e),e}return this.#t}item(e){let t=Number(e)>>>0;return this.#n?this._snapshot()[t]??null:t<this.#t?this[t]:null}static _values(e){let t=iterableTarget(e);return new CollectionIterator(t,#n in t&&t.#n)}};const Li={values(){return Ii._values(this)}}.values;Object.defineProperties(Ii.prototype,{forEach:{value:Array.prototype.forEach,writable:!0,enumerable:!0,configurable:!0},entries:{value:Array.prototype.entries,writable:!0,enumerable:!0,configurable:!0},keys:{value:Array.prototype.keys,writable:!0,enumerable:!0,configurable:!0},values:{value:Li,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Li,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NodeList`,configurable:!0}});const Ri=[];var zi=class MutationRecord{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;constructor(e,t,n,r,i,a,o,s,c){if(new.target!==MutationRecord||arguments.length===0)throw TypeError(`Illegal constructor`);this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i,this.#a=a??Ri,this.#o=o??Ri,this.#s=null,this.#c=null,this.#l=s,this.#u=c}get type(){return this.#e}get target(){return this.#t.node}get addedNodes(){return this.#s??=Ii._staticFromImpls(this.#a)}get removedNodes(){return this.#c??=Ii._staticFromImpls(this.#o)}get previousSibling(){let e=this.#l;return e===null?null:e.node}get nextSibling(){let e=this.#u;return e===null?null:e.node}get attributeName(){return this.#n}get attributeNamespace(){return this.#r}get oldValue(){return this.#i}};Object.defineProperty(zi.prototype,Symbol.toStringTag,{value:`MutationRecord`,configurable:!0});let Bi=0;function setActiveObservers(e){Bi=e}let Vi=0;function setSubtreeObservers(e){Vi=e}var RegisteredObserver=class{observer;options;source;constructor(e,t,n){this.observer=e,this.options=t,this.source=n}},NormalizedOptions=class{childList;attributes;characterData;subtree;attributeOldValue;characterDataOldValue;attributeFilter;constructor(e,t,n){this.childList=!!e.childList,this.attributes=t,this.characterData=n,this.subtree=!!e.subtree,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,this.attributeFilter=e.attributeFilter===void 0?null:Array.from(e.attributeFilter,String)}};const Hi=/* @__PURE__ */ new WeakMap;function registeredObserverList(e){return e.flags&2048?Hi.get(e)??null:null}function addRegistration(e,t){let n=registeredObserverList(e);n===null&&(n=[],Hi.set(e,n),e.flags|=be),n.push(t)}function removeRegistrations(e,t){let n=registeredObserverList(e);if(n===null)return;let r=0;for(let e=0;e<n.length;e++)t(n[e])||(n[r++]=n[e]);n.length=r,r===0&&(Hi.delete(e),e.flags&=-2049)}let Ui=[],Wi=[],Gi=!1;function queueMutationRecord(e,t,n,r,i,a,o,s,c){let l=null,u=null,d=Vi!==0;for(let a=t;a!==null;a=d?a.parent:null){if(!(a.flags&2048))continue;let o=Hi.get(a);if(o!==void 0)for(let s=0;s<o.length;s++){let c=o[s],d=c.options;if(a!==t&&!d.subtree)continue;if(e===0){if(!d.attributes)continue;let e=d.attributeFilter;if(e!==null&&(r!==null||!e.includes(n)))continue}else if(e===1){if(!d.characterData)continue}else if(!d.childList)continue;let m=c.observer;l===null&&(l=[],u=[]);let h=l.indexOf(m);h===-1&&(h=l.length,l.push(m),u.push(null)),(e===0&&d.attributeOldValue||e===1&&d.characterDataOldValue)&&(u[h]=i)}}if(l===null)return;let m=e===0?`attributes`:e===1?`characterData`:`childList`;for(let e=0;e<l.length;e++){let i=l[e],d=new zi(m,t,n,r,u[e],a,o,s,c),h=i[ir];h.length===0&&!Ui.includes(i)&&Ui.push(i),h.push(d)}queueMutationObserverMicrotask()}function queueTreeMutationRecord(e,t,n,r,i){queueMutationRecord(2,e,null,null,null,t,n,r,i)}function queueAttributeMutationRecord(e,t,n,r){queueMutationRecord(0,e,t,n,r,null,null,null,null)}function queueCharacterDataMutationRecord(e,t){queueMutationRecord(1,e,null,null,t,null,null,null,null)}function addTransientObservers(e,t){if(Vi!==0)for(let n=e;n!==null;n=n.parent){if(!(n.flags&2048))continue;let e=Hi.get(n);if(e!==void 0)for(let n=0;n<e.length;n++){let r=e[n];if(!r.options.subtree)continue;let i=r.observer,a=r.source??r;hasTransientWithSource(t,a)||(addRegistration(t,new RegisteredObserver(i,a.options,a)),i[Fn].push(t),i[tn]=!0,Ui.includes(i)||Ui.push(i),queueMutationObserverMicrotask())}}}function hasTransientWithSource(e,t){let n=registeredObserverList(e);if(n===null)return!1;for(let e=0;e<n.length;e++)if(n[e].source===t)return!0;return!1}function signalSlotChange(e){Wi.includes(e)||Wi.push(e),queueMutationObserverMicrotask()}function queueMutationObserverMicrotask(){Gi||(Gi=!0,queueMicrotask(notifyMutationObservers))}function notifyMutationObservers(){Gi=!1;let e=Ui;Ui=[],e.length>1&&e.sort((e,t)=>e[cn]-t[cn]);let t=Wi;Wi=[];for(let t=0;t<e.length;t++){let n=e[t],r=n[ir];if(n[ir]=[],removeTransientRegistrations(n),r.length!==0)try{n[Ze].call(n,r,n)}catch(e){reportException$1(e,null)}}for(let e=0;e<t.length;e++)t[e].node.dispatchEvent(new Event(`slotchange`,{bubbles:!0}))}function removeTransientRegistrations(e){if(!e[tn])return;e[tn]=!1;let t=[],n=e[Fn];for(let r=0;r<n.length;r++){let i=n[r];removeRegistrations(i,t=>t.observer===e&&t.source!==null);let a=registeredObserverList(i);a!==null&&!t.includes(i)&&a.some(t=>t.observer===e)&&t.push(i)}e[Fn]=t}function dropPending(e){let t=Ui.indexOf(e);t!==-1&&Ui.splice(t,1)}let Ki=0,qi=0,Ji=[];function homeOf(e){return e.doc}function registerLiveRange(e){let t=homeOf(e[U]);e[an]=t;let n=t[Qn]??=[];n.length!==0&&!(n.length&255)&&liveRanges(e[U]),(t[Qn]??=[]).push(new WeakRef(e)),Ki++}function refileRange(e){let t=homeOf(e[U]);e[an]!==t&&e[an]!==null&&(e[an]=t,(t[Qn]??=[]).push(new WeakRef(e)),Ki++)}let Yi=64;function registerNodeIterator(e){if(Ji.length>=Yi){let e=0;for(let t=0;t<Ji.length;t++)Ji[t].deref()!==void 0&&(Ji[e++]=Ji[t]);Ji.length=e,Yi=Math.max(64,e*2)}Ji.push(new WeakRef(e)),qi=Ji.length}function liveRanges(e){let t=homeOf(e),n=t[Qn],r=[];if(n===null)return r;let i=0;for(let e=0;e<n.length;e++){let a=n[e].deref();a!==void 0&&a[an]===t&&(r.push(a),n[i++]=n[e])}return Ki-=n.length-i,n.length=i,i===0&&(t[Qn]=null),r}function rangesAdopt(e,t){let n=t,r=homeOf(e),i=n[Qn];if(i===null||n===r)return;let a=0;for(let t=0;t<i.length;t++){let o=i[t].deref();o===void 0?Ki--:o[an]===n?isInclusiveAncestor(e,o[U])||isInclusiveAncestor(e,o[D])?(o[an]=r,(r[Qn]??=[]).push(i[t])):i[a++]=i[t]:Ki--}i.length=a,a===0&&(n[Qn]=null)}function rangesAfterInsert(e,t,n){let r=liveRanges(e);for(let i=0;i<r.length;i++){let a=r[i];a[U]===e&&a[G]>t&&(a[G]+=n),a[D]===e&&a[k]>t&&(a[k]+=n)}}function rangesBeforeRemove(e,t,n){let r=liveRanges(t);for(let i=0;i<r.length;i++){let a=r[i];isInclusiveAncestor(e,a[U])&&(a[U]=t,a[G]=n),isInclusiveAncestor(e,a[D])&&(a[D]=t,a[k]=n),a[U]===t&&a[G]>n&&a[G]--,a[D]===t&&a[k]>n&&a[k]--}}function rangesReplaceData(e,t,n,r){let i=liveRanges(e),a=t+n;for(let o=0;o<i.length;o++){let s=i[o];s[U]===e&&s[G]>t&&s[G]<=a&&(s[G]=t),s[D]===e&&s[k]>t&&s[k]<=a&&(s[k]=t),s[U]===e&&s[G]>a&&(s[G]+=r-n),s[D]===e&&s[k]>a&&(s[k]+=r-n)}}function rangesSplitText(e,t,n,r){let i=liveRanges(e),a=indexOf(e);for(let o=0;o<i.length;o++){let s=i[o];s[U]===e&&s[G]>n&&(s[U]=t,s[G]-=n),s[D]===e&&s[k]>n&&(s[D]=t,s[k]-=n),s[U]===r&&s[G]===a+1&&s[G]++,s[D]===r&&s[k]===a+1&&s[k]++}}function rangesNormalizeMerge(e,t,n){let r=liveRanges(e),i=t.parent,a=indexOf(t);for(let o=0;o<r.length;o++){let s=r[o];s[U]===t&&(s[G]+=n,s[U]=e),s[D]===t&&(s[k]+=n,s[D]=e),s[U]===i&&s[G]===a&&(s[U]=e,s[G]=n),s[D]===i&&s[k]===a&&(s[D]=e,s[k]=n)}}function iteratorsBeforeRemove(e){let t=0,n=e.doc;for(let r=0;r<Ji.length;r++){let i=Ji[r].deref();i!==void 0&&(Ji[t++]=Ji[r],i[cr].doc===n&&(preRemovingSteps(i,i,e),i[gn]!==null&&preRemovingSteps(i,i[gn],e)))}Ji.length=t,qi=t}function preRemovingSteps(e,t,n){if(!isInclusiveAncestor(n,t[or])||isInclusiveAncestor(n,e[cr]))return;if(t[Hn]){let r=nextSkippingChildren(n,e[cr]);if(r!==null){t[or]=r;return}t[Hn]=!1}let r=n.prev;if(r===null)t[or]=n.parent;else{let e=r;for(;e.last!==null;)e=e.last;t[or]=e}}const Xi=/* @__PURE__ */ new WeakMap;function noteInlineStyle(e,t){Xi.set(e,(Xi.get(e)??0)+t)}function inlineStyleCount(e){return Xi.get(e)??0}function asciiLowercase$1(e){let t=e.length;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t>=65&&t<=90)return asciiLowercaseFrom(e,n)}return e}__name(asciiLowercase$1,`asciiLowercase`);function asciiLowercaseFrom(e,t){let n=!0,r=e.length;for(let i=t;i<r;i++)if(e.charCodeAt(i)>=128){n=!1;break}if(n)return e.toLowerCase();let i=e.slice(0,t);for(let n=t;n<r;n++){let t=e.charCodeAt(n);i+=t>=65&&t<=90?String.fromCharCode(t+32):e[n]}return i}function isValidAttributeLocalName(e){let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===61||t===62)return!1}return!0}function findAttributeByName(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if((i===null?r.localName:i.name)===t)return r}return null}function findAttributeByNamespace(e,t,n){let r=e.attrs;if(r===null)return null;for(let e=0;e<r.length;e++){let i=r[e],a=i.rare;if(i.localName===n&&(a===null?t===null:a.ns===t))return i}return null}function getAttribute(e,t){let n=e.attrs;if(n===null)return null;let r=e.flags&2?asciiLowercase$1(t):t;for(let e=0;e<n.length;e++){let t=n[e],i=t.rare;if((i===null?t.localName:i.name)===r)return t.value}return null}function prefixFlag(e){switch(e.length){case 5:if(e===`inert`)return De;break;case 8:if(e===`tabindex`)return Te;break;case 15:if(e===`contenteditable`)return Ee}if(e.length<5||e.charCodeAt(4)!==45)return 0;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97?Ce:0:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97?we:0}function attr(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if(i===null?r.localName===t:i.ns===null&&i.name===t)return r.value}return null}function ariaAttr(e,t){return e.flags&32768?attr(e,t):null}function hasAttr(e,t){return attr(e,t)!==null}const Zi=/* @__PURE__ */ new Map;function setAttribute(e,t,n){let r=Zi.get(t);if(r===void 0){if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);r=asciiLowercase$1(t),Zi.size===1024&&Zi.clear(),Zi.set(t,r)}let i=e.flags&2?r:t,a=findAttributeByName(e,i);a===null?appendAttribute(e,new AttrRecord(i,n,null,null)):changeAttribute(e,a,n)}function changeAttribute(e,t,n){let r=t.value;t.value=n,handleAttributeChanges(e,t,r,n)}function addRecord(e,t){let n=prefixFlag(t.localName);n!==0&&(e.flags|=n);let r=e.attrs;if(r===null){let n=[,];n[0]=t,e.attrs=n;return}let i=r.length;if(i>=16){r.push(t);return}let a=Array(i+1);for(let e=0;e<i;e++)a[e]=r[e];a[i]=t,e.attrs=a}function appendAttribute(e,t){addRecord(e,t),handleAttributeChanges(e,t,null,t.value)}function removeAttributeRecord(e,t){let n=e.attrs,r=n.indexOf(t);n.splice(r,1);let i=prefixFlag(t.localName);if(i!==0){let t=!1;for(let e=0;e<n.length&&!t;e++)t=prefixFlag(n[e].localName)===i;t||(e.flags&=~i)}t.attr!==null&&t.attr._detach(),handleAttributeChanges(e,t,t.value,null)}function removeAttribute(e,t){if(e.attrs===null)return null;let n=findAttributeByName(e,e.flags&2?asciiLowercase$1(t):t);return n!==null&&removeAttributeRecord(e,n),n}function handleAttributeChanges(e,t,n,r){Bi!==0&&queueAttributeMutationRecord(e,t.localName,t.ns,n),t.ns===null&&(coreAttributeSteps(e,t.localName,r),ta!==0&&slotsAttributeChanged(e,t.localName,n,r)),e.flags&8&&e.node._attributeChangedSteps(t.localName,n,r,t.ns),e.doc[q]++,ki&&flushCEReactions()}function coreAttributeSteps(e,t,n){switch(t){case`id`:{let t=!!(e.flags&1);t&&e.id!==``&&e.doc._idRemove(e),e.id=n??``,t&&e.id!==``&&e.doc._idAdd(e);break}case`class`:e.classes=null;break;case`style`:n===null||n===``?(e.flags&64&&noteInlineStyle(e.doc,-1),e.flags&=-65):(e.flags&64||noteInlineStyle(e.doc,1),e.flags|=64),e.node[jr]?._attributeChanged(n)}}function appendAttributeDetached(e,t,n,r,i){addRecord(e,new AttrRecord(t,n,r,i)),r===null&&(t===`id`?e.id=n:t===`style`&&n!==``&&!(e.flags&64)&&(e.flags|=64,noteInlineStyle(e.doc,1)))}const Qi=[];function classTokens(e){let t=e.classes;if(t!==null)return t;let n=attr(e,`class`);return t=n===null||n===``?Qi:splitOnAsciiWhitespace(n),e.classes=t,t}function splitOnAsciiWhitespace(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&isAsciiWhitespace(e.charCodeAt(r));)r++;if(r>=n)break;let i=r;for(;r<n&&!isAsciiWhitespace(e.charCodeAt(r));)r++;t.push(i===0&&r===n?e:e.slice(i,r))}return t}function isAsciiWhitespace(e){return e===32||e===9||e===10||e===12||e===13}const $i=/* @__PURE__ */ `.a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.svg.math.frame.frameset.noframes.marquee.font.center.dir.applet.basefont.bgsound.big.blink.keygen.listing.menuitem.nobr.noembed.param.plaintext.rb.rtc.strike.tt.xmp.image.selectedcontent`.split(`.`),ea=/* @__PURE__ */ new Map;for(let e=1;e<$i.length;e++)ea.set($i[e],e);function tagId(e){return ea.get(e)??0}function tagName(e){return $i[e]??``}const X=Object.fromEntries($i.map((e,t)=>[e,t]));let ta=0;function _shadowRootAttached(){ta++}const na=/* @__PURE__ */ new WeakMap,ra=/* @__PURE__ */ new WeakMap,ia=/* @__PURE__ */ new WeakMap,aa=/* @__PURE__ */ new WeakMap,oa=[];function isSlot(e){return e.type===1&&e.tag===X.slot&&e.ns===`http://www.w3.org/1999/xhtml`}function isSlottable(e){return e.type===1||e.type===3}function shadowOf(e){return e.flags&512?e.node[W]??null:null}function slotName(e){return attr(e,`name`)??``}function slottableName(e){return e.type===1?attr(e,`slot`)??``:``}function findSlot(e,t){let n=e.parent;if(n===null)return null;let r=shadowOf(n);if(r===null||t&&r.mode!==`open`)return null;let i=r[M];if(r.slotAssignment===`manual`){for(let t=i.first;t!==null;t=nextInTree(t,i))if(isSlot(t)&&(ia.get(t)??oa).includes(e))return t;return null}let a=slottableName(e);for(let e=i.first;e!==null;e=nextInTree(e,i))if(isSlot(e)&&slotName(e)===a)return e;return null}function findSlottables(e){let t=[],n=treeRoot(e);if(!(n.flags&32))return t;let r=n.node,i=r[j][M];if(r.slotAssignment===`manual`){let n=ia.get(e);if(n!==void 0)for(let e of n)e.parent===i&&t.push(e);return t}for(let n=i.first;n!==null;n=n.next)isSlottable(n)&&findSlot(n,!1)===e&&t.push(n);return t}function findFlattenedSlottables(e){let t=[];if(!(treeRoot(e).flags&32))return t;let n=findSlottables(e);if(n.length===0){n=[];for(let t=e.first;t!==null;t=t.next)isSlottable(t)&&n.push(t)}for(let e of n)if(isSlot(e)&&treeRoot(e).flags&32)for(let n of findFlattenedSlottables(e))t.push(n);else t.push(e);return t}function assignSlottables(e){let t=findSlottables(e),n=na.get(e)??oa,r=n.length===t.length;if(r){for(let e=0;e<n.length;e++)if(n[e]!==t[e]){r=!1;break}}r||signalSlotChange(e);for(let r of n)ra.get(r)===e&&!t.includes(r)&&ra.delete(r);t.length===0?na.delete(e):na.set(e,t);for(let n of t)ra.set(n,e)}function assignSlottablesForTree(e){for(let t=e;t!==null;t=nextInTree(t,e))isSlot(t)&&assignSlottables(t)}function assignASlot(e){let t=findSlot(e,!1);t!==null&&assignSlottables(t)}function hasSlotDescendant(e){for(let t=e;t!==null;t=nextInTree(t,e))if(isSlot(t))return!0;return!1}function isEmptyShadowSlot(e){return isSlot(e)&&!!(treeRoot(e).flags&32)&&(na.get(e)??oa).length===0}function slotsAfterInsert(e,t,n){let r=n===null?1:n.length;for(let i=0;i<r;i++){let r=n===null?t:n[i];if(r.parent===e&&(shadowOf(e)!==null&&isSlottable(r)&&assignASlot(r),isEmptyShadowSlot(e)&&signalSlotChange(e),hasSlotDescendant(r))){let e=treeRoot(r);e.flags&32&&assignSlottablesForTree(e)}}}function slotsAfterRemove(e,t){let n=ra.get(e);if(n!==void 0&&assignSlottables(n),isEmptyShadowSlot(t)&&signalSlotChange(t),hasSlotDescendant(e)){let n=treeRoot(t);n.flags&32&&assignSlottablesForTree(n),assignSlottablesForTree(e)}}function slotsAttributeChanged(e,t,n,r){if(t===`name`&&isSlot(e)){if((n??``)===(r??``))return;let t=treeRoot(e);t.flags&32&&assignSlottablesForTree(t)}else if(t===`slot`){if((n??``)===(r??``))return;let t=ra.get(e);t!==void 0&&assignSlottables(t),assignASlot(e)}}function assignedSlot(e){return ra.get(e)??null}function assignedNodes(e,t){return t?findFlattenedSlottables(e):(na.get(e)??oa).slice()}function assignedElements(e,t){return assignedNodes(e,t).filter(e=>e.type===1)}function assignManually(e,t){let n=ia.get(e)??oa;for(let e of n)aa.delete(e);let r=[],i=null;for(let n of t){let t=aa.get(n);if(t!==void 0&&t!==e){let e=ia.get(t);if(e!==void 0){let t=e.indexOf(n);t!==-1&&e.splice(t,1)}i===null&&(i=[]),i.includes(t)||i.push(t)}r.includes(n)||r.push(n),aa.set(n,e)}ia.set(e,r);let a=treeRoot(e);if(a.flags&32&&assignSlottablesForTree(a),i!==null)for(let e of i)treeRoot(e)!==a&&assignSlottables(e)}function assignedSlotForEventPath(e){if(ta===0)return null;let t=e.parent;return t===null||!(t.flags&512)?null:ra.get(e)??null}function isShadowRootImpl(e){return e.type===11&&!!(e.flags&32)}function hierarchyError$1(e){return new DOMException(e,`HierarchyRequestError`)}__name(hierarchyError$1,`hierarchyError`);function isCharacterData$1(e){return e===3||e===4||e===8||e===7}__name(isCharacterData$1,`isCharacterData`);function isHostIncludingInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;let t=n.parent;if(t===null&&n.type===11){let e=n.node[j];n=e?e[M]:null}else n=t}return!1}function hasElementChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return!0;return!1}function hasDoctypeChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===10)return!0;return!1}function doctypeFollows(e){for(let t=e.next;t!==null;t=t.next)if(t.type===10)return!0;return!1}function elementPrecedes(e){for(let t=e.prev;t!==null;t=t.prev)if(t.type===1)return!0;return!1}function ensurePreInsertionValidity(e,t,n){let r=t.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let i=e.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(e,t,n,null)}function checkDocumentChildConstraints(e,t,n,r){let otherElement=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===1&&e!==r)return!0;return!1},otherDoctype=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===10&&e!==r)return!0;return!1};switch(e.type){case 11:{let i=0;for(let t=e.first;t!==null;t=t.next)if(t.type===1)i++;else if(t.type===3||t.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(i>1)throw hierarchyError$1(`A document can have only one document element.`);if(i===1){if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`)}break}case 1:if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`);break;case 10:if(r===null){if(hasDoctypeChild(t)||n!==null&&elementPrecedes(n)||n===null&&hasElementChild(t))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}else if(otherDoctype()||elementPrecedes(r))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}}function ensureReplaceAllValidity(e,t){if(t.type!==9){ensurePreInsertionValidity(e,t,null);return}if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);let n=e.type;if(n!==11&&n!==10&&n!==1&&!isCharacterData$1(n))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if(n===3||n===4)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);if(n===11){let t=0;for(let n=e.first;n!==null;n=n.next)if(n.type===1)t++;else if(n.type===3||n.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(t>1)throw hierarchyError$1(`A document can have only one document element.`)}}function preInsert(e,t,n){ensurePreInsertionValidity(e,t,n);let r=n;return r===e&&(r=e.next),insert(e,t,r,!1),e}function append(e,t){return preInsert(e,t,null)}function link(e,t,n){if(e.parent=t,n===null){let n=t.last;e.prev=n,e.next=null,n===null?t.first=e:n.next=e,t.last=e}else{let r=n.prev;e.prev=r,e.next=n,n.prev=e,r===null?t.first=e:r.next=e}if(t.childCount++,t.flags&256){let r=t.node[et];n===null?Ii._appended(r,e.node):Ii._rebuild(r)}}function unlink(e){let t=e.parent,n=e.prev,r=e.next;if(n===null?t.first=r:n.next=r,r===null?t.last=n:r.prev=n,e.parent=null,e.prev=null,e.next=null,t.childCount--,t.flags&256){let e=t.node[et];r===null?Ii._popped(e):Ii._rebuild(e)}}function suspendChildList(e){let t=e.flags&256;return e.flags&=-257,t}function resumeChildList(e,t){t!==0&&(e.flags|=256,Ii._rebuild(e.node[et]))}function insert(e,t,n,r){let i=e.type===11,a=i?e.childCount:1;if(a===0)return;let o=null;if(i){o=Array(a);let t=0;for(let n=e.first;n!==null;n=n.next)o[t++]=n;let n=suspendChildList(e);for(let e=0;e<o.length;e++)remove(o[e],!0);resumeChildList(e,n),Bi!==0&&queueTreeMutationRecord(e,[],o,null,null)}Ki!==0&&n!==null&&rangesAfterInsert(t,indexOf(n),a);let s=n===null?t.last:n.prev,c=t.doc,l=!!(t.flags&1);if(o===null)insertOne(e,t,n,c,l);else{let e=a>1&&n!==null?suspendChildList(t):0;for(let e=0;e<o.length;e++)insertOne(o[e],t,n,c,l);resumeChildList(t,e)}ta!==0&&slotsAfterInsert(t,o===null?e:null,o),!r&&Bi!==0&&queueTreeMutationRecord(t,o===null?[e]:o,[],s,n),childrenChanged(t),c[q]++,ki&&flushCEReactions()}function insertOne(e,t,n,r,i){(e.parent!==null||e.doc!==r)&&adopt(e,r),link(e,t,n),i&&connectSubtree(e,r)}function connectSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags|=1,n.type===1&&(n.id!==``&&t._idAdd(n),n.flags&4&&n.node._connectedSteps(),n.flags&512&&connectSubtree(n.node[W][M],t))}function connectDetachedChildren(e){let t=e.node;for(let n=e.first;n!==null;n=n.next)connectSubtree(n,t);t[q]++}function disconnectSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&=-2,n.type===1&&(n.id!==``&&t._idRemove(n),t[A]===n&&(t[A]=null),n.flags&4&&n.node._disconnectedSteps(),n.flags&512&&disconnectSubtree(n.node[W][M],t))}function childrenChanged(e){e.flags&16&&e.node._childrenChangedSteps()}function preRemove(e,t){if(e.parent!==t)throw new DOMException(`The node to be removed is not a child of this node.`,`NotFoundError`);return remove(e,!1),e}function remove(e,t){let n=e.parent,r=n.doc;Ki!==0&&rangesBeforeRemove(e,n,indexOf(e)),qi!==0&&iteratorsBeforeRemove(e);let i=e.prev,a=e.next;unlink(e),ta!==0&&slotsAfterRemove(e,n);let o=!!(e.flags&1);o&&disconnectSubtree(e,r),Bi!==0&&(addTransientObservers(n,e),t||queueTreeMutationRecord(n,[],[e],i,a)),childrenChanged(n),r[q]++,r[Pt]!==null&&dropDerivedCaches(r),ki&&o&&flushCEReactions()}function shadowIncludingRoot(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[j];if(e===null)break;t=treeRoot(e[M])}return t}function move(e,t,n){if(shadowIncludingRoot(t)!==shadowIncludingRoot(e))throw hierarchyError$1(`The new parent is not in the same shadow-including tree as the node to move.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The node to move is an ancestor of the new parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let r=e.type;if(r!==1&&!isCharacterData$1(r))throw hierarchyError$1(`Only elements and character data nodes can be moved.`);if(t.type===9){if(r===3)throw hierarchyError$1(`Nodes of this type cannot be moved into a document.`);if(r===1&&(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n))))throw hierarchyError$1(`A document can have only one document element.`)}let i=e.parent,a=t.doc;Ki!==0&&rangesBeforeRemove(e,i,indexOf(e)),qi!==0&&iteratorsBeforeRemove(e);let o=e.prev,s=e.next;unlink(e),ta!==0&&slotsAfterRemove(e,i),Bi!==0&&addTransientObservers(i,e),Ki!==0&&n!==null&&rangesAfterInsert(t,indexOf(n),1);let c=n===null?t.last:n.prev;link(e,t,n),ta!==0&&slotsAfterInsert(t,e,null);for(let t=e;t!==null;t=nextInTree(t,e))t.type===1&&t.flags&4&&t.node._movingSteps(t===e,i);Bi!==0&&(queueTreeMutationRecord(i,[],[e],o,s),queueTreeMutationRecord(t,[e],[],c,n)),childrenChanged(i),t!==i&&childrenChanged(t),a[q]++,ki&&flushCEReactions()}function replace(e,t,n){let r=n.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(t,n))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(e.parent!==n)throw new DOMException(`The node to be replaced is not a child of this node.`,`NotFoundError`);let i=t.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(t,n,null,e);let a=e.next;a===t&&(a=t.next);let o=e.prev;o===t&&(o=t.prev),(t.parent!==null||t.doc!==n.doc)&&adopt(t,n.doc);let s=[];e.parent!==null&&(s=[e],remove(e,!0));let c;if(t.type===11){c=[];for(let e=t.first;e!==null;e=e.next)c.push(e)}else c=[t];return insert(t,n,a,!0),Bi!==0&&queueTreeMutationRecord(n,c,s,o,a),e}function replaceAll(e,t){let n=t.first;if(n===null){e!==null&&insert(e,t,null,!1);return}let r=[];for(let e=n;e!==null;e=e.next)r.push(e);let i=[];if(e!==null){if(e.type===11)for(let t=e.first;t!==null;t=t.next)i.push(t);else i=[e]}let a=suspendChildList(t);for(let e=0;e<r.length;e++)remove(r[e],!0);e!==null&&insert(e,t,null,!0),resumeChildList(t,a),Bi!==0&&(i.length!==0||r.length!==0)&&queueTreeMutationRecord(t,i,r,null,null)}function adopt(e,t){let n=e.doc;if(e.parent!==null&&remove(e,!1),n!==t){t[q]<=n[q]&&(t[q]=n[q]+1);let r=t[N];for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&r?n.flags|=2:n.flags&=-3;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[M].doc=t)}n.flags&512&&adoptShadowTree(n.node[W][M],t)}Ki!==0&&rangesAdopt(e,n),runAdoptingSteps(e,n)}}function runAdoptingSteps(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&4096&&n.node._adoptingSteps(t),n.flags&512&&runAdoptingSteps(n.node[W][M],t)}function adoptShadowTree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&t[N]?n.flags|=2:n.flags&=-3;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[M].doc=t)}n.flags&512&&adoptShadowTree(n.node[W][M],t)}}function appendDetached(e,t){link(e,t,null)}function insertDetached(e,t,n){link(e,t,n)}function cloneNode(e,t,n){let r=cloneTree(e,t,n);return ki&&flushCEReactions(),r}function cloneTree(e,t,n){let r=cloneOne(e,t,n);if(n){for(let n=e.first;n!==null;n=n.next)appendDetached(cloneTree(n,r.type===9?r.node:t,!0),r);r.type===9&&r.first!==null&&connectDetachedChildren(r)}if(e.flags&512){let n=e.node[W];if(n[at]){let e=r.node.attachShadow({mode:n[jn],clonable:!0,serializable:n[Cr],delegatesFocus:n[Ot],slotAssignment:n[kr]});e[Tt]=n[Tt];for(let r=n[M].first;r!==null;r=r.next)appendDetached(cloneTree(r,t,!0),e[M])}}return r}function cloneOne(e,t,n){switch(e.type){case 1:{let r=Mi?createCloneElementImpl(t,e):createElementImpl(t,e.name,e.ns,e.prefix),i=e.attrs;if(i!==null){let t=Array(i.length);for(let e=0;e<i.length;e++){let n=i[e];t[e]=new AttrRecord(n.localName,n.value,n.ns,n.prefix)}r.attrs=t,r.id=e.id,r.flags|=e.flags&499776}return e.node._cloningSteps(r.node,n),r}case 3:return t.createTextNode(e.data)[M];case 4:return new e.node.constructor(e.data,t)[M];case 8:return t.createComment(e.data)[M];case 7:return t.createProcessingInstruction(e.name,e.data)[M];case 11:return t.createDocumentFragment()[M];case 10:{let n=e.node;return t.implementation.createDocumentType(n.name,n.publicId,n.systemId)[M]}case 9:return e.node._cloneDocument()[M];case 2:{let n=t.createAttributeNS(e.ns,e.prefix===null?e.name:e.prefix+`:`+e.name);return n.value=e.data,n[M]}}throw new DOMException(`Cannot clone this node.`,`NotSupportedError`)}function isEqualNode(e,t){if(e===t)return!0;if(e.type!==t.type)return!1;switch(e.type){case 10:{let n=e.node,r=t.node;if(n.name!==r.name||n.publicId!==r.publicId||n.systemId!==r.systemId)return!1;break}case 1:{if(e.ns!==t.ns||e.prefix!==t.prefix||e.name!==t.name)return!1;let n=e.attrs??[],r=t.attrs??[];if(n.length!==r.length)return!1;outer:for(let e=0;e<n.length;e++){let t=n[e];for(let e=0;e<r.length;e++){let n=r[e];if(t.ns===n.ns&&t.localName===n.localName){if(t.value!==n.value)return!1;continue outer}}return!1}break}case 2:if(e.ns!==t.ns||e.name!==t.name||e.data!==t.data)return!1;break;case 7:if(e.name!==t.name||e.data!==t.data)return!1;break;case 3:case 4:case 8:if(e.data!==t.data)return!1}if(e.childCount!==t.childCount)return!1;for(let n=e.first,r=t.first;n!==null&&r!==null;n=n.next,r=r.next)if(!isEqualNode(n,r))return!1;return!0}function replaceData(e,t,n,r){let i=e.data,a=i.length;if(t>a)throw new DOMException(`The offset ${t} is greater than the node's length (${a}).`,`IndexSizeError`);t+n>a&&(n=a-t),Bi!==0&&queueCharacterDataMutationRecord(e,i),e.data=t===0&&n===a?r:i.slice(0,t)+r+i.slice(t+n),Ki!==0&&rangesReplaceData(e,t,n,r.length);let o=e.parent;o!==null&&o.flags&16&&o.node._childrenChangedSteps(),e.doc[q]++}function splitText(e,t){let n=e.data.length;if(t>n)throw new DOMException(`The offset ${t} is larger than the Text node's length.`,`IndexSizeError`);let r=n-t,i=e.data.slice(t),a=e.doc.createTextNode(i)[M],o=e.parent;return o!==null&&(insert(a,o,e.next,!1),Ki!==0&&rangesSplitText(e,a,t,o)),replaceData(e,t,r,``),a}function quote(e,t){let n=e.length>t?e.slice(0,t)+`…`:e;return JSON.stringify(n)}function ctorName(e){return e.node.constructor?.name??`Node`}function inspectNode(e,t,n,r){switch(e.type){case 1:{let t=e.prefix===null?e.name:e.prefix+`:`+e.name,n=ctorName(e)+` <`+t,r=e.attrs;if(r!==null)for(let e=0;e<r.length;e++)n+=` `+r[e].name+`=`+quote(r[e].value,40);return n+(e.first===null?` />`:`>`)}case 3:return`#text `+quote(e.data,60);case 4:return`#cdata-section `+quote(e.data,60);case 8:return`#comment `+quote(e.data,60);case 7:return`ProcessingInstruction <?`+e.name+` `+e.data.slice(0,60)+`?>`;case 9:return`#document `+quote(e.node.URL??``,80);case 10:return`<!DOCTYPE `+e.name+`>`;case 11:return e.flags&32?`#shadow-root (`+e.node.mode+`)`:`#document-fragment (`+e.childCount+(e.childCount===1?` child)`:` children)`);case 2:return`Attr `+(e.prefix===null?e.name:e.prefix+`:`+e.name)+`=`+quote(e.node.value,40)}return ctorName(e)}var Node=class extends EventTarget{static ELEMENT_NODE=1;static ATTRIBUTE_NODE=2;static TEXT_NODE=3;static CDATA_SECTION_NODE=4;static ENTITY_REFERENCE_NODE=5;static ENTITY_NODE=6;static PROCESSING_INSTRUCTION_NODE=7;static COMMENT_NODE=8;static DOCUMENT_NODE=9;static DOCUMENT_TYPE_NODE=10;static DOCUMENT_FRAGMENT_NODE=11;static NOTATION_NODE=12;static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;[M];constructor(e,t){if(t===void 0)throw TypeError(`Illegal constructor`);super(),this[M]=new NodeImpl(this,e,t??this)}get nodeType(){return this[M].type}get nodeName(){let e=this[M];switch(e.type){case 1:return htmlUppercasedQualifiedName(e);case 3:return`#text`;case 8:return`#comment`;case 2:return e.prefix===null?e.name:e.prefix+`:`+e.name;case 4:return`#cdata-section`;case 9:return`#document`;case 11:return`#document-fragment`;default:return e.name}}get baseURI(){return this[M].doc.baseURI}get isConnected(){return!!(this[M].flags&1)}get ownerDocument(){let e=this[M];return e.type===9?null:e.doc}getRootNode(e){let t=treeRoot(this[M]);if(e?.composed)for(;t.flags&32;){let e=t.node[j];t=treeRoot(e[M])}return t.node}get parentNode(){let e=this[M].parent;return e===null?null:e.node}get parentElement(){let e=this[M].parent;return e!==null&&e.type===1?e.node:null}hasChildNodes(){return this[M].first!==null}get childNodes(){return this[et]??=Ii._live(this[M])}get firstChild(){let e=this[M].first;return e===null?null:e.node}get lastChild(){let e=this[M].last;return e===null?null:e.node}get previousSibling(){let e=this[M].prev;return e===null?null:e.node}get nextSibling(){let e=this[M].next;return e===null?null:e.node}get nodeValue(){let e=this[M];switch(e.type){case 2:return attrValue(this);case 3:case 4:case 7:case 8:return e.data;default:return null}}set nodeValue(e){let t=this[M];switch(t.type){case 2:setAttrValue(this,e==null?``:String(e));return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,e==null?``:String(e));return}}get textContent(){let e=this[M];switch(e.type){case 1:case 11:return descendantTextContent(e);case 3:case 4:case 7:case 8:return e.data;case 2:return attrValue(this);default:return null}}set textContent(e){let t=this[M],n=e==null?``:String(e);switch(t.type){case 1:case 11:replaceAll(n===``?null:t.doc.createTextNode(n)[M],t);return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,n);return;case 2:setAttrValue(this,n);return}}normalize(){let e=this[M],t=e.first;for(;t!==null;){if(t.type!==3){t=nextInTree(t,e);continue}let n=t.data.length;if(n===0){let n=nextSkippingSelf(t,e);remove(t,!1),t=n;continue}let r=t.next;if(r===null||r.type!==3){t=nextInTree(t,e);continue}let i=``;for(let e=r;e!==null&&e.type===3;e=e.next)i+=e.data;replaceData(t,n,0,i);let a=r;for(;a!==null&&a.type===3;)Ki!==0&&rangesNormalizeMerge(t,a,n),n+=a.data.length,a=a.next;for(;r!==null&&r.type===3;){let e=r.next;remove(r,!1),r=e}t=nextInTree(t,e)}}cloneNode(e=!1){if(this[M].flags&32)throw new DOMException(`Shadow roots cannot be cloned.`,`NotSupportedError`);return cloneNode(this[M],this[M].doc,e).node}isEqualNode(e){return e!==null&&isEqualNode(this[M],e[M])}isSameNode(e){return this===e}compareDocumentPosition(e){if(this===e)return 0;let t=e[M],n=this[M],r=null,i=null;if(t.type===2&&(r=t,t=ownerElementImpl(t)),n.type===2&&(i=n,n=ownerElementImpl(n),r!==null&&t!==null&&n===t))for(let e of n.attrs??[]){if(e.attr?.[M]===r)return 34;if(e.attr?.[M]===i)return 36}return t===null||n===null||treeRoot(t)!==treeRoot(n)?33|(stableOrder(t??r,n??i)?2:4):r===null&&isAncestor(t,n)||i!==null&&t===n?10:i===null&&isAncestor(n,t)||r!==null&&t===n?20:precedes(t,n)?2:4}contains(e){if(e===null)return!1;let t=this[M];for(let n=e[M];n!==null;n=n.parent)if(n===t)return!0;return!1}lookupPrefix(e){if(e==null||e===``)return null;let t=namespaceContextElement(this[M]);return t===null?null:locatePrefix(t,String(e))}lookupNamespaceURI(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[M],t)}isDefaultNamespace(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[M],null)===t}insertBefore(e,t){return preInsert(e[M],this[M],t===null?null:t[M]),e}appendChild(e){return preInsert(e[M],this[M],null),e}replaceChild(e,t){return replace(t[M],e[M],this[M]),t}removeChild(e){return preRemove(e[M],this[M]),e}_getTheParent(e){return nodeGetTheParent(this,e)}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return inspectNode(this[M],e,t,n)}_replaceAll(e){replaceAll(e===null?null:e[M],this[M])}};for(let e of Object.getOwnPropertyNames(Node))/^[A-Z_]+$/.test(e)&&Object.defineProperty(Node.prototype,e,{value:Node[e],enumerable:!0});function nextSkippingSelf(e,t){let n=e;for(;n!==null&&n!==t;){if(n.next!==null)return n.next;n=n.parent}return null}function namespaceContextElement(e){switch(e.type){case 1:return e;case 9:for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t;return null;case 10:case 11:return null;case 2:return ownerElementImpl(e);default:{let t=e.parent;return t!==null&&t.type===1?t:null}}}function locatePrefix(e,t){for(let n=e;n!==null;){if(n.ns===t&&n.prefix!==null)return n.prefix;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.prefix===`xmlns`&&r.value===t)return r.localName}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function locateNamespace(e,t){let n=namespaceContextElement(e);for(;n!==null;){if(t===`xml`)return S;if(t===`xmlns`)return ce;if(n.ns!==null&&n.prefix===t)return n.ns;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.ns===`http://www.w3.org/2000/xmlns/`&&(r.prefix===`xmlns`&&r.localName===t||t===null&&r.prefix===null&&r.localName===`xmlns`))return r.value===``?null:r.value}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function ownerElementImpl(e){let t=e.node.ownerElement;return t===null?null:t[M]}function isAncestor(e,t){for(let n=t.parent;n!==null;n=n.parent)if(n===e)return!0;return!1}function precedes(e,t){let n=[];for(let t=e;t!==null;t=t.parent)n.push(t);let r=[];for(let e=t;e!==null;e=e.parent)r.push(e);let i=n.length-1,a=r.length-1;for(;i>0&&a>0&&n[i-1]===r[a-1];)i--,a--;let o=n[i-1],s=r[a-1];for(let e=o.next;e!==null;e=e.next)if(e===s)return!0;return!1}const sa=/* @__PURE__ */ new WeakMap;let ca=0;function stableOrder(e,t){let n=sa.get(e);n===void 0&&sa.set(e,n=ca++);let r=sa.get(t);return r===void 0&&sa.set(t,r=ca++),n<r}function descendantTextContent(e){let t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}function attrValue(e){let t=e[rr];return t===null?e[M].data:t.value}function setAttrValue(e,t){let n=e[rr],r=e[B];n===null||r===null?e[M].data=t:changeAttribute(r[M],n,t)}const la=/* @__PURE__ */ new Map;function htmlUppercasedQualifiedName(e){if(e.prefix===null){if(!(e.flags&2))return e.name;let t=la.get(e.name);return t===void 0&&(la.size>=1024&&la.clear(),la.set(e.name,t=asciiUppercase(e.name))),t}let t=e.prefix+`:`+e.name;return e.flags&2?asciiUppercase(t):t}function asciiUppercase(e){let t=``;for(let n=0;n<e.length;n++)if(e.charCodeAt(n)>=128){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=97&&r<=122?String.fromCharCode(r-32):e[n]}return t}return e.toUpperCase()}var Token=class{type;value;num;isInt;flag;start;constructor(e,t,n){this.type=e,this.value=t,this.num=0,this.isInt=!1,this.flag=!1,this.start=n}};function isDigit$1(e){return e>=48&&e<=57}__name(isDigit$1,`isDigit`);function isHexDigit$1(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}__name(isHexDigit$1,`isHexDigit`);function hexValue$1(e){return e<=57?e-48:e<=70?e-65+10:e-97+10}__name(hexValue$1,`hexValue`);function isIdentStart$1(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e>=128||e===0}__name(isIdentStart$1,`isIdentStart`);function isIdentChar$1(e){return isIdentStart$1(e)||isDigit$1(e)||e===45}__name(isIdentChar$1,`isIdentChar`);function isNewline$1(e){return e===10||e===13||e===12}__name(isNewline$1,`isNewline`);function isWhitespace$1(e){return e===32||e===9||isNewline$1(e)}__name(isWhitespace$1,`isWhitespace`);function isNonPrintable$1(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}__name(isNonPrintable$1,`isNonPrintable`);var Tokenizer$1=class{static{__name(this,`Tokenizer`)}src;pos;len;constructor(e){this.src=e,this.pos=0,this.len=e.length}code(e){return e>=this.len?-1:this.src.charCodeAt(e)}validEscape(e){return this.code(e)===92&&!isNewline$1(this.code(e+1))}startsIdent(e){let t=this.code(e);if(t===45){let t=this.code(e+1);return isIdentStart$1(t)||t===45||this.validEscape(e+1)}return isIdentStart$1(t)?!0:this.validEscape(e)}startsNumber(e){let t=this.code(e);if(t===43||t===45){let t=this.code(e+1);return isDigit$1(t)?!0:t===46&&isDigit$1(this.code(e+2))}return isDigit$1(t===46?this.code(e+1):t)}consumeEscape(){let e=this.code(this.pos);if(e===-1)return`�`;if(isHexDigit$1(e)){let e=0,t=0;for(;t<6&&isHexDigit$1(this.code(this.pos));)e=e*16+hexValue$1(this.code(this.pos)),this.pos++,t++;let n=this.code(this.pos);return n===13&&this.code(this.pos+1)===10?this.pos+=2:isWhitespace$1(n)&&this.pos++,e===0||e>=55296&&e<=57343||e>1114111?`�`:String.fromCodePoint(e)}if(this.pos++,e===0)return`�`;if(e>=55296&&e<=56319){let e=this.code(this.pos);if(e>=56320&&e<=57343)return this.pos++,this.src.slice(this.pos-2,this.pos)}return String.fromCharCode(e)}consumeName(){let e=``,t=this.pos,n=t;for(;;){let t=this.code(this.pos);if(t!==-1&&t!==0&&isIdentChar$1(t))this.pos++;else if(this.validEscape(this.pos))e+=this.src.slice(n,this.pos),this.pos++,e+=this.consumeEscape(),n=this.pos;else if(t===0)e+=this.src.slice(n,this.pos)+`�`,this.pos++,n=this.pos;else break}return n===t?this.src.slice(t,this.pos):e+this.src.slice(n,this.pos)}consumeNumber(e){let t=this.pos,n=!0,r=this.code(this.pos);for((r===43||r===45)&&(e.flag=!0,this.pos++);isDigit$1(this.code(this.pos));)this.pos++;if(this.code(this.pos)===46&&isDigit$1(this.code(this.pos+1)))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;if(r=this.code(this.pos),r===69||r===101){let e=this.code(this.pos+1);if(isDigit$1(e))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;else if((e===43||e===45)&&isDigit$1(this.code(this.pos+2)))for(n=!1,this.pos+=3;isDigit$1(this.code(this.pos));)this.pos++}e.num=Number(this.src.slice(t,this.pos)),e.isInt=n}consumeString(e,t){let n=``,r=this.pos;for(;;){let i=this.code(this.pos);if(i===e||i===-1)return n+=this.src.slice(r,this.pos),i!==-1&&this.pos++,new Token(5,n,t);if(isNewline$1(i))return new Token(6,``,t);if(i===92){n+=this.src.slice(r,this.pos);let e=this.code(this.pos+1);e===-1?this.pos++:isNewline$1(e)?this.pos+=e===13&&this.code(this.pos+2)===10?3:2:(this.pos++,n+=this.consumeEscape()),r=this.pos}else i===0?(n+=this.src.slice(r,this.pos)+`�`,this.pos++,r=this.pos):this.pos++}}consumeBadUrl(e){for(;;){let e=this.code(this.pos);if(e===-1)break;if(e===41){this.pos++;break}this.validEscape(this.pos)?(this.pos++,this.consumeEscape()):this.pos++}return new Token(8,``,e)}consumeUrl(e){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let t=``;for(;;){let n=this.code(this.pos);if(n===41||n===-1)return n!==-1&&this.pos++,new Token(7,t,e);if(isWhitespace$1(n)){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let n=this.code(this.pos);return n===41||n===-1?(n!==-1&&this.pos++,new Token(7,t,e)):this.consumeBadUrl(e)}if(n===34||n===39||n===40||isNonPrintable$1(n))return this.consumeBadUrl(e);if(n===92){if(this.validEscape(this.pos))this.pos++,t+=this.consumeEscape();else return this.consumeBadUrl(e)}else t+=n===0?`�`:this.src[this.pos],this.pos++}}consumeIdentLike(e){let t=this.consumeName();if(this.code(this.pos)===40){if(this.pos++,t.length===3&&asciiLower$1(t)===`url`){let n=this.pos;for(;isWhitespace$1(this.code(n))&&isWhitespace$1(this.code(n+1));)n++;let r=this.code(n),i=isWhitespace$1(r)?this.code(n+1):r;return i===34||i===39?(this.pos=n,new Token(2,t,e)):this.consumeUrl(e)}return new Token(2,t,e)}return new Token(1,t,e)}consumeNumeric(e){let t=new Token(10,``,e);return this.consumeNumber(t),this.startsIdent(this.pos)?(t.type=12,t.value=this.consumeName()):this.code(this.pos)===37&&(this.pos++,t.type=11),t}next(){for(;this.code(this.pos)===47&&this.code(this.pos+1)===42;){let e=this.src.indexOf(`*/`,this.pos+2);this.pos=e===-1?this.len:e+2}let e=this.pos,t=this.code(this.pos);if(t===-1)return new Token(0,``,e);if(isWhitespace$1(t)){for(this.pos++;isWhitespace$1(this.code(this.pos));)this.pos++;return new Token(13,` `,e)}switch(t){case 34:case 39:return this.pos++,this.consumeString(t,e);case 35:{let t=this.code(this.pos+1);if(t!==-1&&isIdentChar$1(t)||t===0||this.validEscape(this.pos+1)){this.pos++;let t=new Token(4,``,e);return t.flag=this.startsIdent(this.pos),t.value=this.consumeName(),t}return this.pos++,new Token(9,`#`,e)}case 40:return this.pos++,new Token(21,`(`,e);case 41:return this.pos++,new Token(22,`)`,e);case 43:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`+`,e));case 44:return this.pos++,new Token(18,`,`,e);case 45:return this.startsNumber(this.pos)?this.consumeNumeric(e):this.code(this.pos+1)===45&&this.code(this.pos+2)===62?(this.pos+=3,new Token(15,`-->`,e)):this.startsIdent(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`-`,e));case 46:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`.`,e));case 58:return this.pos++,new Token(16,`:`,e);case 59:return this.pos++,new Token(17,`;`,e);case 60:return this.code(this.pos+1)===33&&this.code(this.pos+2)===45&&this.code(this.pos+3)===45?(this.pos+=4,new Token(14,`<!--`,e)):(this.pos++,new Token(9,`<`,e));case 64:return this.startsIdent(this.pos+1)?(this.pos++,new Token(3,this.consumeName(),e)):(this.pos++,new Token(9,`@`,e));case 91:return this.pos++,new Token(19,`[`,e);case 92:return this.validEscape(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`\\`,e));case 93:return this.pos++,new Token(20,`]`,e);case 123:return this.pos++,new Token(23,`{`,e);case 125:return this.pos++,new Token(24,`}`,e)}if(isDigit$1(t))return this.consumeNumeric(e);if(isIdentStart$1(t)||t===0)return this.consumeIdentLike(e);if(this.pos++,t>=55296&&t<=56319){let t=this.code(this.pos);if(t>=56320&&t<=57343)return this.pos++,new Token(9,this.src.slice(this.pos-2,this.pos),e)}return new Token(9,this.src[e],e)}};function tokenize$1(e){let t=new Tokenizer$1(e),n=[];for(;;){let e=t.next();if(n.push(e),e.type===0)break}return n}__name(tokenize$1,`tokenize`);function asciiLower$1(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)return e.toLowerCase()}return e}__name(asciiLower$1,`asciiLower`);var Simple=class{kind;name;nsKind;nsPrefix;op;value;caseFlag;pseudo;a;b;list;args;constructor(e,t){this.kind=e,this.name=t,this.nsKind=0,this.nsPrefix=``,this.op=0,this.value=``,this.caseFlag=0,this.pseudo=0,this.a=0,this.b=0,this.list=null,this.args=[]}},Compound=class{simples;pseudoElementIndex;constructor(){this.simples=[],this.pseudoElementIndex=-1}},Complex=class{compounds;combinators;leading;text;invalid;constructor(){this.compounds=[],this.combinators=[],this.leading=0,this.text=``,this.invalid=!1}},SelectorList=class{items;constructor(){this.items=[]}};function allowedAfterPseudoElement(e,t){return e===3?!isStructural(t):e===2?!1:t===37||t===38||t===39||t===41||t===40||t===1||t===2||t===3}function pseudoClassId(e){switch(e){case`first-child`:return 20;case`last-child`:return 21;case`only-child`:return 22;case`first-of-type`:return 23;case`last-of-type`:return 24;case`only-of-type`:return 25;case`empty`:return 26;case`root`:return 27;case`scope`:return 28;case`host`:return 29;case`link`:return 30;case`any-link`:return 31;case`visited`:return 32;case`target`:return 34;case`target-within`:return 35;case`defined`:return 36;case`hover`:return 37;case`active`:return 38;case`focus`:return 39;case`focus-within`:return 40;case`focus-visible`:return 41;case`checked`:return 50;case`indeterminate`:return 51;case`default`:return 52;case`disabled`:return 53;case`enabled`:return 54;case`required`:return 55;case`optional`:return 56;case`read-only`:return 57;case`read-write`:return 58;case`placeholder-shown`:return 59;case`valid`:return 60;case`invalid`:return 61;case`in-range`:return 62;case`out-of-range`:return 63;case`user-valid`:return 64;case`user-invalid`:return 65;case`autofill`:return 66;case`-webkit-autofill`:return 66;case`open`:return 70;case`popover-open`:return 72;case`modal`:return 73;case`fullscreen`:return 74;case`picture-in-picture`:return 75;case`playing`:return 76;case`paused`:return 77;case`muted`:return 78;case`seeking`:return 79;case`buffering`:return 80;case`stalled`:return 81;case`volume-locked`:return 82;case`current`:return 83;case`past`:return 84;case`future`:return 85;case`has-slotted`:return 86;case`target-current`:return 87;case`heading`:return 88}return 0}function functionalPseudoClassId(e){switch(e){case`is`:return 1;case`matches`:return 1;case`-webkit-any`:return 1;case`where`:return 2;case`not`:return 3;case`has`:return 4;case`nth-child`:return 5;case`nth-last-child`:return 6;case`nth-of-type`:return 7;case`nth-last-of-type`:return 8;case`host`:return 9;case`host-context`:return 10;case`lang`:return 11;case`dir`:return 12;case`state`:return 13;case`current`:return 83;case`heading`:return 88}return 0}function isStructural(e){return e>=20&&e<=25||e===26||e===27||e===4||e>=5&&e<=8}function isKnownPseudoElement(e){switch(e){case`before`:case`after`:case`first-line`:case`first-letter`:case`marker`:case`placeholder`:case`selection`:case`backdrop`:case`file-selector-button`:case`target-text`:case`spelling-error`:case`grammar-error`:case`cue`:case`cue-region`:case`details-content`:case`checkmark`:case`picker-icon`:case`scroll-marker`:case`scroll-marker-group`:case`column`:case`view-transition`:return!0}return e.startsWith(`-webkit-`)||e.startsWith(`-moz-`)}function isKnownFunctionalPseudoElement(e){switch(e){case`slotted`:return 2;case`part`:return 3;case`highlight`:case`picker`:case`scroll-button`:case`cue`:case`cue-region`:case`view-transition-group`:case`view-transition-image-pair`:case`view-transition-old`:case`view-transition-new`:return 4}return 0}function isLegacyPseudoElement(e){return e===`before`||e===`after`||e===`first-line`||e===`first-letter`}var SelectorParser=class{src;toks;i;error;constructor(e){this.src=e,this.toks=tokenize$1(e),this.i=0,this.error=``}fail(e){this.error===``&&(this.error=e)}peek(){return this.toks[this.i]}peekType(){return this.toks[this.i].type}isDelim(e){let t=this.toks[this.i];return t.type===9&&t.value===e}isDelimAt(e,t){let n=this.toks[e];return n.type===9&&n.value===t}skipWs(){for(;this.toks[this.i].type===13;)this.i++}expectClose(e){let t=this.toks[this.i].type;return t===e?(this.i++,!0):t===0||(this.fail(`expected closing bracket`),!1)}parseSelectorList(){let e=this.parseComplexList(0,!1);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseRelativeSelectorList(){let e=this.parseComplexList(3,!0);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseComplexList(e,t){let n=new SelectorList;for(;;){this.skipWs();let r=this.parseComplex(e,t);if(r===null)return null;if(n.items.push(r),this.skipWs(),this.peekType()===18)this.i++;else break}return n}parseForgivingList(e){let t=new SelectorList;for(;;){this.skipWs();let n=this.peekType();if(n===22||n===0){if(t.items.length!==0){let e=new Complex;e.invalid=!0,t.items.push(e)}break}let r=this.i,i=this.error,a=this.parseComplex(e,!1);this.skipWs();let o=this.peekType();if(a!==null&&(o===18||o===22||o===0))t.items.push(a);else{if(this.error=i,this.i=r,!this.skipToTopLevelCommaOrClose())return this.fail(`unterminated block in forgiving selector list`),t;let e=new Complex;e.invalid=!0,e.text=trimWs(this.src.slice(this.toks[r].start,this.peek().start)),t.items.push(e)}if(this.peekType()===18)this.i++;else break}return t}skipToTopLevelCommaOrClose(){let e=[];for(;;){let t=this.peekType();if(t===0)return e.length===0;if(e.length===0&&(t===18||t===22))return!0;t===2||t===21?e.push(22):t===19?e.push(20):t===23?e.push(24):e.length!==0&&t===e[e.length-1]&&e.pop(),this.i++}}parseCombinator(){let e=!1;for(;this.peekType()===13;)this.i++,e=!0;let t=this.peek();if(t.type===9){if(t.value===`>`)return this.i++,this.skipWs(),2;if(t.value===`+`)return this.i++,this.skipWs(),3;if(t.value===`~`)return this.i++,this.skipWs(),4}return+!!e}parseComplex(e,t){let n=new Complex,r=this.peek().start;if(t){let e=this.parseCombinator();n.leading=e===0?1:e}for(;;){let t=this.parseCompound(e);if(t===null)return null;n.compounds.push(t);let r=this.i,i=this.parseCombinator(),a=this.peekType();if(i===0||a===18||a===22||a===0){if(i!==0&&i!==1)return this.fail(`dangling combinator`),null;this.i=r;break}if(t.pseudoElementIndex!==-1)return this.fail(`combinator after pseudo-element`),null;if(e&12)return this.fail(`expected a compound selector`),null;n.combinators.push(i)}let i=this.peek().start;return n.text=trimWs(this.src.slice(r,i)),n}parseTypeSelector(e){let t=this.peek(),n=0,r=``;if(t.type===9&&t.value===`|`){let e=this.toks[this.i+1];if(e.type===1||e.type===9&&e.value===`*`)n=2,this.i++;else return!1}else if((t.type===1||t.type===9&&t.value===`*`)&&this.isDelimAt(this.i+1,`|`)){let e=this.toks[this.i+2];(e.type===1||e.type===9&&e.value===`*`)&&(t.type===1?(n=3,r=t.value):n=1,this.i+=2)}let i=this.peek();if(i.type===1){let t=new Simple(1,i.value);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}if(i.type===9&&i.value===`*`){let t=new Simple(2,`*`);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}return n!==0&&this.fail(`expected a type selector after namespace prefix`),!1}parseCompound(e){let t=new Compound,n=!!(e&8);if(n||this.parseTypeSelector(t),this.error!==``)return null;for(;;){let r=this.peek(),i=t.pseudoElementIndex!==-1;if(n&&r.type!==16)break;if(r.type===4){if(i)break;if(!r.flag)return this.fail(`invalid id selector`),null;t.simples.push(new Simple(3,r.value)),this.i++}else if(r.type===9&&r.value===`.`){if(i)break;let e=this.toks[this.i+1];if(e.type!==1)return this.fail(`invalid class selector`),null;t.simples.push(new Simple(4,e.value)),this.i+=2}else if(r.type===19){if(i)break;this.i++;let e=this.parseAttribute();if(e===null)return null;t.simples.push(e)}else if(r.type===16){if(this.toks[this.i+1].type===16){if(this.i+=2,e&2)return this.fail(`pseudo-element not allowed here`),null;let n=this.parsePseudoElement(e);if(n===null)return null;if(t.pseudoElementIndex===-1)t.pseudoElementIndex=t.simples.length;else if(!this.chainablePseudoElement(t,n))return this.fail(`invalid pseudo-element chain`),null;t.simples.push(n)}else{this.i++;let n=this.parsePseudoClass(i?e|8:e);if(n===null)return null;if(n.kind===7){if(e&2||i)return this.fail(`pseudo-element not allowed here`),null;t.pseudoElementIndex=t.simples.length}else if(i&&!allowedAfterPseudoElement(this.lastPseudoElement(t),n.pseudo))return this.fail(`pseudo-class not allowed after pseudo-element`),null;t.simples.push(n)}}else break}return t.simples.length===0?(this.fail(`expected a selector`),null):t}lastPseudoElement(e){for(let t=e.simples.length-1;t>=0;t--){let n=e.simples[t];if(n.kind===7)return n.pseudo}return 0}chainablePseudoElement(e,t){let n=null;for(let t=e.simples.length-1;t>=0;t--){let r=e.simples[t];if(r.kind===7){n=r;break}}return n===null?!0:n.pseudo===3||n.pseudo===2?t.pseudo===1||t.pseudo===4:!1}parseAttribute(){this.skipWs();let e=new Simple(5,``),t=this.peek();t.type===9&&t.value===`|`&&this.toks[this.i+1].type===1?(e.nsKind=2,this.i++):t.type===9&&t.value===`*`&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1?(e.nsKind=1,this.i+=2):t.type===1&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1&&(e.nsKind=3,e.nsPrefix=t.value,this.i+=2);let n=this.peek();if(n.type!==1)return this.fail(`expected attribute name`),null;e.name=n.value,this.i++,this.skipWs();let r=this.peek();if(r.type===20||r.type===0)return r.type===20&&this.i++,e;if(r.type!==9)return this.fail(`expected attribute matcher`),null;let i=-1;if(r.value===`=`)i=1,this.i++;else if(this.isDelimAt(this.i+1,`=`)){switch(r.value){case`~`:i=2;break;case`|`:i=3;break;case`^`:i=4;break;case`$`:i=5;break;case`*`:i=6}i!==-1&&(this.i+=2)}if(i===-1)return this.fail(`invalid attribute matcher`),null;e.op=i,this.skipWs();let a=this.peek();if(a.type!==1&&a.type!==5)return this.fail(`expected attribute value`),null;e.value=a.value,this.i++,this.skipWs();let o=this.peek();if(o.type===1){let t=asciiLower$1(o.value);if(t===`i`)e.caseFlag=1;else if(t===`s`)e.caseFlag=2;else return this.fail(`invalid attribute modifier`),null;this.i++,this.skipWs()}return this.expectClose(20)?e:null}parsePseudoClass(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);this.i++;let n=pseudoClassId(e);if(n!==0){let t=new Simple(6,e);return t.pseudo=n,t}if(isLegacyPseudoElement(e)){let t=new Simple(7,e);return t.pseudo=1,t}return this.fail(`unknown pseudo-class :`+e),null}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=functionalPseudoClassId(n);if(r===0)return this.fail(`unknown pseudo-class :`+n+`()`),null;let i=new Simple(6,n);return i.pseudo=r,this.parsePseudoClassArgs(i,e)?i:null}return this.fail(`expected pseudo-class name`),null}parsePseudoClassArgs(e,t){let n=e.pseudo;if(n===1||n===2)return e.list=this.parseForgivingList(t|2),this.error===``&&this.expectClose(22);if(n===3){if(this.skipWs(),this.peekType()===22)return this.fail(`:not() requires an argument`),!1;let n=this.parseComplexList(t|2,!1);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===4){if(t&1)return this.fail(`:has() cannot be nested`),!1;if(this.skipWs(),this.peekType()===22)return this.fail(`:has() requires an argument`),!1;let n=this.parseComplexList(t|3,!0);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===5||n===6||n===7||n===8){if(this.skipWs(),!this.parseAnPlusB(e))return!1;this.clampAnb(e),this.skipWs();let r=this.peek();if((n===5||n===6)&&r.type===1&&asciiLower$1(r.value)===`of`){if(this.i++,this.peekType()!==13)return this.fail(`expected whitespace after 'of'`),!1;this.skipWs();let n=this.parseComplexList(t|2,!1);if(n===null)return!1;e.list=n,this.skipWs()}return this.expectClose(22)}if(n===9||n===10){this.skipWs();let n=this.parseComplexList(t|6,!1);return n===null?!1:n.items.length===1?(e.list=n,this.skipWs(),this.expectClose(22)):(this.fail(`expected a single compound selector`),!1)}if(n===11){for(;;){this.skipWs();let t=this.peek();if(t.type===1||t.type===5)e.args.push(t.value),this.i++;else return this.fail(`expected language range`),!1;if(this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}if(n===12||n===13){this.skipWs();let t=this.peek();return t.type===1?(e.args.push(n===12?asciiLower$1(t.value):t.value),this.i++,this.skipWs(),this.expectClose(22)):(this.fail(`expected identifier`),!1)}if(n===88){for(;;){this.skipWs();let t=this.peek();if(t.type!==10||!t.isInt)return this.fail(`expected heading level`),!1;if(e.args.push(String(t.num)),this.i++,this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}return n===83?(e.list=this.parseForgivingList(t|2),this.expectClose(22)):(this.fail(`unsupported functional pseudo-class`),!1)}parsePseudoElement(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);if(this.i++,!isKnownPseudoElement(e))return this.fail(`unknown pseudo-element ::`+e),null;let n=new Simple(7,e);return n.pseudo=1,n}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=isKnownFunctionalPseudoElement(n);if(r===0)return this.fail(`unknown pseudo-element ::`+n+`()`),null;let i=new Simple(7,n);if(i.pseudo=r,this.skipWs(),r===2){let t=this.parseComplexList(e|6,!1);if(t===null)return null;if(t.items.length!==1)return this.fail(`expected a single compound selector`),null;i.list=t}else{for(;this.peekType()===1;)i.args.push(this.peek().value),this.i++,this.skipWs();if(r===3&&i.args.length===0)return this.fail(`::part() requires an identifier`),null;if(this.peekType()!==22&&this.peekType()!==0){if(r===3)return this.fail(`invalid ::part() argument`),null;this.skipToTopLevelCommaOrClose()}}return this.skipWs(),this.expectClose(22)?i:null}return this.fail(`expected pseudo-element name`),null}parseAnPlusB(e){let t=this.peek();if(t.type===1){let n=asciiLower$1(t.value);if(n===`odd`)return e.a=2,e.b=1,this.i++,!0;if(n===`even`)return e.a=2,e.b=0,this.i++,!0}if(t.type===10)return t.isInt?(e.a=0,e.b=t.num,this.i++,!0):this.anbFail();let n=0,r=``;if(t.type===12){if(!t.isInt)return this.anbFail();let e=asciiLower$1(t.value);if(e.charCodeAt(0)!==110)return this.anbFail();n=t.num,r=e.slice(1),this.i++}else if(t.type===1){let e=asciiLower$1(t.value);if(e.charCodeAt(0)===110)n=1,r=e.slice(1);else if(e.charCodeAt(0)===45&&e.charCodeAt(1)===110)n=-1,r=e.slice(2);else return this.anbFail();this.i++}else if(t.type===9&&t.value===`+`){let e=this.toks[this.i+1];if(e.type!==1)return this.anbFail();let t=asciiLower$1(e.value);if(t.charCodeAt(0)!==110)return this.anbFail();n=1,r=t.slice(1),this.i+=2}else return this.anbFail();if(e.a=n,r===``){let t=this.i;this.skipWs();let n=this.peek();if(n.type===10&&n.isInt&&n.flag)return e.b=n.num,this.i++,!0;if(n.type===9&&(n.value===`+`||n.value===`-`)){this.i++,this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=n.value===`-`?-t.num:t.num,this.i++,!0):this.anbFail()}return this.i=t,e.b=0,!0}if(r===`-`){this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=-t.num,this.i++,!0):this.anbFail()}if(r.charCodeAt(0)===45&&r.length>1){let t=0;for(let e=1;e<r.length;e++){let n=r.charCodeAt(e);if(!isDigit$1(n))return this.anbFail();t=t*10+(n-48)}return e.b=-t,!0}return this.anbFail()}clampAnb(e){e.a>2147483647?e.a=2147483647:e.a<-2147483648&&(e.a=-2147483648),e.b>2147483647?e.b=2147483647:e.b<-2147483648&&(e.b=-2147483648)}anbFail(){return this.fail(`invalid An+B`),!1}};function trimWs(e){let t=0,n=e.length;for(;t<n&&isWhitespace$1(e.charCodeAt(t));)t++;for(;n>t&&isWhitespace$1(e.charCodeAt(n-1));)n--;return t===0&&n===e.length?e:e.slice(t,n)}function wrapperProp(e,t){return e.node[t]}const ua={hovered:null,active:null};function shadowHost(e){let t=wrapperProp(e,j);return t==null?null:t[M]}function parentOrHost$1(e){let t=e.parent;return t===null?null:t.flags&32?shadowHost(t):t}__name(parentOrHost$1,`parentOrHost`);function isShadowIncludingInclusiveAncestor$3(e,t){for(;t!==null;t=parentOrHost$1(t))if(t===e)return!0;return!1}__name(isShadowIncludingInclusiveAncestor$3,`isShadowIncludingInclusiveAncestor`);function hover(e){let t=ua.hovered;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function active(e){let t=ua.active;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function anyLink(e){return e.tag===X.a||e.tag===X.area?attr(e,`href`)!==null:e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`&&e.attrs!==null&&(attr(e,`href`)!==null||findAttributeByNamespace(e,`http://www.w3.org/1999/xlink`,`href`)!==null)}function never(e){return!1}function targetElement(e){let t=e.doc[K],n=t.indexOf(`#`);if(n===-1||n===t.length-1)return null;let r=t.slice(n+1);try{r=decodeURIComponent(r)}catch{}let i=e.doc,a=i._idLookup(r);if(a!==null)return a;let o=i[M];for(let e=o.first;e!==null;e=nextInTree(e,o))if(e.type===1&&e.tag===X.a&&attr(e,`name`)===r)return e;return null}function target(e){return e.doc[K].indexOf(`#`)!==-1&&targetElement(e)===e}function targetWithin(e){if(e.doc[K].indexOf(`#`)===-1)return!1;let t=targetElement(e);return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function inputTypeName(e){let t=attr(e,`type`);if(t===null)return`text`;let n=asciiLowercase$1(t);switch(n){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`date`:case`month`:case`week`:case`time`:case`datetime-local`:case`number`:case`range`:case`color`:case`checkbox`:case`radio`:case`file`:case`submit`:case`image`:case`reset`:case`button`:return n}return`text`}function isHTML(e){return e.tag!==0}function controlValue$1(e){let t=wrapperProp(e,`value`);if(typeof t==`string`)return t;if(e.tag===X.textarea){let t=``;for(let n=e.first;n!==null;n=n.next)n.type===3&&(t+=n.data);return t}return attr(e,`value`)??``}__name(controlValue$1,`controlValue`);function open(e){return(e.tag===X.details||e.tag===X.dialog)&&attr(e,`open`)!==null}function isMedia(e){return e.tag===X.audio||e.tag===X.video}function paused(e){return isMedia(e)&&wrapperProp(e,`paused`)!==!1}function playing(e){return isMedia(e)&&wrapperProp(e,`paused`)===!1}function muted(e){if(!isMedia(e))return!1;let t=wrapperProp(e,`muted`);return typeof t==`boolean`?t:attr(e,`muted`)!==null}function customState(e,t){let n=da.of(e);return n!==null&&n.has(t)}const da={of:e=>null};function elementLanguage(e){for(let t=e;t!==null;t=parentOrHost$1(t)){if(t.type!==1)continue;let e=t.attrs;if(e===null)continue;let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(i.ns===`http://www.w3.org/XML/1998/namespace`&&i.localName===`lang`)return i.value;(i.ns===null&&i.localName===`lang`&&t.flags&2||i.ns===null&&i.localName===`lang`&&t.tag!==0)&&(n=i.value)}if(n!==null)return n}return null}function extendedFilter(e,t){if(e===``)return t===``;if(t===``)return!1;let n=asciiLowercase$1(e).split(`-`),r=asciiLowercase$1(t).split(`-`);for(let e=0;e<r.length;e++)if(r[e].length>8||r[e].length===0)return!1;if(n[0]!==`*`&&n[0]!==r[0])return!1;let i=1,a=1;for(;i<n.length;)if(n[i]===`*`)i++;else{if(a>=r.length)return!1;if(n[i]===r[a])i++,a++;else{if(r[a].length===1)return!1;a++}}return!0}function matchesLang(e,t){let n=elementLanguage(e);if(n===null)return!1;for(let e=0;e<t.length;e++)if(extendedFilter(t[e],n))return!0;return!1}function strongDirection(e){return e>=65&&e<=90||e>=97&&e<=122?1:e<192?0:e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65278||e>=67584&&e<=69631||e>=124928&&e<=126975?2:e===215||e===247||e>=8192&&e<=11263||e>=12288&&e<=12351||e>=65024&&e<=65135?0:1}function textDirection(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n>65535&&t++;let r=strongDirection(n);if(r!==0)return r}return 0}function hasValidDir(e){let t=attr(e,`dir`);if(t===null)return!1;let n=asciiLowercase$1(t);return n===`ltr`||n===`rtl`||n===`auto`}function autoDirectionality(e){if(e.tag===X.textarea||e.tag===X.input&&usesValueForDirectionality(inputTypeName(e))){let t=textDirection(controlValue$1(e));return t===0?1:t}if(e.tag===X.input)return 0;for(let t=e.first;t!==null;){if(t.type===1){if(t.tag===X.bdi||t.tag===X.script||t.tag===X.style||t.tag===X.textarea||hasValidDir(t)){t=nextSkippingChildren(t,e);continue}}else if(t.type===3){let e=textDirection(t.data);if(e!==0)return e}t=nextInTree(t,e)}return 0}function directionality(e){for(let t=e;t!==null&&t.type===1;){let e=isHTML(t)?attr(t,`dir`):null,n=e===null?null:asciiLowercase$1(e);if(n!==null&&n!==`ltr`&&n!==`rtl`&&n!==`auto`&&(n=t.tag===X.bdi?`auto`:null),n!==null){let e=n;if(e===`ltr`)return 1;if(e===`rtl`)return 2;if(e===`auto`){let e=autoDirectionality(t);if(e!==0)return e;if(t.tag===X.input||t.tag===X.textarea)return 1}}else if(t.tag===X.bdi){let e=autoDirectionality(t);return e===0?1:e}else if(t.tag===X.input&&inputTypeName(t)===`tel`)return 1;let r=parentOrHost$1(t);if(r===null||r.type===9)break;t=r}return 1}function usesValueForDirectionality(e){switch(e){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`submit`:case`reset`:case`button`:return!0}return!1}const fa={hover,active,focus:never,"focus-within":never,"focus-visible":never,link:anyLink,"any-link":anyLink,visited:never,target,"target-within":targetWithin,defined:never,checked:never,indeterminate:never,default:never,disabled:never,enabled:never,required:never,optional:never,"read-only":never,"read-write":never,"placeholder-shown":never,valid:never,invalid:never,"in-range":never,"out-of-range":never,"user-valid":never,"user-invalid":never,autofill:never,"-webkit-autofill":never,open,"popover-open":never,modal:never,fullscreen:never,"picture-in-picture":never,playing,paused,muted,seeking:never,buffering:never,stalled:never,"volume-locked":never,current:never,past:never,future:never,"has-slotted":never,"target-current":never};function hash(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n^n>>>16)&4095}function tagHash(e){return hash(e,625341585)}function idHash(e){return hash(e,1821285621)}function classHash(e){return hash(e,461845907)}const pa=[];function elementTagHash(e){if(e.tag!==0&&e.flags&2){let t=pa[e.tag];return t===void 0?pa[e.tag]=tagHash(e.name):t}return tagHash(asciiLowercase$1(e.name))}let ma=/* @__PURE__ */ new Int32Array,ha=0;const ga=[];function buildAncestorFilter(e){(++ha===2147483647||ma.length===0)&&(ma.length===0?ma=/* @__PURE__ */ new Int32Array(4096):ma.fill(0),ha=1);let t=ha,n=0;for(let r=e.parent;r!==null&&r.type===1;r=r.parent){let e=elementTagHash(r);if(ma[e]=t,ga[n++]=e,r.id!==``){let e=idHash(r.id);ma[e]=t,ga[n++]=e}if(r.attrs!==null){let e=classTokens(r);for(let r=0;r<e.length;r++){let i=classHash(e[r]);ma[i]=t,ga[n++]=i}}}return ga.length=n,ga}function mayMatchAncestors(e,t,n,r){let i=ha;return e<0?!0:ma[e]===i?t<0?!0:ma[t]===i?n<0?!0:ma[n]===i?r<0||ma[r]===i:!1:!1:!1}const _a=/* @__PURE__ */ new Set(/* @__PURE__ */ `accept.accept-charset.align.alink.axis.bgcolor.charset.checked.clear.codetype.color.compact.declare.defer.dir.direction.disabled.enctype.face.frame.hreflang.http-equiv.lang.language.link.media.method.multiple.nohref.noresize.noshade.nowrap.readonly.rel.rev.rules.scope.scrolling.selected.shape.target.text.type.valign.valuetype.vlink`.split(`.`)),va=/* @__PURE__ */ new Set([30,31,32,53,54,55,56,57,58,52,70]);var Test=class{op;name;lower;nsCheck;ns;attrOp;value;valueLower;valueCase;a;b;list;fn;args;memoEl;memoIdx;memoVersion;memoParent;memoCount;memoCountVersion;volatileTest;constructor(e){this.op=e,this.name=``,this.lower=``,this.nsCheck=!1,this.ns=null,this.attrOp=0,this.value=``,this.valueLower=``,this.valueCase=0,this.a=0,this.b=0,this.list=null,this.fn=null,this.args=ya,this.memoEl=null,this.memoIdx=0,this.memoVersion=-1,this.memoParent=null,this.memoCount=0,this.memoCountVersion=-1,this.volatileTest=!1}};const ya=[];var CComplex=class{comps;combs;last;leading;hasDomain;pseudoElement;specificity;text;fn;constructor(){this.comps=[],this.combs=[],this.last=0,this.leading=0,this.hasDomain=0,this.pseudoElement=``,this.specificity=0,this.text=``,this.fn=e=>{let t=complexFn(this,0);return this.fn=t,t(e)}}},CList=class{items;fn;constructor(){this.items=[],this.fn=e=>{let t=listFn(this);return this.fn=t,t(e)}}},CompileInfo=class{volatile;usesScope;nthTests;resolve;defaultNs;error;forgivingDropped;constructor(){this.volatile=!1,this.usesScope=!1,this.nthTests=[],this.resolve=null,this.defaultNs=void 0,this.error=``,this.forgivingDropped=!1}};function unpackSpecificity(e){return[Math.floor(e/1048576),Math.floor(e/1024)%1024,e%1024]}function listSpecificity(e){if(e===null)return 0;let t=0;for(let n=0;n<e.items.length;n++){if(e.items[n].invalid)continue;let r=complexSpecificity(e.items[n]);r>t&&(t=r)}return t}function complexSpecificity(e){let t=0;for(let n=0;n<e.compounds.length;n++)t+=compoundSpecificity(e.compounds[n]);return t}const ba=1024;function compoundSpecificity(e){let t=0;for(let n=0;n<e.simples.length;n++){let r=e.simples[n];switch(r.kind){case 3:t+=1048576;break;case 4:case 5:t+=ba;break;case 1:t+=1;break;case 2:break;case 7:t+=1+listSpecificity(r.list);break;case 6:switch(r.pseudo){case 2:break;case 1:case 3:case 4:case 83:t+=listSpecificity(r.list);break;case 5:case 6:case 9:case 10:t+=ba+listSpecificity(r.list);break;default:t+=ba}}}return t}function fail(e,t){e.error===``&&(e.error=t)}function resolvePrefix(e,t){return e.resolve===null?void 0:e.resolve(t)}function compileList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];i.invalid||n.items.push(compileComplex(i,t))}return n}function compileForgivingList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];if(i.invalid){t.forgivingDropped=!0;continue}let a=t.error,o=compileComplex(i,t);t.error===a?n.items.push(o):(t.error=a,t.forgivingDropped=!0)}return n}function compileComplex(e,t){let n=new CComplex,r=e.compounds.length;for(let i=r-1;i>=0;i--){let a=e.compounds[i];n.comps.push(compileCompound(a,t,n,i===r-1)),i>0&&n.combs.push(e.combinators[i-1])}return n.last=r-1,n.leading=e.leading,n.specificity=complexSpecificity(e),n.text=e.text,e.leading!==0&&(n.hasDomain=hasDomain(e)),n}function hasDomain(e){let t=!1;for(let n=0;n<e.combinators.length;n++){let r=e.combinators[n];(r===2||r===1)&&(t=!0)}switch(e.leading){case 2:return t?1:2;case 1:return 1;case 3:return t?5:e.combinators.length===0?3:4;default:return t?5:4}}function compileCompound(e,t,n,r){let i=[],a=e.pseudoElementIndex===-1?e.simples.length:e.pseudoElementIndex;for(let o=0;o<e.simples.length;o++){let s=e.simples[o];if(o>=a&&s.kind===7){r&&(n.pseudoElement=n.pseudoElement===``?s.name:n.pseudoElement+`::`+s.name);continue}let c=compileSimple(s,t);c!==null&&i.push(c)}if(t.defaultNs!==void 0&&needsImpliedNamespace(e,a)){let e=new Test(1);e.nsCheck=!0,e.ns=t.defaultNs,i.push(e)}return i}function needsImpliedNamespace(e,t){let n=t>0;for(let r=0;r<t;r++){let t=e.simples[r];if(t.kind===1||t.kind===2)return!1;(t.kind!==6||t.pseudo!==29&&t.pseudo!==9&&t.pseudo!==10)&&(n=!1)}return!n}function compileSimple(e,t){switch(e.kind){case 2:case 1:{let n=!1,r=null;switch(e.nsKind){case 0:t.defaultNs!==void 0&&(n=!0,r=t.defaultNs);break;case 1:break;case 2:n=!0,r=null;break;case 3:{let i=resolvePrefix(t,e.nsPrefix);if(i===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);n=!0,r=i;break}}if(e.kind===2){if(!n)return null;let e=new Test(1);return e.nsCheck=!0,e.ns=r,e}let i=new Test(2);return i.name=e.name,i.lower=asciiLowercase$1(e.name),i.a=tagId(i.lower),i.nsCheck=n,i.ns=r,i}case 3:{let t=new Test(3);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 4:{let t=new Test(4);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 5:return compileAttribute(e,t);case 6:return compilePseudoClass(e,t);case 7:return null}return null}function compileAttribute(e,t){let n=new Test(5);switch(n.name=e.name,n.lower=asciiLowercase$1(e.name),e.nsKind){case 0:case 2:n.nsCheck=!1;break;case 1:n.nsCheck=!0,n.ns=`*`;break;case 3:{let r=resolvePrefix(t,e.nsPrefix);if(r===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);r===null?n.nsCheck=!1:(n.nsCheck=!0,n.ns=r);break}}return n.attrOp=e.op,n.value=e.value,n.valueLower=asciiLowercase$1(e.value),n.valueCase=e.caseFlag===1?1:e.caseFlag===2?0:_a.has(n.lower)?2:0,(e.op===4||e.op===5||e.op===6)&&e.value===``||e.op===2&&(e.value===``||hasWhitespace(e.value))?new Test(0):n}function hasWhitespace(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===32||n===9||n===10||n===12||n===13)return!0}return!1}function compilePseudoClass(e,t){switch(e.pseudo){case 1:case 2:case 83:{let n=new Test(7);return n.list=compileForgivingList(e.list,t),n}case 3:{let n=new Test(8);return n.list=compileList(e.list,t),n}case 4:{let n=new Test(9);return n.list=compileList(e.list,t),n}case 5:case 6:case 7:case 8:return nthTest(e.pseudo,e.a,e.b,e.list,t);case 20:return nthTest(5,0,1,null,t);case 21:return nthTest(6,0,1,null,t);case 23:return nthTest(7,0,1,null,t);case 24:return nthTest(8,0,1,null,t);case 22:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(5,0,1,null,t),nthTest(6,0,1,null,t)]),n.items.push(r),e.list=n,e}case 25:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(7,0,1,null,t),nthTest(8,0,1,null,t)]),n.items.push(r),e.list=n,e}case 26:return new Test(14);case 27:return new Test(15);case 28:return t.usesScope=!0,new Test(16);case 29:return new Test(20);case 9:case 10:{let n=new Test(e.pseudo===9?21:22);return n.list=compileList(e.list,t),n}case 11:{let t=new Test(17);return t.args=e.args,t}case 12:{t.volatile=!0;let n=e.args[0];if(n!==`ltr`&&n!==`rtl`)return new Test(0);let r=new Test(18);return r.volatileTest=!0,r.a=n===`rtl`?2:1,r}case 88:{let t=new Test(23);return t.args=e.args,t}case 13:{t.volatile=!0;let n=new Test(19);return n.volatileTest=!0,n.name=e.args[0],n}}let n=fa[e.name];if(n===void 0)return fail(t,`unsupported pseudo-class :`+e.name),new Test(0);let r=new Test(6);return va.has(e.pseudo)||(t.volatile=!0,r.volatileTest=!0),r.fn=n,r.name=e.name,r}function nthTest(e,t,n,r,i){let a=new Test(e===5?10:e===6?11:e===7?12:13);return a.a=t,a.b=n,r!==null&&(a.list=compileList(r,i)),i.nthTests.push(a),a}function resetMemos(e){let t=e.nthTests;for(let e=0;e<t.length;e++){let n=t[e];n.memoEl=null,n.memoParent=null,n.memoVersion=-1,n.memoCountVersion=-1}}var StateDeps=class{tests;els;results;constructor(){this.tests=[],this.els=[],this.results=[]}};let xa=!1,Sa=null;function logDep(e,t,n){let r=Sa??=new StateDeps;r.tests.push(e),r.els.push(t),r.results.push(n)}function beginStateDeps(){let e=xa?Sa:!1;return xa=!0,Sa=null,e}function endStateDeps(e){let t=Sa;if(e===!1)xa=!1,Sa=null;else if(Sa=e,t!==null)for(let e=0;e<t.tests.length;e++)logDep(t.tests[e],t.els[e],t.results[e]);return t}function stateDepsHold(e){let t=xa;xa=!1;let n=!0,r=e.tests;for(let t=0;t<r.length;t++)if(matchTest(r[t],e.els[t])!==e.results[t]){n=!1;break}return xa=t,n}let Ca=null,wa=null,Ta=null;function setScope(e){let t=Ca;return Ca=e,t}function setHostContext(e){let t=Ta;return Ta=e,t}function matchList(e,t){return e.fn(t)}function matchComplex(e,t){return e.fn(t)}const NEVER=()=>!1,ALWAYS=()=>!0;function listFn(e){let t=e.items;if(t.length===0)return NEVER;if(t.length===1){let e=t[0];return t=>e.fn(t)}let n=tagDispatch(t);return n===null?e=>{for(let n=0;n<t.length;n++)if(t[n].fn(e))return!0;return!1}:n}function subjectTagTest(e){if(e.leading!==0)return null;let t=e.comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2)return!n.nsCheck&&n.a!==0?n:null}return null}function tagDispatch(e){let t=0,n=0;for(let r=0;r<e.length;r++){let i=subjectTagTest(e[r]);i!==null&&(n++,i.a>t&&(t=i.a))}if(n===0)return null;let r=new Uint8Array(t+1),i=Array(t+1).fill(void 0),a=[];for(let t=0;t<e.length;t++){let n=e[t],o=subjectTagTest(n);o===null?a.push(n):n.last===0&&n.comps[0].length===1?r[o.a]=1:(i[o.a]??=[]).push(n)}return n=>{if(!(n.flags&2)){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0;return!1}let o=n.tag;if(o!==0&&o<=t){if(r[o]===1)return!0;let e=i[o];if(e!==void 0){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0}}for(let e=0;e<a.length;e++)if(a[e].fn(n))return!0;return!1}}function testFn(e){switch(e.op){case 2:{let t=e.lower,n=e.name;if(!e.nsCheck)return e=>e.flags&2?e.name===t:e.name===n;let r=e.ns;return e=>(e.flags&2?e.name===t:e.name===n)&&e.ns===r}case 4:{let t=e.name;return n=>{let r=classTokens(n);for(let e=0;e<r.length;e++)if(r[e]===t)return!0;return r.length!==0&&isQuirks$1(n.doc)&&quirksClassMatch(r,e.lower)}}case 3:{let t=e.name,n=e.lower;return e=>e.id===t||e.id!==``&&isQuirks$1(e.doc)&&asciiLowercase$1(e.id)===n}case 5:{if(e.nsCheck||e.valueCase!==0||e.attrOp!==0&&e.attrOp!==1)return t=>matchAttribute(e,t);let t=e.lower,n=e.name;if(e.attrOp===0)return e=>{let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t:n;for(let e=0;e<r.length;e++)if(r[e].localName===i&&r[e].ns===null)return!0;return!1};let r=e.value;return e=>{let i=e.attrs;if(i===null)return!1;let a=e.flags&2?t:n;for(let e=0;e<i.length;e++){let t=i[e];if(t.localName===a&&t.ns===null)return t.value===r}return!1}}case 1:{let t=e.ns;return e=>e.ns===t}case 6:return e.volatileTest?t=>matchTest(e,t):e.fn;case 7:{let t=e.list;return e=>t.fn(e)}case 8:{let t=e.list;return e=>!t.fn(e)}case 9:{let t=e.list;return e=>matchHas(t,e)}case 10:case 11:case 12:case 13:return t=>matchNth(e,t);case 16:return e=>e===Ca;case 0:return NEVER}return t=>matchTest(e,t)}function compoundFn(e){switch(e.length){case 0:return ALWAYS;case 1:return testFn(e[0]);case 2:{let t=testFn(e[0]),n=testFn(e[1]);return e=>t(e)&&n(e)}case 3:{let t=testFn(e[0]),n=testFn(e[1]),r=testFn(e[2]);return e=>t(e)&&n(e)&&r(e)}}let t=e.map(testFn);return e=>{for(let n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}}function complexFn(e,t){let n=compoundFn(e.comps[t]);if(t===e.last){if(e.leading===0)return n;let t=e.leading;return e=>n(e)&&relatesToAnchor(t,e)}let r=t+1,i=complexFn(e,r);switch(e.combs[t]){case 1:return t=>{if(!n(t))return!1;for(let n=t.parent;n!==null;n=n.parent){if(n.type!==1)return hostStep(e,r,n);if(i(n))return!0}return!1};case 2:return t=>{if(!n(t))return!1;let a=t.parent;return a===null?!1:a.type===1?i(a):hostStep(e,r,a)};case 3:return e=>{if(!n(e))return!1;let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t!==null&&i(t)};case 4:return e=>{if(!n(e))return!1;for(let t=e.prev;t!==null;t=t.prev)if(t.type===1&&i(t))return!0;return!1}}return NEVER}function hostStep(e,t,n){if(!(n.flags&32)||t!==e.last)return!1;let r=shadowHost(n);if(r===null)return!1;let i=Ta;Ta=r;let a=matchCompound(e.comps[t],r)&&(e.leading===0||relatesToAnchor(e.leading,r));return Ta=i,a}function relatesToAnchor(e,t){let n=wa;if(n===null)return!1;switch(e){case 2:return t.parent===n;case 1:for(let e=t.parent;e!==null;e=e.parent)if(e===n)return!0;return!1;case 3:{let e=t.prev;for(;e!==null&&e.type!==1;)e=e.prev;return e===n}case 4:for(let e=t.prev;e!==null;e=e.prev)if(e===n)return!0;return!1}return!1}function matchCompound(e,t){if(Ta!==null&&t===Ta)return matchFeatureless(e,t);for(let n=0;n<e.length;n++)if(!matchTest(e[n],t))return!1;return!0}function matchFeatureless(e,t){return featurelessCompound(e,t)===1}function matchFeaturelessHost(e,t){let n=Ta;Ta=t;let r=featurelessComplex(e,t)===1;return Ta=n,r}function featurelessComplex(e,t){return e.last!==0||e.leading!==0?-1:featurelessCompound(e.comps[0],t)}function featurelessList(e,t){let n=-1;for(let r=0;r<e.items.length;r++){let i=featurelessComplex(e.items[r],t);if(i===1)return 1;i===0&&(n=0)}return n}function featurelessCompound(e,t){let n=!1,r=1;for(let i=0;i<e.length;i++){let a=e[i];switch(a.op){case 20:case 21:case 22:n=!0,r===1&&!matchTest(a,t)&&(r=0);break;case 9:{let e=t.node[W];r===1&&!matchHas(a.list,e?e[M]:t)&&(r=0);break}case 7:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===0&&(r=0);break}case 8:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===1&&(r=0);break}default:return-1}}return n?r:-1}function isQuirks$1(e){return e[jn]===`quirks`}__name(isQuirks$1,`isQuirks`);function quirksClassMatch(e,t){for(let n=0;n<e.length;n++)if(asciiLowercase$1(e[n])===t)return!0;return!1}function matchTest(e,t){switch(e.op){case 2:return(t.flags&2?t.name!==e.lower:t.name!==e.name)?!1:!e.nsCheck||t.ns===e.ns;case 4:{let n=classTokens(t),r=e.name;for(let e=0;e<n.length;e++)if(n[e]===r)return!0;return n.length!==0&&isQuirks$1(t.doc)&&quirksClassMatch(n,e.lower)}case 3:return t.id===e.name||t.id!==``&&isQuirks$1(t.doc)&&asciiLowercase$1(t.id)===e.lower;case 5:return matchAttribute(e,t);case 1:return t.ns===e.ns;case 6:{let n=e.fn(t);return xa&&e.volatileTest&&logDep(e,t,n),n}case 7:return matchList(e.list,t);case 8:return!matchList(e.list,t);case 9:return matchHas(e.list,t);case 10:case 11:case 12:case 13:return matchNth(e,t);case 14:for(let e=t.first;e!==null;e=e.next)if(e.type===1||(e.type===3||e.type===4)&&e.data.length!==0)return!1;return!0;case 15:{let e=t.parent;return e!==null&&e.type===9}case 16:return t===Ca;case 17:return matchesLang(t,e.args);case 18:{let n=directionality(t)===e.a;return xa&&logDep(e,t,n),n}case 19:{let n=customState(t,e.name);return xa&&logDep(e,t,n),n}case 20:return Ta!==null&&t===Ta;case 21:{if(Ta===null||t!==Ta)return!1;let n=Ta;Ta=null;let r=matchList(e.list,t);return Ta=n,r}case 22:{if(Ta===null||t!==Ta)return!1;let n=Ta;Ta=null;let r=!1;for(let n=t;n!==null&&!r;n=parentOrHost$1(n))n.type===1&&matchList(e.list,n)&&(r=!0);return Ta=n,r}case 23:{let n=headingLevel(t);if(n===0)return!1;let r=e.args;if(r.length===0)return!0;for(let e=0;e<r.length;e++)if(Number(r[e])===n)return!0;return!1}case 0:return!1}return!1}function headingLevel(e){if(e.tag===0||e.name.length!==2||e.name.charCodeAt(0)!==104)return 0;let t=e.name.charCodeAt(1)-48;if(t<1||t>6)return 0;let n=t+headingOffset(e);return n>9?9:n}function headingOffset(e){let t=0;for(let n=e;n!==null;n=parentOrHost$1(n)){if(n.type!==1||n.tag===0||n.attrs===null)continue;let e=attr(n,`headingoffset`);if(e!==null){let n=parseNonNegativeInteger$1(e);n>0&&(t+=n)}if(attr(n,`headingreset`)!==null)break}return t}function parseNonNegativeInteger$1(e){let t=0;for(;t<e.length&&isWs$2(e.charCodeAt(t));)t++;t<e.length&&e.charCodeAt(t)===43&&t++;let n=-1;for(;t<e.length;t++){let r=e.charCodeAt(t)-48;if(r<0||r>9)break;n=(n===-1?0:n*10)+r}return n}__name(parseNonNegativeInteger$1,`parseNonNegativeInteger`);function matchAttribute(e,t){let n=t.attrs;if(n===null)return!1;let r=!!(t.flags&2),i=r?e.lower:e.name;for(let t=0;t<n.length;t++){let a=n[t];if(a.localName!==i)continue;if(e.nsCheck){if(e.ns!==`*`&&a.ns!==e.ns)continue}else if(a.ns!==null)continue;if(e.attrOp===0)return!0;let o=e.valueCase===1||e.valueCase===2&&r&&a.ns===null;if(attrValueMatches(e,o?asciiLowercase$1(a.value):a.value,o?e.valueLower:e.value))return!0;if(!e.nsCheck)return!1}return!1}function attrValueMatches(e,t,n){switch(e.attrOp){case 1:return t===n;case 2:{let e=t.length,r=n.length,i=0;for(;i<e;){for(;i<e&&isWs$2(t.charCodeAt(i));)i++;let a=i;for(;i<e&&!isWs$2(t.charCodeAt(i));)i++;if(i-a===r&&t.startsWith(n,a))return!0}return!1}case 3:return t===n||t.length>n.length&&t.charCodeAt(n.length)===45&&t.startsWith(n);case 4:return t.startsWith(n);case 5:return t.endsWith(n);case 6:return t.includes(n)}return!1}function isWs$2(e){return e===32||e===9||e===10||e===12||e===13}__name(isWs$2,`isWs`);function anb(e,t,n){if(e===0)return n===t;let r=n-t;return r/e>=0&&r%e===0}function sameType(e,t){return e.name===t.name&&e.ns===t.ns}function matchNth(e,t){let n=e.list;if(n!==null&&!matchList(n,t))return!1;let r=t.doc[q],i=e.op===12||e.op===13,a=e.op===11||e.op===13,o=1,s=t.prev;for(;s!==null&&!(s.type===1&&(i?sameType(s,t):n===null||matchList(n,s)));)s=s.prev;if(s!==null){if(s===e.memoEl&&e.memoVersion===r)o=e.memoIdx+1;else{o=2;for(let e=s.prev;e!==null;e=e.prev)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&o++}}if(e.memoEl=t,e.memoIdx=o,e.memoVersion=r,!a)return anb(e.a,e.b,o);let c=t.parent,l;if(!i&&n===null&&c!==null&&c===e.memoParent&&e.memoCountVersion===r)l=e.memoCount;else{l=o;for(let e=t.next;e!==null;e=e.next)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&l++;!i&&n===null&&(e.memoParent=c,e.memoCount=l,e.memoCountVersion=r)}return anb(e.a,e.b,l-o+1)}function matchHas(e,t){let n=wa;wa=t;let r=!1,i=e.items;for(let e=0;e<i.length&&!r;e++){let n=i[e];switch(n.hasDomain){case 2:for(let e=t.first;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 1:for(let e=t.first;e!==null;){if(e.type===1&&n.fn(e)){r=!0;break}e=nextIn(e,t)}break;case 3:{let e=t.next;for(;e!==null&&e.type!==1;)e=e.next;r=e!==null&&n.fn(e);break}case 4:for(let e=t.next;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 5:for(let e=t.next;e!==null&&!r;e=e.next)if(e.type===1){if(n.fn(e)){r=!0;break}for(let t=e.first;t!==null;){if(t.type===1&&n.fn(t)){r=!0;break}t=nextIn(t,e)}}}}return wa=n,r}function nextIn(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==null&&r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function subjectKey(e){let t=e.comps[0],n=``,r=``;for(let e=0;e<t.length;e++){let i=t[e];if(i.op===3)return{kind:1,value:i.name};i.op===4&&n===``?n=i.name:i.op===2&&r===``&&(r=i.lower)}return n===``?r===``?{kind:0,value:``}:{kind:3,value:r}:{kind:2,value:n}}function ancestorHashes(e){let t=[];if(e.leading!==0)return t;for(let n=0;n<3&&t.length<4;n++)for(let r=1;r<=e.last&&t.length<4;r++){let i=e.combs[r-1];if(i!==1&&i!==2)continue;let a=e.comps[r];for(let e=0;e<a.length&&t.length<4;e++){let r=a[e],i=-1;n===0&&r.op===3?i=idHash(r.name):n===1&&r.op===4?i=classHash(r.name):n===2&&r.op===2&&(i=tagHash(r.lower)),i!==-1&&t.indexOf(i)===-1&&t.push(i)}}return t}function idRootOf(e){if(e.items.length!==1)return``;let t=e.items[0];if(t.leading!==0)return``;for(let e=1;e<=t.last;e++){let n=t.combs[e-1];if(n!==1&&n!==2)return``;let r=t.comps[e];for(let e=0;e<r.length;e++)if(r[e].op===3)return r[e].name}return``}function fastShape(e){if(e.items.length!==1)return 0;let t=e.items[0];if(t.last!==0)return 0;let n=t.comps[0];if(n.length===0)return 1;if(n.length!==1)return 0;let r=n[0];switch(r.op){case 3:return 2;case 4:return 3;case 2:return r.nsCheck?0:4;case 5:return r.nsCheck?0:r.attrOp===0||r.attrOp===1&&r.valueCase===0?5:0}return 0}function fastTest(e){return e.items[0].comps[0][0]}var Query=class{list;info;fast;fastT;hasMemos;idRoot;constructor(e,t){let n=new CList;for(let t=0;t<e.items.length;t++){let r=e.items[t];r.pseudoElement===``&&n.items.push(r)}this.list=n,this.info=t,this.fast=t.usesScope?0:fastShape(n),this.fastT=this.fast===0||this.fast===1?null:fastTest(n),this.hasMemos=t.nthTests.length!==0,this.idRoot=this.fast===0&&!t.usesScope?idRootOf(n):``}};const Ea=/* @__PURE__ */ new Map;function clearSelectorCaches(){Ea.clear()}function compileQuery(e){let t=new SelectorParser(e).parseSelectorList();if(t===null)return null;let n=new CompileInfo,r=compileList(t,n);return n.error===``?new Query(r,n):null}function interfaceName(e){return e.type===9?`Document`:e.type===1?`Element`:`DocumentFragment`}function syntaxError$1(e,t,n){return new DOMException(`Failed to execute '${t}' on '${interfaceName(n)}': '${e}' is not a valid selector.`,`SyntaxError`)}__name(syntaxError$1,`syntaxError`);function getQuery(e,t,n){let r=Ea.get(e);if(r===void 0&&(r=compileQuery(e),Ea.size>=2048&&Ea.clear(),Ea.set(e,r)),r===null)throw syntaxError$1(e,t,n);return r}function scopeFor(e){if(e.type===1)return e;if(e.type===9){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t}return null}function next(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function hasClass(e,t){let n=classTokens(e);for(let e=0;e<n.length;e++)if(n[e]===t)return!0;return!1}function attrMatch(e,t,n){let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t.lower:t.name;for(let e=0;e<r.length;e++){let a=r[e];if(a.localName===i&&a.ns===null)return n||a.value===t.value}return!1}function isQuirks(e){return e.doc[jn]===`quirks`}function run$1(e,t,n,r){switch(t.fast){case 1:for(let t=e.first;t!==null;t=next(t,e))if(t.type===1){if(n)return t;r.push(t)}return null;case 2:{let i=t.fastT;if(e.flags&1&&!isQuirks(e)){let t=e.doc[dn].get(i.name);if(t===void 0){if(e.type===9)return null}else if(!Array.isArray(t)){for(let i=t.parent;i!==null;i=i.parent)if(i===e)return n?t:(r.push(t),null);if(e.type===9)return null}}let a=i.name;if(!isQuirks(e)){for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.id===a){if(n)return t;r.push(t)}return null}break}case 3:{if(isQuirks(e))break;let i=t.fastT.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.attrs!==null&&hasClass(t,i)){if(n)return t;r.push(t)}return null}case 4:{let i=t.fastT,a=i.lower,o=i.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&(t.flags&2?t.name===a:t.name===o)){if(n)return t;r.push(t)}return null}case 5:{let i=t.fastT,a=i.attrOp===0;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&attrMatch(t,i,a)){if(n)return t;r.push(t)}return null}}let i=t.list;if(i.items.length===0)return null;let a=e;if(t.idRoot!==``){let n=idRootFor(e,t.idRoot);if(n===null)return null;a=n}let o=setScope(t.info.usesScope?scopeFor(e):null);try{for(let e=a.first;e!==null;e=next(e,a))if(e.type===1&&matchList(i,e)){if(n)return e;r.push(e)}return null}finally{setScope(o),t.hasMemos&&resetMemos(t.info)}}__name(run$1,`run`);function idRootFor(e,t){if(!(e.flags&1)||isQuirks(e))return e;if(e.type!==9){let t=e;for(;t.parent!==null;)t=t.parent;if(t.type!==9)return e}let n=e.doc[dn].get(t);if(n===void 0)return null;if(Array.isArray(n)||n===e)return e;for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;for(let t=e.parent;t!==null;t=t.parent)if(t===n)return e;return null}const Da=[];var ResultEntry=class{version;doc;all;first;constructor(e,t){this.version=e,this.doc=t,this.all=null,this.first=void 0}};const Oa={},newResults=()=>/* @__PURE__ */ new WeakMap;function cacheable(e){return!e.info.volatile&&e.fast!==2}function cachedEntry(e,t,n){let r=e.doc,i=n?derivedCache(r,Oa,newResults):peekDerivedCache(r,Oa);if(i===void 0)return null;let a=i.get(e);if(a===void 0){if(!n)return null;a=/* @__PURE__ */ new Map,i.set(e,a)}let o=r[q],s=a.get(t);return s!==void 0&&s.version===o&&s.doc===r?s:n?(s===void 0?(a.size>=64&&a.clear(),s=new ResultEntry(o,r),a.set(t,s)):(s.version=o,s.doc=r,s.all=null,s.first=void 0),s):null}function querySelector(e,t){let n=getQuery(t,`querySelector`,e);if(!cacheable(n))return run$1(e,n,!0,Da);let r=cachedEntry(e,n,!1);if(r!==null){if(r.first!==void 0)return r.first;if(r.all!==null)return r.first=r.all.length===0?null:r.all[0]}let i=run$1(e,n,!0,Da);return cachedEntry(e,n,!0).first=i,i}function querySelectorAll(e,t){return Ii._staticFromImpls(allImpls(e,getQuery(t,`querySelectorAll`,e)))}function allImpls(e,t){if(!cacheable(t)){let n=[];return run$1(e,t,!1,n),n}let n=cachedEntry(e,t,!1);if(n!==null&&n.all!==null)return n.all;let r=[];run$1(e,t,!1,r);let i=cachedEntry(e,t,!0);return i.all=r,i.first=r.length===0?null:r[0],r}function matches(e,t){let n=getQuery(t,`matches`,e),r=n.list;if(!n.info.usesScope&&!n.hasMemos)return r.fn(e);if(r.items.length===0)return!1;let i=setScope(e);try{return matchList(r,e)}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}function closest(e,t){let n=getQuery(t,`closest`,e),r=n.list;if(r.items.length===0)return null;let i=setScope(e);try{for(let t=e;t!==null&&t.type===1;t=t.parent)if(matchList(r,t))return t;return null}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}var CollectionState=class{root;childrenOnly;filter;items;doc;version;constructor(e,t,n){this.root=e,this.childrenOnly=t,this.filter=n,this.items=[],this.doc=null,this.version=-1}_dropSnapshot(){this.items=[],this.doc=null,this.version=-1}},ka=class HTMLCollection{constructor(e,t=!1,n=null){Object.defineProperty(this,ht,{value:new CollectionState(e,t,n)}),ja===null&&(ja=indexGetterTable(HTMLCollection.prototype,tableItem,256))}get _s(){return this[ht]}get _rootImpl(){return this[ht].root}static _childrenOf(e){return new HTMLCollection(e,!0,null)}static _descendants(e,t){return new HTMLCollection(e,!1,t)}_collect(e){let t=this[ht],n=t.root;if(t.childrenOnly){for(let t=n.first;t!==null;t=t.next)t.type===1&&e.push(t.node);return}let r=t.filter;if(r===null)for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))e.push(t.node);else for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))r(t)&&e.push(t.node)}_snapshot(){let e=this[ht],t=e.root.doc;if(e.version===t[q]&&e.doc===t)return e.items;let n=[];return this._collect(n),e.items=n,e.doc=t,e.version=t[q],n.length!==0&&holdSnapshot(t,e,e.root),n.length>ja.count&&ensureIndexGetters(ja,n.length),n}get length(){let e=this._snapshot().length;return e>ja.count&&ensureIndexGetters(ja,e),e}item(e){let t=this._snapshot(),n=Number(e)>>>0;return n<t.length?t[n]:null}namedItem(e){let t=String(e);if(t===``)return null;let n=this._snapshot();for(let e=0;e<n.length;e++){let r=n[e][M];if(r.id===t||r.ns===`http://www.w3.org/1999/xhtml`&&attr(r,`name`)===t)return n[e]}return null}_supportedPropertyNames(){let e=[],t=this._snapshot();for(let n=0;n<t.length;n++){let r=t[n][M];if(r.id!==``&&!e.includes(r.id)&&e.push(r.id),r.ns===`http://www.w3.org/1999/xhtml`){let t=attr(r,`name`);t!==null&&t!==``&&!e.includes(t)&&e.push(t)}}return e}};const Aa={values(){let e=iterableTarget(this);return new CollectionIterator(e,e instanceof ka)}}.values;Object.defineProperties(ka.prototype,{[Symbol.iterator]:{value:Aa,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`HTMLCollection`,configurable:!0}});let ja=null;function tableItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}function ensureCollectionIndexGetters(e){ja!==null&&ensureIndexGetters(ja,e)}function isArrayIndex$1(e){let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&n<4294967295&&String(n)===e}__name(isArrayIndex$1,`isArrayIndex`);function withNamedProperties(e){return new Proxy(e,{get(e,t,n){return typeof t==`string`&&!(t in e)?e.namedItem(t)??void 0:Reflect.get(e,t,e)},has(e,t){return typeof t==`string`&&!(t in e)?isArrayIndex$1(t)?Number(t)<e.length:e.namedItem(t)!==null:typeof t==`string`&&isArrayIndex$1(t)?Number(t)<e.length:Reflect.has(e,t)},ownKeys(e){let t=[],n=e.length;for(let e=0;e<n;e++)t.push(String(e));for(let n of e._supportedPropertyNames())n in e||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`){if(isArrayIndex$1(t)){let n=e.item(Number(t));return n===null?void 0:{value:n,writable:!1,enumerable:!0,configurable:!0}}if(!(t in e)){let n=e.namedItem(t);if(n!==null)return{value:n,writable:!1,enumerable:!1,configurable:!0}}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.set(e,t,n,e)},defineProperty(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&isArrayIndex$1(t)?Number(t)>=e.length:typeof t==`string`&&!(t in e)&&e.namedItem(t)!==null?!1:Reflect.deleteProperty(e,t)}})}function define(e,t){for(let n of Reflect.ownKeys(t))Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}function convertNodesIntoNode(e,t){if(e.length===1)return toNode(e[0],t)[M];let n=t.createDocumentFragment();for(let r of e)n.appendChild(toNode(r,t));return n[M]}function toNode(e,t){return typeof e==`object`&&e&&M in e?e:t.createTextNode(String(e))}function nodeArg(e,t,n,r){if(typeof e==`object`&&e&&M in e)return e[M];throw TypeError(`Failed to execute '${t}' on '${parentNodeInterface(r)}': parameter ${n} is not of type 'Node'.`)}function parentNodeInterface(e){return e.type===1?`Element`:e.type===11?`DocumentFragment`:`Document`}function wrap(e){return e===null?null:e.node}const Ma={get children(){let e=this;return e[nt]??=ka._childrenOf(e[M])},get firstElementChild(){return wrap(firstElementChild(this[M]))},get lastElementChild(){return wrap(lastElementChild(this[M]))},get childElementCount(){let e=0;for(let t=this[M].first;t!==null;t=t.next)t.type===1&&e++;return e},prepend(...e){let t=this[M];preInsert(convertNodesIntoNode(e,t.doc),t,t.first)},append(...e){let t=this[M];preInsert(convertNodesIntoNode(e,t.doc),t,null)},replaceChildren(...e){let t=this[M],n=convertNodesIntoNode(e,t.doc);ensureReplaceAllValidity(n,t),replaceAll(n,t)},moveBefore(e,t){arguments.length<2&&argumentsRequired(`moveBefore`,parentNodeInterface(this[M]),2,arguments.length);let n=nodeArg(e,`moveBefore`,1,this[M]),r=t===null?null:nodeArg(t,`moveBefore`,2,this[M]);r===n&&(r=n.next),move(n,this[M],r)},querySelector(e){return arguments.length===0&&argumentsRequired(`querySelector`,parentNodeInterface(this[M]),1,0),wrap(querySelector(this[M],String(e)))},querySelectorAll(e){return arguments.length===0&&argumentsRequired(`querySelectorAll`,parentNodeInterface(this[M]),1,0),querySelectorAll(this[M],String(e))}},Na={before(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.prev;for(;r!==null&&e.includes(r.node);)r=r.prev;preInsert(convertNodesIntoNode(e,t.doc),n,r===null?n.first:r.next)},after(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;preInsert(convertNodesIntoNode(e,t.doc),n,r)},replaceWith(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;let i=convertNodesIntoNode(e,t.doc);t.parent===n?replace(t,i,n):preInsert(i,n,r)},remove(){let e=this[M];e.parent!==null&&remove(e,!1)}},Pa={get previousElementSibling(){return wrap(previousElementSibling(this[M]))},get nextElementSibling(){return wrap(nextElementSibling(this[M]))}},Fa={getElementById(e){let t=this[M],n=String(e);if(n===``)return null;if(t.type!==11)return wrap(this._idLookup(n));for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.id===n)return e.node;return null}};function installParentNode(e){define(e,Ma),addUnscopables(e,[`prepend`,`append`,`replaceChildren`])}function installChildNode(e){define(e,Na),addUnscopables(e,[`before`,`after`,`replaceWith`,`remove`])}function addUnscopables(e,t){let n=e.prototype,r=Object.getOwnPropertyDescriptor(n,Symbol.unscopables)?.value;r===void 0&&(r=Object.create(null),Object.defineProperty(n,Symbol.unscopables,{value:r,configurable:!0}));for(let e of t)r[e]=!0}function installNonDocumentTypeChildNode(e){define(e,Pa)}function installNonElementParentNode(e){define(e,Fa)}function arity$1(e,t,n){throw TypeError(`Failed to execute '${e}' on 'CharacterData': ${t} argument${t===1?``:`s`} required, but only ${n} present.`)}__name(arity$1,`arity`);function nodeDocumentFor(e){return typeof e==`object`&&e&&e[M]?.type===9?e:currentDocument()}var CharacterData=class extends Node{get data(){return this[M].data}set data(e){let t=this[M];replaceData(t,0,t.data.length,e===null?``:String(e))}get length(){return this[M].data.length}substringData(e,t){arguments.length<2&&arity$1(`substringData`,2,arguments.length);let n=this[M].data;if(e>>>=0,t>>>=0,e>n.length)throw new DOMException(`Offset is greater than the node's length.`,`IndexSizeError`);return n.substring(e,e+t)}appendData(e){arguments.length<1&&arity$1(`appendData`,1,0);let t=this[M];replaceData(t,t.data.length,0,String(e))}insertData(e,t){arguments.length<2&&arity$1(`insertData`,2,arguments.length),replaceData(this[M],e>>>0,0,String(t))}deleteData(e,t){arguments.length<2&&arity$1(`deleteData`,2,arguments.length),replaceData(this[M],e>>>0,t>>>0,``)}replaceData(e,t,n){arguments.length<3&&arity$1(`replaceData`,3,arguments.length),replaceData(this[M],e>>>0,t>>>0,String(n))}};installChildNode(CharacterData),installNonDocumentTypeChildNode(CharacterData);var Text=class extends CharacterData{constructor(e=``,t){super(3,nodeDocumentFor(t)),this[M].data=String(e)}splitText(e){return splitText(this[M],Number(e)>>>0).node}get wholeText(){let e=this[M];for(;e.prev!==null&&(e.prev.type===3||e.prev.type===4);)e=e.prev;let t=``;for(let n=e;n!==null&&(n.type===3||n.type===4);n=n.next)t+=n.data;return t}get assignedSlot(){if(ta===0)return null;let e=assignedSlot(this[M]);if(e===null)return null;let t=this[M].parent,n=t===null?null:t.node[W];return n!=null&&n.mode===`open`?e.node:null}},CDATASection=class extends Text{constructor(e=``,t=currentDocument()){super(e,t),this[M].type=4}},Comment=class extends CharacterData{constructor(e=``,t){super(8,nodeDocumentFor(t)),this[M].data=String(e)}},ProcessingInstruction=class extends CharacterData{constructor(e,t,n=currentDocument()){super(7,n),this[M].name=e,this[M].data=t}get target(){return this[M].name}},DocumentFragment=class extends Node{[j];constructor(e=currentDocument()){super(11,e),this[j]=null}};installParentNode(DocumentFragment),installNonElementParentNode(DocumentFragment);var DocumentType=class extends Node{[Pr];constructor(e,t,n,r){super(10,e);let i=this[M];i.name=t,i.data=n,this[Pr]=r}get name(){return this[M].name}get publicId(){return this[M].data}get systemId(){return this[Pr]}};installChildNode(DocumentType);const Ia=`AElig,AElig;,AMP,AMP;,Aacute,Aacute;,Abreve;,Acirc,Acirc;,Acy;,Afr;,Agrave,Agrave;,Alpha;,Amacr;,And;,Aogon;,Aopf;,ApplyFunction;,Aring,Aring;,Ascr;,Assign;,Atilde,Atilde;,Auml,Auml;,Backslash;,Barv;,Barwed;,Bcy;,Because;,Bernoullis;,Beta;,Bfr;,Bopf;,Breve;,Bscr;,Bumpeq;,CHcy;,COPY,COPY;,Cacute;,Cap;,CapitalDifferentialD;,Cayleys;,Ccaron;,Ccedil,Ccedil;,Ccirc;,Cconint;,Cdot;,Cedilla;,CenterDot;,Cfr;,Chi;,CircleDot;,CircleMinus;,CirclePlus;,CircleTimes;,ClockwiseContourIntegral;,CloseCurlyDoubleQuote;,CloseCurlyQuote;,Colon;,Colone;,Congruent;,Conint;,ContourIntegral;,Copf;,Coproduct;,CounterClockwiseContourIntegral;,Cross;,Cscr;,Cup;,CupCap;,DD;,DDotrahd;,DJcy;,DScy;,DZcy;,Dagger;,Darr;,Dashv;,Dcaron;,Dcy;,Del;,Delta;,Dfr;,DiacriticalAcute;,DiacriticalDot;,DiacriticalDoubleAcute;,DiacriticalGrave;,DiacriticalTilde;,Diamond;,DifferentialD;,Dopf;,Dot;,DotDot;,DotEqual;,DoubleContourIntegral;,DoubleDot;,DoubleDownArrow;,DoubleLeftArrow;,DoubleLeftRightArrow;,DoubleLeftTee;,DoubleLongLeftArrow;,DoubleLongLeftRightArrow;,DoubleLongRightArrow;,DoubleRightArrow;,DoubleRightTee;,DoubleUpArrow;,DoubleUpDownArrow;,DoubleVerticalBar;,DownArrow;,DownArrowBar;,DownArrowUpArrow;,DownBreve;,DownLeftRightVector;,DownLeftTeeVector;,DownLeftVector;,DownLeftVectorBar;,DownRightTeeVector;,DownRightVector;,DownRightVectorBar;,DownTee;,DownTeeArrow;,Downarrow;,Dscr;,Dstrok;,ENG;,ETH,ETH;,Eacute,Eacute;,Ecaron;,Ecirc,Ecirc;,Ecy;,Edot;,Efr;,Egrave,Egrave;,Element;,Emacr;,EmptySmallSquare;,EmptyVerySmallSquare;,Eogon;,Eopf;,Epsilon;,Equal;,EqualTilde;,Equilibrium;,Escr;,Esim;,Eta;,Euml,Euml;,Exists;,ExponentialE;,Fcy;,Ffr;,FilledSmallSquare;,FilledVerySmallSquare;,Fopf;,ForAll;,Fouriertrf;,Fscr;,GJcy;,GT,GT;,Gamma;,Gammad;,Gbreve;,Gcedil;,Gcirc;,Gcy;,Gdot;,Gfr;,Gg;,Gopf;,GreaterEqual;,GreaterEqualLess;,GreaterFullEqual;,GreaterGreater;,GreaterLess;,GreaterSlantEqual;,GreaterTilde;,Gscr;,Gt;,HARDcy;,Hacek;,Hat;,Hcirc;,Hfr;,HilbertSpace;,Hopf;,HorizontalLine;,Hscr;,Hstrok;,HumpDownHump;,HumpEqual;,IEcy;,IJlig;,IOcy;,Iacute,Iacute;,Icirc,Icirc;,Icy;,Idot;,Ifr;,Igrave,Igrave;,Im;,Imacr;,ImaginaryI;,Implies;,Int;,Integral;,Intersection;,InvisibleComma;,InvisibleTimes;,Iogon;,Iopf;,Iota;,Iscr;,Itilde;,Iukcy;,Iuml,Iuml;,Jcirc;,Jcy;,Jfr;,Jopf;,Jscr;,Jsercy;,Jukcy;,KHcy;,KJcy;,Kappa;,Kcedil;,Kcy;,Kfr;,Kopf;,Kscr;,LJcy;,LT,LT;,Lacute;,Lambda;,Lang;,Laplacetrf;,Larr;,Lcaron;,Lcedil;,Lcy;,LeftAngleBracket;,LeftArrow;,LeftArrowBar;,LeftArrowRightArrow;,LeftCeiling;,LeftDoubleBracket;,LeftDownTeeVector;,LeftDownVector;,LeftDownVectorBar;,LeftFloor;,LeftRightArrow;,LeftRightVector;,LeftTee;,LeftTeeArrow;,LeftTeeVector;,LeftTriangle;,LeftTriangleBar;,LeftTriangleEqual;,LeftUpDownVector;,LeftUpTeeVector;,LeftUpVector;,LeftUpVectorBar;,LeftVector;,LeftVectorBar;,Leftarrow;,Leftrightarrow;,LessEqualGreater;,LessFullEqual;,LessGreater;,LessLess;,LessSlantEqual;,LessTilde;,Lfr;,Ll;,Lleftarrow;,Lmidot;,LongLeftArrow;,LongLeftRightArrow;,LongRightArrow;,Longleftarrow;,Longleftrightarrow;,Longrightarrow;,Lopf;,LowerLeftArrow;,LowerRightArrow;,Lscr;,Lsh;,Lstrok;,Lt;,Map;,Mcy;,MediumSpace;,Mellintrf;,Mfr;,MinusPlus;,Mopf;,Mscr;,Mu;,NJcy;,Nacute;,Ncaron;,Ncedil;,Ncy;,NegativeMediumSpace;,NegativeThickSpace;,NegativeThinSpace;,NegativeVeryThinSpace;,NestedGreaterGreater;,NestedLessLess;,NewLine;,Nfr;,NoBreak;,NonBreakingSpace;,Nopf;,Not;,NotCongruent;,NotCupCap;,NotDoubleVerticalBar;,NotElement;,NotEqual;,NotEqualTilde;,NotExists;,NotGreater;,NotGreaterEqual;,NotGreaterFullEqual;,NotGreaterGreater;,NotGreaterLess;,NotGreaterSlantEqual;,NotGreaterTilde;,NotHumpDownHump;,NotHumpEqual;,NotLeftTriangle;,NotLeftTriangleBar;,NotLeftTriangleEqual;,NotLess;,NotLessEqual;,NotLessGreater;,NotLessLess;,NotLessSlantEqual;,NotLessTilde;,NotNestedGreaterGreater;,NotNestedLessLess;,NotPrecedes;,NotPrecedesEqual;,NotPrecedesSlantEqual;,NotReverseElement;,NotRightTriangle;,NotRightTriangleBar;,NotRightTriangleEqual;,NotSquareSubset;,NotSquareSubsetEqual;,NotSquareSuperset;,NotSquareSupersetEqual;,NotSubset;,NotSubsetEqual;,NotSucceeds;,NotSucceedsEqual;,NotSucceedsSlantEqual;,NotSucceedsTilde;,NotSuperset;,NotSupersetEqual;,NotTilde;,NotTildeEqual;,NotTildeFullEqual;,NotTildeTilde;,NotVerticalBar;,Nscr;,Ntilde,Ntilde;,Nu;,OElig;,Oacute,Oacute;,Ocirc,Ocirc;,Ocy;,Odblac;,Ofr;,Ograve,Ograve;,Omacr;,Omega;,Omicron;,Oopf;,OpenCurlyDoubleQuote;,OpenCurlyQuote;,Or;,Oscr;,Oslash,Oslash;,Otilde,Otilde;,Otimes;,Ouml,Ouml;,OverBar;,OverBrace;,OverBracket;,OverParenthesis;,PartialD;,Pcy;,Pfr;,Phi;,Pi;,PlusMinus;,Poincareplane;,Popf;,Pr;,Precedes;,PrecedesEqual;,PrecedesSlantEqual;,PrecedesTilde;,Prime;,Product;,Proportion;,Proportional;,Pscr;,Psi;,QUOT,QUOT;,Qfr;,Qopf;,Qscr;,RBarr;,REG,REG;,Racute;,Rang;,Rarr;,Rarrtl;,Rcaron;,Rcedil;,Rcy;,Re;,ReverseElement;,ReverseEquilibrium;,ReverseUpEquilibrium;,Rfr;,Rho;,RightAngleBracket;,RightArrow;,RightArrowBar;,RightArrowLeftArrow;,RightCeiling;,RightDoubleBracket;,RightDownTeeVector;,RightDownVector;,RightDownVectorBar;,RightFloor;,RightTee;,RightTeeArrow;,RightTeeVector;,RightTriangle;,RightTriangleBar;,RightTriangleEqual;,RightUpDownVector;,RightUpTeeVector;,RightUpVector;,RightUpVectorBar;,RightVector;,RightVectorBar;,Rightarrow;,Ropf;,RoundImplies;,Rrightarrow;,Rscr;,Rsh;,RuleDelayed;,SHCHcy;,SHcy;,SOFTcy;,Sacute;,Sc;,Scaron;,Scedil;,Scirc;,Scy;,Sfr;,ShortDownArrow;,ShortLeftArrow;,ShortRightArrow;,ShortUpArrow;,Sigma;,SmallCircle;,Sopf;,Sqrt;,Square;,SquareIntersection;,SquareSubset;,SquareSubsetEqual;,SquareSuperset;,SquareSupersetEqual;,SquareUnion;,Sscr;,Star;,Sub;,Subset;,SubsetEqual;,Succeeds;,SucceedsEqual;,SucceedsSlantEqual;,SucceedsTilde;,SuchThat;,Sum;,Sup;,Superset;,SupersetEqual;,Supset;,THORN,THORN;,TRADE;,TSHcy;,TScy;,Tab;,Tau;,Tcaron;,Tcedil;,Tcy;,Tfr;,Therefore;,Theta;,ThickSpace;,ThinSpace;,Tilde;,TildeEqual;,TildeFullEqual;,TildeTilde;,Topf;,TripleDot;,Tscr;,Tstrok;,Uacute,Uacute;,Uarr;,Uarrocir;,Ubrcy;,Ubreve;,Ucirc,Ucirc;,Ucy;,Udblac;,Ufr;,Ugrave,Ugrave;,Umacr;,UnderBar;,UnderBrace;,UnderBracket;,UnderParenthesis;,Union;,UnionPlus;,Uogon;,Uopf;,UpArrow;,UpArrowBar;,UpArrowDownArrow;,UpDownArrow;,UpEquilibrium;,UpTee;,UpTeeArrow;,Uparrow;,Updownarrow;,UpperLeftArrow;,UpperRightArrow;,Upsi;,Upsilon;,Uring;,Uscr;,Utilde;,Uuml,Uuml;,VDash;,Vbar;,Vcy;,Vdash;,Vdashl;,Vee;,Verbar;,Vert;,VerticalBar;,VerticalLine;,VerticalSeparator;,VerticalTilde;,VeryThinSpace;,Vfr;,Vopf;,Vscr;,Vvdash;,Wcirc;,Wedge;,Wfr;,Wopf;,Wscr;,Xfr;,Xi;,Xopf;,Xscr;,YAcy;,YIcy;,YUcy;,Yacute,Yacute;,Ycirc;,Ycy;,Yfr;,Yopf;,Yscr;,Yuml;,ZHcy;,Zacute;,Zcaron;,Zcy;,Zdot;,ZeroWidthSpace;,Zeta;,Zfr;,Zopf;,Zscr;,aacute,aacute;,abreve;,ac;,acE;,acd;,acirc,acirc;,acute,acute;,acy;,aelig,aelig;,af;,afr;,agrave,agrave;,alefsym;,aleph;,alpha;,amacr;,amalg;,amp,amp;,and;,andand;,andd;,andslope;,andv;,ang;,ange;,angle;,angmsd;,angmsdaa;,angmsdab;,angmsdac;,angmsdad;,angmsdae;,angmsdaf;,angmsdag;,angmsdah;,angrt;,angrtvb;,angrtvbd;,angsph;,angst;,angzarr;,aogon;,aopf;,ap;,apE;,apacir;,ape;,apid;,apos;,approx;,approxeq;,aring,aring;,ascr;,ast;,asymp;,asympeq;,atilde,atilde;,auml,auml;,awconint;,awint;,bNot;,backcong;,backepsilon;,backprime;,backsim;,backsimeq;,barvee;,barwed;,barwedge;,bbrk;,bbrktbrk;,bcong;,bcy;,bdquo;,becaus;,because;,bemptyv;,bepsi;,bernou;,beta;,beth;,between;,bfr;,bigcap;,bigcirc;,bigcup;,bigodot;,bigoplus;,bigotimes;,bigsqcup;,bigstar;,bigtriangledown;,bigtriangleup;,biguplus;,bigvee;,bigwedge;,bkarow;,blacklozenge;,blacksquare;,blacktriangle;,blacktriangledown;,blacktriangleleft;,blacktriangleright;,blank;,blk12;,blk14;,blk34;,block;,bne;,bnequiv;,bnot;,bopf;,bot;,bottom;,bowtie;,boxDL;,boxDR;,boxDl;,boxDr;,boxH;,boxHD;,boxHU;,boxHd;,boxHu;,boxUL;,boxUR;,boxUl;,boxUr;,boxV;,boxVH;,boxVL;,boxVR;,boxVh;,boxVl;,boxVr;,boxbox;,boxdL;,boxdR;,boxdl;,boxdr;,boxh;,boxhD;,boxhU;,boxhd;,boxhu;,boxminus;,boxplus;,boxtimes;,boxuL;,boxuR;,boxul;,boxur;,boxv;,boxvH;,boxvL;,boxvR;,boxvh;,boxvl;,boxvr;,bprime;,breve;,brvbar,brvbar;,bscr;,bsemi;,bsim;,bsime;,bsol;,bsolb;,bsolhsub;,bull;,bullet;,bump;,bumpE;,bumpe;,bumpeq;,cacute;,cap;,capand;,capbrcup;,capcap;,capcup;,capdot;,caps;,caret;,caron;,ccaps;,ccaron;,ccedil,ccedil;,ccirc;,ccups;,ccupssm;,cdot;,cedil,cedil;,cemptyv;,cent,cent;,centerdot;,cfr;,chcy;,check;,checkmark;,chi;,cir;,cirE;,circ;,circeq;,circlearrowleft;,circlearrowright;,circledR;,circledS;,circledast;,circledcirc;,circleddash;,cire;,cirfnint;,cirmid;,cirscir;,clubs;,clubsuit;,colon;,colone;,coloneq;,comma;,commat;,comp;,compfn;,complement;,complexes;,cong;,congdot;,conint;,copf;,coprod;,copy,copy;,copysr;,crarr;,cross;,cscr;,csub;,csube;,csup;,csupe;,ctdot;,cudarrl;,cudarrr;,cuepr;,cuesc;,cularr;,cularrp;,cup;,cupbrcap;,cupcap;,cupcup;,cupdot;,cupor;,cups;,curarr;,curarrm;,curlyeqprec;,curlyeqsucc;,curlyvee;,curlywedge;,curren,curren;,curvearrowleft;,curvearrowright;,cuvee;,cuwed;,cwconint;,cwint;,cylcty;,dArr;,dHar;,dagger;,daleth;,darr;,dash;,dashv;,dbkarow;,dblac;,dcaron;,dcy;,dd;,ddagger;,ddarr;,ddotseq;,deg,deg;,delta;,demptyv;,dfisht;,dfr;,dharl;,dharr;,diam;,diamond;,diamondsuit;,diams;,die;,digamma;,disin;,div;,divide,divide;,divideontimes;,divonx;,djcy;,dlcorn;,dlcrop;,dollar;,dopf;,dot;,doteq;,doteqdot;,dotminus;,dotplus;,dotsquare;,doublebarwedge;,downarrow;,downdownarrows;,downharpoonleft;,downharpoonright;,drbkarow;,drcorn;,drcrop;,dscr;,dscy;,dsol;,dstrok;,dtdot;,dtri;,dtrif;,duarr;,duhar;,dwangle;,dzcy;,dzigrarr;,eDDot;,eDot;,eacute,eacute;,easter;,ecaron;,ecir;,ecirc,ecirc;,ecolon;,ecy;,edot;,ee;,efDot;,efr;,eg;,egrave,egrave;,egs;,egsdot;,el;,elinters;,ell;,els;,elsdot;,emacr;,empty;,emptyset;,emptyv;,emsp13;,emsp14;,emsp;,eng;,ensp;,eogon;,eopf;,epar;,eparsl;,eplus;,epsi;,epsilon;,epsiv;,eqcirc;,eqcolon;,eqsim;,eqslantgtr;,eqslantless;,equals;,equest;,equiv;,equivDD;,eqvparsl;,erDot;,erarr;,escr;,esdot;,esim;,eta;,eth,eth;,euml,euml;,euro;,excl;,exist;,expectation;,exponentiale;,fallingdotseq;,fcy;,female;,ffilig;,fflig;,ffllig;,ffr;,filig;,fjlig;,flat;,fllig;,fltns;,fnof;,fopf;,forall;,fork;,forkv;,fpartint;,frac12,frac12;,frac13;,frac14,frac14;,frac15;,frac16;,frac18;,frac23;,frac25;,frac34,frac34;,frac35;,frac38;,frac45;,frac56;,frac58;,frac78;,frasl;,frown;,fscr;,gE;,gEl;,gacute;,gamma;,gammad;,gap;,gbreve;,gcirc;,gcy;,gdot;,ge;,gel;,geq;,geqq;,geqslant;,ges;,gescc;,gesdot;,gesdoto;,gesdotol;,gesl;,gesles;,gfr;,gg;,ggg;,gimel;,gjcy;,gl;,glE;,gla;,glj;,gnE;,gnap;,gnapprox;,gne;,gneq;,gneqq;,gnsim;,gopf;,grave;,gscr;,gsim;,gsime;,gsiml;,gt,gt;,gtcc;,gtcir;,gtdot;,gtlPar;,gtquest;,gtrapprox;,gtrarr;,gtrdot;,gtreqless;,gtreqqless;,gtrless;,gtrsim;,gvertneqq;,gvnE;,hArr;,hairsp;,half;,hamilt;,hardcy;,harr;,harrcir;,harrw;,hbar;,hcirc;,hearts;,heartsuit;,hellip;,hercon;,hfr;,hksearow;,hkswarow;,hoarr;,homtht;,hookleftarrow;,hookrightarrow;,hopf;,horbar;,hscr;,hslash;,hstrok;,hybull;,hyphen;,iacute,iacute;,ic;,icirc,icirc;,icy;,iecy;,iexcl,iexcl;,iff;,ifr;,igrave,igrave;,ii;,iiiint;,iiint;,iinfin;,iiota;,ijlig;,imacr;,image;,imagline;,imagpart;,imath;,imof;,imped;,in;,incare;,infin;,infintie;,inodot;,int;,intcal;,integers;,intercal;,intlarhk;,intprod;,iocy;,iogon;,iopf;,iota;,iprod;,iquest,iquest;,iscr;,isin;,isinE;,isindot;,isins;,isinsv;,isinv;,it;,itilde;,iukcy;,iuml,iuml;,jcirc;,jcy;,jfr;,jmath;,jopf;,jscr;,jsercy;,jukcy;,kappa;,kappav;,kcedil;,kcy;,kfr;,kgreen;,khcy;,kjcy;,kopf;,kscr;,lAarr;,lArr;,lAtail;,lBarr;,lE;,lEg;,lHar;,lacute;,laemptyv;,lagran;,lambda;,lang;,langd;,langle;,lap;,laquo,laquo;,larr;,larrb;,larrbfs;,larrfs;,larrhk;,larrlp;,larrpl;,larrsim;,larrtl;,lat;,latail;,late;,lates;,lbarr;,lbbrk;,lbrace;,lbrack;,lbrke;,lbrksld;,lbrkslu;,lcaron;,lcedil;,lceil;,lcub;,lcy;,ldca;,ldquo;,ldquor;,ldrdhar;,ldrushar;,ldsh;,le;,leftarrow;,leftarrowtail;,leftharpoondown;,leftharpoonup;,leftleftarrows;,leftrightarrow;,leftrightarrows;,leftrightharpoons;,leftrightsquigarrow;,leftthreetimes;,leg;,leq;,leqq;,leqslant;,les;,lescc;,lesdot;,lesdoto;,lesdotor;,lesg;,lesges;,lessapprox;,lessdot;,lesseqgtr;,lesseqqgtr;,lessgtr;,lesssim;,lfisht;,lfloor;,lfr;,lg;,lgE;,lhard;,lharu;,lharul;,lhblk;,ljcy;,ll;,llarr;,llcorner;,llhard;,lltri;,lmidot;,lmoust;,lmoustache;,lnE;,lnap;,lnapprox;,lne;,lneq;,lneqq;,lnsim;,loang;,loarr;,lobrk;,longleftarrow;,longleftrightarrow;,longmapsto;,longrightarrow;,looparrowleft;,looparrowright;,lopar;,lopf;,loplus;,lotimes;,lowast;,lowbar;,loz;,lozenge;,lozf;,lpar;,lparlt;,lrarr;,lrcorner;,lrhar;,lrhard;,lrm;,lrtri;,lsaquo;,lscr;,lsh;,lsim;,lsime;,lsimg;,lsqb;,lsquo;,lsquor;,lstrok;,lt,lt;,ltcc;,ltcir;,ltdot;,lthree;,ltimes;,ltlarr;,ltquest;,ltrPar;,ltri;,ltrie;,ltrif;,lurdshar;,luruhar;,lvertneqq;,lvnE;,mDDot;,macr,macr;,male;,malt;,maltese;,map;,mapsto;,mapstodown;,mapstoleft;,mapstoup;,marker;,mcomma;,mcy;,mdash;,measuredangle;,mfr;,mho;,micro,micro;,mid;,midast;,midcir;,middot,middot;,minus;,minusb;,minusd;,minusdu;,mlcp;,mldr;,mnplus;,models;,mopf;,mp;,mscr;,mstpos;,mu;,multimap;,mumap;,nGg;,nGt;,nGtv;,nLeftarrow;,nLeftrightarrow;,nLl;,nLt;,nLtv;,nRightarrow;,nVDash;,nVdash;,nabla;,nacute;,nang;,nap;,napE;,napid;,napos;,napprox;,natur;,natural;,naturals;,nbsp,nbsp;,nbump;,nbumpe;,ncap;,ncaron;,ncedil;,ncong;,ncongdot;,ncup;,ncy;,ndash;,ne;,neArr;,nearhk;,nearr;,nearrow;,nedot;,nequiv;,nesear;,nesim;,nexist;,nexists;,nfr;,ngE;,nge;,ngeq;,ngeqq;,ngeqslant;,nges;,ngsim;,ngt;,ngtr;,nhArr;,nharr;,nhpar;,ni;,nis;,nisd;,niv;,njcy;,nlArr;,nlE;,nlarr;,nldr;,nle;,nleftarrow;,nleftrightarrow;,nleq;,nleqq;,nleqslant;,nles;,nless;,nlsim;,nlt;,nltri;,nltrie;,nmid;,nopf;,not,not;,notin;,notinE;,notindot;,notinva;,notinvb;,notinvc;,notni;,notniva;,notnivb;,notnivc;,npar;,nparallel;,nparsl;,npart;,npolint;,npr;,nprcue;,npre;,nprec;,npreceq;,nrArr;,nrarr;,nrarrc;,nrarrw;,nrightarrow;,nrtri;,nrtrie;,nsc;,nsccue;,nsce;,nscr;,nshortmid;,nshortparallel;,nsim;,nsime;,nsimeq;,nsmid;,nspar;,nsqsube;,nsqsupe;,nsub;,nsubE;,nsube;,nsubset;,nsubseteq;,nsubseteqq;,nsucc;,nsucceq;,nsup;,nsupE;,nsupe;,nsupset;,nsupseteq;,nsupseteqq;,ntgl;,ntilde,ntilde;,ntlg;,ntriangleleft;,ntrianglelefteq;,ntriangleright;,ntrianglerighteq;,nu;,num;,numero;,numsp;,nvDash;,nvHarr;,nvap;,nvdash;,nvge;,nvgt;,nvinfin;,nvlArr;,nvle;,nvlt;,nvltrie;,nvrArr;,nvrtrie;,nvsim;,nwArr;,nwarhk;,nwarr;,nwarrow;,nwnear;,oS;,oacute,oacute;,oast;,ocir;,ocirc,ocirc;,ocy;,odash;,odblac;,odiv;,odot;,odsold;,oelig;,ofcir;,ofr;,ogon;,ograve,ograve;,ogt;,ohbar;,ohm;,oint;,olarr;,olcir;,olcross;,oline;,olt;,omacr;,omega;,omicron;,omid;,ominus;,oopf;,opar;,operp;,oplus;,or;,orarr;,ord;,order;,orderof;,ordf,ordf;,ordm,ordm;,origof;,oror;,orslope;,orv;,oscr;,oslash,oslash;,osol;,otilde,otilde;,otimes;,otimesas;,ouml,ouml;,ovbar;,par;,para,para;,parallel;,parsim;,parsl;,part;,pcy;,percnt;,period;,permil;,perp;,pertenk;,pfr;,phi;,phiv;,phmmat;,phone;,pi;,pitchfork;,piv;,planck;,planckh;,plankv;,plus;,plusacir;,plusb;,pluscir;,plusdo;,plusdu;,pluse;,plusmn,plusmn;,plussim;,plustwo;,pm;,pointint;,popf;,pound,pound;,pr;,prE;,prap;,prcue;,pre;,prec;,precapprox;,preccurlyeq;,preceq;,precnapprox;,precneqq;,precnsim;,precsim;,prime;,primes;,prnE;,prnap;,prnsim;,prod;,profalar;,profline;,profsurf;,prop;,propto;,prsim;,prurel;,pscr;,psi;,puncsp;,qfr;,qint;,qopf;,qprime;,qscr;,quaternions;,quatint;,quest;,questeq;,quot,quot;,rAarr;,rArr;,rAtail;,rBarr;,rHar;,race;,racute;,radic;,raemptyv;,rang;,rangd;,range;,rangle;,raquo,raquo;,rarr;,rarrap;,rarrb;,rarrbfs;,rarrc;,rarrfs;,rarrhk;,rarrlp;,rarrpl;,rarrsim;,rarrtl;,rarrw;,ratail;,ratio;,rationals;,rbarr;,rbbrk;,rbrace;,rbrack;,rbrke;,rbrksld;,rbrkslu;,rcaron;,rcedil;,rceil;,rcub;,rcy;,rdca;,rdldhar;,rdquo;,rdquor;,rdsh;,real;,realine;,realpart;,reals;,rect;,reg,reg;,rfisht;,rfloor;,rfr;,rhard;,rharu;,rharul;,rho;,rhov;,rightarrow;,rightarrowtail;,rightharpoondown;,rightharpoonup;,rightleftarrows;,rightleftharpoons;,rightrightarrows;,rightsquigarrow;,rightthreetimes;,ring;,risingdotseq;,rlarr;,rlhar;,rlm;,rmoust;,rmoustache;,rnmid;,roang;,roarr;,robrk;,ropar;,ropf;,roplus;,rotimes;,rpar;,rpargt;,rppolint;,rrarr;,rsaquo;,rscr;,rsh;,rsqb;,rsquo;,rsquor;,rthree;,rtimes;,rtri;,rtrie;,rtrif;,rtriltri;,ruluhar;,rx;,sacute;,sbquo;,sc;,scE;,scap;,scaron;,sccue;,sce;,scedil;,scirc;,scnE;,scnap;,scnsim;,scpolint;,scsim;,scy;,sdot;,sdotb;,sdote;,seArr;,searhk;,searr;,searrow;,sect,sect;,semi;,seswar;,setminus;,setmn;,sext;,sfr;,sfrown;,sharp;,shchcy;,shcy;,shortmid;,shortparallel;,shy,shy;,sigma;,sigmaf;,sigmav;,sim;,simdot;,sime;,simeq;,simg;,simgE;,siml;,simlE;,simne;,simplus;,simrarr;,slarr;,smallsetminus;,smashp;,smeparsl;,smid;,smile;,smt;,smte;,smtes;,softcy;,sol;,solb;,solbar;,sopf;,spades;,spadesuit;,spar;,sqcap;,sqcaps;,sqcup;,sqcups;,sqsub;,sqsube;,sqsubset;,sqsubseteq;,sqsup;,sqsupe;,sqsupset;,sqsupseteq;,squ;,square;,squarf;,squf;,srarr;,sscr;,ssetmn;,ssmile;,sstarf;,star;,starf;,straightepsilon;,straightphi;,strns;,sub;,subE;,subdot;,sube;,subedot;,submult;,subnE;,subne;,subplus;,subrarr;,subset;,subseteq;,subseteqq;,subsetneq;,subsetneqq;,subsim;,subsub;,subsup;,succ;,succapprox;,succcurlyeq;,succeq;,succnapprox;,succneqq;,succnsim;,succsim;,sum;,sung;,sup1,sup1;,sup2,sup2;,sup3,sup3;,sup;,supE;,supdot;,supdsub;,supe;,supedot;,suphsol;,suphsub;,suplarr;,supmult;,supnE;,supne;,supplus;,supset;,supseteq;,supseteqq;,supsetneq;,supsetneqq;,supsim;,supsub;,supsup;,swArr;,swarhk;,swarr;,swarrow;,swnwar;,szlig,szlig;,target;,tau;,tbrk;,tcaron;,tcedil;,tcy;,tdot;,telrec;,tfr;,there4;,therefore;,theta;,thetasym;,thetav;,thickapprox;,thicksim;,thinsp;,thkap;,thksim;,thorn,thorn;,tilde;,times,times;,timesb;,timesbar;,timesd;,tint;,toea;,top;,topbot;,topcir;,topf;,topfork;,tosa;,tprime;,trade;,triangle;,triangledown;,triangleleft;,trianglelefteq;,triangleq;,triangleright;,trianglerighteq;,tridot;,trie;,triminus;,triplus;,trisb;,tritime;,trpezium;,tscr;,tscy;,tshcy;,tstrok;,twixt;,twoheadleftarrow;,twoheadrightarrow;,uArr;,uHar;,uacute,uacute;,uarr;,ubrcy;,ubreve;,ucirc,ucirc;,ucy;,udarr;,udblac;,udhar;,ufisht;,ufr;,ugrave,ugrave;,uharl;,uharr;,uhblk;,ulcorn;,ulcorner;,ulcrop;,ultri;,umacr;,uml,uml;,uogon;,uopf;,uparrow;,updownarrow;,upharpoonleft;,upharpoonright;,uplus;,upsi;,upsih;,upsilon;,upuparrows;,urcorn;,urcorner;,urcrop;,uring;,urtri;,uscr;,utdot;,utilde;,utri;,utrif;,uuarr;,uuml,uuml;,uwangle;,vArr;,vBar;,vBarv;,vDash;,vangrt;,varepsilon;,varkappa;,varnothing;,varphi;,varpi;,varpropto;,varr;,varrho;,varsigma;,varsubsetneq;,varsubsetneqq;,varsupsetneq;,varsupsetneqq;,vartheta;,vartriangleleft;,vartriangleright;,vcy;,vdash;,vee;,veebar;,veeeq;,vellip;,verbar;,vert;,vfr;,vltri;,vnsub;,vnsup;,vopf;,vprop;,vrtri;,vscr;,vsubnE;,vsubne;,vsupnE;,vsupne;,vzigzag;,wcirc;,wedbar;,wedge;,wedgeq;,weierp;,wfr;,wopf;,wp;,wr;,wreath;,wscr;,xcap;,xcirc;,xcup;,xdtri;,xfr;,xhArr;,xharr;,xi;,xlArr;,xlarr;,xmap;,xnis;,xodot;,xopf;,xoplus;,xotime;,xrArr;,xrarr;,xscr;,xsqcup;,xuplus;,xutri;,xvee;,xwedge;,yacute,yacute;,yacy;,ycirc;,ycy;,yen,yen;,yfr;,yicy;,yopf;,yscr;,yucy;,yuml,yuml;,zacute;,zcaron;,zcy;,zdot;,zeetrf;,zeta;,zfr;,zhcy;,zigrarr;,zopf;,zscr;,zwj;,zwnj;`,La=`1Æ1Æ1&1&1Á1Á1Ă1Â1Â1А2𝔄1À1À1Α1Ā1⩓1Ą2𝔸1⁡1Å1Å2𝒜1≔1Ã1Ã1Ä1Ä1∖1⫧1⌆1Б1∵1ℬ1Β2𝔅2𝔹1˘1ℬ1≎1Ч1©1©1Ć1⋒1ⅅ1ℭ1Č1Ç1Ç1Ĉ1∰1Ċ1¸1·1ℭ1Χ1⊙1⊖1⊕1⊗1∲1”1’1∷1⩴1≡1∯1∮1ℂ1∐1∳1⨯2𝒞1⋓1≍1ⅅ1⤑1Ђ1Ѕ1Џ1‡1↡1⫤1Ď1Д1∇1Δ2𝔇1´1˙1˝1\`1˜1⋄1ⅆ2𝔻1¨1⃜1≐1∯1¨1⇓1⇐1⇔1⫤1⟸1⟺1⟹1⇒1⊨1⇑1⇕1∥1↓1⤓1⇵1̑1⥐1⥞1↽1⥖1⥟1⇁1⥗1⊤1↧1⇓2𝒟1Đ1Ŋ1Ð1Ð1É1É1Ě1Ê1Ê1Э1Ė2𝔈1È1È1∈1Ē1◻1▫1Ę2𝔼1Ε1⩵1≂1⇌1ℰ1⩳1Η1Ë1Ë1∃1ⅇ1Ф2𝔉1◼1▪2𝔽1∀1ℱ1ℱ1Ѓ1>1>1Γ1Ϝ1Ğ1Ģ1Ĝ1Г1Ġ2𝔊1⋙2𝔾1≥1⋛1≧1⪢1≷1⩾1≳2𝒢1≫1Ъ1ˇ1^1Ĥ1ℌ1ℋ1ℍ1─1ℋ1Ħ1≎1≏1Е1IJ1Ё1Í1Í1Î1Î1И1İ1ℑ1Ì1Ì1ℑ1Ī1ⅈ1⇒1∬1∫1⋂1⁣1⁢1Į2𝕀1Ι1ℐ1Ĩ1І1Ï1Ï1Ĵ1Й2𝔍2𝕁2𝒥1Ј1Є1Х1Ќ1Κ1Ķ1К2𝔎2𝕂2𝒦1Љ1<1<1Ĺ1Λ1⟪1ℒ1↞1Ľ1Ļ1Л1⟨1←1⇤1⇆1⌈1⟦1⥡1⇃1⥙1⌊1↔1⥎1⊣1↤1⥚1⊲1⧏1⊴1⥑1⥠1↿1⥘1↼1⥒1⇐1⇔1⋚1≦1≶1⪡1⩽1≲2𝔏1⋘1⇚1Ŀ1⟵1⟷1⟶1⟸1⟺1⟹2𝕃1↙1↘1ℒ1↰1Ł1≪1⤅1М1 1ℳ2𝔐1∓2𝕄1ℳ1Μ1Њ1Ń1Ň1Ņ1Н1​1​1​1​1≫1≪1
3
- 2𝔑1⁠1\xA01ℕ1⫬1≢1≭1∦1∉1≠2≂̸1∄1≯1≱2≧̸2≫̸1≹2⩾̸1≵2≎̸2≏̸1⋪2⧏̸1⋬1≮1≰1≸2≪̸2⩽̸1≴2⪢̸2⪡̸1⊀2⪯̸1⋠1∌1⋫2⧐̸1⋭2⊏̸1⋢2⊐̸1⋣2⊂⃒1⊈1⊁2⪰̸1⋡2≿̸2⊃⃒1⊉1≁1≄1≇1≉1∤2𝒩1Ñ1Ñ1Ν1Œ1Ó1Ó1Ô1Ô1О1Ő2𝔒1Ò1Ò1Ō1Ω1Ο2𝕆1“1‘1⩔2𝒪1Ø1Ø1Õ1Õ1⨷1Ö1Ö1‾1⏞1⎴1⏜1∂1П2𝔓1Φ1Π1±1ℌ1ℙ1⪻1≺1⪯1≼1≾1″1∏1∷1∝2𝒫1Ψ1"1"2𝔔1ℚ2𝒬1⤐1®1®1Ŕ1⟫1↠1⤖1Ř1Ŗ1Р1ℜ1∋1⇋1⥯1ℜ1Ρ1⟩1→1⇥1⇄1⌉1⟧1⥝1⇂1⥕1⌋1⊢1↦1⥛1⊳1⧐1⊵1⥏1⥜1↾1⥔1⇀1⥓1⇒1ℝ1⥰1⇛1ℛ1↱1⧴1Щ1Ш1Ь1Ś1⪼1Š1Ş1Ŝ1С2𝔖1↓1←1→1↑1Σ1∘2𝕊1√1□1⊓1⊏1⊑1⊐1⊒1⊔2𝒮1⋆1⋐1⋐1⊆1≻1⪰1≽1≿1∋1∑1⋑1⊃1⊇1⋑1Þ1Þ1™1Ћ1Ц1 1Τ1Ť1Ţ1Т2𝔗1∴1Θ2  1 1∼1≃1≅1≈2𝕋1⃛2𝒯1Ŧ1Ú1Ú1↟1⥉1Ў1Ŭ1Û1Û1У1Ű2𝔘1Ù1Ù1Ū1_1⏟1⎵1⏝1⋃1⊎1Ų2𝕌1↑1⤒1⇅1↕1⥮1⊥1↥1⇑1⇕1↖1↗1ϒ1Υ1Ů2𝒰1Ũ1Ü1Ü1⊫1⫫1В1⊩1⫦1⋁1‖1‖1∣1|1❘1≀1 2𝔙2𝕍2𝒱1⊪1Ŵ1⋀2𝔚2𝕎2𝒲2𝔛1Ξ2𝕏2𝒳1Я1Ї1Ю1Ý1Ý1Ŷ1Ы2𝔜2𝕐2𝒴1Ÿ1Ж1Ź1Ž1З1Ż1​1Ζ1ℨ1ℤ2𝒵1á1á1ă1∾2∾̳1∿1â1â1´1´1а1æ1æ1⁡2𝔞1à1à1ℵ1ℵ1α1ā1⨿1&1&1∧1⩕1⩜1⩘1⩚1∠1⦤1∠1∡1⦨1⦩1⦪1⦫1⦬1⦭1⦮1⦯1∟1⊾1⦝1∢1Å1⍼1ą2𝕒1≈1⩰1⩯1≊1≋1'1≈1≊1å1å2𝒶1*1≈1≍1ã1ã1ä1ä1∳1⨑1⫭1≌1϶1‵1∽1⋍1⊽1⌅1⌅1⎵1⎶1≌1б1„1∵1∵1⦰1϶1ℬ1β1ℶ1≬2𝔟1⋂1◯1⋃1⨀1⨁1⨂1⨆1★1▽1△1⨄1⋁1⋀1⤍1⧫1▪1▴1▾1◂1▸1␣1▒1░1▓1█2=⃥2≡⃥1⌐2𝕓1⊥1⊥1⋈1╗1╔1╖1╓1═1╦1╩1╤1╧1╝1╚1╜1╙1║1╬1╣1╠1╫1╢1╟1⧉1╕1╒1┐1┌1─1╥1╨1┬1┴1⊟1⊞1⊠1╛1╘1┘1└1│1╪1╡1╞1┼1┤1├1‵1˘1¦1¦2𝒷1⁏1∽1⋍1\\1⧅1⟈1•1•1≎1⪮1≏1≏1ć1∩1⩄1⩉1⩋1⩇1⩀2∩︀1⁁1ˇ1⩍1č1ç1ç1ĉ1⩌1⩐1ċ1¸1¸1⦲1¢1¢1·2𝔠1ч1✓1✓1χ1○1⧃1ˆ1≗1↺1↻1®1Ⓢ1⊛1⊚1⊝1≗1⨐1⫯1⧂1♣1♣1:1≔1≔1,1@1∁1∘1∁1ℂ1≅1⩭1∮2𝕔1∐1©1©1℗1↵1✗2𝒸1⫏1⫑1⫐1⫒1⋯1⤸1⤵1⋞1⋟1↶1⤽1∪1⩈1⩆1⩊1⊍1⩅2∪︀1↷1⤼1⋞1⋟1⋎1⋏1¤1¤1↶1↷1⋎1⋏1∲1∱1⌭1⇓1⥥1†1ℸ1↓1‐1⊣1⤏1˝1ď1д1ⅆ1‡1⇊1⩷1°1°1δ1⦱1⥿2𝔡1⇃1⇂1⋄1⋄1♦1♦1¨1ϝ1⋲1÷1÷1÷1⋇1⋇1ђ1⌞1⌍1$2𝕕1˙1≐1≑1∸1∔1⊡1⌆1↓1⇊1⇃1⇂1⤐1⌟1⌌2𝒹1ѕ1⧶1đ1⋱1▿1▾1⇵1⥯1⦦1џ1⟿1⩷1≑1é1é1⩮1ě1≖1ê1ê1≕1э1ė1ⅇ1≒2𝔢1⪚1è1è1⪖1⪘1⪙1⏧1ℓ1⪕1⪗1ē1∅1∅1∅1 1 1 1ŋ1 1ę2𝕖1⋕1⧣1⩱1ε1ε1ϵ1≖1≕1≂1⪖1⪕1=1≟1≡1⩸1⧥1≓1⥱1ℯ1≐1≂1η1ð1ð1ë1ë1€1!1∃1ℰ1ⅇ1≒1ф1♀1ffi1ff1ffl2𝔣1fi2fj1♭1fl1▱1ƒ2𝕗1∀1⋔1⫙1⨍1½1½1⅓1¼1¼1⅕1⅙1⅛1⅔1⅖1¾1¾1⅗1⅜1⅘1⅚1⅝1⅞1⁄1⌢2𝒻1≧1⪌1ǵ1γ1ϝ1⪆1ğ1ĝ1г1ġ1≥1⋛1≥1≧1⩾1⩾1⪩1⪀1⪂1⪄2⋛︀1⪔2𝔤1≫1⋙1ℷ1ѓ1≷1⪒1⪥1⪤1≩1⪊1⪊1⪈1⪈1≩1⋧2𝕘1\`1ℊ1≳1⪎1⪐1>1>1⪧1⩺1⋗1⦕1⩼1⪆1⥸1⋗1⋛1⪌1≷1≳2≩︀2≩︀1⇔1 1½1ℋ1ъ1↔1⥈1↭1ℏ1ĥ1♥1♥1…1⊹2𝔥1⤥1⤦1⇿1∻1↩1↪2𝕙1―2𝒽1ℏ1ħ1⁃1‐1í1í1⁣1î1î1и1е1¡1¡1⇔2𝔦1ì1ì1ⅈ1⨌1∭1⧜1℩1ij1ī1ℑ1ℐ1ℑ1ı1⊷1Ƶ1∈1℅1∞1⧝1ı1∫1⊺1ℤ1⊺1⨗1⨼1ё1į2𝕚1ι1⨼1¿1¿2𝒾1∈1⋹1⋵1⋴1⋳1∈1⁢1ĩ1і1ï1ï1ĵ1й2𝔧1ȷ2𝕛2𝒿1ј1є1κ1ϰ1ķ1к2𝔨1ĸ1х1ќ2𝕜2𝓀1⇚1⇐1⤛1⤎1≦1⪋1⥢1ĺ1⦴1ℒ1λ1⟨1⦑1⟨1⪅1«1«1←1⇤1⤟1⤝1↩1↫1⤹1⥳1↢1⪫1⤙1⪭2⪭︀1⤌1❲1{1[1⦋1⦏1⦍1ľ1ļ1⌈1{1л1⤶1“1„1⥧1⥋1↲1≤1←1↢1↽1↼1⇇1↔1⇆1⇋1↭1⋋1⋚1≤1≦1⩽1⩽1⪨1⩿1⪁1⪃2⋚︀1⪓1⪅1⋖1⋚1⪋1≶1≲1⥼1⌊2𝔩1≶1⪑1↽1↼1⥪1▄1љ1≪1⇇1⌞1⥫1◺1ŀ1⎰1⎰1≨1⪉1⪉1⪇1⪇1≨1⋦1⟬1⇽1⟦1⟵1⟷1⟼1⟶1↫1↬1⦅2𝕝1⨭1⨴1∗1_1◊1◊1⧫1(1⦓1⇆1⌟1⇋1⥭1‎1⊿1‹2𝓁1↰1≲1⪍1⪏1[1‘1‚1ł1<1<1⪦1⩹1⋖1⋋1⋉1⥶1⩻1⦖1◃1⊴1◂1⥊1⥦2≨︀2≨︀1∺1¯1¯1♂1✠1✠1↦1↦1↧1↤1↥1▮1⨩1м1—1∡2𝔪1℧1µ1µ1∣1*1⫰1·1·1−1⊟1∸1⨪1⫛1…1∓1⊧2𝕞1∓2𝓂1∾1μ1⊸1⊸2⋙̸2≫⃒2≫̸1⇍1⇎2⋘̸2≪⃒2≪̸1⇏1⊯1⊮1∇1ń2∠⃒1≉2⩰̸2≋̸1ʼn1≉1♮1♮1ℕ1\xA01\xA02≎̸2≏̸1⩃1ň1ņ1≇2⩭̸1⩂1н1–1≠1⇗1⤤1↗1↗2≐̸1≢1⤨2≂̸1∄1∄2𝔫2≧̸1≱1≱2≧̸2⩾̸2⩾̸1≵1≯1≯1⇎1↮1⫲1∋1⋼1⋺1∋1њ1⇍2≦̸1↚1‥1≰1↚1↮1≰2≦̸2⩽̸2⩽̸1≮1≴1≮1⋪1⋬1∤2𝕟1¬1¬1∉2⋹̸2⋵̸1∉1⋷1⋶1∌1∌1⋾1⋽1∦1∦2⫽⃥2∂̸1⨔1⊀1⋠2⪯̸1⊀2⪯̸1⇏1↛2⤳̸2↝̸1↛1⋫1⋭1⊁1⋡2⪰̸2𝓃1∤1∦1≁1≄1≄1∤1∦1⋢1⋣1⊄2⫅̸1⊈2⊂⃒1⊈2⫅̸1⊁2⪰̸1⊅2⫆̸1⊉2⊃⃒1⊉2⫆̸1≹1ñ1ñ1≸1⋪1⋬1⋫1⋭1ν1#1№1 1⊭1⤄2≍⃒1⊬2≥⃒2>⃒1⧞1⤂2≤⃒2<⃒2⊴⃒1⤃2⊵⃒2∼⃒1⇖1⤣1↖1↖1⤧1Ⓢ1ó1ó1⊛1⊚1ô1ô1о1⊝1ő1⨸1⊙1⦼1œ1⦿2𝔬1˛1ò1ò1⧁1⦵1Ω1∮1↺1⦾1⦻1‾1⧀1ō1ω1ο1⦶1⊖2𝕠1⦷1⦹1⊕1∨1↻1⩝1ℴ1ℴ1ª1ª1º1º1⊶1⩖1⩗1⩛1ℴ1ø1ø1⊘1õ1õ1⊗1⨶1ö1ö1⌽1∥1¶1¶1∥1⫳1⫽1∂1п1%1.1‰1⊥1‱2𝔭1φ1ϕ1ℳ1☎1π1⋔1ϖ1ℏ1ℎ1ℏ1+1⨣1⊞1⨢1∔1⨥1⩲1±1±1⨦1⨧1±1⨕2𝕡1£1£1≺1⪳1⪷1≼1⪯1≺1⪷1≼1⪯1⪹1⪵1⋨1≾1′1ℙ1⪵1⪹1⋨1∏1⌮1⌒1⌓1∝1∝1≾1⊰2𝓅1ψ1 2𝔮1⨌2𝕢1⁗2𝓆1ℍ1⨖1?1≟1"1"1⇛1⇒1⤜1⤏1⥤2∽̱1ŕ1√1⦳1⟩1⦒1⦥1⟩1»1»1→1⥵1⇥1⤠1⤳1⤞1↪1↬1⥅1⥴1↣1↝1⤚1∶1ℚ1⤍1❳1}1]1⦌1⦎1⦐1ř1ŗ1⌉1}1р1⤷1⥩1”1”1↳1ℜ1ℛ1ℜ1ℝ1▭1®1®1⥽1⌋2𝔯1⇁1⇀1⥬1ρ1ϱ1→1↣1⇁1⇀1⇄1⇌1⇉1↝1⋌1˚1≓1⇄1⇌1‏1⎱1⎱1⫮1⟭1⇾1⟧1⦆2𝕣1⨮1⨵1)1⦔1⨒1⇉1›2𝓇1↱1]1’1’1⋌1⋊1▹1⊵1▸1⧎1⥨1℞1ś1‚1≻1⪴1⪸1š1≽1⪰1ş1ŝ1⪶1⪺1⋩1⨓1≿1с1⋅1⊡1⩦1⇘1⤥1↘1↘1§1§1;1⤩1∖1∖1✶2𝔰1⌢1♯1щ1ш1∣1∥1­1­1σ1ς1ς1∼1⩪1≃1≃1⪞1⪠1⪝1⪟1≆1⨤1⥲1←1∖1⨳1⧤1∣1⌣1⪪1⪬2⪬︀1ь1/1⧄1⌿2𝕤1♠1♠1∥1⊓2⊓︀1⊔2⊔︀1⊏1⊑1⊏1⊑1⊐1⊒1⊐1⊒1□1□1▪1▪1→2𝓈1∖1⌣1⋆1☆1★1ϵ1ϕ1¯1⊂1⫅1⪽1⊆1⫃1⫁1⫋1⊊1⪿1⥹1⊂1⊆1⫅1⊊1⫋1⫇1⫕1⫓1≻1⪸1≽1⪰1⪺1⪶1⋩1≿1∑1♪1¹1¹1²1²1³1³1⊃1⫆1⪾1⫘1⊇1⫄1⟉1⫗1⥻1⫂1⫌1⊋1⫀1⊃1⊇1⫆1⊋1⫌1⫈1⫔1⫖1⇙1⤦1↙1↙1⤪1ß1ß1⌖1τ1⎴1ť1ţ1т1⃛1⌕2𝔱1∴1∴1θ1ϑ1ϑ1≈1∼1 1≈1∼1þ1þ1˜1×1×1⊠1⨱1⨰1∭1⤨1⊤1⌶1⫱2𝕥1⫚1⤩1‴1™1▵1▿1◃1⊴1≜1▹1⊵1◬1≜1⨺1⨹1⧍1⨻1⏢2𝓉1ц1ћ1ŧ1≬1↞1↠1⇑1⥣1ú1ú1↑1ў1ŭ1û1û1у1⇅1ű1⥮1⥾2𝔲1ù1ù1↿1↾1▀1⌜1⌜1⌏1◸1ū1¨1¨1ų2𝕦1↑1↕1↿1↾1⊎1υ1ϒ1υ1⇈1⌝1⌝1⌎1ů1◹2𝓊1⋰1ũ1▵1▴1⇈1ü1ü1⦧1⇕1⫨1⫩1⊨1⦜1ϵ1ϰ1∅1ϕ1ϖ1∝1↕1ϱ1ς2⊊︀2⫋︀2⊋︀2⫌︀1ϑ1⊲1⊳1в1⊢1∨1⊻1≚1⋮1|1|2𝔳1⊲2⊂⃒2⊃⃒2𝕧1∝1⊳2𝓋2⫋︀2⊊︀2⫌︀2⊋︀1⦚1ŵ1⩟1∧1≙1℘2𝔴2𝕨1℘1≀1≀2𝓌1⋂1◯1⋃1▽2𝔵1⟺1⟷1ξ1⟸1⟵1⟼1⋻1⨀2𝕩1⨁1⨂1⟹1⟶2𝓍1⨆1⨄1△1⋁1⋀1ý1ý1я1ŷ1ы1¥1¥2𝔶1ї2𝕪2𝓎1ю1ÿ1ÿ1ź1ž1з1ż1ℨ1ζ2𝔷1ж1⇝2𝕫2𝓏1‍1‌`;let Ra=!1,za=/* @__PURE__ */ new Int32Array,Ba=/* @__PURE__ */ new Int32Array,Va=/* @__PURE__ */ new Uint8Array,Ha=/* @__PURE__ */ new Int32Array;const Ua=/* @__PURE__ */ new Int32Array(128);let Wa=/* @__PURE__ */ new Int32Array;const Ga=[];let Ka=0,qa=0;function newNode(e){let t=Ka++;return za[t]=-1,Ba[t]=-1,Va[t]=e,Ha[t]=-1,t}function build(){Ra=!0;let e=18872;za=new Int32Array(e),Ba=new Int32Array(e),Va=new Uint8Array(e),Ha=new Int32Array(e),Ua.fill(-1);let t=0;for(let e=0;e<2231;e++){let e=La.charCodeAt(t)-48;Ga.push(La.slice(t+1,t+1+e)),t+=1+e}let n=0,r=0,i=18871;for(;n<i;){let e=Ia.charCodeAt(n),t=Ua[e];for(t<0&&(t=newNode(e),Ua[e]=t),n++;n<i;){let e=Ia.charCodeAt(n);if(e===44)break;let r=za[t],i=-1,a=-1;for(;r>=0;){if(Va[r]===e){i=r;break}a=r,r=Ba[r]}i<0&&(i=newNode(e),a<0?za[t]=i:Ba[a]=i),t=i,n++}Ha[t]=r++,n++}Wa=(/* @__PURE__ */ new Int32Array(16384)).fill(-1);for(let e=0;e<128;e++){let t=Ua[e];if(!(t<0))for(let n=za[t];n>=0;n=Ba[n])Wa[e*128+Va[n]]=n}}function matchNamedReference(e,t){Ra||build(),qa=0;let n=e.length;if(t>=n)return-1;let r=e.charCodeAt(t);if(r>=128)return-1;let i=Ua[r];if(i<0)return-1;let a=-1,o=0,s=t+1;if(Ha[i]>=0&&(a=Ha[i],o=1),s<n){let t=e.charCodeAt(s),n=t<128?Wa[r*128+t]:-1;if(n<0)return qa=o,a;i=n,s++,Ha[i]>=0&&(a=Ha[i],o=2)}for(;s<n;){let n=e.charCodeAt(s),r=za[i];for(;r>=0&&Va[r]!==n;)r=Ba[r];if(r<0)break;i=r,s++,Ha[i]>=0&&(a=Ha[i],o=s-t)}return qa=o,a}function matchedLength(){return qa}function entityValue(e){return Ga[e]}const Ja=new Int32Array([8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376]);function numericReferenceValue(e){return e===0||e>1114111||e>=55296&&e<=57343?`�`:e>=128&&e<=159?String.fromCharCode(Ja[e-128]):String.fromCodePoint(e)}const Ya=/* @__PURE__ */ `.a.abbr.address.applet.area.article.aside.audio.b.base.basefont.bgsound.big.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.dir.div.dl.dt.em.embed.fieldset.figcaption.figure.font.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.image.img.input.ins.kbd.keygen.label.legend.li.link.listing.main.map.mark.marquee.math.menu.menuitem.meta.meter.nav.nobr.noembed.noframes.noscript.object.ol.optgroup.option.output.p.param.picture.plaintext.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.search.section.select.selectedcontent.slot.small.source.span.strike.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.tt.u.ul.var.video.wbr.xmp.path.g.circle.rect.line.polyline.polygon.ellipse.defs.use.symbol.clippath.lineargradient.radialgradient.stop.mask.pattern.text.tspan.textpath.foreignobject.desc.mi.mo.mn.ms.mtext.mrow.annotation-xml.mglyph.malignmark`.split(`.`),Xa=/* @__PURE__ */ `.id.class.style.type.name.value.href.src.alt.title.role.for.placeholder.disabled.checked.selected.readonly.required.multiple.hidden.tabindex.lang.dir.width.height.action.method.target.rel.content.charset.colspan.rowspan.data-testid.aria-label.aria-labelledby.aria-describedby.aria-hidden.aria-expanded.aria-selected.aria-checked.aria-pressed.aria-disabled.aria-controls.aria-live.aria-current.aria-haspopup.aria-invalid.aria-required.aria-valuenow.aria-valuemin.aria-valuemax.aria-level.aria-modal.aria-owns.aria-busy.aria-orientation.aria-roledescription.autocomplete.autofocus.min.max.step.pattern.maxlength.minlength.size.accept.label.open.draggable.contenteditable.xmlns.viewbox.d.fill.stroke.x.y.cx.cy.r.points.transform.xlink:href.focusable.form.list.datetime.headers.scope.span.start.reversed.download.enctype.novalidate.inputmode.spellcheck.translate.inert.popover.slot.is.part.loading.decoding.srcset.sizes.media.async.defer.nonce.integrity.crossorigin.referrerpolicy.sandbox.allow.poster.controls.autoplay.loop.muted.kind.srclang.default.wrap.rows.cols.high.low.optimum.shape.coords.usemap.ismap.accesskey.enterkeyhint.itemprop.itemscope.itemtype.http-equiv.property.stroke-width.stroke-linecap.stroke-linejoin.fill-rule.clip-rule.xmlns:xlink.version.preserveaspectratio.encoding.definitionurl.color.face.shadowrootmode`.split(`.`),Za=1023,Qa=/* @__PURE__ */ new Int32Array(1024),$a=/* @__PURE__ */ new Int32Array(1024);function hashName(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)|0;return t}function fillTable(e,t){for(let n=1;n<t.length;n++){let r=hashName(t[n])&Za;for(;e[r]!==0;)r=r+1&Za;e[r]=n}}fillTable(Qa,Ya),fillTable($a,Xa);function fixName(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?String.fromCharCode(r+32):r===0?`�`:e[n]}return t}function isAsciiAlpha(e){return e>=97&&e<=122||e>=65&&e<=90}function isAsciiAlnum(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function isWs$1(e){return e===32||e===10||e===9||e===12}__name(isWs$1,`isWs`);function lower$1(e){return e>=65&&e<=90?e+32:e}__name(lower$1,`lower`);function normalizeNewlines$1(e){let t=e.indexOf(`\r`);if(t<0)return e;let n=``,r=0,i=e.length;for(;t>=0;)n+=e.slice(r,t)+`
4
- `,r=t+1,r<i&&e.charCodeAt(r)===10&&r++,t=e.indexOf(`\r`,r);return n+e.slice(r)}__name(normalizeNewlines$1,`normalizeNewlines`);function ciMatch(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r++)if(lower$1(e.charCodeAt(t+r))!==n.charCodeAt(r))return!1;return!0}var Tokenizer=class{src;pos;len;state;allowCDATA;processingInstructions;lastStartTag;type;pendingType;text;textHasNull;name;tagId;selfClosing;attrNames;attrValues;attrCount;data;hasName;publicId;hasPublicId;systemId;hasSystemId;forceQuirks;textStart;textBuf;tagStart;nameStart;nameHash;nameFix;isEndTag;valueStart;valueBuf;dropAttr;tempBuf;constructor(){this.src=``,this.pos=0,this.len=0,this.state=0,this.allowCDATA=!1,this.processingInstructions=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.name=``,this.tagId=0,this.selfClosing=!1,this.attrNames=[],this.attrValues=[],this.attrCount=0,this.data=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1,this.textStart=-1,this.textBuf=``,this.tagStart=0,this.nameStart=0,this.nameHash=0,this.nameFix=!1,this.isEndTag=!1,this.valueStart=-1,this.valueBuf=``,this.dropAttr=!1,this.tempBuf=``}reset(e){this.src=normalizeNewlines$1(e),this.pos=0,this.len=this.src.length,this.state=0,this.allowCDATA=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.textStart=-1,this.textBuf=``,this.attrCount=0}release(){this.src=``,this.text=``,this.data=``,this.textBuf=``,this.valueBuf=``,this.attrNames.length=0,this.attrValues.length=0,this.attrCount=0}flushRaw(e){let t=this.textStart;t>=0&&(e>t&&(this.textBuf+=this.src.slice(t,e)),this.textStart=-1)}appendText(e,t){this.flushRaw(t),this.textBuf+=e}startRun(e){this.textStart<0&&(this.textStart=e)}emit(e,t){this.flushRaw(t),this.textBuf.length===0?this.type=e:(this.text=this.textBuf,this.textBuf=``,this.type=1,this.pendingType=e)}emitTextNow(e){return this.flushRaw(e),this.textBuf.length!==0&&(this.text=this.textBuf,this.textBuf=``,this.type=1,!0)}finishTagName(e){let t=this.nameStart,n=e-t,r=this.nameHash&Za;if(!this.nameFix){for(;;){let e=Qa[r];if(e===0)break;let i=Ya[e];if(i.length===n&&this.src.startsWith(i,t)){this.name=i,this.tagId=e;return}r=r+1&Za}this.name=this.src.slice(t,e),this.tagId=0;return}let i=fixName(this.src.slice(t,e));for(;;){let e=Qa[r];if(e===0)break;if(Ya[e]===i){this.name=Ya[e],this.tagId=e;return}r=r+1&Za}this.name=i,this.tagId=0}finishAttrName(e){let t=this.nameStart,n=e-t,r=``,i=this.nameHash&Za,a=!1;if(this.nameFix)r=fixName(this.src.slice(t,e));else{for(;;){let e=$a[i];if(e===0)break;let o=Xa[e];if(o.length===n&&this.src.startsWith(o,t)){r=o,a=!0;break}i=i+1&Za}a||(r=this.src.slice(t,e))}let o=this.attrNames,s=this.attrCount;for(let e=0;e<s;e++)if(o[e]===r){this.dropAttr=!0;return}this.dropAttr=!1,s<o.length?(o[s]=r,this.attrValues[s]=``):(o.push(r),this.attrValues.push(``)),this.attrCount=s+1}startValue(){this.valueStart=this.pos,this.valueBuf=``}flushValue(e){this.valueStart>=0&&(e>this.valueStart&&(this.valueBuf+=this.src.slice(this.valueStart,e)),this.valueStart=-1)}finishValue(e){let t=``;this.valueBuf.length===0?t=this.valueStart>=0&&e>this.valueStart?this.src.slice(this.valueStart,e):``:(this.flushValue(e),t=this.valueBuf),this.valueStart=-1,this.valueBuf=``,this.dropAttr||(this.attrValues[this.attrCount-1]=t)}appendValue(e,t){this.flushValue(t),this.valueBuf+=e,this.valueStart=this.pos}newTag(e){this.isEndTag=e,this.selfClosing=!1,this.attrCount=0,this.nameStart=this.pos,this.nameHash=0,this.nameFix=!1}emitTag(){this.isEndTag?this.emit(3,this.tagStart):(this.lastStartTag=this.name,this.emit(2,this.tagStart)),this.state=0}eofInTag(){this.flushRaw(this.tagStart),this.state=0}isAppropriateEndTag(){let e=this.lastStartTag,t=this.nameStart;if(e.length===0||this.pos-t!==e.length)return!1;for(let n=0;n<e.length;n++)if(lower$1(this.src.charCodeAt(t+n))!==e.charCodeAt(n))return!1;return!0}endTagNameStep(){let e=this.pos<this.len?this.src.charCodeAt(this.pos):-1;return isAsciiAlpha(e)?(this.pos++,-2):(isWs$1(e)||e===47||e===62)&&this.isAppropriateEndTag()?(this.name=this.lastStartTag,this.tagId=0,this.isEndTag=!0,this.selfClosing=!1,this.attrCount=0,this.pos++,e===62?(this.finishEndTagId(),this.emitTag(),0):(this.finishEndTagId(),isWs$1(e)?31:39)):-1}finishEndTagId(){let e=this.name,t=hashName(e)&Za;for(;;){let n=Qa[t];if(n===0)break;if(Ya[n]===e){this.tagId=n;return}t=t+1&Za}this.tagId=0}charRef(e){let t=this.src,n=this.pos,r=this.len;if(n>=r)return null;let i=t.charCodeAt(n);if(isAsciiAlnum(i)){if(i===108&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`<`;if(i===103&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`>`;if(i===97&&t.startsWith(`mp;`,n+1))return this.pos=n+4,`&`;if(i===113&&t.startsWith(`uot;`,n+1))return this.pos=n+5,`"`;if(i===110&&t.startsWith(`bsp;`,n+1))return this.pos=n+5,`\xA0`;let a=matchNamedReference(t,n);if(a<0)return null;let o=n+matchedLength(),s=t.charCodeAt(o-1);if(e&&s!==59&&o<r){let e=t.charCodeAt(o);if(e===61||isAsciiAlnum(e))return null}return this.pos=o,entityValue(a)}if(i!==35)return null;let a=n+1,o=!1;if(a<r){let e=t.charCodeAt(a);(e===120||e===88)&&(o=!0,a++)}let s=0,c=a;for(;a<r;){let e=t.charCodeAt(a),n=-1;if(e>=48&&e<=57?n=e-48:o&&e>=97&&e<=102?n=e-87:o&&e>=65&&e<=70&&(n=e-55),n<0)break;s=s*(o?16:10)+n,s>1114111&&(s=1114112),a++}return a===c?null:(a<r&&t.charCodeAt(a)===59&&a++,this.pos=a,numericReferenceValue(s))}next(){if(this.pendingType!==0)return this.type=this.pendingType,this.pendingType=0,this.textHasNull=!1,this.type;if(this.type===6)return 6;for(this.textHasNull=!1,this.type=0;this.type===0;)this.step();return this.type}step(){let e=this.src,t=this.len;switch(this.state){case 0:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=5;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else for(this.textStart<0&&(this.textStart=n),r===0&&(this.textHasNull=!0),n++;n<t;){let t=e.charCodeAt(n);if(t===60||t===38||t===0)break;n++}}}case 1:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=8;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else r===0?(this.appendText(`�`,n),n++):(this.textStart<0&&(this.textStart=n),n++)}}case 2:case 3:case 4:{let n=this.state,r=this.pos;for(;;){if(r>=t){this.pos=r,this.emit(6,t);return}let i=e.charCodeAt(r);if(i===60&&n!==4){this.textStart<0&&(this.textStart=r),this.tagStart=r,this.pos=r+1,this.state=n===2?11:14;return}i===0?(this.appendText(`�`,r),r++):(this.textStart<0&&(this.textStart=r),r++)}}case 5:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.state=41):n===47?(this.pos++,this.state=6):isAsciiAlpha(n)?(this.newTag(!1),this.state=7):n===63?this.processingInstructions?(this.tempBuf=``,this.pos++,this.state=69):(this.data=``,this.state=40):this.state=0;return}case 6:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)?(this.newTag(!0),this.state=7):n===62?(this.flushRaw(this.tagStart),this.pos++,this.state=0):n===-1?this.state=0:(this.data=``,this.state=40);return}case 7:{let n=this.pos,r=this.nameHash;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let i=e.charCodeAt(n);if(i===62||i===47||isWs$1(i)){this.nameHash=r,this.finishTagName(n),this.pos=n+1,i===62?this.emitTag():this.state=i===47?39:31;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 8:case 11:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.pos++,this.state=this.state===8?9:12):this.state=this.state===8?1:2;return;case 9:case 12:case 15:case 23:{let n=this.pos<t?e.charCodeAt(this.pos):-1,r=this.state;isAsciiAlpha(n)?(this.nameStart=this.pos,this.state=r===9?10:r===12?13:r===15?16:24):this.state=r===9?1:r===12?2:r===15?3:19;return}case 10:case 13:case 16:case 24:{let e=this.state;for(;;){let t=this.endTagNameStep();if(t!==-2){t===-1?this.state=e===10?1:e===13?2:e===16?3:19:t!==0&&(this.state=t);return}}}case 14:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=15):n===33?(this.pos++,this.state=17):this.state=3;return}case 17:case 18:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.startRun(this.pos),this.pos++,this.state=this.state===17?18:21):this.state=3;return;case 19:case 20:case 21:case 26:case 27:case 28:{let n=this.state,r=n>=26,i=r?26:19,a=this.pos;if(a>=t){this.emit(6,t);return}let o=e.charCodeAt(a);o===45?(this.startRun(a),this.pos++,this.state=n===i?i+1:i+2):o===60?(this.startRun(a),this.tagStart=a,this.pos++,this.state=r?29:22):o===62&&n===i+2?(this.startRun(a),this.pos++,this.state=3):o===0?(this.appendText(`�`,a),this.pos++,this.state=i):(this.startRun(a),this.pos++,this.state=i);return}case 22:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=23):isAsciiAlpha(n)?(this.tempBuf=``,this.state=25):this.state=19;return}case 25:case 30:{let n=this.state===25,r=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(r)||r===47||r===62){this.startRun(this.pos),this.pos++;let e=this.tempBuf===`script`;this.state=n?e?26:19:e?19:26}else isAsciiAlpha(r)?(this.startRun(this.pos),this.tempBuf+=String.fromCharCode(lower$1(r)),this.pos++):this.state=n?19:26;return}case 29:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.startRun(this.pos),this.pos++,this.tempBuf=``,this.state=30):this.state=26;return;case 31:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;if(r===47||r===62||r===-1){this.state=33;return}this.nameStart=n,this.nameHash=0+r|0,this.nameFix=r===0||r>=65&&r<=90,this.nameFix&&(this.nameHash=r===0?65533:r+32),this.pos=n+1,this.state=32;return}case 32:{let n=this.pos,r=this.nameHash;for(;;){let i=n<t?e.charCodeAt(n):-1;if(i===-1||isWs$1(i)||i===47||i===62){this.nameHash=r,this.finishAttrName(n),this.pos=n,this.state=33;return}if(i===61){this.nameHash=r,this.finishAttrName(n),this.pos=n+1,this.state=34;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 33:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;if(this.pos=n,n>=t){this.eofInTag();return}let r=e.charCodeAt(n);r===47?(this.pos++,this.state=39):r===61?(this.pos++,this.state=34):r===62?(this.pos++,this.emitTag()):this.state=31;return}case 34:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===34?(this.pos++,this.startValue(),this.state=35):r===39?(this.pos++,this.startValue(),this.state=36):r===62?(this.pos++,this.emitTag()):(this.startValue(),this.state=37);return}case 35:case 36:{let n=this.state===35?34:39,r=this.pos;for(;;){if(r>=t){this.pos=r,this.eofInTag();return}let i=e.charCodeAt(r);if(i===n){this.finishValue(r),this.pos=r+1,this.state=38;return}if(i===38){this.pos=r+1;let e=this.charRef(!0);e===null?r++:(this.appendValue(e,r),r=this.pos)}else i===0&&(this.pos=r+1,this.appendValue(`�`,r)),r++}}case 37:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.finishValue(n),this.pos=n+1,this.state=31;return}if(r===62){this.finishValue(n),this.pos=n+1,this.emitTag();return}if(r===38){this.pos=n+1;let e=this.charRef(!0);e===null?n++:(this.appendValue(e,n),n=this.pos)}else r===0&&(this.pos=n+1,this.appendValue(`�`,n)),n++}}case 38:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=31):n===47?(this.pos++,this.state=39):n===62?(this.pos++,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 39:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.selfClosing=!0,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 40:{let n=this.pos,r=e.indexOf(`>`,n);r<0&&(r=t);let i=e.slice(n,r);i.indexOf(`\0`)>=0&&(i=i.replaceAll(`\0`,`�`)),this.data+=i,this.pos=r<t?r+1:t,this.emit(4,this.tagStart),this.state=0;return}case 41:{if(this.emitTextNow(this.tagStart))return;let n=this.pos;n+1<t&&e.charCodeAt(n)===45&&e.charCodeAt(n+1)===45?(this.pos=n+2,this.data=``,this.state=42):ciMatch(e,n,`doctype`)?(this.pos=n+7,this.state=52):e.startsWith(`[CDATA[`,n)?(this.pos=n+7,this.allowCDATA?this.state=68:(this.data=`[CDATA[`,this.state=40)):(this.data=``,this.state=40);return}case 42:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=43):n===62?(this.pos++,this.emitComment()):this.state=44;return}case 43:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 44:{let n=this.pos,r=n;for(;n<t;){let t=e.charCodeAt(n);if(t===60||t===45||t===0)break;n++}if(n>r&&(this.data+=e.slice(r,n)),this.pos=n,n>=t){this.emitComment();return}let i=e.charCodeAt(n);this.pos++,i===60?(this.data+=`<`,this.state=45):i===45?this.state=49:this.data+=`�`;return}case 45:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.data+=`!`,this.state=46):n===60?(this.pos++,this.data+=`<`):this.state=44;return}case 46:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=47):this.state=44;return;case 47:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=48):this.state=49;return;case 48:this.state=50;return;case 49:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 50:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.emitComment()):n===33?(this.pos++,this.state=51):n===45?(this.pos++,this.data+=`-`):n===-1?this.emitComment():(this.data+=`--`,this.state=44);return}case 51:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.data+=`--!`,this.state=49):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`--!`,this.state=44);return}case 52:{this.name=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1;let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=53):n===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=53;return}case 53:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):(this.hasName=!0,this.name=``,this.state=54);return}case 54:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.forceQuirks=!0,this.emitDoctype();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.pos=n+1,this.state=55;return}if(r===62){this.pos=n+1,this.emitDoctype();return}r>=65&&r<=90?this.name+=String.fromCharCode(r+32):r===0?this.name+=`�`:this.name+=e[n],n++}}case 55:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.emitDoctype()):ciMatch(e,n,`public`)?(this.pos+=6,this.state=56):ciMatch(e,n,`system`)?(this.pos+=6,this.state=62):(this.forceQuirks=!0,this.state=67);return}case 56:case 62:{let n=this.state===56,r=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(r)?(this.pos++,this.state=n?57:63):r===34||r===39?(this.pos++,this.startDoctypeId(n,r)):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 57:case 63:{let n=this.state===57,r=this.pos;for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r;let i=r<t?e.charCodeAt(r):-1;i===34||i===39?(this.pos++,this.startDoctypeId(n,i)):i===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 58:case 59:case 64:case 65:{let n=this.state,r=n===58||n===59,i=n===58||n===64?34:39,a=this.pos,o=``;for(;;){if(a>=t){this.pos=a,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}let n=e.charCodeAt(a);if(n===i){this.pos=a+1,this.appendDoctypeId(r,o),this.state=r?60:66;return}if(n===62){this.pos=a+1,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}o+=n===0?`�`:e[a],a++}}case 60:case 61:{let n=this.state===61,r=this.pos;if(n){for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r}let i=r<t?e.charCodeAt(r):-1;!n&&isWs$1(i)?(this.pos++,this.state=61):i===62?(this.pos++,this.emitDoctype()):i===34||i===39?(this.pos++,this.startDoctypeId(!1,i)):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 66:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===62?(this.pos++,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=67;return}case 67:{let n=e.indexOf(`>`,this.pos);this.pos=n<0?t:n+1,this.emitDoctype();return}case 68:{let n=this.pos,r=e.indexOf(`]]>`,n);if(r<0&&(r=t),r>n&&(this.startRun(n),e.indexOf(`\0`,n)>=0&&e.indexOf(`\0`,n)<r&&(this.textHasNull=!0),this.flushRaw(r)),r>=t){this.pos=t,this.emit(6,t);return}this.pos=r+3,this.state=0;return}case 69:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)||n===95?this.state=70:n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 70:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(n)||n===63||n===62){let e=this.tempBuf,t=fixName(e);t===`xml`||t===`xml-stylesheet`?(this.data=`?`+e,this.state=40):(this.name=e,this.data=``,this.state=71)}else isAsciiAlnum(n)||n===45||n===95?(this.tempBuf+=e[this.pos],this.pos++):n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 71:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n,this.state=72;return}case 72:case 73:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(n===-1){this.flushRaw(this.tagStart),this.state=0;return}if(this.state===73){if(n===62){this.pos++,this.emit(7,this.tagStart),this.state=0;return}this.data+=`?`,this.state=72;return}this.pos++,n===63?this.state=73:n===62?(this.emit(7,this.tagStart),this.state=0):this.data+=e[this.pos-1];return}default:throw Error(`unknown tokenizer state `+String(this.state))}}emitComment(){this.emit(4,this.tagStart),this.state=0}emitDoctype(){this.emit(5,this.tagStart),this.state=0}startDoctypeId(e,t){e?(this.publicId=``,this.hasPublicId=!0,this.state=t===34?58:59):(this.systemId=``,this.hasSystemId=!0,this.state=t===34?64:65)}appendDoctypeId(e,t){e?this.publicId+=t:this.systemId+=t}};const eo=1024,to=/* @__PURE__ */ new Int32Array(178);function mark(e,t){for(let n=0;n<t.length;n++)to[t[n]]|=e}mark(1,[4,19,56,119,121,125,73,84,106,122,169,170,171,172,173,174,175,176,177]),mark(2,[85,133]),mark(4,[17]),mark(8,[56,119,122]),mark(16,[3,4,5,6,7,10,11,12,14,15,16,17,19,20,23,24,27,29,32,33,34,35,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,61,64,67,68,69,70,73,75,77,79,81,82,83,84,85,89,90,92,93,103,104,105,106,110,114,116,119,120,121,122,123,124,125,126,128,129,130,133,136,137,169,170,171,172,173,174,175,176,177]),mark(32,[27,35,67,86,87,89,96,97,98,99]),mark(64,[19,24,27,35,67,86,87,89,96,97,98,99,120,121,124,125,126,129]),mark(128,[1,9,13,22,36,41,57,80,101,109,112,113,131,132]),mark(256,[9,13,14,15,16,20,22,27,33,34,35,36,37,46,47,48,49,50,51,52,55,57,60,67,69,75,77,80,85,89,93,100,101,109,111,113,112,115,117,119,131,132,133,134]),mark(512,[17,38,61,84,88,106,123,60]),mark(eo,[17,38,61,84,88,106,123]);const no=/* @__PURE__ */ new Map;for(let e=1;e<Ya.length;e++)no.set(Ya[e],e);function parserTagId(e){let t=no.get(e);return t===void 0?0:t}const ro=/* @__PURE__ */ `attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`),io=/* @__PURE__ */ `altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`),ao=/* @__PURE__ */ new Map;for(let e=0;e<ro.length;e++)ao.set(ro[e].toLowerCase(),ro[e]);const oo=/* @__PURE__ */ new Map;for(let e=0;e<io.length;e++)oo.set(io[e].toLowerCase(),io[e]);const so=/* @__PURE__ */ `+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`);function asciiLower(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90){let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);n+=t>=65&&t<=90?String.fromCharCode(t+32):e[r]}return n}}return e}function isWsCode(e){return e===32||e===10||e===9||e===12||e===13}function isAllWs(e){for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t)))return!1;return!0}function hasNonWsNonNull(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!isWsCode(n)&&n!==0)return!0}return!1}function removeNulls(e){return e.indexOf(`\0`)<0?e:e.replaceAll(`\0`,``)}var TreeSink=class{createElement(e,t,n,r,i,a,o,s,c){return-1}insert(e,t,n){}insertText(e,t,n){}insertComment(e,t,n){}insertProcessingInstruction(e,t,n,r){}insertDoctype(e,t,n,r){}remove(e){}hasParent(e){return!1}reparentChildren(e,t){}addMissingAttributes(e,t,n,r){}templateContents(e){return e}attachDeclarativeShadowRoot(e,t,n,r,i,a){return-1}associateForm(e,t){}setDocumentMode(e){}},ParseOptions=class{scripting;allowDeclarativeShadowRoots;processingInstructions;iframeSrcdoc;constructor(){this.scripting=!1,this.allowDeclarativeShadowRoots=!1,this.processingInstructions=!1,this.iframeSrcdoc=!1}},TreeBuilder=class{sink;tok;hNs;hTag;hName;hIP;hContents;stack;afe;afeTok;ptName;ptId;ptAttrStart;ptAttrCount;poolNames;poolValues;templateModes;mode;originalMode;docHandle;headElement;formElement;fragmentContext;framesetOk;fosterParenting;documentMode;scripting;allowDSD;iframeSrcdoc;stopped;skipNewline;reprocess;ttype;chars;cpos;charsHasNull;pendingTableText;pendingTableNonWs;locParent;locRef;fNames;fValues;fNs;emptyStrings;emptyNumbers;constructor(e){this.sink=e,this.tok=new Tokenizer,this.hNs=[],this.hTag=[],this.hName=[],this.hIP=[],this.hContents=[],this.stack=[],this.afe=[],this.afeTok=[],this.ptName=[],this.ptId=[],this.ptAttrStart=[],this.ptAttrCount=[],this.poolNames=[],this.poolValues=[],this.templateModes=[],this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=!1,this.allowDSD=!1,this.iframeSrcdoc=!1,this.stopped=!1,this.skipNewline=!1,this.reprocess=!1,this.ttype=0,this.chars=``,this.cpos=0,this.charsHasNull=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.locParent=-1,this.locRef=-1,this.fNames=[],this.fValues=[],this.fNs=[],this.emptyStrings=[],this.emptyNumbers=[]}resetState(e){this.hNs.length=0,this.hTag.length=0,this.hName.length=0,this.hIP.length=0,this.hContents.length=0,this.stack.length=0,this.afe.length=0,this.afeTok.length=0,this.ptName.length=0,this.ptId.length=0,this.ptAttrStart.length=0,this.ptAttrCount.length=0,this.poolNames.length=0,this.poolValues.length=0,this.templateModes.length=0,this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=e.scripting,this.allowDSD=e.allowDeclarativeShadowRoots,this.iframeSrcdoc=e.iframeSrcdoc,this.stopped=!1,this.skipNewline=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.tok.processingInstructions=e.processingInstructions}setMeta(e,t,n,r,i){for(;this.hNs.length<=e;)this.hNs.push(0),this.hTag.push(0),this.hName.push(``),this.hIP.push(!1),this.hContents.push(-1);this.hNs[e]=t,this.hTag[e]=n,this.hName[e]=r,this.hIP[e]=i,this.hContents[e]=-1}parseDocument(e,t,n){this.resetState(n),this.docHandle=t,this.setMeta(t,0,0,`#document`,!1),this.tok.reset(e),this.run()}parseFragment(e,t,n,r,i,a,o,s,c){if(this.resetState(c),this.documentMode=s,this.setMeta(t,0,56,`html`,!1),this.setContextMeta(n,r,i,a),this.fragmentContext=n,this.tok.reset(e),i===0){let e=this.hTag[n];e===128||e===123?this.tok.state=1:e===114||e===137||e===58||e===81||e===82?this.tok.state=2:e===103?this.tok.state=3:e===83?this.scripting&&(this.tok.state=2):e===92&&(this.tok.state=4)}this.stack.push(t),i===0&&this.hTag[n]===122&&this.templateModes.push(15),this.resetInsertionMode(),this.formElement=o,this.tok.allowCDATA=this.hNs[this.adjustedCurrentNode()]!==0,this.run()}setContextMeta(e,t,n,r){n===0?this.setMeta(e,n,parserTagId(t),t,!1):(this.setMeta(e,n,0,t,!1),this.setForeignFacts(e,n,t,r))}setForeignFacts(e,t,n,r){let i=0,a=!1;if(t===2){if(n===`mi`)i=169;else if(n===`mo`)i=170;else if(n===`mn`)i=171;else if(n===`ms`)i=172;else if(n===`mtext`)i=173;else if(n===`annotation-xml`){i=174;let e=asciiLower(r);a=e===`text/html`||e===`application/xhtml+xml`}}else t===1&&(n===`foreignObject`?i=175:n===`desc`?i=176:n===`title`&&(i=177),a=i!==0);this.hTag[e]=i,this.hIP[e]=a}run(){let e=this.tok;for(;!this.stopped;){let t=e.next();if(this.ttype=t,t===1){if(this.chars=e.text,this.cpos=0,this.charsHasNull=e.textHasNull,this.skipNewline&&(this.skipNewline=!1,this.chars.charCodeAt(0)===10)){if(this.chars.length===1)continue;this.cpos=1}}else this.skipNewline=!1;if(this.processToken(),t===6)break;e.allowCDATA=this.stack.length!==0&&this.hNs[this.adjustedCurrentNode()]!==0}this.stack.length=0,e.release(),this.chars=``,this.pendingTableText=``}processToken(){do this.reprocess=!1,this.useHtmlRules()?this.dispatchMode(this.mode):this.foreignContent();while(this.reprocess&&!this.stopped)}useHtmlRules(){if(this.stack.length===0)return!0;let e=this.adjustedCurrentNode();if(this.hNs[e]===0)return!0;let t=this.ttype;if(t===6)return!0;let n=this.hTag[e];return!!(n>=169&&n<=173&&(t===1||t===2&&this.tok.tagId!==167&&this.tok.tagId!==168)||n===174&&t===2&&this.tok.tagId===118||this.hIP[e]&&(t===2||t===1))}dispatchMode(e){switch(e){case 0:return this.initial();case 1:return this.beforeHtml();case 2:return this.beforeHead();case 3:return this.inHead();case 4:return this.inHeadNoscript();case 5:return this.afterHead();case 6:return this.inBody();case 7:return this.text();case 8:return this.inTable();case 9:return this.inTableText();case 10:return this.inCaption();case 11:return this.inColumnGroup();case 12:return this.inTableBody();case 13:return this.inRow();case 14:return this.inCell();case 15:return this.inTemplate();case 16:return this.afterBody();case 17:return this.inFrameset();case 18:return this.afterFrameset();case 19:return this.afterAfterBody();case 20:return this.afterAfterFrameset()}}currentNode(){return this.stack[this.stack.length-1]}adjustedCurrentNode(){let e=this.stack;return this.fragmentContext>=0&&e.length===1?this.fragmentContext:e[e.length-1]}isHtml(e,t){return this.hTag[e]===t&&this.hNs[e]===0}isHtmlNamedAsToken(e){if(this.hNs[e]!==0)return!1;let t=this.tok.tagId;return t===0?this.hName[e]===this.tok.name:this.hTag[e]===t}currentIs(e){return this.isHtml(this.currentNode(),e)}pop(){this.stack.pop()}popUntil(e){let t=this.stack;for(;t.length!==0;){let n=t.pop();if(this.hTag[n]===e&&this.hNs[n]===0)return}}popUntilNode(e){let t=this.stack;for(;t.length!==0;)if(t.pop()===e)return}popUntilNamedAsToken(){let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.isHtmlNamedAsToken(t))return}}stackIndexOf(e){let t=this.stack;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}inScope(e,t){let n=this.stack;for(let r=n.length-1;r>=0;r--){let i=n[r],a=this.hTag[i];if(a===e&&this.hNs[i]===0)return!0;let o=to[a];if(t===8){if(o&8&&this.hNs[i]===0)return!1}else if(o&(1|t)&&(o&1||this.hNs[i]===0))return!1}return!1}tokenNameInScope(e){let t=this.tok.tagId;if(t!==0)return this.inScope(t,e);let n=this.stack,r=this.tok.name;for(let t=n.length-1;t>=0;t--){let i=n[t];if(this.hNs[i]===0&&this.hTag[i]===0&&this.hName[i]===r)return!0;let a=to[this.hTag[i]];if(e===8){if(a&8&&this.hNs[i]===0)return!1}else if(a&(1|e)&&(a&1||this.hNs[i]===0))return!1}return!1}nodeInScope(e){let t=this.stack;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r===e)return!0;if(to[this.hTag[r]]&1)return!1}return!1}isSpecial(e){return!!(to[this.hTag[e]]&16)&&(this.hNs[e]===0||this.hTag[e]>=169)}templateInStack(){let e=this.stack;for(let t=e.length-1;t>=0;t--)if(this.isHtml(e[t],122))return!0;return!1}parsingTemplateContents(){if(this.templateInStack())return!0;let e=this.fragmentContext;return e>=0&&this.isHtml(e,122)}generateImpliedEndTags(e){let t=this.stack;for(;;){let n=t[t.length-1],r=this.hTag[n];if(this.hNs[n]!==0||!(to[r]&32)||r===e)return;t.pop()}}generateImpliedEndTagsThoroughly(){let e=this.stack;for(;;){let t=e[e.length-1];if(this.hNs[t]!==0||!(to[this.hTag[t]]&64))return;e.pop()}}closePElement(){this.generateImpliedEndTags(89),this.popUntil(89)}closePIfInButtonScope(){this.inScope(89,4)&&this.closePElement()}resetInsertionMode(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t],r=t===0;if(r&&this.fragmentContext>=0&&(n=this.fragmentContext),this.hNs[n]===0)switch(this.hTag[n]){case 121:case 125:if(!r){this.mode=14;return}break;case 129:this.mode=13;return;case 120:case 126:case 124:this.mode=12;return;case 19:this.mode=10;return;case 24:this.mode=11;return;case 119:this.mode=8;return;case 122:this.mode=this.templateModes[this.templateModes.length-1];return;case 52:if(!r){this.mode=3;return}break;case 15:this.mode=6;return;case 45:this.mode=17;return;case 56:this.mode=this.headElement<0?2:5;return}if(r){this.mode=6;return}}this.mode=6}appropriatePlace(e){let t=e>=0?e:this.currentNode();if(this.locRef=-1,this.fosterParenting&&this.hNs[t]===0){let e=this.hTag[t];if(e===119||e===120||e===124||e===126||e===129){let e=this.stack,n=-1,r=-1;for(let t=e.length-1;t>=0;t--){let i=e[t];if(this.hNs[i]===0&&(n<0&&this.hTag[i]===122&&(n=t),r<0&&this.hTag[i]===119&&(r=t),n>=0&&r>=0))break}if(n>=0&&(r<0||n>r))t=e[n];else if(r<0){this.locParent=e[0];return}else if(this.sink.hasParent(e[r])){this.locParent=-1,this.locRef=e[r];return}else t=e[r-1]}}if(this.hNs[t]===0&&this.hTag[t]===122){let e=this.hContents[t];e>=0&&(t=e)}this.locParent=t}insertChars(e){e.length!==0&&(this.appropriatePlace(-1),this.locParent!==this.docHandle&&this.sink.insertText(this.locParent,this.locRef,e))}insertComment(e){e>=0?this.sink.insertComment(e,-1,this.tok.data):(this.appropriatePlace(-1),this.sink.insertComment(this.locParent,this.locRef,this.tok.data))}insertPI(e){e>=0?this.sink.insertProcessingInstruction(e,-1,this.tok.name,this.tok.data):(this.appropriatePlace(-1),this.sink.insertProcessingInstruction(this.locParent,this.locRef,this.tok.name,this.tok.data))}recordElement(e,t,n,r){e===this.hNs.length?(this.hNs.push(t),this.hTag.push(n),this.hName.push(r),this.hIP.push(!1),this.hContents.push(-1)):this.setMeta(e,t,n,r,!1)}createHtmlElement(e,t,n){let r=this.tok,i=this.sink.createElement(e,0,this.locParent,this.locRef,n?r.attrNames:this.emptyStrings,n?r.attrValues:this.emptyStrings,this.emptyNumbers,n?r.attrCount:0,!1);this.recordElement(i,0,t,e),t===122&&(this.hContents[i]=this.sink.templateContents(i));let a=this.formElement;return a>=0&&to[t]&512&&this.fragmentContext<0&&!this.parsingTemplateContents()&&(to[t]&eo&&n&&this.tokenHasAttr(`form`)||this.sink.associateForm(i,a)),i}tokenHasAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return!0;return!1}tokenAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return t.attrValues[n];return null}insertHtmlElement(){this.appropriatePlace(-1);let e=this.tok,t=this.createHtmlElement(e.name,e.tagId,!0);return this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),t}insertHtmlElementNamed(e,t){this.appropriatePlace(-1);let n=this.createHtmlElement(e,t,!1);return this.sink.insert(this.locParent,this.locRef,n),this.stack.push(n),n}insertVoidHtmlElement(){this.insertHtmlElement(),this.stack.pop()}insertForeignElement(e,t){let n=this.tok,r=n.name;if(e===1&&t){let e=oo.get(r);e!==void 0&&(r=e)}let i=this.fNames,a=this.fValues,o=this.fNs;i.length=0,a.length=0,o.length=0;let s=``;for(let t=0;t<n.attrCount;t++){let r=n.attrNames[t],c=n.attrValues[t],l=0;if(e===2)r===`definitionurl`?r=`definitionURL`:r===`encoding`&&(s=c);else if(e===1){let e=ao.get(r);e!==void 0&&(r=e)}r.charCodeAt(0)===120&&(r===`xlink:actuate`||r===`xlink:arcrole`||r===`xlink:href`||r===`xlink:role`||r===`xlink:show`||r===`xlink:title`||r===`xlink:type`?(l=1,r=r.slice(6)):r===`xml:lang`||r===`xml:space`?(l=2,r=r.slice(4)):r===`xmlns`?l=3:r===`xmlns:xlink`&&(l=3,r=`xlink`)),i.push(r),a.push(c),o.push(l)}this.appropriatePlace(-1);let c=this.sink.createElement(r,e,this.locParent,this.locRef,i,a,o,i.length,!0);return this.recordElement(c,e,0,r),this.setForeignFacts(c,e,r,s),this.sink.insert(this.locParent,this.locRef,c),this.stack.push(c),c}storeToken(){let e=this.tok,t=this.ptName.length;this.ptName.push(e.name),this.ptId.push(e.tagId),this.ptAttrStart.push(this.poolNames.length),this.ptAttrCount.push(e.attrCount);for(let t=0;t<e.attrCount;t++)this.poolNames.push(e.attrNames[t]),this.poolValues.push(e.attrValues[t]);return t}sameAsToken(e){let t=this.tok;if(this.ptName[e]!==t.name)return!1;let n=this.ptAttrCount[e];if(n!==t.attrCount)return!1;let r=this.ptAttrStart[e];for(let e=0;e<n;e++){let i=this.poolNames[r+e],a=!1;for(let o=0;o<n;o++)if(t.attrNames[o]===i){a=t.attrValues[o]===this.poolValues[r+e];break}if(!a)return!1}return!0}pushFormatting(e){let t=this.afe,n=0,r=-1;for(let e=t.length-1;e>=0&&t[e]!==-1;e--)this.sameAsToken(this.afeTok[e])&&(n++,r=e);n>=3&&(t.splice(r,1),this.afeTok.splice(r,1)),t.push(e),this.afeTok.push(this.storeToken())}insertMarker(){this.afe.push(-1),this.afeTok.push(-1)}clearToLastMarker(){let e=this.afe;for(;e.length!==0;)if(this.afeTok.pop(),e.pop()===-1)return}afeIndexOf(e){let t=this.afe;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}createFromStored(e){let t=this.ptAttrStart[e],n=this.ptAttrCount[e],r=this.emptyStrings,i=this.emptyStrings;n!==0&&(r=this.poolNames.slice(t,t+n),i=this.poolValues.slice(t,t+n));let a=this.ptName[e],o=this.ptId[e],s=this.sink.createElement(a,0,this.locParent,this.locRef,r,i,this.emptyNumbers,n,!1);return this.recordElement(s,0,o,a),s}reconstructFormatting(){let e=this.afe,t=e.length;if(t===0)return;let n=e[t-1];if(n===-1||this.stackIndexOf(n)>=0)return;let r=t-1;for(;r>0;)if(r--,n=e[r],n===-1||this.stackIndexOf(n)>=0){r++;break}for(;r<e.length;r++){this.appropriatePlace(-1);let t=this.createFromStored(this.afeTok[r]);this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),e[r]=t}}adoptionAgency(){let e=this.stack,t=this.afe,n=this.currentNode();if(this.isHtmlNamedAsToken(n)&&this.afeIndexOf(n)<0)e.pop();else for(let n=0;n<8;n++){let n=-1;for(let e=t.length-1;e>=0;e--){let r=t[e];if(r===-1)break;if(this.isHtmlNamedAsToken(r)){n=e;break}}if(n<0){this.anyOtherEndTagInBody();return}let r=t[n],i=this.stackIndexOf(r);if(i<0){t.splice(n,1),this.afeTok.splice(n,1);return}if(!this.nodeInScope(r))return;let a=-1;for(let t=i+1;t<e.length;t++)if(this.isSpecial(e[t])){a=t;break}if(a<0){e.length=i,t.splice(n,1),this.afeTok.splice(n,1);return}let o=e[a],s=e[i-1],c=n,l=o,u=o,d=a,m=0;for(;m++,d--,l=e[d],l!==r;){let n=this.afeIndexOf(l);if(m>3&&n>=0&&(t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,n=-1),n<0){e.splice(d,1);continue}this.locParent=s,this.locRef=-1;let r=this.createFromStored(this.afeTok[n]);t[n]=r,e[d]=r,l=r,u===o&&(c=n+1),this.sink.insert(l,-1,u),u=l}this.appropriatePlace(s),this.sink.insert(this.locParent,this.locRef,u),n=this.afeIndexOf(r),this.locParent=o,this.locRef=-1;let h=this.afeTok[n],_=this.createFromStored(h);this.sink.reparentChildren(o,_),this.sink.insert(o,-1,_),t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,t.splice(c,0,_),this.afeTok.splice(c,0,h),e.splice(this.stackIndexOf(r),1),e.splice(this.stackIndexOf(o)+1,0,_)}}skipWs(){let e=this.chars,t=this.cpos;for(;t<e.length&&isWsCode(e.charCodeAt(t));)t++;return this.cpos=t,t<e.length}insertLeadingWs(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.insertChars(t===0&&n===e.length?e:e.slice(t,n)),this.cpos=n,n<e.length}restChars(){return this.cpos===0?this.chars:this.chars.slice(this.cpos)}bodyChars(e){this.charsHasNull&&(e=removeNulls(e)),e.length!==0&&(this.reconstructFormatting(),this.insertChars(e),this.framesetOk&&!isAllWs(e)&&(this.framesetOk=!1))}initial(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:if(this.sink.insertDoctype(this.docHandle,e.hasName?e.name:``,e.publicId,e.systemId),!this.iframeSrcdoc){let e=this.doctypeMode();e!==0&&this.setDocumentMode(e)}this.mode=1;return}this.iframeSrcdoc||this.setDocumentMode(1),this.mode=1,this.reprocess=!0}setDocumentMode(e){this.documentMode=e,this.sink.setDocumentMode(e)}doctypeMode(){let e=this.tok;if(e.forceQuirks||!e.hasName||e.name!==`html`)return 1;let t=e.hasPublicId?asciiLower(e.publicId):``,n=e.hasSystemId?asciiLower(e.systemId):``;if(e.hasPublicId){if(t===`-//w3o//dtd w3 html strict 3.0//en//`||t===`-/w3c/dtd html 4.0 transitional/en`||t===`html`)return 1;for(let e=0;e<so.length;e++)if(t.startsWith(so[e]))return 1}if(e.hasSystemId&&n===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return 1;if(e.hasPublicId){let r=t.startsWith(`-//w3c//dtd html 4.01 frameset//`)||t.startsWith(`-//w3c//dtd html 4.01 transitional//`),i=!e.hasSystemId||n===``;if(i&&r)return 1;if(t.startsWith(`-//w3c//dtd xhtml 1.0 frameset//`)||t.startsWith(`-//w3c//dtd xhtml 1.0 transitional//`)||!i&&r)return 2}return 0}beforeHtml(){let e=this.tok;switch(this.ttype){case 5:return;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 1:if(!this.skipWs())return;break;case 2:if(e.tagId===56){this.locParent=this.docHandle,this.locRef=-1;let e=this.createHtmlElement(`html`,56,!0);this.sink.insert(this.docHandle,-1,e),this.stack.push(e),this.mode=2;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.locParent=this.docHandle,this.locRef=-1;let t=this.createHtmlElement(`html`,56,!1);this.sink.insert(this.docHandle,-1,t),this.stack.push(t),this.mode=2,this.reprocess=!0}beforeHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===52){this.headElement=this.insertHtmlElement(),this.mode=3;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.headElement=this.insertHtmlElementNamed(`head`,52),this.mode=3,this.reprocess=!0}genericTextElement(e){this.insertHtmlElement(),this.tok.state=e,this.originalMode=this.mode,this.mode=7}inHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 10:case 11:case 12:case 68:case 77:this.insertVoidHtmlElement();return;case 128:this.genericTextElement(1);return;case 83:this.scripting?this.genericTextElement(2):(this.insertHtmlElement(),this.mode=4);return;case 82:case 114:this.genericTextElement(2);return;case 103:this.genericTextElement(3);return;case 122:this.templateStartTag();return;case 52:return}break;case 3:switch(e.tagId){case 52:this.pop(),this.mode=5;return;case 15:case 56:case 16:break;case 122:this.templateEndTag();return;default:return}}this.pop(),this.mode=5,this.reprocess=!0}templateStartTag(){this.insertMarker(),this.framesetOk=!1,this.mode=15,this.templateModes.push(15);let e=this.currentNode(),t=e===this.stack[0],n=this.allowDSD&&!t?this.tokenAttr(`shadowrootmode`):null,r=n===null?``:asciiLower(n);if(r===`open`||r===`closed`){this.appropriatePlace(-1);let t=this.sink.attachDeclarativeShadowRoot(e,r,this.tokenHasAttr(`shadowrootdelegatesfocus`),this.tokenHasAttr(`shadowrootserializable`),asciiLower(this.tokenAttr(`shadowrootslotassignment`)??``)===`manual`?`manual`:`named`,this.tokenHasAttr(`shadowrootclonable`));if(t>=0){let e=this.createHtmlElement(this.tok.name,122,!0);this.recordElement(t,0,0,`#shadow-root`),this.hContents[e]=t,this.stack.push(e);return}}this.insertHtmlElement()}templateEndTag(){this.templateInStack()&&(this.generateImpliedEndTagsThoroughly(),this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode())}inHeadNoscript(){let e=this.tok;switch(this.ttype){case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 11:case 12:case 68:case 77:case 82:case 114:this.inHead();return;case 52:case 83:return}break;case 3:if(e.tagId===83){this.pop(),this.mode=3;return}if(e.tagId!==16)return;break;case 1:if(!this.insertLeadingWs())return;break;case 4:case 7:this.inHead();return}this.pop(),this.mode=3,this.reprocess=!0}afterHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 15:this.insertHtmlElement(),this.framesetOk=!1,this.mode=6;return;case 45:this.insertHtmlElement(),this.mode=17;return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:{let e=this.headElement;this.stack.push(e),this.inHead();let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1);return}case 52:return}break;case 3:switch(e.tagId){case 122:this.inHead();return;case 15:case 56:case 16:break;default:return}}this.insertHtmlElementNamed(`body`,15),this.framesetOk=!0,this.mode=6,this.reprocess=!0}inBody(){switch(this.ttype){case 1:this.bodyChars(this.restChars());return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 6:if(this.templateModes.length!==0){this.inTemplate();return}this.stopped=!0;return;case 2:this.inBodyStartTag();return;case 3:this.inBodyEndTag();return}}inBodyStartTag(){let e=this.tok,t=this.stack;switch(e.tagId){case 56:if(this.templateInStack())return;this.sink.addMissingAttributes(t[0],e.attrNames,e.attrValues,e.attrCount);return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 15:if(t.length===1||!this.isHtml(t[1],15)||this.templateInStack())return;this.framesetOk=!1,this.sink.addMissingAttributes(t[1],e.attrNames,e.attrValues,e.attrCount);return;case 45:if(t.length===1||!this.isHtml(t[1],15)||!this.framesetOk)return;this.sink.remove(t[1]),t.length=1,this.insertHtmlElement(),this.mode=17;return;case 3:case 6:case 7:case 14:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 70:case 75:case 79:case 85:case 89:case 104:case 105:case 116:case 133:this.closePIfInButtonScope(),this.insertHtmlElement();return;case 46:case 47:case 48:case 49:case 50:case 51:{this.closePIfInButtonScope();let e=this.currentNode(),t=this.hTag[e];this.hNs[e]===0&&t>=46&&t<=51&&this.pop(),this.insertHtmlElement();return}case 93:case 69:this.closePIfInButtonScope(),this.insertHtmlElement(),this.skipNewline=!0,this.framesetOk=!1;return;case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;this.closePIfInButtonScope();let t=this.insertHtmlElement();e||(this.formElement=t);return}case 67:case 27:case 35:{this.framesetOk=!1;let n=e.tagId===67;for(let e=t.length-1;e>=0;e--){let r=t[e],i=this.hNs[r]===0?this.hTag[r]:-1;if(n?i===67:i===27||i===35){this.generateImpliedEndTags(i),this.popUntil(i);break}if(this.isSpecial(r)&&i!==3&&i!==33&&i!==89)break}this.closePIfInButtonScope(),this.insertHtmlElement();return}case 92:this.closePIfInButtonScope(),this.insertHtmlElement(),e.state=4;return;case 17:this.inScope(17,0)&&(this.generateImpliedEndTags(0),this.popUntil(17)),this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return;case 1:{let e=this.afe;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===-1)break;if(this.isHtml(r,1)){this.adoptionAgency();let n=this.afeIndexOf(r);n>=0&&(e.splice(n,1),this.afeTok.splice(n,1));let i=this.stackIndexOf(r);i>=0&&t.splice(i,1);break}}this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return}case 9:case 13:case 22:case 36:case 41:case 57:case 101:case 109:case 112:case 113:case 131:case 132:this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return;case 80:this.reconstructFormatting(),this.inScope(80,0)&&(this.adoptionAgency(),this.reconstructFormatting()),this.pushFormatting(this.insertHtmlElement());return;case 4:case 73:case 84:this.reconstructFormatting(),this.insertHtmlElement(),this.insertMarker(),this.framesetOk=!1;return;case 119:this.documentMode!==1&&this.closePIfInButtonScope(),this.insertHtmlElement(),this.framesetOk=!1,this.mode=8;return;case 5:case 16:case 37:case 60:case 64:case 136:this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 61:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;this.inScope(106,0)&&this.popUntil(106),this.reconstructFormatting(),this.insertVoidHtmlElement();let t=this.tokenAttr(`type`);(t===null||asciiLower(t)!==`hidden`)&&(this.framesetOk=!1);return}case 90:case 110:case 130:this.insertVoidHtmlElement();return;case 55:this.closePIfInButtonScope(),this.inScope(106,0)&&this.generateImpliedEndTags(0),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 59:e.name=`img`,e.tagId=60,this.reprocess=!0;return;case 123:this.insertHtmlElement(),this.skipNewline=!0,e.state=1,this.originalMode=this.mode,this.framesetOk=!1,this.mode=7;return;case 137:this.closePIfInButtonScope(),this.reconstructFormatting(),this.framesetOk=!1,this.genericTextElement(2);return;case 58:this.framesetOk=!1,this.genericTextElement(2);return;case 81:this.genericTextElement(2);return;case 83:if(this.scripting){this.genericTextElement(2);return}break;case 106:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;if(this.inScope(106,0)){this.popUntil(106);return}this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return}case 87:this.inScope(106,0)?this.generateImpliedEndTags(86):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 86:this.inScope(106,0)?this.generateImpliedEndTags(0):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 96:case 99:this.inScope(100,0)&&this.generateImpliedEndTags(0),this.insertHtmlElement();return;case 97:case 98:this.inScope(100,0)&&this.generateImpliedEndTags(99),this.insertHtmlElement();return;case 74:this.reconstructFormatting(),this.insertForeignElement(2,!1),e.selfClosing&&this.pop();return;case 118:this.reconstructFormatting(),this.insertForeignElement(1,!1),e.selfClosing&&this.pop();return;case 19:case 23:case 24:case 44:case 52:case 120:case 121:case 124:case 125:case 126:case 129:return}this.reconstructFormatting(),this.insertHtmlElement()}inBodyEndTag(){let e=this.tok;switch(e.tagId){case 122:this.inHead();return;case 15:if(!this.inScope(15,0))return;this.mode=16;return;case 56:if(!this.inScope(15,0))return;this.mode=16,this.reprocess=!0;return;case 3:case 6:case 7:case 14:case 17:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 69:case 70:case 75:case 79:case 85:case 93:case 104:case 105:case 106:case 116:case 133:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t);return}case 43:if(this.parsingTemplateContents()){if(!this.inScope(43,0))return;this.generateImpliedEndTags(0),this.popUntil(43)}else{let e=this.formElement;if(this.formElement=-1,e<0||!this.nodeInScope(e))return;this.generateImpliedEndTags(0);let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1)}return;case 89:this.inScope(89,4)||this.insertHtmlElementNamed(`p`,89),this.closePElement();return;case 67:if(!this.inScope(67,2))return;this.generateImpliedEndTags(67),this.popUntil(67);return;case 27:case 35:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(t),this.popUntil(t);return}case 46:case 47:case 48:case 49:case 50:case 51:{if(!this.inScope(46,0)&&!this.inScope(47,0)&&!this.inScope(48,0)&&!this.inScope(49,0)&&!this.inScope(50,0)&&!this.inScope(51,0))return;this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop(),n=this.hTag[t];if(this.hNs[t]===0&&n>=46&&n<=51)break}return}case 1:case 9:case 13:case 22:case 36:case 41:case 57:case 80:case 101:case 109:case 112:case 113:case 131:case 132:this.adoptionAgency();return;case 4:case 73:case 84:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t),this.clearToLastMarker();return}case 16:e.attrCount=0,this.ttype=2,this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return}this.anyOtherEndTagInBody()}anyOtherEndTagInBody(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t];if(this.isHtmlNamedAsToken(n)){let n=this.tok.tagId;this.generateImpliedEndTags(n===0?-1:n),e.length=t;return}if(this.isSpecial(n))return}}text(){switch(this.ttype){case 1:this.insertChars(this.restChars());return;case 6:this.pop(),this.mode=this.originalMode,this.reprocess=!0;return;case 3:this.pop(),this.mode=this.originalMode;return}}clearStackBackTo(e,t,n){let r=this.stack;for(;;){let i=r[r.length-1];if(this.hNs[i]===0){let r=this.hTag[i];if(r===e||r===t||r===n||r===122||r===56)return}r.pop()}}inTable(){let e=this.tok;switch(this.ttype){case 1:{let e=this.currentNode();if(this.hNs[e]===0){let t=this.hTag[e];if(t===119||t===120||t===122||t===124||t===126||t===129){this.pendingTableText=``,this.pendingTableNonWs=!1,this.originalMode=this.mode,this.mode=9,this.reprocess=!0;return}}break}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 19:this.clearStackBackTo(119,119,119),this.insertMarker(),this.insertHtmlElement(),this.mode=10;return;case 24:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=11;return;case 23:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`colgroup`,24),this.mode=11,this.reprocess=!0;return;case 120:case 124:case 126:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=12;return;case 121:case 125:case 129:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`tbody`,120),this.mode=12,this.reprocess=!0;return;case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode(),this.reprocess=!0;return;case 114:case 103:case 122:this.inHead();return;case 61:{let e=this.tokenAttr(`type`);if(e===null||asciiLower(e)!==`hidden`)break;this.insertVoidHtmlElement();return}case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;let t=this.insertHtmlElement();e||(this.formElement=t),this.pop();return}}break;case 3:switch(e.tagId){case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode();return;case 15:case 19:case 23:case 24:case 56:case 120:case 121:case 124:case 125:case 126:case 129:return;case 122:this.inHead();return}break;case 6:this.inBody();return}this.fosterParenting=!0,this.inBody(),this.fosterParenting=!1}inTableText(){if(this.ttype===1){let e=this.restChars();if(this.charsHasNull&&(e=removeNulls(e)),e.length===0)return;this.pendingTableText+=e,!this.pendingTableNonWs&&!isAllWs(e)&&(this.pendingTableNonWs=!0);return}let e=this.pendingTableText;if(this.pendingTableText=``,e.length!==0){if(this.pendingTableNonWs){let t=this.charsHasNull;this.charsHasNull=!1,this.fosterParenting=!0,this.bodyChars(e),this.fosterParenting=!1,this.charsHasNull=t}else this.insertChars(e)}this.mode=this.originalMode,this.reprocess=!0}inCaption(){let e=this.tok,t=this.ttype;if(t===3&&e.tagId===19){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8;return}let n=e.tagId;if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)||t===3&&n===119){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8,this.reprocess=!0}else(t!==3||n!==15&&n!==23&&n!==24&&n!==56&&n!==120&&n!==121&&n!==124&&n!==125&&n!==126&&n!==129)&&this.inBody()}inColumnGroup(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===23){this.insertVoidHtmlElement();return}if(e.tagId===122){this.inHead();return}break;case 3:if(e.tagId===24){if(!this.currentIs(24))return;this.pop(),this.mode=8;return}if(e.tagId===23)return;if(e.tagId===122){this.inHead();return}break;case 6:this.inBody();return}this.currentIs(24)&&(this.pop(),this.mode=8,this.reprocess=!0)}inTableBody(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===129){this.clearStackBackTo(120,124,126),this.insertHtmlElement(),this.mode=13;return}if(n===125||n===121){this.clearStackBackTo(120,124,126),this.insertHtmlElementNamed(`tr`,129),this.mode=13,this.reprocess=!0;return}if(n===19||n===23||n===24||n===120||n===124||n===126){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}}else if(t===3){if(n===120||n===124||n===126){if(!this.inScope(n,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8;return}if(n===119){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125||n===129)return}this.inTable()}inRow(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===125||n===121){this.clearStackBackTo(129,129,129),this.insertHtmlElement(),this.mode=14,this.insertMarker();return}if(n===19||n===23||n===24||n===120||n===124||n===126||n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}}else if(t===3){if(n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12;return}if(n===119){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===120||n===124||n===126){if(!this.inScope(n,8)||!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125)return}this.inTable()}closeCell(){this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.hNs[t]===0&&(this.hTag[t]===121||this.hTag[t]===125))break}this.clearToLastMarker(),this.mode=13}inCell(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===3){if(n===121||n===125){if(!this.inScope(n,8))return;this.generateImpliedEndTags(0),this.popUntil(n),this.clearToLastMarker(),this.mode=13;return}if(n===15||n===19||n===23||n===24||n===56)return;if(n===119||n===120||n===124||n===126||n===129){if(!this.inScope(n,8))return;this.closeCell(),this.reprocess=!0;return}}else if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)){if(!this.inScope(121,8)&&!this.inScope(125,8))return;this.closeCell(),this.reprocess=!0;return}this.inBody()}inTemplate(){let e=this.tok;switch(this.ttype){case 1:case 4:case 7:case 5:this.inBody();return;case 2:switch(e.tagId){case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 19:case 24:case 120:case 124:case 126:this.switchTemplateMode(8);return;case 23:this.switchTemplateMode(11);return;case 129:this.switchTemplateMode(12);return;case 121:case 125:this.switchTemplateMode(13);return}this.switchTemplateMode(6);return;case 3:e.tagId===122&&this.inHead();return;case 6:if(!this.templateInStack()){this.stopped=!0;return}this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode(),this.reprocess=!0;return}}switchTemplateMode(e){this.templateModes.pop(),this.templateModes.push(e),this.mode=e,this.reprocess=!0}afterBody(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWsViaBody())return;break;case 4:this.insertComment(this.stack[0]);return;case 7:this.insertPI(this.stack[0]);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}break;case 3:if(e.tagId===56){if(this.fragmentContext>=0)return;this.mode=19;return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}skipWsViaBody(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.bodyChars(e.slice(t,n)),this.cpos=n,n<e.length}inFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:switch(e.tagId){case 56:this.inBody();return;case 45:this.insertHtmlElement();return;case 44:this.insertVoidHtmlElement();return;case 82:this.inHead();return}return;case 3:if(e.tagId===45){if(this.currentNode()===this.stack[0])return;this.pop(),this.fragmentContext<0&&!this.currentIs(45)&&(this.mode=18)}return;case 6:this.stopped=!0;return}}insertWsOnly(){let e=this.restChars(),t=``,n=!0;for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t))){n=!1;break}if(n)t=e;else for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);this.insertChars(t)}afterFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 3:e.tagId===56&&(this.mode=20);return;case 6:this.stopped=!0;return}}afterAfterBody(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:if(!this.skipWsViaBody())return;break;case 2:if(e.tagId===56){this.inBody();return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}afterAfterFrameset(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:{let e=this.restChars(),t=``;for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);t.length!==0&&this.bodyChars(t);return}case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 6:this.stopped=!0;return}}foreignContent(){let e=this.tok;switch(this.ttype){case 1:{let e=this.restChars();this.charsHasNull&&(e=e.replaceAll(`\0`,`�`)),this.insertChars(e),this.framesetOk&&hasNonWsNonNull(this.restChars())&&(this.framesetOk=!1);return}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:{let t=e.tagId,n=!!(to[t]&256);if(!n&&t===41&&(n=this.tokenHasAttr(`color`)||this.tokenHasAttr(`face`)||this.tokenHasAttr(`size`)),n){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let r=this.adjustedCurrentNode(),i=this.hNs[r];this.insertForeignElement(i,!0),e.selfClosing&&this.pop();return}case 3:{let t=e.tagId;if(t===16||t===89){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let n=this.stack,r=n.length-1,i=n[r];if(t===103&&this.hNs[i]===1&&this.hName[i]===`script`){this.pop();return}for(;;){if(r===0)return;if(asciiLower(this.hName[i])===e.name){n.length=r;return}if(r--,i=n[r],this.hNs[i]===0){this.dispatchMode(this.mode);return}}}}}popToHtmlOrIntegrationPoint(){let e=this.stack;for(;;){let t=e[e.length-1],n=this.hTag[t];if(this.hNs[t]===0||this.hIP[t]||n>=169&&n<=173)return;e.pop()}}},XMLParseError=class extends Error{};const co={lt:`<`,gt:`>`,amp:`&`,quot:`"`,apos:`'`};function isNameStartCode(e){return e>=97&&e<=122||e>=65&&e<=90||e===58||e===95||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319}function isNameCode(e){return isNameStartCode(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256||e>=56320&&e<=57343}function isWs(e){return e===32||e===9||e===10||e===13}function checkChars(e,t){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<32&&r!==9&&r!==10&&r!==13&&t.fail(`invalid character`),(r===65534||r===65535)&&t.fail(`invalid character`)}}var XMLParser=class{src;pos;doc;entities;constructor(e,t){this.src=e.replace(/\r\n?/g,`
1
+ import{AsyncResource as e}from"node:async_hooks";import{clearTimeout as t,setTimeout as n}from"node:timers";import{availableParallelism as r}from"node:os";var i=Object.defineProperty,__name=(e,t)=>i(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n};const a=1,o=2,s=3,c=4,l=5,u=6,d=7,m=8,h=9,_=10,v=11,ee=12,y=1,te=2,ne=4,re=8,b=16,x=32,ie=`http://www.w3.org/1999/xhtml`,ae=`http://www.w3.org/2000/svg`,oe=`http://www.w3.org/1998/Math/MathML`,se=`http://www.w3.org/1999/xlink`,S=`http://www.w3.org/XML/1998/namespace`,ce=`http://www.w3.org/2000/xmlns/`,le=1,ue=2,de=4,fe=8,pe=16,me=32,he=64,ge=128,_e=256,ve=512,ye=1024,be=2048,xe=4096,Se=16384,Ce=32768,we=65536,Te=8192,Ee=1<<17,De=1<<18;function exposeMembers(...e){for(let t of e){let e=t.prototype;for(let t of Object.getOwnPropertyNames(e)){if(t===`constructor`||t.charCodeAt(0)===95)continue;let n=Object.getOwnPropertyDescriptor(e,t);!n.enumerable&&n.configurable&&Object.defineProperty(e,t,{enumerable:!0})}}}function hideInternals(e){for(let t of Reflect.ownKeys(e))(typeof t==`symbol`||t.charCodeAt(0)===95)&&Object.defineProperty(e,t,{enumerable:!1})}function argumentsRequired(e,t,n,r){throw TypeError(`Failed to execute '${e}' on '${t}': ${n} argument${n===1?``:`s`} required, but only ${r} present.`)}const Oe=globalThis.setTimeout,ke=globalThis.clearTimeout,Ae=globalThis.setImmediate,je=globalThis.performance,Me=je.now.bind(je),Ne=process.getActiveResourcesInfo.bind(process),Pe=Symbol(`ctrl-dom.clock`);var TimerRecord=class{id;due;seq;delay;repeat;callback;args;ref;index;handle;real;realDue;cleared;context;constructor(t,n,r,i,a,o,s){this.id=t,this.due=n,this.seq=r,this.delay=i,this.repeat=a,this.callback=o,this.args=s,this.ref=!0,this.index=-1,this.handle=null,this.real=null,this.realDue=0,this.cleared=!1,this.context=new e(`Timeout`)}},VirtualTimeout=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}ref(){return this.#e._setRef(this.#t,!0),this}unref(){return this.#e._setRef(this.#t,!1),this}hasRef(){return this.#t.ref}get _destroyed(){return!this.#e.byId.has(this.#t.id)}refresh(){return this.#e._refresh(this.#t),this}close(){return this.#e.clear(this.#t.id),this}[Symbol.toPrimitive](){return this.#t.id}[Symbol.dispose](){this.#e.clear(this.#t.id)}};function before(e,t){return e.due<t.due||e.due===t.due&&e.seq<t.seq}var VirtualClock=class{skipped;epochOffset;skip;heap;byId;nextId;seq;refCount;hostTimer;hostDue;hostRefd;continuation;driverScheduled;driverImmediate;idleTurns;disposed;ioTypes;ioBaseline;ioCounts;constructor(e={}){this.skipped=0,this.epochOffset=Date.now()-Me(),this.skip=e.skip===!0,this.heap=[],this.byId=/* @__PURE__ */ new Map,this.nextId=1,this.seq=0,this.refCount=0,this.hostTimer=null,this.hostDue=1/0,this.hostRefd=!0,this.continuation=!1,this.driverScheduled=!1,this.driverImmediate=!1,this.idleTurns=0,this.disposed=!1,this.ioTypes=[],this.ioBaseline=[],this.skip&&(typeof process==`object`&&(process.stdin,process.stdout,process.stderr),countIO(this.ioTypes,this.ioBaseline)),this.ioCounts=Array(this.ioTypes.length).fill(0)}now(){return Me()+this.skipped}epochNow(){return Math.floor(this.epochOffset+Me()+this.skipped)}schedule(e,t,n,r){let i=Number(t)|0;i<1&&(i=1);let a=new TimerRecord(this.nextId++,this.now()+i,this.seq++,i,r,e,n),o=new VirtualTimeout(this,a);return a.handle=o,this.disposed||(this.byId.set(a.id,a),this.refCount++,this.push(a),this.armHost(),this.kickDriver()),o}clear(e){let t=typeof e==`number`?e:e instanceof VirtualTimeout?Number(e):NaN,n=this.byId.get(t);return n!==void 0&&(this.byId.delete(t),n.cleared=!0,n.ref&&this.refCount--,n.real!==null&&(ke(n.real),n.real=null),n.index!==-1&&(this.remove(n),this.armHost()),!0)}skipIdle(e){let t=this.heap[0];return t!==void 0&&t.due<=this.now()+e?!1:(this.skipped+=e,!0)}get size(){return this.byId.size}_setRef(e,t){if(e.ref===t)return;e.ref=t;let n=this.byId.has(e.id);n&&(this.refCount+=t?1:-1),n&&this.skip&&(!t&&e.index!==-1?this.toRealTrack(e,Math.max(0,e.due-this.now())):t&&e.real!==null&&this.toVirtualTrack(e)),this.updateHostRef()}toRealTrack(e,t){e.index!==-1&&(this.remove(e),this.armHost()),e.realDue=Me()+t;let n=Oe(()=>this.fireReal(e),t);n.unref?.(),e.real=n}toVirtualTrack(e){ke(e.real),e.real=null,e.due=this.now()+Math.max(0,e.realDue-Me()),e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}fireReal(e){e.real=null,!this.disposed&&this.byId.has(e.id)&&(e.repeat?this.toRealTrack(e,e.delay):this.byId.delete(e.id),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args))}_refresh(e){if(!(e.cleared||this.disposed)){if(e.real!==null)ke(e.real),e.real=null,this.toRealTrack(e,e.delay);else{if(this.byId.has(e.id))e.index!==-1&&this.remove(e);else if(this.byId.set(e.id,e),e.ref)this.refCount++;else if(this.skip){this.toRealTrack(e,e.delay);return}e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}}}dispose(){this.disposed=!0;for(let e of this.byId.values())e.real!==null&&ke(e.real),e.real=null,e.cleared=!0;this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.heap.length=0,this.byId.clear(),this.refCount=0,C===this&&(C=null)}armHost(){if(this.disposed||this.continuation)return;let e=this.heap[0];e===void 0?(this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.hostDue=1/0):(this.hostTimer!==null&&this.hostDue===e.due||(this.hostTimer!==null&&ke(this.hostTimer),this.hostDue=e.due,this.hostTimer=Oe(this.onHostTimer,Math.max(0,e.due-this.now())),this.hostRefd=!0),this.updateHostRef())}updateHostRef(){let e=this.hostTimer,t=this.refCount>0;e!==null&&t!==this.hostRefd&&(this.hostRefd=t,t?e.ref?.():e.unref?.())}fireContinuation=()=>{this.fireNext()};onHostTimer=()=>{this.hostTimer=null,this.hostDue=1/0,this.fireNext()};fireNext(){if(this.continuation=!1,this.disposed)return;let e=this.heap[0];if(e===void 0||e.due>this.now()+1){this.armHost();return}this.skip&&e.due>this.now()&&(this.skipped+=e.due-this.now()),this.pop(),e.repeat?(e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e)):(this.byId.delete(e.id),e.ref&&this.refCount--);let t=this.heap[0];t!==void 0&&t.due<=this.now()+ +!!this.skip?(this.continuation=!0,Ae(this.fireContinuation)):this.armHost(),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args)}kickDriver(){!this.skip||this.driverScheduled||this.disposed||(this.driverScheduled=!0,this.driverImmediate=!0,Ae(this.driverTurn))}get ownImmediates(){return+!!this.driverImmediate+ +!!this.continuation}driverTurn=()=>{if(this.driverScheduled=!1,this.driverImmediate=!1,this.disposed||this.heap.length===0){this.idleTurns=0;return}let e=this.busy();if(e!==null){this.idleTurns=0,e===`immediate`?this.kickDriver():(this.driverScheduled=!0,Oe(()=>{this.driverScheduled=!1,this.kickDriver()},1));return}if(++this.idleTurns<2){this.kickDriver();return}this.idleTurns=0;let t=this.heap[0].due-this.now();t>0&&(this.skipped+=t),this.hostTimer!==null&&ke(this.hostTimer),this.hostTimer=null,this.hostDue=1/0;try{this.fireNext()}finally{this.kickDriver()}};busy(e=0){let t=Ne(),n=this.ioTypes,r=this.ioBaseline,i=this.ioCounts;for(let e=0;e<i.length;e++)i[e]=0;let a=!1,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(c===`Immediate`){if(++o>e)return`immediate`;continue}if(a||c===`Timeout`)continue;let l=0;for(;l<n.length&&n[l]!==c;)l++;(l===n.length||++i[l]>r[l])&&(a=!0)}return a?`io`:null}push(e){let t=this.heap;e.index=t.length,t.push(e),this.up(e.index)}pop(){let e=this.heap,t=e[0],n=e.pop();return t.index=-1,n!==t&&(e[0]=n,n.index=0,this.down(0)),t}remove(e){let t=this.heap,n=e.index,r=t.pop();e.index=-1,r!==e&&(t[n]=r,r.index=n,this.down(n),this.up(r.index))}up(e){let t=this.heap,n=t[e];for(;e>0;){let r=e-1>>1;if(!before(n,t[r]))break;t[e]=t[r],t[e].index=e,e=r}t[e]=n,n.index=e}down(e){let t=this.heap,n=t.length,r=t[e];for(;;){let i=2*e+1;if(i>=n)break;let a=i+1,o=a<n&&before(t[a],t[i])?a:i;if(!before(t[o],r))break;t[e]=t[o],t[e].index=e,e=o}t[e]=r,r.index=e}};function countIO(e,t){for(let n of Ne()){if(n===`Timeout`||n===`Immediate`)continue;let r=e.indexOf(n);r===-1?(e.push(n),t.push(1)):t[r]++}}let C=null;function clockNow(){return C===null?Me():C.now()}function queueUserAgentTask(e){C===null?n(e,0):C.schedule(e,0,[],!1)}const Fe={setTimeout(e,t){return C===null?n(e,t):C.schedule(e,t,[],!1)},clearTimeout(e){C!==null&&C.clear(e)||t(e)}};function clockSkipping(){return C!==null}function skipIdleTime(e){return C===null||C.skipIdle(e)}function canSkipZeroDelayWait(e){let t=C;if(t===null||!isClockTimer(e.setTimeout))return!1;let n=e.setImmediate;if(typeof n!=`function`||n.clock!==void 0||n._isMockFunction===!0||t.busy(t.ownImmediates)!==null)return!1;let r=t.heap[0];return r===void 0||r.due>t.now()+1}function skipZeroDelayWait(e){return canSkipZeroDelayWait(e)&&C.skipIdle(1)}function isClockTimer(e){return C!==null&&typeof e==`function`&&e[Pe]===C}function foreignImmediatesPending(){let e=Ne(),t=0;for(let n=0;n<e.length;n++)e[n]===`Immediate`&&t++;return t>(C===null?0:C.ownImmediates)}function clockSkipped(){return C===null?0:C.skipped}function clockStats(){return C===null?null:{skippedMs:C.skipped,pendingTimers:C.size}}function virtualDate(e,t){function Date(...n){if(new.target===void 0)return new t(e.epochNow()).toString();let r=n.length===0?new t(e.epochNow()):Reflect.construct(t,n,t);return new.target!==Date&&Object.setPrototypeOf(r,new.target.prototype),r}return Object.defineProperties(Date,{length:{value:7},prototype:{value:t.prototype,writable:!1},now:{value:()=>e.epochNow(),writable:!0,configurable:!0},parse:{value:t.parse,writable:!0,configurable:!0},UTC:{value:t.UTC,writable:!0,configurable:!0}}),Date}function virtualPerformance(e,t){let n=Object.create(Object.getPrototypeOf(t));for(let e=t;e!==null&&e!==Object.prototype;e=Object.getPrototypeOf(e))for(let r of Reflect.ownKeys(e)){if(r===`constructor`||r in n&&Object.hasOwn(n,r))continue;let i=Object.getOwnPropertyDescriptor(e,r);typeof i.value==`function`?Object.defineProperty(n,r,{value:i.value.bind(t),writable:!0,configurable:!0,enumerable:i.enumerable}):i.get!==void 0&&Object.defineProperty(n,r,{get:()=>Reflect.get(t,r),configurable:!0,enumerable:i.enumerable})}Object.defineProperty(n,"now",{value:()=>e.now(),writable:!0,configurable:!0,enumerable:!0});let r=t.mark.bind(t),i=t.measure.bind(t);return Object.defineProperty(n,"mark",{value:(t,n)=>r(t,n?.startTime===void 0?{...n,startTime:e.now()}:n),writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(n,"measure",{value:(t,n,r)=>{if(typeof n==`object`&&n){let r=n.end===void 0&&n.duration===void 0;return i(t,r?{...n,end:e.now()}:n)}return r===void 0?i(t,n===void 0?{end:e.now()}:{start:n,end:e.now()}):i(t,n,r)},writable:!0,configurable:!0,enumerable:!0}),n}function installClock(e,t){let n=/* @__PURE__ */ new Map,define=(e,r)=>{n.set(e,Object.getOwnPropertyDescriptor(t,e)),Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})},r=globalThis.clearInterval,i={setTimeout(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!1)},setInterval(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!0)},clearTimeout(t){t!=null&&(e.clear(t)||ke(t))},clearInterval(t){t!=null&&(e.clear(t)||r(t))}};Object.defineProperty(i.setTimeout,Symbol.for(`nodejs.util.promisify.custom`),{value:(t,n)=>new Promise(r=>e.schedule(r,t,[n],!1))}),Object.defineProperty(i.setTimeout,Pe,{value:e}),Object.defineProperty(i.setInterval,Pe,{value:e});for(let e of[`setTimeout`,`setInterval`,`clearTimeout`,`clearInterval`])define(e,i[e]);return e.skip&&(define(`Date`,virtualDate(e,typeof t.Date==`function`?t.Date:Date)),define(`performance`,virtualPerformance(e,t.performance??je)),C=e),{clock:e,uninstall(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),C===e&&(C=null),e.dispose()}}}function toDOMString(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}function toDouble(e,t){let n=typeof e==`number`?e:Number(e);if(!Number.isFinite(n))throw TypeError(`${t} is not a finite floating-point value.`);return n}function toFloat(e,t){let n=toDouble(e,t),r=Math.fround(n);if(!Number.isFinite(r))throw TypeError(`${t} is outside the range of a float.`);return r}function integerPart(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0}function toLong(e){return typeof e==`number`&&(e|0)===e?e:integerPart(e)|0}function toUnsignedLong$1(e){return typeof e==`number`&&e>>>0===e?e:integerPart(e)>>>0}__name(toUnsignedLong$1,`toUnsignedLong`);function toShort(e){return integerPart(e)<<16>>16}function toUnsignedShort(e){return integerPart(e)&65535}const Ie=Symbol.for(`ctrl-dom._proto__`),Le=Symbol.for(`ctrl-dom.aboutBase`),Re=Symbol.for(`ctrl-dom.active`),ze=Symbol.for(`ctrl-dom.assocGen`),Be=Symbol.for(`ctrl-dom.attr`),Ve=Symbol.for(`ctrl-dom.attributes`),He=Symbol.for(`ctrl-dom.availableToElementInternals`),Ue=Symbol.for(`ctrl-dom.badInput`),We=Symbol.for(`ctrl-dom.baseFor`),Ge=Symbol.for(`ctrl-dom.baseOverride`),Ke=Symbol.for(`ctrl-dom.baseURL`),qe=Symbol.for(`ctrl-dom.baseVersion`),w=Symbol.for(`ctrl-dom.block`),Je=Symbol.for(`ctrl-dom.byCtor`),Ye=Symbol.for(`ctrl-dom.byName`),Xe=Symbol.for(`ctrl-dom.cache`),Ze=Symbol.for(`ctrl-dom.callback`),Qe=Symbol.for(`ctrl-dom.checked`),$e=Symbol.for(`ctrl-dom.checkedSet`),et=Symbol.for(`ctrl-dom.childNodes`),tt=Symbol.for(`ctrl-dom.childWindows`),nt=Symbol.for(`ctrl-dom.children`),rt=Symbol.for(`ctrl-dom.classList`),it=Symbol.for(`ctrl-dom.clipboard`),at=Symbol.for(`ctrl-dom.clonable`),ot=Symbol.for(`ctrl-dom.closed`),st=Symbol.for(`ctrl-dom.compiled`),ct=Symbol.for(`ctrl-dom.compiledFor`),lt=Symbol.for(`ctrl-dom.condition`),ut=Symbol.for(`ctrl-dom.constructed`),dt=Symbol.for(`ctrl-dom.constructingEntryList`),ft=Symbol.for(`ctrl-dom.contentType`),pt=Symbol.for(`ctrl-dom.controlsCache`),mt=Symbol.for(`ctrl-dom.controlsDoc`),ht=Symbol.for(`ctrl-dom.coll`),gt=Symbol.for(`ctrl-dom.controlsVersion`),_t=Symbol.for(`ctrl-dom.cookieJar`),vt=Symbol.for(`ctrl-dom.cookies`),yt=Symbol.for(`ctrl-dom.css`),bt=Symbol.for(`ctrl-dom.current`),xt=Symbol.for(`ctrl-dom.customElements`),T=Symbol.for(`ctrl-dom.customValidity`),St=Symbol.for(`ctrl-dom.cx`),Ct=Symbol.for(`ctrl-dom.data`),wt=Symbol.for(`ctrl-dom.dataset`),Tt=Symbol.for(`ctrl-dom.declarative`),Et=Symbol.for(`ctrl-dom.defaultNamespace`),Dt=Symbol.for(`ctrl-dom.defaultValueOverride`),Ot=Symbol.for(`ctrl-dom.delegatesFocus`),kt=Symbol.for(`ctrl-dom.devicePixelRatio`),At=Symbol.for(`ctrl-dom.dirtiness`),jt=Symbol.for(`ctrl-dom.dirtyChecked`),E=Symbol.for(`ctrl-dom.dirtyValue`),Mt=Symbol.for(`ctrl-dom.disabled`),Nt=Symbol.for(`ctrl-dom.disallowModification`),Pt=Symbol.for(`ctrl-dom.derived`),Ft=Symbol.for(`ctrl-dom.doc`),It=Symbol.for(`ctrl-dom.dropEffect`),D=Symbol.for(`ctrl-dom.ec`),Lt=Symbol.for(`ctrl-dom.effectAllowed`),O=Symbol.for(`ctrl-dom.el`),Rt=Symbol.for(`ctrl-dom.elements`),zt=Symbol.for(`ctrl-dom.entries`),k=Symbol.for(`ctrl-dom.eo`),Bt=Symbol.for(`ctrl-dom.error`),Vt=Symbol.for(`ctrl-dom.file`),Ht=Symbol.for(`ctrl-dom.files`),Ut=Symbol.for(`ctrl-dom.fill`),Wt=Symbol.for(`ctrl-dom.filter`),Gt=Symbol.for(`ctrl-dom.firingSubmissionEvents`),A=Symbol.for(`ctrl-dom.focused`),Kt=Symbol.for(`ctrl-dom.form`),qt=Symbol.for(`ctrl-dom.forLabels`),Jt=Symbol.for(`ctrl-dom.forms`),Yt=Symbol.for(`ctrl-dom.frameCallbacks`),Xt=Symbol.for(`ctrl-dom.frameElement`),Zt=Symbol.for(`ctrl-dom.frameId`),Qt=Symbol.for(`ctrl-dom.frameTask`),$t=Symbol.for(`ctrl-dom.frameTime`),en=Symbol.for(`ctrl-dom.generation`),tn=Symbol.for(`ctrl-dom.globalObject`),nn=Symbol.for(`ctrl-dom.hasTransients`),rn=Symbol.for(`ctrl-dom.height`),an=Symbol.for(`ctrl-dom.history`),sn=Symbol.for(`ctrl-dom.home`),j=Symbol.for(`ctrl-dom.host`),cn=Symbol.for(`ctrl-dom.href`),ln=Symbol.for(`ctrl-dom.id`),un=Symbol.for(`ctrl-dom.idleCallbacks`),dn=Symbol.for(`ctrl-dom.idleId`),fn=Symbol.for(`ctrl-dom.ids`),M=Symbol.for(`ctrl-dom.impl`),pn=Symbol.for(`ctrl-dom.implementation`),mn=Symbol.for(`ctrl-dom.indeterminate`),hn=Symbol.for(`ctrl-dom.index`),gn=Symbol.for(`ctrl-dom.indexed`),_n=Symbol.for(`ctrl-dom.inflight`),vn=Symbol.for(`ctrl-dom.info`),yn=Symbol.for(`ctrl-dom.innerHeight`),bn=Symbol.for(`ctrl-dom.innerWidth`),xn=Symbol.for(`ctrl-dom.is2D`),N=Symbol.for(`ctrl-dom.isHTML`),P=Symbol.for(`ctrl-dom.items`),Sn=Symbol.for(`ctrl-dom.keyText`),Cn=Symbol.for(`ctrl-dom.kind`),F=Symbol.for(`ctrl-dom.labels`),wn=Symbol.for(`ctrl-dom.layerName`),Tn=Symbol.for(`ctrl-dom.list`),En=Symbol.for(`ctrl-dom.listeners`),Dn=Symbol.for(`ctrl-dom.localStorage`),On=Symbol.for(`ctrl-dom.location`),kn=Symbol.for(`ctrl-dom.lockedForReset`),I=Symbol.for(`ctrl-dom.m`),An=Symbol.for(`ctrl-dom.matches`),L=Symbol.for(`ctrl-dom.media`),jn=Symbol.for(`ctrl-dom.mediaQueryLists`),Mn=Symbol.for(`ctrl-dom.mode`),Nn=Symbol.for(`ctrl-dom.name`),Pn=Symbol.for(`ctrl-dom.names`),Fn=Symbol.for(`ctrl-dom.namespaces`),In=Symbol.for(`ctrl-dom.navigator`),Ln=Symbol.for(`ctrl-dom.nodes`),Rn=Symbol.for(`ctrl-dom.onchange`),R=Symbol.for(`ctrl-dom.options`),z=Symbol.for(`ctrl-dom.owner`),zn=Symbol.for(`ctrl-dom.ownerNode`),Bn=Symbol.for(`ctrl-dom.ownerRule`),B=Symbol.for(`ctrl-dom.parent`),Vn=Symbol.for(`ctrl-dom.parentRule`),Hn=Symbol.for(`ctrl-dom.parentWindow`),Un=Symbol.for(`ctrl-dom.pastNames`),Wn=Symbol.for(`ctrl-dom.pointerBeforeReference`),Gn=Symbol.for(`ctrl-dom.preApplied`),Kn=Symbol.for(`ctrl-dom.preChecked`),qn=Symbol.for(`ctrl-dom.preCheckedRadio`),Jn=Symbol.for(`ctrl-dom.preIndeterminate`),Yn=Symbol.for(`ctrl-dom.prefix`),Xn=Symbol.for(`ctrl-dom.prelude`),Zn=Symbol.for(`ctrl-dom.presentationStyle`),Qn=Symbol.for(`ctrl-dom.pseudo`),$n=Symbol.for(`ctrl-dom.queries`),er=Symbol.for(`ctrl-dom.ranges`),tr=Symbol.for(`ctrl-dom.rawValue`),nr=Symbol.for(`ctrl-dom.readonly`),rr=Symbol.for(`ctrl-dom.readyState`),ir=Symbol.for(`ctrl-dom.rebuildVersion`),ar=Symbol.for(`ctrl-dom.record`),or=Symbol.for(`ctrl-dom.records`),sr=Symbol.for(`ctrl-dom.rects`),cr=Symbol.for(`ctrl-dom.reference`),lr=Symbol.for(`ctrl-dom.result`),ur=Symbol.for(`ctrl-dom.root`),V=Symbol.for(`ctrl-dom.rules`),dr=Symbol.for(`ctrl-dom.running`),fr=Symbol.for(`ctrl-dom.runningFrame`),H=Symbol.for(`ctrl-dom.sc`),pr=Symbol.for(`ctrl-dom.screen`),mr=Symbol.for(`ctrl-dom.scrollRestoration`),hr=Symbol.for(`ctrl-dom.scrollX`),gr=Symbol.for(`ctrl-dom.scrollY`),_r=Symbol.for(`ctrl-dom.selDir`),vr=Symbol.for(`ctrl-dom.selEnd`),yr=Symbol.for(`ctrl-dom.selSet`),br=Symbol.for(`ctrl-dom.selStart`),xr=Symbol.for(`ctrl-dom.selectedOptions`),Sr=Symbol.for(`ctrl-dom.selectedness`),Cr=Symbol.for(`ctrl-dom.selection`),wr=Symbol.for(`ctrl-dom.selector`),Tr=Symbol.for(`ctrl-dom.serializable`),Er=Symbol.for(`ctrl-dom.sessionStorage`),Dr=Symbol.for(`ctrl-dom.settled`),U=Symbol.for(`ctrl-dom.shadowRoot`),Or=Symbol.for(`ctrl-dom.shed`),kr=Symbol.for(`ctrl-dom.sheet`),Ar=Symbol.for(`ctrl-dom.sheets`),jr=Symbol.for(`ctrl-dom.slotAssignment`),W=Symbol.for(`ctrl-dom.so`),Mr=Symbol.for(`ctrl-dom.states`),Nr=Symbol.for(`ctrl-dom.style`),Pr=Symbol.for(`ctrl-dom.styleVersion`),Fr=Symbol.for(`ctrl-dom.supportsText`),Ir=Symbol.for(`ctrl-dom.systemId`),Lr=Symbol.for(`ctrl-dom.target`),Rr=Symbol.for(`ctrl-dom.targets`),zr=Symbol.for(`ctrl-dom.tasks`),Br=Symbol.for(`ctrl-dom.timers`),Vr=Symbol.for(`ctrl-dom.title`),Hr=Symbol.for(`ctrl-dom.type`),Ur=Symbol.for(`ctrl-dom.types`),Wr=Symbol.for(`ctrl-dom.uiValue`),Gr=Symbol.for(`ctrl-dom.updating`),Kr=Symbol.for(`ctrl-dom.updatingSelectedContent`),qr=Symbol.for(`ctrl-dom.uri`),G=Symbol.for(`ctrl-dom.url`),Jr=Symbol.for(`ctrl-dom.userActivation`),Yr=Symbol.for(`ctrl-dom.userEdited`),Xr=Symbol.for(`ctrl-dom.userValidity`),Zr=Symbol.for(`ctrl-dom.validity`),Qr=Symbol.for(`ctrl-dom.value`),K=Symbol.for(`ctrl-dom.version`),$r=Symbol.for(`ctrl-dom.visualViewport`),ei=Symbol.for(`ctrl-dom.w`),ti=Symbol.for(`ctrl-dom.whatToShow`),ni=Symbol.for(`ctrl-dom.whenDefined`),ri=Symbol.for(`ctrl-dom.width`),q=Symbol.for(`ctrl-dom.window`),ii=Symbol.for(`ctrl-dom.writeBuffer`),ai=Symbol.for(`ctrl-dom.x`),oi=Symbol.for(`ctrl-dom.xhr`),si=Symbol.for(`ctrl-dom.y`),ci=Symbol.for(`ctrl-dom.z`);var EventState=class{flags;type;target;relatedTarget;currentTarget;eventPhase;pathStart;pathLength;touchTargets;timeStamp;constructor(e,t){this.flags=t,this.type=e,this.target=null,this.relatedTarget=null,this.currentTarget=null,this.eventPhase=0,this.pathStart=-1,this.pathLength=0,this.touchTargets=null,this.timeStamp=clockNow()}};function exposedPathItem(e){let t=J[e];return J[e+4]&16?exposedWindow(t):t}function exposedWindow(e){return e[tn]??e}const J=[],li={top:0};let ui=!1;function withInternalConstruct(e){let t=ui;ui=!0;try{return e()}finally{ui=t}}function isInternalConstruct(){return ui}const di={get:function isTrusted(){return!!(this._s.flags&128)},enumerable:!0,configurable:!1};var Event=class{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;#e;get _s(){return this.#e}constructor(e,t){if(arguments.length===0)throw TypeError(`Failed to construct '${new.target.name}': 1 argument required, but only 0 present.`);let n=toDOMString(e),r=32;if(t!=null){if(typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Failed to construct '${new.target.name}': The provided value is not of type '${new.target.name}Init'.`);t.bubbles&&(r|=256),t.cancelable&&(r|=512),t.composed&&(r|=16)}this.#e=new EventState(n,r),Object.defineProperty(this,"isTrusted",di)}get type(){return this._s.type}get target(){return this._s.target}get srcElement(){return this._s.target}get currentTarget(){return this._s.currentTarget}get eventPhase(){return this._s.eventPhase}get bubbles(){return!!(this._s.flags&256)}get cancelable(){return!!(this._s.flags&512)}get composed(){return!!(this._s.flags&16)}get timeStamp(){return this._s.timeStamp}get defaultPrevented(){return!!(this._s.flags&4)}get returnValue(){return!(this._s.flags&4)}set returnValue(e){e||setCanceledFlag(this._s)}get cancelBubble(){return!!(this._s.flags&1)}set cancelBubble(e){e&&(this._s.flags|=1)}stopPropagation(){this._s.flags|=1}stopImmediatePropagation(){this._s.flags|=3}preventDefault(){setCanceledFlag(this._s)}composedPath(){let e=this._s,t=[],n=e.pathLength;if(n===0||e.pathStart<0)return t;let r=e.pathStart,i=e.currentTarget;if(i===null)return t;let a=0,o=0;for(let e=n-1;e>=0;e--){let t=r+e*5,n=J[t+4];if(n&2&&o++,exposedPathItem(t)===i){a=e;break}n&4&&o--}let s=o,c=o,l=[];for(let e=a-1;e>=0;e--){let t=r+e*5,n=J[t+4];n&2&&s++,s<=c&&l.push(exposedPathItem(t)),n&4&&(s--,s<c&&(c=s))}for(let e=l.length-1;e>=0;e--)t.push(l[e]);t.push(i),s=o,c=o;for(let e=a+1;e<n;e++){let n=r+e*5,i=J[n+4];i&4&&s++,s<=c&&t.push(exposedPathItem(n)),i&2&&(s--,s<c&&(c=s))}return t}initEvent(e,t=!1,n=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initEvent' on 'Event': 1 argument required, but only 0 present.`);let r=this._s;r.flags&64||initializeEvent(r,toDOMString(e),!!t,!!n)}};Object.defineProperties(Event.prototype,{NONE:{value:0,enumerable:!0},CAPTURING_PHASE:{value:1,enumerable:!0},AT_TARGET:{value:2,enumerable:!0},BUBBLING_PHASE:{value:3,enumerable:!0},[Symbol.toStringTag]:{value:`Event`,configurable:!0}});function setCanceledFlag(e){(e.flags&520)==512&&(e.flags|=4)}function initializeEvent(e,t,n,r){let i=(e.flags|32)&-904;n&&(i|=256),r&&(i|=512),e.flags=i,e.target=null,e.type=t}function setTrusted(e,t=!0){t?e._s.flags|=128:e._s.flags&=-129}function setToStringTag(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),t!==void 0&&Object.defineProperty(e,"length",{value:t,configurable:!0})}setToStringTag(Event,1),exposeMembers(Event);var Listener=class{callback;capture;once;passive;removed;signal;onAbort;constructor(e,t,n,r,i){this.callback=e,this.capture=t,this.once=n,this.passive=r,this.removed=!1,this.signal=i,this.onAbort=null}};const fi=[];var ListenerList=class{items;iterating;constructor(){this.items=fi,this.iterating=0}};function appendListener(e,t){let n=e.items,r=n.length;if(r>=8&&e.iterating===0){n.push(t);return}let i=Array(r+1);for(let e=0;e<r;e++)i[e]=n[e];i[r]=t,e.items=i}const pi={capture:!1,once:!1,passive:null,signal:null};function flattenCapture(e){return typeof e==`boolean`?e:e==null?!1:typeof e!=`object`&&typeof e!=`function`?!!e:!!e.capture}function flattenMore(e){if(pi.capture=!1,pi.once=!1,pi.passive=null,pi.signal=null,e==null)return pi;if(typeof e!=`object`&&typeof e!=`function`)return pi.capture=!!e,pi;let t=!!e.capture,n=!!e.once,r=e.passive,i=e.signal;if(pi.capture=t,pi.once=n,pi.passive=r===void 0?null:!!r,pi.signal=null,i!==void 0){if(typeof i!=`object`||!i||typeof i.aborted!=`boolean`||typeof i.addEventListener!=`function`)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': member signal is not of type 'AbortSignal'.`);pi.signal=i}return pi}function defaultPassiveValue(e,t){if(e!==`touchstart`&&e!==`touchmove`&&e!==`wheel`&&e!==`mousewheel`)return!1;let n=t,r=n[M];if(r===void 0){let e=n.document;return e!=null&&e[q]===t}if(r.type===9)return!0;let i=r.doc;return i.documentElement===t||i.body===t}function checkCallback(e,t){if(typeof e!=`function`&&(typeof e!=`object`||!e))throw TypeError(`Failed to execute '${t}' on 'EventTarget': parameter 2 is not of type 'Object'.`)}function addEventListener(e,t,n,r){let{capture:i,once:a,passive:o,signal:s}=flattenMore(r);if(s!==null&&s.aborted||n==null)return;checkCallback(n,`addEventListener`);let c=e[En],l;if(c==null?c=e[En]=/* @__PURE__ */ new Map:l=c.get(t),l===void 0)l=new ListenerList,c.set(t,l);else{let e=l.items;for(let t=0;t<e.length;t++){let r=e[t];if(r.callback===n&&r.capture===i)return}}let u=new Listener(n,i,a,o===null?defaultPassiveValue(t,e):o,s);if(appendListener(l,u),s!==null){let onAbort=()=>removeListener(e,t,u);u.onAbort=onAbort,s.addEventListener(`abort`,onAbort,{once:!0})}}function removeEventListener(e,t,n,r){let i=flattenCapture(r);if(n==null)return;checkCallback(n,`removeEventListener`);let a=e[En];if(a==null)return;let o=a.get(t);if(o===void 0)return;let s=o.items;for(let r=0;r<s.length;r++){let a=s[r];if(a.callback===n&&a.capture===i){removeAt(e,t,o,r);return}}}function removeListener(e,t,n){if(n.removed)return;let r=e[En]?.get(t);if(r===void 0){n.removed=!0;return}let i=r.items.indexOf(n);i===-1?n.removed=!0:removeAt(e,t,r,i)}function removeAt(e,t,n,r){let i=n.items[r];if(i.removed=!0,i.signal!==null&&i.onAbort!==null&&(i.signal.removeEventListener(`abort`,i.onAbort),i.onAbort=null),n.iterating>0){let e=n.items.slice();e.splice(r,1),n.items=e}else n.items.splice(r,1)}function removeAllEventListeners(e){let t=e[En];if(t!=null){for(let[n,r]of t){let t=r.items;for(let i=t.length-1;i>=0;i--)removeAt(e,n,r,i)}e[En]=null}}function hasListeners(e,t){let n=e[En];if(n==null)return!1;let r=n.get(t);return r!==void 0&&r.items.length>0}function requireArgs$1(e,t,n){if(e<t)throw TypeError(`Failed to construct '${n}': ${t} argument${t>1?`s`:``} required, but only ${e} present.`)}__name(requireArgs$1,`requireArgs`);function dict(e,t){if(e==null)return null;if(typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct '${t}': The provided value is not of type '${t}Init'.`);return e}function isWindow(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.window===e||t.document!=null&&t.document[q]===e}function viewMember(e,t){if(e==null)return null;if(!isWindow(e))throw TypeError(`Failed to construct '${t}': member view is not of type Window.`);return e}function targetMember(e){return e??null}const mi=Object.freeze(Object.create(null)),hi=/* @__PURE__ */ __name((e,t)=>e===void 0?t:toDOMString(e),`str`),gi=/* @__PURE__ */ __name((e,t=0)=>e===void 0?t:toLong(e),`long`),_i=/* @__PURE__ */ __name(e=>e===void 0?0:toUnsignedLong$1(e),`ulong`),double=(e,t,n,r=0)=>e===void 0?r:typeof e==`number`&&Number.isFinite(e)?e:toDouble(e,`Failed to construct '${n}': member ${t}`),float=(e,t,n,r=0)=>{if(e===void 0)return r;if(typeof e==`number`){let t=Math.fround(e);if(Number.isFinite(t))return t}return toFloat(e,`Failed to construct '${n}': member ${t}`)},vi=[[`ctrlKey`,1],[`shiftKey`,2],[`altKey`,4],[`metaKey`,8],[`modifierAltGraph`,16],[`modifierCapsLock`,32],[`modifierFn`,64],[`modifierFnLock`,128],[`modifierHyper`,256],[`modifierNumLock`,512],[`modifierScrollLock`,1024],[`modifierSuper`,2048],[`modifierSymbol`,4096],[`modifierSymbolLock`,8192]];function modifiers(e){let t=0;return e.ctrlKey&&(t|=1),e.shiftKey&&(t|=2),e.altKey&&(t|=4),e.metaKey&&(t|=8),e.modifierAltGraph&&(t|=16),e.modifierCapsLock&&(t|=32),e.modifierFn&&(t|=64),e.modifierFnLock&&(t|=128),e.modifierHyper&&(t|=256),e.modifierNumLock&&(t|=512),e.modifierScrollLock&&(t|=1024),e.modifierSuper&&(t|=2048),e.modifierSymbol&&(t|=4096),e.modifierSymbolLock&&(t|=8192),t}function modifierState(e,t){let n;switch(t){case`Control`:n=1;break;case`Shift`:n=2;break;case`Alt`:n=4;break;case`Meta`:n=8;break;default:{let e=vi.find(e=>e[0]===`modifier`+t);if(e===void 0)return!1;n=e[1]}}return(e&n)!==0}function legacyMods(e,t,n,r,i){let a=i&-16;return e&&(a|=1),t&&(a|=4),n&&(a|=2),r&&(a|=8),a}var UIEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name);let n=dict(t,new.target.name)??mi;super(e,t),this.#e=viewMember(n.view,new.target.name),this.#t=gi(n.detail),this.#n=_i(n.which)}get view(){return this.#e}get detail(){return this.#t}get which(){return this.#n}initUIEvent(e,t=!1,n=!1,r=null,i=0){if(arguments.length===0)throw TypeError(`Failed to execute 'initUIEvent' on 'UIEvent': 1 argument required, but only 0 present.`);if(r!=null&&!isWindow(r))throw TypeError(`Failed to execute 'initUIEvent' on '${this.constructor.name}': parameter 4 is not of type 'Window'.`);this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r??null,this.#t=toLong(i))}};setToStringTag(UIEvent,1);var FocusEvent=class extends UIEvent{constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this._s.relatedTarget=targetMember(t?.relatedTarget)}get relatedTarget(){return this._s.relatedTarget}};setToStringTag(FocusEvent,1);var MouseEvent=class extends UIEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??mi;this.#e=double(r.screenX,`screenX`,n),this.#t=double(r.screenY,`screenY`,n),this.#n=double(r.clientX,`clientX`,n),this.#r=double(r.clientY,`clientY`,n),this.#i=modifiers(r);let i=r.button;this.#a=i===void 0?0:toShort(i);let a=r.buttons;this.#o=a===void 0?0:toUnsignedShort(a),this.#s=double(r.movementX,`movementX`,n),this.#c=double(r.movementY,`movementY`,n),this._s.relatedTarget=targetMember(r.relatedTarget),this._s.flags|=1024}get screenX(){return this.#e}get screenY(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get x(){return this.#n}get y(){return this.#r}get pageX(){return this.#n}get pageY(){return this.#r}get offsetX(){return this.#n}get offsetY(){return this.#r}get movementX(){return this.#s}get movementY(){return this.#c}get ctrlKey(){return!!(this.#i&1)}get shiftKey(){return!!(this.#i&2)}get altKey(){return!!(this.#i&4)}get metaKey(){return!!(this.#i&8)}get button(){return this.#a}get buttons(){return this.#o}get relatedTarget(){return this._s.relatedTarget}getModifierState(e){return modifierState(this.#i,toDOMString(e))}initMouseEvent(e,t=!1,n=!1,r=null,i=0,a=0,o=0,s=0,c=0,l=!1,u=!1,d=!1,m=!1,h=0,_=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initMouseEvent' on 'MouseEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,i),this.#e=toLong(a),this.#t=toLong(o),this.#n=toLong(s),this.#r=toLong(c),this.#i=legacyMods(l,u,d,m,this.#i),this.#a=toShort(h),this._s.relatedTarget=targetMember(_))}};setToStringTag(MouseEvent,1);const yi=180/Math.PI;function spherical2tilt(e,t){let n=0,r=0,i=Math.PI;if(e===0)(t===0||t===2*i)&&(n=i/2),t===i/2&&(r=i/2),t===i&&(n=-i/2),t===3*i/2&&(r=-i/2),t>0&&t<i/2&&(n=i/2,r=i/2),t>i/2&&t<i&&(n=-i/2,r=i/2),t>i&&t<3*i/2&&(n=-i/2,r=-i/2),t>3*i/2&&t<2*i&&(n=i/2,r=-i/2);else{let i=Math.tan(e);n=Math.atan(Math.cos(t)/i),r=Math.atan(Math.sin(t)/i)}return[Math.round(n*yi),Math.round(r*yi)]}function tilt2spherical(e,t){let n=e/yi,r=t/yi,i=0;e===0?t>0?i=Math.PI/2:t<0&&(i=3*Math.PI/2):t===0?e<0&&(i=Math.PI):Math.abs(e)===90||Math.abs(t)===90?i=0:(i=Math.atan2(Math.tan(r),Math.tan(n)),i<0&&(i+=2*Math.PI));let a;return a=Math.abs(e)===90||Math.abs(t)===90?0:e===0?Math.PI/2-Math.abs(r):t===0?Math.PI/2-Math.abs(n):Math.atan(1/Math.sqrt(Math.tan(n)**2+Math.tan(r)**2)),[a,i]}var PointerEvent=class extends MouseEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??mi;this.#e=gi(r.pointerId),this.#t=double(r.width,`width`,n,1),this.#n=double(r.height,`height`,n,1),this.#r=float(r.pressure,`pressure`,n),this.#i=float(r.tangentialPressure,`tangentialPressure`,n);let i=r.tiltX,a=r.tiltY,o=r.altitudeAngle,s=r.azimuthAngle,c=i!==void 0||a!==void 0,l=o!==void 0||s!==void 0,u=gi(i),d=gi(a),m=double(o,`altitudeAngle`,n,Math.PI/2),h=double(s,`azimuthAngle`,n,0);c&&!l?[m,h]=tilt2spherical(u,d):l&&!c&&([u,d]=spherical2tilt(m,h)),this.#a=u,this.#o=d,this.#s=gi(r.twist),this.#c=m,this.#l=h,this.#u=hi(r.pointerType,``),this.#d=!!r.isPrimary,this.#f=gi(r.persistentDeviceId);let _=r.coalescedEvents;this.#p=_==null?[]:Array.from(_);let v=r.predictedEvents;this.#m=v==null?[]:Array.from(v)}get pointerId(){return this.#e}get width(){return this.#t}get height(){return this.#n}get pressure(){return this.#r}get tangentialPressure(){return this.#i}get tiltX(){return this.#a}get tiltY(){return this.#o}get twist(){return this.#s}get altitudeAngle(){return this.#c}get azimuthAngle(){return this.#l}get pointerType(){return this.#u}get isPrimary(){return this.#d}get persistentDeviceId(){return this.#f}getCoalescedEvents(){return this.#p.slice()}getPredictedEvents(){return this.#m.slice()}};setToStringTag(PointerEvent,1);var WheelEvent=class extends MouseEvent{static DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=new.target.name,r=t??mi;this.#e=double(r.deltaX,`deltaX`,n),this.#t=double(r.deltaY,`deltaY`,n),this.#n=double(r.deltaZ,`deltaZ`,n),this.#r=_i(r.deltaMode)}get deltaX(){return this.#e}get deltaY(){return this.#t}get deltaZ(){return this.#n}get deltaMode(){return this.#r}};setToStringTag(WheelEvent,1),Object.defineProperties(WheelEvent.prototype,{DOM_DELTA_PIXEL:{value:0,enumerable:!0},DOM_DELTA_LINE:{value:1,enumerable:!0},DOM_DELTA_PAGE:{value:2,enumerable:!0}});var DragEvent=class extends MouseEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=t?.dataTransfer??null}get dataTransfer(){return this.#e}};setToStringTag(DragEvent,1);var KeyboardEvent=class extends UIEvent{static DOM_KEY_LOCATION_STANDARD=0;static DOM_KEY_LOCATION_LEFT=1;static DOM_KEY_LOCATION_RIGHT=2;static DOM_KEY_LOCATION_NUMPAD=3;#e;#t;#n;#r;#i;#a;#o;#s;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??mi;this.#e=hi(n.key,``),this.#t=hi(n.code,``),this.#n=_i(n.location),this.#r=modifiers(n),this.#i=!!n.repeat,this.#a=!!n.isComposing,this.#o=_i(n.charCode),this.#s=_i(n.keyCode)}get key(){return this.#e}get code(){return this.#t}get location(){return this.#n}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get repeat(){return this.#i}get isComposing(){return this.#a}get charCode(){return this.#o}get keyCode(){return this.#s}getModifierState(e){return modifierState(this.#r,toDOMString(e))}initKeyboardEvent(e,t=!1,n=!1,r=null,i=``,a=0,o=!1,s=!1,c=!1,l=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i),this.#n=toUnsignedLong$1(a),this.#r=legacyMods(o,s,c,l,this.#r))}};setToStringTag(KeyboardEvent,1),Object.defineProperties(KeyboardEvent.prototype,{DOM_KEY_LOCATION_STANDARD:{value:0,enumerable:!0},DOM_KEY_LOCATION_LEFT:{value:1,enumerable:!0},DOM_KEY_LOCATION_RIGHT:{value:2,enumerable:!0},DOM_KEY_LOCATION_NUMPAD:{value:3,enumerable:!0}});var InputEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??mi,r=n.data;this.#e=r==null?null:toDOMString(r),this.#t=!!n.isComposing,this.#n=hi(n.inputType,``),this.#r=n.dataTransfer??null}get data(){return this.#e}get isComposing(){return this.#t}get inputType(){return this.#n}get dataTransfer(){return this.#r}};setToStringTag(InputEvent,1);var CompositionEvent=class extends UIEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=hi((t??mi).data,``)}get data(){return this.#e}initCompositionEvent(e,t=!1,n=!1,r=null,i=``){if(arguments.length===0)throw TypeError(`Failed to execute 'initCompositionEvent' on 'CompositionEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(CompositionEvent,1);var TextEvent=class extends UIEvent{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get data(){return this.#e}initTextEvent(e,t=!1,n=!1,r=null,i=`undefined`){this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(TextEvent,1);var Touch=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){requireArgs$1(arguments.length,1,`Touch`);let t=dict(e,`Touch`);if(t===null||t.identifier===void 0)throw TypeError(`Failed to construct 'Touch': required member identifier is undefined.`);if(t.target===void 0)throw TypeError(`Failed to construct 'Touch': required member target is undefined.`);let n=`Touch`;this.#e=toLong(t.identifier),this.#t=t.target,this.#n=double(t.clientX,`clientX`,n),this.#r=double(t.clientY,`clientY`,n),this.#i=double(t.screenX,`screenX`,n),this.#a=double(t.screenY,`screenY`,n),this.#o=double(t.pageX,`pageX`,n),this.#s=double(t.pageY,`pageY`,n),this.#c=float(t.radiusX,`radiusX`,n),this.#l=float(t.radiusY,`radiusY`,n),this.#u=float(t.rotationAngle,`rotationAngle`,n),this.#d=float(t.force,`force`,n),this.#f=double(t.altitudeAngle,`altitudeAngle`,n),this.#p=double(t.azimuthAngle,`azimuthAngle`,n),this.#m=hi(t.touchType,`direct`)}get identifier(){return this.#e}get target(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get screenX(){return this.#i}get screenY(){return this.#a}get pageX(){return this.#o}get pageY(){return this.#s}get radiusX(){return this.#c}get radiusY(){return this.#l}get rotationAngle(){return this.#u}get force(){return this.#d}get altitudeAngle(){return this.#f}get azimuthAngle(){return this.#p}get touchType(){return this.#m}};setToStringTag(Touch,1);var bi=class TouchList{#e;constructor(){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);this.#e=[]}static _create(e){let t=isInternalConstruct()?new TouchList:withInternalConstruct(()=>new TouchList);t.#e=e;for(let n=0;n<e.length;n++)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}get length(){return this.#e.length}item(e){return this.#e[toUnsignedLong$1(e)]??null}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};setToStringTag(bi);function touchSequence(e,t){if(e==null)return[];let n=Array.from(e);for(let e of n)if(e===null||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct 'TouchEvent': Failed to read the '${t}' property from 'TouchEventInit': Failed to convert value to 'Touch'.`);return n}var TouchEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t??mi;this.#e=bi._create(touchSequence(n.touches,`touches`)),this.#t=bi._create(touchSequence(n.targetTouches,`targetTouches`)),this.#n=bi._create(touchSequence(n.changedTouches,`changedTouches`)),this.#r=modifiers(n),this._s.flags|=2048}get touches(){return this.#e}get targetTouches(){return this.#t}get changedTouches(){return this.#n}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}getModifierState(e){return modifierState(this.#r,toDOMString(e))}_touchTargetList(){let e=[];for(let t of[this.#e,this.#t,this.#n])for(let n of t){let t=n.target;typeof t==`object`&&t&&e.push(t)}return e}};setToStringTag(TouchEvent,1);var ClipboardEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=t?.clipboardData??null}get clipboardData(){return this.#e}};setToStringTag(ClipboardEvent,1),exposeMembers(UIEvent,FocusEvent,MouseEvent,PointerEvent,WheelEvent,DragEvent,KeyboardEvent,InputEvent,CompositionEvent,TextEvent,Touch,bi,TouchEvent,ClipboardEvent);const get=(e,t)=>e?.[t],xi=/* @__PURE__ */ __name((e,t,n=``)=>{let r=get(e,t);return r===void 0?n:toDOMString(r)},`str`),Si=/* @__PURE__ */ __name((e,t)=>{let n=get(e,t);return n==null?null:toDOMString(n)},`nullableStr`),dbl=(e,t,n)=>{let r=get(e,t);return r===void 0?0:toDouble(r,`Failed to construct '${n}': member ${t}`)};function required(e,t,n){let r=get(e,t);if(r===void 0)throw TypeError(`Failed to construct '${n}': required member ${t} is undefined.`);return r}var CustomEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t?.detail;this.#e=n===void 0?null:n}get detail(){return this.#e}initCustomEvent(e,t=!1,n=!1,r=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initCustomEvent' on 'CustomEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r)}};setToStringTag(CustomEvent,1);var ErrorEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t;this.#e=xi(n,`message`),this.#t=xi(n,`filename`);let r=get(n,`lineno`),i=get(n,`colno`);this.#n=r===void 0?0:toUnsignedLong$1(r),this.#r=i===void 0?0:toUnsignedLong$1(i),this.#i=get(n,`error`)}get message(){return this.#e}get filename(){return this.#t}get lineno(){return this.#n}get colno(){return this.#r}get error(){return this.#i}};setToStringTag(ErrorEvent,1);var PromiseRejectionEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,2,new.target.name);let n=required(t,`promise`,new.target.name);if(n===null||typeof n!=`object`&&typeof n!=`function`)throw TypeError(`Failed to construct '${new.target.name}': member promise is not an object.`);super(e,t),this.#e=n,this.#t=get(t,`reason`)}get promise(){return this.#e}get reason(){return this.#t}};setToStringTag(PromiseRejectionEvent,2);var MessageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t,r=get(n,`data`);this.#e=r===void 0?null:r,this.#t=xi(n,`origin`),this.#n=xi(n,`lastEventId`),this.#r=get(n,`source`)??null;let i=get(n,`ports`);this.#i=Object.freeze(i==null?[]:Array.from(i))}get data(){return this.#e}get origin(){return this.#t}get lastEventId(){return this.#n}get source(){return this.#r}get ports(){return this.#i}initMessageEvent(e,t=!1,n=!1,r=null,i=``,a=``,o=null,s=[]){this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r,this.#t=toDOMString(i),this.#n=toDOMString(a),this.#r=o,this.#i=Object.freeze(Array.from(s)))}};setToStringTag(MessageEvent,1);var ProgressEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`lengthComputable`),this.#t=dbl(t,`loaded`,new.target.name),this.#n=dbl(t,`total`,new.target.name)}get lengthComputable(){return this.#e}get loaded(){return this.#t}get total(){return this.#n}};setToStringTag(ProgressEvent,1);var AnimationEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=xi(t,`animationName`),this.#t=dbl(t,`elapsedTime`,new.target.name),this.#n=xi(t,`pseudoElement`)}get animationName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(AnimationEvent,1);var TransitionEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=xi(t,`propertyName`),this.#t=dbl(t,`elapsedTime`,new.target.name),this.#n=xi(t,`pseudoElement`)}get propertyName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(TransitionEvent,1);var PopStateEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=get(t,`state`);this.#e=n===void 0?null:n,this.#t=!!get(t,`hasUAVisualTransition`)}get state(){return this.#e}get hasUAVisualTransition(){return this.#t}};setToStringTag(PopStateEvent,1);var HashChangeEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=xi(t,`oldURL`),this.#t=xi(t,`newURL`)}get oldURL(){return this.#e}get newURL(){return this.#t}};setToStringTag(HashChangeEvent,1);var PageTransitionEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`persisted`)}get persisted(){return this.#e}};setToStringTag(PageTransitionEvent,1);var StorageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=Si(t,`key`),this.#t=Si(t,`oldValue`),this.#n=Si(t,`newValue`),this.#r=xi(t,`url`),this.#i=get(t,`storageArea`)??null}get key(){return this.#e}get oldValue(){return this.#t}get newValue(){return this.#n}get url(){return this.#r}get storageArea(){return this.#i}initStorageEvent(e,t=!1,n=!1,r=null,i=null,a=null,o=``,s=null){this._s.flags&64||(initializeEvent(this._s,toDOMString(e),!!t,!!n),this.#e=r===null?null:toDOMString(r),this.#t=i===null?null:toDOMString(i),this.#n=a===null?null:toDOMString(a),this.#r=toDOMString(o),this.#i=s)}};setToStringTag(StorageEvent,1);var SubmitEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=get(t,`submitter`)??null}get submitter(){return this.#e}};setToStringTag(SubmitEvent,1);var FormDataEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,2,new.target.name);let n=required(t,`formData`,new.target.name);super(e,t),this.#e=n}get formData(){return this.#e}};setToStringTag(FormDataEvent,2);var ToggleEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=xi(t,`oldState`),this.#t=xi(t,`newState`),this.#n=get(t,`source`)??null}get oldState(){return this.#e}get newState(){return this.#t}get source(){return this.#n}};setToStringTag(ToggleEvent,1);var BeforeUnloadEvent=class extends Event{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get returnValue(){return this.#e}set returnValue(e){this.#e=toDOMString(e)}};setToStringTag(BeforeUnloadEvent,1);var CloseEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t),this.#e=!!get(t,`wasClean`);let n=get(t,`code`);this.#t=n===void 0?0:toUnsignedShort(n),this.#n=xi(t,`reason`)}get wasClean(){return this.#e}get code(){return this.#t}get reason(){return this.#n}};setToStringTag(CloseEvent,1),exposeMembers(CustomEvent,ErrorEvent,PromiseRejectionEvent,MessageEvent,ProgressEvent,AnimationEvent,TransitionEvent,PopStateEvent,HashChangeEvent,PageTransitionEvent,StorageEvent,SubmitEvent,FormDataEvent,ToggleEvent,BeforeUnloadEvent,CloseEvent);let Ci=null;function setCurrentWindow(e){Ci=e}function currentWindow(){if(Ci===null)throw TypeError(`No active @ctrl/dom window. Create one with createWindow().`);return Ci}function currentDocument(){return currentWindow().document}function currentWindowOrNull(){return Ci}function defaultUncaughtExceptionHandler(e){let t=typeof e==`object`&&e?e.stack:void 0;console.error(typeof t==`string`?t:`Uncaught ${String(e)}`)}let wi=defaultUncaughtExceptionHandler;function setUncaughtExceptionHandler(e){wi=e??defaultUncaughtExceptionHandler}const Ti=/* @__PURE__ */ new WeakSet;function windowFor(e){if(e!==null){let t=e;if(t[M]!==void 0)return t[M].doc[q];let n=t.document;if(n!=null&&n[q]===e)return e}try{return currentWindow()}catch{return null}}function parseLocation(e){let t=typeof e==`object`&&e?e.stack:void 0;if(typeof t==`string`){let e=t.split(`
2
+ `);for(let t=1;t<e.length;t++){let n=/at (?:.+\s+)?\(?(.+?):(\d+):(\d+)\)?$/.exec(e[t].trim());if(n!==null)return{filename:n[1],lineno:Number(n[2]),colno:Number(n[3])}}}return{filename:``,lineno:0,colno:0}}function reportException$1(e,t){let n=windowFor(t);if(n===null||Ti.has(n)){wi(e,null);return}let{filename:r,lineno:i,colno:a}=parseLocation(e),o=new ErrorEvent(`error`,{cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?e.message:`Uncaught ${String(e)}`,filename:r,lineno:i,colno:a,error:e});setTrusted(o),Ti.add(n);let s=!1;try{s=!dispatch(o,n)}finally{Ti.delete(n)}s||wi(e,o)}__name(reportException$1,`reportException`);let Ei;function getCurrentEvent(){return Ei}let Di=null;function setPostDispatchHook(e){Di=e}let Oi=null;function setAssignedSlotLookup(e){Oi=e}function assignedSlot$1(e){if(Oi===null)return null;let t=e.parent;return t===null||!(t.flags&512)||e.type!==1&&e.type!==3?null:Oi(e)}__name(assignedSlot$1,`assignedSlot`);function isAssigned(e){return assignedSlot$1(e)!==null}function treeRoot$1(e){for(;e.parent!==null;)e=e.parent;return e}__name(treeRoot$1,`treeRoot`);function nodeGetTheParent(e,t){let n=e[M],r=n.parent;if(r!==null&&r.flags&512){let e=assignedSlot$1(n);if(e!==null)return e}if(n.flags&32){let r=t._s;if(!(r.flags&16)&&r.pathLength>0){let e=J[r.pathStart][M];if(e!==void 0&&treeRoot$1(e)===n)return null}return e[j]}return r===null?null:r.node}function isShadowIncludingInclusiveAncestor$4(e,t){let n=t;for(;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null||e[M]===void 0?null:e[M]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$4,`isShadowIncludingInclusiveAncestor`);function inShadowTree(e){if(e===null)return!1;let t=e[M];return t!==void 0&&!!(treeRoot$1(t).flags&32)}function retarget(e,t){for(;;){if(e===null)return null;let n=e[M];if(n===void 0)return e;let r=treeRoot$1(n);if(!(r.flags&32))return e;let i=t[M];if(i!==void 0&&isShadowIncludingInclusiveAncestor$4(r,i))return e;e=r.node[j]}}function retargetList(e,t){if(e===null)return null;let n=[];for(let r=0;r<e.length;r++)n.push(retarget(e[r],t));return n}function isWindowInstance(e){return e[tn]!==void 0}function hasActivationBehavior(e){return e._hasActivationBehavior===!0}function appendToEventPath(e,t,n,r,i,a){let o=li.top,s=0;a!==null&&a.flags&32&&(s|=1,e[M]===a&&e.mode===`closed`&&(s|=2)),i&&(s|=4),J[o]=e,t===null?J[o+1]=J[o+1-5]:(s|=8,J[o+1]=t),J[o+2]=n,J[o+3]=r,J[o+4]=s,li.top=o+5}function dispatch(e,t,n=!1){let r=e._s,i=t;r.flags|=64;let a=n?t.document??t:t,o=null,s=r.relatedTarget,c=inShadowTree(s),l=c?retarget(s,t):s,u=!1,d=li.top;try{if(t!==l||t===s){let n=r.flags&2048?e._touchTargetList():null;r.pathStart=d,r.pathLength=0;let i=t[M],m=i===void 0?null:treeRoot$1(i),h=m,_=h!==null&&!!(h.flags&32),v=i===void 0&&isWindowInstance(t);appendToEventPath(t,v?exposedWindow(t):a,l,retargetList(n,t),!1,m),v&&(J[d+4]=J[d+4]|16),r.pathLength=1;let ee=d,y=!!(r.flags&1024)&&r.type===`click`,te=!!(r.flags&256);y&&hasActivationBehavior(t)&&(o=t);let ne=i!==void 0&&isAssigned(i),re=!1,b=i,x=t._getTheParent(e);for(;x!==null;){let i=x[M],a;a=i===void 0?null:b!==void 0&&b.parent===i?m:treeRoot$1(i),ne&&(ne=!1,a!==null&&a.flags&32&&a.node.mode===`closed`&&(re=!0)),i!==void 0&&isAssigned(i)&&(ne=!0),l=c?retarget(s,x):s;let u=retargetList(n,x);i===void 0||h!==null&&(!_||isShadowIncludingInclusiveAncestor$4(h,i))?(y&&te&&o===null&&hasActivationBehavior(x)&&(o=x),appendToEventPath(x,null,l,u,re,a),i===void 0&&isWindowInstance(x)&&(J[li.top-5+4]=J[li.top-5+4]|16),r.pathLength++):x===l?x=null:(t=x,h=a,_=h!==null&&!!(h.flags&32),y&&o===null&&hasActivationBehavior(t)&&(o=t),ee=li.top,appendToEventPath(x,t,l,u,re,a),r.pathLength++),x!==null&&(b=i,m=a,x=x._getTheParent(e)),re=!1}let ie=li.top;{let e=ee;if(inShadowTree(J[e+1])||inShadowTree(J[e+2]))u=!0;else{let t=J[e+3];if(t!==null)for(let e=0;e<t.length;e++)inShadowTree(t[e])&&(u=!0)}}o!==null&&o._legacyPreActivationBehavior?.();for(let t=ie-5;t>=d;t-=5)r.eventPhase=J[t+4]&8?2:1,invoke$1(e,r,t,1);let ae=d;for(let t=d;t<ie;t+=5){if(J[t+4]&8)r.eventPhase=2;else{if(!te)continue;r.eventPhase=3}ae=t,invoke$1(e,r,t,3)}r.target=J[ae+1],r.relatedTarget=J[ae+2],r.touchTargets=J[ae+3]}}finally{for(let e=d,t=li.top;e<t;e++)J[e]=null;li.top=d,r.eventPhase=0,r.currentTarget=null,r.pathStart=-1,r.pathLength=0,r.flags&=-76}if(u&&(r.target=null,r.relatedTarget=null,r.touchTargets=null),o!==null){let t=o;r.flags&4?t._legacyCanceledActivationBehavior?.():t._activationBehavior?.(e)}return Di!==null&&Di(e,i),!(r.flags&4)}function legacyType(e){switch(e){case`animationend`:return`webkitAnimationEnd`;case`animationiteration`:return`webkitAnimationIteration`;case`animationstart`:return`webkitAnimationStart`;case`transitionend`:return`webkitTransitionEnd`;default:return null}}function invoke$1(e,t,n,r){let i=J[n],a=i[En];if(a==null||(t.target=J[n+1],t.relatedTarget=J[n+2],t.touchTargets=J[n+3],t.flags&1))return;let o=J[n+4],s=o&16?exposedWindow(i):i;t.currentTarget=s;let c=!!(o&1),l=t.type,u=a.get(l);if(!(u!==void 0&&innerInvoke(e,t,i,s,l,u,r,c))&&t.flags&128){let n=legacyType(l);if(n===null)return;let o=a.get(n);if(o===void 0)return;t.type=n;try{innerInvoke(e,t,i,s,n,o,r,c)}finally{t.type=l}}}__name(invoke$1,`invoke`);function innerInvoke(e,t,n,r,i,a,o,s){let c=!1,l=a.items;a.iterating++;try{for(let a=0;a<l.length;a++){let u=l[a];if(u.removed||(c=!0,o===1?!u.capture:u.capture))continue;u.once&&removeListener(n,i,u);let d=Ei;s||(Ei=e),u.passive&&(t.flags|=8);let m=u.callback;try{if(typeof m==`function`)m.call(r,e);else{let t=m.handleEvent;if(typeof t!=`function`)throw TypeError(`The provided callback is not a function and has no callable 'handleEvent' property.`);t.call(m,e)}}catch(e){reportException$1(e,n)}if(t.flags&=-9,Ei=d,t.flags&2)break}}finally{a.iterating--}return c}var EventTarget=class{constructor(){}addEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);addEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}removeEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'removeEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);removeEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}dispatchEvent(e){if(!(e instanceof Event))throw TypeError(`Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.`);let t=e._s;if(!(t.flags&32))throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is uninitialized.`,`InvalidStateError`);if(t.flags&64||t.eventPhase!==0)throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.`,`InvalidStateError`);return t.flags&=-129,dispatch(e,this)}_getTheParent(e){return null}};Object.defineProperty(EventTarget.prototype,Symbol.toStringTag,{value:`EventTarget`,configurable:!0}),exposeMembers(EventTarget);var AttrRare=class{name;ns;prefix;attr;constructor(e,t,n){this.name=e,this.ns=t,this.prefix=n,this.attr=null}},AttrRecord=class{localName;value;rare;constructor(e,t,n,r){this.localName=e,this.value=t,this.rare=n===null&&r===null?null:new AttrRare(r===null?e:r+`:`+e,n,r)}get name(){let e=this.rare;return e===null?this.localName:e.name}get ns(){let e=this.rare;return e===null?null:e.ns}get prefix(){let e=this.rare;return e===null?null:e.prefix}get attr(){let e=this.rare;return e===null?null:e.attr}set attr(e){if(this.rare===null){if(e===null)return;this.rare=new AttrRare(this.localName,null,null)}this.rare.attr=e}},NodeImpl=class{node;type;doc;parent;first;last;prev;next;childCount;flags;tag;name;ns;prefix;attrs;data;id;classes;cache;constructor(e,t,n){this.node=e,this.type=t,this.doc=n,this.parent=null,this.first=null,this.last=null,this.prev=null,this.next=null,this.childCount=0,this.flags=0,this.tag=0,this.name=``,this.ns=null,this.prefix=null,this.attrs=null,this.data=``,this.id=``,this.classes=null,this.cache=null}};function nextInTree(e,t){let n=e.first;return n===null?nextSkippingChildren(e,t):n}function nextSkippingChildren(e,t){let n=e;for(;n!==null&&n!==t;){let e=n.next;if(e!==null)return e;n=n.parent}return null}function previousInTree(e,t){if(e===t)return null;let n=e.prev;if(n===null)return e.parent;for(;n.last!==null;)n=n.last;return n}function nextElementInTree(e,t){let n=nextInTree(e,t);for(;n!==null&&n.type!==1;)n=nextInTree(n,t);return n}function firstElementChild(e){let t=e.first;for(;t!==null&&t.type!==1;)t=t.next;return t}function lastElementChild(e){let t=e.last;for(;t!==null&&t.type!==1;)t=t.prev;return t}function nextElementSibling(e){let t=e.next;for(;t!==null&&t.type!==1;)t=t.next;return t}function previousElementSibling(e){let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t}function treeRoot(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function isInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;n=n.parent}return!1}function indexOf(e){let t=0;for(let n=e.prev;n!==null;n=n.prev)t++;return t}function childAt(e,t){let n=e.childCount;if(t<0||t>=n)return null;if(t<n>>1){let n=e.first;for(let e=0;e<t;e++)n=n.next;return n}let r=e.last;for(let e=n-1;e>t;e--)r=r.prev;return r}function ancestors(e){let t=[];for(let n=e;n!==null;n=n.parent)t.push(n);return t}function compareTreeOrder(e,t){if(e===t)return 0;let n=ancestors(e),r=ancestors(t),i=n.length-1,a=r.length-1;for(;i>=0&&a>=0&&n[i]===r[a];)i--,a--;if(i<0)return-1;if(a<0)return 1;let o=n[i],s=r[a];for(let e=o.next;e!==null;e=e.next)if(e===s)return-1;return 1}function derivedCache(e,t,n){let r=e[Pt];r===null&&(e[Pt]=r=/* @__PURE__ */ new Map);let i=r.get(t);return i===void 0&&r.set(t,i=n()),i}function peekDerivedCache(e,t){let n=e[Pt];return n===null?void 0:n.get(t)}const ki={},newHolders=()=>/* @__PURE__ */ new Set;function holdSnapshot(e,t,n){n.flags&1&&derivedCache(e,ki,newHolders).add(t)}function dropDerivedCaches(e){let t=e[Pt];e[Pt]=null;let n=t.get(ki);if(n!==void 0)for(let e of n)e._dropSnapshot()}let Ai=null;function setElementClassLookup(e){Ai=e}function createElementImpl(e,t,n,r){return new(Ai(t,n))(e,t,n,r)[M]}let ji=!1,Mi=null;function setCEReactionsPending(e){ji=e}function setCEReactionsFlush(e){Mi=e}function flushCEReactions(){Mi!==null&&Mi()}let Ni=null;function setCustomElementCreate(e){Ni=e}function createElementImplSync(e,t,n,r,i){if(Ni!==null){let a=Ni(e,t,n,r,i);if(a!==null)return a}return createElementImpl(e,t,n,r)}let Pi=!1;function setCEActive(){Pi=!0}let Fi=null,Ii=null;function setCustomElementCloneHooks(e,t){Fi=e,Ii=t}function createCloneElementImpl(e,t){return Fi(e,t)}function ceParserCreated(e){Ii(e)}function indexGetterTable(e,t,n=32){let r={proto:e,count:0,item:t};return ensureIndexGetters(r,n),r}function ensureIndexGetters(e,t){if(t<=e.count)return;let n=Math.max(t,e.count*2),r=e.item;for(let t=e.count;t<n;t++)Object.defineProperty(e.proto,t,{get(){return r(this,t)},enumerable:!1,configurable:!0});e.count=n}var CollectionIterator=class extends Iterator{#e;#t;#n;constructor(e,t){super(),this.#e=e,this.#t=0,this.#n=t}next(){let e=this.#e;if(e!==null){let t=this.#t,n=this.#n?e._snapshot():e;if(t<n.length)return this.#t=t+1,{value:n[t],done:!1};this.#e=null}return{value:void 0,done:!0}}};Object.defineProperty(CollectionIterator.prototype,Symbol.toStringTag,{value:`Array Iterator`,configurable:!0});function iterableTarget(e){if(e==null)throw TypeError(`values method called on null or undefined`);return Object(e)}const Li=/* @__PURE__ */ new Map;function lazyItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}var Ri=class NodeList{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=0;let n=new.target!==NodeList;this.#n=n,n&&!Li.has(new.target.prototype)&&Li.set(new.target.prototype,indexGetterTable(new.target.prototype,lazyItem,64))}static _static(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r];return t.#t=n,t}static _staticFromImpls(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r].node;return t.#t=n,t}static _live(e){let t=new NodeList(e);return e.flags|=256,t.#r(),t}#r(){let e=this,t=this.#e,n=0;for(let r=t.first;r!==null;r=r.next)e[n++]=r.node;let r=this.#t;for(let t=n;t<r;t++)delete e[t];this.#t=n}static _appended(e,t){e[e.#t++]=t}static _popped(e){delete e[--e.#t]}static _rebuild(e){e.#e!==null&&e.#r()}_snapshot(){let e=this.#t,t=Array(e);for(let n=0;n<e;n++)t[n]=this[n];return t}get length(){if(this.#n){let e=this._snapshot().length,t=Li.get(Object.getPrototypeOf(this));return e>t.count&&ensureIndexGetters(t,e),e}return this.#t}item(e){let t=Number(e)>>>0;return this.#n?this._snapshot()[t]??null:t<this.#t?this[t]:null}static _values(e){let t=iterableTarget(e);return new CollectionIterator(t,#n in t&&t.#n)}};const zi={values(){return Ri._values(this)}}.values;Object.defineProperties(Ri.prototype,{forEach:{value:Array.prototype.forEach,writable:!0,enumerable:!0,configurable:!0},entries:{value:Array.prototype.entries,writable:!0,enumerable:!0,configurable:!0},keys:{value:Array.prototype.keys,writable:!0,enumerable:!0,configurable:!0},values:{value:zi,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:zi,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NodeList`,configurable:!0}});const Bi=[];var Vi=class MutationRecord{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;constructor(e,t,n,r,i,a,o,s,c){if(new.target!==MutationRecord||arguments.length===0)throw TypeError(`Illegal constructor`);this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i,this.#a=a??Bi,this.#o=o??Bi,this.#s=null,this.#c=null,this.#l=s,this.#u=c}get type(){return this.#e}get target(){return this.#t.node}get addedNodes(){return this.#s??=Ri._staticFromImpls(this.#a)}get removedNodes(){return this.#c??=Ri._staticFromImpls(this.#o)}get previousSibling(){let e=this.#l;return e===null?null:e.node}get nextSibling(){let e=this.#u;return e===null?null:e.node}get attributeName(){return this.#n}get attributeNamespace(){return this.#r}get oldValue(){return this.#i}};Object.defineProperty(Vi.prototype,Symbol.toStringTag,{value:`MutationRecord`,configurable:!0});let Hi=0;function setActiveObservers(e){Hi=e}let Ui=0;function setSubtreeObservers(e){Ui=e}var RegisteredObserver=class{observer;options;source;constructor(e,t,n){this.observer=e,this.options=t,this.source=n}},NormalizedOptions=class{childList;attributes;characterData;subtree;attributeOldValue;characterDataOldValue;attributeFilter;constructor(e,t,n){this.childList=!!e.childList,this.attributes=t,this.characterData=n,this.subtree=!!e.subtree,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,this.attributeFilter=e.attributeFilter===void 0?null:Array.from(e.attributeFilter,String)}};const Wi=/* @__PURE__ */ new WeakMap;function registeredObserverList(e){return e.flags&2048?Wi.get(e)??null:null}function addRegistration(e,t){let n=registeredObserverList(e);n===null&&(n=[],Wi.set(e,n),e.flags|=be),n.push(t)}function removeRegistrations(e,t){let n=registeredObserverList(e);if(n===null)return;let r=0;for(let e=0;e<n.length;e++)t(n[e])||(n[r++]=n[e]);n.length=r,r===0&&(Wi.delete(e),e.flags&=-2049)}let Gi=[],Ki=[],qi=!1;function queueMutationRecord(e,t,n,r,i,a,o,s,c){let l=null,u=null,d=Ui!==0;for(let a=t;a!==null;a=d?a.parent:null){if(!(a.flags&2048))continue;let o=Wi.get(a);if(o!==void 0)for(let s=0;s<o.length;s++){let c=o[s],d=c.options;if(a!==t&&!d.subtree)continue;if(e===0){if(!d.attributes)continue;let e=d.attributeFilter;if(e!==null&&(r!==null||!e.includes(n)))continue}else if(e===1){if(!d.characterData)continue}else if(!d.childList)continue;let m=c.observer;l===null&&(l=[],u=[]);let h=l.indexOf(m);h===-1&&(h=l.length,l.push(m),u.push(null)),(e===0&&d.attributeOldValue||e===1&&d.characterDataOldValue)&&(u[h]=i)}}if(l===null)return;let m=e===0?`attributes`:e===1?`characterData`:`childList`;for(let e=0;e<l.length;e++){let i=l[e],d=new Vi(m,t,n,r,u[e],a,o,s,c),h=i[or];h.length===0&&!Gi.includes(i)&&Gi.push(i),h.push(d)}queueMutationObserverMicrotask()}function queueTreeMutationRecord(e,t,n,r,i){queueMutationRecord(2,e,null,null,null,t,n,r,i)}function queueAttributeMutationRecord(e,t,n,r){queueMutationRecord(0,e,t,n,r,null,null,null,null)}function queueCharacterDataMutationRecord(e,t){queueMutationRecord(1,e,null,null,t,null,null,null,null)}function addTransientObservers(e,t){if(Ui!==0)for(let n=e;n!==null;n=n.parent){if(!(n.flags&2048))continue;let e=Wi.get(n);if(e!==void 0)for(let n=0;n<e.length;n++){let r=e[n];if(!r.options.subtree)continue;let i=r.observer,a=r.source??r;hasTransientWithSource(t,a)||(addRegistration(t,new RegisteredObserver(i,a.options,a)),i[Ln].push(t),i[nn]=!0,Gi.includes(i)||Gi.push(i),queueMutationObserverMicrotask())}}}function hasTransientWithSource(e,t){let n=registeredObserverList(e);if(n===null)return!1;for(let e=0;e<n.length;e++)if(n[e].source===t)return!0;return!1}function signalSlotChange(e){Ki.includes(e)||Ki.push(e),queueMutationObserverMicrotask()}function queueMutationObserverMicrotask(){qi||(qi=!0,queueMicrotask(notifyMutationObservers))}function notifyMutationObservers(){qi=!1;let e=Gi;Gi=[],e.length>1&&e.sort((e,t)=>e[ln]-t[ln]);let t=Ki;Ki=[];for(let t=0;t<e.length;t++){let n=e[t],r=n[or];if(n[or]=[],removeTransientRegistrations(n),r.length!==0)try{n[Ze].call(n,r,n)}catch(e){reportException$1(e,null)}}for(let e=0;e<t.length;e++)t[e].node.dispatchEvent(new Event(`slotchange`,{bubbles:!0}))}function removeTransientRegistrations(e){if(!e[nn])return;e[nn]=!1;let t=[],n=e[Ln];for(let r=0;r<n.length;r++){let i=n[r];removeRegistrations(i,t=>t.observer===e&&t.source!==null);let a=registeredObserverList(i);a!==null&&!t.includes(i)&&a.some(t=>t.observer===e)&&t.push(i)}e[Ln]=t}function dropPending(e){let t=Gi.indexOf(e);t!==-1&&Gi.splice(t,1)}let Ji=0,Yi=0,Xi=[];function homeOf(e){return e.doc}function registerLiveRange(e){let t=homeOf(e[H]);e[sn]=t;let n=t[er]??=[];n.length!==0&&!(n.length&255)&&liveRanges(e[H]),(t[er]??=[]).push(new WeakRef(e)),Ji++}function refileRange(e){let t=homeOf(e[H]);e[sn]!==t&&e[sn]!==null&&(e[sn]=t,(t[er]??=[]).push(new WeakRef(e)),Ji++)}let Zi=64;function registerNodeIterator(e){if(Xi.length>=Zi){let e=0;for(let t=0;t<Xi.length;t++)Xi[t].deref()!==void 0&&(Xi[e++]=Xi[t]);Xi.length=e,Zi=Math.max(64,e*2)}Xi.push(new WeakRef(e)),Yi=Xi.length}function liveRanges(e){let t=homeOf(e),n=t[er],r=[];if(n===null)return r;let i=0;for(let e=0;e<n.length;e++){let a=n[e].deref();a!==void 0&&a[sn]===t&&(r.push(a),n[i++]=n[e])}return Ji-=n.length-i,n.length=i,i===0&&(t[er]=null),r}function rangesAdopt(e,t){let n=t,r=homeOf(e),i=n[er];if(i===null||n===r)return;let a=0;for(let t=0;t<i.length;t++){let o=i[t].deref();o===void 0?Ji--:o[sn]===n?isInclusiveAncestor(e,o[H])||isInclusiveAncestor(e,o[D])?(o[sn]=r,(r[er]??=[]).push(i[t])):i[a++]=i[t]:Ji--}i.length=a,a===0&&(n[er]=null)}function rangesAfterInsert(e,t,n){let r=liveRanges(e);for(let i=0;i<r.length;i++){let a=r[i];a[H]===e&&a[W]>t&&(a[W]+=n),a[D]===e&&a[k]>t&&(a[k]+=n)}}function rangesBeforeRemove(e,t,n){let r=liveRanges(t);for(let i=0;i<r.length;i++){let a=r[i];isInclusiveAncestor(e,a[H])&&(a[H]=t,a[W]=n),isInclusiveAncestor(e,a[D])&&(a[D]=t,a[k]=n),a[H]===t&&a[W]>n&&a[W]--,a[D]===t&&a[k]>n&&a[k]--}}function rangesReplaceData(e,t,n,r){let i=liveRanges(e),a=t+n;for(let o=0;o<i.length;o++){let s=i[o];s[H]===e&&s[W]>t&&s[W]<=a&&(s[W]=t),s[D]===e&&s[k]>t&&s[k]<=a&&(s[k]=t),s[H]===e&&s[W]>a&&(s[W]+=r-n),s[D]===e&&s[k]>a&&(s[k]+=r-n)}}function rangesSplitText(e,t,n,r){let i=liveRanges(e),a=indexOf(e);for(let o=0;o<i.length;o++){let s=i[o];s[H]===e&&s[W]>n&&(s[H]=t,s[W]-=n),s[D]===e&&s[k]>n&&(s[D]=t,s[k]-=n),s[H]===r&&s[W]===a+1&&s[W]++,s[D]===r&&s[k]===a+1&&s[k]++}}function rangesNormalizeMerge(e,t,n){let r=liveRanges(e),i=t.parent,a=indexOf(t);for(let o=0;o<r.length;o++){let s=r[o];s[H]===t&&(s[W]+=n,s[H]=e),s[D]===t&&(s[k]+=n,s[D]=e),s[H]===i&&s[W]===a&&(s[H]=e,s[W]=n),s[D]===i&&s[k]===a&&(s[D]=e,s[k]=n)}}function iteratorsBeforeRemove(e){let t=0,n=e.doc;for(let r=0;r<Xi.length;r++){let i=Xi[r].deref();i!==void 0&&(Xi[t++]=Xi[r],i[ur].doc===n&&(preRemovingSteps(i,i,e),i[_n]!==null&&preRemovingSteps(i,i[_n],e)))}Xi.length=t,Yi=t}function preRemovingSteps(e,t,n){if(!isInclusiveAncestor(n,t[cr])||isInclusiveAncestor(n,e[ur]))return;if(t[Wn]){let r=nextSkippingChildren(n,e[ur]);if(r!==null){t[cr]=r;return}t[Wn]=!1}let r=n.prev;if(r===null)t[cr]=n.parent;else{let e=r;for(;e.last!==null;)e=e.last;t[cr]=e}}const Qi=/* @__PURE__ */ new WeakMap;function noteInlineStyle(e,t){Qi.set(e,(Qi.get(e)??0)+t)}function inlineStyleCount(e){return Qi.get(e)??0}function asciiLowercase$1(e){let t=e.length;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t>=65&&t<=90)return asciiLowercaseFrom(e,n)}return e}__name(asciiLowercase$1,`asciiLowercase`);function asciiLowercaseFrom(e,t){let n=!0,r=e.length;for(let i=t;i<r;i++)if(e.charCodeAt(i)>=128){n=!1;break}if(n)return e.toLowerCase();let i=e.slice(0,t);for(let n=t;n<r;n++){let t=e.charCodeAt(n);i+=t>=65&&t<=90?String.fromCharCode(t+32):e[n]}return i}function isValidAttributeLocalName(e){let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===61||t===62)return!1}return!0}function findAttributeByName(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if((i===null?r.localName:i.name)===t)return r}return null}function findAttributeByNamespace(e,t,n){let r=e.attrs;if(r===null)return null;for(let e=0;e<r.length;e++){let i=r[e],a=i.rare;if(i.localName===n&&(a===null?t===null:a.ns===t))return i}return null}function getAttribute(e,t){let n=e.attrs;if(n===null)return null;let r=e.flags&2?asciiLowercase$1(t):t;for(let e=0;e<n.length;e++){let t=n[e],i=t.rare;if((i===null?t.localName:i.name)===r)return t.value}return null}function prefixFlag(e){switch(e.length){case 5:if(e===`inert`)return De;break;case 8:if(e===`tabindex`)return Te;break;case 15:if(e===`contenteditable`)return Ee}if(e.length<5||e.charCodeAt(4)!==45)return 0;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97?Ce:0:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97?we:0}function attr(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if(i===null?r.localName===t:i.ns===null&&i.name===t)return r.value}return null}function ariaAttr(e,t){return e.flags&32768?attr(e,t):null}function hasAttr(e,t){return attr(e,t)!==null}const $i=/* @__PURE__ */ new Map;function setAttribute(e,t,n){let r=$i.get(t);if(r===void 0){if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);r=asciiLowercase$1(t),$i.size===1024&&$i.clear(),$i.set(t,r)}let i=e.flags&2?r:t,a=findAttributeByName(e,i);a===null?appendAttribute(e,new AttrRecord(i,n,null,null)):changeAttribute(e,a,n)}function changeAttribute(e,t,n){let r=t.value;t.value=n,handleAttributeChanges(e,t,r,n)}function addRecord(e,t){let n=prefixFlag(t.localName);n!==0&&(e.flags|=n);let r=e.attrs;if(r===null){let n=[,];n[0]=t,e.attrs=n;return}let i=r.length;if(i>=16){r.push(t);return}let a=Array(i+1);for(let e=0;e<i;e++)a[e]=r[e];a[i]=t,e.attrs=a}function appendAttribute(e,t){addRecord(e,t),handleAttributeChanges(e,t,null,t.value)}function removeAttributeRecord(e,t){let n=e.attrs,r=n.indexOf(t);n.splice(r,1);let i=prefixFlag(t.localName);if(i!==0){let t=!1;for(let e=0;e<n.length&&!t;e++)t=prefixFlag(n[e].localName)===i;t||(e.flags&=~i)}t.attr!==null&&t.attr._detach(),handleAttributeChanges(e,t,t.value,null)}function removeAttribute(e,t){if(e.attrs===null)return null;let n=findAttributeByName(e,e.flags&2?asciiLowercase$1(t):t);return n!==null&&removeAttributeRecord(e,n),n}function handleAttributeChanges(e,t,n,r){Hi!==0&&queueAttributeMutationRecord(e,t.localName,t.ns,n),t.ns===null&&(coreAttributeSteps(e,t.localName,r),ra!==0&&slotsAttributeChanged(e,t.localName,n,r)),e.flags&8&&e.node._attributeChangedSteps(t.localName,n,r,t.ns),e.doc[K]++,ji&&flushCEReactions()}function coreAttributeSteps(e,t,n){switch(t){case`id`:{let t=!!(e.flags&1);t&&e.id!==``&&e.doc._idRemove(e),e.id=n??``,t&&e.id!==``&&e.doc._idAdd(e);break}case`class`:e.classes=null;break;case`style`:n===null||n===``?(e.flags&64&&noteInlineStyle(e.doc,-1),e.flags&=-65):(e.flags&64||noteInlineStyle(e.doc,1),e.flags|=64),e.node[Nr]?._attributeChanged(n)}}function appendAttributeDetached(e,t,n,r,i){addRecord(e,new AttrRecord(t,n,r,i)),r===null&&(t===`id`?e.id=n:t===`style`&&n!==``&&!(e.flags&64)&&(e.flags|=64,noteInlineStyle(e.doc,1)))}const ea=[];function classTokens(e){let t=e.classes;if(t!==null)return t;let n=attr(e,`class`);return t=n===null||n===``?ea:splitOnAsciiWhitespace(n),e.classes=t,t}function splitOnAsciiWhitespace(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&isAsciiWhitespace(e.charCodeAt(r));)r++;if(r>=n)break;let i=r;for(;r<n&&!isAsciiWhitespace(e.charCodeAt(r));)r++;t.push(i===0&&r===n?e:e.slice(i,r))}return t}function isAsciiWhitespace(e){return e===32||e===9||e===10||e===12||e===13}const ta=/* @__PURE__ */ `.a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.svg.math.frame.frameset.noframes.marquee.font.center.dir.applet.basefont.bgsound.big.blink.keygen.listing.menuitem.nobr.noembed.param.plaintext.rb.rtc.strike.tt.xmp.image.selectedcontent`.split(`.`),na=/* @__PURE__ */ new Map;for(let e=1;e<ta.length;e++)na.set(ta[e],e);function tagId(e){return na.get(e)??0}function tagName(e){return ta[e]??``}const Y=Object.fromEntries(ta.map((e,t)=>[e,t]));let ra=0;function _shadowRootAttached(){ra++}const ia=/* @__PURE__ */ new WeakMap,aa=/* @__PURE__ */ new WeakMap,oa=/* @__PURE__ */ new WeakMap,sa=/* @__PURE__ */ new WeakMap,ca=[];function isSlot(e){return e.type===1&&e.tag===Y.slot&&e.ns===`http://www.w3.org/1999/xhtml`}function isSlottable(e){return e.type===1||e.type===3}function shadowOf(e){return e.flags&512?e.node[U]??null:null}function slotName(e){return attr(e,`name`)??``}function slottableName(e){return e.type===1?attr(e,`slot`)??``:``}function findSlot(e,t){let n=e.parent;if(n===null)return null;let r=shadowOf(n);if(r===null||t&&r.mode!==`open`)return null;let i=r[M];if(r.slotAssignment===`manual`){for(let t=i.first;t!==null;t=nextInTree(t,i))if(isSlot(t)&&(oa.get(t)??ca).includes(e))return t;return null}let a=slottableName(e);for(let e=i.first;e!==null;e=nextInTree(e,i))if(isSlot(e)&&slotName(e)===a)return e;return null}function findSlottables(e){let t=[],n=treeRoot(e);if(!(n.flags&32))return t;let r=n.node,i=r[j][M];if(r.slotAssignment===`manual`){let n=oa.get(e);if(n!==void 0)for(let e of n)e.parent===i&&t.push(e);return t}for(let n=i.first;n!==null;n=n.next)isSlottable(n)&&findSlot(n,!1)===e&&t.push(n);return t}function findFlattenedSlottables(e){let t=[];if(!(treeRoot(e).flags&32))return t;let n=findSlottables(e);if(n.length===0){n=[];for(let t=e.first;t!==null;t=t.next)isSlottable(t)&&n.push(t)}for(let e of n)if(isSlot(e)&&treeRoot(e).flags&32)for(let n of findFlattenedSlottables(e))t.push(n);else t.push(e);return t}function assignSlottables(e){let t=findSlottables(e),n=ia.get(e)??ca,r=n.length===t.length;if(r){for(let e=0;e<n.length;e++)if(n[e]!==t[e]){r=!1;break}}r||signalSlotChange(e);for(let r of n)aa.get(r)===e&&!t.includes(r)&&aa.delete(r);t.length===0?ia.delete(e):ia.set(e,t);for(let n of t)aa.set(n,e)}function assignSlottablesForTree(e){for(let t=e;t!==null;t=nextInTree(t,e))isSlot(t)&&assignSlottables(t)}function assignASlot(e){let t=findSlot(e,!1);t!==null&&assignSlottables(t)}function hasSlotDescendant(e){for(let t=e;t!==null;t=nextInTree(t,e))if(isSlot(t))return!0;return!1}function isEmptyShadowSlot(e){return isSlot(e)&&!!(treeRoot(e).flags&32)&&(ia.get(e)??ca).length===0}function slotsAfterInsert(e,t,n){let r=n===null?1:n.length;for(let i=0;i<r;i++){let r=n===null?t:n[i];if(r.parent===e&&(shadowOf(e)!==null&&isSlottable(r)&&assignASlot(r),isEmptyShadowSlot(e)&&signalSlotChange(e),hasSlotDescendant(r))){let e=treeRoot(r);e.flags&32&&assignSlottablesForTree(e)}}}function slotsAfterRemove(e,t){let n=aa.get(e);if(n!==void 0&&assignSlottables(n),isEmptyShadowSlot(t)&&signalSlotChange(t),hasSlotDescendant(e)){let n=treeRoot(t);n.flags&32&&assignSlottablesForTree(n),assignSlottablesForTree(e)}}function slotsAttributeChanged(e,t,n,r){if(t===`name`&&isSlot(e)){if((n??``)===(r??``))return;let t=treeRoot(e);t.flags&32&&assignSlottablesForTree(t)}else if(t===`slot`){if((n??``)===(r??``))return;let t=aa.get(e);t!==void 0&&assignSlottables(t),assignASlot(e)}}function assignedSlot(e){return aa.get(e)??null}function assignedNodes(e,t){return t?findFlattenedSlottables(e):(ia.get(e)??ca).slice()}function assignedElements(e,t){return assignedNodes(e,t).filter(e=>e.type===1)}function assignManually(e,t){let n=oa.get(e)??ca;for(let e of n)sa.delete(e);let r=[],i=null;for(let n of t){let t=sa.get(n);if(t!==void 0&&t!==e){let e=oa.get(t);if(e!==void 0){let t=e.indexOf(n);t!==-1&&e.splice(t,1)}i===null&&(i=[]),i.includes(t)||i.push(t)}r.includes(n)||r.push(n),sa.set(n,e)}oa.set(e,r);let a=treeRoot(e);if(a.flags&32&&assignSlottablesForTree(a),i!==null)for(let e of i)treeRoot(e)!==a&&assignSlottables(e)}function assignedSlotForEventPath(e){if(ra===0)return null;let t=e.parent;return t===null||!(t.flags&512)?null:aa.get(e)??null}function isShadowRootImpl(e){return e.type===11&&!!(e.flags&32)}function hierarchyError$1(e){return new DOMException(e,`HierarchyRequestError`)}__name(hierarchyError$1,`hierarchyError`);function isCharacterData$1(e){return e===3||e===4||e===8||e===7}__name(isCharacterData$1,`isCharacterData`);function isHostIncludingInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;let t=n.parent;if(t===null&&n.type===11){let e=n.node[j];n=e?e[M]:null}else n=t}return!1}function hasElementChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return!0;return!1}function hasDoctypeChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===10)return!0;return!1}function doctypeFollows(e){for(let t=e.next;t!==null;t=t.next)if(t.type===10)return!0;return!1}function elementPrecedes(e){for(let t=e.prev;t!==null;t=t.prev)if(t.type===1)return!0;return!1}function ensurePreInsertionValidity(e,t,n){let r=t.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let i=e.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(e,t,n,null)}function checkDocumentChildConstraints(e,t,n,r){let otherElement=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===1&&e!==r)return!0;return!1},otherDoctype=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===10&&e!==r)return!0;return!1};switch(e.type){case 11:{let i=0;for(let t=e.first;t!==null;t=t.next)if(t.type===1)i++;else if(t.type===3||t.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(i>1)throw hierarchyError$1(`A document can have only one document element.`);if(i===1){if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`)}break}case 1:if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`);break;case 10:if(r===null){if(hasDoctypeChild(t)||n!==null&&elementPrecedes(n)||n===null&&hasElementChild(t))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}else if(otherDoctype()||elementPrecedes(r))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}}function ensureReplaceAllValidity(e,t){if(t.type!==9){ensurePreInsertionValidity(e,t,null);return}if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);let n=e.type;if(n!==11&&n!==10&&n!==1&&!isCharacterData$1(n))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if(n===3||n===4)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);if(n===11){let t=0;for(let n=e.first;n!==null;n=n.next)if(n.type===1)t++;else if(n.type===3||n.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(t>1)throw hierarchyError$1(`A document can have only one document element.`)}}function preInsert(e,t,n){ensurePreInsertionValidity(e,t,n);let r=n;return r===e&&(r=e.next),insert(e,t,r,!1),e}function append(e,t){return preInsert(e,t,null)}function link(e,t,n){if(e.parent=t,n===null){let n=t.last;e.prev=n,e.next=null,n===null?t.first=e:n.next=e,t.last=e}else{let r=n.prev;e.prev=r,e.next=n,n.prev=e,r===null?t.first=e:r.next=e}if(t.childCount++,t.flags&256){let r=t.node[et];n===null?Ri._appended(r,e.node):Ri._rebuild(r)}}function unlink(e){let t=e.parent,n=e.prev,r=e.next;if(n===null?t.first=r:n.next=r,r===null?t.last=n:r.prev=n,e.parent=null,e.prev=null,e.next=null,t.childCount--,t.flags&256){let e=t.node[et];r===null?Ri._popped(e):Ri._rebuild(e)}}function suspendChildList(e){let t=e.flags&256;return e.flags&=-257,t}function resumeChildList(e,t){t!==0&&(e.flags|=256,Ri._rebuild(e.node[et]))}function insert(e,t,n,r){let i=e.type===11,a=i?e.childCount:1;if(a===0)return;let o=null;if(i){o=Array(a);let t=0;for(let n=e.first;n!==null;n=n.next)o[t++]=n;let n=suspendChildList(e);for(let e=0;e<o.length;e++)remove(o[e],!0);resumeChildList(e,n),Hi!==0&&queueTreeMutationRecord(e,[],o,null,null)}Ji!==0&&n!==null&&rangesAfterInsert(t,indexOf(n),a);let s=n===null?t.last:n.prev,c=t.doc,l=!!(t.flags&1);if(o===null)insertOne(e,t,n,c,l);else{let e=a>1&&n!==null?suspendChildList(t):0;for(let e=0;e<o.length;e++)insertOne(o[e],t,n,c,l);resumeChildList(t,e)}ra!==0&&slotsAfterInsert(t,o===null?e:null,o),!r&&Hi!==0&&queueTreeMutationRecord(t,o===null?[e]:o,[],s,n),childrenChanged(t),c[K]++,ji&&flushCEReactions()}function insertOne(e,t,n,r,i){(e.parent!==null||e.doc!==r)&&adopt(e,r),link(e,t,n),i&&connectSubtree(e,r)}function connectSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags|=1,n.type===1&&(n.id!==``&&t._idAdd(n),n.flags&4&&n.node._connectedSteps(),n.flags&512&&connectSubtree(n.node[U][M],t))}function connectDetachedChildren(e){let t=e.node;for(let n=e.first;n!==null;n=n.next)connectSubtree(n,t);t[K]++}function disconnectSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&=-2,n.type===1&&(n.id!==``&&t._idRemove(n),t[A]===n&&(t[A]=null),n.flags&4&&n.node._disconnectedSteps(),n.flags&512&&disconnectSubtree(n.node[U][M],t))}function childrenChanged(e){e.flags&16&&e.node._childrenChangedSteps()}function preRemove(e,t){if(e.parent!==t)throw new DOMException(`The node to be removed is not a child of this node.`,`NotFoundError`);return remove(e,!1),e}function remove(e,t){let n=e.parent,r=n.doc;Ji!==0&&rangesBeforeRemove(e,n,indexOf(e)),Yi!==0&&iteratorsBeforeRemove(e);let i=e.prev,a=e.next;unlink(e),ra!==0&&slotsAfterRemove(e,n);let o=!!(e.flags&1);o&&disconnectSubtree(e,r),Hi!==0&&(addTransientObservers(n,e),t||queueTreeMutationRecord(n,[],[e],i,a)),childrenChanged(n),r[K]++,r[Pt]!==null&&dropDerivedCaches(r),ji&&o&&flushCEReactions()}function shadowIncludingRoot(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[j];if(e===null)break;t=treeRoot(e[M])}return t}function move(e,t,n){if(shadowIncludingRoot(t)!==shadowIncludingRoot(e))throw hierarchyError$1(`The new parent is not in the same shadow-including tree as the node to move.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The node to move is an ancestor of the new parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let r=e.type;if(r!==1&&!isCharacterData$1(r))throw hierarchyError$1(`Only elements and character data nodes can be moved.`);if(t.type===9){if(r===3)throw hierarchyError$1(`Nodes of this type cannot be moved into a document.`);if(r===1&&(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n))))throw hierarchyError$1(`A document can have only one document element.`)}let i=e.parent,a=t.doc;Ji!==0&&rangesBeforeRemove(e,i,indexOf(e)),Yi!==0&&iteratorsBeforeRemove(e);let o=e.prev,s=e.next;unlink(e),ra!==0&&slotsAfterRemove(e,i),Hi!==0&&addTransientObservers(i,e),Ji!==0&&n!==null&&rangesAfterInsert(t,indexOf(n),1);let c=n===null?t.last:n.prev;link(e,t,n),ra!==0&&slotsAfterInsert(t,e,null);for(let t=e;t!==null;t=nextInTree(t,e))t.type===1&&t.flags&4&&t.node._movingSteps(t===e,i);Hi!==0&&(queueTreeMutationRecord(i,[],[e],o,s),queueTreeMutationRecord(t,[e],[],c,n)),childrenChanged(i),t!==i&&childrenChanged(t),a[K]++,ji&&flushCEReactions()}function replace(e,t,n){let r=n.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(t,n))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(e.parent!==n)throw new DOMException(`The node to be replaced is not a child of this node.`,`NotFoundError`);let i=t.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(t,n,null,e);let a=e.next;a===t&&(a=t.next);let o=e.prev;o===t&&(o=t.prev),(t.parent!==null||t.doc!==n.doc)&&adopt(t,n.doc);let s=[];e.parent!==null&&(s=[e],remove(e,!0));let c;if(t.type===11){c=[];for(let e=t.first;e!==null;e=e.next)c.push(e)}else c=[t];return insert(t,n,a,!0),Hi!==0&&queueTreeMutationRecord(n,c,s,o,a),e}function replaceAll(e,t){let n=t.first;if(n===null){e!==null&&insert(e,t,null,!1);return}let r=[];for(let e=n;e!==null;e=e.next)r.push(e);let i=[];if(e!==null){if(e.type===11)for(let t=e.first;t!==null;t=t.next)i.push(t);else i=[e]}let a=suspendChildList(t);for(let e=0;e<r.length;e++)remove(r[e],!0);e!==null&&insert(e,t,null,!0),resumeChildList(t,a),Hi!==0&&(i.length!==0||r.length!==0)&&queueTreeMutationRecord(t,i,r,null,null)}function adopt(e,t){let n=e.doc;if(e.parent!==null&&remove(e,!1),n!==t){t[K]<=n[K]&&(t[K]=n[K]+1);let r=t[N];for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&r?n.flags|=2:n.flags&=-3;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[M].doc=t)}n.flags&512&&adoptShadowTree(n.node[U][M],t)}Ji!==0&&rangesAdopt(e,n),runAdoptingSteps(e,n)}}function runAdoptingSteps(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&4096&&n.node._adoptingSteps(t),n.flags&512&&runAdoptingSteps(n.node[U][M],t)}function adoptShadowTree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&t[N]?n.flags|=2:n.flags&=-3;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[M].doc=t)}n.flags&512&&adoptShadowTree(n.node[U][M],t)}}function appendDetached(e,t){link(e,t,null)}function insertDetached(e,t,n){link(e,t,n)}function cloneNode(e,t,n){let r=cloneTree(e,t,n);return ji&&flushCEReactions(),r}function cloneTree(e,t,n){let r=cloneOne(e,t,n);if(n){for(let n=e.first;n!==null;n=n.next)appendDetached(cloneTree(n,r.type===9?r.node:t,!0),r);r.type===9&&r.first!==null&&connectDetachedChildren(r)}if(e.flags&512){let n=e.node[U];if(n[at]){let e=r.node.attachShadow({mode:n[Mn],clonable:!0,serializable:n[Tr],delegatesFocus:n[Ot],slotAssignment:n[jr]});e[Tt]=n[Tt];for(let r=n[M].first;r!==null;r=r.next)appendDetached(cloneTree(r,t,!0),e[M])}}return r}function cloneOne(e,t,n){switch(e.type){case 1:{let r=Pi?createCloneElementImpl(t,e):createElementImpl(t,e.name,e.ns,e.prefix),i=e.attrs;if(i!==null){let t=Array(i.length);for(let e=0;e<i.length;e++){let n=i[e];t[e]=new AttrRecord(n.localName,n.value,n.ns,n.prefix)}r.attrs=t,r.id=e.id,r.flags|=e.flags&499776}return e.node._cloningSteps(r.node,n),r}case 3:return t.createTextNode(e.data)[M];case 4:return new e.node.constructor(e.data,t)[M];case 8:return t.createComment(e.data)[M];case 7:return t.createProcessingInstruction(e.name,e.data)[M];case 11:return t.createDocumentFragment()[M];case 10:{let n=e.node;return t.implementation.createDocumentType(n.name,n.publicId,n.systemId)[M]}case 9:return e.node._cloneDocument()[M];case 2:{let n=t.createAttributeNS(e.ns,e.prefix===null?e.name:e.prefix+`:`+e.name);return n.value=e.data,n[M]}}throw new DOMException(`Cannot clone this node.`,`NotSupportedError`)}function isEqualNode(e,t){if(e===t)return!0;if(e.type!==t.type)return!1;switch(e.type){case 10:{let n=e.node,r=t.node;if(n.name!==r.name||n.publicId!==r.publicId||n.systemId!==r.systemId)return!1;break}case 1:{if(e.ns!==t.ns||e.prefix!==t.prefix||e.name!==t.name)return!1;let n=e.attrs??[],r=t.attrs??[];if(n.length!==r.length)return!1;outer:for(let e=0;e<n.length;e++){let t=n[e];for(let e=0;e<r.length;e++){let n=r[e];if(t.ns===n.ns&&t.localName===n.localName){if(t.value!==n.value)return!1;continue outer}}return!1}break}case 2:if(e.ns!==t.ns||e.name!==t.name||e.data!==t.data)return!1;break;case 7:if(e.name!==t.name||e.data!==t.data)return!1;break;case 3:case 4:case 8:if(e.data!==t.data)return!1}if(e.childCount!==t.childCount)return!1;for(let n=e.first,r=t.first;n!==null&&r!==null;n=n.next,r=r.next)if(!isEqualNode(n,r))return!1;return!0}function replaceData(e,t,n,r){let i=e.data,a=i.length;if(t>a)throw new DOMException(`The offset ${t} is greater than the node's length (${a}).`,`IndexSizeError`);t+n>a&&(n=a-t),Hi!==0&&queueCharacterDataMutationRecord(e,i),e.data=t===0&&n===a?r:i.slice(0,t)+r+i.slice(t+n),Ji!==0&&rangesReplaceData(e,t,n,r.length);let o=e.parent;o!==null&&o.flags&16&&o.node._childrenChangedSteps(),e.doc[K]++}function splitText(e,t){let n=e.data.length;if(t>n)throw new DOMException(`The offset ${t} is larger than the Text node's length.`,`IndexSizeError`);let r=n-t,i=e.data.slice(t),a=e.doc.createTextNode(i)[M],o=e.parent;return o!==null&&(insert(a,o,e.next,!1),Ji!==0&&rangesSplitText(e,a,t,o)),replaceData(e,t,r,``),a}function quote(e,t){let n=e.length>t?e.slice(0,t)+`…`:e;return JSON.stringify(n)}function ctorName(e){return e.node.constructor?.name??`Node`}function inspectNode(e,t,n,r){switch(e.type){case 1:{let t=e.prefix===null?e.name:e.prefix+`:`+e.name,n=ctorName(e)+` <`+t,r=e.attrs;if(r!==null)for(let e=0;e<r.length;e++)n+=` `+r[e].name+`=`+quote(r[e].value,40);return n+(e.first===null?` />`:`>`)}case 3:return`#text `+quote(e.data,60);case 4:return`#cdata-section `+quote(e.data,60);case 8:return`#comment `+quote(e.data,60);case 7:return`ProcessingInstruction <?`+e.name+` `+e.data.slice(0,60)+`?>`;case 9:return`#document `+quote(e.node.URL??``,80);case 10:return`<!DOCTYPE `+e.name+`>`;case 11:return e.flags&32?`#shadow-root (`+e.node.mode+`)`:`#document-fragment (`+e.childCount+(e.childCount===1?` child)`:` children)`);case 2:return`Attr `+(e.prefix===null?e.name:e.prefix+`:`+e.name)+`=`+quote(e.node.value,40)}return ctorName(e)}var Node=class extends EventTarget{static ELEMENT_NODE=1;static ATTRIBUTE_NODE=2;static TEXT_NODE=3;static CDATA_SECTION_NODE=4;static ENTITY_REFERENCE_NODE=5;static ENTITY_NODE=6;static PROCESSING_INSTRUCTION_NODE=7;static COMMENT_NODE=8;static DOCUMENT_NODE=9;static DOCUMENT_TYPE_NODE=10;static DOCUMENT_FRAGMENT_NODE=11;static NOTATION_NODE=12;static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;[M];constructor(e,t){if(t===void 0)throw TypeError(`Illegal constructor`);super(),this[M]=new NodeImpl(this,e,t??this)}get nodeType(){return this[M].type}get nodeName(){let e=this[M];switch(e.type){case 1:return htmlUppercasedQualifiedName(e);case 3:return`#text`;case 8:return`#comment`;case 2:return e.prefix===null?e.name:e.prefix+`:`+e.name;case 4:return`#cdata-section`;case 9:return`#document`;case 11:return`#document-fragment`;default:return e.name}}get baseURI(){return this[M].doc.baseURI}get isConnected(){return!!(this[M].flags&1)}get ownerDocument(){let e=this[M];return e.type===9?null:e.doc}getRootNode(e){let t=treeRoot(this[M]);if(e?.composed)for(;t.flags&32;){let e=t.node[j];t=treeRoot(e[M])}return t.node}get parentNode(){let e=this[M].parent;return e===null?null:e.node}get parentElement(){let e=this[M].parent;return e!==null&&e.type===1?e.node:null}hasChildNodes(){return this[M].first!==null}get childNodes(){return this[et]??=Ri._live(this[M])}get firstChild(){let e=this[M].first;return e===null?null:e.node}get lastChild(){let e=this[M].last;return e===null?null:e.node}get previousSibling(){let e=this[M].prev;return e===null?null:e.node}get nextSibling(){let e=this[M].next;return e===null?null:e.node}get nodeValue(){let e=this[M];switch(e.type){case 2:return attrValue(this);case 3:case 4:case 7:case 8:return e.data;default:return null}}set nodeValue(e){let t=this[M];switch(t.type){case 2:setAttrValue(this,e==null?``:String(e));return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,e==null?``:String(e));return}}get textContent(){let e=this[M];switch(e.type){case 1:case 11:return descendantTextContent(e);case 3:case 4:case 7:case 8:return e.data;case 2:return attrValue(this);default:return null}}set textContent(e){let t=this[M],n=e==null?``:String(e);switch(t.type){case 1:case 11:replaceAll(n===``?null:t.doc.createTextNode(n)[M],t);return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,n);return;case 2:setAttrValue(this,n);return}}normalize(){let e=this[M],t=e.first;for(;t!==null;){if(t.type!==3){t=nextInTree(t,e);continue}let n=t.data.length;if(n===0){let n=nextSkippingSelf(t,e);remove(t,!1),t=n;continue}let r=t.next;if(r===null||r.type!==3){t=nextInTree(t,e);continue}let i=``;for(let e=r;e!==null&&e.type===3;e=e.next)i+=e.data;replaceData(t,n,0,i);let a=r;for(;a!==null&&a.type===3;)Ji!==0&&rangesNormalizeMerge(t,a,n),n+=a.data.length,a=a.next;for(;r!==null&&r.type===3;){let e=r.next;remove(r,!1),r=e}t=nextInTree(t,e)}}cloneNode(e=!1){if(this[M].flags&32)throw new DOMException(`Shadow roots cannot be cloned.`,`NotSupportedError`);return cloneNode(this[M],this[M].doc,e).node}isEqualNode(e){return e!==null&&isEqualNode(this[M],e[M])}isSameNode(e){return this===e}compareDocumentPosition(e){if(this===e)return 0;let t=e[M],n=this[M],r=null,i=null;if(t.type===2&&(r=t,t=ownerElementImpl(t)),n.type===2&&(i=n,n=ownerElementImpl(n),r!==null&&t!==null&&n===t))for(let e of n.attrs??[]){if(e.attr?.[M]===r)return 34;if(e.attr?.[M]===i)return 36}return t===null||n===null||treeRoot(t)!==treeRoot(n)?33|(stableOrder(t??r,n??i)?2:4):r===null&&isAncestor(t,n)||i!==null&&t===n?10:i===null&&isAncestor(n,t)||r!==null&&t===n?20:precedes(t,n)?2:4}contains(e){if(e===null)return!1;let t=this[M];for(let n=e[M];n!==null;n=n.parent)if(n===t)return!0;return!1}lookupPrefix(e){if(e==null||e===``)return null;let t=namespaceContextElement(this[M]);return t===null?null:locatePrefix(t,String(e))}lookupNamespaceURI(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[M],t)}isDefaultNamespace(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[M],null)===t}insertBefore(e,t){return preInsert(e[M],this[M],t===null?null:t[M]),e}appendChild(e){return preInsert(e[M],this[M],null),e}replaceChild(e,t){return replace(t[M],e[M],this[M]),t}removeChild(e){return preRemove(e[M],this[M]),e}_getTheParent(e){return nodeGetTheParent(this,e)}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return inspectNode(this[M],e,t,n)}_replaceAll(e){replaceAll(e===null?null:e[M],this[M])}};for(let e of Object.getOwnPropertyNames(Node))/^[A-Z_]+$/.test(e)&&Object.defineProperty(Node.prototype,e,{value:Node[e],enumerable:!0});function nextSkippingSelf(e,t){let n=e;for(;n!==null&&n!==t;){if(n.next!==null)return n.next;n=n.parent}return null}function namespaceContextElement(e){switch(e.type){case 1:return e;case 9:for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t;return null;case 10:case 11:return null;case 2:return ownerElementImpl(e);default:{let t=e.parent;return t!==null&&t.type===1?t:null}}}function locatePrefix(e,t){for(let n=e;n!==null;){if(n.ns===t&&n.prefix!==null)return n.prefix;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.prefix===`xmlns`&&r.value===t)return r.localName}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function locateNamespace(e,t){let n=namespaceContextElement(e);for(;n!==null;){if(t===`xml`)return S;if(t===`xmlns`)return ce;if(n.ns!==null&&n.prefix===t)return n.ns;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.ns===`http://www.w3.org/2000/xmlns/`&&(r.prefix===`xmlns`&&r.localName===t||t===null&&r.prefix===null&&r.localName===`xmlns`))return r.value===``?null:r.value}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function ownerElementImpl(e){let t=e.node.ownerElement;return t===null?null:t[M]}function isAncestor(e,t){for(let n=t.parent;n!==null;n=n.parent)if(n===e)return!0;return!1}function precedes(e,t){let n=[];for(let t=e;t!==null;t=t.parent)n.push(t);let r=[];for(let e=t;e!==null;e=e.parent)r.push(e);let i=n.length-1,a=r.length-1;for(;i>0&&a>0&&n[i-1]===r[a-1];)i--,a--;let o=n[i-1],s=r[a-1];for(let e=o.next;e!==null;e=e.next)if(e===s)return!0;return!1}const la=/* @__PURE__ */ new WeakMap;let ua=0;function stableOrder(e,t){let n=la.get(e);n===void 0&&la.set(e,n=ua++);let r=la.get(t);return r===void 0&&la.set(t,r=ua++),n<r}function descendantTextContent(e){let t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}function attrValue(e){let t=e[ar];return t===null?e[M].data:t.value}function setAttrValue(e,t){let n=e[ar],r=e[z];n===null||r===null?e[M].data=t:changeAttribute(r[M],n,t)}const da=/* @__PURE__ */ new Map;function htmlUppercasedQualifiedName(e){if(e.prefix===null){if(!(e.flags&2))return e.name;let t=da.get(e.name);return t===void 0&&(da.size>=1024&&da.clear(),da.set(e.name,t=asciiUppercase(e.name))),t}let t=e.prefix+`:`+e.name;return e.flags&2?asciiUppercase(t):t}function asciiUppercase(e){let t=``;for(let n=0;n<e.length;n++)if(e.charCodeAt(n)>=128){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=97&&r<=122?String.fromCharCode(r-32):e[n]}return t}return e.toUpperCase()}var Token=class{type;value;num;isInt;flag;start;constructor(e,t,n){this.type=e,this.value=t,this.num=0,this.isInt=!1,this.flag=!1,this.start=n}};function isDigit$1(e){return e>=48&&e<=57}__name(isDigit$1,`isDigit`);function isHexDigit$1(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}__name(isHexDigit$1,`isHexDigit`);function hexValue$1(e){return e<=57?e-48:e<=70?e-65+10:e-97+10}__name(hexValue$1,`hexValue`);function isIdentStart$1(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e>=128||e===0}__name(isIdentStart$1,`isIdentStart`);function isIdentChar$1(e){return isIdentStart$1(e)||isDigit$1(e)||e===45}__name(isIdentChar$1,`isIdentChar`);function isNewline$1(e){return e===10||e===13||e===12}__name(isNewline$1,`isNewline`);function isWhitespace$1(e){return e===32||e===9||isNewline$1(e)}__name(isWhitespace$1,`isWhitespace`);function isNonPrintable$1(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}__name(isNonPrintable$1,`isNonPrintable`);var Tokenizer$1=class{static{__name(this,`Tokenizer`)}src;pos;len;constructor(e){this.src=e,this.pos=0,this.len=e.length}code(e){return e>=this.len?-1:this.src.charCodeAt(e)}validEscape(e){return this.code(e)===92&&!isNewline$1(this.code(e+1))}startsIdent(e){let t=this.code(e);if(t===45){let t=this.code(e+1);return isIdentStart$1(t)||t===45||this.validEscape(e+1)}return isIdentStart$1(t)?!0:this.validEscape(e)}startsNumber(e){let t=this.code(e);if(t===43||t===45){let t=this.code(e+1);return isDigit$1(t)?!0:t===46&&isDigit$1(this.code(e+2))}return isDigit$1(t===46?this.code(e+1):t)}consumeEscape(){let e=this.code(this.pos);if(e===-1)return`�`;if(isHexDigit$1(e)){let e=0,t=0;for(;t<6&&isHexDigit$1(this.code(this.pos));)e=e*16+hexValue$1(this.code(this.pos)),this.pos++,t++;let n=this.code(this.pos);return n===13&&this.code(this.pos+1)===10?this.pos+=2:isWhitespace$1(n)&&this.pos++,e===0||e>=55296&&e<=57343||e>1114111?`�`:String.fromCodePoint(e)}if(this.pos++,e===0)return`�`;if(e>=55296&&e<=56319){let e=this.code(this.pos);if(e>=56320&&e<=57343)return this.pos++,this.src.slice(this.pos-2,this.pos)}return String.fromCharCode(e)}consumeName(){let e=``,t=this.pos,n=t;for(;;){let t=this.code(this.pos);if(t!==-1&&t!==0&&isIdentChar$1(t))this.pos++;else if(this.validEscape(this.pos))e+=this.src.slice(n,this.pos),this.pos++,e+=this.consumeEscape(),n=this.pos;else if(t===0)e+=this.src.slice(n,this.pos)+`�`,this.pos++,n=this.pos;else break}return n===t?this.src.slice(t,this.pos):e+this.src.slice(n,this.pos)}consumeNumber(e){let t=this.pos,n=!0,r=this.code(this.pos);for((r===43||r===45)&&(e.flag=!0,this.pos++);isDigit$1(this.code(this.pos));)this.pos++;if(this.code(this.pos)===46&&isDigit$1(this.code(this.pos+1)))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;if(r=this.code(this.pos),r===69||r===101){let e=this.code(this.pos+1);if(isDigit$1(e))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;else if((e===43||e===45)&&isDigit$1(this.code(this.pos+2)))for(n=!1,this.pos+=3;isDigit$1(this.code(this.pos));)this.pos++}e.num=Number(this.src.slice(t,this.pos)),e.isInt=n}consumeString(e,t){let n=``,r=this.pos;for(;;){let i=this.code(this.pos);if(i===e||i===-1)return n+=this.src.slice(r,this.pos),i!==-1&&this.pos++,new Token(5,n,t);if(isNewline$1(i))return new Token(6,``,t);if(i===92){n+=this.src.slice(r,this.pos);let e=this.code(this.pos+1);e===-1?this.pos++:isNewline$1(e)?this.pos+=e===13&&this.code(this.pos+2)===10?3:2:(this.pos++,n+=this.consumeEscape()),r=this.pos}else i===0?(n+=this.src.slice(r,this.pos)+`�`,this.pos++,r=this.pos):this.pos++}}consumeBadUrl(e){for(;;){let e=this.code(this.pos);if(e===-1)break;if(e===41){this.pos++;break}this.validEscape(this.pos)?(this.pos++,this.consumeEscape()):this.pos++}return new Token(8,``,e)}consumeUrl(e){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let t=``;for(;;){let n=this.code(this.pos);if(n===41||n===-1)return n!==-1&&this.pos++,new Token(7,t,e);if(isWhitespace$1(n)){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let n=this.code(this.pos);return n===41||n===-1?(n!==-1&&this.pos++,new Token(7,t,e)):this.consumeBadUrl(e)}if(n===34||n===39||n===40||isNonPrintable$1(n))return this.consumeBadUrl(e);if(n===92){if(this.validEscape(this.pos))this.pos++,t+=this.consumeEscape();else return this.consumeBadUrl(e)}else t+=n===0?`�`:this.src[this.pos],this.pos++}}consumeIdentLike(e){let t=this.consumeName();if(this.code(this.pos)===40){if(this.pos++,t.length===3&&asciiLower$1(t)===`url`){let n=this.pos;for(;isWhitespace$1(this.code(n))&&isWhitespace$1(this.code(n+1));)n++;let r=this.code(n),i=isWhitespace$1(r)?this.code(n+1):r;return i===34||i===39?(this.pos=n,new Token(2,t,e)):this.consumeUrl(e)}return new Token(2,t,e)}return new Token(1,t,e)}consumeNumeric(e){let t=new Token(10,``,e);return this.consumeNumber(t),this.startsIdent(this.pos)?(t.type=12,t.value=this.consumeName()):this.code(this.pos)===37&&(this.pos++,t.type=11),t}next(){for(;this.code(this.pos)===47&&this.code(this.pos+1)===42;){let e=this.src.indexOf(`*/`,this.pos+2);this.pos=e===-1?this.len:e+2}let e=this.pos,t=this.code(this.pos);if(t===-1)return new Token(0,``,e);if(isWhitespace$1(t)){for(this.pos++;isWhitespace$1(this.code(this.pos));)this.pos++;return new Token(13,` `,e)}switch(t){case 34:case 39:return this.pos++,this.consumeString(t,e);case 35:{let t=this.code(this.pos+1);if(t!==-1&&isIdentChar$1(t)||t===0||this.validEscape(this.pos+1)){this.pos++;let t=new Token(4,``,e);return t.flag=this.startsIdent(this.pos),t.value=this.consumeName(),t}return this.pos++,new Token(9,`#`,e)}case 40:return this.pos++,new Token(21,`(`,e);case 41:return this.pos++,new Token(22,`)`,e);case 43:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`+`,e));case 44:return this.pos++,new Token(18,`,`,e);case 45:return this.startsNumber(this.pos)?this.consumeNumeric(e):this.code(this.pos+1)===45&&this.code(this.pos+2)===62?(this.pos+=3,new Token(15,`-->`,e)):this.startsIdent(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`-`,e));case 46:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`.`,e));case 58:return this.pos++,new Token(16,`:`,e);case 59:return this.pos++,new Token(17,`;`,e);case 60:return this.code(this.pos+1)===33&&this.code(this.pos+2)===45&&this.code(this.pos+3)===45?(this.pos+=4,new Token(14,`<!--`,e)):(this.pos++,new Token(9,`<`,e));case 64:return this.startsIdent(this.pos+1)?(this.pos++,new Token(3,this.consumeName(),e)):(this.pos++,new Token(9,`@`,e));case 91:return this.pos++,new Token(19,`[`,e);case 92:return this.validEscape(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`\\`,e));case 93:return this.pos++,new Token(20,`]`,e);case 123:return this.pos++,new Token(23,`{`,e);case 125:return this.pos++,new Token(24,`}`,e)}if(isDigit$1(t))return this.consumeNumeric(e);if(isIdentStart$1(t)||t===0)return this.consumeIdentLike(e);if(this.pos++,t>=55296&&t<=56319){let t=this.code(this.pos);if(t>=56320&&t<=57343)return this.pos++,new Token(9,this.src.slice(this.pos-2,this.pos),e)}return new Token(9,this.src[e],e)}};function tokenize$1(e){let t=new Tokenizer$1(e),n=[];for(;;){let e=t.next();if(n.push(e),e.type===0)break}return n}__name(tokenize$1,`tokenize`);function asciiLower$1(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)return e.toLowerCase()}return e}__name(asciiLower$1,`asciiLower`);var Simple=class{kind;name;nsKind;nsPrefix;op;value;caseFlag;pseudo;a;b;list;args;constructor(e,t){this.kind=e,this.name=t,this.nsKind=0,this.nsPrefix=``,this.op=0,this.value=``,this.caseFlag=0,this.pseudo=0,this.a=0,this.b=0,this.list=null,this.args=[]}},Compound=class{simples;pseudoElementIndex;constructor(){this.simples=[],this.pseudoElementIndex=-1}},Complex=class{compounds;combinators;leading;text;invalid;constructor(){this.compounds=[],this.combinators=[],this.leading=0,this.text=``,this.invalid=!1}},SelectorList=class{items;constructor(){this.items=[]}};function allowedAfterPseudoElement(e,t){return e===3?!isStructural(t):e===2?!1:t===37||t===38||t===39||t===41||t===40||t===1||t===2||t===3}function pseudoClassId(e){switch(e){case`first-child`:return 20;case`last-child`:return 21;case`only-child`:return 22;case`first-of-type`:return 23;case`last-of-type`:return 24;case`only-of-type`:return 25;case`empty`:return 26;case`root`:return 27;case`scope`:return 28;case`host`:return 29;case`link`:return 30;case`any-link`:return 31;case`visited`:return 32;case`target`:return 34;case`target-within`:return 35;case`defined`:return 36;case`hover`:return 37;case`active`:return 38;case`focus`:return 39;case`focus-within`:return 40;case`focus-visible`:return 41;case`checked`:return 50;case`indeterminate`:return 51;case`default`:return 52;case`disabled`:return 53;case`enabled`:return 54;case`required`:return 55;case`optional`:return 56;case`read-only`:return 57;case`read-write`:return 58;case`placeholder-shown`:return 59;case`valid`:return 60;case`invalid`:return 61;case`in-range`:return 62;case`out-of-range`:return 63;case`user-valid`:return 64;case`user-invalid`:return 65;case`autofill`:return 66;case`-webkit-autofill`:return 66;case`open`:return 70;case`popover-open`:return 72;case`modal`:return 73;case`fullscreen`:return 74;case`picture-in-picture`:return 75;case`playing`:return 76;case`paused`:return 77;case`muted`:return 78;case`seeking`:return 79;case`buffering`:return 80;case`stalled`:return 81;case`volume-locked`:return 82;case`current`:return 83;case`past`:return 84;case`future`:return 85;case`has-slotted`:return 86;case`target-current`:return 87;case`heading`:return 88}return 0}function functionalPseudoClassId(e){switch(e){case`is`:return 1;case`matches`:return 1;case`-webkit-any`:return 1;case`where`:return 2;case`not`:return 3;case`has`:return 4;case`nth-child`:return 5;case`nth-last-child`:return 6;case`nth-of-type`:return 7;case`nth-last-of-type`:return 8;case`host`:return 9;case`host-context`:return 10;case`lang`:return 11;case`dir`:return 12;case`state`:return 13;case`current`:return 83;case`heading`:return 88}return 0}function isStructural(e){return e>=20&&e<=25||e===26||e===27||e===4||e>=5&&e<=8}function isKnownPseudoElement(e){switch(e){case`before`:case`after`:case`first-line`:case`first-letter`:case`marker`:case`placeholder`:case`selection`:case`backdrop`:case`file-selector-button`:case`target-text`:case`spelling-error`:case`grammar-error`:case`cue`:case`cue-region`:case`details-content`:case`checkmark`:case`picker-icon`:case`scroll-marker`:case`scroll-marker-group`:case`column`:case`view-transition`:return!0}return e.startsWith(`-webkit-`)||e.startsWith(`-moz-`)}function isKnownFunctionalPseudoElement(e){switch(e){case`slotted`:return 2;case`part`:return 3;case`highlight`:case`picker`:case`scroll-button`:case`cue`:case`cue-region`:case`view-transition-group`:case`view-transition-image-pair`:case`view-transition-old`:case`view-transition-new`:return 4}return 0}function isLegacyPseudoElement(e){return e===`before`||e===`after`||e===`first-line`||e===`first-letter`}var SelectorParser=class{src;toks;i;error;constructor(e){this.src=e,this.toks=tokenize$1(e),this.i=0,this.error=``}fail(e){this.error===``&&(this.error=e)}peek(){return this.toks[this.i]}peekType(){return this.toks[this.i].type}isDelim(e){let t=this.toks[this.i];return t.type===9&&t.value===e}isDelimAt(e,t){let n=this.toks[e];return n.type===9&&n.value===t}skipWs(){for(;this.toks[this.i].type===13;)this.i++}expectClose(e){let t=this.toks[this.i].type;return t===e?(this.i++,!0):t===0||(this.fail(`expected closing bracket`),!1)}parseSelectorList(){let e=this.parseComplexList(0,!1);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseRelativeSelectorList(){let e=this.parseComplexList(3,!0);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseComplexList(e,t){let n=new SelectorList;for(;;){this.skipWs();let r=this.parseComplex(e,t);if(r===null)return null;if(n.items.push(r),this.skipWs(),this.peekType()===18)this.i++;else break}return n}parseForgivingList(e){let t=new SelectorList;for(;;){this.skipWs();let n=this.peekType();if(n===22||n===0){if(t.items.length!==0){let e=new Complex;e.invalid=!0,t.items.push(e)}break}let r=this.i,i=this.error,a=this.parseComplex(e,!1);this.skipWs();let o=this.peekType();if(a!==null&&(o===18||o===22||o===0))t.items.push(a);else{if(this.error=i,this.i=r,!this.skipToTopLevelCommaOrClose())return this.fail(`unterminated block in forgiving selector list`),t;let e=new Complex;e.invalid=!0,e.text=trimWs(this.src.slice(this.toks[r].start,this.peek().start)),t.items.push(e)}if(this.peekType()===18)this.i++;else break}return t}skipToTopLevelCommaOrClose(){let e=[];for(;;){let t=this.peekType();if(t===0)return e.length===0;if(e.length===0&&(t===18||t===22))return!0;t===2||t===21?e.push(22):t===19?e.push(20):t===23?e.push(24):e.length!==0&&t===e[e.length-1]&&e.pop(),this.i++}}parseCombinator(){let e=!1;for(;this.peekType()===13;)this.i++,e=!0;let t=this.peek();if(t.type===9){if(t.value===`>`)return this.i++,this.skipWs(),2;if(t.value===`+`)return this.i++,this.skipWs(),3;if(t.value===`~`)return this.i++,this.skipWs(),4}return+!!e}parseComplex(e,t){let n=new Complex,r=this.peek().start;if(t){let e=this.parseCombinator();n.leading=e===0?1:e}for(;;){let t=this.parseCompound(e);if(t===null)return null;n.compounds.push(t);let r=this.i,i=this.parseCombinator(),a=this.peekType();if(i===0||a===18||a===22||a===0){if(i!==0&&i!==1)return this.fail(`dangling combinator`),null;this.i=r;break}if(t.pseudoElementIndex!==-1)return this.fail(`combinator after pseudo-element`),null;if(e&12)return this.fail(`expected a compound selector`),null;n.combinators.push(i)}let i=this.peek().start;return n.text=trimWs(this.src.slice(r,i)),n}parseTypeSelector(e){let t=this.peek(),n=0,r=``;if(t.type===9&&t.value===`|`){let e=this.toks[this.i+1];if(e.type===1||e.type===9&&e.value===`*`)n=2,this.i++;else return!1}else if((t.type===1||t.type===9&&t.value===`*`)&&this.isDelimAt(this.i+1,`|`)){let e=this.toks[this.i+2];(e.type===1||e.type===9&&e.value===`*`)&&(t.type===1?(n=3,r=t.value):n=1,this.i+=2)}let i=this.peek();if(i.type===1){let t=new Simple(1,i.value);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}if(i.type===9&&i.value===`*`){let t=new Simple(2,`*`);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}return n!==0&&this.fail(`expected a type selector after namespace prefix`),!1}parseCompound(e){let t=new Compound,n=!!(e&8);if(n||this.parseTypeSelector(t),this.error!==``)return null;for(;;){let r=this.peek(),i=t.pseudoElementIndex!==-1;if(n&&r.type!==16)break;if(r.type===4){if(i)break;if(!r.flag)return this.fail(`invalid id selector`),null;t.simples.push(new Simple(3,r.value)),this.i++}else if(r.type===9&&r.value===`.`){if(i)break;let e=this.toks[this.i+1];if(e.type!==1)return this.fail(`invalid class selector`),null;t.simples.push(new Simple(4,e.value)),this.i+=2}else if(r.type===19){if(i)break;this.i++;let e=this.parseAttribute();if(e===null)return null;t.simples.push(e)}else if(r.type===16){if(this.toks[this.i+1].type===16){if(this.i+=2,e&2)return this.fail(`pseudo-element not allowed here`),null;let n=this.parsePseudoElement(e);if(n===null)return null;if(t.pseudoElementIndex===-1)t.pseudoElementIndex=t.simples.length;else if(!this.chainablePseudoElement(t,n))return this.fail(`invalid pseudo-element chain`),null;t.simples.push(n)}else{this.i++;let n=this.parsePseudoClass(i?e|8:e);if(n===null)return null;if(n.kind===7){if(e&2||i)return this.fail(`pseudo-element not allowed here`),null;t.pseudoElementIndex=t.simples.length}else if(i&&!allowedAfterPseudoElement(this.lastPseudoElement(t),n.pseudo))return this.fail(`pseudo-class not allowed after pseudo-element`),null;t.simples.push(n)}}else break}return t.simples.length===0?(this.fail(`expected a selector`),null):t}lastPseudoElement(e){for(let t=e.simples.length-1;t>=0;t--){let n=e.simples[t];if(n.kind===7)return n.pseudo}return 0}chainablePseudoElement(e,t){let n=null;for(let t=e.simples.length-1;t>=0;t--){let r=e.simples[t];if(r.kind===7){n=r;break}}return n===null?!0:n.pseudo===3||n.pseudo===2?t.pseudo===1||t.pseudo===4:!1}parseAttribute(){this.skipWs();let e=new Simple(5,``),t=this.peek();t.type===9&&t.value===`|`&&this.toks[this.i+1].type===1?(e.nsKind=2,this.i++):t.type===9&&t.value===`*`&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1?(e.nsKind=1,this.i+=2):t.type===1&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1&&(e.nsKind=3,e.nsPrefix=t.value,this.i+=2);let n=this.peek();if(n.type!==1)return this.fail(`expected attribute name`),null;e.name=n.value,this.i++,this.skipWs();let r=this.peek();if(r.type===20||r.type===0)return r.type===20&&this.i++,e;if(r.type!==9)return this.fail(`expected attribute matcher`),null;let i=-1;if(r.value===`=`)i=1,this.i++;else if(this.isDelimAt(this.i+1,`=`)){switch(r.value){case`~`:i=2;break;case`|`:i=3;break;case`^`:i=4;break;case`$`:i=5;break;case`*`:i=6}i!==-1&&(this.i+=2)}if(i===-1)return this.fail(`invalid attribute matcher`),null;e.op=i,this.skipWs();let a=this.peek();if(a.type!==1&&a.type!==5)return this.fail(`expected attribute value`),null;e.value=a.value,this.i++,this.skipWs();let o=this.peek();if(o.type===1){let t=asciiLower$1(o.value);if(t===`i`)e.caseFlag=1;else if(t===`s`)e.caseFlag=2;else return this.fail(`invalid attribute modifier`),null;this.i++,this.skipWs()}return this.expectClose(20)?e:null}parsePseudoClass(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);this.i++;let n=pseudoClassId(e);if(n!==0){let t=new Simple(6,e);return t.pseudo=n,t}if(isLegacyPseudoElement(e)){let t=new Simple(7,e);return t.pseudo=1,t}return this.fail(`unknown pseudo-class :`+e),null}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=functionalPseudoClassId(n);if(r===0)return this.fail(`unknown pseudo-class :`+n+`()`),null;let i=new Simple(6,n);return i.pseudo=r,this.parsePseudoClassArgs(i,e)?i:null}return this.fail(`expected pseudo-class name`),null}parsePseudoClassArgs(e,t){let n=e.pseudo;if(n===1||n===2)return e.list=this.parseForgivingList(t|2),this.error===``&&this.expectClose(22);if(n===3){if(this.skipWs(),this.peekType()===22)return this.fail(`:not() requires an argument`),!1;let n=this.parseComplexList(t|2,!1);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===4){if(t&1)return this.fail(`:has() cannot be nested`),!1;if(this.skipWs(),this.peekType()===22)return this.fail(`:has() requires an argument`),!1;let n=this.parseComplexList(t|3,!0);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===5||n===6||n===7||n===8){if(this.skipWs(),!this.parseAnPlusB(e))return!1;this.clampAnb(e),this.skipWs();let r=this.peek();if((n===5||n===6)&&r.type===1&&asciiLower$1(r.value)===`of`){if(this.i++,this.peekType()!==13)return this.fail(`expected whitespace after 'of'`),!1;this.skipWs();let n=this.parseComplexList(t|2,!1);if(n===null)return!1;e.list=n,this.skipWs()}return this.expectClose(22)}if(n===9||n===10){this.skipWs();let n=this.parseComplexList(t|6,!1);return n===null?!1:n.items.length===1?(e.list=n,this.skipWs(),this.expectClose(22)):(this.fail(`expected a single compound selector`),!1)}if(n===11){for(;;){this.skipWs();let t=this.peek();if(t.type===1||t.type===5)e.args.push(t.value),this.i++;else return this.fail(`expected language range`),!1;if(this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}if(n===12||n===13){this.skipWs();let t=this.peek();return t.type===1?(e.args.push(n===12?asciiLower$1(t.value):t.value),this.i++,this.skipWs(),this.expectClose(22)):(this.fail(`expected identifier`),!1)}if(n===88){for(;;){this.skipWs();let t=this.peek();if(t.type!==10||!t.isInt)return this.fail(`expected heading level`),!1;if(e.args.push(String(t.num)),this.i++,this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}return n===83?(e.list=this.parseForgivingList(t|2),this.expectClose(22)):(this.fail(`unsupported functional pseudo-class`),!1)}parsePseudoElement(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);if(this.i++,!isKnownPseudoElement(e))return this.fail(`unknown pseudo-element ::`+e),null;let n=new Simple(7,e);return n.pseudo=1,n}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=isKnownFunctionalPseudoElement(n);if(r===0)return this.fail(`unknown pseudo-element ::`+n+`()`),null;let i=new Simple(7,n);if(i.pseudo=r,this.skipWs(),r===2){let t=this.parseComplexList(e|6,!1);if(t===null)return null;if(t.items.length!==1)return this.fail(`expected a single compound selector`),null;i.list=t}else{for(;this.peekType()===1;)i.args.push(this.peek().value),this.i++,this.skipWs();if(r===3&&i.args.length===0)return this.fail(`::part() requires an identifier`),null;if(this.peekType()!==22&&this.peekType()!==0){if(r===3)return this.fail(`invalid ::part() argument`),null;this.skipToTopLevelCommaOrClose()}}return this.skipWs(),this.expectClose(22)?i:null}return this.fail(`expected pseudo-element name`),null}parseAnPlusB(e){let t=this.peek();if(t.type===1){let n=asciiLower$1(t.value);if(n===`odd`)return e.a=2,e.b=1,this.i++,!0;if(n===`even`)return e.a=2,e.b=0,this.i++,!0}if(t.type===10)return t.isInt?(e.a=0,e.b=t.num,this.i++,!0):this.anbFail();let n=0,r=``;if(t.type===12){if(!t.isInt)return this.anbFail();let e=asciiLower$1(t.value);if(e.charCodeAt(0)!==110)return this.anbFail();n=t.num,r=e.slice(1),this.i++}else if(t.type===1){let e=asciiLower$1(t.value);if(e.charCodeAt(0)===110)n=1,r=e.slice(1);else if(e.charCodeAt(0)===45&&e.charCodeAt(1)===110)n=-1,r=e.slice(2);else return this.anbFail();this.i++}else if(t.type===9&&t.value===`+`){let e=this.toks[this.i+1];if(e.type!==1)return this.anbFail();let t=asciiLower$1(e.value);if(t.charCodeAt(0)!==110)return this.anbFail();n=1,r=t.slice(1),this.i+=2}else return this.anbFail();if(e.a=n,r===``){let t=this.i;this.skipWs();let n=this.peek();if(n.type===10&&n.isInt&&n.flag)return e.b=n.num,this.i++,!0;if(n.type===9&&(n.value===`+`||n.value===`-`)){this.i++,this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=n.value===`-`?-t.num:t.num,this.i++,!0):this.anbFail()}return this.i=t,e.b=0,!0}if(r===`-`){this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=-t.num,this.i++,!0):this.anbFail()}if(r.charCodeAt(0)===45&&r.length>1){let t=0;for(let e=1;e<r.length;e++){let n=r.charCodeAt(e);if(!isDigit$1(n))return this.anbFail();t=t*10+(n-48)}return e.b=-t,!0}return this.anbFail()}clampAnb(e){e.a>2147483647?e.a=2147483647:e.a<-2147483648&&(e.a=-2147483648),e.b>2147483647?e.b=2147483647:e.b<-2147483648&&(e.b=-2147483648)}anbFail(){return this.fail(`invalid An+B`),!1}};function trimWs(e){let t=0,n=e.length;for(;t<n&&isWhitespace$1(e.charCodeAt(t));)t++;for(;n>t&&isWhitespace$1(e.charCodeAt(n-1));)n--;return t===0&&n===e.length?e:e.slice(t,n)}function wrapperProp(e,t){return e.node[t]}const fa={hovered:null,active:null};function shadowHost(e){let t=wrapperProp(e,j);return t==null?null:t[M]}function parentOrHost$1(e){let t=e.parent;return t===null?null:t.flags&32?shadowHost(t):t}__name(parentOrHost$1,`parentOrHost`);function isShadowIncludingInclusiveAncestor$3(e,t){for(;t!==null;t=parentOrHost$1(t))if(t===e)return!0;return!1}__name(isShadowIncludingInclusiveAncestor$3,`isShadowIncludingInclusiveAncestor`);function hover(e){let t=fa.hovered;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function active(e){let t=fa.active;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function anyLink(e){return e.tag===Y.a||e.tag===Y.area?attr(e,`href`)!==null:e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`&&e.attrs!==null&&(attr(e,`href`)!==null||findAttributeByNamespace(e,`http://www.w3.org/1999/xlink`,`href`)!==null)}function never(e){return!1}function targetElement(e){let t=e.doc[G],n=t.indexOf(`#`);if(n===-1||n===t.length-1)return null;let r=t.slice(n+1);try{r=decodeURIComponent(r)}catch{}let i=e.doc,a=i._idLookup(r);if(a!==null)return a;let o=i[M];for(let e=o.first;e!==null;e=nextInTree(e,o))if(e.type===1&&e.tag===Y.a&&attr(e,`name`)===r)return e;return null}function target(e){return e.doc[G].indexOf(`#`)!==-1&&targetElement(e)===e}function targetWithin(e){if(e.doc[G].indexOf(`#`)===-1)return!1;let t=targetElement(e);return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function inputTypeName(e){let t=attr(e,`type`);if(t===null)return`text`;let n=asciiLowercase$1(t);switch(n){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`date`:case`month`:case`week`:case`time`:case`datetime-local`:case`number`:case`range`:case`color`:case`checkbox`:case`radio`:case`file`:case`submit`:case`image`:case`reset`:case`button`:return n}return`text`}function isHTML(e){return e.tag!==0}function controlValue$1(e){let t=wrapperProp(e,`value`);if(typeof t==`string`)return t;if(e.tag===Y.textarea){let t=``;for(let n=e.first;n!==null;n=n.next)n.type===3&&(t+=n.data);return t}return attr(e,`value`)??``}__name(controlValue$1,`controlValue`);function open(e){return(e.tag===Y.details||e.tag===Y.dialog)&&attr(e,`open`)!==null}function isMedia(e){return e.tag===Y.audio||e.tag===Y.video}function paused(e){return isMedia(e)&&wrapperProp(e,`paused`)!==!1}function playing(e){return isMedia(e)&&wrapperProp(e,`paused`)===!1}function muted(e){if(!isMedia(e))return!1;let t=wrapperProp(e,`muted`);return typeof t==`boolean`?t:attr(e,`muted`)!==null}function customState(e,t){let n=pa.of(e);return n!==null&&n.has(t)}const pa={of:e=>null};function elementLanguage(e){for(let t=e;t!==null;t=parentOrHost$1(t)){if(t.type!==1)continue;let e=t.attrs;if(e===null)continue;let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(i.ns===`http://www.w3.org/XML/1998/namespace`&&i.localName===`lang`)return i.value;(i.ns===null&&i.localName===`lang`&&t.flags&2||i.ns===null&&i.localName===`lang`&&t.tag!==0)&&(n=i.value)}if(n!==null)return n}return null}function extendedFilter(e,t){if(e===``)return t===``;if(t===``)return!1;let n=asciiLowercase$1(e).split(`-`),r=asciiLowercase$1(t).split(`-`);for(let e=0;e<r.length;e++)if(r[e].length>8||r[e].length===0)return!1;if(n[0]!==`*`&&n[0]!==r[0])return!1;let i=1,a=1;for(;i<n.length;)if(n[i]===`*`)i++;else{if(a>=r.length)return!1;if(n[i]===r[a])i++,a++;else{if(r[a].length===1)return!1;a++}}return!0}function matchesLang(e,t){let n=elementLanguage(e);if(n===null)return!1;for(let e=0;e<t.length;e++)if(extendedFilter(t[e],n))return!0;return!1}function strongDirection(e){return e>=65&&e<=90||e>=97&&e<=122?1:e<192?0:e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65278||e>=67584&&e<=69631||e>=124928&&e<=126975?2:e===215||e===247||e>=8192&&e<=11263||e>=12288&&e<=12351||e>=65024&&e<=65135?0:1}function textDirection(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n>65535&&t++;let r=strongDirection(n);if(r!==0)return r}return 0}function hasValidDir(e){let t=attr(e,`dir`);if(t===null)return!1;let n=asciiLowercase$1(t);return n===`ltr`||n===`rtl`||n===`auto`}function autoDirectionality(e){if(e.tag===Y.textarea||e.tag===Y.input&&usesValueForDirectionality(inputTypeName(e))){let t=textDirection(controlValue$1(e));return t===0?1:t}if(e.tag===Y.input)return 0;for(let t=e.first;t!==null;){if(t.type===1){if(t.tag===Y.bdi||t.tag===Y.script||t.tag===Y.style||t.tag===Y.textarea||hasValidDir(t)){t=nextSkippingChildren(t,e);continue}}else if(t.type===3){let e=textDirection(t.data);if(e!==0)return e}t=nextInTree(t,e)}return 0}function directionality(e){for(let t=e;t!==null&&t.type===1;){let e=isHTML(t)?attr(t,`dir`):null,n=e===null?null:asciiLowercase$1(e);if(n!==null&&n!==`ltr`&&n!==`rtl`&&n!==`auto`&&(n=t.tag===Y.bdi?`auto`:null),n!==null){let e=n;if(e===`ltr`)return 1;if(e===`rtl`)return 2;if(e===`auto`){let e=autoDirectionality(t);if(e!==0)return e;if(t.tag===Y.input||t.tag===Y.textarea)return 1}}else if(t.tag===Y.bdi){let e=autoDirectionality(t);return e===0?1:e}else if(t.tag===Y.input&&inputTypeName(t)===`tel`)return 1;let r=parentOrHost$1(t);if(r===null||r.type===9)break;t=r}return 1}function usesValueForDirectionality(e){switch(e){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`submit`:case`reset`:case`button`:return!0}return!1}const ma={hover,active,focus:never,"focus-within":never,"focus-visible":never,link:anyLink,"any-link":anyLink,visited:never,target,"target-within":targetWithin,defined:never,checked:never,indeterminate:never,default:never,disabled:never,enabled:never,required:never,optional:never,"read-only":never,"read-write":never,"placeholder-shown":never,valid:never,invalid:never,"in-range":never,"out-of-range":never,"user-valid":never,"user-invalid":never,autofill:never,"-webkit-autofill":never,open,"popover-open":never,modal:never,fullscreen:never,"picture-in-picture":never,playing,paused,muted,seeking:never,buffering:never,stalled:never,"volume-locked":never,current:never,past:never,future:never,"has-slotted":never,"target-current":never};function hash(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n^n>>>16)&4095}function tagHash(e){return hash(e,625341585)}function idHash(e){return hash(e,1821285621)}function classHash(e){return hash(e,461845907)}const ha=[];function elementTagHash(e){if(e.tag!==0&&e.flags&2){let t=ha[e.tag];return t===void 0?ha[e.tag]=tagHash(e.name):t}return tagHash(asciiLowercase$1(e.name))}let ga=/* @__PURE__ */ new Int32Array,_a=0;const va=[];function buildAncestorFilter(e){(++_a===2147483647||ga.length===0)&&(ga.length===0?ga=/* @__PURE__ */ new Int32Array(4096):ga.fill(0),_a=1);let t=_a,n=0;for(let r=e.parent;r!==null&&r.type===1;r=r.parent){let e=elementTagHash(r);if(ga[e]=t,va[n++]=e,r.id!==``){let e=idHash(r.id);ga[e]=t,va[n++]=e}if(r.attrs!==null){let e=classTokens(r);for(let r=0;r<e.length;r++){let i=classHash(e[r]);ga[i]=t,va[n++]=i}}}return va.length=n,va}function mayMatchAncestors(e,t,n,r){let i=_a;return e<0?!0:ga[e]===i?t<0?!0:ga[t]===i?n<0?!0:ga[n]===i?r<0||ga[r]===i:!1:!1:!1}const ya=/* @__PURE__ */ new Set(/* @__PURE__ */ `accept.accept-charset.align.alink.axis.bgcolor.charset.checked.clear.codetype.color.compact.declare.defer.dir.direction.disabled.enctype.face.frame.hreflang.http-equiv.lang.language.link.media.method.multiple.nohref.noresize.noshade.nowrap.readonly.rel.rev.rules.scope.scrolling.selected.shape.target.text.type.valign.valuetype.vlink`.split(`.`)),ba=/* @__PURE__ */ new Set([30,31,32,53,54,55,56,57,58,52,70]);var Test=class{op;name;lower;nsCheck;ns;attrOp;value;valueLower;valueCase;a;b;list;fn;args;memoEl;memoIdx;memoVersion;memoParent;memoCount;memoCountVersion;volatileTest;constructor(e){this.op=e,this.name=``,this.lower=``,this.nsCheck=!1,this.ns=null,this.attrOp=0,this.value=``,this.valueLower=``,this.valueCase=0,this.a=0,this.b=0,this.list=null,this.fn=null,this.args=xa,this.memoEl=null,this.memoIdx=0,this.memoVersion=-1,this.memoParent=null,this.memoCount=0,this.memoCountVersion=-1,this.volatileTest=!1}};const xa=[];var CComplex=class{comps;combs;last;leading;hasDomain;pseudoElement;specificity;text;fn;constructor(){this.comps=[],this.combs=[],this.last=0,this.leading=0,this.hasDomain=0,this.pseudoElement=``,this.specificity=0,this.text=``,this.fn=e=>{let t=complexFn(this,0);return this.fn=t,t(e)}}},CList=class{items;fn;constructor(){this.items=[],this.fn=e=>{let t=listFn(this);return this.fn=t,t(e)}}},CompileInfo=class{volatile;usesScope;nthTests;resolve;defaultNs;error;forgivingDropped;constructor(){this.volatile=!1,this.usesScope=!1,this.nthTests=[],this.resolve=null,this.defaultNs=void 0,this.error=``,this.forgivingDropped=!1}};function unpackSpecificity(e){return[Math.floor(e/1048576),Math.floor(e/1024)%1024,e%1024]}function listSpecificity(e){if(e===null)return 0;let t=0;for(let n=0;n<e.items.length;n++){if(e.items[n].invalid)continue;let r=complexSpecificity(e.items[n]);r>t&&(t=r)}return t}function complexSpecificity(e){let t=0;for(let n=0;n<e.compounds.length;n++)t+=compoundSpecificity(e.compounds[n]);return t}const Sa=1024;function compoundSpecificity(e){let t=0;for(let n=0;n<e.simples.length;n++){let r=e.simples[n];switch(r.kind){case 3:t+=1048576;break;case 4:case 5:t+=Sa;break;case 1:t+=1;break;case 2:break;case 7:t+=1+listSpecificity(r.list);break;case 6:switch(r.pseudo){case 2:break;case 1:case 3:case 4:case 83:t+=listSpecificity(r.list);break;case 5:case 6:case 9:case 10:t+=Sa+listSpecificity(r.list);break;default:t+=Sa}}}return t}function fail(e,t){e.error===``&&(e.error=t)}function resolvePrefix(e,t){return e.resolve===null?void 0:e.resolve(t)}function compileList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];i.invalid||n.items.push(compileComplex(i,t))}return n}function compileForgivingList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];if(i.invalid){t.forgivingDropped=!0;continue}let a=t.error,o=compileComplex(i,t);t.error===a?n.items.push(o):(t.error=a,t.forgivingDropped=!0)}return n}function compileComplex(e,t){let n=new CComplex,r=e.compounds.length;for(let i=r-1;i>=0;i--){let a=e.compounds[i];n.comps.push(compileCompound(a,t,n,i===r-1)),i>0&&n.combs.push(e.combinators[i-1])}return n.last=r-1,n.leading=e.leading,n.specificity=complexSpecificity(e),n.text=e.text,e.leading!==0&&(n.hasDomain=hasDomain(e)),n}function hasDomain(e){let t=!1;for(let n=0;n<e.combinators.length;n++){let r=e.combinators[n];(r===2||r===1)&&(t=!0)}switch(e.leading){case 2:return t?1:2;case 1:return 1;case 3:return t?5:e.combinators.length===0?3:4;default:return t?5:4}}function compileCompound(e,t,n,r){let i=[],a=e.pseudoElementIndex===-1?e.simples.length:e.pseudoElementIndex;for(let o=0;o<e.simples.length;o++){let s=e.simples[o];if(o>=a&&s.kind===7){r&&(n.pseudoElement=n.pseudoElement===``?s.name:n.pseudoElement+`::`+s.name);continue}let c=compileSimple(s,t);c!==null&&i.push(c)}if(t.defaultNs!==void 0&&needsImpliedNamespace(e,a)){let e=new Test(1);e.nsCheck=!0,e.ns=t.defaultNs,i.push(e)}return i}function needsImpliedNamespace(e,t){let n=t>0;for(let r=0;r<t;r++){let t=e.simples[r];if(t.kind===1||t.kind===2)return!1;(t.kind!==6||t.pseudo!==29&&t.pseudo!==9&&t.pseudo!==10)&&(n=!1)}return!n}function compileSimple(e,t){switch(e.kind){case 2:case 1:{let n=!1,r=null;switch(e.nsKind){case 0:t.defaultNs!==void 0&&(n=!0,r=t.defaultNs);break;case 1:break;case 2:n=!0,r=null;break;case 3:{let i=resolvePrefix(t,e.nsPrefix);if(i===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);n=!0,r=i;break}}if(e.kind===2){if(!n)return null;let e=new Test(1);return e.nsCheck=!0,e.ns=r,e}let i=new Test(2);return i.name=e.name,i.lower=asciiLowercase$1(e.name),i.a=tagId(i.lower),i.nsCheck=n,i.ns=r,i}case 3:{let t=new Test(3);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 4:{let t=new Test(4);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 5:return compileAttribute(e,t);case 6:return compilePseudoClass(e,t);case 7:return null}return null}function compileAttribute(e,t){let n=new Test(5);switch(n.name=e.name,n.lower=asciiLowercase$1(e.name),e.nsKind){case 0:case 2:n.nsCheck=!1;break;case 1:n.nsCheck=!0,n.ns=`*`;break;case 3:{let r=resolvePrefix(t,e.nsPrefix);if(r===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);r===null?n.nsCheck=!1:(n.nsCheck=!0,n.ns=r);break}}return n.attrOp=e.op,n.value=e.value,n.valueLower=asciiLowercase$1(e.value),n.valueCase=e.caseFlag===1?1:e.caseFlag===2?0:ya.has(n.lower)?2:0,(e.op===4||e.op===5||e.op===6)&&e.value===``||e.op===2&&(e.value===``||hasWhitespace(e.value))?new Test(0):n}function hasWhitespace(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===32||n===9||n===10||n===12||n===13)return!0}return!1}function compilePseudoClass(e,t){switch(e.pseudo){case 1:case 2:case 83:{let n=new Test(7);return n.list=compileForgivingList(e.list,t),n}case 3:{let n=new Test(8);return n.list=compileList(e.list,t),n}case 4:{let n=new Test(9);return n.list=compileList(e.list,t),n}case 5:case 6:case 7:case 8:return nthTest(e.pseudo,e.a,e.b,e.list,t);case 20:return nthTest(5,0,1,null,t);case 21:return nthTest(6,0,1,null,t);case 23:return nthTest(7,0,1,null,t);case 24:return nthTest(8,0,1,null,t);case 22:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(5,0,1,null,t),nthTest(6,0,1,null,t)]),n.items.push(r),e.list=n,e}case 25:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(7,0,1,null,t),nthTest(8,0,1,null,t)]),n.items.push(r),e.list=n,e}case 26:return new Test(14);case 27:return new Test(15);case 28:return t.usesScope=!0,new Test(16);case 29:return new Test(20);case 9:case 10:{let n=new Test(e.pseudo===9?21:22);return n.list=compileList(e.list,t),n}case 11:{let t=new Test(17);return t.args=e.args,t}case 12:{t.volatile=!0;let n=e.args[0];if(n!==`ltr`&&n!==`rtl`)return new Test(0);let r=new Test(18);return r.volatileTest=!0,r.a=n===`rtl`?2:1,r}case 88:{let t=new Test(23);return t.args=e.args,t}case 13:{t.volatile=!0;let n=new Test(19);return n.volatileTest=!0,n.name=e.args[0],n}}let n=ma[e.name];if(n===void 0)return fail(t,`unsupported pseudo-class :`+e.name),new Test(0);let r=new Test(6);return ba.has(e.pseudo)||(t.volatile=!0,r.volatileTest=!0),r.fn=n,r.name=e.name,r}function nthTest(e,t,n,r,i){let a=new Test(e===5?10:e===6?11:e===7?12:13);return a.a=t,a.b=n,r!==null&&(a.list=compileList(r,i)),i.nthTests.push(a),a}function resetMemos(e){let t=e.nthTests;for(let e=0;e<t.length;e++){let n=t[e];n.memoEl=null,n.memoParent=null,n.memoVersion=-1,n.memoCountVersion=-1}}var StateDeps=class{tests;els;results;constructor(){this.tests=[],this.els=[],this.results=[]}};let Ca=!1,wa=null;function logDep(e,t,n){let r=wa??=new StateDeps;r.tests.push(e),r.els.push(t),r.results.push(n)}function beginStateDeps(){let e=Ca?wa:!1;return Ca=!0,wa=null,e}function endStateDeps(e){let t=wa;if(e===!1)Ca=!1,wa=null;else if(wa=e,t!==null)for(let e=0;e<t.tests.length;e++)logDep(t.tests[e],t.els[e],t.results[e]);return t}function stateDepsHold(e){let t=Ca;Ca=!1;let n=!0,r=e.tests;for(let t=0;t<r.length;t++)if(matchTest(r[t],e.els[t])!==e.results[t]){n=!1;break}return Ca=t,n}let Ta=null,Ea=null,X=null;function setScope(e){let t=Ta;return Ta=e,t}function setHostContext(e){let t=X;return X=e,t}function matchList(e,t){return e.fn(t)}function matchComplex(e,t){return e.fn(t)}const NEVER=()=>!1,ALWAYS=()=>!0;function listFn(e){let t=e.items;if(t.length===0)return NEVER;if(t.length===1){let e=t[0];return t=>e.fn(t)}let n=tagDispatch(t);return n===null?e=>{for(let n=0;n<t.length;n++)if(t[n].fn(e))return!0;return!1}:n}function subjectTagTest(e){if(e.leading!==0)return null;let t=e.comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2)return!n.nsCheck&&n.a!==0?n:null}return null}function tagDispatch(e){let t=0,n=0;for(let r=0;r<e.length;r++){let i=subjectTagTest(e[r]);i!==null&&(n++,i.a>t&&(t=i.a))}if(n===0)return null;let r=new Uint8Array(t+1),i=Array(t+1).fill(void 0),a=[];for(let t=0;t<e.length;t++){let n=e[t],o=subjectTagTest(n);o===null?a.push(n):n.last===0&&n.comps[0].length===1?r[o.a]=1:(i[o.a]??=[]).push(n)}return n=>{if(!(n.flags&2)){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0;return!1}let o=n.tag;if(o!==0&&o<=t){if(r[o]===1)return!0;let e=i[o];if(e!==void 0){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0}}for(let e=0;e<a.length;e++)if(a[e].fn(n))return!0;return!1}}function testFn(e){switch(e.op){case 2:{let t=e.lower,n=e.name;if(!e.nsCheck)return e=>e.flags&2?e.name===t:e.name===n;let r=e.ns;return e=>(e.flags&2?e.name===t:e.name===n)&&e.ns===r}case 4:{let t=e.name;return n=>{let r=classTokens(n);for(let e=0;e<r.length;e++)if(r[e]===t)return!0;return r.length!==0&&isQuirks$1(n.doc)&&quirksClassMatch(r,e.lower)}}case 3:{let t=e.name,n=e.lower;return e=>e.id===t||e.id!==``&&isQuirks$1(e.doc)&&asciiLowercase$1(e.id)===n}case 5:{if(e.nsCheck||e.valueCase!==0||e.attrOp!==0&&e.attrOp!==1)return t=>matchAttribute(e,t);let t=e.lower,n=e.name;if(e.attrOp===0)return e=>{let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t:n;for(let e=0;e<r.length;e++)if(r[e].localName===i&&r[e].ns===null)return!0;return!1};let r=e.value;return e=>{let i=e.attrs;if(i===null)return!1;let a=e.flags&2?t:n;for(let e=0;e<i.length;e++){let t=i[e];if(t.localName===a&&t.ns===null)return t.value===r}return!1}}case 1:{let t=e.ns;return e=>e.ns===t}case 6:return e.volatileTest?t=>matchTest(e,t):e.fn;case 7:{let t=e.list;return e=>t.fn(e)}case 8:{let t=e.list;return e=>!t.fn(e)}case 9:{let t=e.list;return e=>matchHas(t,e)}case 10:case 11:case 12:case 13:return t=>matchNth(e,t);case 16:return e=>e===Ta;case 0:return NEVER}return t=>matchTest(e,t)}function compoundFn(e){switch(e.length){case 0:return ALWAYS;case 1:return testFn(e[0]);case 2:{let t=testFn(e[0]),n=testFn(e[1]);return e=>t(e)&&n(e)}case 3:{let t=testFn(e[0]),n=testFn(e[1]),r=testFn(e[2]);return e=>t(e)&&n(e)&&r(e)}}let t=e.map(testFn);return e=>{for(let n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}}function complexFn(e,t){let n=compoundFn(e.comps[t]);if(t===e.last){if(e.leading===0)return n;let t=e.leading;return e=>n(e)&&relatesToAnchor(t,e)}let r=t+1,i=complexFn(e,r);switch(e.combs[t]){case 1:return t=>{if(!n(t))return!1;for(let n=t.parent;n!==null;n=n.parent){if(n.type!==1)return hostStep(e,r,n);if(i(n))return!0}return!1};case 2:return t=>{if(!n(t))return!1;let a=t.parent;return a===null?!1:a.type===1?i(a):hostStep(e,r,a)};case 3:return e=>{if(!n(e))return!1;let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t!==null&&i(t)};case 4:return e=>{if(!n(e))return!1;for(let t=e.prev;t!==null;t=t.prev)if(t.type===1&&i(t))return!0;return!1}}return NEVER}function hostStep(e,t,n){if(!(n.flags&32)||t!==e.last)return!1;let r=shadowHost(n);if(r===null)return!1;let i=X;X=r;let a=matchCompound(e.comps[t],r)&&(e.leading===0||relatesToAnchor(e.leading,r));return X=i,a}function relatesToAnchor(e,t){let n=Ea;if(n===null)return!1;switch(e){case 2:return t.parent===n;case 1:for(let e=t.parent;e!==null;e=e.parent)if(e===n)return!0;return!1;case 3:{let e=t.prev;for(;e!==null&&e.type!==1;)e=e.prev;return e===n}case 4:for(let e=t.prev;e!==null;e=e.prev)if(e===n)return!0;return!1}return!1}function matchCompound(e,t){if(X!==null&&t===X)return matchFeatureless(e,t);for(let n=0;n<e.length;n++)if(!matchTest(e[n],t))return!1;return!0}function matchFeatureless(e,t){return featurelessCompound(e,t)===1}function matchFeaturelessHost(e,t){let n=X;X=t;let r=featurelessComplex(e,t)===1;return X=n,r}function featurelessComplex(e,t){return e.last!==0||e.leading!==0?-1:featurelessCompound(e.comps[0],t)}function featurelessList(e,t){let n=-1;for(let r=0;r<e.items.length;r++){let i=featurelessComplex(e.items[r],t);if(i===1)return 1;i===0&&(n=0)}return n}function featurelessCompound(e,t){let n=!1,r=1;for(let i=0;i<e.length;i++){let a=e[i];switch(a.op){case 20:case 21:case 22:n=!0,r===1&&!matchTest(a,t)&&(r=0);break;case 9:{let e=t.node[U];r===1&&!matchHas(a.list,e?e[M]:t)&&(r=0);break}case 7:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===0&&(r=0);break}case 8:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===1&&(r=0);break}default:return-1}}return n?r:-1}function isQuirks$1(e){return e[Mn]===`quirks`}__name(isQuirks$1,`isQuirks`);function quirksClassMatch(e,t){for(let n=0;n<e.length;n++)if(asciiLowercase$1(e[n])===t)return!0;return!1}function matchTest(e,t){switch(e.op){case 2:return(t.flags&2?t.name!==e.lower:t.name!==e.name)?!1:!e.nsCheck||t.ns===e.ns;case 4:{let n=classTokens(t),r=e.name;for(let e=0;e<n.length;e++)if(n[e]===r)return!0;return n.length!==0&&isQuirks$1(t.doc)&&quirksClassMatch(n,e.lower)}case 3:return t.id===e.name||t.id!==``&&isQuirks$1(t.doc)&&asciiLowercase$1(t.id)===e.lower;case 5:return matchAttribute(e,t);case 1:return t.ns===e.ns;case 6:{let n=e.fn(t);return Ca&&e.volatileTest&&logDep(e,t,n),n}case 7:return matchList(e.list,t);case 8:return!matchList(e.list,t);case 9:return matchHas(e.list,t);case 10:case 11:case 12:case 13:return matchNth(e,t);case 14:for(let e=t.first;e!==null;e=e.next)if(e.type===1||(e.type===3||e.type===4)&&e.data.length!==0)return!1;return!0;case 15:{let e=t.parent;return e!==null&&e.type===9}case 16:return t===Ta;case 17:return matchesLang(t,e.args);case 18:{let n=directionality(t)===e.a;return Ca&&logDep(e,t,n),n}case 19:{let n=customState(t,e.name);return Ca&&logDep(e,t,n),n}case 20:return X!==null&&t===X;case 21:{if(X===null||t!==X)return!1;let n=X;X=null;let r=matchList(e.list,t);return X=n,r}case 22:{if(X===null||t!==X)return!1;let n=X;X=null;let r=!1;for(let n=t;n!==null&&!r;n=parentOrHost$1(n))n.type===1&&matchList(e.list,n)&&(r=!0);return X=n,r}case 23:{let n=headingLevel(t);if(n===0)return!1;let r=e.args;if(r.length===0)return!0;for(let e=0;e<r.length;e++)if(Number(r[e])===n)return!0;return!1}case 0:return!1}return!1}function headingLevel(e){if(e.tag===0||e.name.length!==2||e.name.charCodeAt(0)!==104)return 0;let t=e.name.charCodeAt(1)-48;if(t<1||t>6)return 0;let n=t+headingOffset(e);return n>9?9:n}function headingOffset(e){let t=0;for(let n=e;n!==null;n=parentOrHost$1(n)){if(n.type!==1||n.tag===0||n.attrs===null)continue;let e=attr(n,`headingoffset`);if(e!==null){let n=parseNonNegativeInteger$1(e);n>0&&(t+=n)}if(attr(n,`headingreset`)!==null)break}return t}function parseNonNegativeInteger$1(e){let t=0;for(;t<e.length&&isWs$2(e.charCodeAt(t));)t++;t<e.length&&e.charCodeAt(t)===43&&t++;let n=-1;for(;t<e.length;t++){let r=e.charCodeAt(t)-48;if(r<0||r>9)break;n=(n===-1?0:n*10)+r}return n}__name(parseNonNegativeInteger$1,`parseNonNegativeInteger`);function matchAttribute(e,t){let n=t.attrs;if(n===null)return!1;let r=!!(t.flags&2),i=r?e.lower:e.name;for(let t=0;t<n.length;t++){let a=n[t];if(a.localName!==i)continue;if(e.nsCheck){if(e.ns!==`*`&&a.ns!==e.ns)continue}else if(a.ns!==null)continue;if(e.attrOp===0)return!0;let o=e.valueCase===1||e.valueCase===2&&r&&a.ns===null;if(attrValueMatches(e,o?asciiLowercase$1(a.value):a.value,o?e.valueLower:e.value))return!0;if(!e.nsCheck)return!1}return!1}function attrValueMatches(e,t,n){switch(e.attrOp){case 1:return t===n;case 2:{let e=t.length,r=n.length,i=0;for(;i<e;){for(;i<e&&isWs$2(t.charCodeAt(i));)i++;let a=i;for(;i<e&&!isWs$2(t.charCodeAt(i));)i++;if(i-a===r&&t.startsWith(n,a))return!0}return!1}case 3:return t===n||t.length>n.length&&t.charCodeAt(n.length)===45&&t.startsWith(n);case 4:return t.startsWith(n);case 5:return t.endsWith(n);case 6:return t.includes(n)}return!1}function isWs$2(e){return e===32||e===9||e===10||e===12||e===13}__name(isWs$2,`isWs`);function anb(e,t,n){if(e===0)return n===t;let r=n-t;return r/e>=0&&r%e===0}function sameType(e,t){return e.name===t.name&&e.ns===t.ns}function matchNth(e,t){let n=e.list;if(n!==null&&!matchList(n,t))return!1;let r=t.doc[K],i=e.op===12||e.op===13,a=e.op===11||e.op===13,o=1,s=t.prev;for(;s!==null&&!(s.type===1&&(i?sameType(s,t):n===null||matchList(n,s)));)s=s.prev;if(s!==null){if(s===e.memoEl&&e.memoVersion===r)o=e.memoIdx+1;else{o=2;for(let e=s.prev;e!==null;e=e.prev)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&o++}}if(e.memoEl=t,e.memoIdx=o,e.memoVersion=r,!a)return anb(e.a,e.b,o);let c=t.parent,l;if(!i&&n===null&&c!==null&&c===e.memoParent&&e.memoCountVersion===r)l=e.memoCount;else{l=o;for(let e=t.next;e!==null;e=e.next)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&l++;!i&&n===null&&(e.memoParent=c,e.memoCount=l,e.memoCountVersion=r)}return anb(e.a,e.b,l-o+1)}function matchHas(e,t){let n=Ea;Ea=t;let r=!1,i=e.items;for(let e=0;e<i.length&&!r;e++){let n=i[e];switch(n.hasDomain){case 2:for(let e=t.first;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 1:for(let e=t.first;e!==null;){if(e.type===1&&n.fn(e)){r=!0;break}e=nextIn(e,t)}break;case 3:{let e=t.next;for(;e!==null&&e.type!==1;)e=e.next;r=e!==null&&n.fn(e);break}case 4:for(let e=t.next;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 5:for(let e=t.next;e!==null&&!r;e=e.next)if(e.type===1){if(n.fn(e)){r=!0;break}for(let t=e.first;t!==null;){if(t.type===1&&n.fn(t)){r=!0;break}t=nextIn(t,e)}}}}return Ea=n,r}function nextIn(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==null&&r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function subjectKey(e){let t=e.comps[0],n=``,r=``;for(let e=0;e<t.length;e++){let i=t[e];if(i.op===3)return{kind:1,value:i.name};i.op===4&&n===``?n=i.name:i.op===2&&r===``&&(r=i.lower)}return n===``?r===``?{kind:0,value:``}:{kind:3,value:r}:{kind:2,value:n}}function ancestorHashes(e){let t=[];if(e.leading!==0)return t;for(let n=0;n<3&&t.length<4;n++)for(let r=1;r<=e.last&&t.length<4;r++){let i=e.combs[r-1];if(i!==1&&i!==2)continue;let a=e.comps[r];for(let e=0;e<a.length&&t.length<4;e++){let r=a[e],i=-1;n===0&&r.op===3?i=idHash(r.name):n===1&&r.op===4?i=classHash(r.name):n===2&&r.op===2&&(i=tagHash(r.lower)),i!==-1&&t.indexOf(i)===-1&&t.push(i)}}return t}function idRootOf(e){if(e.items.length!==1)return``;let t=e.items[0];if(t.leading!==0)return``;for(let e=1;e<=t.last;e++){let n=t.combs[e-1];if(n!==1&&n!==2)return``;let r=t.comps[e];for(let e=0;e<r.length;e++)if(r[e].op===3)return r[e].name}return``}function fastShape(e){if(e.items.length!==1)return 0;let t=e.items[0];if(t.last!==0)return 0;let n=t.comps[0];if(n.length===0)return 1;if(n.length!==1)return 0;let r=n[0];switch(r.op){case 3:return 2;case 4:return 3;case 2:return r.nsCheck?0:4;case 5:return r.nsCheck?0:r.attrOp===0||r.attrOp===1&&r.valueCase===0?5:0}return 0}function fastTest(e){return e.items[0].comps[0][0]}var Query=class{list;info;fast;fastT;hasMemos;idRoot;constructor(e,t){let n=new CList;for(let t=0;t<e.items.length;t++){let r=e.items[t];r.pseudoElement===``&&n.items.push(r)}this.list=n,this.info=t,this.fast=t.usesScope?0:fastShape(n),this.fastT=this.fast===0||this.fast===1?null:fastTest(n),this.hasMemos=t.nthTests.length!==0,this.idRoot=this.fast===0&&!t.usesScope?idRootOf(n):``}};const Da=/* @__PURE__ */ new Map;function clearSelectorCaches(){Da.clear()}function compileQuery(e){let t=new SelectorParser(e).parseSelectorList();if(t===null)return null;let n=new CompileInfo,r=compileList(t,n);return n.error===``?new Query(r,n):null}function interfaceName(e){return e.type===9?`Document`:e.type===1?`Element`:`DocumentFragment`}function syntaxError$1(e,t,n){return new DOMException(`Failed to execute '${t}' on '${interfaceName(n)}': '${e}' is not a valid selector.`,`SyntaxError`)}__name(syntaxError$1,`syntaxError`);function getQuery(e,t,n){let r=Da.get(e);if(r===void 0&&(r=compileQuery(e),Da.size>=2048&&Da.clear(),Da.set(e,r)),r===null)throw syntaxError$1(e,t,n);return r}function scopeFor(e){if(e.type===1)return e;if(e.type===9){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t}return null}function next(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function hasClass(e,t){let n=classTokens(e);for(let e=0;e<n.length;e++)if(n[e]===t)return!0;return!1}function attrMatch(e,t,n){let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t.lower:t.name;for(let e=0;e<r.length;e++){let a=r[e];if(a.localName===i&&a.ns===null)return n||a.value===t.value}return!1}function isQuirks(e){return e.doc[Mn]===`quirks`}function run$1(e,t,n,r){switch(t.fast){case 1:for(let t=e.first;t!==null;t=next(t,e))if(t.type===1){if(n)return t;r.push(t)}return null;case 2:{let i=t.fastT;if(e.flags&1&&!isQuirks(e)){let t=e.doc[fn].get(i.name);if(t===void 0){if(e.type===9)return null}else if(!Array.isArray(t)){for(let i=t.parent;i!==null;i=i.parent)if(i===e)return n?t:(r.push(t),null);if(e.type===9)return null}}let a=i.name;if(!isQuirks(e)){for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.id===a){if(n)return t;r.push(t)}return null}break}case 3:{if(isQuirks(e))break;let i=t.fastT.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.attrs!==null&&hasClass(t,i)){if(n)return t;r.push(t)}return null}case 4:{let i=t.fastT,a=i.lower,o=i.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&(t.flags&2?t.name===a:t.name===o)){if(n)return t;r.push(t)}return null}case 5:{let i=t.fastT,a=i.attrOp===0;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&attrMatch(t,i,a)){if(n)return t;r.push(t)}return null}}let i=t.list;if(i.items.length===0)return null;let a=e;if(t.idRoot!==``){let n=idRootFor(e,t.idRoot);if(n===null)return null;a=n}let o=setScope(t.info.usesScope?scopeFor(e):null);try{for(let e=a.first;e!==null;e=next(e,a))if(e.type===1&&matchList(i,e)){if(n)return e;r.push(e)}return null}finally{setScope(o),t.hasMemos&&resetMemos(t.info)}}__name(run$1,`run`);function idRootFor(e,t){if(!(e.flags&1)||isQuirks(e))return e;if(e.type!==9){let t=e;for(;t.parent!==null;)t=t.parent;if(t.type!==9)return e}let n=e.doc[fn].get(t);if(n===void 0)return null;if(Array.isArray(n)||n===e)return e;for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;for(let t=e.parent;t!==null;t=t.parent)if(t===n)return e;return null}const Oa=[];var ResultEntry=class{version;doc;all;first;constructor(e,t){this.version=e,this.doc=t,this.all=null,this.first=void 0}};const ka={},newResults=()=>/* @__PURE__ */ new WeakMap;function cacheable(e){return!e.info.volatile&&e.fast!==2}function cachedEntry(e,t,n){let r=e.doc,i=n?derivedCache(r,ka,newResults):peekDerivedCache(r,ka);if(i===void 0)return null;let a=i.get(e);if(a===void 0){if(!n)return null;a=/* @__PURE__ */ new Map,i.set(e,a)}let o=r[K],s=a.get(t);return s!==void 0&&s.version===o&&s.doc===r?s:n?(s===void 0?(a.size>=64&&a.clear(),s=new ResultEntry(o,r),a.set(t,s)):(s.version=o,s.doc=r,s.all=null,s.first=void 0),s):null}function querySelector(e,t){let n=getQuery(t,`querySelector`,e);if(!cacheable(n))return run$1(e,n,!0,Oa);let r=cachedEntry(e,n,!1);if(r!==null){if(r.first!==void 0)return r.first;if(r.all!==null)return r.first=r.all.length===0?null:r.all[0]}let i=run$1(e,n,!0,Oa);return cachedEntry(e,n,!0).first=i,i}function querySelectorAll(e,t){return Ri._staticFromImpls(allImpls(e,getQuery(t,`querySelectorAll`,e)))}function allImpls(e,t){if(!cacheable(t)){let n=[];return run$1(e,t,!1,n),n}let n=cachedEntry(e,t,!1);if(n!==null&&n.all!==null)return n.all;let r=[];run$1(e,t,!1,r);let i=cachedEntry(e,t,!0);return i.all=r,i.first=r.length===0?null:r[0],r}function matches(e,t){let n=getQuery(t,`matches`,e),r=n.list;if(!n.info.usesScope&&!n.hasMemos)return r.fn(e);if(r.items.length===0)return!1;let i=setScope(e);try{return matchList(r,e)}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}function closest(e,t){let n=getQuery(t,`closest`,e),r=n.list;if(r.items.length===0)return null;let i=setScope(e);try{for(let t=e;t!==null&&t.type===1;t=t.parent)if(matchList(r,t))return t;return null}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}var CollectionState=class{root;childrenOnly;filter;items;doc;version;constructor(e,t,n){this.root=e,this.childrenOnly=t,this.filter=n,this.items=[],this.doc=null,this.version=-1}_dropSnapshot(){this.items=[],this.doc=null,this.version=-1}},Aa=class HTMLCollection{constructor(e,t=!1,n=null){Object.defineProperty(this,ht,{value:new CollectionState(e,t,n)}),Ma===null&&(Ma=indexGetterTable(HTMLCollection.prototype,tableItem,256))}get _s(){return this[ht]}get _rootImpl(){return this[ht].root}static _childrenOf(e){return new HTMLCollection(e,!0,null)}static _descendants(e,t){return new HTMLCollection(e,!1,t)}_collect(e){let t=this[ht],n=t.root;if(t.childrenOnly){for(let t=n.first;t!==null;t=t.next)t.type===1&&e.push(t.node);return}let r=t.filter;if(r===null)for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))e.push(t.node);else for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))r(t)&&e.push(t.node)}_snapshot(){let e=this[ht],t=e.root.doc;if(e.version===t[K]&&e.doc===t)return e.items;let n=[];return this._collect(n),e.items=n,e.doc=t,e.version=t[K],n.length!==0&&holdSnapshot(t,e,e.root),n.length>Ma.count&&ensureIndexGetters(Ma,n.length),n}get length(){let e=this._snapshot().length;return e>Ma.count&&ensureIndexGetters(Ma,e),e}item(e){let t=this._snapshot(),n=Number(e)>>>0;return n<t.length?t[n]:null}namedItem(e){let t=String(e);if(t===``)return null;let n=this._snapshot();for(let e=0;e<n.length;e++){let r=n[e][M];if(r.id===t||r.ns===`http://www.w3.org/1999/xhtml`&&attr(r,`name`)===t)return n[e]}return null}_supportedPropertyNames(){let e=[],t=this._snapshot();for(let n=0;n<t.length;n++){let r=t[n][M];if(r.id!==``&&!e.includes(r.id)&&e.push(r.id),r.ns===`http://www.w3.org/1999/xhtml`){let t=attr(r,`name`);t!==null&&t!==``&&!e.includes(t)&&e.push(t)}}return e}};const ja={values(){let e=iterableTarget(this);return new CollectionIterator(e,e instanceof Aa)}}.values;Object.defineProperties(Aa.prototype,{[Symbol.iterator]:{value:ja,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`HTMLCollection`,configurable:!0}});let Ma=null;function tableItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}function ensureCollectionIndexGetters(e){Ma!==null&&ensureIndexGetters(Ma,e)}function isArrayIndex$1(e){let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&n<4294967295&&String(n)===e}__name(isArrayIndex$1,`isArrayIndex`);function withNamedProperties(e){return new Proxy(e,{get(e,t,n){return typeof t==`string`&&!(t in e)?e.namedItem(t)??void 0:Reflect.get(e,t,e)},has(e,t){return typeof t==`string`&&!(t in e)?isArrayIndex$1(t)?Number(t)<e.length:e.namedItem(t)!==null:typeof t==`string`&&isArrayIndex$1(t)?Number(t)<e.length:Reflect.has(e,t)},ownKeys(e){let t=[],n=e.length;for(let e=0;e<n;e++)t.push(String(e));for(let n of e._supportedPropertyNames())n in e||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`){if(isArrayIndex$1(t)){let n=e.item(Number(t));return n===null?void 0:{value:n,writable:!1,enumerable:!0,configurable:!0}}if(!(t in e)){let n=e.namedItem(t);if(n!==null)return{value:n,writable:!1,enumerable:!1,configurable:!0}}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.set(e,t,n,e)},defineProperty(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&isArrayIndex$1(t)?Number(t)>=e.length:typeof t==`string`&&!(t in e)&&e.namedItem(t)!==null?!1:Reflect.deleteProperty(e,t)}})}function define(e,t){for(let n of Reflect.ownKeys(t))Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}function convertNodesIntoNode(e,t){if(e.length===1)return toNode(e[0],t)[M];let n=t.createDocumentFragment();for(let r of e)n.appendChild(toNode(r,t));return n[M]}function toNode(e,t){return typeof e==`object`&&e&&M in e?e:t.createTextNode(String(e))}function nodeArg(e,t,n,r){if(typeof e==`object`&&e&&M in e)return e[M];throw TypeError(`Failed to execute '${t}' on '${parentNodeInterface(r)}': parameter ${n} is not of type 'Node'.`)}function parentNodeInterface(e){return e.type===1?`Element`:e.type===11?`DocumentFragment`:`Document`}function wrap(e){return e===null?null:e.node}const Na={get children(){let e=this;return e[nt]??=Aa._childrenOf(e[M])},get firstElementChild(){return wrap(firstElementChild(this[M]))},get lastElementChild(){return wrap(lastElementChild(this[M]))},get childElementCount(){let e=0;for(let t=this[M].first;t!==null;t=t.next)t.type===1&&e++;return e},prepend(...e){let t=this[M];preInsert(convertNodesIntoNode(e,t.doc),t,t.first)},append(...e){let t=this[M];preInsert(convertNodesIntoNode(e,t.doc),t,null)},replaceChildren(...e){let t=this[M],n=convertNodesIntoNode(e,t.doc);ensureReplaceAllValidity(n,t),replaceAll(n,t)},moveBefore(e,t){arguments.length<2&&argumentsRequired(`moveBefore`,parentNodeInterface(this[M]),2,arguments.length);let n=nodeArg(e,`moveBefore`,1,this[M]),r=t===null?null:nodeArg(t,`moveBefore`,2,this[M]);r===n&&(r=n.next),move(n,this[M],r)},querySelector(e){return arguments.length===0&&argumentsRequired(`querySelector`,parentNodeInterface(this[M]),1,0),wrap(querySelector(this[M],String(e)))},querySelectorAll(e){return arguments.length===0&&argumentsRequired(`querySelectorAll`,parentNodeInterface(this[M]),1,0),querySelectorAll(this[M],String(e))}},Pa={before(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.prev;for(;r!==null&&e.includes(r.node);)r=r.prev;preInsert(convertNodesIntoNode(e,t.doc),n,r===null?n.first:r.next)},after(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;preInsert(convertNodesIntoNode(e,t.doc),n,r)},replaceWith(...e){let t=this[M],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;let i=convertNodesIntoNode(e,t.doc);t.parent===n?replace(t,i,n):preInsert(i,n,r)},remove(){let e=this[M];e.parent!==null&&remove(e,!1)}},Fa={get previousElementSibling(){return wrap(previousElementSibling(this[M]))},get nextElementSibling(){return wrap(nextElementSibling(this[M]))}},Ia={getElementById(e){let t=this[M],n=String(e);if(n===``)return null;if(t.type!==11)return wrap(this._idLookup(n));for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.id===n)return e.node;return null}};function installParentNode(e){define(e,Na),addUnscopables(e,[`prepend`,`append`,`replaceChildren`])}function installChildNode(e){define(e,Pa),addUnscopables(e,[`before`,`after`,`replaceWith`,`remove`])}function addUnscopables(e,t){let n=e.prototype,r=Object.getOwnPropertyDescriptor(n,Symbol.unscopables)?.value;r===void 0&&(r=Object.create(null),Object.defineProperty(n,Symbol.unscopables,{value:r,configurable:!0}));for(let e of t)r[e]=!0}function installNonDocumentTypeChildNode(e){define(e,Fa)}function installNonElementParentNode(e){define(e,Ia)}function arity$1(e,t,n){throw TypeError(`Failed to execute '${e}' on 'CharacterData': ${t} argument${t===1?``:`s`} required, but only ${n} present.`)}__name(arity$1,`arity`);function nodeDocumentFor(e){return typeof e==`object`&&e&&e[M]?.type===9?e:currentDocument()}var CharacterData=class extends Node{get data(){return this[M].data}set data(e){let t=this[M];replaceData(t,0,t.data.length,e===null?``:String(e))}get length(){return this[M].data.length}substringData(e,t){arguments.length<2&&arity$1(`substringData`,2,arguments.length);let n=this[M].data;if(e>>>=0,t>>>=0,e>n.length)throw new DOMException(`Offset is greater than the node's length.`,`IndexSizeError`);return n.substring(e,e+t)}appendData(e){arguments.length<1&&arity$1(`appendData`,1,0);let t=this[M];replaceData(t,t.data.length,0,String(e))}insertData(e,t){arguments.length<2&&arity$1(`insertData`,2,arguments.length),replaceData(this[M],e>>>0,0,String(t))}deleteData(e,t){arguments.length<2&&arity$1(`deleteData`,2,arguments.length),replaceData(this[M],e>>>0,t>>>0,``)}replaceData(e,t,n){arguments.length<3&&arity$1(`replaceData`,3,arguments.length),replaceData(this[M],e>>>0,t>>>0,String(n))}};installChildNode(CharacterData),installNonDocumentTypeChildNode(CharacterData);var Text=class extends CharacterData{constructor(e=``,t){super(3,nodeDocumentFor(t)),this[M].data=String(e)}splitText(e){return splitText(this[M],Number(e)>>>0).node}get wholeText(){let e=this[M];for(;e.prev!==null&&(e.prev.type===3||e.prev.type===4);)e=e.prev;let t=``;for(let n=e;n!==null&&(n.type===3||n.type===4);n=n.next)t+=n.data;return t}get assignedSlot(){if(ra===0)return null;let e=assignedSlot(this[M]);if(e===null)return null;let t=this[M].parent,n=t===null?null:t.node[U];return n!=null&&n.mode===`open`?e.node:null}},CDATASection=class extends Text{constructor(e=``,t=currentDocument()){super(e,t),this[M].type=4}},Comment=class extends CharacterData{constructor(e=``,t){super(8,nodeDocumentFor(t)),this[M].data=String(e)}},ProcessingInstruction=class extends CharacterData{constructor(e,t,n=currentDocument()){super(7,n),this[M].name=e,this[M].data=t}get target(){return this[M].name}},DocumentFragment=class extends Node{[j];constructor(e=currentDocument()){super(11,e),this[j]=null}};installParentNode(DocumentFragment),installNonElementParentNode(DocumentFragment);var DocumentType=class extends Node{[Ir];constructor(e,t,n,r){super(10,e);let i=this[M];i.name=t,i.data=n,this[Ir]=r}get name(){return this[M].name}get publicId(){return this[M].data}get systemId(){return this[Ir]}};installChildNode(DocumentType);const La=`AElig,AElig;,AMP,AMP;,Aacute,Aacute;,Abreve;,Acirc,Acirc;,Acy;,Afr;,Agrave,Agrave;,Alpha;,Amacr;,And;,Aogon;,Aopf;,ApplyFunction;,Aring,Aring;,Ascr;,Assign;,Atilde,Atilde;,Auml,Auml;,Backslash;,Barv;,Barwed;,Bcy;,Because;,Bernoullis;,Beta;,Bfr;,Bopf;,Breve;,Bscr;,Bumpeq;,CHcy;,COPY,COPY;,Cacute;,Cap;,CapitalDifferentialD;,Cayleys;,Ccaron;,Ccedil,Ccedil;,Ccirc;,Cconint;,Cdot;,Cedilla;,CenterDot;,Cfr;,Chi;,CircleDot;,CircleMinus;,CirclePlus;,CircleTimes;,ClockwiseContourIntegral;,CloseCurlyDoubleQuote;,CloseCurlyQuote;,Colon;,Colone;,Congruent;,Conint;,ContourIntegral;,Copf;,Coproduct;,CounterClockwiseContourIntegral;,Cross;,Cscr;,Cup;,CupCap;,DD;,DDotrahd;,DJcy;,DScy;,DZcy;,Dagger;,Darr;,Dashv;,Dcaron;,Dcy;,Del;,Delta;,Dfr;,DiacriticalAcute;,DiacriticalDot;,DiacriticalDoubleAcute;,DiacriticalGrave;,DiacriticalTilde;,Diamond;,DifferentialD;,Dopf;,Dot;,DotDot;,DotEqual;,DoubleContourIntegral;,DoubleDot;,DoubleDownArrow;,DoubleLeftArrow;,DoubleLeftRightArrow;,DoubleLeftTee;,DoubleLongLeftArrow;,DoubleLongLeftRightArrow;,DoubleLongRightArrow;,DoubleRightArrow;,DoubleRightTee;,DoubleUpArrow;,DoubleUpDownArrow;,DoubleVerticalBar;,DownArrow;,DownArrowBar;,DownArrowUpArrow;,DownBreve;,DownLeftRightVector;,DownLeftTeeVector;,DownLeftVector;,DownLeftVectorBar;,DownRightTeeVector;,DownRightVector;,DownRightVectorBar;,DownTee;,DownTeeArrow;,Downarrow;,Dscr;,Dstrok;,ENG;,ETH,ETH;,Eacute,Eacute;,Ecaron;,Ecirc,Ecirc;,Ecy;,Edot;,Efr;,Egrave,Egrave;,Element;,Emacr;,EmptySmallSquare;,EmptyVerySmallSquare;,Eogon;,Eopf;,Epsilon;,Equal;,EqualTilde;,Equilibrium;,Escr;,Esim;,Eta;,Euml,Euml;,Exists;,ExponentialE;,Fcy;,Ffr;,FilledSmallSquare;,FilledVerySmallSquare;,Fopf;,ForAll;,Fouriertrf;,Fscr;,GJcy;,GT,GT;,Gamma;,Gammad;,Gbreve;,Gcedil;,Gcirc;,Gcy;,Gdot;,Gfr;,Gg;,Gopf;,GreaterEqual;,GreaterEqualLess;,GreaterFullEqual;,GreaterGreater;,GreaterLess;,GreaterSlantEqual;,GreaterTilde;,Gscr;,Gt;,HARDcy;,Hacek;,Hat;,Hcirc;,Hfr;,HilbertSpace;,Hopf;,HorizontalLine;,Hscr;,Hstrok;,HumpDownHump;,HumpEqual;,IEcy;,IJlig;,IOcy;,Iacute,Iacute;,Icirc,Icirc;,Icy;,Idot;,Ifr;,Igrave,Igrave;,Im;,Imacr;,ImaginaryI;,Implies;,Int;,Integral;,Intersection;,InvisibleComma;,InvisibleTimes;,Iogon;,Iopf;,Iota;,Iscr;,Itilde;,Iukcy;,Iuml,Iuml;,Jcirc;,Jcy;,Jfr;,Jopf;,Jscr;,Jsercy;,Jukcy;,KHcy;,KJcy;,Kappa;,Kcedil;,Kcy;,Kfr;,Kopf;,Kscr;,LJcy;,LT,LT;,Lacute;,Lambda;,Lang;,Laplacetrf;,Larr;,Lcaron;,Lcedil;,Lcy;,LeftAngleBracket;,LeftArrow;,LeftArrowBar;,LeftArrowRightArrow;,LeftCeiling;,LeftDoubleBracket;,LeftDownTeeVector;,LeftDownVector;,LeftDownVectorBar;,LeftFloor;,LeftRightArrow;,LeftRightVector;,LeftTee;,LeftTeeArrow;,LeftTeeVector;,LeftTriangle;,LeftTriangleBar;,LeftTriangleEqual;,LeftUpDownVector;,LeftUpTeeVector;,LeftUpVector;,LeftUpVectorBar;,LeftVector;,LeftVectorBar;,Leftarrow;,Leftrightarrow;,LessEqualGreater;,LessFullEqual;,LessGreater;,LessLess;,LessSlantEqual;,LessTilde;,Lfr;,Ll;,Lleftarrow;,Lmidot;,LongLeftArrow;,LongLeftRightArrow;,LongRightArrow;,Longleftarrow;,Longleftrightarrow;,Longrightarrow;,Lopf;,LowerLeftArrow;,LowerRightArrow;,Lscr;,Lsh;,Lstrok;,Lt;,Map;,Mcy;,MediumSpace;,Mellintrf;,Mfr;,MinusPlus;,Mopf;,Mscr;,Mu;,NJcy;,Nacute;,Ncaron;,Ncedil;,Ncy;,NegativeMediumSpace;,NegativeThickSpace;,NegativeThinSpace;,NegativeVeryThinSpace;,NestedGreaterGreater;,NestedLessLess;,NewLine;,Nfr;,NoBreak;,NonBreakingSpace;,Nopf;,Not;,NotCongruent;,NotCupCap;,NotDoubleVerticalBar;,NotElement;,NotEqual;,NotEqualTilde;,NotExists;,NotGreater;,NotGreaterEqual;,NotGreaterFullEqual;,NotGreaterGreater;,NotGreaterLess;,NotGreaterSlantEqual;,NotGreaterTilde;,NotHumpDownHump;,NotHumpEqual;,NotLeftTriangle;,NotLeftTriangleBar;,NotLeftTriangleEqual;,NotLess;,NotLessEqual;,NotLessGreater;,NotLessLess;,NotLessSlantEqual;,NotLessTilde;,NotNestedGreaterGreater;,NotNestedLessLess;,NotPrecedes;,NotPrecedesEqual;,NotPrecedesSlantEqual;,NotReverseElement;,NotRightTriangle;,NotRightTriangleBar;,NotRightTriangleEqual;,NotSquareSubset;,NotSquareSubsetEqual;,NotSquareSuperset;,NotSquareSupersetEqual;,NotSubset;,NotSubsetEqual;,NotSucceeds;,NotSucceedsEqual;,NotSucceedsSlantEqual;,NotSucceedsTilde;,NotSuperset;,NotSupersetEqual;,NotTilde;,NotTildeEqual;,NotTildeFullEqual;,NotTildeTilde;,NotVerticalBar;,Nscr;,Ntilde,Ntilde;,Nu;,OElig;,Oacute,Oacute;,Ocirc,Ocirc;,Ocy;,Odblac;,Ofr;,Ograve,Ograve;,Omacr;,Omega;,Omicron;,Oopf;,OpenCurlyDoubleQuote;,OpenCurlyQuote;,Or;,Oscr;,Oslash,Oslash;,Otilde,Otilde;,Otimes;,Ouml,Ouml;,OverBar;,OverBrace;,OverBracket;,OverParenthesis;,PartialD;,Pcy;,Pfr;,Phi;,Pi;,PlusMinus;,Poincareplane;,Popf;,Pr;,Precedes;,PrecedesEqual;,PrecedesSlantEqual;,PrecedesTilde;,Prime;,Product;,Proportion;,Proportional;,Pscr;,Psi;,QUOT,QUOT;,Qfr;,Qopf;,Qscr;,RBarr;,REG,REG;,Racute;,Rang;,Rarr;,Rarrtl;,Rcaron;,Rcedil;,Rcy;,Re;,ReverseElement;,ReverseEquilibrium;,ReverseUpEquilibrium;,Rfr;,Rho;,RightAngleBracket;,RightArrow;,RightArrowBar;,RightArrowLeftArrow;,RightCeiling;,RightDoubleBracket;,RightDownTeeVector;,RightDownVector;,RightDownVectorBar;,RightFloor;,RightTee;,RightTeeArrow;,RightTeeVector;,RightTriangle;,RightTriangleBar;,RightTriangleEqual;,RightUpDownVector;,RightUpTeeVector;,RightUpVector;,RightUpVectorBar;,RightVector;,RightVectorBar;,Rightarrow;,Ropf;,RoundImplies;,Rrightarrow;,Rscr;,Rsh;,RuleDelayed;,SHCHcy;,SHcy;,SOFTcy;,Sacute;,Sc;,Scaron;,Scedil;,Scirc;,Scy;,Sfr;,ShortDownArrow;,ShortLeftArrow;,ShortRightArrow;,ShortUpArrow;,Sigma;,SmallCircle;,Sopf;,Sqrt;,Square;,SquareIntersection;,SquareSubset;,SquareSubsetEqual;,SquareSuperset;,SquareSupersetEqual;,SquareUnion;,Sscr;,Star;,Sub;,Subset;,SubsetEqual;,Succeeds;,SucceedsEqual;,SucceedsSlantEqual;,SucceedsTilde;,SuchThat;,Sum;,Sup;,Superset;,SupersetEqual;,Supset;,THORN,THORN;,TRADE;,TSHcy;,TScy;,Tab;,Tau;,Tcaron;,Tcedil;,Tcy;,Tfr;,Therefore;,Theta;,ThickSpace;,ThinSpace;,Tilde;,TildeEqual;,TildeFullEqual;,TildeTilde;,Topf;,TripleDot;,Tscr;,Tstrok;,Uacute,Uacute;,Uarr;,Uarrocir;,Ubrcy;,Ubreve;,Ucirc,Ucirc;,Ucy;,Udblac;,Ufr;,Ugrave,Ugrave;,Umacr;,UnderBar;,UnderBrace;,UnderBracket;,UnderParenthesis;,Union;,UnionPlus;,Uogon;,Uopf;,UpArrow;,UpArrowBar;,UpArrowDownArrow;,UpDownArrow;,UpEquilibrium;,UpTee;,UpTeeArrow;,Uparrow;,Updownarrow;,UpperLeftArrow;,UpperRightArrow;,Upsi;,Upsilon;,Uring;,Uscr;,Utilde;,Uuml,Uuml;,VDash;,Vbar;,Vcy;,Vdash;,Vdashl;,Vee;,Verbar;,Vert;,VerticalBar;,VerticalLine;,VerticalSeparator;,VerticalTilde;,VeryThinSpace;,Vfr;,Vopf;,Vscr;,Vvdash;,Wcirc;,Wedge;,Wfr;,Wopf;,Wscr;,Xfr;,Xi;,Xopf;,Xscr;,YAcy;,YIcy;,YUcy;,Yacute,Yacute;,Ycirc;,Ycy;,Yfr;,Yopf;,Yscr;,Yuml;,ZHcy;,Zacute;,Zcaron;,Zcy;,Zdot;,ZeroWidthSpace;,Zeta;,Zfr;,Zopf;,Zscr;,aacute,aacute;,abreve;,ac;,acE;,acd;,acirc,acirc;,acute,acute;,acy;,aelig,aelig;,af;,afr;,agrave,agrave;,alefsym;,aleph;,alpha;,amacr;,amalg;,amp,amp;,and;,andand;,andd;,andslope;,andv;,ang;,ange;,angle;,angmsd;,angmsdaa;,angmsdab;,angmsdac;,angmsdad;,angmsdae;,angmsdaf;,angmsdag;,angmsdah;,angrt;,angrtvb;,angrtvbd;,angsph;,angst;,angzarr;,aogon;,aopf;,ap;,apE;,apacir;,ape;,apid;,apos;,approx;,approxeq;,aring,aring;,ascr;,ast;,asymp;,asympeq;,atilde,atilde;,auml,auml;,awconint;,awint;,bNot;,backcong;,backepsilon;,backprime;,backsim;,backsimeq;,barvee;,barwed;,barwedge;,bbrk;,bbrktbrk;,bcong;,bcy;,bdquo;,becaus;,because;,bemptyv;,bepsi;,bernou;,beta;,beth;,between;,bfr;,bigcap;,bigcirc;,bigcup;,bigodot;,bigoplus;,bigotimes;,bigsqcup;,bigstar;,bigtriangledown;,bigtriangleup;,biguplus;,bigvee;,bigwedge;,bkarow;,blacklozenge;,blacksquare;,blacktriangle;,blacktriangledown;,blacktriangleleft;,blacktriangleright;,blank;,blk12;,blk14;,blk34;,block;,bne;,bnequiv;,bnot;,bopf;,bot;,bottom;,bowtie;,boxDL;,boxDR;,boxDl;,boxDr;,boxH;,boxHD;,boxHU;,boxHd;,boxHu;,boxUL;,boxUR;,boxUl;,boxUr;,boxV;,boxVH;,boxVL;,boxVR;,boxVh;,boxVl;,boxVr;,boxbox;,boxdL;,boxdR;,boxdl;,boxdr;,boxh;,boxhD;,boxhU;,boxhd;,boxhu;,boxminus;,boxplus;,boxtimes;,boxuL;,boxuR;,boxul;,boxur;,boxv;,boxvH;,boxvL;,boxvR;,boxvh;,boxvl;,boxvr;,bprime;,breve;,brvbar,brvbar;,bscr;,bsemi;,bsim;,bsime;,bsol;,bsolb;,bsolhsub;,bull;,bullet;,bump;,bumpE;,bumpe;,bumpeq;,cacute;,cap;,capand;,capbrcup;,capcap;,capcup;,capdot;,caps;,caret;,caron;,ccaps;,ccaron;,ccedil,ccedil;,ccirc;,ccups;,ccupssm;,cdot;,cedil,cedil;,cemptyv;,cent,cent;,centerdot;,cfr;,chcy;,check;,checkmark;,chi;,cir;,cirE;,circ;,circeq;,circlearrowleft;,circlearrowright;,circledR;,circledS;,circledast;,circledcirc;,circleddash;,cire;,cirfnint;,cirmid;,cirscir;,clubs;,clubsuit;,colon;,colone;,coloneq;,comma;,commat;,comp;,compfn;,complement;,complexes;,cong;,congdot;,conint;,copf;,coprod;,copy,copy;,copysr;,crarr;,cross;,cscr;,csub;,csube;,csup;,csupe;,ctdot;,cudarrl;,cudarrr;,cuepr;,cuesc;,cularr;,cularrp;,cup;,cupbrcap;,cupcap;,cupcup;,cupdot;,cupor;,cups;,curarr;,curarrm;,curlyeqprec;,curlyeqsucc;,curlyvee;,curlywedge;,curren,curren;,curvearrowleft;,curvearrowright;,cuvee;,cuwed;,cwconint;,cwint;,cylcty;,dArr;,dHar;,dagger;,daleth;,darr;,dash;,dashv;,dbkarow;,dblac;,dcaron;,dcy;,dd;,ddagger;,ddarr;,ddotseq;,deg,deg;,delta;,demptyv;,dfisht;,dfr;,dharl;,dharr;,diam;,diamond;,diamondsuit;,diams;,die;,digamma;,disin;,div;,divide,divide;,divideontimes;,divonx;,djcy;,dlcorn;,dlcrop;,dollar;,dopf;,dot;,doteq;,doteqdot;,dotminus;,dotplus;,dotsquare;,doublebarwedge;,downarrow;,downdownarrows;,downharpoonleft;,downharpoonright;,drbkarow;,drcorn;,drcrop;,dscr;,dscy;,dsol;,dstrok;,dtdot;,dtri;,dtrif;,duarr;,duhar;,dwangle;,dzcy;,dzigrarr;,eDDot;,eDot;,eacute,eacute;,easter;,ecaron;,ecir;,ecirc,ecirc;,ecolon;,ecy;,edot;,ee;,efDot;,efr;,eg;,egrave,egrave;,egs;,egsdot;,el;,elinters;,ell;,els;,elsdot;,emacr;,empty;,emptyset;,emptyv;,emsp13;,emsp14;,emsp;,eng;,ensp;,eogon;,eopf;,epar;,eparsl;,eplus;,epsi;,epsilon;,epsiv;,eqcirc;,eqcolon;,eqsim;,eqslantgtr;,eqslantless;,equals;,equest;,equiv;,equivDD;,eqvparsl;,erDot;,erarr;,escr;,esdot;,esim;,eta;,eth,eth;,euml,euml;,euro;,excl;,exist;,expectation;,exponentiale;,fallingdotseq;,fcy;,female;,ffilig;,fflig;,ffllig;,ffr;,filig;,fjlig;,flat;,fllig;,fltns;,fnof;,fopf;,forall;,fork;,forkv;,fpartint;,frac12,frac12;,frac13;,frac14,frac14;,frac15;,frac16;,frac18;,frac23;,frac25;,frac34,frac34;,frac35;,frac38;,frac45;,frac56;,frac58;,frac78;,frasl;,frown;,fscr;,gE;,gEl;,gacute;,gamma;,gammad;,gap;,gbreve;,gcirc;,gcy;,gdot;,ge;,gel;,geq;,geqq;,geqslant;,ges;,gescc;,gesdot;,gesdoto;,gesdotol;,gesl;,gesles;,gfr;,gg;,ggg;,gimel;,gjcy;,gl;,glE;,gla;,glj;,gnE;,gnap;,gnapprox;,gne;,gneq;,gneqq;,gnsim;,gopf;,grave;,gscr;,gsim;,gsime;,gsiml;,gt,gt;,gtcc;,gtcir;,gtdot;,gtlPar;,gtquest;,gtrapprox;,gtrarr;,gtrdot;,gtreqless;,gtreqqless;,gtrless;,gtrsim;,gvertneqq;,gvnE;,hArr;,hairsp;,half;,hamilt;,hardcy;,harr;,harrcir;,harrw;,hbar;,hcirc;,hearts;,heartsuit;,hellip;,hercon;,hfr;,hksearow;,hkswarow;,hoarr;,homtht;,hookleftarrow;,hookrightarrow;,hopf;,horbar;,hscr;,hslash;,hstrok;,hybull;,hyphen;,iacute,iacute;,ic;,icirc,icirc;,icy;,iecy;,iexcl,iexcl;,iff;,ifr;,igrave,igrave;,ii;,iiiint;,iiint;,iinfin;,iiota;,ijlig;,imacr;,image;,imagline;,imagpart;,imath;,imof;,imped;,in;,incare;,infin;,infintie;,inodot;,int;,intcal;,integers;,intercal;,intlarhk;,intprod;,iocy;,iogon;,iopf;,iota;,iprod;,iquest,iquest;,iscr;,isin;,isinE;,isindot;,isins;,isinsv;,isinv;,it;,itilde;,iukcy;,iuml,iuml;,jcirc;,jcy;,jfr;,jmath;,jopf;,jscr;,jsercy;,jukcy;,kappa;,kappav;,kcedil;,kcy;,kfr;,kgreen;,khcy;,kjcy;,kopf;,kscr;,lAarr;,lArr;,lAtail;,lBarr;,lE;,lEg;,lHar;,lacute;,laemptyv;,lagran;,lambda;,lang;,langd;,langle;,lap;,laquo,laquo;,larr;,larrb;,larrbfs;,larrfs;,larrhk;,larrlp;,larrpl;,larrsim;,larrtl;,lat;,latail;,late;,lates;,lbarr;,lbbrk;,lbrace;,lbrack;,lbrke;,lbrksld;,lbrkslu;,lcaron;,lcedil;,lceil;,lcub;,lcy;,ldca;,ldquo;,ldquor;,ldrdhar;,ldrushar;,ldsh;,le;,leftarrow;,leftarrowtail;,leftharpoondown;,leftharpoonup;,leftleftarrows;,leftrightarrow;,leftrightarrows;,leftrightharpoons;,leftrightsquigarrow;,leftthreetimes;,leg;,leq;,leqq;,leqslant;,les;,lescc;,lesdot;,lesdoto;,lesdotor;,lesg;,lesges;,lessapprox;,lessdot;,lesseqgtr;,lesseqqgtr;,lessgtr;,lesssim;,lfisht;,lfloor;,lfr;,lg;,lgE;,lhard;,lharu;,lharul;,lhblk;,ljcy;,ll;,llarr;,llcorner;,llhard;,lltri;,lmidot;,lmoust;,lmoustache;,lnE;,lnap;,lnapprox;,lne;,lneq;,lneqq;,lnsim;,loang;,loarr;,lobrk;,longleftarrow;,longleftrightarrow;,longmapsto;,longrightarrow;,looparrowleft;,looparrowright;,lopar;,lopf;,loplus;,lotimes;,lowast;,lowbar;,loz;,lozenge;,lozf;,lpar;,lparlt;,lrarr;,lrcorner;,lrhar;,lrhard;,lrm;,lrtri;,lsaquo;,lscr;,lsh;,lsim;,lsime;,lsimg;,lsqb;,lsquo;,lsquor;,lstrok;,lt,lt;,ltcc;,ltcir;,ltdot;,lthree;,ltimes;,ltlarr;,ltquest;,ltrPar;,ltri;,ltrie;,ltrif;,lurdshar;,luruhar;,lvertneqq;,lvnE;,mDDot;,macr,macr;,male;,malt;,maltese;,map;,mapsto;,mapstodown;,mapstoleft;,mapstoup;,marker;,mcomma;,mcy;,mdash;,measuredangle;,mfr;,mho;,micro,micro;,mid;,midast;,midcir;,middot,middot;,minus;,minusb;,minusd;,minusdu;,mlcp;,mldr;,mnplus;,models;,mopf;,mp;,mscr;,mstpos;,mu;,multimap;,mumap;,nGg;,nGt;,nGtv;,nLeftarrow;,nLeftrightarrow;,nLl;,nLt;,nLtv;,nRightarrow;,nVDash;,nVdash;,nabla;,nacute;,nang;,nap;,napE;,napid;,napos;,napprox;,natur;,natural;,naturals;,nbsp,nbsp;,nbump;,nbumpe;,ncap;,ncaron;,ncedil;,ncong;,ncongdot;,ncup;,ncy;,ndash;,ne;,neArr;,nearhk;,nearr;,nearrow;,nedot;,nequiv;,nesear;,nesim;,nexist;,nexists;,nfr;,ngE;,nge;,ngeq;,ngeqq;,ngeqslant;,nges;,ngsim;,ngt;,ngtr;,nhArr;,nharr;,nhpar;,ni;,nis;,nisd;,niv;,njcy;,nlArr;,nlE;,nlarr;,nldr;,nle;,nleftarrow;,nleftrightarrow;,nleq;,nleqq;,nleqslant;,nles;,nless;,nlsim;,nlt;,nltri;,nltrie;,nmid;,nopf;,not,not;,notin;,notinE;,notindot;,notinva;,notinvb;,notinvc;,notni;,notniva;,notnivb;,notnivc;,npar;,nparallel;,nparsl;,npart;,npolint;,npr;,nprcue;,npre;,nprec;,npreceq;,nrArr;,nrarr;,nrarrc;,nrarrw;,nrightarrow;,nrtri;,nrtrie;,nsc;,nsccue;,nsce;,nscr;,nshortmid;,nshortparallel;,nsim;,nsime;,nsimeq;,nsmid;,nspar;,nsqsube;,nsqsupe;,nsub;,nsubE;,nsube;,nsubset;,nsubseteq;,nsubseteqq;,nsucc;,nsucceq;,nsup;,nsupE;,nsupe;,nsupset;,nsupseteq;,nsupseteqq;,ntgl;,ntilde,ntilde;,ntlg;,ntriangleleft;,ntrianglelefteq;,ntriangleright;,ntrianglerighteq;,nu;,num;,numero;,numsp;,nvDash;,nvHarr;,nvap;,nvdash;,nvge;,nvgt;,nvinfin;,nvlArr;,nvle;,nvlt;,nvltrie;,nvrArr;,nvrtrie;,nvsim;,nwArr;,nwarhk;,nwarr;,nwarrow;,nwnear;,oS;,oacute,oacute;,oast;,ocir;,ocirc,ocirc;,ocy;,odash;,odblac;,odiv;,odot;,odsold;,oelig;,ofcir;,ofr;,ogon;,ograve,ograve;,ogt;,ohbar;,ohm;,oint;,olarr;,olcir;,olcross;,oline;,olt;,omacr;,omega;,omicron;,omid;,ominus;,oopf;,opar;,operp;,oplus;,or;,orarr;,ord;,order;,orderof;,ordf,ordf;,ordm,ordm;,origof;,oror;,orslope;,orv;,oscr;,oslash,oslash;,osol;,otilde,otilde;,otimes;,otimesas;,ouml,ouml;,ovbar;,par;,para,para;,parallel;,parsim;,parsl;,part;,pcy;,percnt;,period;,permil;,perp;,pertenk;,pfr;,phi;,phiv;,phmmat;,phone;,pi;,pitchfork;,piv;,planck;,planckh;,plankv;,plus;,plusacir;,plusb;,pluscir;,plusdo;,plusdu;,pluse;,plusmn,plusmn;,plussim;,plustwo;,pm;,pointint;,popf;,pound,pound;,pr;,prE;,prap;,prcue;,pre;,prec;,precapprox;,preccurlyeq;,preceq;,precnapprox;,precneqq;,precnsim;,precsim;,prime;,primes;,prnE;,prnap;,prnsim;,prod;,profalar;,profline;,profsurf;,prop;,propto;,prsim;,prurel;,pscr;,psi;,puncsp;,qfr;,qint;,qopf;,qprime;,qscr;,quaternions;,quatint;,quest;,questeq;,quot,quot;,rAarr;,rArr;,rAtail;,rBarr;,rHar;,race;,racute;,radic;,raemptyv;,rang;,rangd;,range;,rangle;,raquo,raquo;,rarr;,rarrap;,rarrb;,rarrbfs;,rarrc;,rarrfs;,rarrhk;,rarrlp;,rarrpl;,rarrsim;,rarrtl;,rarrw;,ratail;,ratio;,rationals;,rbarr;,rbbrk;,rbrace;,rbrack;,rbrke;,rbrksld;,rbrkslu;,rcaron;,rcedil;,rceil;,rcub;,rcy;,rdca;,rdldhar;,rdquo;,rdquor;,rdsh;,real;,realine;,realpart;,reals;,rect;,reg,reg;,rfisht;,rfloor;,rfr;,rhard;,rharu;,rharul;,rho;,rhov;,rightarrow;,rightarrowtail;,rightharpoondown;,rightharpoonup;,rightleftarrows;,rightleftharpoons;,rightrightarrows;,rightsquigarrow;,rightthreetimes;,ring;,risingdotseq;,rlarr;,rlhar;,rlm;,rmoust;,rmoustache;,rnmid;,roang;,roarr;,robrk;,ropar;,ropf;,roplus;,rotimes;,rpar;,rpargt;,rppolint;,rrarr;,rsaquo;,rscr;,rsh;,rsqb;,rsquo;,rsquor;,rthree;,rtimes;,rtri;,rtrie;,rtrif;,rtriltri;,ruluhar;,rx;,sacute;,sbquo;,sc;,scE;,scap;,scaron;,sccue;,sce;,scedil;,scirc;,scnE;,scnap;,scnsim;,scpolint;,scsim;,scy;,sdot;,sdotb;,sdote;,seArr;,searhk;,searr;,searrow;,sect,sect;,semi;,seswar;,setminus;,setmn;,sext;,sfr;,sfrown;,sharp;,shchcy;,shcy;,shortmid;,shortparallel;,shy,shy;,sigma;,sigmaf;,sigmav;,sim;,simdot;,sime;,simeq;,simg;,simgE;,siml;,simlE;,simne;,simplus;,simrarr;,slarr;,smallsetminus;,smashp;,smeparsl;,smid;,smile;,smt;,smte;,smtes;,softcy;,sol;,solb;,solbar;,sopf;,spades;,spadesuit;,spar;,sqcap;,sqcaps;,sqcup;,sqcups;,sqsub;,sqsube;,sqsubset;,sqsubseteq;,sqsup;,sqsupe;,sqsupset;,sqsupseteq;,squ;,square;,squarf;,squf;,srarr;,sscr;,ssetmn;,ssmile;,sstarf;,star;,starf;,straightepsilon;,straightphi;,strns;,sub;,subE;,subdot;,sube;,subedot;,submult;,subnE;,subne;,subplus;,subrarr;,subset;,subseteq;,subseteqq;,subsetneq;,subsetneqq;,subsim;,subsub;,subsup;,succ;,succapprox;,succcurlyeq;,succeq;,succnapprox;,succneqq;,succnsim;,succsim;,sum;,sung;,sup1,sup1;,sup2,sup2;,sup3,sup3;,sup;,supE;,supdot;,supdsub;,supe;,supedot;,suphsol;,suphsub;,suplarr;,supmult;,supnE;,supne;,supplus;,supset;,supseteq;,supseteqq;,supsetneq;,supsetneqq;,supsim;,supsub;,supsup;,swArr;,swarhk;,swarr;,swarrow;,swnwar;,szlig,szlig;,target;,tau;,tbrk;,tcaron;,tcedil;,tcy;,tdot;,telrec;,tfr;,there4;,therefore;,theta;,thetasym;,thetav;,thickapprox;,thicksim;,thinsp;,thkap;,thksim;,thorn,thorn;,tilde;,times,times;,timesb;,timesbar;,timesd;,tint;,toea;,top;,topbot;,topcir;,topf;,topfork;,tosa;,tprime;,trade;,triangle;,triangledown;,triangleleft;,trianglelefteq;,triangleq;,triangleright;,trianglerighteq;,tridot;,trie;,triminus;,triplus;,trisb;,tritime;,trpezium;,tscr;,tscy;,tshcy;,tstrok;,twixt;,twoheadleftarrow;,twoheadrightarrow;,uArr;,uHar;,uacute,uacute;,uarr;,ubrcy;,ubreve;,ucirc,ucirc;,ucy;,udarr;,udblac;,udhar;,ufisht;,ufr;,ugrave,ugrave;,uharl;,uharr;,uhblk;,ulcorn;,ulcorner;,ulcrop;,ultri;,umacr;,uml,uml;,uogon;,uopf;,uparrow;,updownarrow;,upharpoonleft;,upharpoonright;,uplus;,upsi;,upsih;,upsilon;,upuparrows;,urcorn;,urcorner;,urcrop;,uring;,urtri;,uscr;,utdot;,utilde;,utri;,utrif;,uuarr;,uuml,uuml;,uwangle;,vArr;,vBar;,vBarv;,vDash;,vangrt;,varepsilon;,varkappa;,varnothing;,varphi;,varpi;,varpropto;,varr;,varrho;,varsigma;,varsubsetneq;,varsubsetneqq;,varsupsetneq;,varsupsetneqq;,vartheta;,vartriangleleft;,vartriangleright;,vcy;,vdash;,vee;,veebar;,veeeq;,vellip;,verbar;,vert;,vfr;,vltri;,vnsub;,vnsup;,vopf;,vprop;,vrtri;,vscr;,vsubnE;,vsubne;,vsupnE;,vsupne;,vzigzag;,wcirc;,wedbar;,wedge;,wedgeq;,weierp;,wfr;,wopf;,wp;,wr;,wreath;,wscr;,xcap;,xcirc;,xcup;,xdtri;,xfr;,xhArr;,xharr;,xi;,xlArr;,xlarr;,xmap;,xnis;,xodot;,xopf;,xoplus;,xotime;,xrArr;,xrarr;,xscr;,xsqcup;,xuplus;,xutri;,xvee;,xwedge;,yacute,yacute;,yacy;,ycirc;,ycy;,yen,yen;,yfr;,yicy;,yopf;,yscr;,yucy;,yuml,yuml;,zacute;,zcaron;,zcy;,zdot;,zeetrf;,zeta;,zfr;,zhcy;,zigrarr;,zopf;,zscr;,zwj;,zwnj;`,Ra=`1Æ1Æ1&1&1Á1Á1Ă1Â1Â1А2𝔄1À1À1Α1Ā1⩓1Ą2𝔸1⁡1Å1Å2𝒜1≔1Ã1Ã1Ä1Ä1∖1⫧1⌆1Б1∵1ℬ1Β2𝔅2𝔹1˘1ℬ1≎1Ч1©1©1Ć1⋒1ⅅ1ℭ1Č1Ç1Ç1Ĉ1∰1Ċ1¸1·1ℭ1Χ1⊙1⊖1⊕1⊗1∲1”1’1∷1⩴1≡1∯1∮1ℂ1∐1∳1⨯2𝒞1⋓1≍1ⅅ1⤑1Ђ1Ѕ1Џ1‡1↡1⫤1Ď1Д1∇1Δ2𝔇1´1˙1˝1\`1˜1⋄1ⅆ2𝔻1¨1⃜1≐1∯1¨1⇓1⇐1⇔1⫤1⟸1⟺1⟹1⇒1⊨1⇑1⇕1∥1↓1⤓1⇵1̑1⥐1⥞1↽1⥖1⥟1⇁1⥗1⊤1↧1⇓2𝒟1Đ1Ŋ1Ð1Ð1É1É1Ě1Ê1Ê1Э1Ė2𝔈1È1È1∈1Ē1◻1▫1Ę2𝔼1Ε1⩵1≂1⇌1ℰ1⩳1Η1Ë1Ë1∃1ⅇ1Ф2𝔉1◼1▪2𝔽1∀1ℱ1ℱ1Ѓ1>1>1Γ1Ϝ1Ğ1Ģ1Ĝ1Г1Ġ2𝔊1⋙2𝔾1≥1⋛1≧1⪢1≷1⩾1≳2𝒢1≫1Ъ1ˇ1^1Ĥ1ℌ1ℋ1ℍ1─1ℋ1Ħ1≎1≏1Е1IJ1Ё1Í1Í1Î1Î1И1İ1ℑ1Ì1Ì1ℑ1Ī1ⅈ1⇒1∬1∫1⋂1⁣1⁢1Į2𝕀1Ι1ℐ1Ĩ1І1Ï1Ï1Ĵ1Й2𝔍2𝕁2𝒥1Ј1Є1Х1Ќ1Κ1Ķ1К2𝔎2𝕂2𝒦1Љ1<1<1Ĺ1Λ1⟪1ℒ1↞1Ľ1Ļ1Л1⟨1←1⇤1⇆1⌈1⟦1⥡1⇃1⥙1⌊1↔1⥎1⊣1↤1⥚1⊲1⧏1⊴1⥑1⥠1↿1⥘1↼1⥒1⇐1⇔1⋚1≦1≶1⪡1⩽1≲2𝔏1⋘1⇚1Ŀ1⟵1⟷1⟶1⟸1⟺1⟹2𝕃1↙1↘1ℒ1↰1Ł1≪1⤅1М1 1ℳ2𝔐1∓2𝕄1ℳ1Μ1Њ1Ń1Ň1Ņ1Н1​1​1​1​1≫1≪1
3
+ 2𝔑1⁠1\xA01ℕ1⫬1≢1≭1∦1∉1≠2≂̸1∄1≯1≱2≧̸2≫̸1≹2⩾̸1≵2≎̸2≏̸1⋪2⧏̸1⋬1≮1≰1≸2≪̸2⩽̸1≴2⪢̸2⪡̸1⊀2⪯̸1⋠1∌1⋫2⧐̸1⋭2⊏̸1⋢2⊐̸1⋣2⊂⃒1⊈1⊁2⪰̸1⋡2≿̸2⊃⃒1⊉1≁1≄1≇1≉1∤2𝒩1Ñ1Ñ1Ν1Œ1Ó1Ó1Ô1Ô1О1Ő2𝔒1Ò1Ò1Ō1Ω1Ο2𝕆1“1‘1⩔2𝒪1Ø1Ø1Õ1Õ1⨷1Ö1Ö1‾1⏞1⎴1⏜1∂1П2𝔓1Φ1Π1±1ℌ1ℙ1⪻1≺1⪯1≼1≾1″1∏1∷1∝2𝒫1Ψ1"1"2𝔔1ℚ2𝒬1⤐1®1®1Ŕ1⟫1↠1⤖1Ř1Ŗ1Р1ℜ1∋1⇋1⥯1ℜ1Ρ1⟩1→1⇥1⇄1⌉1⟧1⥝1⇂1⥕1⌋1⊢1↦1⥛1⊳1⧐1⊵1⥏1⥜1↾1⥔1⇀1⥓1⇒1ℝ1⥰1⇛1ℛ1↱1⧴1Щ1Ш1Ь1Ś1⪼1Š1Ş1Ŝ1С2𝔖1↓1←1→1↑1Σ1∘2𝕊1√1□1⊓1⊏1⊑1⊐1⊒1⊔2𝒮1⋆1⋐1⋐1⊆1≻1⪰1≽1≿1∋1∑1⋑1⊃1⊇1⋑1Þ1Þ1™1Ћ1Ц1 1Τ1Ť1Ţ1Т2𝔗1∴1Θ2  1 1∼1≃1≅1≈2𝕋1⃛2𝒯1Ŧ1Ú1Ú1↟1⥉1Ў1Ŭ1Û1Û1У1Ű2𝔘1Ù1Ù1Ū1_1⏟1⎵1⏝1⋃1⊎1Ų2𝕌1↑1⤒1⇅1↕1⥮1⊥1↥1⇑1⇕1↖1↗1ϒ1Υ1Ů2𝒰1Ũ1Ü1Ü1⊫1⫫1В1⊩1⫦1⋁1‖1‖1∣1|1❘1≀1 2𝔙2𝕍2𝒱1⊪1Ŵ1⋀2𝔚2𝕎2𝒲2𝔛1Ξ2𝕏2𝒳1Я1Ї1Ю1Ý1Ý1Ŷ1Ы2𝔜2𝕐2𝒴1Ÿ1Ж1Ź1Ž1З1Ż1​1Ζ1ℨ1ℤ2𝒵1á1á1ă1∾2∾̳1∿1â1â1´1´1а1æ1æ1⁡2𝔞1à1à1ℵ1ℵ1α1ā1⨿1&1&1∧1⩕1⩜1⩘1⩚1∠1⦤1∠1∡1⦨1⦩1⦪1⦫1⦬1⦭1⦮1⦯1∟1⊾1⦝1∢1Å1⍼1ą2𝕒1≈1⩰1⩯1≊1≋1'1≈1≊1å1å2𝒶1*1≈1≍1ã1ã1ä1ä1∳1⨑1⫭1≌1϶1‵1∽1⋍1⊽1⌅1⌅1⎵1⎶1≌1б1„1∵1∵1⦰1϶1ℬ1β1ℶ1≬2𝔟1⋂1◯1⋃1⨀1⨁1⨂1⨆1★1▽1△1⨄1⋁1⋀1⤍1⧫1▪1▴1▾1◂1▸1␣1▒1░1▓1█2=⃥2≡⃥1⌐2𝕓1⊥1⊥1⋈1╗1╔1╖1╓1═1╦1╩1╤1╧1╝1╚1╜1╙1║1╬1╣1╠1╫1╢1╟1⧉1╕1╒1┐1┌1─1╥1╨1┬1┴1⊟1⊞1⊠1╛1╘1┘1└1│1╪1╡1╞1┼1┤1├1‵1˘1¦1¦2𝒷1⁏1∽1⋍1\\1⧅1⟈1•1•1≎1⪮1≏1≏1ć1∩1⩄1⩉1⩋1⩇1⩀2∩︀1⁁1ˇ1⩍1č1ç1ç1ĉ1⩌1⩐1ċ1¸1¸1⦲1¢1¢1·2𝔠1ч1✓1✓1χ1○1⧃1ˆ1≗1↺1↻1®1Ⓢ1⊛1⊚1⊝1≗1⨐1⫯1⧂1♣1♣1:1≔1≔1,1@1∁1∘1∁1ℂ1≅1⩭1∮2𝕔1∐1©1©1℗1↵1✗2𝒸1⫏1⫑1⫐1⫒1⋯1⤸1⤵1⋞1⋟1↶1⤽1∪1⩈1⩆1⩊1⊍1⩅2∪︀1↷1⤼1⋞1⋟1⋎1⋏1¤1¤1↶1↷1⋎1⋏1∲1∱1⌭1⇓1⥥1†1ℸ1↓1‐1⊣1⤏1˝1ď1д1ⅆ1‡1⇊1⩷1°1°1δ1⦱1⥿2𝔡1⇃1⇂1⋄1⋄1♦1♦1¨1ϝ1⋲1÷1÷1÷1⋇1⋇1ђ1⌞1⌍1$2𝕕1˙1≐1≑1∸1∔1⊡1⌆1↓1⇊1⇃1⇂1⤐1⌟1⌌2𝒹1ѕ1⧶1đ1⋱1▿1▾1⇵1⥯1⦦1џ1⟿1⩷1≑1é1é1⩮1ě1≖1ê1ê1≕1э1ė1ⅇ1≒2𝔢1⪚1è1è1⪖1⪘1⪙1⏧1ℓ1⪕1⪗1ē1∅1∅1∅1 1 1 1ŋ1 1ę2𝕖1⋕1⧣1⩱1ε1ε1ϵ1≖1≕1≂1⪖1⪕1=1≟1≡1⩸1⧥1≓1⥱1ℯ1≐1≂1η1ð1ð1ë1ë1€1!1∃1ℰ1ⅇ1≒1ф1♀1ffi1ff1ffl2𝔣1fi2fj1♭1fl1▱1ƒ2𝕗1∀1⋔1⫙1⨍1½1½1⅓1¼1¼1⅕1⅙1⅛1⅔1⅖1¾1¾1⅗1⅜1⅘1⅚1⅝1⅞1⁄1⌢2𝒻1≧1⪌1ǵ1γ1ϝ1⪆1ğ1ĝ1г1ġ1≥1⋛1≥1≧1⩾1⩾1⪩1⪀1⪂1⪄2⋛︀1⪔2𝔤1≫1⋙1ℷ1ѓ1≷1⪒1⪥1⪤1≩1⪊1⪊1⪈1⪈1≩1⋧2𝕘1\`1ℊ1≳1⪎1⪐1>1>1⪧1⩺1⋗1⦕1⩼1⪆1⥸1⋗1⋛1⪌1≷1≳2≩︀2≩︀1⇔1 1½1ℋ1ъ1↔1⥈1↭1ℏ1ĥ1♥1♥1…1⊹2𝔥1⤥1⤦1⇿1∻1↩1↪2𝕙1―2𝒽1ℏ1ħ1⁃1‐1í1í1⁣1î1î1и1е1¡1¡1⇔2𝔦1ì1ì1ⅈ1⨌1∭1⧜1℩1ij1ī1ℑ1ℐ1ℑ1ı1⊷1Ƶ1∈1℅1∞1⧝1ı1∫1⊺1ℤ1⊺1⨗1⨼1ё1į2𝕚1ι1⨼1¿1¿2𝒾1∈1⋹1⋵1⋴1⋳1∈1⁢1ĩ1і1ï1ï1ĵ1й2𝔧1ȷ2𝕛2𝒿1ј1є1κ1ϰ1ķ1к2𝔨1ĸ1х1ќ2𝕜2𝓀1⇚1⇐1⤛1⤎1≦1⪋1⥢1ĺ1⦴1ℒ1λ1⟨1⦑1⟨1⪅1«1«1←1⇤1⤟1⤝1↩1↫1⤹1⥳1↢1⪫1⤙1⪭2⪭︀1⤌1❲1{1[1⦋1⦏1⦍1ľ1ļ1⌈1{1л1⤶1“1„1⥧1⥋1↲1≤1←1↢1↽1↼1⇇1↔1⇆1⇋1↭1⋋1⋚1≤1≦1⩽1⩽1⪨1⩿1⪁1⪃2⋚︀1⪓1⪅1⋖1⋚1⪋1≶1≲1⥼1⌊2𝔩1≶1⪑1↽1↼1⥪1▄1љ1≪1⇇1⌞1⥫1◺1ŀ1⎰1⎰1≨1⪉1⪉1⪇1⪇1≨1⋦1⟬1⇽1⟦1⟵1⟷1⟼1⟶1↫1↬1⦅2𝕝1⨭1⨴1∗1_1◊1◊1⧫1(1⦓1⇆1⌟1⇋1⥭1‎1⊿1‹2𝓁1↰1≲1⪍1⪏1[1‘1‚1ł1<1<1⪦1⩹1⋖1⋋1⋉1⥶1⩻1⦖1◃1⊴1◂1⥊1⥦2≨︀2≨︀1∺1¯1¯1♂1✠1✠1↦1↦1↧1↤1↥1▮1⨩1м1—1∡2𝔪1℧1µ1µ1∣1*1⫰1·1·1−1⊟1∸1⨪1⫛1…1∓1⊧2𝕞1∓2𝓂1∾1μ1⊸1⊸2⋙̸2≫⃒2≫̸1⇍1⇎2⋘̸2≪⃒2≪̸1⇏1⊯1⊮1∇1ń2∠⃒1≉2⩰̸2≋̸1ʼn1≉1♮1♮1ℕ1\xA01\xA02≎̸2≏̸1⩃1ň1ņ1≇2⩭̸1⩂1н1–1≠1⇗1⤤1↗1↗2≐̸1≢1⤨2≂̸1∄1∄2𝔫2≧̸1≱1≱2≧̸2⩾̸2⩾̸1≵1≯1≯1⇎1↮1⫲1∋1⋼1⋺1∋1њ1⇍2≦̸1↚1‥1≰1↚1↮1≰2≦̸2⩽̸2⩽̸1≮1≴1≮1⋪1⋬1∤2𝕟1¬1¬1∉2⋹̸2⋵̸1∉1⋷1⋶1∌1∌1⋾1⋽1∦1∦2⫽⃥2∂̸1⨔1⊀1⋠2⪯̸1⊀2⪯̸1⇏1↛2⤳̸2↝̸1↛1⋫1⋭1⊁1⋡2⪰̸2𝓃1∤1∦1≁1≄1≄1∤1∦1⋢1⋣1⊄2⫅̸1⊈2⊂⃒1⊈2⫅̸1⊁2⪰̸1⊅2⫆̸1⊉2⊃⃒1⊉2⫆̸1≹1ñ1ñ1≸1⋪1⋬1⋫1⋭1ν1#1№1 1⊭1⤄2≍⃒1⊬2≥⃒2>⃒1⧞1⤂2≤⃒2<⃒2⊴⃒1⤃2⊵⃒2∼⃒1⇖1⤣1↖1↖1⤧1Ⓢ1ó1ó1⊛1⊚1ô1ô1о1⊝1ő1⨸1⊙1⦼1œ1⦿2𝔬1˛1ò1ò1⧁1⦵1Ω1∮1↺1⦾1⦻1‾1⧀1ō1ω1ο1⦶1⊖2𝕠1⦷1⦹1⊕1∨1↻1⩝1ℴ1ℴ1ª1ª1º1º1⊶1⩖1⩗1⩛1ℴ1ø1ø1⊘1õ1õ1⊗1⨶1ö1ö1⌽1∥1¶1¶1∥1⫳1⫽1∂1п1%1.1‰1⊥1‱2𝔭1φ1ϕ1ℳ1☎1π1⋔1ϖ1ℏ1ℎ1ℏ1+1⨣1⊞1⨢1∔1⨥1⩲1±1±1⨦1⨧1±1⨕2𝕡1£1£1≺1⪳1⪷1≼1⪯1≺1⪷1≼1⪯1⪹1⪵1⋨1≾1′1ℙ1⪵1⪹1⋨1∏1⌮1⌒1⌓1∝1∝1≾1⊰2𝓅1ψ1 2𝔮1⨌2𝕢1⁗2𝓆1ℍ1⨖1?1≟1"1"1⇛1⇒1⤜1⤏1⥤2∽̱1ŕ1√1⦳1⟩1⦒1⦥1⟩1»1»1→1⥵1⇥1⤠1⤳1⤞1↪1↬1⥅1⥴1↣1↝1⤚1∶1ℚ1⤍1❳1}1]1⦌1⦎1⦐1ř1ŗ1⌉1}1р1⤷1⥩1”1”1↳1ℜ1ℛ1ℜ1ℝ1▭1®1®1⥽1⌋2𝔯1⇁1⇀1⥬1ρ1ϱ1→1↣1⇁1⇀1⇄1⇌1⇉1↝1⋌1˚1≓1⇄1⇌1‏1⎱1⎱1⫮1⟭1⇾1⟧1⦆2𝕣1⨮1⨵1)1⦔1⨒1⇉1›2𝓇1↱1]1’1’1⋌1⋊1▹1⊵1▸1⧎1⥨1℞1ś1‚1≻1⪴1⪸1š1≽1⪰1ş1ŝ1⪶1⪺1⋩1⨓1≿1с1⋅1⊡1⩦1⇘1⤥1↘1↘1§1§1;1⤩1∖1∖1✶2𝔰1⌢1♯1щ1ш1∣1∥1­1­1σ1ς1ς1∼1⩪1≃1≃1⪞1⪠1⪝1⪟1≆1⨤1⥲1←1∖1⨳1⧤1∣1⌣1⪪1⪬2⪬︀1ь1/1⧄1⌿2𝕤1♠1♠1∥1⊓2⊓︀1⊔2⊔︀1⊏1⊑1⊏1⊑1⊐1⊒1⊐1⊒1□1□1▪1▪1→2𝓈1∖1⌣1⋆1☆1★1ϵ1ϕ1¯1⊂1⫅1⪽1⊆1⫃1⫁1⫋1⊊1⪿1⥹1⊂1⊆1⫅1⊊1⫋1⫇1⫕1⫓1≻1⪸1≽1⪰1⪺1⪶1⋩1≿1∑1♪1¹1¹1²1²1³1³1⊃1⫆1⪾1⫘1⊇1⫄1⟉1⫗1⥻1⫂1⫌1⊋1⫀1⊃1⊇1⫆1⊋1⫌1⫈1⫔1⫖1⇙1⤦1↙1↙1⤪1ß1ß1⌖1τ1⎴1ť1ţ1т1⃛1⌕2𝔱1∴1∴1θ1ϑ1ϑ1≈1∼1 1≈1∼1þ1þ1˜1×1×1⊠1⨱1⨰1∭1⤨1⊤1⌶1⫱2𝕥1⫚1⤩1‴1™1▵1▿1◃1⊴1≜1▹1⊵1◬1≜1⨺1⨹1⧍1⨻1⏢2𝓉1ц1ћ1ŧ1≬1↞1↠1⇑1⥣1ú1ú1↑1ў1ŭ1û1û1у1⇅1ű1⥮1⥾2𝔲1ù1ù1↿1↾1▀1⌜1⌜1⌏1◸1ū1¨1¨1ų2𝕦1↑1↕1↿1↾1⊎1υ1ϒ1υ1⇈1⌝1⌝1⌎1ů1◹2𝓊1⋰1ũ1▵1▴1⇈1ü1ü1⦧1⇕1⫨1⫩1⊨1⦜1ϵ1ϰ1∅1ϕ1ϖ1∝1↕1ϱ1ς2⊊︀2⫋︀2⊋︀2⫌︀1ϑ1⊲1⊳1в1⊢1∨1⊻1≚1⋮1|1|2𝔳1⊲2⊂⃒2⊃⃒2𝕧1∝1⊳2𝓋2⫋︀2⊊︀2⫌︀2⊋︀1⦚1ŵ1⩟1∧1≙1℘2𝔴2𝕨1℘1≀1≀2𝓌1⋂1◯1⋃1▽2𝔵1⟺1⟷1ξ1⟸1⟵1⟼1⋻1⨀2𝕩1⨁1⨂1⟹1⟶2𝓍1⨆1⨄1△1⋁1⋀1ý1ý1я1ŷ1ы1¥1¥2𝔶1ї2𝕪2𝓎1ю1ÿ1ÿ1ź1ž1з1ż1ℨ1ζ2𝔷1ж1⇝2𝕫2𝓏1‍1‌`;let za=!1,Ba=/* @__PURE__ */ new Int32Array,Va=/* @__PURE__ */ new Int32Array,Ha=/* @__PURE__ */ new Uint8Array,Ua=/* @__PURE__ */ new Int32Array;const Wa=/* @__PURE__ */ new Int32Array(128);let Ga=/* @__PURE__ */ new Int32Array;const Ka=[];let qa=0,Ja=0;function newNode(e){let t=qa++;return Ba[t]=-1,Va[t]=-1,Ha[t]=e,Ua[t]=-1,t}function build(){za=!0;let e=18872;Ba=new Int32Array(e),Va=new Int32Array(e),Ha=new Uint8Array(e),Ua=new Int32Array(e),Wa.fill(-1);let t=0;for(let e=0;e<2231;e++){let e=Ra.charCodeAt(t)-48;Ka.push(Ra.slice(t+1,t+1+e)),t+=1+e}let n=0,r=0,i=18871;for(;n<i;){let e=La.charCodeAt(n),t=Wa[e];for(t<0&&(t=newNode(e),Wa[e]=t),n++;n<i;){let e=La.charCodeAt(n);if(e===44)break;let r=Ba[t],i=-1,a=-1;for(;r>=0;){if(Ha[r]===e){i=r;break}a=r,r=Va[r]}i<0&&(i=newNode(e),a<0?Ba[t]=i:Va[a]=i),t=i,n++}Ua[t]=r++,n++}Ga=(/* @__PURE__ */ new Int32Array(16384)).fill(-1);for(let e=0;e<128;e++){let t=Wa[e];if(!(t<0))for(let n=Ba[t];n>=0;n=Va[n])Ga[e*128+Ha[n]]=n}}function matchNamedReference(e,t){za||build(),Ja=0;let n=e.length;if(t>=n)return-1;let r=e.charCodeAt(t);if(r>=128)return-1;let i=Wa[r];if(i<0)return-1;let a=-1,o=0,s=t+1;if(Ua[i]>=0&&(a=Ua[i],o=1),s<n){let t=e.charCodeAt(s),n=t<128?Ga[r*128+t]:-1;if(n<0)return Ja=o,a;i=n,s++,Ua[i]>=0&&(a=Ua[i],o=2)}for(;s<n;){let n=e.charCodeAt(s),r=Ba[i];for(;r>=0&&Ha[r]!==n;)r=Va[r];if(r<0)break;i=r,s++,Ua[i]>=0&&(a=Ua[i],o=s-t)}return Ja=o,a}function matchedLength(){return Ja}function entityValue(e){return Ka[e]}const Ya=new Int32Array([8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376]);function numericReferenceValue(e){return e===0||e>1114111||e>=55296&&e<=57343?`�`:e>=128&&e<=159?String.fromCharCode(Ya[e-128]):String.fromCodePoint(e)}const Xa=/* @__PURE__ */ `.a.abbr.address.applet.area.article.aside.audio.b.base.basefont.bgsound.big.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.dir.div.dl.dt.em.embed.fieldset.figcaption.figure.font.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.image.img.input.ins.kbd.keygen.label.legend.li.link.listing.main.map.mark.marquee.math.menu.menuitem.meta.meter.nav.nobr.noembed.noframes.noscript.object.ol.optgroup.option.output.p.param.picture.plaintext.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.search.section.select.selectedcontent.slot.small.source.span.strike.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.tt.u.ul.var.video.wbr.xmp.path.g.circle.rect.line.polyline.polygon.ellipse.defs.use.symbol.clippath.lineargradient.radialgradient.stop.mask.pattern.text.tspan.textpath.foreignobject.desc.mi.mo.mn.ms.mtext.mrow.annotation-xml.mglyph.malignmark`.split(`.`),Za=/* @__PURE__ */ `.id.class.style.type.name.value.href.src.alt.title.role.for.placeholder.disabled.checked.selected.readonly.required.multiple.hidden.tabindex.lang.dir.width.height.action.method.target.rel.content.charset.colspan.rowspan.data-testid.aria-label.aria-labelledby.aria-describedby.aria-hidden.aria-expanded.aria-selected.aria-checked.aria-pressed.aria-disabled.aria-controls.aria-live.aria-current.aria-haspopup.aria-invalid.aria-required.aria-valuenow.aria-valuemin.aria-valuemax.aria-level.aria-modal.aria-owns.aria-busy.aria-orientation.aria-roledescription.autocomplete.autofocus.min.max.step.pattern.maxlength.minlength.size.accept.label.open.draggable.contenteditable.xmlns.viewbox.d.fill.stroke.x.y.cx.cy.r.points.transform.xlink:href.focusable.form.list.datetime.headers.scope.span.start.reversed.download.enctype.novalidate.inputmode.spellcheck.translate.inert.popover.slot.is.part.loading.decoding.srcset.sizes.media.async.defer.nonce.integrity.crossorigin.referrerpolicy.sandbox.allow.poster.controls.autoplay.loop.muted.kind.srclang.default.wrap.rows.cols.high.low.optimum.shape.coords.usemap.ismap.accesskey.enterkeyhint.itemprop.itemscope.itemtype.http-equiv.property.stroke-width.stroke-linecap.stroke-linejoin.fill-rule.clip-rule.xmlns:xlink.version.preserveaspectratio.encoding.definitionurl.color.face.shadowrootmode`.split(`.`),Qa=1023,$a=/* @__PURE__ */ new Int32Array(1024),eo=/* @__PURE__ */ new Int32Array(1024);function hashName(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)|0;return t}function fillTable(e,t){for(let n=1;n<t.length;n++){let r=hashName(t[n])&Qa;for(;e[r]!==0;)r=r+1&Qa;e[r]=n}}fillTable($a,Xa),fillTable(eo,Za);function fixName(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?String.fromCharCode(r+32):r===0?`�`:e[n]}return t}function isAsciiAlpha(e){return e>=97&&e<=122||e>=65&&e<=90}function isAsciiAlnum(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function isWs$1(e){return e===32||e===10||e===9||e===12}__name(isWs$1,`isWs`);function lower$1(e){return e>=65&&e<=90?e+32:e}__name(lower$1,`lower`);function normalizeNewlines$1(e){let t=e.indexOf(`\r`);if(t<0)return e;let n=``,r=0,i=e.length;for(;t>=0;)n+=e.slice(r,t)+`
4
+ `,r=t+1,r<i&&e.charCodeAt(r)===10&&r++,t=e.indexOf(`\r`,r);return n+e.slice(r)}__name(normalizeNewlines$1,`normalizeNewlines`);function ciMatch(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r++)if(lower$1(e.charCodeAt(t+r))!==n.charCodeAt(r))return!1;return!0}var Tokenizer=class{src;pos;len;state;allowCDATA;processingInstructions;lastStartTag;type;pendingType;text;textHasNull;name;tagId;selfClosing;attrNames;attrValues;attrCount;data;hasName;publicId;hasPublicId;systemId;hasSystemId;forceQuirks;textStart;textBuf;tagStart;nameStart;nameHash;nameFix;isEndTag;valueStart;valueBuf;dropAttr;tempBuf;constructor(){this.src=``,this.pos=0,this.len=0,this.state=0,this.allowCDATA=!1,this.processingInstructions=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.name=``,this.tagId=0,this.selfClosing=!1,this.attrNames=[],this.attrValues=[],this.attrCount=0,this.data=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1,this.textStart=-1,this.textBuf=``,this.tagStart=0,this.nameStart=0,this.nameHash=0,this.nameFix=!1,this.isEndTag=!1,this.valueStart=-1,this.valueBuf=``,this.dropAttr=!1,this.tempBuf=``}reset(e){this.src=normalizeNewlines$1(e),this.pos=0,this.len=this.src.length,this.state=0,this.allowCDATA=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.textStart=-1,this.textBuf=``,this.attrCount=0}release(){this.src=``,this.text=``,this.data=``,this.textBuf=``,this.valueBuf=``,this.attrNames.length=0,this.attrValues.length=0,this.attrCount=0}flushRaw(e){let t=this.textStart;t>=0&&(e>t&&(this.textBuf+=this.src.slice(t,e)),this.textStart=-1)}appendText(e,t){this.flushRaw(t),this.textBuf+=e}startRun(e){this.textStart<0&&(this.textStart=e)}emit(e,t){this.flushRaw(t),this.textBuf.length===0?this.type=e:(this.text=this.textBuf,this.textBuf=``,this.type=1,this.pendingType=e)}emitTextNow(e){return this.flushRaw(e),this.textBuf.length!==0&&(this.text=this.textBuf,this.textBuf=``,this.type=1,!0)}finishTagName(e){let t=this.nameStart,n=e-t,r=this.nameHash&Qa;if(!this.nameFix){for(;;){let e=$a[r];if(e===0)break;let i=Xa[e];if(i.length===n&&this.src.startsWith(i,t)){this.name=i,this.tagId=e;return}r=r+1&Qa}this.name=this.src.slice(t,e),this.tagId=0;return}let i=fixName(this.src.slice(t,e));for(;;){let e=$a[r];if(e===0)break;if(Xa[e]===i){this.name=Xa[e],this.tagId=e;return}r=r+1&Qa}this.name=i,this.tagId=0}finishAttrName(e){let t=this.nameStart,n=e-t,r=``,i=this.nameHash&Qa,a=!1;if(this.nameFix)r=fixName(this.src.slice(t,e));else{for(;;){let e=eo[i];if(e===0)break;let o=Za[e];if(o.length===n&&this.src.startsWith(o,t)){r=o,a=!0;break}i=i+1&Qa}a||(r=this.src.slice(t,e))}let o=this.attrNames,s=this.attrCount;for(let e=0;e<s;e++)if(o[e]===r){this.dropAttr=!0;return}this.dropAttr=!1,s<o.length?(o[s]=r,this.attrValues[s]=``):(o.push(r),this.attrValues.push(``)),this.attrCount=s+1}startValue(){this.valueStart=this.pos,this.valueBuf=``}flushValue(e){this.valueStart>=0&&(e>this.valueStart&&(this.valueBuf+=this.src.slice(this.valueStart,e)),this.valueStart=-1)}finishValue(e){let t=``;this.valueBuf.length===0?t=this.valueStart>=0&&e>this.valueStart?this.src.slice(this.valueStart,e):``:(this.flushValue(e),t=this.valueBuf),this.valueStart=-1,this.valueBuf=``,this.dropAttr||(this.attrValues[this.attrCount-1]=t)}appendValue(e,t){this.flushValue(t),this.valueBuf+=e,this.valueStart=this.pos}newTag(e){this.isEndTag=e,this.selfClosing=!1,this.attrCount=0,this.nameStart=this.pos,this.nameHash=0,this.nameFix=!1}emitTag(){this.isEndTag?this.emit(3,this.tagStart):(this.lastStartTag=this.name,this.emit(2,this.tagStart)),this.state=0}eofInTag(){this.flushRaw(this.tagStart),this.state=0}isAppropriateEndTag(){let e=this.lastStartTag,t=this.nameStart;if(e.length===0||this.pos-t!==e.length)return!1;for(let n=0;n<e.length;n++)if(lower$1(this.src.charCodeAt(t+n))!==e.charCodeAt(n))return!1;return!0}endTagNameStep(){let e=this.pos<this.len?this.src.charCodeAt(this.pos):-1;return isAsciiAlpha(e)?(this.pos++,-2):(isWs$1(e)||e===47||e===62)&&this.isAppropriateEndTag()?(this.name=this.lastStartTag,this.tagId=0,this.isEndTag=!0,this.selfClosing=!1,this.attrCount=0,this.pos++,e===62?(this.finishEndTagId(),this.emitTag(),0):(this.finishEndTagId(),isWs$1(e)?31:39)):-1}finishEndTagId(){let e=this.name,t=hashName(e)&Qa;for(;;){let n=$a[t];if(n===0)break;if(Xa[n]===e){this.tagId=n;return}t=t+1&Qa}this.tagId=0}charRef(e){let t=this.src,n=this.pos,r=this.len;if(n>=r)return null;let i=t.charCodeAt(n);if(isAsciiAlnum(i)){if(i===108&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`<`;if(i===103&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`>`;if(i===97&&t.startsWith(`mp;`,n+1))return this.pos=n+4,`&`;if(i===113&&t.startsWith(`uot;`,n+1))return this.pos=n+5,`"`;if(i===110&&t.startsWith(`bsp;`,n+1))return this.pos=n+5,`\xA0`;let a=matchNamedReference(t,n);if(a<0)return null;let o=n+matchedLength(),s=t.charCodeAt(o-1);if(e&&s!==59&&o<r){let e=t.charCodeAt(o);if(e===61||isAsciiAlnum(e))return null}return this.pos=o,entityValue(a)}if(i!==35)return null;let a=n+1,o=!1;if(a<r){let e=t.charCodeAt(a);(e===120||e===88)&&(o=!0,a++)}let s=0,c=a;for(;a<r;){let e=t.charCodeAt(a),n=-1;if(e>=48&&e<=57?n=e-48:o&&e>=97&&e<=102?n=e-87:o&&e>=65&&e<=70&&(n=e-55),n<0)break;s=s*(o?16:10)+n,s>1114111&&(s=1114112),a++}return a===c?null:(a<r&&t.charCodeAt(a)===59&&a++,this.pos=a,numericReferenceValue(s))}next(){if(this.pendingType!==0)return this.type=this.pendingType,this.pendingType=0,this.textHasNull=!1,this.type;if(this.type===6)return 6;for(this.textHasNull=!1,this.type=0;this.type===0;)this.step();return this.type}step(){let e=this.src,t=this.len;switch(this.state){case 0:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=5;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else for(this.textStart<0&&(this.textStart=n),r===0&&(this.textHasNull=!0),n++;n<t;){let t=e.charCodeAt(n);if(t===60||t===38||t===0)break;n++}}}case 1:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=8;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else r===0?(this.appendText(`�`,n),n++):(this.textStart<0&&(this.textStart=n),n++)}}case 2:case 3:case 4:{let n=this.state,r=this.pos;for(;;){if(r>=t){this.pos=r,this.emit(6,t);return}let i=e.charCodeAt(r);if(i===60&&n!==4){this.textStart<0&&(this.textStart=r),this.tagStart=r,this.pos=r+1,this.state=n===2?11:14;return}i===0?(this.appendText(`�`,r),r++):(this.textStart<0&&(this.textStart=r),r++)}}case 5:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.state=41):n===47?(this.pos++,this.state=6):isAsciiAlpha(n)?(this.newTag(!1),this.state=7):n===63?this.processingInstructions?(this.tempBuf=``,this.pos++,this.state=69):(this.data=``,this.state=40):this.state=0;return}case 6:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)?(this.newTag(!0),this.state=7):n===62?(this.flushRaw(this.tagStart),this.pos++,this.state=0):n===-1?this.state=0:(this.data=``,this.state=40);return}case 7:{let n=this.pos,r=this.nameHash;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let i=e.charCodeAt(n);if(i===62||i===47||isWs$1(i)){this.nameHash=r,this.finishTagName(n),this.pos=n+1,i===62?this.emitTag():this.state=i===47?39:31;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 8:case 11:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.pos++,this.state=this.state===8?9:12):this.state=this.state===8?1:2;return;case 9:case 12:case 15:case 23:{let n=this.pos<t?e.charCodeAt(this.pos):-1,r=this.state;isAsciiAlpha(n)?(this.nameStart=this.pos,this.state=r===9?10:r===12?13:r===15?16:24):this.state=r===9?1:r===12?2:r===15?3:19;return}case 10:case 13:case 16:case 24:{let e=this.state;for(;;){let t=this.endTagNameStep();if(t!==-2){t===-1?this.state=e===10?1:e===13?2:e===16?3:19:t!==0&&(this.state=t);return}}}case 14:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=15):n===33?(this.pos++,this.state=17):this.state=3;return}case 17:case 18:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.startRun(this.pos),this.pos++,this.state=this.state===17?18:21):this.state=3;return;case 19:case 20:case 21:case 26:case 27:case 28:{let n=this.state,r=n>=26,i=r?26:19,a=this.pos;if(a>=t){this.emit(6,t);return}let o=e.charCodeAt(a);o===45?(this.startRun(a),this.pos++,this.state=n===i?i+1:i+2):o===60?(this.startRun(a),this.tagStart=a,this.pos++,this.state=r?29:22):o===62&&n===i+2?(this.startRun(a),this.pos++,this.state=3):o===0?(this.appendText(`�`,a),this.pos++,this.state=i):(this.startRun(a),this.pos++,this.state=i);return}case 22:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=23):isAsciiAlpha(n)?(this.tempBuf=``,this.state=25):this.state=19;return}case 25:case 30:{let n=this.state===25,r=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(r)||r===47||r===62){this.startRun(this.pos),this.pos++;let e=this.tempBuf===`script`;this.state=n?e?26:19:e?19:26}else isAsciiAlpha(r)?(this.startRun(this.pos),this.tempBuf+=String.fromCharCode(lower$1(r)),this.pos++):this.state=n?19:26;return}case 29:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.startRun(this.pos),this.pos++,this.tempBuf=``,this.state=30):this.state=26;return;case 31:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;if(r===47||r===62||r===-1){this.state=33;return}this.nameStart=n,this.nameHash=0+r|0,this.nameFix=r===0||r>=65&&r<=90,this.nameFix&&(this.nameHash=r===0?65533:r+32),this.pos=n+1,this.state=32;return}case 32:{let n=this.pos,r=this.nameHash;for(;;){let i=n<t?e.charCodeAt(n):-1;if(i===-1||isWs$1(i)||i===47||i===62){this.nameHash=r,this.finishAttrName(n),this.pos=n,this.state=33;return}if(i===61){this.nameHash=r,this.finishAttrName(n),this.pos=n+1,this.state=34;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 33:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;if(this.pos=n,n>=t){this.eofInTag();return}let r=e.charCodeAt(n);r===47?(this.pos++,this.state=39):r===61?(this.pos++,this.state=34):r===62?(this.pos++,this.emitTag()):this.state=31;return}case 34:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===34?(this.pos++,this.startValue(),this.state=35):r===39?(this.pos++,this.startValue(),this.state=36):r===62?(this.pos++,this.emitTag()):(this.startValue(),this.state=37);return}case 35:case 36:{let n=this.state===35?34:39,r=this.pos;for(;;){if(r>=t){this.pos=r,this.eofInTag();return}let i=e.charCodeAt(r);if(i===n){this.finishValue(r),this.pos=r+1,this.state=38;return}if(i===38){this.pos=r+1;let e=this.charRef(!0);e===null?r++:(this.appendValue(e,r),r=this.pos)}else i===0&&(this.pos=r+1,this.appendValue(`�`,r)),r++}}case 37:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.finishValue(n),this.pos=n+1,this.state=31;return}if(r===62){this.finishValue(n),this.pos=n+1,this.emitTag();return}if(r===38){this.pos=n+1;let e=this.charRef(!0);e===null?n++:(this.appendValue(e,n),n=this.pos)}else r===0&&(this.pos=n+1,this.appendValue(`�`,n)),n++}}case 38:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=31):n===47?(this.pos++,this.state=39):n===62?(this.pos++,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 39:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.selfClosing=!0,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 40:{let n=this.pos,r=e.indexOf(`>`,n);r<0&&(r=t);let i=e.slice(n,r);i.indexOf(`\0`)>=0&&(i=i.replaceAll(`\0`,`�`)),this.data+=i,this.pos=r<t?r+1:t,this.emit(4,this.tagStart),this.state=0;return}case 41:{if(this.emitTextNow(this.tagStart))return;let n=this.pos;n+1<t&&e.charCodeAt(n)===45&&e.charCodeAt(n+1)===45?(this.pos=n+2,this.data=``,this.state=42):ciMatch(e,n,`doctype`)?(this.pos=n+7,this.state=52):e.startsWith(`[CDATA[`,n)?(this.pos=n+7,this.allowCDATA?this.state=68:(this.data=`[CDATA[`,this.state=40)):(this.data=``,this.state=40);return}case 42:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=43):n===62?(this.pos++,this.emitComment()):this.state=44;return}case 43:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 44:{let n=this.pos,r=n;for(;n<t;){let t=e.charCodeAt(n);if(t===60||t===45||t===0)break;n++}if(n>r&&(this.data+=e.slice(r,n)),this.pos=n,n>=t){this.emitComment();return}let i=e.charCodeAt(n);this.pos++,i===60?(this.data+=`<`,this.state=45):i===45?this.state=49:this.data+=`�`;return}case 45:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.data+=`!`,this.state=46):n===60?(this.pos++,this.data+=`<`):this.state=44;return}case 46:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=47):this.state=44;return;case 47:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=48):this.state=49;return;case 48:this.state=50;return;case 49:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 50:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.emitComment()):n===33?(this.pos++,this.state=51):n===45?(this.pos++,this.data+=`-`):n===-1?this.emitComment():(this.data+=`--`,this.state=44);return}case 51:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.data+=`--!`,this.state=49):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`--!`,this.state=44);return}case 52:{this.name=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1;let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=53):n===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=53;return}case 53:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):(this.hasName=!0,this.name=``,this.state=54);return}case 54:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.forceQuirks=!0,this.emitDoctype();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.pos=n+1,this.state=55;return}if(r===62){this.pos=n+1,this.emitDoctype();return}r>=65&&r<=90?this.name+=String.fromCharCode(r+32):r===0?this.name+=`�`:this.name+=e[n],n++}}case 55:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.emitDoctype()):ciMatch(e,n,`public`)?(this.pos+=6,this.state=56):ciMatch(e,n,`system`)?(this.pos+=6,this.state=62):(this.forceQuirks=!0,this.state=67);return}case 56:case 62:{let n=this.state===56,r=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(r)?(this.pos++,this.state=n?57:63):r===34||r===39?(this.pos++,this.startDoctypeId(n,r)):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 57:case 63:{let n=this.state===57,r=this.pos;for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r;let i=r<t?e.charCodeAt(r):-1;i===34||i===39?(this.pos++,this.startDoctypeId(n,i)):i===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 58:case 59:case 64:case 65:{let n=this.state,r=n===58||n===59,i=n===58||n===64?34:39,a=this.pos,o=``;for(;;){if(a>=t){this.pos=a,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}let n=e.charCodeAt(a);if(n===i){this.pos=a+1,this.appendDoctypeId(r,o),this.state=r?60:66;return}if(n===62){this.pos=a+1,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}o+=n===0?`�`:e[a],a++}}case 60:case 61:{let n=this.state===61,r=this.pos;if(n){for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r}let i=r<t?e.charCodeAt(r):-1;!n&&isWs$1(i)?(this.pos++,this.state=61):i===62?(this.pos++,this.emitDoctype()):i===34||i===39?(this.pos++,this.startDoctypeId(!1,i)):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 66:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===62?(this.pos++,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=67;return}case 67:{let n=e.indexOf(`>`,this.pos);this.pos=n<0?t:n+1,this.emitDoctype();return}case 68:{let n=this.pos,r=e.indexOf(`]]>`,n);if(r<0&&(r=t),r>n&&(this.startRun(n),e.indexOf(`\0`,n)>=0&&e.indexOf(`\0`,n)<r&&(this.textHasNull=!0),this.flushRaw(r)),r>=t){this.pos=t,this.emit(6,t);return}this.pos=r+3,this.state=0;return}case 69:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)||n===95?this.state=70:n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 70:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(n)||n===63||n===62){let e=this.tempBuf,t=fixName(e);t===`xml`||t===`xml-stylesheet`?(this.data=`?`+e,this.state=40):(this.name=e,this.data=``,this.state=71)}else isAsciiAlnum(n)||n===45||n===95?(this.tempBuf+=e[this.pos],this.pos++):n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 71:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n,this.state=72;return}case 72:case 73:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(n===-1){this.flushRaw(this.tagStart),this.state=0;return}if(this.state===73){if(n===62){this.pos++,this.emit(7,this.tagStart),this.state=0;return}this.data+=`?`,this.state=72;return}this.pos++,n===63?this.state=73:n===62?(this.emit(7,this.tagStart),this.state=0):this.data+=e[this.pos-1];return}default:throw Error(`unknown tokenizer state `+String(this.state))}}emitComment(){this.emit(4,this.tagStart),this.state=0}emitDoctype(){this.emit(5,this.tagStart),this.state=0}startDoctypeId(e,t){e?(this.publicId=``,this.hasPublicId=!0,this.state=t===34?58:59):(this.systemId=``,this.hasSystemId=!0,this.state=t===34?64:65)}appendDoctypeId(e,t){e?this.publicId+=t:this.systemId+=t}};const to=1024,no=/* @__PURE__ */ new Int32Array(178);function mark(e,t){for(let n=0;n<t.length;n++)no[t[n]]|=e}mark(1,[4,19,56,119,121,125,73,84,106,122,169,170,171,172,173,174,175,176,177]),mark(2,[85,133]),mark(4,[17]),mark(8,[56,119,122]),mark(16,[3,4,5,6,7,10,11,12,14,15,16,17,19,20,23,24,27,29,32,33,34,35,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,61,64,67,68,69,70,73,75,77,79,81,82,83,84,85,89,90,92,93,103,104,105,106,110,114,116,119,120,121,122,123,124,125,126,128,129,130,133,136,137,169,170,171,172,173,174,175,176,177]),mark(32,[27,35,67,86,87,89,96,97,98,99]),mark(64,[19,24,27,35,67,86,87,89,96,97,98,99,120,121,124,125,126,129]),mark(128,[1,9,13,22,36,41,57,80,101,109,112,113,131,132]),mark(256,[9,13,14,15,16,20,22,27,33,34,35,36,37,46,47,48,49,50,51,52,55,57,60,67,69,75,77,80,85,89,93,100,101,109,111,113,112,115,117,119,131,132,133,134]),mark(512,[17,38,61,84,88,106,123,60]),mark(to,[17,38,61,84,88,106,123]);const ro=/* @__PURE__ */ new Map;for(let e=1;e<Xa.length;e++)ro.set(Xa[e],e);function parserTagId(e){let t=ro.get(e);return t===void 0?0:t}const io=/* @__PURE__ */ `attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`),ao=/* @__PURE__ */ `altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`),oo=/* @__PURE__ */ new Map;for(let e=0;e<io.length;e++)oo.set(io[e].toLowerCase(),io[e]);const so=/* @__PURE__ */ new Map;for(let e=0;e<ao.length;e++)so.set(ao[e].toLowerCase(),ao[e]);const co=/* @__PURE__ */ `+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`);function asciiLower(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90){let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);n+=t>=65&&t<=90?String.fromCharCode(t+32):e[r]}return n}}return e}function isWsCode(e){return e===32||e===10||e===9||e===12||e===13}function isAllWs(e){for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t)))return!1;return!0}function hasNonWsNonNull(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!isWsCode(n)&&n!==0)return!0}return!1}function removeNulls(e){return e.indexOf(`\0`)<0?e:e.replaceAll(`\0`,``)}var TreeSink=class{createElement(e,t,n,r,i,a,o,s,c){return-1}insert(e,t,n){}insertText(e,t,n){}insertComment(e,t,n){}insertProcessingInstruction(e,t,n,r){}insertDoctype(e,t,n,r){}remove(e){}hasParent(e){return!1}reparentChildren(e,t){}addMissingAttributes(e,t,n,r){}templateContents(e){return e}attachDeclarativeShadowRoot(e,t,n,r,i,a){return-1}associateForm(e,t){}setDocumentMode(e){}},ParseOptions=class{scripting;allowDeclarativeShadowRoots;processingInstructions;iframeSrcdoc;constructor(){this.scripting=!1,this.allowDeclarativeShadowRoots=!1,this.processingInstructions=!1,this.iframeSrcdoc=!1}},TreeBuilder=class{sink;tok;hNs;hTag;hName;hIP;hContents;stack;afe;afeTok;ptName;ptId;ptAttrStart;ptAttrCount;poolNames;poolValues;templateModes;mode;originalMode;docHandle;headElement;formElement;fragmentContext;framesetOk;fosterParenting;documentMode;scripting;allowDSD;iframeSrcdoc;stopped;skipNewline;reprocess;ttype;chars;cpos;charsHasNull;pendingTableText;pendingTableNonWs;locParent;locRef;fNames;fValues;fNs;emptyStrings;emptyNumbers;constructor(e){this.sink=e,this.tok=new Tokenizer,this.hNs=[],this.hTag=[],this.hName=[],this.hIP=[],this.hContents=[],this.stack=[],this.afe=[],this.afeTok=[],this.ptName=[],this.ptId=[],this.ptAttrStart=[],this.ptAttrCount=[],this.poolNames=[],this.poolValues=[],this.templateModes=[],this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=!1,this.allowDSD=!1,this.iframeSrcdoc=!1,this.stopped=!1,this.skipNewline=!1,this.reprocess=!1,this.ttype=0,this.chars=``,this.cpos=0,this.charsHasNull=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.locParent=-1,this.locRef=-1,this.fNames=[],this.fValues=[],this.fNs=[],this.emptyStrings=[],this.emptyNumbers=[]}resetState(e){this.hNs.length=0,this.hTag.length=0,this.hName.length=0,this.hIP.length=0,this.hContents.length=0,this.stack.length=0,this.afe.length=0,this.afeTok.length=0,this.ptName.length=0,this.ptId.length=0,this.ptAttrStart.length=0,this.ptAttrCount.length=0,this.poolNames.length=0,this.poolValues.length=0,this.templateModes.length=0,this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=e.scripting,this.allowDSD=e.allowDeclarativeShadowRoots,this.iframeSrcdoc=e.iframeSrcdoc,this.stopped=!1,this.skipNewline=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.tok.processingInstructions=e.processingInstructions}setMeta(e,t,n,r,i){for(;this.hNs.length<=e;)this.hNs.push(0),this.hTag.push(0),this.hName.push(``),this.hIP.push(!1),this.hContents.push(-1);this.hNs[e]=t,this.hTag[e]=n,this.hName[e]=r,this.hIP[e]=i,this.hContents[e]=-1}parseDocument(e,t,n){this.resetState(n),this.docHandle=t,this.setMeta(t,0,0,`#document`,!1),this.tok.reset(e),this.run()}parseFragment(e,t,n,r,i,a,o,s,c){if(this.resetState(c),this.documentMode=s,this.setMeta(t,0,56,`html`,!1),this.setContextMeta(n,r,i,a),this.fragmentContext=n,this.tok.reset(e),i===0){let e=this.hTag[n];e===128||e===123?this.tok.state=1:e===114||e===137||e===58||e===81||e===82?this.tok.state=2:e===103?this.tok.state=3:e===83?this.scripting&&(this.tok.state=2):e===92&&(this.tok.state=4)}this.stack.push(t),i===0&&this.hTag[n]===122&&this.templateModes.push(15),this.resetInsertionMode(),this.formElement=o,this.tok.allowCDATA=this.hNs[this.adjustedCurrentNode()]!==0,this.run()}setContextMeta(e,t,n,r){n===0?this.setMeta(e,n,parserTagId(t),t,!1):(this.setMeta(e,n,0,t,!1),this.setForeignFacts(e,n,t,r))}setForeignFacts(e,t,n,r){let i=0,a=!1;if(t===2){if(n===`mi`)i=169;else if(n===`mo`)i=170;else if(n===`mn`)i=171;else if(n===`ms`)i=172;else if(n===`mtext`)i=173;else if(n===`annotation-xml`){i=174;let e=asciiLower(r);a=e===`text/html`||e===`application/xhtml+xml`}}else t===1&&(n===`foreignObject`?i=175:n===`desc`?i=176:n===`title`&&(i=177),a=i!==0);this.hTag[e]=i,this.hIP[e]=a}run(){let e=this.tok;for(;!this.stopped;){let t=e.next();if(this.ttype=t,t===1){if(this.chars=e.text,this.cpos=0,this.charsHasNull=e.textHasNull,this.skipNewline&&(this.skipNewline=!1,this.chars.charCodeAt(0)===10)){if(this.chars.length===1)continue;this.cpos=1}}else this.skipNewline=!1;if(this.processToken(),t===6)break;e.allowCDATA=this.stack.length!==0&&this.hNs[this.adjustedCurrentNode()]!==0}this.stack.length=0,e.release(),this.chars=``,this.pendingTableText=``}processToken(){do this.reprocess=!1,this.useHtmlRules()?this.dispatchMode(this.mode):this.foreignContent();while(this.reprocess&&!this.stopped)}useHtmlRules(){if(this.stack.length===0)return!0;let e=this.adjustedCurrentNode();if(this.hNs[e]===0)return!0;let t=this.ttype;if(t===6)return!0;let n=this.hTag[e];return!!(n>=169&&n<=173&&(t===1||t===2&&this.tok.tagId!==167&&this.tok.tagId!==168)||n===174&&t===2&&this.tok.tagId===118||this.hIP[e]&&(t===2||t===1))}dispatchMode(e){switch(e){case 0:return this.initial();case 1:return this.beforeHtml();case 2:return this.beforeHead();case 3:return this.inHead();case 4:return this.inHeadNoscript();case 5:return this.afterHead();case 6:return this.inBody();case 7:return this.text();case 8:return this.inTable();case 9:return this.inTableText();case 10:return this.inCaption();case 11:return this.inColumnGroup();case 12:return this.inTableBody();case 13:return this.inRow();case 14:return this.inCell();case 15:return this.inTemplate();case 16:return this.afterBody();case 17:return this.inFrameset();case 18:return this.afterFrameset();case 19:return this.afterAfterBody();case 20:return this.afterAfterFrameset()}}currentNode(){return this.stack[this.stack.length-1]}adjustedCurrentNode(){let e=this.stack;return this.fragmentContext>=0&&e.length===1?this.fragmentContext:e[e.length-1]}isHtml(e,t){return this.hTag[e]===t&&this.hNs[e]===0}isHtmlNamedAsToken(e){if(this.hNs[e]!==0)return!1;let t=this.tok.tagId;return t===0?this.hName[e]===this.tok.name:this.hTag[e]===t}currentIs(e){return this.isHtml(this.currentNode(),e)}pop(){this.stack.pop()}popUntil(e){let t=this.stack;for(;t.length!==0;){let n=t.pop();if(this.hTag[n]===e&&this.hNs[n]===0)return}}popUntilNode(e){let t=this.stack;for(;t.length!==0;)if(t.pop()===e)return}popUntilNamedAsToken(){let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.isHtmlNamedAsToken(t))return}}stackIndexOf(e){let t=this.stack;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}inScope(e,t){let n=this.stack;for(let r=n.length-1;r>=0;r--){let i=n[r],a=this.hTag[i];if(a===e&&this.hNs[i]===0)return!0;let o=no[a];if(t===8){if(o&8&&this.hNs[i]===0)return!1}else if(o&(1|t)&&(o&1||this.hNs[i]===0))return!1}return!1}tokenNameInScope(e){let t=this.tok.tagId;if(t!==0)return this.inScope(t,e);let n=this.stack,r=this.tok.name;for(let t=n.length-1;t>=0;t--){let i=n[t];if(this.hNs[i]===0&&this.hTag[i]===0&&this.hName[i]===r)return!0;let a=no[this.hTag[i]];if(e===8){if(a&8&&this.hNs[i]===0)return!1}else if(a&(1|e)&&(a&1||this.hNs[i]===0))return!1}return!1}nodeInScope(e){let t=this.stack;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r===e)return!0;if(no[this.hTag[r]]&1)return!1}return!1}isSpecial(e){return!!(no[this.hTag[e]]&16)&&(this.hNs[e]===0||this.hTag[e]>=169)}templateInStack(){let e=this.stack;for(let t=e.length-1;t>=0;t--)if(this.isHtml(e[t],122))return!0;return!1}parsingTemplateContents(){if(this.templateInStack())return!0;let e=this.fragmentContext;return e>=0&&this.isHtml(e,122)}generateImpliedEndTags(e){let t=this.stack;for(;;){let n=t[t.length-1],r=this.hTag[n];if(this.hNs[n]!==0||!(no[r]&32)||r===e)return;t.pop()}}generateImpliedEndTagsThoroughly(){let e=this.stack;for(;;){let t=e[e.length-1];if(this.hNs[t]!==0||!(no[this.hTag[t]]&64))return;e.pop()}}closePElement(){this.generateImpliedEndTags(89),this.popUntil(89)}closePIfInButtonScope(){this.inScope(89,4)&&this.closePElement()}resetInsertionMode(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t],r=t===0;if(r&&this.fragmentContext>=0&&(n=this.fragmentContext),this.hNs[n]===0)switch(this.hTag[n]){case 121:case 125:if(!r){this.mode=14;return}break;case 129:this.mode=13;return;case 120:case 126:case 124:this.mode=12;return;case 19:this.mode=10;return;case 24:this.mode=11;return;case 119:this.mode=8;return;case 122:this.mode=this.templateModes[this.templateModes.length-1];return;case 52:if(!r){this.mode=3;return}break;case 15:this.mode=6;return;case 45:this.mode=17;return;case 56:this.mode=this.headElement<0?2:5;return}if(r){this.mode=6;return}}this.mode=6}appropriatePlace(e){let t=e>=0?e:this.currentNode();if(this.locRef=-1,this.fosterParenting&&this.hNs[t]===0){let e=this.hTag[t];if(e===119||e===120||e===124||e===126||e===129){let e=this.stack,n=-1,r=-1;for(let t=e.length-1;t>=0;t--){let i=e[t];if(this.hNs[i]===0&&(n<0&&this.hTag[i]===122&&(n=t),r<0&&this.hTag[i]===119&&(r=t),n>=0&&r>=0))break}if(n>=0&&(r<0||n>r))t=e[n];else if(r<0){this.locParent=e[0];return}else if(this.sink.hasParent(e[r])){this.locParent=-1,this.locRef=e[r];return}else t=e[r-1]}}if(this.hNs[t]===0&&this.hTag[t]===122){let e=this.hContents[t];e>=0&&(t=e)}this.locParent=t}insertChars(e){e.length!==0&&(this.appropriatePlace(-1),this.locParent!==this.docHandle&&this.sink.insertText(this.locParent,this.locRef,e))}insertComment(e){e>=0?this.sink.insertComment(e,-1,this.tok.data):(this.appropriatePlace(-1),this.sink.insertComment(this.locParent,this.locRef,this.tok.data))}insertPI(e){e>=0?this.sink.insertProcessingInstruction(e,-1,this.tok.name,this.tok.data):(this.appropriatePlace(-1),this.sink.insertProcessingInstruction(this.locParent,this.locRef,this.tok.name,this.tok.data))}recordElement(e,t,n,r){e===this.hNs.length?(this.hNs.push(t),this.hTag.push(n),this.hName.push(r),this.hIP.push(!1),this.hContents.push(-1)):this.setMeta(e,t,n,r,!1)}createHtmlElement(e,t,n){let r=this.tok,i=this.sink.createElement(e,0,this.locParent,this.locRef,n?r.attrNames:this.emptyStrings,n?r.attrValues:this.emptyStrings,this.emptyNumbers,n?r.attrCount:0,!1);this.recordElement(i,0,t,e),t===122&&(this.hContents[i]=this.sink.templateContents(i));let a=this.formElement;return a>=0&&no[t]&512&&this.fragmentContext<0&&!this.parsingTemplateContents()&&(no[t]&to&&n&&this.tokenHasAttr(`form`)||this.sink.associateForm(i,a)),i}tokenHasAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return!0;return!1}tokenAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return t.attrValues[n];return null}insertHtmlElement(){this.appropriatePlace(-1);let e=this.tok,t=this.createHtmlElement(e.name,e.tagId,!0);return this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),t}insertHtmlElementNamed(e,t){this.appropriatePlace(-1);let n=this.createHtmlElement(e,t,!1);return this.sink.insert(this.locParent,this.locRef,n),this.stack.push(n),n}insertVoidHtmlElement(){this.insertHtmlElement(),this.stack.pop()}insertForeignElement(e,t){let n=this.tok,r=n.name;if(e===1&&t){let e=so.get(r);e!==void 0&&(r=e)}let i=this.fNames,a=this.fValues,o=this.fNs;i.length=0,a.length=0,o.length=0;let s=``;for(let t=0;t<n.attrCount;t++){let r=n.attrNames[t],c=n.attrValues[t],l=0;if(e===2)r===`definitionurl`?r=`definitionURL`:r===`encoding`&&(s=c);else if(e===1){let e=oo.get(r);e!==void 0&&(r=e)}r.charCodeAt(0)===120&&(r===`xlink:actuate`||r===`xlink:arcrole`||r===`xlink:href`||r===`xlink:role`||r===`xlink:show`||r===`xlink:title`||r===`xlink:type`?(l=1,r=r.slice(6)):r===`xml:lang`||r===`xml:space`?(l=2,r=r.slice(4)):r===`xmlns`?l=3:r===`xmlns:xlink`&&(l=3,r=`xlink`)),i.push(r),a.push(c),o.push(l)}this.appropriatePlace(-1);let c=this.sink.createElement(r,e,this.locParent,this.locRef,i,a,o,i.length,!0);return this.recordElement(c,e,0,r),this.setForeignFacts(c,e,r,s),this.sink.insert(this.locParent,this.locRef,c),this.stack.push(c),c}storeToken(){let e=this.tok,t=this.ptName.length;this.ptName.push(e.name),this.ptId.push(e.tagId),this.ptAttrStart.push(this.poolNames.length),this.ptAttrCount.push(e.attrCount);for(let t=0;t<e.attrCount;t++)this.poolNames.push(e.attrNames[t]),this.poolValues.push(e.attrValues[t]);return t}sameAsToken(e){let t=this.tok;if(this.ptName[e]!==t.name)return!1;let n=this.ptAttrCount[e];if(n!==t.attrCount)return!1;let r=this.ptAttrStart[e];for(let e=0;e<n;e++){let i=this.poolNames[r+e],a=!1;for(let o=0;o<n;o++)if(t.attrNames[o]===i){a=t.attrValues[o]===this.poolValues[r+e];break}if(!a)return!1}return!0}pushFormatting(e){let t=this.afe,n=0,r=-1;for(let e=t.length-1;e>=0&&t[e]!==-1;e--)this.sameAsToken(this.afeTok[e])&&(n++,r=e);n>=3&&(t.splice(r,1),this.afeTok.splice(r,1)),t.push(e),this.afeTok.push(this.storeToken())}insertMarker(){this.afe.push(-1),this.afeTok.push(-1)}clearToLastMarker(){let e=this.afe;for(;e.length!==0;)if(this.afeTok.pop(),e.pop()===-1)return}afeIndexOf(e){let t=this.afe;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}createFromStored(e){let t=this.ptAttrStart[e],n=this.ptAttrCount[e],r=this.emptyStrings,i=this.emptyStrings;n!==0&&(r=this.poolNames.slice(t,t+n),i=this.poolValues.slice(t,t+n));let a=this.ptName[e],o=this.ptId[e],s=this.sink.createElement(a,0,this.locParent,this.locRef,r,i,this.emptyNumbers,n,!1);return this.recordElement(s,0,o,a),s}reconstructFormatting(){let e=this.afe,t=e.length;if(t===0)return;let n=e[t-1];if(n===-1||this.stackIndexOf(n)>=0)return;let r=t-1;for(;r>0;)if(r--,n=e[r],n===-1||this.stackIndexOf(n)>=0){r++;break}for(;r<e.length;r++){this.appropriatePlace(-1);let t=this.createFromStored(this.afeTok[r]);this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),e[r]=t}}adoptionAgency(){let e=this.stack,t=this.afe,n=this.currentNode();if(this.isHtmlNamedAsToken(n)&&this.afeIndexOf(n)<0)e.pop();else for(let n=0;n<8;n++){let n=-1;for(let e=t.length-1;e>=0;e--){let r=t[e];if(r===-1)break;if(this.isHtmlNamedAsToken(r)){n=e;break}}if(n<0){this.anyOtherEndTagInBody();return}let r=t[n],i=this.stackIndexOf(r);if(i<0){t.splice(n,1),this.afeTok.splice(n,1);return}if(!this.nodeInScope(r))return;let a=-1;for(let t=i+1;t<e.length;t++)if(this.isSpecial(e[t])){a=t;break}if(a<0){e.length=i,t.splice(n,1),this.afeTok.splice(n,1);return}let o=e[a],s=e[i-1],c=n,l=o,u=o,d=a,m=0;for(;m++,d--,l=e[d],l!==r;){let n=this.afeIndexOf(l);if(m>3&&n>=0&&(t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,n=-1),n<0){e.splice(d,1);continue}this.locParent=s,this.locRef=-1;let r=this.createFromStored(this.afeTok[n]);t[n]=r,e[d]=r,l=r,u===o&&(c=n+1),this.sink.insert(l,-1,u),u=l}this.appropriatePlace(s),this.sink.insert(this.locParent,this.locRef,u),n=this.afeIndexOf(r),this.locParent=o,this.locRef=-1;let h=this.afeTok[n],_=this.createFromStored(h);this.sink.reparentChildren(o,_),this.sink.insert(o,-1,_),t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,t.splice(c,0,_),this.afeTok.splice(c,0,h),e.splice(this.stackIndexOf(r),1),e.splice(this.stackIndexOf(o)+1,0,_)}}skipWs(){let e=this.chars,t=this.cpos;for(;t<e.length&&isWsCode(e.charCodeAt(t));)t++;return this.cpos=t,t<e.length}insertLeadingWs(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.insertChars(t===0&&n===e.length?e:e.slice(t,n)),this.cpos=n,n<e.length}restChars(){return this.cpos===0?this.chars:this.chars.slice(this.cpos)}bodyChars(e){this.charsHasNull&&(e=removeNulls(e)),e.length!==0&&(this.reconstructFormatting(),this.insertChars(e),this.framesetOk&&!isAllWs(e)&&(this.framesetOk=!1))}initial(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:if(this.sink.insertDoctype(this.docHandle,e.hasName?e.name:``,e.publicId,e.systemId),!this.iframeSrcdoc){let e=this.doctypeMode();e!==0&&this.setDocumentMode(e)}this.mode=1;return}this.iframeSrcdoc||this.setDocumentMode(1),this.mode=1,this.reprocess=!0}setDocumentMode(e){this.documentMode=e,this.sink.setDocumentMode(e)}doctypeMode(){let e=this.tok;if(e.forceQuirks||!e.hasName||e.name!==`html`)return 1;let t=e.hasPublicId?asciiLower(e.publicId):``,n=e.hasSystemId?asciiLower(e.systemId):``;if(e.hasPublicId){if(t===`-//w3o//dtd w3 html strict 3.0//en//`||t===`-/w3c/dtd html 4.0 transitional/en`||t===`html`)return 1;for(let e=0;e<co.length;e++)if(t.startsWith(co[e]))return 1}if(e.hasSystemId&&n===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return 1;if(e.hasPublicId){let r=t.startsWith(`-//w3c//dtd html 4.01 frameset//`)||t.startsWith(`-//w3c//dtd html 4.01 transitional//`),i=!e.hasSystemId||n===``;if(i&&r)return 1;if(t.startsWith(`-//w3c//dtd xhtml 1.0 frameset//`)||t.startsWith(`-//w3c//dtd xhtml 1.0 transitional//`)||!i&&r)return 2}return 0}beforeHtml(){let e=this.tok;switch(this.ttype){case 5:return;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 1:if(!this.skipWs())return;break;case 2:if(e.tagId===56){this.locParent=this.docHandle,this.locRef=-1;let e=this.createHtmlElement(`html`,56,!0);this.sink.insert(this.docHandle,-1,e),this.stack.push(e),this.mode=2;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.locParent=this.docHandle,this.locRef=-1;let t=this.createHtmlElement(`html`,56,!1);this.sink.insert(this.docHandle,-1,t),this.stack.push(t),this.mode=2,this.reprocess=!0}beforeHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===52){this.headElement=this.insertHtmlElement(),this.mode=3;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.headElement=this.insertHtmlElementNamed(`head`,52),this.mode=3,this.reprocess=!0}genericTextElement(e){this.insertHtmlElement(),this.tok.state=e,this.originalMode=this.mode,this.mode=7}inHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 10:case 11:case 12:case 68:case 77:this.insertVoidHtmlElement();return;case 128:this.genericTextElement(1);return;case 83:this.scripting?this.genericTextElement(2):(this.insertHtmlElement(),this.mode=4);return;case 82:case 114:this.genericTextElement(2);return;case 103:this.genericTextElement(3);return;case 122:this.templateStartTag();return;case 52:return}break;case 3:switch(e.tagId){case 52:this.pop(),this.mode=5;return;case 15:case 56:case 16:break;case 122:this.templateEndTag();return;default:return}}this.pop(),this.mode=5,this.reprocess=!0}templateStartTag(){this.insertMarker(),this.framesetOk=!1,this.mode=15,this.templateModes.push(15);let e=this.currentNode(),t=e===this.stack[0],n=this.allowDSD&&!t?this.tokenAttr(`shadowrootmode`):null,r=n===null?``:asciiLower(n);if(r===`open`||r===`closed`){this.appropriatePlace(-1);let t=this.sink.attachDeclarativeShadowRoot(e,r,this.tokenHasAttr(`shadowrootdelegatesfocus`),this.tokenHasAttr(`shadowrootserializable`),asciiLower(this.tokenAttr(`shadowrootslotassignment`)??``)===`manual`?`manual`:`named`,this.tokenHasAttr(`shadowrootclonable`));if(t>=0){let e=this.createHtmlElement(this.tok.name,122,!0);this.recordElement(t,0,0,`#shadow-root`),this.hContents[e]=t,this.stack.push(e);return}}this.insertHtmlElement()}templateEndTag(){this.templateInStack()&&(this.generateImpliedEndTagsThoroughly(),this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode())}inHeadNoscript(){let e=this.tok;switch(this.ttype){case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 11:case 12:case 68:case 77:case 82:case 114:this.inHead();return;case 52:case 83:return}break;case 3:if(e.tagId===83){this.pop(),this.mode=3;return}if(e.tagId!==16)return;break;case 1:if(!this.insertLeadingWs())return;break;case 4:case 7:this.inHead();return}this.pop(),this.mode=3,this.reprocess=!0}afterHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 15:this.insertHtmlElement(),this.framesetOk=!1,this.mode=6;return;case 45:this.insertHtmlElement(),this.mode=17;return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:{let e=this.headElement;this.stack.push(e),this.inHead();let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1);return}case 52:return}break;case 3:switch(e.tagId){case 122:this.inHead();return;case 15:case 56:case 16:break;default:return}}this.insertHtmlElementNamed(`body`,15),this.framesetOk=!0,this.mode=6,this.reprocess=!0}inBody(){switch(this.ttype){case 1:this.bodyChars(this.restChars());return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 6:if(this.templateModes.length!==0){this.inTemplate();return}this.stopped=!0;return;case 2:this.inBodyStartTag();return;case 3:this.inBodyEndTag();return}}inBodyStartTag(){let e=this.tok,t=this.stack;switch(e.tagId){case 56:if(this.templateInStack())return;this.sink.addMissingAttributes(t[0],e.attrNames,e.attrValues,e.attrCount);return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 15:if(t.length===1||!this.isHtml(t[1],15)||this.templateInStack())return;this.framesetOk=!1,this.sink.addMissingAttributes(t[1],e.attrNames,e.attrValues,e.attrCount);return;case 45:if(t.length===1||!this.isHtml(t[1],15)||!this.framesetOk)return;this.sink.remove(t[1]),t.length=1,this.insertHtmlElement(),this.mode=17;return;case 3:case 6:case 7:case 14:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 70:case 75:case 79:case 85:case 89:case 104:case 105:case 116:case 133:this.closePIfInButtonScope(),this.insertHtmlElement();return;case 46:case 47:case 48:case 49:case 50:case 51:{this.closePIfInButtonScope();let e=this.currentNode(),t=this.hTag[e];this.hNs[e]===0&&t>=46&&t<=51&&this.pop(),this.insertHtmlElement();return}case 93:case 69:this.closePIfInButtonScope(),this.insertHtmlElement(),this.skipNewline=!0,this.framesetOk=!1;return;case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;this.closePIfInButtonScope();let t=this.insertHtmlElement();e||(this.formElement=t);return}case 67:case 27:case 35:{this.framesetOk=!1;let n=e.tagId===67;for(let e=t.length-1;e>=0;e--){let r=t[e],i=this.hNs[r]===0?this.hTag[r]:-1;if(n?i===67:i===27||i===35){this.generateImpliedEndTags(i),this.popUntil(i);break}if(this.isSpecial(r)&&i!==3&&i!==33&&i!==89)break}this.closePIfInButtonScope(),this.insertHtmlElement();return}case 92:this.closePIfInButtonScope(),this.insertHtmlElement(),e.state=4;return;case 17:this.inScope(17,0)&&(this.generateImpliedEndTags(0),this.popUntil(17)),this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return;case 1:{let e=this.afe;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===-1)break;if(this.isHtml(r,1)){this.adoptionAgency();let n=this.afeIndexOf(r);n>=0&&(e.splice(n,1),this.afeTok.splice(n,1));let i=this.stackIndexOf(r);i>=0&&t.splice(i,1);break}}this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return}case 9:case 13:case 22:case 36:case 41:case 57:case 101:case 109:case 112:case 113:case 131:case 132:this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return;case 80:this.reconstructFormatting(),this.inScope(80,0)&&(this.adoptionAgency(),this.reconstructFormatting()),this.pushFormatting(this.insertHtmlElement());return;case 4:case 73:case 84:this.reconstructFormatting(),this.insertHtmlElement(),this.insertMarker(),this.framesetOk=!1;return;case 119:this.documentMode!==1&&this.closePIfInButtonScope(),this.insertHtmlElement(),this.framesetOk=!1,this.mode=8;return;case 5:case 16:case 37:case 60:case 64:case 136:this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 61:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;this.inScope(106,0)&&this.popUntil(106),this.reconstructFormatting(),this.insertVoidHtmlElement();let t=this.tokenAttr(`type`);(t===null||asciiLower(t)!==`hidden`)&&(this.framesetOk=!1);return}case 90:case 110:case 130:this.insertVoidHtmlElement();return;case 55:this.closePIfInButtonScope(),this.inScope(106,0)&&this.generateImpliedEndTags(0),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 59:e.name=`img`,e.tagId=60,this.reprocess=!0;return;case 123:this.insertHtmlElement(),this.skipNewline=!0,e.state=1,this.originalMode=this.mode,this.framesetOk=!1,this.mode=7;return;case 137:this.closePIfInButtonScope(),this.reconstructFormatting(),this.framesetOk=!1,this.genericTextElement(2);return;case 58:this.framesetOk=!1,this.genericTextElement(2);return;case 81:this.genericTextElement(2);return;case 83:if(this.scripting){this.genericTextElement(2);return}break;case 106:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;if(this.inScope(106,0)){this.popUntil(106);return}this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return}case 87:this.inScope(106,0)?this.generateImpliedEndTags(86):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 86:this.inScope(106,0)?this.generateImpliedEndTags(0):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 96:case 99:this.inScope(100,0)&&this.generateImpliedEndTags(0),this.insertHtmlElement();return;case 97:case 98:this.inScope(100,0)&&this.generateImpliedEndTags(99),this.insertHtmlElement();return;case 74:this.reconstructFormatting(),this.insertForeignElement(2,!1),e.selfClosing&&this.pop();return;case 118:this.reconstructFormatting(),this.insertForeignElement(1,!1),e.selfClosing&&this.pop();return;case 19:case 23:case 24:case 44:case 52:case 120:case 121:case 124:case 125:case 126:case 129:return}this.reconstructFormatting(),this.insertHtmlElement()}inBodyEndTag(){let e=this.tok;switch(e.tagId){case 122:this.inHead();return;case 15:if(!this.inScope(15,0))return;this.mode=16;return;case 56:if(!this.inScope(15,0))return;this.mode=16,this.reprocess=!0;return;case 3:case 6:case 7:case 14:case 17:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 69:case 70:case 75:case 79:case 85:case 93:case 104:case 105:case 106:case 116:case 133:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t);return}case 43:if(this.parsingTemplateContents()){if(!this.inScope(43,0))return;this.generateImpliedEndTags(0),this.popUntil(43)}else{let e=this.formElement;if(this.formElement=-1,e<0||!this.nodeInScope(e))return;this.generateImpliedEndTags(0);let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1)}return;case 89:this.inScope(89,4)||this.insertHtmlElementNamed(`p`,89),this.closePElement();return;case 67:if(!this.inScope(67,2))return;this.generateImpliedEndTags(67),this.popUntil(67);return;case 27:case 35:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(t),this.popUntil(t);return}case 46:case 47:case 48:case 49:case 50:case 51:{if(!this.inScope(46,0)&&!this.inScope(47,0)&&!this.inScope(48,0)&&!this.inScope(49,0)&&!this.inScope(50,0)&&!this.inScope(51,0))return;this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop(),n=this.hTag[t];if(this.hNs[t]===0&&n>=46&&n<=51)break}return}case 1:case 9:case 13:case 22:case 36:case 41:case 57:case 80:case 101:case 109:case 112:case 113:case 131:case 132:this.adoptionAgency();return;case 4:case 73:case 84:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t),this.clearToLastMarker();return}case 16:e.attrCount=0,this.ttype=2,this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return}this.anyOtherEndTagInBody()}anyOtherEndTagInBody(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t];if(this.isHtmlNamedAsToken(n)){let n=this.tok.tagId;this.generateImpliedEndTags(n===0?-1:n),e.length=t;return}if(this.isSpecial(n))return}}text(){switch(this.ttype){case 1:this.insertChars(this.restChars());return;case 6:this.pop(),this.mode=this.originalMode,this.reprocess=!0;return;case 3:this.pop(),this.mode=this.originalMode;return}}clearStackBackTo(e,t,n){let r=this.stack;for(;;){let i=r[r.length-1];if(this.hNs[i]===0){let r=this.hTag[i];if(r===e||r===t||r===n||r===122||r===56)return}r.pop()}}inTable(){let e=this.tok;switch(this.ttype){case 1:{let e=this.currentNode();if(this.hNs[e]===0){let t=this.hTag[e];if(t===119||t===120||t===122||t===124||t===126||t===129){this.pendingTableText=``,this.pendingTableNonWs=!1,this.originalMode=this.mode,this.mode=9,this.reprocess=!0;return}}break}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 19:this.clearStackBackTo(119,119,119),this.insertMarker(),this.insertHtmlElement(),this.mode=10;return;case 24:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=11;return;case 23:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`colgroup`,24),this.mode=11,this.reprocess=!0;return;case 120:case 124:case 126:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=12;return;case 121:case 125:case 129:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`tbody`,120),this.mode=12,this.reprocess=!0;return;case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode(),this.reprocess=!0;return;case 114:case 103:case 122:this.inHead();return;case 61:{let e=this.tokenAttr(`type`);if(e===null||asciiLower(e)!==`hidden`)break;this.insertVoidHtmlElement();return}case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;let t=this.insertHtmlElement();e||(this.formElement=t),this.pop();return}}break;case 3:switch(e.tagId){case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode();return;case 15:case 19:case 23:case 24:case 56:case 120:case 121:case 124:case 125:case 126:case 129:return;case 122:this.inHead();return}break;case 6:this.inBody();return}this.fosterParenting=!0,this.inBody(),this.fosterParenting=!1}inTableText(){if(this.ttype===1){let e=this.restChars();if(this.charsHasNull&&(e=removeNulls(e)),e.length===0)return;this.pendingTableText+=e,!this.pendingTableNonWs&&!isAllWs(e)&&(this.pendingTableNonWs=!0);return}let e=this.pendingTableText;if(this.pendingTableText=``,e.length!==0){if(this.pendingTableNonWs){let t=this.charsHasNull;this.charsHasNull=!1,this.fosterParenting=!0,this.bodyChars(e),this.fosterParenting=!1,this.charsHasNull=t}else this.insertChars(e)}this.mode=this.originalMode,this.reprocess=!0}inCaption(){let e=this.tok,t=this.ttype;if(t===3&&e.tagId===19){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8;return}let n=e.tagId;if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)||t===3&&n===119){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8,this.reprocess=!0}else(t!==3||n!==15&&n!==23&&n!==24&&n!==56&&n!==120&&n!==121&&n!==124&&n!==125&&n!==126&&n!==129)&&this.inBody()}inColumnGroup(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===23){this.insertVoidHtmlElement();return}if(e.tagId===122){this.inHead();return}break;case 3:if(e.tagId===24){if(!this.currentIs(24))return;this.pop(),this.mode=8;return}if(e.tagId===23)return;if(e.tagId===122){this.inHead();return}break;case 6:this.inBody();return}this.currentIs(24)&&(this.pop(),this.mode=8,this.reprocess=!0)}inTableBody(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===129){this.clearStackBackTo(120,124,126),this.insertHtmlElement(),this.mode=13;return}if(n===125||n===121){this.clearStackBackTo(120,124,126),this.insertHtmlElementNamed(`tr`,129),this.mode=13,this.reprocess=!0;return}if(n===19||n===23||n===24||n===120||n===124||n===126){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}}else if(t===3){if(n===120||n===124||n===126){if(!this.inScope(n,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8;return}if(n===119){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125||n===129)return}this.inTable()}inRow(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===125||n===121){this.clearStackBackTo(129,129,129),this.insertHtmlElement(),this.mode=14,this.insertMarker();return}if(n===19||n===23||n===24||n===120||n===124||n===126||n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}}else if(t===3){if(n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12;return}if(n===119){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===120||n===124||n===126){if(!this.inScope(n,8)||!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125)return}this.inTable()}closeCell(){this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.hNs[t]===0&&(this.hTag[t]===121||this.hTag[t]===125))break}this.clearToLastMarker(),this.mode=13}inCell(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===3){if(n===121||n===125){if(!this.inScope(n,8))return;this.generateImpliedEndTags(0),this.popUntil(n),this.clearToLastMarker(),this.mode=13;return}if(n===15||n===19||n===23||n===24||n===56)return;if(n===119||n===120||n===124||n===126||n===129){if(!this.inScope(n,8))return;this.closeCell(),this.reprocess=!0;return}}else if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)){if(!this.inScope(121,8)&&!this.inScope(125,8))return;this.closeCell(),this.reprocess=!0;return}this.inBody()}inTemplate(){let e=this.tok;switch(this.ttype){case 1:case 4:case 7:case 5:this.inBody();return;case 2:switch(e.tagId){case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 19:case 24:case 120:case 124:case 126:this.switchTemplateMode(8);return;case 23:this.switchTemplateMode(11);return;case 129:this.switchTemplateMode(12);return;case 121:case 125:this.switchTemplateMode(13);return}this.switchTemplateMode(6);return;case 3:e.tagId===122&&this.inHead();return;case 6:if(!this.templateInStack()){this.stopped=!0;return}this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode(),this.reprocess=!0;return}}switchTemplateMode(e){this.templateModes.pop(),this.templateModes.push(e),this.mode=e,this.reprocess=!0}afterBody(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWsViaBody())return;break;case 4:this.insertComment(this.stack[0]);return;case 7:this.insertPI(this.stack[0]);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}break;case 3:if(e.tagId===56){if(this.fragmentContext>=0)return;this.mode=19;return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}skipWsViaBody(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.bodyChars(e.slice(t,n)),this.cpos=n,n<e.length}inFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:switch(e.tagId){case 56:this.inBody();return;case 45:this.insertHtmlElement();return;case 44:this.insertVoidHtmlElement();return;case 82:this.inHead();return}return;case 3:if(e.tagId===45){if(this.currentNode()===this.stack[0])return;this.pop(),this.fragmentContext<0&&!this.currentIs(45)&&(this.mode=18)}return;case 6:this.stopped=!0;return}}insertWsOnly(){let e=this.restChars(),t=``,n=!0;for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t))){n=!1;break}if(n)t=e;else for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);this.insertChars(t)}afterFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 3:e.tagId===56&&(this.mode=20);return;case 6:this.stopped=!0;return}}afterAfterBody(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:if(!this.skipWsViaBody())return;break;case 2:if(e.tagId===56){this.inBody();return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}afterAfterFrameset(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:{let e=this.restChars(),t=``;for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);t.length!==0&&this.bodyChars(t);return}case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 6:this.stopped=!0;return}}foreignContent(){let e=this.tok;switch(this.ttype){case 1:{let e=this.restChars();this.charsHasNull&&(e=e.replaceAll(`\0`,`�`)),this.insertChars(e),this.framesetOk&&hasNonWsNonNull(this.restChars())&&(this.framesetOk=!1);return}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:{let t=e.tagId,n=!!(no[t]&256);if(!n&&t===41&&(n=this.tokenHasAttr(`color`)||this.tokenHasAttr(`face`)||this.tokenHasAttr(`size`)),n){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let r=this.adjustedCurrentNode(),i=this.hNs[r];this.insertForeignElement(i,!0),e.selfClosing&&this.pop();return}case 3:{let t=e.tagId;if(t===16||t===89){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let n=this.stack,r=n.length-1,i=n[r];if(t===103&&this.hNs[i]===1&&this.hName[i]===`script`){this.pop();return}for(;;){if(r===0)return;if(asciiLower(this.hName[i])===e.name){n.length=r;return}if(r--,i=n[r],this.hNs[i]===0){this.dispatchMode(this.mode);return}}}}}popToHtmlOrIntegrationPoint(){let e=this.stack;for(;;){let t=e[e.length-1],n=this.hTag[t];if(this.hNs[t]===0||this.hIP[t]||n>=169&&n<=173)return;e.pop()}}},XMLParseError=class extends Error{};const lo={lt:`<`,gt:`>`,amp:`&`,quot:`"`,apos:`'`};function isNameStartCode(e){return e>=97&&e<=122||e>=65&&e<=90||e===58||e===95||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319}function isNameCode(e){return isNameStartCode(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256||e>=56320&&e<=57343}function isWs(e){return e===32||e===9||e===10||e===13}function checkChars(e,t){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<32&&r!==9&&r!==10&&r!==13&&t.fail(`invalid character`),(r===65534||r===65535)&&t.fail(`invalid character`)}}var XMLParser=class{src;pos;doc;entities;constructor(e,t){this.src=e.replace(/\r\n?/g,`
5
5
  `),this.pos=0,this.doc=t,this.entities=/* @__PURE__ */ new Map}fail(e){let t=this.src.slice(0,this.pos),n=t.split(`
6
6
  `).length;throw new XMLParseError(`${e} (line ${n}, column ${this.pos-t.lastIndexOf(`
7
- `)})`)}startsWith(e){return this.src.startsWith(e,this.pos)}skipWs(){let e=this.pos;for(;this.pos<this.src.length&&isWs(this.src.charCodeAt(this.pos));)this.pos++;return this.pos>e}name(){let e=this.src,t=this.pos;for((t>=e.length||!isNameStartCode(e.charCodeAt(t)))&&this.fail(`expected a name`),this.pos++;this.pos<e.length&&isNameCode(e.charCodeAt(this.pos));)this.pos++;return e.slice(t,this.pos)}expect(e){this.startsWith(e)||this.fail(`expected "${e}"`),this.pos+=e.length}reference(){this.pos++;let e=this.src;if(e.charCodeAt(this.pos)===35){this.pos++;let t=!1;e.charCodeAt(this.pos)===120&&(t=!0,this.pos++);let n=this.pos;for(;this.pos<e.length&&e.charCodeAt(this.pos)!==59;)this.pos++;let r=e.slice(n,this.pos);r!==``&&(t?/^[0-9a-fA-F]+$/:/^[0-9]+$/).test(r)||this.fail(`invalid character reference`),this.expect(`;`);let i=parseInt(r,t?16:10);return i===9||i===10||i===13||i>=32&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111||this.fail(`character reference to an invalid character`),String.fromCodePoint(i)}let t=this.name();this.expect(`;`);let n=co[t];if(n!==void 0)return n;let r=this.entities.get(t);if(r!==void 0)return r;this.fail(`undefined entity "${t}"`)}comment(e){this.pos+=4;let t=this.src.indexOf(`--`,this.pos);t<0&&this.fail(`unterminated comment`),this.src.charCodeAt(t+2)!==62&&(this.pos=t,this.fail(`"--" is not allowed in comments`));let n=this.src.slice(this.pos,t);checkChars(n,this),appendDetached(new Comment(n,this.doc)[M],e),this.pos=t+3}pi(e){this.pos+=2;let t=this.name();t.includes(`:`)&&this.fail(`processing instruction target contains a colon`);let n=``;if(this.startsWith(`?>`))this.pos+=2;else{this.skipWs()||this.fail(`expected whitespace after the processing instruction target`);let e=this.src.indexOf(`?>`,this.pos);e<0&&this.fail(`unterminated processing instruction`),n=this.src.slice(this.pos,e),this.pos=e+2}if(t.toLowerCase()===`xml`){if(e===null)return;this.fail(`XML declaration not at the start of the document`)}checkChars(n,this),e!==null&&appendDetached(new ProcessingInstruction(t,n,this.doc)[M],e)}quoted(){let e=this.src.charCodeAt(this.pos);e!==34&&e!==39&&this.fail(`expected a quoted string`);let t=this.src.indexOf(e===34?`"`:`'`,this.pos+1);t<0&&this.fail(`unterminated quoted string`);let n=this.src.slice(this.pos+1,t);return this.pos=t+1,n}doctype(e){this.pos+=9,this.skipWs()||this.fail(`expected whitespace after DOCTYPE`);let t=this.name(),n=``,r=``;this.skipWs(),this.startsWith(`PUBLIC`)?(this.pos+=6,this.skipWs(),n=this.quoted(),this.skipWs()||this.fail(`expected whitespace and a system literal after the public identifier`),r=this.quoted()):this.startsWith(`SYSTEM`)&&(this.pos+=6,this.skipWs(),r=this.quoted()),this.skipWs(),this.src.charCodeAt(this.pos)===91&&(this.internalSubset(),this.skipWs()),this.expect(`>`),appendDetached(new DocumentType(this.doc,t,n,r)[M],e)}internalSubset(){let e=this.src;for(this.pos++;this.pos<e.length;){if(e.charCodeAt(this.pos)===93){this.pos++;return}if(this.startsWith(`<!--`)){let t=e.indexOf(`-->`,this.pos+4);t<0&&this.fail(`unterminated comment`),this.pos=t+3}else if(this.startsWith(`<!ENTITY`)){this.pos+=8,this.skipWs();let t=!1;e.charCodeAt(this.pos)===37&&(t=!0,this.pos++,this.skipWs());let n=this.name();if(this.skipWs(),e.charCodeAt(this.pos)===34||e.charCodeAt(this.pos)===39){let e=this.quoted();t||this.entities.has(n)||e.includes(`<`)||e.includes(`&`)||this.entities.set(n,e)}this.skipToDeclEnd()}else if(this.startsWith(`<?`)){let t=e.indexOf(`?>`,this.pos);t<0&&this.fail(`unterminated processing instruction`),this.pos=t+2}else this.startsWith(`<!`)?(this.pos+=2,this.skipToDeclEnd()):this.pos++}this.fail(`unterminated DOCTYPE internal subset`)}skipToDeclEnd(){let e=this.src;for(;this.pos<e.length;){let t=e.charCodeAt(this.pos);if(t===34||t===39)this.quoted();else if(t===62){this.pos++;return}else this.pos++}this.fail(`unterminated markup declaration`)}lookup(e,t){let n=e.bindings.get(t);return n===void 0||n===``?null:n}element(e,t){let n=this.src;this.pos++;let r=this.name(),i=[],a=[],o=!1;for(;;){let e=this.skipWs();this.pos>=n.length&&this.fail(`unexpected end of input in a start tag`);let t=n.charCodeAt(this.pos);if(t===62){this.pos++;break}if(t===47){this.expect(`/>`),o=!0;break}e||this.fail(`expected whitespace between attributes`);let r=this.name();this.skipWs(),this.expect(`=`),this.skipWs();let s=this.attributeValue();i.includes(r)&&this.fail(`duplicate attribute "${r}"`),i.push(r),a.push(s)}let s=t;for(let e=0;e<i.length;e++){let n=i[e];if(n===`xmlns`||n.startsWith(`xmlns:`)){s===t&&(s={bindings:new Map(t.bindings)});let r=n===`xmlns`?``:n.slice(6),i=a[e];r===`xml`&&i!==`http://www.w3.org/XML/1998/namespace`&&this.fail(`the xml prefix cannot be rebound`),r===`xmlns`&&this.fail(`the xmlns prefix cannot be declared`),r!==``&&i===``&&this.fail(`empty namespace for prefix "${r}"`),(i===`http://www.w3.org/2000/xmlns/`||i===`http://www.w3.org/XML/1998/namespace`&&r!==`xml`)&&this.fail(`reserved namespace`),s.bindings.set(r,i)}}let c=r.indexOf(`:`),l=null,u=r,d;c>=0?(l=r.slice(0,c),u=r.slice(c+1),(l===``||u===``||u.includes(`:`))&&this.fail(`invalid qualified name "${r}"`),d=this.lookup(s,l),d===null&&this.fail(`unbound namespace prefix "${l}"`)):d=this.lookup(s,``);let m=createElementImpl(this.doc,u,d,l),h=/* @__PURE__ */ new Set;for(let e=0;e<i.length;e++){let t=i[e],n=t.indexOf(`:`),r=null,o=t,c=null;t===`xmlns`?c=ce:n>=0&&(r=t.slice(0,n),o=t.slice(n+1),(r===``||o===``||o.includes(`:`))&&this.fail(`invalid attribute name "${t}"`),r===`xmlns`?c=ce:r===`xml`?c=S:(c=this.lookup(s,r),c===null&&this.fail(`unbound namespace prefix "${r}"`)));let l=(c??``)+` `+o;h.has(l)&&this.fail(`duplicate attribute "${t}"`),h.add(l),appendAttributeDetached(m,o,a[e],c,r)}appendDetached(m,e),!o&&(this.content(m,s),this.expect(`</`),this.name()!==r&&this.fail(`mismatched end tag: expected "</${r}>"`),this.skipWs(),this.expect(`>`))}attributeValue(){let e=this.src,t=e.charCodeAt(this.pos);t!==34&&t!==39&&this.fail(`expected a quoted attribute value`),this.pos++;let n=``,r=this.pos;for(;;){this.pos>=e.length&&this.fail(`unterminated attribute value`);let i=e.charCodeAt(this.pos);if(i===t)break;i===60&&this.fail(`"<" is not allowed in attribute values`),i===38?(n+=e.slice(r,this.pos),n+=this.reference(),r=this.pos):((i===9||i===10||i===13)&&(n+=e.slice(r,this.pos)+` `,r=this.pos+1),this.pos++)}return n+=e.slice(r,this.pos),this.pos++,checkChars(n,this),n}content(e,t){let n=this.src,r=``;for(;;){this.pos>=n.length&&this.fail(`unexpected end of input: unclosed element`);let i=n.charCodeAt(this.pos);if(i===60){if(n.charCodeAt(this.pos+1)===47)break;if(this.flushText(e,r),r=``,this.startsWith(`<!--`))this.comment(e);else if(this.startsWith(`<![CDATA[`)){let t=n.indexOf(`]]>`,this.pos+9);t<0&&this.fail(`unterminated CDATA section`);let r=n.slice(this.pos+9,t);checkChars(r,this),appendDetached(new CDATASection(r,this.doc)[M],e),this.pos=t+3}else this.startsWith(`<?`)?this.pi(e):this.startsWith(`<!`)?this.fail(`unexpected markup declaration`):this.element(e,t);continue}if(i===38){r+=this.reference();continue}let a=this.pos;for(;this.pos<n.length;){let e=n.charCodeAt(this.pos);if(e===60||e===38)break;this.pos++}let o=n.slice(a,this.pos);o.includes(`]]>`)&&(this.pos=a+o.indexOf(`]]>`),this.fail(`"]]>" is not allowed in content`)),r+=o}this.flushText(e,r)}flushText(e,t){if(t===``)return;checkChars(t,this);let n=e.last;n!==null&&n.type===3?n.data+=t:appendDetached(new Text(t,this.doc)[M],e)}parseDocument(e){let t=this.src;t.charCodeAt(0)===65279&&(this.pos=1),this.startsWith(`<?xml`)&&isWs(t.charCodeAt(this.pos+5))&&this.pi(null);let n={bindings:/* @__PURE__ */ new Map([[`xml`,S]])},r=!1,i=!1;for(;this.skipWs(),!(this.pos>=t.length);)this.startsWith(`<!--`)?this.comment(e):this.startsWith(`<?`)?this.pi(e):this.startsWith(`<!DOCTYPE`)?((i||r)&&this.fail(`unexpected DOCTYPE`),i=!0,this.doctype(e)):t.charCodeAt(this.pos)===60&&this.pos+1<t.length&&isNameStartCode(t.charCodeAt(this.pos+1))?(r&&this.fail(`junk after document element`),r=!0,this.element(e,n)):r?this.fail(`junk after document element`):this.fail(t.charCodeAt(this.pos)===60?`not well-formed`:`text outside of the document element`);r||this.fail(`no root element found`)}parseFragment(e,t){this.src+=`</`,this.content(e,t),this.pos!==this.src.length-2&&this.fail(`not well-formed`)}};function parseXML(e,t,n){let r=new DocumentFragment(t)[M];try{new XMLParser(String(e).toWellFormed(),t).parseDocument(r)}catch(e){if(!(e instanceof XMLParseError))throw e;let n=createElementImpl(t,`parsererror`,`http://www.mozilla.org/newlayout/xml/parsererror.xml`,null);appendDetached(new Text(e.message,t)[M],n),append(n,t[M]);return}append(r,t[M])}function parseXMLFragment(e,t){let n=t.doc,r=new DocumentFragment(n)[M],i=/* @__PURE__ */ new Map([[`xml`,S]]),a=[];for(let e=t;e!==null;e=e.parent)e.type===1&&a.push(e);for(let e=a.length-1;e>=0;e--){let t=a[e];t.prefix!==null&&t.ns!==null&&i.set(t.prefix,t.ns);let n=t.attrs;if(n!==null)for(let e of n)e.ns===`http://www.w3.org/2000/xmlns/`&&i.set(e.prefix===null?``:e.localName,e.value)}i.set(``,t.type===1?t.ns??``:ie);try{new XMLParser(String(e),n).parseFragment(r,{bindings:i})}catch(e){throw e instanceof XMLParseError?new DOMException(`The provided markup is not well-formed XML: ${e.message}.`,`SyntaxError`):e}return r}var DomSink=class extends TreeSink{nodes;hooked;modeTarget;otherNs;constructor(){super(),this.nodes=[],this.hooked=[],this.modeTarget=null,this.otherNs=null}begin(e){this.nodes.length=0,this.hooked.length=0,this.modeTarget=e,this.otherNs=null}finish(){let e=this.hooked;for(let t=0;t<e.length;t++)e[t].node._childrenChangedSteps();e.length=0,this.nodes.length=0,this.modeTarget=null}register(e){let t=this.nodes;return t.push(e),t.length-1}parentOf(e,t){return e>=0?this.nodes[e]:this.nodes[t].parent}createElement(e,t,n,r,i,a,o,s,c){let l=this.parentOf(n,r).doc,u=createElementImpl(l,e,t===0?ie:t===1?ae:t===2?oe:this.otherNs,null);if(c)for(let e=0;e<s;e++){let t=o[e];t===0?appendAttributeDetached(u,i[e],a[e],null,null):t===1?appendAttributeDetached(u,i[e],a[e],se,`xlink`):t===2?appendAttributeDetached(u,i[e],a[e],S,`xml`):t===3&&appendAttributeDetached(u,i[e],a[e],ce,i[e]===`xmlns`?null:`xmlns`)}else for(let e=0;e<s;e++)appendAttributeDetached(u,i[e],a[e],null,null);return Mi&&t===0&&ceParserCreated(u),u.flags&16&&this.hooked.push(u),this.register(u)}insert(e,t,n){let r=this.nodes[n],i=this.parentOf(e,t);r.parent!==null&&remove(r,!0),r.doc!==i.doc&&adopt(r,i.doc),t<0?appendDetached(r,i):insertDetached(r,i,this.nodes[t])}insertText(e,t,n){let r=this.parentOf(e,t),i=t>=0?this.nodes[t]:null,a=i===null?r.last:i.prev;if(a!==null&&a.type===3){a.data+=n;return}let o=new Text(n,r.doc)[M];i===null?appendDetached(o,r):insertDetached(o,r,i)}insertComment(e,t,n){let r=this.parentOf(e,t),i=new Comment(n,r.doc)[M];t<0?appendDetached(i,r):insertDetached(i,r,this.nodes[t])}insertProcessingInstruction(e,t,n,r){let i=this.parentOf(e,t),a=new ProcessingInstruction(n,r,i.doc)[M];t<0?appendDetached(a,i):insertDetached(a,i,this.nodes[t])}insertDoctype(e,t,n,r){let i=this.nodes[e];for(let e=i.first;e!==null;e=e.next)if(e.type===1||e.type===10)return;appendDetached(new DocumentType(i.doc,t,n,r)[M],i)}remove(e){let t=this.nodes[e];t.parent!==null&&remove(t,!0)}hasParent(e){return this.nodes[e].parent!==null}reparentChildren(e,t){let n=this.nodes[e],r=this.nodes[t];for(let e=n.first;e!==null;e=n.first)remove(e,!0),appendDetached(e,r)}addMissingAttributes(e,t,n,r){let i=this.nodes[e];if(i.type===1)for(let e=0;e<r;e++)findAttributeByName(i,t[e])===null&&appendAttributeDetached(i,t[e],n[e],null,null)}templateContents(e){let t=this.nodes[e].node.content;return t==null?e:this.register(t[M])}attachDeclarativeShadowRoot(e,t,n,r,i,a){let o=this.nodes[e].node;if(o[W]!=null)return-1;try{let e=attachShadowRoot(o,t===`closed`?`closed`:`open`,a,r,n,i===`manual`?`manual`:`named`);return e[Tt]=!0,e[He]=!0,this.register(e[M])}catch{return-1}}associateForm(e,t){let n=this.nodes[e].node;typeof n._parserAssociateForm==`function`&&n._parserAssociateForm(this.nodes[t].node)}setDocumentMode(e){let t=this.modeTarget;t!==null&&(t[jn]=e===1?`quirks`:e===2?`limited-quirks`:`no-quirks`)}};let lo=null,uo=!1;function acquire(){return uo?new TreeBuilder(new DomSink):(uo=!0,lo??=new TreeBuilder(new DomSink))}function release(e){e===lo&&(uo=!1)}const fo=new ParseOptions,po=new ParseOptions;function toOptions(e){if(e===void 0)return fo;let t=po;return t.scripting=e.scripting===!0,t.allowDeclarativeShadowRoots=e.allowDeclarativeShadowRoots===!0,t.processingInstructions=e.processingInstructions===!0,t.iframeSrcdoc=!1,t}function nsCode(e){return e===`http://www.w3.org/1999/xhtml`?0:e===`http://www.w3.org/2000/svg`?1:e===`http://www.w3.org/1998/Math/MathML`?2:3}function parseFragment(e,t,n){let r=t.doc;if(!r[N])return parseXMLFragment(e,t);let i=new DocumentFragment(r)[M],a=acquire(),o=a.sink;try{o.begin(null);let s=o.register(i),c=o.register(t),l=nsCode(t.ns);l===3&&(o.otherNs=t.ns);let u=-1;for(let e=t;e!==null;e=e.parent)if(e.type===1&&e.tag===X.form&&e.ns===`http://www.w3.org/1999/xhtml`){u=o.register(e);break}let d=r[jn]===`quirks`?1:r[jn]===`limited-quirks`?2:0,m=l===2?attr(t,`encoding`)??``:``;a.parseFragment(e,s,c,t.name,l,m,u,d,toOptions(n)),o.finish()}finally{o.nodes.length=0,release(a)}return i}function parseDocument(e,t,n){let r=new DocumentFragment(t)[M],i=acquire(),a=i.sink;try{a.begin(t),t[jn]=`no-quirks`;let o=a.register(r);i.parseDocument(e,o,toOptions(n)),a.finish()}finally{a.nodes.length=0,release(i)}append(r,t[M])}function setHTMLUnsafe(e,t){let n=e;if(e.type!==1){let t=e.node[j];if(t===null)throw TypeError(`setHTMLUnsafe: no context element`);n=t[M]}let r=parseFragment(t,n,{allowDeclarativeShadowRoots:!0}),i=e;if(e.type===1&&e.tag===X.template&&e.ns===`http://www.w3.org/1999/xhtml`){let t=e.node.content;t!==void 0&&(i=t[M])}i.node._replaceAll(r.node)}function parseHTMLUnsafe(e,t){parseDocument(e,t,{allowDeclarativeShadowRoots:!0})}function isVoidTag(e){switch(e){case X.area:case X.base:case X.basefont:case X.bgsound:case X.br:case X.col:case X.embed:case X.frame:case X.hr:case X.img:case X.input:case X.keygen:case X.link:case X.meta:case X.param:case X.source:case X.track:case X.wbr:return!0}return!1}function isRawTextTag(e){switch(e){case X.style:case X.script:case X.xmp:case X.iframe:case X.noembed:case X.noframes:case X.plaintext:return!0}return!1}function escapeText(e){let t=e.length,n=0;for(;n<t;n++){let t=e.charCodeAt(n);if(t===38||t===60||t===62||t===160)break}if(n===t)return e;let r=e.slice(0,n),i=n;for(;n<t;n++){let t=e.charCodeAt(n),a=``;if(t===38)a=`&amp;`;else if(t===60)a=`&lt;`;else if(t===62)a=`&gt;`;else if(t===160)a=`&nbsp;`;else continue;r+=e.slice(i,n)+a,i=n+1}return r+e.slice(i)}function escapeAttribute(e){let t=e.length,n=0;for(;n<t;n++){let t=e.charCodeAt(n);if(t===38||t===34||t===60||t===62||t===160)break}if(n===t)return e;let r=e.slice(0,n),i=n;for(;n<t;n++){let t=e.charCodeAt(n),a=``;if(t===38)a=`&amp;`;else if(t===34)a=`&quot;`;else if(t===60)a=`&lt;`;else if(t===62)a=`&gt;`;else if(t===160)a=`&nbsp;`;else continue;r+=e.slice(i,n)+a,i=n+1}return r+e.slice(i)}function serializedAttrName(e,t,n){return e===null?n:e===`http://www.w3.org/XML/1998/namespace`?`xml:`+n:e===`http://www.w3.org/2000/xmlns/`?n===`xmlns`?`xmlns`:`xmlns:`+n:e===`http://www.w3.org/1999/xlink`?`xlink:`+n:t}function templateContentsOf(e){let t=e.node.content;return t==null?e:t[M]}let mo=``,ho=!1,_o=null;function htmlChildren(e){if(e.type===1){if(e.ns===`http://www.w3.org/1999/xhtml`&&isVoidTag(e.tag))return;(ho||_o!==null)&&htmlShadowRoot(e),e.tag===X.template&&e.ns===`http://www.w3.org/1999/xhtml`&&(e=templateContentsOf(e))}for(let t=e.first;t!==null;t=t.next)switch(t.type){case 1:htmlElement(t);break;case 3:case 4:{let e=t.parent;e!==null&&e.type===1&&e.ns===`http://www.w3.org/1999/xhtml`&&isRawTextTag(e.tag)?mo+=t.data:mo+=escapeText(t.data);break}case 8:mo+=`<!--`+t.data+`-->`;break;case 7:mo+=`<?`+t.name+` `+t.data+`?>`;break;case 10:mo+=`<!DOCTYPE `+t.name+`>`}}function htmlElement(e){let t=e.ns,n=t===`http://www.w3.org/1999/xhtml`||t===`http://www.w3.org/2000/svg`||t===`http://www.w3.org/1998/Math/MathML`||e.prefix===null?e.name:e.prefix+`:`+e.name,r=`<`+n,i=e.attrs;if(i!==null)for(let e=0;e<i.length;e++){let t=i[e];r+=` `+(t.ns===null?t.localName:serializedAttrName(t.ns,t.name,t.localName))+`="`+escapeAttribute(t.value)+`"`}mo+=r+`>`,!(t===`http://www.w3.org/1999/xhtml`&&isVoidTag(e.tag))&&(htmlChildren(e),mo+=`</`+n+`>`)}function htmlShadowRoot(e){let t=e.node[W];if(t==null||!(ho&&t[Cr]||_o!==null&&_o.includes(t)))return;let n=`<template shadowrootmode="`+(t[jn]===`open`?`open`:`closed`)+`"`;t[Ot]&&(n+=` shadowrootdelegatesfocus=""`),t[Cr]&&(n+=` shadowrootserializable=""`),t[kr]===`manual`&&(n+=` shadowrootslotassignment="manual"`),t[at]&&(n+=` shadowrootclonable=""`),mo+=n+`>`,htmlChildren(t[M]),mo+=`</template>`}function runHtml(e,t,n,r){let i=mo,a=ho,o=_o;mo=``,ho=t,_o=n;try{if(r)switch(e.type){case 1:htmlElement(e);break;case 9:case 11:htmlChildren(e);break;default:{let t=e.parent;e.type===3||e.type===4?mo=t!==null&&t.type===1&&t.ns===`http://www.w3.org/1999/xhtml`&&isRawTextTag(t.tag)?e.data:escapeText(e.data):e.type===8?mo=`<!--`+e.data+`-->`:e.type===7?mo=`<?`+e.name+` `+e.data+`?>`:e.type===10&&(mo=`<!DOCTYPE `+e.name+`>`)}}else htmlChildren(e);return mo}finally{mo=i,ho=a,_o=o}}function inHTMLDocument(e){return e.doc[N]}function serializeChildren(e){if(inHTMLDocument(e))return runHtml(e,!1,null,!1);let t=``,n=e;e.type===1&&e.tag===X.template&&e.ns===`http://www.w3.org/1999/xhtml`&&(n=templateContentsOf(e));for(let e=n.first;e!==null;e=e.next)t+=serializeXML(e,!0);return t}function serializeNode(e){return inHTMLDocument(e)?runHtml(e,!1,null,!0):serializeXML(e,!0)}function getHTML(e,t){let n=t?.serializableShadowRoots===!0,r=t?.shadowRoots;return runHtml(e,n,r!==void 0&&r.length!==0?r:null,!1)}var XmlError=class extends Error{};function invalid(e){throw new XmlError(e)}function copyMap(e){let t=/* @__PURE__ */ new Map;for(let[n,r]of e)t.set(n,r.slice());return t}function preferredPrefix(e,t,n){let r=e.get(n);if(r===void 0||r.length===0)return null;for(let e=0;e<r.length;e++)if(r[e]===t)return r[e];return r[r.length-1]}function prefixFound(e,t,n){let r=e.get(n);return r!==void 0&&r.includes(t)}function addPrefix(e,t,n){let r=e.get(n);r===void 0?e.set(n,[t]):r.push(t)}var PrefixIndex=class{value=1};function generatePrefix(e,t,n){let r=`ns`+String(n.value++);return addPrefix(e,r,t),r}function hasInvalidXmlChars(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==9&&n!==10&&n!==13){if(n<32||n===65534||n===65535)return!0;if(n>=55296&&n<=56319){let n=t+1<e.length?e.charCodeAt(t+1):0;if(n<56320||n>57343)return!0;t++}else if(n>=56320&&n<=57343)return!0}}return!1}function isNameStart(e){return e>=97&&e<=122||e>=65&&e<=90||e===58||e===95||e>=192&&e!==215&&e!==247}function isXmlName(e){if(e.length===0||!isNameStart(e.charCodeAt(0)))return!1;for(let t=1;t<e.length;t++){let n=e.charCodeAt(t);if(!(isNameStart(n)||n>=48&&n<=57||n===45||n===46||n===183))return!1}return!0}function escapeXmlText(e){let t=``,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r),a=``;if(i===38)a=`&amp;`;else if(i===60)a=`&lt;`;else if(i===62)a=`&gt;`;else continue;t+=e.slice(n,r)+a,n=r+1}return n===0?e:t+e.slice(n)}function serializeAttrValue(e,t){if(e===null)return``;t&&hasInvalidXmlChars(e)&&invalid(`attribute value contains invalid characters`);let n=``,r=0;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t),a=``;if(i===38)a=`&amp;`;else if(i===34)a=`&quot;`;else if(i===60)a=`&lt;`;else if(i===62)a=`&gt;`;else if(i===9)a=`&#x9;`;else if(i===10)a=`&#xA;`;else if(i===13)a=`&#xD;`;else continue;n+=e.slice(r,t)+a,r=t+1}return r===0?e:n+e.slice(r)}function prefixBound(e,t){for(let n of e.values())if(n.includes(t))return!0;return!1}const vo=/* @__PURE__ */ new Set([`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`]);function recordNamespaceInformation(e,t,n){let r=null,i=e.attrs;if(i===null)return null;for(let e=0;e<i.length;e++){let a=i[e];if(a.ns!==`http://www.w3.org/2000/xmlns/`)continue;if(a.prefix===null){r=a.value;continue}let o=a.localName,s=a.value;s!==`http://www.w3.org/XML/1998/namespace`&&(s===``&&(s=null),!prefixFound(t,o,s)&&(addPrefix(t,o,s),n.set(o,s??``)))}return r}function serializeAttributes(e,t,n,r,i,a){let o=``,s=e.attrs;if(s===null)return o;let c=a?/* @__PURE__ */ new Set:null;for(let e=0;e<s.length;e++){let l=s[e];if(c!==null){let e=(l.ns??``)+`\0`+l.localName;c.has(e)&&invalid(`duplicate attribute`),c.add(e)}let u=l.ns;if(u===null&&l.localName===`xmlns`){a&&invalid(`invalid attribute name`);continue}let d=null;if(u!==null){if(d=preferredPrefix(t,l.prefix,u),u===`http://www.w3.org/2000/xmlns/`){if(l.value===`http://www.w3.org/XML/1998/namespace`||l.prefix===null&&i||l.prefix!==null&&(!r.has(l.localName)||r.get(l.localName)!==l.value))continue;a&&l.value===`http://www.w3.org/2000/xmlns/`&&invalid(`xmlns namespace declared as a value`),a&&l.value===``&&invalid(`empty namespace declaration`),l.prefix===`xmlns`&&(d=`xmlns`)}else d===null&&(u===`http://www.w3.org/1999/xlink`&&l.prefix!==null&&!r.has(l.prefix)&&!prefixBound(t,l.prefix)?(d=l.prefix,addPrefix(t,d,u)):d=generatePrefix(t,u,n),o+=` xmlns:`+d+`="`+serializeAttrValue(u,a)+`"`)}o+=` `,d!==null&&(o+=d+`:`),a&&(l.localName.includes(`:`)||!isXmlName(l.localName)||l.localName===`xmlns`&&u===null)&&invalid(`invalid attribute name`),o+=l.localName+`="`+serializeAttrValue(l.value,a)+`"`}return o}function serializeElementXML(e,t,n,r,i){let a=e.name;i&&(a.includes(`:`)||!isXmlName(a))&&invalid(`invalid element name`);let o=`<`,s=``,c=!1,l=!1;n=copyMap(n);let u=/* @__PURE__ */ new Map,d=recordNamespaceInformation(e,n,u),m=t,h=e.ns;if(m===h)d!==null&&(l=!0),s=h===`http://www.w3.org/XML/1998/namespace`?`xml:`+a:a,o+=s;else{let t=e.prefix,c=preferredPrefix(n,t,h);t===`xmlns`&&(i&&invalid(`element prefix xmlns`),c=t),c===null?t===null?d===null||d!==h?(l=!0,s=a,m=h,o+=s+` xmlns="`+serializeAttrValue(h,i)+`"`):(s=a,m=h,o+=s):(u.has(t)?t=generatePrefix(n,h,r):addPrefix(n,t,h),s=t+`:`+a,o+=s+` xmlns:`+t+`="`+serializeAttrValue(h,i)+`"`,d!==null&&(m=d===``?null:d)):(s=c+`:`+a,d!==null&&d!==`http://www.w3.org/XML/1998/namespace`&&(m=d===``?null:d),o+=s)}o+=serializeAttributes(e,n,r,u,l,i);let _=h===`http://www.w3.org/1999/xhtml`&&a===`template`?templateContentsOf(e):e;if(h===`http://www.w3.org/1999/xhtml`&&_.first===null&&vo.has(a)?(o+=` /`,c=!0):h!==`http://www.w3.org/1999/xhtml`&&_.first===null&&(o+=`/`,c=!0),o+=`>`,c)return o;for(let e=_.first;e!==null;e=e.next)o+=xmlNode(e,m,n,r,i);return o+`</`+s+`>`}function xmlNode(e,t,n,r,i){switch(e.type){case 1:return serializeElementXML(e,t,n,r,i);case 9:{if(i){let t=!1;for(let n=e.first;n!==null;n=n.next)n.type===1&&(t=!0);t||invalid(`document without a document element`)}let a=``;for(let o=e.first;o!==null;o=o.next)a+=xmlNode(o,t,n,r,i);return a}case 11:{let a=``;for(let o=e.first;o!==null;o=o.next)a+=xmlNode(o,t,n,r,i);return a}case 8:{let t=e.data;return i&&(hasInvalidXmlChars(t)||t.includes(`--`)||t.endsWith(`-`))&&invalid(`invalid comment`),`<!--`+t+`-->`}case 3:{let t=e.data;return i&&hasInvalidXmlChars(t)&&invalid(`invalid text`),escapeXmlText(t)}case 4:return`<![CDATA[`+e.data+`]]>`;case 10:{let t=e.node;i&&(hasInvalidXmlChars(t.publicId)&&invalid(`invalid doctype public id`),(hasInvalidXmlChars(t.systemId)||t.systemId.includes(`"`)&&t.systemId.includes(`'`))&&invalid(`invalid doctype system id`));let n=`<!DOCTYPE `+e.name;return t.publicId!==``&&(n+=` PUBLIC "`+t.publicId+`"`),t.systemId!==``&&t.publicId===``&&(n+=` SYSTEM`),t.systemId!==``&&(n+=` "`+t.systemId+`"`),n+`>`}case 7:return i&&(e.name.includes(`:`)||e.name.toLowerCase()===`xml`||hasInvalidXmlChars(e.data)||e.data.includes(`?>`))&&invalid(`invalid processing instruction`),`<?`+e.name+` `+e.data+`?>`}return``}function serializeXML(e,t){let n=/* @__PURE__ */ new Map;n.set(S,[`xml`]);try{return xmlNode(e,null,n,new PrefixIndex,t)}catch(e){throw e instanceof XmlError?new DOMException(`The node could not be serialized as XML: ${e.message}.`,`InvalidStateError`):e}}let yo=null;function setShadowHostCustomStateCheck(e){yo=e}var ShadowRoot=class extends DocumentFragment{[jn];[Ot];[kr];[at];[Cr];[Tt];[He];constructor(e,t,n,r,i,a,o){if(arguments.length<3)throw TypeError(`Illegal constructor`);super(e);let s=this[M];s.flags|=32,t[M].flags&1&&(s.flags|=1),this[j]=t,this[jn]=n,this[Ot]=r,this[kr]=i,this[at]=a,this[Cr]=o,this[Tt]=!1,this[He]=yo!==null&&yo(t)}get mode(){return this[jn]}get host(){return this[j]}get delegatesFocus(){return this[Ot]}get slotAssignment(){return this[kr]}get clonable(){return this[at]}get serializable(){return this[Cr]}get innerHTML(){return serializeChildren(this[M])}set innerHTML(e){let t=parseFragment(e===null?``:String(e),this[j][M]);this._replaceAll(t.node)}getHTML(e){return getHTML(this[M],e)}setHTMLUnsafe(e){setHTMLUnsafe(this[M],String(e))}get activeElement(){let e=this[M],t=e.doc[A];for(;t!==null;){let n=treeRoot(t);if(n===e)return t.node;if(!(n.flags&32))return null;let r=n.node[j];t=r===null?null:r[M]}return null}elementFromPoint(e,t){return null}elementsFromPoint(e,t){return[]}};Object.defineProperty(ShadowRoot.prototype,Symbol.toStringTag,{value:`ShadowRoot`,configurable:!0});const bo=[];function orderedSet(e){let t=e.length;if(t<2)return e;for(let n=1;n<t;n++){let t=e[n];for(let r=0;r<n;r++)if(e[r]===t){let t=[];for(let n of e)t.includes(n)||t.push(n);return t}}return e}function validateToken(e){if(e===``)throw new DOMException(`The token provided must not be empty.`,`SyntaxError`);for(let t=0;t<e.length;t++)if(isAsciiWhitespace(e.charCodeAt(t)))throw new DOMException(`The token provided ('${e}') contains HTML space characters, which are not valid in tokens.`,`InvalidCharacterError`)}let xo=null;var So=class DOMTokenList{#e;#t;#n;#r;#i;constructor(e,t,n=null){this.#e=e,this.#t=t,this.#n=n,this.#r=null,this.#i=bo,xo===null&&(xo=indexGetterTable(DOMTokenList.prototype,(e,t)=>e.item(t)??void 0,16))}#a(){let e=this.#e;if(this.#t===`class`){let t=classTokens(e);return t!==this.#r&&(this.#r=t,this.#i=orderedSet(t)),this.#i}let t=attr(e,this.#t);return t!==this.#r&&(this.#r=t,this.#i=t===null||t===``?bo:orderedSet(splitOnAsciiWhitespace(t))),this.#i}#o(e){let t=this.#e;(e.length!==0||attr(t,this.#t)!==null)&&setAttribute(t,this.#t,e.join(` `))}get length(){let e=this.#a().length;return e>xo.count&&ensureIndexGetters(xo,e),e}item(e){let t=this.#a(),n=Number(e)>>>0;return n<t.length?t[n]:null}contains(e){return this.#a().includes(String(e))}add(...e){let t=e.map(String);for(let e of t)validateToken(e);let n=this.#a().slice();for(let e of t)n.includes(e)||n.push(e);this.#o(n)}remove(...e){let t=e.map(String);for(let e of t)validateToken(e);let n=this.#a().filter(e=>!t.includes(e));this.#o(n)}toggle(e,t){let n=String(e);validateToken(n);let r=this.#a();return r.includes(n)?t===void 0||!t?(this.#o(r.filter(e=>e!==n)),!1):!0:t===void 0||t?(this.#o([...r,n]),!0):!1}replace(e,t){let n=String(e),r=String(t);if(n===``||r===``)throw new DOMException(`The token provided must not be empty.`,`SyntaxError`);validateToken(n),validateToken(r);let i=this.#a();if(!i.includes(n))return!1;let a=[],o=!1;for(let e of i)e===n||e===r?o||=(a.push(r),!0):a.push(e);return this.#o(a),!0}supports(e){let t=this.#n;if(t===null)throw TypeError(`'${this.#t}' attribute has no supported tokens`);return t.includes(String(e).toLowerCase())}get value(){return attr(this.#e,this.#t)??``}set value(e){setAttribute(this.#e,this.#t,String(e))}toString(){return this.value}_clear(){removeAttribute(this.#e,this.#t)}};Object.defineProperties(So.prototype,{forEach:{value:Array.prototype.forEach,writable:!0,enumerable:!0,configurable:!0},entries:{value:Array.prototype.entries,writable:!0,enumerable:!0,configurable:!0},keys:{value:Array.prototype.keys,writable:!0,enumerable:!0,configurable:!0},values:{value:Array.prototype.values,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Array.prototype.values,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`DOMTokenList`,configurable:!0}});function toAttributeName(e){let t=`data-`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[n]}return t}function toPropertyName(e){if(!e.startsWith(`data-`))return null;let t=``;for(let n=5;n<e.length;n++){let r=e.charCodeAt(n);if(r>=65&&r<=90)return null;if(r===45&&n+1<e.length){let r=e.charCodeAt(n+1);if(r>=97&&r<=122){t+=String.fromCharCode(r-32),n++;continue}}t+=e[n]}return t}function getNamed(e,t){let n=e.attrs;if(n!==null)for(let e=0;e<n.length;e++){let r=n[e];if(r.ns===null&&toPropertyName(r.localName)===t)return r.value}}function supportedNames$1(e){let t=[],n=e.attrs;if(n===null)return t;for(let e=0;e<n.length;e++){let r=n[e];if(r.ns!==null)continue;let i=toPropertyName(r.localName);i!==null&&t.push(i)}return t}__name(supportedNames$1,`supportedNames`);function setNamed(e,t,n){for(let e=0;e<t.length-1;e++){let n=t.charCodeAt(e+1);if(t.charCodeAt(e)===45&&n>=97&&n<=122)throw new DOMException(`'${t}' is not a valid property name.`,`SyntaxError`)}let r=toAttributeName(t);if(!isValidAttributeLocalName(r))throw new DOMException(`'${r}' is not a valid attribute name.`,`InvalidCharacterError`);setAttribute(e,r,n)}function deleteNamed(e,t){let n=findAttributeByNamespace(e,null,toAttributeName(t));n!==null&&removeAttributeRecord(e,n)}const Co=Symbol(`DOMStringMap owner`),wo={get(e,t,n){if(typeof t==`string`){let n=getNamed(e[Co],t);if(n!==void 0)return n}else if(t===Co)return;return Reflect.get(e,t,n)},set(e,t,n,r){return typeof t==`string`?(setNamed(e[Co],t,String(n)),!0):t!==Co&&Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&getNamed(e[Co],t)!==void 0||t!==Co&&Reflect.has(e,t)},deleteProperty(e,t){return typeof t==`string`?(deleteNamed(e[Co],t),!0):t===Co||Reflect.deleteProperty(e,t)},ownKeys(e){let t=supportedNames$1(e[Co]);for(let n of Reflect.ownKeys(e))n!==Co&&!t.includes(n)&&t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`){let n=getNamed(e[Co],t);if(n!==void 0)return{value:n,writable:!0,enumerable:!0,configurable:!0}}else if(t===Co)return;return Reflect.getOwnPropertyDescriptor(e,t)},defineProperty(e,t,n){return typeof t==`string`?n.get!==void 0||n.set!==void 0?!1:(setNamed(e[Co],t,String(n.value)),!0):t!==Co&&Reflect.defineProperty(e,t,n)}};function createDOMStringMap(e){let t=Object.create(DOMStringMap.prototype);return t[Co]=e,new Proxy(t,wo)}var DOMStringMap=class{constructor(e){return createDOMStringMap(e)}};Object.defineProperty(DOMStringMap.prototype,Symbol.toStringTag,{value:`DOMStringMap`,configurable:!0});var Attr=class extends Node{[rr];[B];constructor(e,t,n,r,i,a,o=null){super(2,e);let s=this[M];s.name=t,s.data=n,s.ns=r,s.prefix=i,this[B]=a,this[rr]=o}get namespaceURI(){return this[M].ns}get prefix(){return this[M].prefix}get localName(){return this[M].name}get name(){let e=this[M];return e.prefix===null?e.name:e.prefix+`:`+e.name}get value(){return attrValue(this)}set value(e){setAttrValue(this,String(e))}get ownerElement(){return this[B]}get specified(){return!0}_attach(e,t){this[B]=e,this[rr]=t,this[M].doc=e[M].doc}_detach(){let e=this[rr];e!==null&&(this[M].data=e.value),this[B]=null,this[rr]=null}};function attrNode(e,t){let n=t.attr;return n===null&&(n=new Attr(e.doc,t.localName,t.value,t.ns,t.prefix,e.node,t),t.attr=n),n}function setAttributeNode(e,t){let n=t[B];if(n!==null&&n[M]!==e)throw new DOMException(`The attribute is in use by another element.`,`InUseAttributeError`);let r=t[M],i=findAttributeByNamespace(e,r.ns,r.name);if(i!==null&&i.attr===t)return t;let a=new AttrRecord(r.name,t.value,r.ns,r.prefix);if(a.attr=t,i!==null){let n=attrNode(e,i),r=e.attrs;return r[r.indexOf(i)]=a,t._attach(e.node,a),n._detach(),handleAttributeChanges(e,a,i.value,a.value),n}return t._attach(e.node,a),appendAttribute(e,a),null}function removeAttributeNode(e,t){let n=t[rr],r=e.attrs;if(n===null||r===null||!r.includes(n))throw new DOMException(`The attribute is not an attribute of this element.`,`NotFoundError`);return removeAttributeRecord(e,n),t}let To=null;const Eo=Symbol(`NamedNodeMap.element`),isArrayIndex=e=>/^(?:0|[1-9]\d*)$/.test(e)&&Number(e)<4294967295;function namedAttribute(e,t){let n=e[Eo];return n.flags&2&&/[A-Z]/.test(t)?null:findAttributeByName(n,t)}function named(e,t){return typeof t==`string`&&!(t in e)&&!isArrayIndex(t)?namedAttribute(e,t):null}const Do={get(e,t){if(typeof t==`symbol`||t in e)return e[t];let n=isArrayIndex(t)?null:namedAttribute(e,t);return n===null?void 0:attrNode(e[Eo],n)},has(e,t){return t in e||named(e,t)!==null},getOwnPropertyDescriptor(e,t){let n=named(e,t);return n===null?t===Eo?void 0:Reflect.getOwnPropertyDescriptor(e,t):{value:attrNode(e[Eo],n),writable:!1,enumerable:!1,configurable:!0}},ownKeys(e){let t=Reflect.ownKeys(e).filter(e=>e!==Eo),n=e[Eo].attrs;if(n!==null)for(let r=0;r<n.length;r++){let i=n[r].name;!t.includes(i)&&named(e,i)!==null&&t.push(i)}return t}};function byName(e,t){let n=String(t);return findAttributeByName(e,e.flags&2?asciiLowercase$1(n):n)}var Oo=class NamedNodeMap{constructor(e){return Object.defineProperty(this,Eo,{value:e,configurable:!0}),To===null&&(To=indexGetterTable(NamedNodeMap.prototype,(e,t)=>e.item(t)??void 0,16)),new Proxy(this,Do)}get length(){let e=this[Eo].attrs,t=e===null?0:e.length;return t>To.count&&ensureIndexGetters(To,t),t}item(e){let t=this[Eo],n=t.attrs,r=Number(e)>>>0;return n===null||r>=n.length?null:attrNode(t,n[r])}getNamedItem(e){let t=byName(this[Eo],e);return t===null?null:attrNode(this[Eo],t)}getNamedItemNS(e,t){let n=this[Eo],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));return r===null?null:attrNode(n,r)}setNamedItem(e){return setAttributeNode(this[Eo],e)}setNamedItemNS(e){return setAttributeNode(this[Eo],e)}removeNamedItem(e){let t=this[Eo],n=byName(this[Eo],e);if(n===null)throw new DOMException(`No item with name '${e}' was found.`,`NotFoundError`);let r=attrNode(t,n);return removeAttributeRecord(t,n),r}removeNamedItemNS(e,t){let n=this[Eo],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));if(r===null)throw new DOMException(`No item with name '${e}::${t}' was found.`,`NotFoundError`);let i=attrNode(n,r);return removeAttributeRecord(n,r),i}};Object.defineProperties(Oo.prototype,{[Symbol.iterator]:{value:Array.prototype.values,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NamedNodeMap`,configurable:!0}});function isValidElementLocalName(e){let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);if(n>=97&&n<=122||n>=65&&n<=90){for(let n=1;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===62)return!1}return!0}if(n!==58&&n!==95&&n<128)return!1;for(let n=1;n<t;n++){let t=e.charCodeAt(n);if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===45||t===46||t===58||t===95||t>=128))return!1}return!0}function isValidNamespacePrefix(e){let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===62)return!1}return!0}function isValidDoctypeName(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===32||n===9||n===10||n===12||n===13||n===0||n===62)return!1}return!0}const ko=`A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}`,Ao=RegExp(`^[:${ko}][:${ko}\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`,`u`);function isXMLName(e){return Ao.test(e)}function validateAndExtract(e,t,n){e===``&&(e=null);let r=null,i=t,a=t.indexOf(`:`);if(a!==-1&&(r=t.slice(0,a),i=t.slice(a+1),!isValidNamespacePrefix(r)))throw new DOMException(`"${r}" is not a valid namespace prefix.`,`InvalidCharacterError`);if(n===`attribute`?!isValidAttributeLocalName(i):!isValidElementLocalName(i))throw new DOMException(`"${t}" is not a valid qualified name.`,`InvalidCharacterError`);if(r!==null&&e===null)throw new DOMException(`A prefix was given but no namespace was provided.`,`NamespaceError`);if(r===`xml`&&e!==`http://www.w3.org/XML/1998/namespace`)throw new DOMException(`A prefix of "xml" was given but the namespace was not the XML namespace.`,`NamespaceError`);if((t===`xmlns`||r===`xmlns`)&&e!==`http://www.w3.org/2000/xmlns/`)throw new DOMException(`A prefix or qualifiedName of "xmlns" was given but the namespace was not the XMLNS namespace.`,`NamespaceError`);if(e===`http://www.w3.org/2000/xmlns/`&&t!==`xmlns`&&r!==`xmlns`)throw new DOMException(`The XMLNS namespace was given but neither the prefix nor qualifiedName was "xmlns".`,`NamespaceError`);return{namespace:e,prefix:r,localName:i}}let setPoint,setRect;var DOMPointReadOnly=class{#e;#t;#n;#r;static{setPoint=(e,t,n)=>{t===0?e.#e=n:t===1?e.#t=n:t===2?e.#n=n:e.#r=n}}constructor(e=0,t=0,n=0,r=1){this.#e=Number(e),this.#t=Number(t),this.#n=Number(n),this.#r=Number(r)}static fromPoint(e={}){return new this(e.x,e.y,e.z,e.w)}get x(){return this.#e}get y(){return this.#t}get z(){return this.#n}get w(){return this.#r}matrixTransform(e){let t=e[I],n=this.#e,r=this.#t,i=this.#n,a=this.#r;return new jo(t[0]*n+t[4]*r+t[8]*i+t[12]*a,t[1]*n+t[5]*r+t[9]*i+t[13]*a,t[2]*n+t[6]*r+t[10]*i+t[14]*a,t[3]*n+t[7]*r+t[11]*i+t[15]*a)}toJSON(){return{x:this.#e,y:this.#t,z:this.#n,w:this.#r}}},jo=class DOMPoint extends DOMPointReadOnly{static fromPoint(e={}){return new DOMPoint(e.x,e.y,e.z,e.w)}get x(){return super.x}set x(e){setPoint(this,0,Number(e))}get y(){return super.y}set y(e){setPoint(this,1,Number(e))}get z(){return super.z}set z(e){setPoint(this,2,Number(e))}get w(){return super.w}set w(e){setPoint(this,3,Number(e))}},DOMRectReadOnly=class{#e;#t;#n;#r;static{setRect=(e,t,n)=>{t===0?e.#e=n:t===1?e.#t=n:t===2?e.#n=n:e.#r=n}}constructor(e=0,t=0,n=0,r=0){this.#e=Number(e),this.#t=Number(t),this.#n=Number(n),this.#r=Number(r)}static fromRect(e={}){return new this(e.x,e.y,e.width,e.height)}get x(){return this.#e}get y(){return this.#t}get width(){return this.#n}get height(){return this.#r}get top(){return Math.min(this.#t,this.#t+this.#r)}get right(){return Math.max(this.#e,this.#e+this.#n)}get bottom(){return Math.max(this.#t,this.#t+this.#r)}get left(){return Math.min(this.#e,this.#e+this.#n)}toJSON(){return{x:this.#e,y:this.#t,width:this.#n,height:this.#r,top:this.top,right:this.right,bottom:this.bottom,left:this.left}}},Mo=class DOMRect extends DOMRectReadOnly{static fromRect(e={}){return new DOMRect(e.x,e.y,e.width,e.height)}get x(){return super.x}set x(e){setRect(this,0,Number(e))}get y(){return super.y}set y(e){setRect(this,1,Number(e))}get width(){return super.width}set width(e){setRect(this,2,Number(e))}get height(){return super.height}set height(e){setRect(this,3,Number(e))}},DOMRectList=class{[ar];constructor(e=[]){this[ar]=e;for(let t=0;t<e.length;t++)Object.defineProperty(this,t,{value:e[t],enumerable:!0});hideInternals(this)}get length(){return this[ar].length}item(e){return this[ar][e]??null}[Symbol.iterator](){return this[ar][Symbol.iterator]()}};const No=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function multiply(e,t){let n=Array.from({length:16},()=>0);for(let r=0;r<4;r++)for(let i=0;i<4;i++){let a=0;for(let n=0;n<4;n++)a+=e[n*4+i]*t[r*4+n];n[r*4+i]=a}return n}var DOMMatrixReadOnly=class{[I];[bn];constructor(e){if(e===void 0||e===``||e===`none`)this[I]=No.slice(),this[bn]=!0;else if(Array.isArray(e)||ArrayBuffer.isView(e)){let t=Array.from(e,Number);if(t.length===6)this[I]=[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1],this[bn]=!0;else if(t.length===16)this[I]=t,this[bn]=!1;else throw TypeError(`Failed to construct 'DOMMatrix': The sequence must contain 6 elements for a 2D matrix or 16 elements for a 3D matrix.`)}else{let t=/^\s*matrix\(([^)]*)\)\s*$/.exec(String(e));if(t===null)throw new DOMException(`Failed to construct 'DOMMatrix': Failed to parse '${String(e)}'.`,`SyntaxError`);let n=t[1].split(/[\s,]+/).filter(Boolean).map(Number);this[I]=[n[0],n[1],0,0,n[2],n[3],0,0,0,0,1,0,n[4],n[5],0,1],this[bn]=!0}hideInternals(this)}static fromMatrix(e={}){let t=new this;return(e.a!==void 0||e.m11!==void 0)&&(t[I][0]=e.m11??e.a??1,t[I][1]=e.m12??e.b??0,t[I][4]=e.m21??e.c??0,t[I][5]=e.m22??e.d??1,t[I][12]=e.m41??e.e??0,t[I][13]=e.m42??e.f??0),t}static fromFloat64Array(e){return new this(Array.from(e))}static fromFloat32Array(e){return new this(Array.from(e))}get a(){return this[I][0]}get b(){return this[I][1]}get c(){return this[I][4]}get d(){return this[I][5]}get e(){return this[I][12]}get f(){return this[I][13]}get m11(){return this[I][0]}get m12(){return this[I][1]}get m13(){return this[I][2]}get m14(){return this[I][3]}get m21(){return this[I][4]}get m22(){return this[I][5]}get m23(){return this[I][6]}get m24(){return this[I][7]}get m31(){return this[I][8]}get m32(){return this[I][9]}get m33(){return this[I][10]}get m34(){return this[I][11]}get m41(){return this[I][12]}get m42(){return this[I][13]}get m43(){return this[I][14]}get m44(){return this[I][15]}get is2D(){return this[bn]}get isIdentity(){for(let e=0;e<16;e++)if(this[I][e]!==No[e])return!1;return!0}multiply(e){let t=new Po(multiply(this[I],e[I]));return t[bn]=this[bn]&&e[bn],t}translate(e=0,t=0,n=0){let r=new Po([1,0,0,0,0,1,0,0,0,0,1,0,e,t,n,1]);return r[bn]=n===0,this.multiply(r)}scale(e=1,t=e,n=1){let r=new Po([e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1]);return r[bn]=n===1,this.multiply(r)}inverse(){let[e,t,,,n,r,,,,,,,i,a]=this[I],o=e*r-t*n;if(!this[bn]||o===0){let e=new Po(Array.from({length:16},()=>NaN));return e[bn]=!1,e}return new Po([r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,(t*i-e*a)/o])}transformPoint(e={}){return jo.fromPoint(e).matrixTransform(this)}toFloat64Array(){return Float64Array.from(this[I])}toFloat32Array(){return Float32Array.from(this[I])}toJSON(){let e={a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f},t=[`m11`,`m12`,`m13`,`m14`,`m21`,`m22`,`m23`,`m24`,`m31`,`m32`,`m33`,`m34`,`m41`,`m42`,`m43`,`m44`];for(let n=0;n<16;n++)e[t[n]]=this[I][n];return e.is2D=this[bn],e.isIdentity=this.isIdentity,e}toString(){return this[bn]?`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.e}, ${this.f})`:`matrix3d(${this[I].join(`, `)})`}},Po=class DOMMatrix extends DOMMatrixReadOnly{static fromMatrix(e={}){return DOMMatrixReadOnly.fromMatrix.call(DOMMatrix,e)}get a(){return this[I][0]}set a(e){this[I][0]=Number(e)}get b(){return this[I][1]}set b(e){this[I][1]=Number(e)}get c(){return this[I][4]}set c(e){this[I][4]=Number(e)}get d(){return this[I][5]}set d(e){this[I][5]=Number(e)}get e(){return this[I][12]}set e(e){this[I][12]=Number(e)}get f(){return this[I][13]}set f(e){this[I][13]=Number(e)}};exposeMembers(DOMPointReadOnly,jo,DOMRectReadOnly,Mo,DOMRectList,DOMMatrixReadOnly,Po);function isPotentialCustomElementName(e){let t=e.charCodeAt(0);return t>=97&&t<=122&&e.includes(`-`)}var Fo=class Element extends Node{constructor(e,t,n,r){super(1,e);let i=this[M];i.name=t,i.ns=n,i.prefix=r,n===`http://www.w3.org/1999/xhtml`&&(e[N]&&(i.flags|=2),i.tag=tagId(t),i.tag===0&&isPotentialCustomElementName(t)&&(i.flags|=128))}get namespaceURI(){return this[M].ns}get prefix(){return this[M].prefix}get localName(){return this[M].name}get tagName(){return htmlUppercasedQualifiedName(this[M])}get id(){return this[M].id}set id(e){setAttribute(this[M],`id`,String(e))}get className(){return getAttribute(this[M],`class`)??``}set className(e){setAttribute(this[M],`class`,String(e))}get classList(){return this[rt]??=new So(this[M],`class`)}set classList(e){this.classList.value=e}get dataset(){return this[wt]??=createDOMStringMap(this[M])}get part(){let e=Io.get(this);return e===void 0&&Io.set(this,e=new So(this[M],`part`)),e}set part(e){this.part.value=e}get attributes(){return this[Ve]??=new Oo(this[M])}get slot(){return attr(this[M],`slot`)??``}set slot(e){let t=this[M],n=String(e),r=findAttributeByNamespace(t,null,`slot`);r===null?appendAttribute(t,new AttrRecord(`slot`,n,null,null)):changeAttribute(t,r,n)}hasAttributes(){let e=this[M].attrs;return e!==null&&e.length!==0}getAttributeNames(){let e=this[M].attrs;return e===null?[]:e.map(e=>e.name)}getAttribute(e){return getAttribute(this[M],String(e))}getAttributeNS(e,t){let n=findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t));return n===null?null:n.value}setAttribute(e,t){setAttribute(this[M],String(e),String(t))}setAttributeNS(e,t,n){let{namespace:r,prefix:i,localName:a}=validateAndExtract(e===void 0?null:e,String(t),`attribute`),o=this[M],s=String(n),c=findAttributeByNamespace(o,r,a);c===null?appendAttribute(o,new AttrRecord(a,s,r,i)):changeAttribute(o,c,s)}getAttributeNode(e){let t=this[M],n=String(e),r=findAttributeByName(t,t.flags&2?asciiLowercase$1(n):n);return r===null?null:attrNode(t,r)}getAttributeNodeNS(e,t){let n=this[M],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));return r===null?null:attrNode(n,r)}setAttributeNode(e){return setAttributeNode(this[M],e)}setAttributeNodeNS(e){return setAttributeNode(this[M],e)}removeAttributeNode(e){return removeAttributeNode(this[M],e)}removeAttribute(e){removeAttribute(this[M],String(e))}removeAttributeNS(e,t){let n=findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t));n!==null&&removeAttributeRecord(this[M],n)}toggleAttribute(e,t){let n=this[M],r=String(e);if(!isValidAttributeLocalName(r))throw new DOMException(`"${r}" is not a valid attribute name.`,`InvalidCharacterError`);let i=n.flags&2?asciiLowercase$1(r):r,a=findAttributeByName(n,i);return a===null?t===void 0||t?(appendAttribute(n,new AttrRecord(i,``,null,null)),!0):!1:t===void 0||!t?(removeAttributeRecord(n,a),!1):!0}hasAttribute(e){return getAttribute(this[M],String(e))!==null}hasAttributeNS(e,t){return findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t))!==null}matches(e){return matches(this[M],String(e))}webkitMatchesSelector(e){return this.matches(e)}closest(e){let t=closest(this[M],String(e));return t===null?null:t.node}getElementsByTagName(e){return getElementsByTagName(this[M],String(e))}getElementsByTagNameNS(e,t){return getElementsByTagNameNS(this[M],e,String(t))}getElementsByClassName(e){return getElementsByClassName(this[M],String(e))}get innerHTML(){return serializeChildren(this[M])}set innerHTML(e){let t=this[M],n=parseFragment(e===null?``:String(e),t);if(t.tag===X.template&&t.ns===`http://www.w3.org/1999/xhtml`){let e=this.content;if(e!=null){e._replaceAll(n.node);return}}this._replaceAll(n.node)}getHTML(e){return getHTML(this[M],e)}setHTMLUnsafe(e){setHTMLUnsafe(this[M],String(e))}get outerHTML(){return serializeNode(this[M])}set outerHTML(e){let t=this[M],n=t.parent;if(n===null)return;if(n.type===9)throw new DOMException(`Cannot set outerHTML of the document element.`,`NoModificationAllowedError`);let r=n.type===11?t.doc.createElement(`body`)[M]:n,i=parseFragment(e===null?``:String(e),r);n.node.replaceChild(i.node,this)}insertAdjacentHTML(e,t){let n=asciiLowercase$1(String(e)),r=this[M],i;if(n===`beforebegin`||n===`afterend`){let e=r.parent;if(e===null||e.type===9)throw new DOMException(`The element has no parent.`,`NoModificationAllowedError`);i=e}else if(n===`afterbegin`||n===`beforeend`)i=r;else throw new DOMException(`"${e}" is not a valid position.`,`SyntaxError`);(i.type!==1||i.ns===`http://www.w3.org/1999/xhtml`&&i.name===`html`&&i.flags&2)&&(i=r.doc.createElement(`body`)[M]);let a=parseFragment(String(t),i).node;insertAdjacent(this,n,a)}insertAdjacentElement(e,t){if(!(t instanceof Element))throw TypeError(`Failed to execute 'insertAdjacentElement' on 'Element': parameter 2 is not of type 'Element'.`);return insertAdjacent(this,asciiLowercase$1(String(e)),t)}insertAdjacentText(e,t){insertAdjacent(this,asciiLowercase$1(String(e)),this[M].doc.createTextNode(String(t)))}get shadowRoot(){let e=this[W];return e!=null&&e.mode===`open`?e:null}attachShadow(e){if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'attachShadow' on 'Element': 1 argument required, but only 0 present.`);let t=e.mode;if(t!==`open`&&t!==`closed`)throw TypeError(`Failed to execute 'attachShadow' on 'Element': The provided value '${String(t)}' is not a valid enum value of type ShadowRootMode.`);let n=e.slotAssignment??`named`;if(n!==`named`&&n!==`manual`)throw TypeError(`Failed to execute 'attachShadow' on 'Element': The provided value '${String(n)}' is not a valid enum value of type SlotAssignmentMode.`);return attachShadowRoot(this,t,!!e.clonable,!!e.serializable,!!e.delegatesFocus,n)}get assignedSlot(){if(ta===0)return null;let e=assignedSlot(this[M]);if(e===null)return null;let t=this[M].parent,n=t===null||!(t.flags&512)?null:t.node[W];return n!=null&&n.mode===`open`?e.node:null}getBoundingClientRect(){return new Mo}getClientRects(){return new DOMRectList}checkVisibility(e){return!!(this[M].flags&1)}get scrollTop(){return 0}set scrollTop(e){}get scrollLeft(){return 0}set scrollLeft(e){}get scrollWidth(){return 0}get scrollHeight(){return 0}get clientTop(){return 0}get clientLeft(){return 0}get clientWidth(){return 0}get clientHeight(){return 0}scroll(e,t){}scrollTo(e,t){}scrollBy(e,t){}scrollIntoView(e){}_connectedSteps(){}_disconnectedSteps(){}_attributeChangedSteps(e,t,n,r){}_childrenChangedSteps(){}_adoptingSteps(e){}_movingSteps(e,t){}_cloningSteps(e,t){}};installParentNode(Fo),installChildNode(Fo),installNonDocumentTypeChildNode(Fo);function insertAdjacent(e,t,n){switch(t){case`beforebegin`:{let t=e.parentNode;return t===null?null:t.insertBefore(n,e)}case`afterbegin`:return e.insertBefore(n,e.firstChild);case`beforeend`:return e.appendChild(n);case`afterend`:{let t=e.parentNode;return t===null?null:t.insertBefore(n,e.nextSibling)}}throw new DOMException(`"${t}" is not a valid position.`,`SyntaxError`)}const Io=/* @__PURE__ */ new WeakMap,Lo=/* @__PURE__ */ new Set([`article`,`aside`,`blockquote`,`body`,`div`,`footer`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`header`,`main`,`nav`,`p`,`section`,`span`]);let Ro=!1;function attachShadowRoot(e,t,n,r,i,a){let o=e[M];if(o.ns!==`http://www.w3.org/1999/xhtml`)throw new DOMException(`This element does not support attachShadow`,`NotSupportedError`);let s=o.name;if(!(o.flags&128)&&!Lo.has(s))throw new DOMException(`Failed to execute 'attachShadow' on 'Element': This element does not support attachShadow`,`NotSupportedError`);let c=e._shadowDisabled;if(typeof c==`function`&&c.call(e))throw new DOMException(`Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host whose custom element definition disables it.`,`NotSupportedError`);let l=e[W];if(l!=null){if(!l[Tt]||l[jn]!==t)throw new DOMException(`Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host which already hosts a shadow tree.`,`NotSupportedError`);return l._replaceAll(null),l[Tt]=!1,l}let u=new ShadowRoot(o.doc,e,t,i,a,n,r);return e[W]=u,o.flags|=512,_shadowRootAttached(),Ro||(Ro=!0,setAssignedSlotLookup(e=>{let t=assignedSlotForEventPath(e);return t===null?null:t.node})),u}const zo=/* @__PURE__ */ new WeakMap;function cachedCollection(e,t,n){let r=zo.get(e);r===void 0&&zo.set(e,r=/* @__PURE__ */ new Map);let i=r.get(t);return i===void 0&&r.set(t,i=ka._descendants(e,n)),i}function getElementsByTagName(e,t){if(t===`*`)return cachedCollection(e,`t*`,null);let n=asciiLowercase$1(t),r=e.doc[N],i=t.indexOf(`:`),a=i===-1?null:t.slice(0,i),o=i===-1?t:t.slice(i+1),s=i===-1?null:n.slice(0,i),c=i===-1?n:n.slice(i+1);return cachedCollection(e,`t`+t,e=>r&&e.ns===`http://www.w3.org/1999/xhtml`?e.name===c&&e.prefix===s:e.name===o&&e.prefix===a)}function getElementsByTagNameNS(e,t,n){let r=t===``||t==null?null:String(t),i=`n`+(r??``)+`\0`+(r===null?`0`:`1`)+n;return r===`*`&&n===`*`?cachedCollection(e,i,null):r===`*`?cachedCollection(e,i,e=>e.name===n):n===`*`?cachedCollection(e,i,e=>e.ns===r):cachedCollection(e,i,e=>e.ns===r&&e.name===n)}function getElementsByClassName(e,t){let n=[];for(let e of splitOnAsciiWhitespace(t))n.includes(e)||n.push(e);if(n.length===0)return cachedCollection(e,`c`,()=>!1);if(e.doc[jn]===`quirks`){let r=n.map(asciiLowercase$1);return cachedCollection(e,`q`+t,e=>{let t=classTokens(e);outer:for(let e=0;e<r.length;e++){for(let n=0;n<t.length;n++)if(asciiLowercase$1(t[n])===r[e])continue outer;return!1}return!0})}if(n.length===1){let r=n[0];return cachedCollection(e,`c`+t,e=>{let t=classTokens(e);for(let e=0;e<t.length;e++)if(t[e]===r)return!0;return!1})}return cachedCollection(e,`c`+t,e=>{let t=classTokens(e);for(let e=0;e<n.length;e++)if(!t.includes(n[e]))return!1;return!0})}const Bo=/* @__PURE__ */ `abort.auxclick.beforeinput.beforematch.beforetoggle.blur.cancel.canplay.canplaythrough.change.click.close.command.contextlost.contextmenu.contextrestored.copy.cuechange.cut.dblclick.drag.dragend.dragenter.dragleave.dragover.dragstart.drop.durationchange.emptied.ended.error.focus.formdata.input.invalid.keydown.keypress.keyup.load.loadeddata.loadedmetadata.loadstart.mousedown.mouseenter.mouseleave.mousemove.mouseout.mouseover.mouseup.paste.pause.play.playing.progress.ratechange.reset.resize.scroll.scrollend.securitypolicyviolation.seeked.seeking.select.slotchange.stalled.submit.suspend.timeupdate.toggle.volumechange.waiting.webkitanimationend.webkitanimationiteration.webkitanimationstart.webkittransitionend.wheel.gotpointercapture.lostpointercapture.pointerdown.pointermove.pointerrawupdate.pointerup.pointercancel.pointerover.pointerout.pointerenter.pointerleave.touchstart.touchend.touchmove.touchcancel.animationstart.animationiteration.animationend.animationcancel.transitionrun.transitionstart.transitionend.transitioncancel.selectstart.selectionchange`.split(`.`),Vo=[`afterprint`,`beforeprint`,`beforeunload`,`hashchange`,`languagechange`,`message`,`messageerror`,`offline`,`online`,`pagehide`,`pagereveal`,`pageshow`,`pageswap`,`popstate`,`rejectionhandled`,`storage`,`unhandledrejection`,`unload`],Ho=[`blur`,`error`,`focus`,`load`,`resize`,`scroll`],Uo=[`readystatechange`,`visibilitychange`];var HandlerEntry=class{value;listener;constructor(){this.value=null,this.listener=null}};const Wo=/* @__PURE__ */ new WeakMap;function makeProcessingListener(e){return function(t){let n=e.value;if(typeof n!=`function`)return;let r=n,i=t._s,a=i.currentTarget;if(t instanceof ErrorEvent&&i.type===`error`&&isWindow(a)){r.call(a,t.message,t.filename,t.lineno,t.colno,t.error)===!0&&setCanceledFlag(i);return}let o=r.call(a,t);t instanceof BeforeUnloadEvent&&i.type===`beforeunload`?o!=null&&(setCanceledFlag(i),t.returnValue===``&&(t.returnValue=String(o))):o===!1&&setCanceledFlag(i)}}function getEventHandler(e,t){let n=Wo.get(e);return n===void 0?null:n.get(t)?.value??null}function setEventHandler(e,t,n){let r=n!==null&&(typeof n==`object`||typeof n==`function`)?n:null,i=Wo.get(e);if(r===null){let n=i?.get(t);if(n===void 0)return;n.value=null,n.listener!==null&&(removeEventListener(e,t,n.listener,!1),n.listener=null);return}i===void 0&&Wo.set(e,i=/* @__PURE__ */ new Map);let a=i.get(t);a===void 0&&i.set(t,a=new HandlerEntry),a.value=r,a.listener===null&&(a.listener=makeProcessingListener(a),addEventListener(e,t,a.listener,!1))}const Go=/* @__PURE__ */ new Map;function handlerAccessor(e,t){if(t===null){let t=Go.get(e);return t===void 0&&(t={get(){return getEventHandler(this,e)},set(t){setEventHandler(this,e,t)}},Go.set(e,t)),t}return{get(){let n=t(this);return n===null?null:getEventHandler(n,e)},set(n){let r=t(this);r!==null&&setEventHandler(r,e,n)}}}const Ko={webkitanimationend:`webkitAnimationEnd`,webkitanimationiteration:`webkitAnimationIteration`,webkitanimationstart:`webkitAnimationStart`,webkittransitionend:`webkitTransitionEnd`};function addHandler(e,t,n){let{get:r,set:i}=handlerAccessor(Ko[t]??t,n);e[`on`+t]={configurable:!0,enumerable:!0,get:r,set:i}}function bodyWindow(e){let t=e[M];return t===void 0?null:t.doc[J]}function installEventHandlers(e,t){let n={};if(t===`body`){for(let e of Ho)addHandler(n,e,bodyWindow);for(let e of Vo)addHandler(n,e,bodyWindow)}else{for(let e of Bo)addHandler(n,e,null);if(t===`window`)for(let e of Vo)addHandler(n,e,null);if(t===`document`)for(let e of Uo)addHandler(n,e,null)}Object.defineProperties(e,n)}const qo=Symbol(`already constructed`),Jo=/* @__PURE__ */ new WeakMap,Yo=/* @__PURE__ */ new WeakSet,Xo=/* @__PURE__ */ new WeakSet,Zo=/* @__PURE__ */ new WeakMap,Qo=/* @__PURE__ */ new WeakMap;let $o=0;const es=/* @__PURE__ */ new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]),ts=RegExp(`^[a-z][\\-.0-9_a-z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]*$`,`u`);function isValidCustomElementName(e){return e.includes(`-`)&&ts.test(e)&&!es.has(e)}var CustomElementRegistry=class{[Ye];[Je];[ei];[lr];[J];constructor(e=null){this[Ye]=/* @__PURE__ */ new Map,this[Je]=/* @__PURE__ */ new Map,this[ei]=/* @__PURE__ */ new Map,this[lr]=!1,this[J]=e}define(e,t,n){if(typeof t!=`function`)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': parameter 2 is not of type 'Function'.`);if(e=String(e),!isConstructor(t))throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The provided value is not a constructor.`);if(!isValidCustomElementName(e))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': "${e}" is not a valid custom element name`,`SyntaxError`);if(this[Ye].has(e))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`,`NotSupportedError`);if(this[Je].has(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry`,`NotSupportedError`);let r=e,i=n?.extends;if(i!=null){let e=String(i);if(isValidCustomElementName(e))throw new DOMException(`"${e}" is a valid custom element name and cannot be extended.`,`NotSupportedError`);if(elementClassFor(e,`http://www.w3.org/1999/xhtml`).name===`HTMLUnknownElement`)throw new DOMException(`"${e}" is not a known HTML element and cannot be extended.`,`NotSupportedError`);r=e}if(this[lr])throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': an element definition is already running.`,`NotSupportedError`);this[lr]=!0;let a=!1,o=!1,s=!1,c=/* @__PURE__ */ new Set,l=null,u=null,d=null,m=null,h=null,_=null,v=null,ee=null,y=null;try{let e=t.prototype;if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The prototype of the constructor is not an object.`);let n=e,cb=e=>{let t=n[e];if(t===void 0)return null;if(typeof t!=`function`)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The '${e}' callback is not a function.`);return t};if(l=cb(`connectedCallback`),u=cb(`disconnectedCallback`),m=cb(`connectedMoveCallback`),d=cb(`adoptedCallback`),h=cb(`attributeChangedCallback`),h!==null){let e=t.observedAttributes;if(e!==void 0)for(let t of toSequence(e))c.add(String(t))}let r=t.disabledFeatures;if(r!==void 0)for(let e of toSequence(r)){let t=String(e);t===`internals`?o=!0:t===`shadow`&&(s=!0)}a=!!t.formAssociated,a&&(_=cb(`formAssociatedCallback`),v=cb(`formResetCallback`),ee=cb(`formDisabledCallback`),y=cb(`formStateRestoreCallback`))}finally{this[lr]=!1}let te={name:e,localName:r,constructor:t,observedAttributes:c,connectedCallback:l,disconnectedCallback:u,adoptedCallback:d,attributeChangedCallback:h,connectedMoveCallback:m,formAssociatedCallback:_,formResetCallback:v,formDisabledCallback:ee,formStateRestoreCallback:y,formAssociated:a,disableInternals:o,disableShadow:s,constructionStack:[],registry:this};this[Ye].set(e,te),this[Je].set(t,te),Zo.set(t,te),$o++,setCEActive();let ne=this[J]?.document;if(ne!=null){let e=[];collectCandidates(ne[M],te,e);for(let t of e)enqueueUpgrade(t,te);flushReactions()}let re=this[ei].get(e);re!==void 0&&(re.resolve(t),this[ei].delete(e))}get(e){return this[Ye].get(String(e))?.constructor}getName(e){if(typeof e!=`function`)throw TypeError(`Failed to execute 'getName' on 'CustomElementRegistry': parameter 1 is not of type 'Function'.`);return this[Je].get(e)?.name??null}whenDefined(e){if(e=String(e),!isValidCustomElementName(e))return Promise.reject(new DOMException(`"${e}" is not a valid custom element name`,`SyntaxError`));let t=this[Ye].get(e);if(t!==void 0)return Promise.resolve(t.constructor);let n=this[ei].get(e);if(n===void 0){let{promise:t,resolve:r}=Promise.withResolvers();n={promise:t,resolve:r},this[ei].set(e,n)}return n.promise}upgrade(e){let t=[];forEachShadowIncludingInclusiveDescendant(e[M],e=>{e.type===1&&t.push(e.node)});for(let e of t)tryToUpgrade(e);flushReactions()}_lookup(e,t,n){if(e!==`http://www.w3.org/1999/xhtml`)return null;let r=this[Ye].get(t);if(r!==void 0&&r.localName===t)return r;if(n!==null){let e=this[Ye].get(n);if(e!==void 0&&e.localName===t)return e}return null}};const ns={construct:()=>({})};function isConstructor(e){try{return new new Proxy(e,ns),!0}catch{return!1}}function toSequence(e){if(e===null||typeof e!=`object`&&typeof e!=`function`||typeof e[Symbol.iterator]!=`function`)throw TypeError(`The value provided is not iterable.`);return Array.from(e)}function forEachShadowIncludingInclusiveDescendant(e,t){for(let n=e;n!==null;n=nextInTree(n,e))if(t(n),n.type===1){let e=n.node[W];e!=null&&forEachShadowIncludingInclusiveDescendant(e[M],t)}}function collectCandidates(e,t,n){forEachShadowIncludingInclusiveDescendant(e,e=>{if(e.type!==1||e.ns!==`http://www.w3.org/1999/xhtml`||e.name!==t.localName)return;let r=e.node;(t.localName===t.name||Qo.get(r)===t.name)&&n.push(r)})}const rs=/* @__PURE__ */ new WeakMap;function customElementRegistryFor(e){let t=rs.get(e);return t===void 0&&(t=new CustomElementRegistry(e),rs.set(e,t)),t}function lookupDefinition(e,t,n,r){if($o===0||t!==`http://www.w3.org/1999/xhtml`)return null;let i=e[J];if(i===null)return null;let a=rs.get(i);return a===void 0?null:a._lookup(t,n,r)}function isDefined(e){return e.flags&1024?!0:e.flags&128?!isValidCustomElementName(e.name):is===0||!Qo.has(e.node)}function definitionOf(e){return Jo.get(e)}function isValueOf(e){return Qo.get(e)??null}let is=0;function setIsValue(e,t){Qo.has(e)||is++,Qo.set(e,t),setCEActive()}function isPrecustomizedOrCustom(e){return!!(e[M].flags&1024)||Xo.has(e)}let as=null;function htmlElementConstructorSteps(e){let t;try{t=rs.get(currentWindow())}catch{t=void 0}let n=t?.[Je].get(e)??Zo.get(e);if(n===void 0||isBuiltinInterface(e))throw TypeError(`Illegal constructor`);let r=null;for(let t=Object.getPrototypeOf(e);t!==null&&t!==Function.prototype;t=Object.getPrototypeOf(t))if(isBuiltinInterface(t)){r=t;break}if(n.localName===n.name){if(r!==null&&r.name!==`HTMLElement`)throw TypeError(`Illegal constructor: autonomous custom elements must extend HTMLElement`)}else if(r!==null&&!usesInterface(r,n.localName))throw TypeError(`Illegal constructor: the custom element does not extend the interface of its local name`);let i=n.constructionStack;if(i.length===0)return{upgrade:null,doc:as??n.registry[J]?.document??currentWindow().document,localName:n.localName,def:n,active:r};let a=i[i.length-1];if(a===qo)throw TypeError(`Failed to construct custom element: this element was already constructed`);let o=e.prototype;return typeof o==`object`&&o||(o=(r??elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)).prototype),Object.setPrototypeOf(a,o),i[i.length-1]=qo,{upgrade:a,doc:null,localName:``,def:null,active:null}}function usesInterface(e,t){return localNamesForInterface(e).includes(t)?!0:e.name===`HTMLElement`&&elementClassFor(t,`http://www.w3.org/1999/xhtml`).name===`HTMLElement`}function initNewCustomElement(e,t,n){let r=Object.getPrototypeOf(e);r!==null&&Object.getPrototypeOf(r)===null&&Object.hasOwn(r,`isPrototypeOf`)&&r.constructor?.prototype===r&&Object.setPrototypeOf(e,(n??elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)).prototype),markCustom(e,t),t.localName!==t.name&&setIsValue(e,t.name)}function markCustom(e,t){let n=e[M];Jo.set(e,t),n.flags|=1028,t.formAssociated&&(n.flags|=16392),t.attributeChangedCallback!==null&&t.observedAttributes.size!==0&&(n.flags|=8),t.adoptedCallback!==null&&(n.flags|=xe)}function createElementSync(e,t,n,r,i){if($o===0&&i===null)return null;let a=lookupDefinition(e,n,t,i);if(a!==null&&a.name!==a.localName){let i=createElementImpl(e,t,n,r),o=i.node;setIsValue(o,a.name),i.flags|=4;try{upgrade(o,a)}catch(e){reportException(e)}return i}if(a!==null){let i=a.constructor,o=as;as=e;try{let n=new i;if(typeof n!=`object`||!n||!(n instanceof elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)))throw TypeError(`The custom element constructor did not produce an HTMLElement.`);let a=n[M];if(a.attrs!==null&&a.attrs.length!==0)throw new DOMException(`The result must not have attributes`,`NotSupportedError`);if(a.first!==null)throw new DOMException(`The result must not have children`,`NotSupportedError`);if(a.parent!==null)throw new DOMException(`The result must not have a parent`,`NotSupportedError`);if(a.doc!==e)throw new DOMException(`The result must be in the same document`,`NotSupportedError`);if(a.name!==t)throw new DOMException(`The result must have the same localName`,`NotSupportedError`);return a.prefix=r,a}catch(i){return reportException(i),failedElement(e,t,n,r)}finally{as=o}}let o=createElementImpl(e,t,n,r);return i!==null&&n===`http://www.w3.org/1999/xhtml`&&(setIsValue(o.node,i),o.flags|=4),o}function failedElement(e,t,n,r){let i=new(elementClassFor(`applet`,ie))(e,t,n,r),a=i[M];return a.flags&=-5,Yo.add(i),a}function createElementUnsync(e,t,n,r,i){let a=createElementImpl(e,t,n,r);return n===`http://www.w3.org/1999/xhtml`&&initUnsync(a,i),a}function initUnsync(e,t){let n=e.node,r=lookupDefinition(e.doc,ie,e.name,t);r===null?t!==null&&(setIsValue(n,t),e.flags|=4):(r.name!==r.localName&&setIsValue(n,r.name),e.flags|=4,enqueueUpgrade(n,r))}function cloneElement(e,t){return createElementUnsync(e,t.name,t.ns,t.prefix,t.ns===`http://www.w3.org/1999/xhtml`?Qo.get(t.node)??null:null)}function parserCreated(e){os=!0;try{initUnsync(e,e.attrs===null?null:attr(e,`is`))}finally{os=!1}}let os=!1,ss=[];function releaseDeferred(e){let t=null,n=null;for(let r=0;r<ss.length;r++){let i=ss[r],a=i[M];for(;a.parent!==null;)a=a.parent;!e&&a.type===11&&!(a.flags&32)?(n??=[]).push(i):(t??=[]).push(i)}ss=n??[],t!==null&&(ds=ds.length===0?t:t.concat(ds))}setCustomElementCreate(createElementSync),setShadowHostCustomStateCheck(isPrecustomizedOrCustom),setCustomElementCloneHooks(cloneElement,parserCreated);let cs=null;function setFaceUpgradeHook(e){cs=e}function upgrade(e,t){let n=e[M];if(n.flags&1024||Yo.has(e)||Xo.has(e))return;Jo.set(e,t),Yo.add(e);let r=us.get(e);r===void 0&&us.set(e,r=[]);let i=n.attrs;if(i!==null&&t.attributeChangedCallback!==null)for(let e=0;e<i.length;e++){let n=i[e];t.observedAttributes.has(n.localName)&&r.push({kind:ls,def:t,fn:t.attributeChangedCallback,args:[n.localName,null,n.value,n.ns]})}n.flags&1&&t.connectedCallback!==null&&r.push({kind:ls,def:t,fn:t.connectedCallback,args:[]}),t.constructionStack.push(e);try{if(t.disableShadow&&e[W]!=null)throw new DOMException(`Failed to upgrade the custom element: its definition disables shadow roots, but it already has one.`,`NotSupportedError`);Xo.add(e);let r=t.constructor,i=new r;if(i!==e){if(typeof i!=`object`||!i||i[M]!==n)throw TypeError(`Custom element constructors must call super() first and must not return a different object.`);n.node=e}}catch(t){Jo.delete(e);let n=us.get(e);throw n!==void 0&&(n.length=0),t}finally{Xo.delete(e),t.constructionStack.pop()}Yo.delete(e),markCustom(e,t),t.formAssociated&&(n.doc[q]++,cs!==null&&cs(n))}function tryToUpgrade(e){let t=e[M];if(t.flags&1024||Yo.has(e))return;let n=lookupDefinition(t.doc,t.ns,t.name,Qo.get(e)??null);n!==null&&enqueueUpgrade(e,n)}const ls=1,us=/* @__PURE__ */ new WeakMap;let ds=[],fs=!1;function pushReaction(e,t){let n=us.get(e);n===void 0&&(n=[],us.set(e,n)),n.push(t),os?ss.push(e):ds.push(e),setCEReactionsPending(!0),fs||(fs=!0,queueMicrotask(backupFlush))}let ps=0;function outsideCEReactions(e){ps++;try{return e()}finally{ps--}}function backupFlush(){fs=!1,ss.length!==0&&releaseDeferred(!0),flushReactions()}function enqueueUpgrade(e,t){pushReaction(e,{kind:0,def:t,fn:null,args:[]})}function enqueueCallback(e,t,n){let r=Jo.get(e);if(r===void 0)return;let i=r[t];i!==null&&(t!==`attributeChangedCallback`||r.observedAttributes.has(n[0]))&&pushReaction(e,{kind:1,def:r,fn:i,args:n})}function enqueueFormCallback(e,t,n){let r=Jo.get(e);if(r===void 0)return;let i=r[t];i!==null&&pushReaction(e,{kind:1,def:r,fn:i,args:n})}function flushReactions(){if(ps===0){for(ss.length!==0&&releaseDeferred(!1);ds.length!==0;){let e=ds;ds=[];for(let t=0;t<e.length;t++){let n=e[t],r=us.get(n);for(;r.length!==0;){let e=r.shift();try{e.kind===0?upgrade(n,e.def):e.fn.apply(n,e.args)}catch(e){reportException(e)}}}}setCEReactionsPending(ss.length!==0)}}setCEReactionsFlush(flushReactions);function reportException(e,t=null){reportException$1(e,t)}function ceConnected(e){$o!==0&&(e[M].flags&1024?enqueueCallback(e,`connectedCallback`,[]):tryToUpgrade(e))}function ceDisconnected(e){e[M].flags&1024&&enqueueCallback(e,`disconnectedCallback`,[])}function ceAttributeChanged(e,t,n,r,i){e[M].flags&1024&&enqueueCallback(e,`attributeChangedCallback`,[t,n,r,i])}function ceMoved(e){let t=e[M];if(!(t.flags&1024)||!(t.flags&1))return;let n=Jo.get(e);if(n===void 0)return;if(n.connectedMoveCallback!==null){pushReaction(e,{kind:1,def:n,fn:n.connectedMoveCallback,args:[]});return}let r=n.disconnectedCallback,i=n.connectedCallback;(r!==null||i!==null)&&pushReaction(e,{kind:1,def:n,fn:function(){r!==null&&r.call(this),i!==null&&i.call(this)},args:[]})}function ceAdopted(e,t,n){e[M].flags&1024&&enqueueCallback(e,`adoptedCallback`,[t,n])}function shadowDisabled(e){if($o===0)return!1;let t=e[M],n=Jo.get(e)??lookupDefinition(t.doc,t.ns,t.name,Qo.get(e)??null);return n!=null&&n.disableShadow}const ms=2147483647;function contentAttr(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e];if(r.localName===t&&(r.rare===null||r.rare.ns===null))return r.value}return null}function lower(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)return e.replace(/[A-Z]+/g,e=>e.toLowerCase())}return e}function names(e){let t=[];for(let n of e.split(` `)){if(n===``)continue;let e=n.indexOf(`=`);e===-1?t.push([n,lower(n)]):t.push([n.slice(0,e),n.slice(e+1)])}return t}function defineAccessor(e,t,n,r){Object.defineProperty(e.prototype,t,{get:n,set:r,configurable:!0,enumerable:!0})}function parseInteger(e){let t=e.length,n=0;for(;n<t&&isAsciiWhitespace(e.charCodeAt(n));)n++;if(n===t)return NaN;let r=1,i=e.charCodeAt(n);if(i===45?(r=-1,n++):i===43&&n++,n===t||(i=e.charCodeAt(n),i<48||i>57))return NaN;let a=0;for(;n<t&&(i=e.charCodeAt(n),!(i<48||i>57));)a=a*10+(i-48),n++;return a>0x38d7ea4c68000&&(a=1/0),r*a+0}function parseNonNegativeInteger(e){let t=parseInteger(e);return t>=0?t+0:NaN}function parseFloatingPoint(e){let t=0,n=e.length;for(;t<n&&isAsciiWhitespace(e.charCodeAt(t));)t++;let r=/^[-+]?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][-+]?\d+)?/.exec(t===0?e:e.slice(t));if(r===null)return NaN;let i=Number(r[0]);return Number.isFinite(i)?i===0?0:i:NaN}function indexSizeError(e){return new DOMException(e,`IndexSizeError`)}function str(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)??``},function(e){setAttribute(this[M],r,String(e))})}function strNullEmpty(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)??``},function(e){setAttribute(this[M],r,e===null?``:String(e))})}function nullableStr(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)},function(e){e==null?removeAttribute(this[M],r):setAttribute(this[M],r,String(e))})}function bool(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)!==null},function(e){e?setAttribute(this[M],r,``):removeAttribute(this[M],r)})}function url(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){let e=this[M],t=contentAttr(e,r);return t===null?``:resolveURL(e,t)??t},function(e){setAttribute(this[M],r,String(e))})}function resolveURL(e,t){let n=e.doc.baseURI,r=URL.parse(t,n);return r===null?null:r.href}function long(e,t,n=0){for(let[r,i]of names(t))defineAccessor(e,r,function(){let e=contentAttr(this[M],i);if(e===null)return n;let t=parseInteger(e);return t>=-2147483648&&t<=ms?t:n},function(e){setAttribute(this[M],i,String(Number(e)|0))})}function nonNegativeLong(e,t,n=-1){for(let[r,i]of names(t))defineAccessor(e,r,function(){let e=contentAttr(this[M],i);if(e===null)return n;let t=parseNonNegativeInteger(e);return t<=ms?t:n},function(e){let t=Number(e)|0;if(t<0)throw indexSizeError(`The value provided (${t}) is negative.`);setAttribute(this[M],i,String(t))})}function ulong(e,t,n=0,r=!1){let i=+!!r;for(let[a,o]of names(t))defineAccessor(e,a,function(){let e=contentAttr(this[M],o);if(e===null)return n;let t=parseNonNegativeInteger(e);return t>=i&&t<=ms?t:n},function(e){let t=Number(e)>>>0;if(r&&t===0)throw indexSizeError(`The value provided is 0, which is not a positive number.`);t>ms&&(t=n),setAttribute(this[M],o,String(t))})}function clampedUlong(e,t,n,r,i,a){defineAccessor(e,t,function(){let e=contentAttr(this[M],n);if(e===null)return r;let t=parseNonNegativeInteger(e);return Number.isNaN(t)?r:t<i?i:t>a?a:t},function(e){let t=Number(e)>>>0;t>ms&&(t=r),setAttribute(this[M],n,String(t))})}function enumerated(e,t,n){let r=/* @__PURE__ */ new Map;for(let e of n.keywords){let t=e.indexOf(`:`);t===-1?r.set(e,e):r.set(e.slice(0,t),e.slice(t+1))}let i=n.missing===void 0?``:n.missing,a=n.invalid??``,o=n.empty??a,s=i===null;for(let[n,c]of names(t))defineAccessor(e,n,function(){let e=contentAttr(this[M],c);return e===null?i:e===``?r.get(``)??o:r.get(lower(e))??a},function(e){s&&e==null?removeAttribute(this[M],c):setAttribute(this[M],c,String(e))})}const hs={keywords:[`anonymous`,`use-credentials`],missing:null,invalid:`anonymous`,empty:`anonymous`},gs={keywords:[`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`]},_s={keywords:[`lazy`,`eager`],missing:`eager`,invalid:`eager`},vs={keywords:[`high`,`low`,`auto`],missing:`auto`,invalid:`auto`};function tokenList(e,t,n,r=null){let i=Symbol(t);defineAccessor(e,t,function(){let e=this[i];return e===void 0&&(e=new So(this[M],n,r),Object.defineProperty(this,i,{value:e})),e},function(e){setAttribute(this[M],n,String(e))})}const ys=2147483647;function readNonNegativeLong(e,t,n){let r=contentAttr(e,t);if(r===null)return n;let i=parseNonNegativeInteger(r);return i<=ys?i:n}function readPositiveUnsigned(e,t,n){let r=contentAttr(e,t);if(r===null)return n;let i=parseNonNegativeInteger(r);return i>=1&&i<=ys?i:n}function positiveWithFallback(e,t,n,r){Object.defineProperty(e.prototype,t,{get(){return readPositiveUnsigned(this[M],n,r)},set(e){let t=toUnsignedLong(e);setAttribute(this[M],n,String(t>=1&&t<=ys?t:r))},enumerable:!0,configurable:!0})}function toUnsignedLong(e){let t=Number(e);return Number.isFinite(t)?Math.trunc(t)>>>0:0}function reflectActionURL(e,t){let n=contentAttr(e,t);if(n===null||n===``)return e.doc.URL;let r=URL.parse(n,e.doc.baseURI);return r===null?n:r.href}function isWS(e){return e===32||e===9||e===10||e===12||e===13}function stripNewlines(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===10||n===13)return e.replace(/[\r\n]/g,``)}return e}function trimASCII(e){let t=0,n=e.length;for(;t<n&&isWS(e.charCodeAt(t));)t++;for(;n>t&&isWS(e.charCodeAt(n-1));)n--;return t===0&&n===e.length?e:e.slice(t,n)}function stripAndCollapseWS(e){return trimASCII(e).replace(/[\t\n\f\r ]+/g,` `)}function normalizeNewlines(e){return e.indexOf(`\r`)===-1?e:e.replace(/\r\n?/g,`
8
- `)}function fireEvent$1(e,t,n,r,i=!1){let a=new Event(t,{bubbles:n,cancelable:r,composed:i});return setTrusted(a),dispatch(a,e)}__name(fireEvent$1,`fireEvent`);function dispatchTrusted$1(e,t){return setTrusted(t),dispatch(t,e)}__name(dispatchTrusted$1,`dispatchTrusted`);const bs=[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`],xs=/* @__PURE__ */ new Map;for(let e=0;e<bs.length;e++)xs.set(bs[e],e);function inputTypeFromAttr(e){if(e===null)return 1;let t=xs.get(e);return t===void 0?xs.get(asciiLowercase$1(e))??1:t}function inputType(e){return inputTypeFromAttr(attr(e,`type`))}function valueMode(e){switch(e){case 0:case 18:case 19:case 20:case 21:return 1;case 15:case 16:return 2;case 17:return 3;default:return 0}}function supportsSelectionType(e){return e===1||e===2||e===3||e===4||e===6}function isTextualType(e){return e>=1&&e<=6}function isNumericType(e){return e>=7&&e<=13}function lengthApplies(e){return e>=1&&e<=6}function readonlyApplies(e){return e>=1&&e<=12}function requiredApplies(e){return e>=1&&e<=12||e===15||e===16||e===17}function placeholderApplies(e){return e>=1&&e<=6||e===12}function listApplies(e){return e>=1&&e<=5||e>=7&&e<=14}function isListed(e){let t=e.tag;return!!(e.flags&16384)||t===X.input||t===X.button||t===X.select||t===X.textarea||t===X.fieldset||t===X.output||t===X.object}function isSubmittable(e){let t=e.tag;return!!(e.flags&16384)||t===X.input||t===X.button||t===X.select||t===X.textarea}function isResettable(e){let t=e.tag;return!!(e.flags&16384)||t===X.input||t===X.select||t===X.textarea||t===X.output}function isLabelable(e){switch(e.tag){case X.button:case X.meter:case X.output:case X.progress:case X.select:case X.textarea:return!0;case X.input:return inputType(e)!==0}return!!(e.flags&Se)}function elementByIdInTree(e,t){if(t===``)return null;let n=treeRoot(e);return n.type===9?e.doc._idLookup(t):walkForId(n,t)}function walkForId(e,t){for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))if(n.id===t)return n;return null}function formOwner(e){if(Cs!==0){let t=Ss.get(e);if(t!==void 0){if(parserAssociationValid(e,t))return t.form;Ss.delete(e),Cs--}}if(e.tag!==X.img){let t=attr(e,`form`);if(t!==null&&e.flags&1){let n=elementByIdInTree(e,t);return n!==null&&n.tag===X.form?n:null}}for(let t=e.parent;t!==null;t=t.parent)if(t.tag===X.form)return t;return null}var ParserAssociation=class{form;gen;constructor(e,t){this.form=e,this.gen=t}};const Ss=/* @__PURE__ */ new WeakMap;let Cs=0;function formGeneration(e){return e.node[ze]}function parserAssociateForm(e,t){t.tag===X.form&&(Ss.has(e)||Cs++,Ss.set(e,new ParserAssociation(t,formGeneration(t))),e.flags|=4,t.flags|=4)}function clearParserAssociation(e){Cs!==0&&Ss.delete(e)&&Cs--}function parserAssociationValid(e,t){return isListed(e)&&attr(e,`form`)!==null||formGeneration(t.form)!==t.gen?!1:treeRoot(e)===treeRoot(t.form)}function formControls(e,t,n){let r=treeRoot(e);for(let i=r.type===1?r:nextElementInTree(r,r);i!==null;i=nextElementInTree(i,r))isListed(i)&&(n||i.tag!==X.input||inputType(i)!==19)&&formOwner(i)===e&&t.push(i);return t}function firstLegend(e){for(let t=e.first;t!==null;t=t.next)if(t.tag===X.legend)return t;return null}function inDisabledFieldset(e){let t=e;for(let n=e.parent;n!==null;t=n,n=n.parent)if(n.tag===X.fieldset&&attr(n,`disabled`)!==null){if(t.tag===X.legend&&firstLegend(n)===t)continue;return!0}return!1}function isActuallyDisabled(e){if(e.flags&16384)return attr(e,`disabled`)!==null||inDisabledFieldset(e);switch(e.tag){case X.button:case X.input:case X.select:case X.textarea:case X.fieldset:return attr(e,`disabled`)!==null||inDisabledFieldset(e);case X.optgroup:return attr(e,`disabled`)!==null;case X.option:{if(attr(e,`disabled`)!==null)return!0;let t=e.parent;return t!==null&&t.tag===X.optgroup&&attr(t,`disabled`)!==null}}return!1}function hasDatalistAncestor(e){for(let t=e.parent;t!==null;t=t.parent)if(t.tag===X.datalist)return!0;return!1}function labeledControl(e){let t=attr(e,`for`);if(t!==null){let n=elementByIdInTree(e,t);return n!==null&&isLabelable(n)?n:null}for(let t=nextElementInTree(e,e);t!==null;t=nextElementInTree(t,e))if(isLabelable(t))return t;return null}function labelsFor(e,t){let n=treeRoot(e);for(let r=n.type===1?n:nextElementInTree(n,n);r!==null;r=nextElementInTree(r,n))r.tag===X.label&&labeledControl(r)===e&&t.push(r);return t}var SnapshotCache=class{items=[];version=-1;doc=null;_dropSnapshot(){this.items=[],this.version=-1,this.doc=null}},ComputedNodeList=class extends Ii{constructor(){super(null),Object.defineProperty(this,Xe,{value:new SnapshotCache})}_snapshot(){let e=this[Xe],t=this._ownerDocument();if(e.version===t[q]&&e.doc===t)return e.items;let n=this._compute();return e.items=n,e.version=t[q],e.doc=t,n.length!==0&&holdSnapshot(t,e,this._root()),n.length>ws.count&&ensureIndexGetters(ws,n.length),n}get length(){return this._snapshot().length}item(e){let t=this._snapshot(),n=e>>>0;return n<t.length?t[n]:null}};const ws=indexGetterTable(ComputedNodeList.prototype,(e,t)=>{let n=e._snapshot();return t<n.length?n[t]:void 0});var LabelsNodeList=class extends ComputedNodeList{constructor(e){super(),Object.defineProperty(this,O,{value:e})}_ownerDocument(){return this[O].doc}_root(){return this[O]}_compute(){let e=labelsFor(this[O],[]),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].node;return t}},NameNodeList=class extends ComputedNodeList{constructor(e,t){super(),Object.defineProperty(this,O,{value:e}),Object.defineProperty(this,R,{value:t})}_ownerDocument(){return this[O].doc}_root(){return this[O]}_compute(){let e=this[O],t=this[R],n=[];for(let r=firstElementChild(e);r!==null;r=nextElementInTree(r,e))r.ns===`http://www.w3.org/1999/xhtml`&&r.attrs!==null&&attr(r,`name`)===t&&n.push(r.node);return n}},RadioNodeList=class extends ComputedNodeList{constructor(e,t){super(),Object.defineProperty(this,Kt,{value:e}),Object.defineProperty(this,R,{value:t})}_ownerDocument(){return this[Kt].doc}_root(){return this[Kt]}_compute(){let e=this[Kt].node._controls(),t=[],n=this[R];for(let r=0;r<e.length;r++){let i=e[r];(i.id===n||attr(i,`name`)===n)&&t.push(i.node)}return t}get value(){let e=this._snapshot();for(let t=0;t<e.length;t++){let n=e[t][M];if(n.tag===X.input&&inputType(n)===16&&e[t].checked)return attr(n,`value`)??`on`}return``}set value(e){let t=String(e),n=this._snapshot();for(let e=0;e<n.length;e++){let r=n[e][M];if(r.tag===X.input&&inputType(r)===16&&(attr(r,`value`)??`on`)===t){n[e].checked=!0;return}}}};Object.defineProperty(RadioNodeList.prototype,Symbol.toStringTag,{value:`RadioNodeList`,configurable:!0});var HTMLFormControlsCollection=class extends ka{constructor(e){super(e,!1,null)}_collect(e){let t=this._s.root.node._controls();for(let n=0;n<t.length;n++)e.push(t[n].node)}namedItem(e){let t=String(e);if(t===``)return null;let n=this._snapshot(),r=null,i=0;for(let e=0;e<n.length;e++){let a=n[e][M];if((a.id===t||attr(a,`name`)===t)&&(i===0&&(r=n[e]),i++,i>1))break}return i<=1?r:new RadioNodeList(this._s.root,t)}};Object.defineProperty(HTMLFormControlsCollection.prototype,Symbol.toStringTag,{value:`HTMLFormControlsCollection`,configurable:!0});function createFormControlsCollection(e){return withNamedProperties(new HTMLFormControlsCollection(e))}function listOfOptions(e,t){let n=e.first,r=0;for(;n!==null;){let i=!1;if(n.type===1){let e=n.ns===`http://www.w3.org/1999/xhtml`?n.tag:0;e===X.option?t.push(n):i=e===X.optgroup?r===0:e!==X.select&&e!==X.hr&&e!==X.datalist}if(i&&n.first!==null)n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===X.optgroup&&r++,n=n.first;else{for(;n!==null&&n.next===null;){if(n=n.parent,n===e||n===null)return t;n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===X.optgroup&&r--}if(n===null)return t;n=n.next}}return t}var HTMLOptionsCollection=class extends ka{constructor(e){super(e,!1,null)}_collect(e){let t=listOfOptions(this._s.root,[]);for(let n=0;n<t.length;n++)e.push(t[n].node);ensureOptionIndexAccessors(e.length+1)}_setIndex(e,t){let n=this._s.root.node,r=this._snapshot();if(t==null){e<r.length&&r[e].remove();return}if(typeof t!=`object`||!(M in t)||t[M].tag!==X.option)throw TypeError(`Failed to set an indexed property on 'HTMLOptionsCollection': parameter 2 is not of type 'HTMLOptionElement'.`);let i=e-r.length;if(i>0){let e=this._s.root.doc,t=e.createDocumentFragment();for(let n=0;n<i;n++)t.appendChild(e.createElement(`option`));n.appendChild(t)}if(i>=0)n.appendChild(t);else{let n=r[e];n.parentNode.replaceChild(t,n)}}get length(){return this._snapshot().length}set length(e){let t=Number(e)>>>0,n=this._s.root.node,r=this._snapshot(),i=r.length;if(t>i){if(t-i>1e5)return;let e=this._s.root.doc,r=e.createDocumentFragment();for(let n=i;n<t;n++)r.appendChild(e.createElement(`option`));n.appendChild(r)}else if(t<i){let e=r.slice(t);for(let t=0;t<e.length;t++)e[t].remove()}}add(e,t=null){let n=this._s.root.node;if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'add' on 'HTMLOptionsCollection': parameter 1 is not of type 'HTMLOptionElement or HTMLOptGroupElement'.`);let r=e[M].tag;if(r!==X.option&&r!==X.optgroup)throw TypeError(`Failed to execute 'add' on 'HTMLOptionsCollection': parameter 1 is not of type 'HTMLOptionElement or HTMLOptGroupElement'.`);for(let t=this._s.root;t!==null;t=t.parent)if(t===e[M])throw new DOMException(`The new element is an ancestor of the select element.`,`HierarchyRequestError`);let i=null;if(typeof t==`number`)i=this._snapshot()[t]??null;else if(t!=null){i=t;let e=!1;for(let n=t[M].parent;n!==null;n=n.parent)if(n===this._s.root){e=!0;break}if(!e)throw new DOMException(`The node before which the new node is to be inserted is not in this select.`,`NotFoundError`)}e!==i&&(i===null?n:i.parentNode).insertBefore(e,i)}remove(e){let t=this._snapshot(),n=Number(e)|0;t.length===0||n<0||n>=t.length||t[n].remove()}get selectedIndex(){return this._s.root.node.selectedIndex}set selectedIndex(e){this._s.root.node.selectedIndex=e}};let Ts=0;const Es=[{proto:HTMLOptionsCollection.prototype,coll:e=>e}];function addOptionIndexHost(e,t){Es.push({proto:e,coll:t}),defineOptionIndices(Es[Es.length-1],0,Ts)}function defineOptionIndices(e,t,n){let r=e.coll;for(let i=t;i<n;i++)Object.defineProperty(e.proto,i,{get(){return r(this).item(i)??void 0},set(e){r(this)._setIndex(i,e)},enumerable:!1,configurable:!0})}function ensureOptionIndexAccessors(e){if(e<=Ts)return;let t=Math.max(e,Ts*2,32);for(let e of Es)defineOptionIndices(e,Ts,t);Ts=t}ensureOptionIndexAccessors(32);var ValidityState=class{[O];constructor(e){this[O]=e,hideInternals(this)}get valueMissing(){return!!(this[O]._validityFlags()&1)}get typeMismatch(){return!!(this[O]._validityFlags()&2)}get patternMismatch(){return!!(this[O]._validityFlags()&4)}get tooLong(){return!!(this[O]._validityFlags()&8)}get tooShort(){return!!(this[O]._validityFlags()&16)}get rangeUnderflow(){return!!(this[O]._validityFlags()&32)}get rangeOverflow(){return!!(this[O]._validityFlags()&64)}get stepMismatch(){return!!(this[O]._validityFlags()&128)}get badInput(){return!!(this[O]._validityFlags()&256)}get customError(){return!!(this[O]._validityFlags()&512)}get valid(){return this[O]._validityFlags()===0}get[Symbol.toStringTag](){return`ValidityState`}};exposeMembers(ValidityState);function isInvalidCandidate(e){return!e._barredFromValidation()&&e._validityFlags()!==0}function checkValidityOf(e){return!isInvalidCandidate(e)||(fireEvent$1(e,`invalid`,!1,!0),!1)}const Ds={get willValidate(){return!this._barredFromValidation()},get validity(){let e=this;return e[Yr]??=new ValidityState(e)},get validationMessage(){let e=this;if(e._barredFromValidation())return``;let t=e._validityFlags();return t===0?``:t&512?e[T]:builtinMessage(e,t)},checkValidity(){return checkValidityOf(this)},reportValidity(){return checkValidityOf(this)},setCustomValidity(e){this[T]=normalizeNewlines(String(e))}};function installConstraintValidation(e){for(let t of Reflect.ownKeys(Ds))Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(Ds,t))}function builtinMessage(e,t){return e[M].doc[J]?.[z]?.validationMessages===`browser`?e._validationMessage(t):`Constraints not satisfied`}const Os=`Please fill out this field.`,ks=`Please enter a valid value.`;function msgEmail(e){let t=e.indexOf(`@`);return t===-1?`Please include an '@' in the email address. '${e}' is missing an '@'.`:t===e.length-1?`Please enter a part following '@'. '${e}' is incomplete.`:t===0?`Please enter a part followed by '@'. '${e}' is incomplete.`:`Please enter an email address.`}function characters(e){return e===1?`1 character`:`${e} characters`}function msgTooLong(e,t){return`Please shorten this text to ${characters(e)} or less (you are currently using ${characters(t)}).`}function msgTooShort(e,t){return`Please lengthen this text to ${characters(e)} or more (you are currently using ${characters(t)}).`}function msgUnderflow(e,t){return t?`Value must be ${e} or later.`:`Value must be greater than or equal to ${e}.`}function msgOverflow(e,t){return t?`Value must be ${e} or earlier.`:`Value must be less than or equal to ${e}.`}function msgStep(e,t){if(e!==null&&t!==null)return`Please enter a valid value. The two nearest valid values are ${e} and ${t}.`;let n=e??t;return n===null?ks:`Please enter a valid value. The nearest valid value is ${n}.`}const As=[[`valueMissing`,1],[`typeMismatch`,2],[`patternMismatch`,4],[`tooLong`,8],[`tooShort`,16],[`rangeUnderflow`,32],[`rangeOverflow`,64],[`stepMismatch`,128],[`badInput`,256],[`customError`,512]];var FaceState=class{impl;value;state;flags;message;anchor;validity;labels;lastOwner;lastDisabled;[T];[Yr];constructor(e){this.impl=e,this.value=null,this.state=null,this.flags=0,this.message=``,this.anchor=null,this.validity=null,this.labels=null,this.lastOwner=null,this.lastDisabled=!1,this[T]=``,this[Yr]=null}_validityFlags(){return this.flags}_barredFromValidation(){let e=this.impl;return isActuallyDisabled(e)||attr(e,`readonly`)!==null||hasDatalistAncestor(e)}_validationMessage(e){return this.message}};const js=/* @__PURE__ */ new WeakMap;function isFACE(e){return!!(e.flags&Se)}function faceState(e){let t=js.get(e);return t===void 0&&(t=new FaceState(e),js.set(e,t)),t}function validatableOf(e){return isFACE(e)?faceState(e):e.node}function assertFACE(e,t){if(!isFACE(e))throw new DOMException(`Failed to execute '${t}' on 'ElementInternals': The target element is not a form-associated custom element.`,`NotSupportedError`)}function internalsSetFormValue(e,t,n){assertFACE(e,`setFormValue`);let r=faceState(e);r.value=cloneSubmission(t),r.state=n===void 0?r.value:cloneSubmission(n)}function cloneSubmission(e){if(e==null)return null;if(e instanceof FormData){let t=new FormData;for(let[n,r]of e)t.append(n,r);return t}return e instanceof File?e:String(e)}function internalsForm(e){assertFACE(e,`form`);let t=formOwner(e);return t===null?null:t.node}function internalsLabels(e){assertFACE(e,`labels`);let t=faceState(e);return t.labels??=new LabelsNodeList(e)}function internalsSetValidity(e,t,n,r){assertFACE(e,`setValidity`);let i=0;if(t!=null)for(let[e,n]of As)t[e]&&(i|=n);if(i!==0&&(n===void 0||String(n)===``))throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.`);if(r!=null){let t=r[M];if(t===void 0||t.type!==1||t.ns!==`http://www.w3.org/1999/xhtml`)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': parameter 3 is not of type 'HTMLElement'.`);let n=!1;for(let r=t;r!==null;r=r.parent??r.node[j]?.[M]??null)if(r===e){n=!0;break}if(!n)throw new DOMException(`Failed to execute 'setValidity' on 'ElementInternals': The validation anchor is not a shadow-including descendant of the element.`,`NotFoundError`)}let a=faceState(e);a.flags=i,a.message=i===0?``:String(n).replace(/\r\n?/g,`
9
- `),a.anchor=r??null}function internalsWillValidate(e){return assertFACE(e,`willValidate`),!faceState(e)._barredFromValidation()}function internalsValidity(e){assertFACE(e,`validity`);let t=faceState(e);return t.validity??=new ValidityState(t)}function internalsValidationMessage(e){assertFACE(e,`validationMessage`);let t=faceState(e);return t._barredFromValidation()?``:t.message}function internalsCheckValidity(e,t=`checkValidity`){assertFACE(e,t);let n=faceState(e);return n._barredFromValidation()||n.flags===0?!0:(fireEvent$1(e.node,`invalid`,!1,!0),!1)}function faceEntries(e,t){let n=js.get(e)?.value??null;if(n===null)return;if(n instanceof FormData){for(let[e,r]of n)t.push([e,r]);return}let r=attr(e,`name`);r!==null&&r!==``&&t.push([r,n])}function invoke(e,t,n){enqueueFormCallback(e.node,t,n)}function faceReset(e){invoke(e,`formResetCallback`,[])}function flushFaceReactions(){flushReactions()}function faceStateMaybeChanged(e){let t=faceState(e),n=formOwner(e);n!==t.lastOwner&&(t.lastOwner=n,invoke(e,`formAssociatedCallback`,[n===null?null:n.node]));let r=isActuallyDisabled(e);r!==t.lastDisabled&&(t.lastDisabled=r,invoke(e,`formDisabledCallback`,[r]))}setFaceUpgradeHook(faceStateMaybeChanged);function isNewline(e){return e===10||e===13||e===12}function isWhitespace(e){return e===32||e===9||e===10||e===13||e===12}function isDigit(e){return e>=48&&e<=57}function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexValue(e){return e<=57?e-48:e<=70?e-65+10:e-97+10}function isNonAsciiIdent(e){return e<183?!1:e===183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e===8204||e===8205||e===8255||e===8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=55296&&e<=57343||e>=63744&&e<=64975||e>=65008&&e<=65533}function isIdentStart(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||isNonAsciiIdent(e)}function isIdentChar(e){return isIdentStart(e)||isDigit(e)||e===45}function isNonPrintable(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}var CSSTokenizer=class{src;len;pos;type;start;end;value;num;isInteger;unit;hashId;sign;comments;constructor(e){this.src=e,this.len=e.length,this.pos=0,this.type=0,this.start=0,this.end=0,this.value=``,this.num=0,this.isInteger=!0,this.unit=``,this.hashId=!1,this.sign=``,this.comments=0}reset(e){this.pos=e}code(e){return e<this.len?this.src.charCodeAt(e):-1}validEscape(e){return this.code(e)===92&&!isNewline(this.code(e+1))}startsIdent(e){let t=this.code(e);if(t===45){let t=this.code(e+1);return isIdentStart(t)||t===45||this.validEscape(e+1)}return isIdentStart(t)?!0:this.validEscape(e)}startsNumber(e){let t=this.code(e);if(t===43||t===45){let t=this.code(e+1);return isDigit(t)?!0:t===46&&isDigit(this.code(e+2))}return isDigit(t===46?this.code(e+1):t)}consumeEscape(){let e=this.code(this.pos);if(e===-1)return`�`;if(isHexDigit(e)){let e=0,t=0;for(;t<6&&isHexDigit(this.code(this.pos));)e=e*16+hexValue(this.code(this.pos)),this.pos++,t++;let n=this.code(this.pos);return n===13&&this.code(this.pos+1)===10?this.pos+=2:isWhitespace(n)&&this.pos++,e===0||e>=55296&&e<=57343||e>1114111?`�`:String.fromCodePoint(e)}if(this.pos++,e===0)return`�`;if(e>=55296&&e<=56319){let e=this.code(this.pos);if(e>=56320&&e<=57343)return this.pos++,this.src.slice(this.pos-2,this.pos)}return this.src.slice(this.pos-1,this.pos)}consumeName(){let e=this.pos;for(;this.pos<this.len;){let e=this.src.charCodeAt(this.pos);if(isIdentChar(e)&&e!==0)this.pos++;else break}if(!this.validEscape(this.pos)&&this.code(this.pos)!==0)return this.src.slice(e,this.pos);let t=this.src.slice(e,this.pos);for(;this.pos<this.len;){let e=this.src.charCodeAt(this.pos);if(e===0)t+=`�`,this.pos++;else if(isIdentChar(e))t+=this.src.slice(this.pos,this.pos+1),this.pos++;else if(this.validEscape(this.pos))this.pos++,t+=this.consumeEscape();else break}return t}consumeNumber(){let e=this.pos,t=!0,n=this.code(this.pos);for(this.sign=``,(n===43||n===45)&&(this.sign=n===43?`+`:`-`,this.pos++);isDigit(this.code(this.pos));)this.pos++;if(this.code(this.pos)===46&&isDigit(this.code(this.pos+1)))for(this.pos+=2,t=!1;isDigit(this.code(this.pos));)this.pos++;if(n=this.code(this.pos),n===69||n===101){let e=this.code(this.pos+1);if(isDigit(e))for(this.pos+=2,t=!1;isDigit(this.code(this.pos));)this.pos++;else if((e===43||e===45)&&isDigit(this.code(this.pos+2)))for(this.pos+=3,t=!1;isDigit(this.code(this.pos));)this.pos++}this.num=Number(this.src.slice(e,this.pos)),this.isInteger=t}consumeNumeric(){return this.consumeNumber(),this.startsIdent(this.pos)?(this.unit=this.consumeName(),this.value=this.unit,12):this.code(this.pos)===37?(this.pos++,11):10}consumeString(e){let t=this.pos;for(;this.pos<this.len;){let n=this.src.charCodeAt(this.pos);if(n===e)return this.value=this.src.slice(t,this.pos),this.pos++,5;if(n===92||n===0||isNewline(n))break;this.pos++}let n=this.src.slice(t,this.pos);for(;;){if(this.pos>=this.len)return this.value=n,5;let t=this.src.charCodeAt(this.pos);if(t===e)return this.pos++,this.value=n,5;if(isNewline(t))return this.value=n,6;if(t===92){let e=this.code(this.pos+1);e===-1?this.pos++:isNewline(e)?this.pos+=e===13&&this.code(this.pos+2)===10?3:2:(this.pos++,n+=this.consumeEscape())}else t===0?(n+=`�`,this.pos++):(n+=this.src.slice(this.pos,this.pos+1),this.pos++)}}consumeBadUrl(){for(;this.pos<this.len;){if(this.src.charCodeAt(this.pos)===41){this.pos++;break}this.validEscape(this.pos)?(this.pos++,this.consumeEscape()):this.pos++}return this.value=``,8}consumeUrl(){for(;isWhitespace(this.code(this.pos));)this.pos++;let e=``;for(;;){if(this.pos>=this.len)return this.value=e,7;let t=this.src.charCodeAt(this.pos);if(t===41)return this.pos++,this.value=e,7;if(isWhitespace(t)){for(;isWhitespace(this.code(this.pos));)this.pos++;let t=this.code(this.pos);return t===41?(this.pos++,this.value=e,7):t===-1?(this.value=e,7):this.consumeBadUrl()}if(t===34||t===39||t===40||isNonPrintable(t))return this.pos++,this.consumeBadUrl();if(t===92){if(this.validEscape(this.pos))this.pos++,e+=this.consumeEscape();else return this.consumeBadUrl()}else t===0?(e+=`�`,this.pos++):(e+=this.src.slice(this.pos,this.pos+1),this.pos++)}}consumeIdentLike(){let e=this.consumeName();if(this.value=e,this.code(this.pos)===40){if(this.pos++,e.length===3&&asciiLower3(e)===`url`){let e=this.pos;for(;isWhitespace(this.code(e))&&isWhitespace(this.code(e+1));)e++;let t=this.code(e),n=isWhitespace(t)?this.code(e+1):t;return n===34||n===39?2:this.consumeUrl()}return 2}return 1}skipComments(){for(;this.code(this.pos)===47&&this.code(this.pos+1)===42;){let e=this.src.indexOf(`*/`,this.pos+2);this.pos=e===-1?this.len:e+2,this.comments++}}next(){this.skipComments(),this.start=this.pos,this.value=``;let e=this.consumeToken();return this.type=e,this.end=this.pos,e}consumeToken(){if(this.pos>=this.len)return 0;let e=this.src.charCodeAt(this.pos);if(isWhitespace(e)){for(this.pos++;isWhitespace(this.code(this.pos));)this.pos++;return 13}switch(e){case 34:case 39:return this.pos++,this.consumeString(e);case 35:return isIdentChar(this.code(this.pos+1))||this.validEscape(this.pos+1)?(this.pos++,this.hashId=this.startsIdent(this.pos),this.value=this.consumeName(),4):this.delim();case 40:return this.pos++,21;case 41:return this.pos++,22;case 43:return this.startsNumber(this.pos)?this.consumeNumeric():this.delim();case 44:return this.pos++,18;case 45:return this.startsNumber(this.pos)?this.consumeNumeric():this.code(this.pos+1)===45&&this.code(this.pos+2)===62?(this.pos+=3,15):this.startsIdent(this.pos)?this.consumeIdentLike():this.delim();case 46:return this.startsNumber(this.pos)?this.consumeNumeric():this.delim();case 58:return this.pos++,16;case 59:return this.pos++,17;case 60:return this.code(this.pos+1)===33&&this.code(this.pos+2)===45&&this.code(this.pos+3)===45?(this.pos+=4,14):this.delim();case 64:return this.startsIdent(this.pos+1)?(this.pos++,this.value=this.consumeName(),3):this.delim();case 91:return this.pos++,19;case 92:return this.validEscape(this.pos)?this.consumeIdentLike():this.delim();case 93:return this.pos++,20;case 123:return this.pos++,23;case 125:return this.pos++,24}return isDigit(e)?this.consumeNumeric():isIdentStart(e)||e===0?this.consumeIdentLike():this.delim()}delim(){let e=this.src.charCodeAt(this.pos);if(e>=55296&&e<=56319){let e=this.code(this.pos+1);if(e>=56320&&e<=57343)return this.value=this.src.slice(this.pos,this.pos+2),this.pos+=2,9}return this.value=this.src.slice(this.pos,this.pos+1),this.pos++,9}};function asciiLower3(e){return e.toLowerCase()}var RawDecl=class{name;value;important;constructor(e,t,n){this.name=e,this.value=t,this.important=n}},RawRule=class{kind;name;prelude;hasBlock;decls;leading;rules;constructor(e,t,n,r){this.kind=e,this.name=t,this.prelude=n,this.hasBlock=r,this.decls=[],this.leading=0,this.rules=[]}};function closerFor(e){return e===2||e===21?22:e===19?20:e===23?24:0}function stripComments(e){let t=new CSSTokenizer(e),n=``,r=0,i=t.next();for(;i!==0;)t.start!==r&&n!==``&&t.type!==13&&!n.endsWith(` `)&&needsSeparator(n.charCodeAt(n.length-1),e.charCodeAt(t.start))&&(n+=`/**/`),n+=e.slice(t.start,t.end),r=t.end,i=t.next();return n.trim()}function needsSeparator(e,t){return(e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===45||e===95||e>=128)&&(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===45||t===95||t>=128)}function isAsciiCaseInsensitive(e,t){return e.length===t.length&&e.toLowerCase()===t}var CSSParser=class{src;t;peeked;stack;valueStart;valueEnd;importantEnd;important;valueHasBlock;valueOtherCount;constructor(e){this.src=e,this.t=new CSSTokenizer(e),this.peeked=!1,this.stack=[],this.valueStart=0,this.valueEnd=0,this.importantEnd=0,this.important=!1,this.valueHasBlock=!1,this.valueOtherCount=0}advance(){return this.peeked?(this.peeked=!1,this.t.type):this.t.next()}reconsume(){this.peeked=!0}advanceNonWs(){let e=this.advance();for(;e===13;)e=this.advance();return e}mark(){return this.t.start}restore(e){this.t.reset(e),this.peeked=!1}skipBlock(e){let t=this.stack,n=t.length;for(t.push(closerFor(e));t.length>n;){let e=this.t.next();if(e===0)break;e===t[t.length-1]?t.pop():(e===2||e===21||e===19||e===23)&&t.push(closerFor(e))}t.length=n}text(e,t,n){let r=this.src.slice(e,t);return this.t.comments!==n&&r.indexOf(`/*`)!==-1?stripComments(r):r}parseStylesheet(){let e=[];for(;;){let t=this.advance();if(t===0)break;if(t!==13&&t!==14&&t!==15){if(t===3){let t=this.consumeAtRule(!1);t!==null&&e.push(t)}else{this.reconsume();let t=this.consumeQualifiedRule(!1);t!==null&&e.push(t)}}}return e}consumeAtRule(e){let t=this.t.value,n=this.t.comments,r=-1,i=-1;for(;;){let a=this.advance();if(a===17||a===0)return new RawRule(2,t,r===-1?``:this.text(r,i,n),!1);if(a===24){if(e)return this.reconsume(),new RawRule(2,t,r===-1?``:this.text(r,i,n),!1);r===-1&&(r=this.t.start),i=this.t.end}else{if(a===23){let e=new RawRule(2,t,r===-1?``:this.text(r,i,n),!0);return this.consumeBlockContents(e),e}a!==13&&(r===-1&&(r=this.t.start),(a===2||a===21||a===19)&&this.skipBlock(a),i=this.t.end)}}}consumeQualifiedRule(e){let t=this.t.comments,n=-1,r=-1;for(;;){let i=this.advance();if(i===0)return null;if(i===24){if(e)return this.reconsume(),null;n===-1&&(n=this.t.start),r=this.t.end}else{if(i===17&&e)return null;if(i===23){let e=n===-1?``:this.text(n,r,t);if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45&&e.indexOf(`:`)!==-1)return this.skipBlock(23),null;let i=new RawRule(1,``,e,!0);return this.consumeBlockContents(i),i}i!==13&&(n===-1&&(n=this.t.start),(i===2||i===21||i===19)&&this.skipBlock(i),r=this.t.end)}}}consumeBlockContents(e){for(;;){let t=this.advance();if(t===0||t===24)return;if(t===13||t===17)continue;if(t===3){let t=this.consumeAtRule(!0);t!==null&&e.rules.push(t);continue}let n=this.mark();if(t===1){let t=this.consumeDeclaration();if(t!==null){e.decls.push(t);let n=e.rules.length;if(n===0)e.leading=e.decls.length;else{let r=e.rules[n-1];r.kind!==3&&(r=new RawRule(3,``,``,!1),e.rules.push(r)),r.decls.push(t),r.leading=r.decls.length}continue}this.restore(n)}else this.reconsume();let r=this.consumeQualifiedRule(!0);r!==null&&e.rules.push(r)}}consumeDeclaration(){let e=this.t.value;if(this.advanceNonWs()!==16)return null;let t=this.t.comments;if(this.scanValue(),this.valueStart===-1)return e.charCodeAt(0)===45&&e.charCodeAt(1)===45?new RawDecl(e,``,this.important):new RawDecl(e,``,!1);let n=this.important?this.importantEnd:this.valueEnd,r=n<=this.valueStart?``:this.text(this.valueStart,n,t).trim();return(e.charCodeAt(0)!==45||e.charCodeAt(1)!==45)&&this.valueHasBlock&&this.valueOtherCount>0?null:new RawDecl(e,r,this.important)}scanValue(){this.valueStart=-1,this.valueEnd=-1,this.importantEnd=-1,this.important=!1,this.valueHasBlock=!1,this.valueOtherCount=0;let e=0,t=0,n=-1,r=-1,i=-1;for(;;){let a=this.advance();if(a===0||a===17)break;if(a===24){this.reconsume();break}if(a===13)continue;this.valueStart===-1&&(this.valueStart=this.t.start);let o=0;a===9&&this.t.value===`!`?o=1:a===1&&isAsciiCaseInsensitive(this.t.value,`important`)&&(o=2),a===23?this.valueHasBlock=!0:this.valueOtherCount++,(a===2||a===21||a===19||a===23)&&this.skipBlock(a),n=r,r=i,i=this.t.end,t=e,e=o}this.valueEnd=i,e===2&&t===1&&(this.important=!0,this.importantEnd=n===-1?this.valueStart:n,this.valueHasBlock&&(this.valueOtherCount-=2))}};function parseStylesheet(e){return new CSSParser(e).parseStylesheet()}function parseRule(e){let t=new CSSParser(e),n=t.advanceNonWs();if(n===0)return null;let r=null;return n===3?r=t.consumeAtRule(!1):(t.reconsume(),r=t.consumeQualifiedRule(!1)),r===null||(n=t.advanceNonWs(),n!==0)?null:r}function parseDeclarationList(e){let t=new CSSParser(e),n=new RawRule(1,``,``,!0);for(t.consumeBlockContents(n);t.t.type!==0;){let e=new RawRule(1,``,``,!0);t.consumeBlockContents(e);for(let t=0;t<e.decls.length;t++)n.decls.push(e.decls[t])}return n.decls}const Ms=[`-webkit-align-content`,0,``,``,`-webkit-align-items`,0,``,``,`-webkit-align-self`,0,``,``,`-webkit-animation`,0,``,`animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline`,`-webkit-animation-delay`,0,``,``,`-webkit-animation-direction`,0,``,``,`-webkit-animation-duration`,0,``,``,`-webkit-animation-fill-mode`,0,``,``,`-webkit-animation-iteration-count`,0,``,``,`-webkit-animation-name`,0,``,``,`-webkit-animation-play-state`,0,``,``,`-webkit-animation-timing-function`,0,``,``,`-webkit-appearance`,0,``,``,`-webkit-backface-visibility`,0,``,``,`-webkit-background-clip`,0,``,``,`-webkit-background-origin`,0,``,``,`-webkit-background-size`,0,``,``,`-webkit-border-bottom-left-radius`,0,``,``,`-webkit-border-bottom-right-radius`,0,``,``,`-webkit-border-radius`,0,``,`border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius`,`-webkit-border-top-left-radius`,0,``,``,`-webkit-border-top-right-radius`,0,``,``,`-webkit-box-align`,0,``,``,`-webkit-box-flex`,0,``,``,`-webkit-box-ordinal-group`,0,``,``,`-webkit-box-orient`,0,``,``,`-webkit-box-pack`,0,``,``,`-webkit-box-shadow`,0,``,`box-shadow-color box-shadow-offset box-shadow-blur box-shadow-spread box-shadow-position`,`-webkit-box-sizing`,0,``,``,`-webkit-filter`,0,``,``,`-webkit-flex`,0,``,`flex-grow flex-shrink flex-basis`,`-webkit-flex-basis`,0,``,``,`-webkit-flex-direction`,0,``,``,`-webkit-flex-flow`,0,``,`flex-direction flex-wrap`,`-webkit-flex-grow`,0,``,``,`-webkit-flex-shrink`,0,``,``,`-webkit-flex-wrap`,0,``,``,`-webkit-justify-content`,0,``,``,`-webkit-line-clamp`,0,`none`,`max-lines block-ellipsis continue`,`-webkit-mask`,0,``,`mask-image mask-position mask-size mask-repeat mask-origin mask-clip mask-composite mask-mode`,`-webkit-mask-box-image`,0,``,`mask-border-source mask-border-slice mask-border-width mask-border-outset mask-border-repeat mask-border-mode`,`-webkit-mask-box-image-outset`,0,``,``,`-webkit-mask-box-image-repeat`,0,``,``,`-webkit-mask-box-image-slice`,0,``,``,`-webkit-mask-box-image-source`,0,``,``,`-webkit-mask-box-image-width`,0,``,``,`-webkit-mask-clip`,0,``,``,`-webkit-mask-composite`,0,``,``,`-webkit-mask-image`,0,``,``,`-webkit-mask-origin`,0,``,``,`-webkit-mask-position`,0,``,``,`-webkit-mask-repeat`,0,``,``,`-webkit-mask-size`,0,``,``,`-webkit-order`,0,``,``,`-webkit-perspective`,0,``,``,`-webkit-perspective-origin`,0,``,``,`-webkit-text-fill-color`,1,`currentcolor`,``,`-webkit-text-size-adjust`,0,``,``,`-webkit-text-stroke`,1,``,`-webkit-text-stroke-width -webkit-text-stroke-color`,`-webkit-text-stroke-color`,1,`currentcolor`,``,`-webkit-text-stroke-width`,1,`0`,``,`-webkit-transform`,0,``,``,`-webkit-transform-origin`,0,``,``,`-webkit-transform-style`,0,``,``,`-webkit-transition`,0,``,`transition-property transition-duration transition-timing-function transition-delay transition-behavior`,`-webkit-transition-delay`,0,``,``,`-webkit-transition-duration`,0,``,``,`-webkit-transition-property`,0,``,``,`-webkit-transition-timing-function`,0,``,``,`-webkit-user-select`,0,``,``,`accent-color`,1,`auto`,``,`align-content`,0,`normal`,``,`align-items`,0,`normal`,``,`align-self`,0,`auto`,``,`alignment-baseline`,0,`baseline`,``,`all`,0,``,``,`anchor-name`,0,`none`,``,`anchor-scope`,0,`none`,``,`animation`,0,``,`animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline`,`animation-composition`,0,`replace`,``,`animation-delay`,0,``,`animation-delay-start animation-delay-end`,`animation-delay-end`,0,`0s`,``,`animation-delay-start`,0,`0s`,``,`animation-direction`,0,`normal`,``,`animation-duration`,0,`auto`,``,`animation-fill-mode`,0,`none`,``,`animation-iteration-count`,0,`1`,``,`animation-name`,0,`none`,``,`animation-play-state`,0,`running`,``,`animation-range`,0,``,`animation-range-start animation-range-end`,`animation-range-center`,0,`normal`,``,`animation-range-end`,0,`normal`,``,`animation-range-start`,0,`normal`,``,`animation-timeline`,0,`auto`,``,`animation-timing-function`,0,`ease`,``,`animation-trigger`,0,`none`,``,`appearance`,0,`none`,``,`aspect-ratio`,0,`auto`,``,`backdrop-filter`,0,`none`,``,`backface-visibility`,0,`visible`,``,`background`,0,``,`background-image background-position background-size background-repeat background-attachment background-origin background-clip background-color`,`background-attachment`,0,`scroll`,``,`background-blend-mode`,0,`normal`,``,`background-clip`,0,`border-box`,``,`background-color`,0,`transparent`,``,`background-image`,0,`none`,``,`background-origin`,0,`padding-box`,``,`background-position`,0,`0% 0%`,`background-position-x background-position-y`,`background-position-block`,0,`0%`,``,`background-position-inline`,0,`0%`,``,`background-position-x`,0,`0%`,``,`background-position-y`,0,`0%`,``,`background-repeat`,0,`repeat`,``,`background-repeat-block`,0,`repeat`,``,`background-repeat-inline`,0,`repeat`,``,`background-repeat-x`,0,`repeat`,``,`background-repeat-y`,0,`repeat`,``,`background-size`,0,`auto`,``,`background-tbd`,0,``,``,`baseline-shift`,0,`0`,``,`baseline-source`,0,`auto`,``,`block-ellipsis`,1,`no-ellipsis`,``,`block-size`,0,`auto`,``,`block-step`,0,``,`block-step-size block-step-insert block-step-align block-step-round`,`block-step-align`,0,`auto`,``,`block-step-insert`,0,`margin-box`,``,`block-step-round`,0,`up`,``,`block-step-size`,0,`none`,``,`bookmark-label`,0,`content(text)`,``,`bookmark-level`,0,`none`,``,`bookmark-state`,0,`open`,``,`border`,0,``,`border-width border-style border-color`,`border-block`,0,``,`border-block-start border-block-end`,`border-block-clip`,0,``,`border-block-start-clip border-block-end-clip`,`border-block-color`,0,``,`border-block-start-color border-block-end-color`,`border-block-end`,0,``,`border-block-end-width border-block-end-style border-block-end-color`,`border-block-end-clip`,0,`none`,``,`border-block-end-color`,0,`currentcolor`,``,`border-block-end-radius`,0,`0`,`border-end-start-radius border-end-end-radius`,`border-block-end-style`,0,`none`,``,`border-block-end-width`,0,`medium`,``,`border-block-start`,0,``,`border-block-start-width border-block-start-style border-block-start-color`,`border-block-start-clip`,0,`none`,``,`border-block-start-color`,0,`currentcolor`,``,`border-block-start-radius`,0,`0`,`border-start-start-radius border-start-end-radius`,`border-block-start-style`,0,`none`,``,`border-block-start-width`,0,`medium`,``,`border-block-style`,0,``,`border-block-start-style border-block-end-style`,`border-block-width`,0,``,`border-block-start-width border-block-end-width`,`border-bottom`,0,``,`border-bottom-width border-bottom-style border-bottom-color`,`border-bottom-clip`,0,`none`,``,`border-bottom-color`,0,`currentcolor`,``,`border-bottom-left-radius`,0,`0`,``,`border-bottom-radius`,0,`0`,`border-bottom-left-radius border-bottom-right-radius`,`border-bottom-right-radius`,0,`0`,``,`border-bottom-style`,0,`none`,``,`border-bottom-width`,0,`medium`,``,`border-boundary`,1,`none`,``,`border-clip`,0,``,`border-top-clip border-right-clip border-bottom-clip border-left-clip`,`border-collapse`,1,`separate`,``,`border-color`,0,``,`border-top-color border-right-color border-bottom-color border-left-color`,`border-end-end-radius`,0,`0`,``,`border-end-start-radius`,0,`0`,``,`border-image`,0,``,`border-image-source border-image-slice border-image-width border-image-outset border-image-repeat`,`border-image-outset`,0,`0`,``,`border-image-repeat`,0,`stretch`,``,`border-image-slice`,0,`100%`,``,`border-image-source`,0,`none`,``,`border-image-width`,0,`1`,``,`border-inline`,0,``,`border-inline-start border-inline-end`,`border-inline-clip`,0,``,`border-inline-start-clip border-inline-end-clip`,`border-inline-color`,0,``,`border-inline-start-color border-inline-end-color`,`border-inline-end`,0,``,`border-inline-end-width border-inline-end-style border-inline-end-color`,`border-inline-end-clip`,0,`none`,``,`border-inline-end-color`,0,`currentcolor`,``,`border-inline-end-radius`,0,`0`,`border-start-end-radius border-end-end-radius`,`border-inline-end-style`,0,`none`,``,`border-inline-end-width`,0,`medium`,``,`border-inline-start`,0,``,`border-inline-start-width border-inline-start-style border-inline-start-color`,`border-inline-start-clip`,0,`none`,``,`border-inline-start-color`,0,`currentcolor`,``,`border-inline-start-radius`,0,`0`,`border-start-start-radius border-end-start-radius`,`border-inline-start-style`,0,`none`,``,`border-inline-start-width`,0,`medium`,``,`border-inline-style`,0,``,`border-inline-start-style border-inline-end-style`,`border-inline-width`,0,``,`border-inline-start-width border-inline-end-width`,`border-left`,0,``,`border-left-width border-left-style border-left-color`,`border-left-clip`,0,`none`,``,`border-left-color`,0,`currentcolor`,``,`border-left-radius`,0,`0`,`border-top-left-radius border-bottom-left-radius`,`border-left-style`,0,`none`,``,`border-left-width`,0,`medium`,``,`border-limit`,0,`all`,``,`border-radius`,0,``,`border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius`,`border-right`,0,``,`border-right-width border-right-style border-right-color`,`border-right-clip`,0,`none`,``,`border-right-color`,0,`currentcolor`,``,`border-right-radius`,0,`0`,`border-top-right-radius border-bottom-right-radius`,`border-right-style`,0,`none`,``,`border-right-width`,0,`medium`,``,`border-shape`,0,`none`,``,`border-spacing`,1,`0px 0px`,``,`border-start-end-radius`,0,`0`,``,`border-start-start-radius`,0,`0`,``,`border-style`,0,``,`border-top-style border-right-style border-bottom-style border-left-style`,`border-top`,0,``,`border-top-width border-top-style border-top-color`,`border-top-clip`,0,`none`,``,`border-top-color`,0,`currentcolor`,``,`border-top-left-radius`,0,`0`,``,`border-top-radius`,0,`0`,`border-top-left-radius border-top-right-radius`,`border-top-right-radius`,0,`0`,``,`border-top-style`,0,`none`,``,`border-top-width`,0,`medium`,``,`border-width`,0,``,`border-top-width border-right-width border-bottom-width border-left-width`,`bottom`,0,`auto`,``,`box-decoration-break`,0,`slice`,``,`box-shadow`,0,`none`,`box-shadow-color box-shadow-offset box-shadow-blur box-shadow-spread box-shadow-position`,`box-shadow-blur`,0,`0`,``,`box-shadow-color`,0,`currentcolor`,``,`box-shadow-offset`,0,`none`,``,`box-shadow-position`,0,`outset`,``,`box-shadow-spread`,0,`0`,``,`box-sizing`,0,`content-box`,``,`box-snap`,1,`none`,``,`break-after`,0,`auto`,``,`break-before`,0,`auto`,``,`break-inside`,0,`auto`,``,`caption-side`,1,`top`,``,`caret`,1,`auto`,`caret-color caret-animation caret-shape`,`caret-animation`,1,`auto`,``,`caret-color`,1,`auto`,``,`caret-shape`,1,`auto`,``,`clear`,0,`none`,``,`clip`,0,`auto`,``,`clip-path`,0,`none`,``,`clip-rule`,1,`nonzero`,``,`color`,1,`CanvasText`,``,`color-adjust`,0,``,`print-color-adjust`,`color-interpolation`,1,`sRGB`,``,`color-interpolation-filters`,1,`linearRGB`,``,`color-scheme`,1,`normal`,``,`column-count`,0,`auto`,``,`column-fill`,0,`balance`,``,`column-gap`,0,`normal`,``,`column-height`,0,`auto`,``,`column-rule`,0,``,`column-rule-width column-rule-style column-rule-color`,`column-rule-break`,0,`normal`,``,`column-rule-color`,0,`currentcolor`,``,`column-rule-inset`,0,``,`column-rule-inset-cap-start column-rule-inset-cap-end column-rule-inset-junction-start column-rule-inset-junction-end`,`column-rule-inset-cap`,0,``,`column-rule-inset-cap-start column-rule-inset-cap-end`,`column-rule-inset-cap-end`,0,`0`,``,`column-rule-inset-cap-start`,0,`0`,``,`column-rule-inset-end`,0,``,`column-rule-inset-cap-end column-rule-inset-junction-end`,`column-rule-inset-junction`,0,``,`column-rule-inset-junction-start column-rule-inset-junction-end`,`column-rule-inset-junction-end`,0,`0`,``,`column-rule-inset-junction-start`,0,`0`,``,`column-rule-inset-start`,0,``,`column-rule-inset-cap-start column-rule-inset-junction-start`,`column-rule-style`,0,`none`,``,`column-rule-visibility-items`,0,`normal`,``,`column-rule-width`,0,`medium`,``,`column-span`,0,`none`,``,`column-width`,0,``,``,`column-wrap`,0,`auto`,``,`columns`,0,``,`column-width column-count column-height`,`contain`,0,`none`,``,`contain-intrinsic-block-size`,0,`none`,``,`contain-intrinsic-height`,0,`none`,``,`contain-intrinsic-inline-size`,0,`none`,``,`contain-intrinsic-size`,0,``,`contain-intrinsic-width contain-intrinsic-height`,`contain-intrinsic-width`,0,`none`,``,`container`,0,``,`container-name container-type`,`container-name`,0,`none`,``,`container-type`,0,`normal`,``,`content`,0,`normal`,``,`content-visibility`,0,`visible`,``,`continue`,0,`auto`,``,`copy-into`,0,`none`,``,`corner`,0,`0`,`border-radius corner-shape`,`corner-block-end`,0,`0`,`border-block-end-radius corner-block-end-shape`,`corner-block-end-shape`,0,``,`corner-end-start-shape corner-end-end-shape`,`corner-block-start`,0,`0`,`border-block-start-radius corner-block-start-shape`,`corner-block-start-shape`,0,``,`corner-start-start-shape corner-start-end-shape`,`corner-bottom`,0,`0`,`border-bottom-radius corner-bottom-shape`,`corner-bottom-left`,0,`0`,`border-bottom-left-radius corner-bottom-left-shape`,`corner-bottom-left-shape`,0,`round`,``,`corner-bottom-right`,0,`0`,`border-bottom-right-radius corner-bottom-right-shape`,`corner-bottom-right-shape`,0,`round`,``,`corner-bottom-shape`,0,``,`corner-bottom-left-shape corner-bottom-right-shape`,`corner-end-end`,0,`0`,`border-end-end-radius corner-end-end-shape`,`corner-end-end-shape`,0,`round`,``,`corner-end-start`,0,`0`,`border-end-start-radius corner-end-start-shape`,`corner-end-start-shape`,0,`round`,``,`corner-inline-end`,0,`0`,`border-inline-end-radius corner-inline-end-shape`,`corner-inline-end-shape`,0,``,`corner-start-end-shape corner-end-end-shape`,`corner-inline-start`,0,`0`,`border-inline-start-radius corner-inline-start-shape`,`corner-inline-start-shape`,0,``,`corner-start-start-shape corner-end-start-shape`,`corner-left`,0,`0`,`border-left-radius corner-left-shape`,`corner-left-shape`,0,``,`corner-top-left-shape corner-bottom-left-shape`,`corner-right`,0,`0`,`border-right-radius corner-right-shape`,`corner-right-shape`,0,``,`corner-top-right-shape corner-bottom-right-shape`,`corner-shape`,0,`round`,`corner-top-left-shape corner-top-right-shape corner-bottom-right-shape corner-bottom-left-shape`,`corner-start-end`,0,`0`,`border-start-end-radius corner-start-end-shape`,`corner-start-end-shape`,0,`round`,``,`corner-start-start`,0,`0`,`border-start-start-radius corner-start-start-shape`,`corner-start-start-shape`,0,`round`,``,`corner-top`,0,`0`,`border-top-radius corner-top-shape`,`corner-top-left`,0,`0`,`border-top-left-radius corner-top-left-shape`,`corner-top-left-shape`,0,`round`,``,`corner-top-right`,0,`0`,`border-top-right-radius corner-top-right-shape`,`corner-top-right-shape`,0,`round`,``,`corner-top-shape`,0,``,`corner-top-left-shape corner-top-right-shape`,`counter-increment`,0,`none`,``,`counter-reset`,0,`none`,``,`counter-set`,0,`none`,``,`cue`,0,``,`cue-before cue-after`,`cue-after`,0,`none`,``,`cue-before`,0,`none`,``,`cursor`,1,`auto`,``,`cx`,0,`0`,``,`cy`,0,`0`,``,`d`,0,`none`,``,`direction`,1,`ltr`,``,`display`,0,`inline`,``,`dominant-baseline`,1,`auto`,``,`dynamic-range-limit`,1,`no-limit`,``,`empty-cells`,1,`show`,``,`event-trigger`,0,`none`,``,`event-trigger-name`,0,`none`,``,`event-trigger-source`,0,`none`,``,`field-sizing`,0,`fixed`,``,`fill`,1,`black`,``,`fill-break`,0,`bounding-box`,``,`fill-color`,1,`currentcolor`,``,`fill-image`,1,`none`,``,`fill-opacity`,1,`1`,``,`fill-origin`,0,`match-parent`,``,`fill-position`,1,`0% 0%`,``,`fill-repeat`,1,`repeat`,``,`fill-rule`,1,`nonzero`,``,`fill-size`,1,`auto`,``,`filter`,0,`none`,``,`flex`,0,`0 1 auto`,`flex-grow flex-shrink flex-basis`,`flex-basis`,0,`auto`,``,`flex-direction`,0,`row`,``,`flex-flow`,0,``,`flex-direction flex-wrap`,`flex-grow`,0,`0`,``,`flex-line-count`,0,`1`,``,`flex-shrink`,0,`1`,``,`flex-wrap`,0,`nowrap`,``,`float`,0,`none`,``,`float-defer`,0,`none`,``,`float-offset`,0,`0`,``,`float-reference`,0,`inline`,``,`flood-color`,0,`black`,``,`flood-opacity`,0,`1`,``,`flow-from`,0,`none`,``,`flow-into`,0,`none`,``,`flow-tolerance`,0,`normal`,``,`font`,1,``,`font-style font-variant font-weight font-stretch font-size line-height font-family`,`font-family`,1,``,``,`font-feature-settings`,1,`normal`,``,`font-kerning`,1,`auto`,``,`font-language-override`,1,`normal`,``,`font-optical-sizing`,1,`auto`,``,`font-palette`,1,`normal`,``,`font-size`,1,`medium`,``,`font-size-adjust`,1,`none`,``,`font-stretch`,0,``,``,`font-style`,1,`normal`,``,`font-synthesis`,1,`weight style small-caps position`,`font-synthesis-weight font-synthesis-style font-synthesis-small-caps`,`font-synthesis-position`,1,`auto`,``,`font-synthesis-small-caps`,1,`auto`,``,`font-synthesis-style`,1,`auto`,``,`font-synthesis-weight`,1,`auto`,``,`font-variant`,1,`normal`,`font-variant-ligatures font-variant-caps font-variant-alternates font-variant-numeric font-variant-east-asian font-variant-position font-variant-emoji`,`font-variant-alternates`,1,`normal`,``,`font-variant-caps`,1,`normal`,``,`font-variant-east-asian`,1,`normal`,``,`font-variant-emoji`,1,`normal`,``,`font-variant-ligatures`,1,`normal`,``,`font-variant-numeric`,1,`normal`,``,`font-variant-position`,1,`normal`,``,`font-variation-settings`,1,`normal`,``,`font-weight`,1,`normal`,``,`font-width`,1,`normal`,``,`footnote-display`,0,`block`,``,`footnote-policy`,0,`auto`,``,`forced-color-adjust`,1,`auto`,``,`frame-sizing`,0,`auto`,``,`gap`,0,``,`row-gap column-gap`,`glyph-orientation-vertical`,0,``,``,`grid`,0,`none`,`grid-template-rows grid-template-columns grid-template-areas grid-auto-rows grid-auto-columns grid-auto-flow`,`grid-area`,0,`auto`,`grid-row-start grid-column-start grid-row-end grid-column-end`,`grid-auto-columns`,0,`auto`,``,`grid-auto-flow`,0,`row`,``,`grid-auto-rows`,0,`auto`,``,`grid-column`,0,`auto`,`grid-column-start grid-column-end`,`grid-column-end`,0,`auto`,``,`grid-column-gap`,0,``,``,`grid-column-start`,0,`auto`,``,`grid-gap`,0,``,`row-gap column-gap`,`grid-row`,0,`auto`,`grid-row-start grid-row-end`,`grid-row-end`,0,`auto`,``,`grid-row-gap`,0,``,``,`grid-row-start`,0,`auto`,``,`grid-template`,0,`none`,`grid-template-rows grid-template-columns grid-template-areas`,`grid-template-areas`,0,`none`,``,`grid-template-columns`,0,`none`,``,`grid-template-rows`,0,`none`,``,`hanging-punctuation`,1,`none`,``,`height`,0,`auto`,``,`hyphenate-character`,1,`auto`,``,`hyphenate-limit-chars`,1,`auto`,``,`hyphenate-limit-last`,1,`none`,``,`hyphenate-limit-lines`,1,`no-limit`,``,`hyphenate-limit-zone`,1,`0`,``,`hyphens`,1,`manual`,``,`image-animation`,1,`normal`,``,`image-orientation`,1,`from-image`,``,`image-rendering`,1,`auto`,``,`image-resolution`,1,`1dppx`,``,`initial-letter`,0,`normal`,``,`initial-letter-align`,1,`alphabetic`,``,`initial-letter-wrap`,1,`none`,``,`inline-size`,0,`auto`,``,`inline-sizing`,1,`normal`,``,`input-security`,0,`auto`,``,`inset`,0,`auto`,`top right bottom left`,`inset-block`,0,`auto`,`inset-block-start inset-block-end`,`inset-block-end`,0,`auto`,``,`inset-block-start`,0,`auto`,``,`inset-inline`,0,`auto`,`inset-inline-start inset-inline-end`,`inset-inline-end`,0,`auto`,``,`inset-inline-start`,0,`auto`,``,`interactivity`,1,`auto`,``,`interest-delay`,0,``,`interest-delay-start interest-delay-end`,`interest-delay-end`,1,`normal`,``,`interest-delay-start`,1,`normal`,``,`interpolate-size`,1,`numeric-only`,``,`isolation`,0,`auto`,``,`justify-content`,0,`normal`,``,`justify-items`,0,`legacy`,``,`justify-self`,0,`auto`,``,`left`,0,`auto`,``,`letter-spacing`,1,`normal`,``,`lighting-color`,0,`white`,``,`line-break`,1,`auto`,``,`line-clamp`,0,`none`,`max-lines block-ellipsis continue`,`line-fit-edge`,1,`leading`,``,`line-grid`,0,`match-parent`,``,`line-height`,1,`normal`,``,`line-height-step`,1,`0`,``,`line-padding`,1,`0`,``,`line-snap`,1,`none`,``,`link-parameters`,0,`none`,``,`list-style`,0,``,`list-style-type list-style-position list-style-image`,`list-style-image`,1,`none`,``,`list-style-position`,1,`outside`,``,`list-style-type`,1,`disc`,``,`margin`,0,`0`,`margin-top margin-right margin-bottom margin-left`,`margin-block`,0,``,`margin-block-start margin-block-end`,`margin-block-end`,0,`0`,``,`margin-block-start`,0,`0`,``,`margin-bottom`,0,`0`,``,`margin-break`,0,`auto`,``,`margin-inline`,0,``,`margin-inline-start margin-inline-end`,`margin-inline-end`,0,`0`,``,`margin-inline-start`,0,`0`,``,`margin-left`,0,`0`,``,`margin-right`,0,`0`,``,`margin-top`,0,`0`,``,`margin-trim`,0,`none`,``,`marker`,1,``,`marker-start marker-mid marker-end`,`marker-end`,1,`none`,``,`marker-mid`,1,`none`,``,`marker-side`,1,`match-self`,``,`marker-start`,1,`none`,``,`mask`,0,``,`mask-image mask-position mask-size mask-repeat mask-origin mask-clip mask-composite mask-mode`,`mask-border`,0,``,`mask-border-source mask-border-slice mask-border-width mask-border-outset mask-border-repeat mask-border-mode`,`mask-border-mode`,0,`alpha`,``,`mask-border-outset`,0,`0`,``,`mask-border-repeat`,0,`stretch`,``,`mask-border-slice`,0,`0`,``,`mask-border-source`,0,`none`,``,`mask-border-width`,0,`auto`,``,`mask-clip`,0,`border-box`,``,`mask-composite`,0,`add`,``,`mask-image`,0,`none`,``,`mask-mode`,0,`match-source`,``,`mask-origin`,0,`border-box`,``,`mask-position`,0,`0% 0%`,``,`mask-repeat`,0,`repeat`,``,`mask-size`,0,`auto`,``,`mask-type`,0,`luminance`,``,`math-depth`,1,`0`,``,`math-shift`,1,`normal`,``,`math-style`,1,`normal`,``,`max-block-size`,0,`none`,``,`max-height`,0,`none`,``,`max-inline-size`,0,`none`,``,`max-lines`,0,`none`,``,`max-size`,0,`none`,`max-width max-height`,`max-width`,0,`none`,``,`min-block-size`,0,`auto`,``,`min-height`,0,`auto`,``,`min-inline-size`,0,`auto`,``,`min-intrinsic-sizing`,0,`legacy`,``,`min-size`,0,`auto`,`min-width min-height`,`min-width`,0,`auto`,``,`mix-blend-mode`,0,`normal`,``,`nav-down`,0,`auto`,``,`nav-left`,0,`auto`,``,`nav-right`,0,`auto`,``,`nav-up`,0,`auto`,``,`object-fit`,0,`fill`,``,`object-position`,0,`50% 50%`,``,`object-view-box`,0,`none`,``,`offset`,0,``,`offset-path offset-distance offset-rotate offset-anchor offset-position`,`offset-anchor`,0,`auto`,``,`offset-distance`,0,`0`,``,`offset-path`,0,`none`,``,`offset-position`,0,`normal`,``,`offset-rotate`,0,`auto`,``,`opacity`,0,`1`,``,`order`,0,`0`,``,`orphans`,1,`2`,``,`outline`,0,``,`outline-width outline-style outline-color`,`outline-color`,0,`auto`,``,`outline-offset`,0,`0`,``,`outline-style`,0,`none`,``,`outline-width`,0,`medium`,``,`overflow`,0,`visible`,`overflow-x overflow-y`,`overflow-anchor`,0,`auto`,``,`overflow-block`,0,`visible`,``,`overflow-clip-margin`,0,`0px`,`overflow-clip-margin-top overflow-clip-margin-right overflow-clip-margin-bottom overflow-clip-margin-left`,`overflow-clip-margin-block`,0,`0px`,`overflow-clip-margin-block-start overflow-clip-margin-block-end`,`overflow-clip-margin-block-end`,0,`0px`,``,`overflow-clip-margin-block-start`,0,`0px`,``,`overflow-clip-margin-bottom`,0,`0px`,``,`overflow-clip-margin-inline`,0,`0px`,`overflow-clip-margin-inline-start overflow-clip-margin-inline-end`,`overflow-clip-margin-inline-end`,0,`0px`,``,`overflow-clip-margin-inline-start`,0,`0px`,``,`overflow-clip-margin-left`,0,`0px`,``,`overflow-clip-margin-right`,0,`0px`,``,`overflow-clip-margin-top`,0,`0px`,``,`overflow-inline`,0,`visible`,``,`overflow-wrap`,1,`normal`,``,`overflow-x`,0,`visible`,``,`overflow-y`,0,`visible`,``,`overlay`,0,`none`,``,`overscroll-behavior`,0,`auto auto`,`overscroll-behavior-x overscroll-behavior-y`,`overscroll-behavior-block`,0,`auto`,``,`overscroll-behavior-inline`,0,`auto`,``,`overscroll-behavior-x`,0,`auto`,``,`overscroll-behavior-y`,0,`auto`,``,`padding`,0,`0`,`padding-top padding-right padding-bottom padding-left`,`padding-block`,0,``,`padding-block-start padding-block-end`,`padding-block-end`,0,`0`,``,`padding-block-start`,0,`0`,``,`padding-bottom`,0,`0`,``,`padding-inline`,0,``,`padding-inline-start padding-inline-end`,`padding-inline-end`,0,`0`,``,`padding-inline-start`,0,`0`,``,`padding-left`,0,`0`,``,`padding-right`,0,`0`,``,`padding-top`,0,`0`,``,`page`,0,`auto`,``,`page-break-after`,0,`auto`,``,`page-break-before`,0,`auto`,``,`page-break-inside`,0,`auto`,``,`paint-order`,1,`normal`,``,`path-length`,0,`none`,``,`pause`,0,``,`pause-before pause-after`,`pause-after`,0,`none`,``,`pause-before`,0,`none`,``,`perspective`,0,`none`,``,`perspective-origin`,0,`50% 50%`,``,`place-content`,0,`normal`,`align-content justify-content`,`place-items`,0,``,`align-items justify-items`,`place-self`,0,`auto`,`align-self justify-self`,`pointer-events`,1,`auto`,``,`pointer-timeline`,0,``,`pointer-timeline-name pointer-timeline-axis`,`pointer-timeline-axis`,0,`block`,``,`pointer-timeline-name`,0,`none`,``,`position`,0,`static`,``,`position-anchor`,0,`normal`,``,`position-area`,0,`none`,``,`position-try`,0,``,`position-try-order position-try-fallbacks`,`position-try-fallbacks`,0,`none`,``,`position-try-order`,0,`normal`,``,`position-visibility`,0,`anchor-visible`,``,`print-color-adjust`,1,`economy`,``,`quotes`,1,`auto`,``,`r`,0,`0`,``,`reading-flow`,0,`normal`,``,`reading-order`,0,`0`,``,`region-fragment`,0,`auto`,``,`resize`,0,`none`,``,`rest`,0,``,`rest-before rest-after`,`rest-after`,0,`none`,``,`rest-before`,0,`none`,``,`right`,0,`auto`,``,`rotate`,0,`none`,``,`row-gap`,0,`normal`,``,`row-rule`,0,``,`row-rule-width row-rule-style row-rule-color`,`row-rule-break`,0,`normal`,``,`row-rule-color`,0,`currentcolor`,``,`row-rule-inset`,0,``,`row-rule-inset-cap-start row-rule-inset-cap-end row-rule-inset-junction-start row-rule-inset-junction-end`,`row-rule-inset-cap`,0,``,`row-rule-inset-cap-start row-rule-inset-cap-end`,`row-rule-inset-cap-end`,0,`0`,``,`row-rule-inset-cap-start`,0,`0`,``,`row-rule-inset-end`,0,``,`row-rule-inset-cap-end row-rule-inset-junction-end`,`row-rule-inset-junction`,0,``,`row-rule-inset-junction-start row-rule-inset-junction-end`,`row-rule-inset-junction-end`,0,`0`,``,`row-rule-inset-junction-start`,0,`0`,``,`row-rule-inset-start`,0,``,`row-rule-inset-cap-start row-rule-inset-junction-start`,`row-rule-style`,0,`none`,``,`row-rule-visibility-items`,0,`normal`,``,`row-rule-width`,0,`medium`,``,`ruby-align`,1,`space-around`,``,`ruby-merge`,1,`separate`,``,`ruby-overhang`,1,`auto`,``,`ruby-position`,1,`alternate`,``,`rule`,0,``,`column-rule row-rule`,`rule-break`,0,``,`column-rule-break row-rule-break`,`rule-color`,0,``,`column-rule-color row-rule-color`,`rule-inset`,0,``,`column-rule-inset row-rule-inset`,`rule-inset-cap`,0,``,`column-rule-inset-cap`,`rule-inset-end`,0,``,`column-rule-inset-end row-rule-inset-end`,`rule-inset-junction`,0,``,`column-rule-inset-junction`,`rule-inset-start`,0,``,`column-rule-inset-start row-rule-inset-start`,`rule-overlap`,0,`row-over-column`,``,`rule-style`,0,``,`column-rule-style row-rule-style`,`rule-visibility-items`,0,``,`column-rule-visibility-items`,`rule-width`,0,``,`column-rule-width row-rule-width`,`rx`,0,`auto`,``,`ry`,0,`auto`,``,`scale`,0,`none`,``,`scroll-axis-lock`,0,`auto`,``,`scroll-behavior`,0,`auto`,``,`scroll-initial-target`,0,`none`,``,`scroll-margin`,0,`0`,`scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left`,`scroll-margin-block`,0,`0`,`scroll-margin-block-start scroll-margin-block-end`,`scroll-margin-block-end`,0,`0`,``,`scroll-margin-block-start`,0,`0`,``,`scroll-margin-bottom`,0,`0`,``,`scroll-margin-inline`,0,`0`,`scroll-margin-inline-start scroll-margin-inline-end`,`scroll-margin-inline-end`,0,`0`,``,`scroll-margin-inline-start`,0,`0`,``,`scroll-margin-left`,0,`0`,``,`scroll-margin-right`,0,`0`,``,`scroll-margin-top`,0,`0`,``,`scroll-marker-group`,0,`none`,``,`scroll-padding`,0,`auto`,`scroll-padding-top scroll-padding-right scroll-padding-bottom scroll-padding-left`,`scroll-padding-block`,0,`auto`,`scroll-padding-block-start scroll-padding-block-end`,`scroll-padding-block-end`,0,`auto`,``,`scroll-padding-block-start`,0,`auto`,``,`scroll-padding-bottom`,0,`auto`,``,`scroll-padding-inline`,0,`auto`,`scroll-padding-inline-start scroll-padding-inline-end`,`scroll-padding-inline-end`,0,`auto`,``,`scroll-padding-inline-start`,0,`auto`,``,`scroll-padding-left`,0,`auto`,``,`scroll-padding-right`,0,`auto`,``,`scroll-padding-top`,0,`auto`,``,`scroll-snap-align`,0,`none`,``,`scroll-snap-stop`,0,`normal`,``,`scroll-snap-type`,0,`none`,``,`scroll-target-group`,0,`none`,``,`scroll-timeline`,0,``,`scroll-timeline-name scroll-timeline-axis`,`scroll-timeline-axis`,0,`block`,``,`scroll-timeline-name`,0,`none`,``,`scrollbar-color`,1,`auto`,``,`scrollbar-gutter`,0,`auto`,``,`scrollbar-width`,0,`auto`,``,`shape-image-threshold`,0,`0`,``,`shape-inside`,0,`auto`,``,`shape-margin`,0,`0`,``,`shape-outside`,0,`none`,``,`shape-padding`,0,`0`,``,`shape-rendering`,1,`auto`,``,`size`,0,`auto`,`width height`,`slider-orientation`,0,`auto`,``,`spatial-navigation-action`,0,`auto`,``,`spatial-navigation-contain`,0,`auto`,``,`spatial-navigation-function`,0,`normal`,``,`speak`,1,`auto`,``,`speak-as`,1,`normal`,``,`stop-color`,0,``,``,`stop-opacity`,0,``,``,`string-set`,0,`none`,``,`stroke`,1,`none`,``,`stroke-align`,1,`center`,``,`stroke-alignment`,1,`center`,``,`stroke-break`,0,`bounding-box`,``,`stroke-color`,1,`transparent`,``,`stroke-dash-corner`,1,`none`,``,`stroke-dash-justify`,1,`none`,``,`stroke-dashadjust`,1,`none`,``,`stroke-dasharray`,1,`none`,``,`stroke-dashcorner`,1,`none`,``,`stroke-dashoffset`,1,`0`,``,`stroke-image`,1,`none`,``,`stroke-linecap`,1,`butt`,``,`stroke-linejoin`,1,`miter`,``,`stroke-miterlimit`,1,`4`,``,`stroke-opacity`,1,`1`,``,`stroke-origin`,0,`match-parent`,``,`stroke-position`,1,`0% 0%`,``,`stroke-repeat`,1,`repeat`,``,`stroke-size`,1,`auto`,``,`stroke-width`,1,`1px`,``,`tab-size`,1,`8`,``,`table-layout`,0,`auto`,``,`text-align`,1,`start`,`text-align-all text-align-last`,`text-align-all`,1,`start`,``,`text-align-last`,1,`auto`,``,`text-anchor`,1,`start`,``,`text-autospace`,1,`normal`,``,`text-box`,0,`normal`,``,`text-box-edge`,1,`auto`,``,`text-box-trim`,0,`none`,``,`text-combine-upright`,1,`none`,``,`text-decoration`,0,``,`text-decoration-line text-decoration-thickness text-decoration-style text-decoration-color`,`text-decoration-color`,0,`currentcolor`,``,`text-decoration-inset`,0,`0`,``,`text-decoration-line`,0,`none`,``,`text-decoration-skip`,1,``,`text-decoration-skip-self text-decoration-skip-box text-decoration-skip-spaces text-decoration-skip-ink`,`text-decoration-skip-box`,1,`none`,``,`text-decoration-skip-ink`,1,`auto`,``,`text-decoration-skip-self`,0,`auto`,``,`text-decoration-skip-spaces`,1,`start end`,``,`text-decoration-style`,0,`solid`,``,`text-decoration-thickness`,0,`auto`,``,`text-emphasis`,0,``,`text-emphasis-style text-emphasis-color`,`text-emphasis-color`,1,`currentcolor`,``,`text-emphasis-position`,1,`over right`,``,`text-emphasis-skip`,1,`spaces punctuation`,``,`text-emphasis-style`,1,`none`,``,`text-fit`,1,`none`,``,`text-group-align`,0,`none`,``,`text-indent`,1,`0`,``,`text-justify`,1,`auto`,``,`text-orientation`,1,`mixed`,``,`text-overflow`,0,`clip`,``,`text-rendering`,1,`auto`,``,`text-shadow`,1,`none`,``,`text-size-adjust`,1,`auto`,``,`text-spacing`,1,``,`text-spacing-trim text-autospace`,`text-spacing-trim`,1,`normal`,``,`text-transform`,1,`none`,``,`text-underline-offset`,1,`auto`,``,`text-underline-position`,1,`auto`,``,`text-wrap`,0,`wrap`,`text-wrap-mode text-wrap-style`,`text-wrap-mode`,1,`wrap`,``,`text-wrap-style`,1,`auto`,``,`timeline-scope`,0,`none`,``,`timeline-trigger`,0,``,`timeline-trigger-name timeline-trigger-source timeline-trigger-activation-range timeline-trigger-active-range`,`timeline-trigger-activation-range`,0,``,`timeline-trigger-activation-range-start timeline-trigger-activation-range-end`,`timeline-trigger-activation-range-end`,0,`normal`,``,`timeline-trigger-activation-range-start`,0,`normal`,``,`timeline-trigger-active-range`,0,``,`timeline-trigger-active-range-start timeline-trigger-active-range-end`,`timeline-trigger-active-range-end`,0,`auto`,``,`timeline-trigger-active-range-start`,0,`auto`,``,`timeline-trigger-name`,0,`none`,``,`timeline-trigger-source`,0,`auto`,``,`top`,0,`auto`,``,`touch-action`,0,`auto`,``,`transform`,0,`none`,``,`transform-box`,0,`view-box`,``,`transform-origin`,0,`50% 50%`,``,`transform-style`,0,`flat`,``,`transition`,0,``,`transition-property transition-duration transition-timing-function transition-delay transition-behavior`,`transition-behavior`,0,`normal`,``,`transition-delay`,0,`0s`,``,`transition-duration`,0,`0s`,``,`transition-property`,0,`all`,``,`transition-timing-function`,0,`ease`,``,`translate`,0,`none`,``,`trigger-scope`,0,`none`,``,`unicode-bidi`,0,`normal`,``,`user-select`,0,`auto`,``,`vector-effect`,0,`none`,``,`vertical-align`,0,`baseline`,`alignment-baseline baseline-shift baseline-source`,`view-timeline`,0,``,`view-timeline-name view-timeline-axis`,`view-timeline-axis`,0,`block`,``,`view-timeline-inset`,0,`auto`,``,`view-timeline-name`,0,`none`,``,`view-transition-class`,0,`none`,``,`view-transition-group`,0,`normal`,``,`view-transition-name`,0,`none`,``,`view-transition-scope`,0,`none`,``,`visibility`,1,`visible`,``,`voice-balance`,1,`center`,``,`voice-duration`,0,`auto`,``,`voice-family`,1,`implementation-dependent`,``,`voice-pitch`,1,`medium`,``,`voice-range`,1,`medium`,``,`voice-rate`,1,`normal`,``,`voice-stress`,1,`normal`,``,`voice-volume`,1,`medium`,``,`white-space`,0,`normal`,`white-space-collapse text-wrap-mode`,`white-space-collapse`,1,`collapse`,``,`white-space-trim`,0,`none`,``,`widows`,1,`2`,``,`width`,0,`auto`,``,`will-change`,0,`auto`,``,`window-drag`,1,`none`,``,`word-break`,1,`normal`,``,`word-space-transform`,1,`none`,``,`word-spacing`,1,`normal`,``,`word-wrap`,0,``,``,`wrap-after`,0,`auto`,``,`wrap-before`,0,`auto`,``,`wrap-flow`,0,`auto`,``,`wrap-inside`,0,`auto`,``,`wrap-through`,0,`wrap`,``,`writing-mode`,1,`horizontal-tb`,``,`x`,0,`0`,``,`y`,0,`0`,``,`z-index`,0,`auto`,``,`zoom`,0,`1`,``];var PropInfo=class{name;inherited;initial;specLonghands;constructor(e,t,n,r){this.name=e,this.inherited=t,this.initial=n,this.specLonghands=r}};const Ns={color:`rgb(0, 0, 0)`,"background-color":`rgba(0, 0, 0, 0)`,"border-top-color":`currentcolor`,"border-right-color":`currentcolor`,"border-bottom-color":`currentcolor`,"border-left-color":`currentcolor`,"outline-color":`currentcolor`,"border-block-start-color":`currentcolor`,"border-block-end-color":`currentcolor`,"border-inline-start-color":`currentcolor`,"border-inline-end-color":`currentcolor`,"text-decoration-color":`currentcolor`,"column-rule-color":`currentcolor`,"caret-color":`currentcolor`,"text-emphasis-color":`currentcolor`,"-webkit-text-fill-color":`currentcolor`,"-webkit-text-stroke-color":`currentcolor`,"margin-top":`0px`,"margin-right":`0px`,"margin-bottom":`0px`,"margin-left":`0px`,"padding-top":`0px`,"padding-right":`0px`,"padding-bottom":`0px`,"padding-left":`0px`,"border-top-width":`medium`,"border-right-width":`medium`,"border-bottom-width":`medium`,"border-left-width":`medium`,"outline-width":`medium`,"column-rule-width":`medium`,"border-top-left-radius":`0px`,"border-top-right-radius":`0px`,"border-bottom-right-radius":`0px`,"border-bottom-left-radius":`0px`,"font-size":`16px`,"font-weight":`400`,"font-family":`"Times New Roman"`,"font-style":`normal`,"font-variant":`normal`,"line-height":`normal`,"letter-spacing":`normal`,"word-spacing":`0px`,"text-indent":`0px`,"outline-offset":`0px`,"min-width":`auto`,"min-height":`auto`,"max-width":`none`,"max-height":`none`,"flex-basis":`auto`,"flex-grow":`0`,"flex-shrink":`1`,order:`0`,"background-image":`none`,"background-position-x":`0%`,"background-position-y":`0%`,"background-position":`0% 0%`,"background-size":`auto`,"background-repeat":`repeat`,"background-origin":`padding-box`,"background-clip":`border-box`,"background-attachment":`scroll`,"border-image":`none`,"border-spacing":`0px 0px`,"transition-duration":`0s`,"transition-delay":`0s`,"animation-duration":`0s`,"animation-delay":`0s`,"text-align":`start`,opacity:`1`,"z-index":`auto`,"row-gap":`normal`,"column-gap":`normal`,"user-select":`auto`,"-webkit-user-select":`auto`,content:`normal`,quotes:`auto`,"list-style-type":`disc`,"vertical-align":`baseline`,"white-space":`normal`,"text-transform":`none`};let Ps=null,Fs=null;function buildTable(){Ps=/* @__PURE__ */ new Map,Fs=[];for(let e=0;e<Ms.length;e+=4){let t=Ms[e],n=Ms[e+1]===1,r=Ns[t]??Ms[e+2],i=Ms[e+3];Ps.set(t,new PropInfo(t,n,r,i===``?null:i.split(` `))),Fs.push(t)}for(let e of Fs){if(!e.startsWith(`-webkit-`))continue;let t=Ps.get(e),n=Ps.get(e.slice(8));n!==void 0&&t.initial===``&&t.specLonghands===null&&(t.inherited=n.inherited,t.initial=n.initial)}}function propertyInfo(e){return Ps===null&&buildTable(),Ps.get(e)}function isSupportedProperty(e){return Ps===null&&buildTable(),Ps.has(e)}function isCustomPropertyName(e){return e.length>2&&e.charCodeAt(0)===45&&e.charCodeAt(1)===45}function allPropertyNames(){return Fs===null&&buildTable(),Fs}let Is=null;function computedPropertyNames(){if(Is!==null)return Is;Is=[],Ps===null&&buildTable();for(let e of Fs){let t=Ps.get(e);e.charCodeAt(0)!==45&&t.specLonghands===null&&Is.push(e)}return Is}function cssPropertyToIDLAttribute(e,t){t&&e.charCodeAt(0)===45&&(e=e.slice(1));let n=``,r=!1;for(let t=0;t<e.length;t++){let i=e[t];i===`-`?r=!0:r?(r=!1,n+=i.toUpperCase()):n+=i}return n}const Ls={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Rs={accentcolor:30207,accentcolortext:16777215,activetext:16711680,buttonborder:7763574,buttonface:15724527,buttontext:0,canvas:16777215,canvastext:0,field:16777215,fieldtext:0,graytext:8421504,highlight:11916799,highlighttext:0,linktext:238,mark:16776960,marktext:0,selecteditem:30207,selecteditemtext:16777215,visitedtext:5577355},zs=/* @__PURE__ */ new Set([`lab`,`lch`,`oklab`,`oklch`,`color`,`color-mix`,`light-dark`,`device-cmyk`,`contrast-color`]);function isNamedColor(e){return Ls[e]!==void 0||Rs[e]!==void 0||e===`transparent`||e===`currentcolor`}var RGBA=class{r;g;b;a;constructor(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}};function clamp$1(e,t,n){return e<t?t:e>n?n:e}__name(clamp$1,`clamp`);function formatAlpha(e){let t=Math.round(clamp$1(e,0,1)*255),n=Math.round(t/255*100)/100;return Math.round(n*255)!==t&&(n=Math.round(t/255*1e3)/1e3),String(n)}function serializeRGBA(e){let t=Math.round(clamp$1(e.r,0,255)),n=Math.round(clamp$1(e.g,0,255)),r=Math.round(clamp$1(e.b,0,255)),i=clamp$1(e.a,0,1);return i>=1?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${formatAlpha(i)})`}function fromPacked(e,t){return new RGBA(e>>16&255,e>>8&255,e&255,t)}function hexDigit(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e>=65&&e<=70?e-55:-1}function parseHex(e){let t=e.length;if(t!==3&&t!==4&&t!==6&&t!==8)return null;let n=[];for(let r=0;r<t;r++){let t=hexDigit(e.charCodeAt(r));if(t===-1)return null;n.push(t)}return t<=4?new RGBA(n[0]*17,n[1]*17,n[2]*17,t===4?n[3]*17/255:1):new RGBA(n[0]*16+n[1],n[2]*16+n[3],n[4]*16+n[5],t===8?(n[6]*16+n[7])/255:1)}function splitArgs(e){let t=e.trim();if(t.indexOf(`,`)!==-1){let e=t.split(`,`).map(e=>e.trim());for(let t of e)if(t===``||/\s/.test(t))return null;return e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);if(n!==-1){let e=t.slice(n+1).trim();if(e===``||/\s/.test(e))return null;r.push(e)}return r}const Bs=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function parseChannel(e,t){if(e.toLowerCase()===`none`)return 0;let n=Bs.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function parseAlpha(e){if(e===void 0)return 1;let t=parseChannel(e,1);return t===null?null:clamp$1(t,0,1)}function parseHue(e){if(e.toLowerCase()===`none`)return 0;let t=Bs.exec(e);if(t===null)return null;let n=Number(t[1]),r=t[2]?.toLowerCase();return r===void 0||r===`deg`?n:r===`grad`?n*360/400:r===`rad`?n*180/Math.PI:r===`turn`?n*360:null}function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp$1(t,0,1),n=clamp$1(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return n-a*Math.max(-1,Math.min(i-3,9-i,1))};return[f(0)*255,f(8)*255,f(4)*255]}function hwbToRgb(e,t,n){if(t+n>=1){let e=t/(t+n)*255;return[e,e,e]}let r=hslToRgb(e,1,.5);for(let e=0;e<3;e++)r[e]=r[e]/255*(1-t-n)*255+t*255;return r}function parseColorFunction(e,t){let n=splitArgs(t);if(n===null||n.length!==3&&n.length!==4)return null;if(e===`rgb`||e===`rgba`){let e=parseChannel(n[0],255),t=parseChannel(n[1],255),r=parseChannel(n[2],255),i=parseAlpha(n[3]);return e===null||t===null||r===null||i===null?null:new RGBA(e,t,r,i)}if(e===`hsl`||e===`hsla`||e===`hwb`){let t=parseHue(n[0]),r=parseChannel(n[1],1),i=parseChannel(n[2],1),a=parseAlpha(n[3]);if(t===null||r===null||i===null||a===null)return null;let o=n[1].endsWith(`%`)?r:r/100,s=n[2].endsWith(`%`)?i:i/100,[c,l,u]=e===`hwb`?hwbToRgb(t,o,s):hslToRgb(t,o,s);return new RGBA(c,l,u,a)}return null}function normalizeColor(e){let t=e.trim();if(t===``)return null;if(t.charCodeAt(0)===35){let e=parseHex(t.slice(1));return e===null?null:serializeRGBA(e)}let n=t.indexOf(`(`);if(n===-1){let e=t.toLowerCase();return isNamedColor(e)?e:null}if(!t.endsWith(`)`))return null;let r=t.slice(0,n).toLowerCase(),i=t.slice(n+1,-1);if(Us.test(i)&&(Vs.has(r)||Hs.has(r)))return normalizeRelativeColor(r,i);if(zs.has(r))return normalizeOtherColorFunction(r,i,t);let a=parseColorFunction(r,i);return a===null?null:serializeRGBA(a)}const Vs=/* @__PURE__ */ new Set([`rgb`,`rgba`,`hsl`,`hsla`,`hwb`]),Hs=/* @__PURE__ */ new Set([`lab`,`lch`,`oklab`,`oklch`]),Us=/^\s*from\s/i,Ws=/^(calc|min|max|clamp|round|mod|rem|abs|sign|sin|cos|tan|asin|acos|atan|atan2|pow|sqrt|hypot|log|exp)\(/i,Gs={lab:[100,125,125],lch:[100,150,0],oklab:[1,.4,.4],oklch:[1,.4,0]},Ks=/* @__PURE__ */ new Set([`srgb`,`srgb-linear`,`display-p3`,`display-p3-linear`,`a98-rgb`,`prophoto-rgb`,`rec2020`,`xyz`,`xyz-d50`,`xyz-d65`]),qs=/* @__PURE__ */ new Set([`hsl`,`hwb`,`lch`,`oklch`]),Js=/* @__PURE__ */ new Set([`srgb`,`srgb-linear`,`display-p3`,`display-p3-linear`,`a98-rgb`,`prophoto-rgb`,`rec2020`,`lab`,`oklab`,`xyz`,`xyz-d50`,`xyz-d65`]),Ys=/* @__PURE__ */ new Set([`shorter`,`longer`,`increasing`,`decreasing`]);function roundSig(e,t){return e===0?`0`:formatNumber(Number(e.toPrecision(t)))}function alphaText(e){if(e.type===1)return e.lower===`none`?`none`:null;let t;if(e.type===10)t=e.num;else if(e.type===11)t=e.num/100;else return null;return t=clamp$1(t,0,1),t===1?``:formatNumber(Math.round(t*1e3)/1e3)}function channelsAndAlpha(e){let t=[],n=null,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(a.type!==100){if(a.type===18)return null;if(a.type===9){if(a.value!==`/`||r)return null;r=!0}else if(r){if(n!==null)return null;n=a}else t.push(a)}}return r&&n===null?null:[t,n]}function withAlpha(e,t){if(t===null)return e+`)`;let n=alphaText(t);return n===null?null:n===``?e+`)`:e+` / `+n+`)`}function normalizeCanonical(e,t){let n=channelsAndAlpha(t);if(n===null||n[0].length!==3)return null;let[r,i]=n,a=Gs[e],o=e===`lch`||e===`oklch`,s=e===`lab`||e===`lch`?100:1,c=e+`(`;for(let e=0;e<3;e++){let t=r[e],n;if(t.type===1&&t.lower===`none`)n=`none`;else if(o&&e===2){let e;if(t.type===10)e=t.num;else if(t.type===12){let n=parseHue(t.text);if(n===null)return null;e=n}else return null;n=roundSig((e%360+360)%360,6)}else{let r;if(t.type===10)r=t.num;else if(t.type===11)r=t.num/100*a[e];else return null;e===0?r=clamp$1(r,0,s):o&&e===1&&r<0&&(r=0),n=roundSig(r,6)}c+=(e===0?``:` `)+n}return withAlpha(c,i)}function normalizeColorFn(e){let t=0;for(;t<e.length&&e[t].type===100;)t++;let n=e[t];if(n===void 0||n.type!==1||!Ks.has(n.lower))return null;let r=channelsAndAlpha(e.slice(t+1));if(r===null||r[0].length!==3)return null;let[i,a]=r,o=`color(`+(n.lower===`xyz`?`xyz-d65`:n.lower);for(let e of i)if(e.type===1&&e.lower===`none`)o+=` none`;else if(e.type===10)o+=` `+roundSig(e.num,5);else if(e.type===11)o+=` `+roundSig(e.num/100,5);else return null;return withAlpha(o,a)}function commaArgs(e){let t=[[]];for(let n of e)n.type===18?t.push([]):n.type!==100&&t[t.length-1].push(n);return t}function colorComponent(e){return e.type===4||e.type===1||e.type===2?normalizeColor(e.text):null}function normalizeColorMix(e){let t=commaArgs(e);if(t.length!==3)return null;let n=t[0];if(n.length<2||n[0].type!==1||n[0].lower!==`in`||n[1].type!==1)return null;let r=n[1].lower,i=`in `+r;if(qs.has(r)){if(n.length===4){if(n[2].type!==1||!Ys.has(n[2].lower)||n[3].type!==1||n[3].lower!==`hue`)return null;i+=` `+n[2].lower+` hue`}else if(n.length!==2)return null}else if(!Js.has(r)||n.length!==2)return null;let a=[],o=[];for(let e=1;e<=2;e++){let n=t[e];if(n.length<1||n.length>2)return null;let r=null,i=null;for(let e of n)if(e.type===11&&i===null){if(e.num<0||e.num>100)return null;i=e.num}else if(r!==null||(r=colorComponent(e),r===null))return null;if(r===null)return null;a.push(r),o.push(i)}let[s,c]=o;if(s===0&&c===0)return null;let l=a[0],u=a[1];if(s!==null&&c!==null)l+=` `+formatNumber(s)+`%`,u+=` `+formatNumber(c)+`%`;else if(s!==null||c!==null){let e=s===null?100-c:s;e!==50&&(l+=` `+formatNumber(e)+`%`)}return`color-mix(`+i+`, `+l+`, `+u+`)`}function normalizeLightDark(e){let t=commaArgs(e);if(t.length!==2||t[0].length!==1||t[1].length!==1)return null;let n=colorComponent(t[0][0]),r=colorComponent(t[1][0]);return n===null||r===null?null:`light-dark(`+n+`, `+r+`)`}function normalizeRelativeColor(e,t){let n=splitComponents(t);if(n===null)return null;let r=(e===`rgba`?`rgb`:e===`hsla`?`hsl`:e)+`(from`,i=!1;for(let e=0;e<n.length;e++){let t=n[e];if(t.type!==100&&!(e===0||t.type===1&&t.lower===`from`&&!i&&r.endsWith(`(from`))){if(i)r+=` `+(t.type===1?t.lower:t.text);else{let e=colorComponent(t);if(e===null)return null;r+=` `+e,i=!0}}}return i?r+`)`:null}function normalizeOtherColorFunction(e,t,n){let r=splitComponents(t);if(r===null)return null;for(let t of r)if(t.type===2&&Ws.test(t.text))return e+n.slice(e.length);switch(e){case`lab`:case`lch`:case`oklab`:case`oklch`:return normalizeCanonical(e,r);case`color`:return normalizeColorFn(r);case`color-mix`:return normalizeColorMix(r);case`light-dark`:return normalizeLightDark(r);default:return e+n.slice(e.length)}}function computeColor(e,t){let n=e.trim(),r=n.toLowerCase();if(r===`currentcolor`)return t;if(r===`transparent`)return`rgba(0, 0, 0, 0)`;let i=Ls[r]??Rs[r];if(i!==void 0)return serializeRGBA(fromPacked(i,1));if(n.charCodeAt(0)===35){let e=parseHex(n.slice(1));return e===null?n:serializeRGBA(e)}let a=n.indexOf(`(`);if(a!==-1&&n.endsWith(`)`)){let e=parseColorFunction(n.slice(0,a).toLowerCase(),n.slice(a+1,-1));if(e!==null)return serializeRGBA(e)}return n}var Comp=class{type;text;lower;num;isInteger;value;constructor(e,t,n,r,i,a){this.type=e,this.text=t,this.lower=n,this.num=r,this.isInteger=i,this.value=a}};function splitComponents(e){let t=new CSSTokenizer(e),n=[],r=[];for(;;){let i=t.next();if(i===0)break;switch(i){case 13:n.length!==0&&n[n.length-1].type!==100&&n.push(new Comp(100,` `,``,0,!0,``));continue;case 6:case 8:case 17:case 22:case 20:case 24:case 23:return null;case 9:if(t.value===`!`)return null;n.push(new Comp(9,t.value,t.value,0,!0,t.value));continue;case 2:case 21:case 19:{let a=t.start,o=i===2?t.value.toLowerCase():``;for(r.length=0,r.push(i===19?20:22);r.length>0;){let e=t.next();if(e===0)break;if(e===6||e===8)return null;if(e===r[r.length-1])r.pop();else if(e===2||e===21)r.push(22);else if(e===19)r.push(20);else if(e===23)r.push(24);else if(e===22||e===20||e===24)return null}let s=e.slice(a,t.end);for(let e=r.length-1;e>=0;e--)s+=r[e]===22?`)`:r[e]===20?`]`:`}`;n.push(new Comp(i,s,o,0,!0,``));continue}default:n.push(new Comp(i,e.slice(t.start,t.end),i===1?t.value.toLowerCase():i===12?t.unit.toLowerCase():``,t.num,t.isInteger,t.value))}}return n.length!==0&&n[n.length-1].type===100&&n.pop(),n}function significant(e){let t=[];for(let n=0;n<e.length;n++)e[n].type!==100&&t.push(e[n]);return t}function formatNumber(e){if(Object.is(e,-0))return`0`;let t=String(e);return t.indexOf(`e`)===-1?t:Math.abs(e)<1e-6?`0`:e.toFixed(0)}const Xs=/* @__PURE__ */ new Set(/* @__PURE__ */ `px.em.rem.ex.rex.ch.rch.cap.rcap.ic.ric.lh.rlh.vw.vh.vi.vb.vmin.vmax.svw.svh.svi.svb.svmin.svmax.lvw.lvh.lvi.lvb.lvmin.lvmax.dvw.dvh.dvi.dvb.dvmin.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax.cm.mm.q.in.pt.pc`.split(`.`)),Zs=/* @__PURE__ */ new Set([`s`,`ms`]),Qs=/* @__PURE__ */ new Set([`deg`,`grad`,`rad`,`turn`]),$s=/* @__PURE__ */ new Set(/* @__PURE__ */ `calc.min.max.clamp.round.mod.rem.sin.cos.tan.asin.acos.atan.atan2.pow.sqrt.hypot.log.exp.abs.sign.env.-webkit-calc.-moz-calc.calc-size.anchor.anchor-size`.split(`.`)),ec=1024;var Grammar=class{types;keywords;fns;max;constructor(e,t,n,r){this.types=e,this.keywords=t,this.fns=n,this.max=r}};const tc=new Grammar(2048,/* @__PURE__ */ new Set,/* @__PURE__ */ new Set,1);function grammar(e){let t=0,n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set,i=1;for(let a of e.split(` `)){if(a===``)continue;let e=a.endsWith(`+`)?a.slice(0,-1):a;switch(a.endsWith(`+`)&&e.length===1&&(t|=ec),e){case`L`:t|=1;continue;case`P`:t|=2;continue;case`N`:t|=4;continue;case`I`:t|=8;continue;case`C`:t|=16;continue;case`T`:t|=32;continue;case`A`:t|=64;continue;case`S`:t|=128;continue;case`U`:t|=256;continue}a===`#`?t|=4096:a.startsWith(`*`)?i=Number(a.slice(1)):a.endsWith(`()`)?r.add(a.slice(0,-2)):n.add(a)}return new Grammar(t,n,r,i)}const nc=`L+ P+ auto min-content max-content fit-content stretch -webkit-fill-available -moz-available -webkit-min-content -webkit-max-content -webkit-fit-content fit-content()`,rc=`L+ P+ none min-content max-content fit-content stretch -webkit-fill-available -moz-available fit-content()`,ic=`L P auto`,ac=`L P auto`,oc=`L+ P+`,sc=`none hidden dotted dashed solid double groove ridge inset outset`,cc=`L+ thin medium thick`,lc=`L+ P+ *2`,uc=`visible hidden clip scroll auto overlay -webkit-paged-x -webkit-paged-y`,dc={width:nc,height:nc,"min-width":nc,"min-height":nc,"inline-size":nc,"block-size":nc,"min-inline-size":nc,"min-block-size":nc,"max-width":rc,"max-height":rc,"max-inline-size":rc,"max-block-size":rc,top:ic,right:ic,bottom:ic,left:ic,"inset-block-start":ic,"inset-block-end":ic,"inset-inline-start":ic,"inset-inline-end":ic,"margin-top":ac,"margin-right":ac,"margin-bottom":ac,"margin-left":ac,"margin-block-start":ac,"margin-block-end":ac,"margin-inline-start":ac,"margin-inline-end":ac,"padding-top":oc,"padding-right":oc,"padding-bottom":oc,"padding-left":oc,"padding-block-start":oc,"padding-block-end":oc,"padding-inline-start":oc,"padding-inline-end":oc,"border-top-width":cc,"border-right-width":cc,"border-bottom-width":cc,"border-left-width":cc,"outline-width":cc,"column-rule-width":cc,"border-top-style":sc,"border-right-style":sc,"border-bottom-style":sc,"border-left-style":sc,"outline-style":sc+` auto`,"column-rule-style":sc,"border-block-start-color":`C`,"border-block-end-color":`C`,"border-inline-start-color":`C`,"border-inline-end-color":`C`,"border-top-color":`C`,"border-right-color":`C`,"border-bottom-color":`C`,"border-left-color":`C`,color:`C`,"background-color":`C`,"outline-color":`C invert`,"caret-color":`C auto`,"text-decoration-color":`C`,"column-rule-color":`C`,"accent-color":`C auto`,"flood-color":`C`,"lighting-color":`C`,"stop-color":`C`,"text-emphasis-color":`C`,"-webkit-text-fill-color":`C`,"-webkit-text-stroke-color":`C`,"border-top-left-radius":lc,"border-top-right-radius":lc,"border-bottom-right-radius":lc,"border-bottom-left-radius":lc,opacity:`N P`,"fill-opacity":`N P`,"stroke-opacity":`N P`,"flood-opacity":`N P`,"stop-opacity":`N P`,"z-index":`I auto`,order:`I`,"flex-grow":`N+`,"flex-shrink":`N+`,"flex-basis":`L+ P+ auto content min-content max-content fit-content`,"line-height":`N+ L+ P+ normal`,"font-size":`L+ P+ xx-small x-small small medium large x-large xx-large xxx-large larger smaller math`,"font-weight":`N+ normal bold bolder lighter`,"font-style":`normal italic oblique`,"font-variant":`normal none small-caps all-small-caps petite-caps all-petite-caps unicase titling-caps`,"font-stretch":`P+ normal ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded`,visibility:`visible hidden collapse`,"pointer-events":`auto none visiblepainted visiblefill visiblestroke visible painted fill stroke all bounding-box`,position:`static relative absolute fixed sticky -webkit-sticky`,float:`left right none inline-start inline-end`,clear:`none left right both inline-start inline-end`,"box-sizing":`content-box border-box`,"overflow-x":uc,"overflow-y":uc,"overflow-block":uc,"overflow-inline":uc,"text-align":`start end left right center justify match-parent justify-all -webkit-left -webkit-right -webkit-center -moz-left -moz-right -moz-center`,"white-space":`normal pre nowrap pre-wrap break-spaces pre-line`,"user-select":`auto text none contain all`,"-webkit-user-select":`auto text none contain all`,"background-image":`U none # linear-gradient() radial-gradient() conic-gradient() repeating-linear-gradient() repeating-radial-gradient() repeating-conic-gradient() image-set() -webkit-image-set() url() image() cross-fade() element() paint() -webkit-linear-gradient() -webkit-radial-gradient() -webkit-gradient()`,"background-attachment":`# scroll fixed local`,"background-origin":`# border-box padding-box content-box`,"background-clip":`# border-box padding-box content-box text border-area`,"background-repeat":`# repeat-x repeat-y repeat space round no-repeat *2`,"background-size":`# L+ P+ auto cover contain *2`,"list-style-type":`*1`,"text-transform":`none capitalize uppercase lowercase full-width full-size-kana math-auto`,"word-break":`normal keep-all break-all break-word auto-phrase`,"text-overflow":`clip ellipsis`,"vertical-align":`L P baseline sub super text-top text-bottom middle top bottom`,"table-layout":`auto fixed`,"border-collapse":`collapse separate`,"empty-cells":`show hide`,"caption-side":`top bottom`,"list-style-position":`inside outside`,resize:`none both horizontal vertical block inline`,"object-fit":`fill contain cover none scale-down`,isolation:`auto isolate`,"mix-blend-mode":`normal multiply screen overlay darken lighten color-dodge color-burn hard-light soft-light difference exclusion hue saturation color luminosity plus-darker plus-lighter`,"backface-visibility":`visible hidden`,"flex-direction":`row row-reverse column column-reverse`,"flex-wrap":`nowrap wrap wrap-reverse`,"animation-duration":`# T+ auto`,"transition-duration":`# T+`,"animation-delay":`# T`,"transition-delay":`# T`,"animation-iteration-count":`# N+ infinite`,"animation-direction":`# normal reverse alternate alternate-reverse`,"animation-fill-mode":`# none forwards backwards both`,"animation-play-state":`# running paused`,"tab-size":`N+ L+`,"row-gap":`L+ P+ normal`,"column-gap":`L+ P+ normal`,"outline-offset":`L`,"letter-spacing":`L P normal`,"word-spacing":`L P normal`,"text-indent":`L P`,"aspect-ratio":`*1`,inset:`L P auto *4`,cursor:`# U N *3 auto default none context-menu help pointer progress wait cell crosshair text vertical-text alias copy move no-drop not-allowed grab grabbing e-resize n-resize ne-resize nw-resize s-resize se-resize sw-resize w-resize ew-resize ns-resize nesw-resize nwse-resize col-resize row-resize all-scroll zoom-in zoom-out -webkit-grab -webkit-grabbing -webkit-zoom-in -webkit-zoom-out hand`,"unicode-bidi":`normal embed isolate bidi-override isolate-override plaintext`,direction:`ltr rtl`,"writing-mode":`horizontal-tb vertical-rl vertical-lr sideways-rl sideways-lr`,"content-visibility":`visible auto hidden`,"scroll-behavior":`auto smooth`,"touch-action":`*1`,"will-change":`*1`,appearance:`none auto menulist-button textfield base-select button checkbox listbox menulist meter progress-bar push-button radio searchfield slider-horizontal square-button textarea`,"-webkit-appearance":`*1`},fc=/* @__PURE__ */ new Map;function grammarFor(e){let t=fc.get(e);if(t!==void 0)return t;let n=dc[e];return t=n===void 0||n===`*1`?tc:grammar(n),fc.set(e,t),t}function isCSSWideKeyword(e){return e===`inherit`||e===`initial`||e===`unset`||e===`revert`||e===`revert-layer`}function normalizeComponent(e,t){let n=t.types,r=!!(n&ec);switch(e.type){case 1:return t.keywords.has(e.lower)?e.lower:n&16?normalizeColor(e.text):null;case 10:return n&8&&e.isInteger&&(!r||e.num>=0)||n&4&&(!r||e.num>=0)?formatNumber(e.num):e.num===0&&n&1?`0px`:null;case 11:return n&2&&(!r||e.num>=0)?formatNumber(e.num)+`%`:null;case 12:return r&&e.num<0?null:n&1&&Xs.has(e.lower)||n&32&&Zs.has(e.lower)||n&64&&Qs.has(e.lower)?formatNumber(e.num)+e.lower:null;case 4:return n&16?normalizeColor(e.text):null;case 5:return n&128?serializeString$1(e.value):null;case 7:return n&256?serializeUrl(e.value):null;case 2:{let r=e.lower;if(r===`url`&&n&256){let t=splitComponents(e.text.slice(4,-1));return t!==null&&t.length===1&&t[0].type===5?serializeUrl(t[0].value):e.text}if(n&111&&$s.has(r))return e.text;if(n&16){let t=normalizeColor(e.text);if(t!==null)return t}return t.fns.has(r)?pc.has(r)?normalizeGradient(e):e.text:null}}return null}const pc=/* @__PURE__ */ new Set([`linear-gradient`,`radial-gradient`,`conic-gradient`,`repeating-linear-gradient`,`repeating-radial-gradient`,`repeating-conic-gradient`]);function normalizeGradient(e){let t=e.text.indexOf(`(`),n=splitComponents(e.text.slice(t+1,-1));if(n===null)return null;let r=e.lower,i=r.endsWith(`linear-gradient`),a=r.endsWith(`radial-gradient`),o=r.endsWith(`conic-gradient`),s=[],c=0,l=[],u=!1;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e]:null;if(t===null||t.type===18){if(l.length===0)return null;if(u&&c++,s.length===0&&!u){let e=l.join(` `);i&&e===`to bottom`?l=[]:(a||o)&&(l.length>=2&&l[l.length-2]===`at`&&l[l.length-1]===`center`&&(l.length-=2),a&&(l=l.filter(e=>e!==`ellipse`&&e!==`farthest-corner`))),l.length!==0&&s.push(l.join(` `))}else s.push(l.join(` `));l=[],u=!1;continue}if(t.type===100)continue;let r=null;(t.type===4||t.type===1||t.type===2)&&(r=normalizeColor(t.text),r!==null&&(u=!0)),r===null&&(r=t.type===1?t.lower:t.type===12?t.text.toLowerCase():t.type===2?t.lower+t.text.slice(t.lower.length):t.text),l.push(r)}return c<2?null:r+`(`+s.join(`, `)+`)`}function normalizePaint(e){let t=significant(e);if(t.length!==1)return verbatimComps(e);let n=t[0];switch(n.type){case 1:return n.lower===`none`||n.lower===`context-fill`||n.lower===`context-stroke`?n.lower:normalizeColor(n.text);case 7:return serializeUrl(n.value);case 4:return normalizeColor(n.text);case 2:return n.lower===`url`?normalizeComponent(n,_c):normalizeColor(n.text)??n.text}return verbatimComps(e)}function normalizeImageLoose(e){let t=significant(e);if(t.length===1){let e=t[0];if(e.type===7)return serializeUrl(e.value);if(e.type===1)return e.lower===`none`?`none`:e.text;if(e.type===2&&pc.has(e.lower))return normalizeGradient(e)??e.text}return verbatimComps(e)}function verbatimComps(e){let t=``;for(let n of e)t+=n.text;return t}function serializeString$1(e){let t=`"`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r===0?`�`:r>=1&&r<=31||r===127?`\\`+r.toString(16)+` `:r===34||r===92?`\\`+e[n]:e[n]}return t+`"`}__name(serializeString$1,`serializeString`);function serializeUrl(e){return`url(`+serializeString$1(e)+`)`}function containsVar(e){return e.indexOf(`(`)===-1?!1:/var\(/i.test(e)||/env\(/i.test(e)||/attr\(/i.test(e)}function verbatim(e){return e.trim()}const mc=/* @__PURE__ */ new Set([`block`,`inline`,`run-in`]),hc=/* @__PURE__ */ new Set([`flow`,`flow-root`,`table`,`flex`,`grid`,`ruby`,`math`]),gc=/* @__PURE__ */ new Set(/* @__PURE__ */ `none.contents.block.inline.inline-block.flex.inline-flex.grid.inline-grid.flow-root.list-item.table.inline-table.table-row.table-cell.table-column.table-column-group.table-header-group.table-footer-group.table-row-group.table-caption.run-in.ruby.ruby-text.ruby-base.ruby-base-container.ruby-text-container.flow.math.-webkit-box.-webkit-inline-box.-moz-box.-moz-inline-box.inline-list-item.-webkit-flex.-webkit-inline-flex.-ms-flexbox.-ms-inline-flexbox.-ms-grid.-ms-inline-grid`.split(`.`));function normalizeDisplay(e){let t=[];for(let n of e)if(n.type!==100){if(n.type!==1)return null;t.push(n.lower)}if(t.length===1)return gc.has(t[0])?t[0]:null;if(t.length>3)return null;let n=``,r=``,i=!1;for(let e of t)if(mc.has(e)&&n===``)n=e;else if(hc.has(e)&&r===``)r=e;else if(e===`list-item`&&!i)i=!0;else return null;return i&&r!==``&&r!==`flow`&&r!==`flow-root`?null:(n===``&&(n=`block`),r===``&&(r=`flow`),i?(n===`block`?``:n+` `)+(r===`flow-root`?`flow-root `:``)+`list-item`:n===`block`?r===`flow`?`block`:r:n===`inline`?r===`flow`?`inline`:r===`flow-root`?`inline-block`:r===`table`||r===`flex`||r===`grid`?`inline-`+r:`inline `+r:n+(r===`flow`?``:` `+r))}function normalizeContent(e){let t=``;for(let n of e)if(n.type===100)t+=` `;else{if(n.type===18)return null;n.type===5?t+=serializeString$1(n.value):n.type===7?t+=serializeUrl(n.value):n.type===1?t+=isCSSWideKeyword(n.lower)||n.lower===`none`||n.lower===`normal`||n.lower.endsWith(`-quote`)?n.lower:n.text:t+=n.text}return t===``?null:t}const _c=new Grammar(256,/* @__PURE__ */ new Set,/* @__PURE__ */ new Set,1),vc={display:normalizeDisplay,content:normalizeContent,fill:normalizePaint,stroke:normalizePaint,"list-style-image":normalizeImageLoose,"border-image-source":normalizeImageLoose,"mask-image":normalizeImageLoose,"-webkit-mask-image":normalizeImageLoose},yc=/* @__PURE__ */ new Map;function normalizeLonghand(e,t){let n=yc.get(e);if(n===void 0)yc.set(e,n=/* @__PURE__ */ new Map);else{let e=n.get(t);if(e!==void 0)return e}let r=fastLonghand(e,t),i=r===void 0?normalizeLonghandValue(e,t):r;return n.size===256&&n.clear(),n.set(t,i),i}function fastLonghand(e,t){let n=t.length;if(n===0)return;let r=t.charCodeAt(0);if(r>=97&&r<=122){for(let e=1;e<n;e++)if(r=t.charCodeAt(e),(r<97||r>122)&&r!==45)return;if(isCSSWideKeyword(t))return t;if(e===`display`)return gc.has(t)?t:void 0;if(vc[e]!==void 0)return;let i=grammarFor(e);return i.types===2048||i.keywords.has(t)?t:void 0}let i=r===45,a=+!!i,o=a;for(;a<n&&(r=t.charCodeAt(a))>=48&&r<=57;)a++;let s=a-o;if(s===0||s>1&&t.charCodeAt(o)===48)return;let c=s===1&&t.charCodeAt(o)===48,l=s,u=!0;if(a<n&&t.charCodeAt(a)===46){let e=++a;for(;a<n&&(r=t.charCodeAt(a))>=48&&r<=57;)a++;if(a===e||t.charCodeAt(a-1)===48)return;if(c){let n=0;for(;t.charCodeAt(e+n)===48;)n++;if(n>=6)return}l+=a-e,u=!1}if(l>15||i&&c&&u||vc[e]!==void 0)return;let d=grammarFor(e).types,m=a;if(m<n){if(t.charCodeAt(a)===37)return a+1===n&&(d===2048||d&2&&!(i&&d&1024))?t:void 0;for(;a<n&&(r=t.charCodeAt(a))>=97&&r<=122;)a++;if(a!==n)return;if(d===2048)return t;if(i&&d&1024)return;if(n-m===2&&t.charCodeAt(m)===112&&t.charCodeAt(m+1)===120)return d&1?t:void 0;let e=t.slice(m);return d&1&&Xs.has(e)||d&32&&Zs.has(e)||d&64&&Qs.has(e)?t:void 0}if(d===2048)return t;if(!(i&&d&1024))return d&8&&u||d&4?t:c&&u&&d&1?`0px`:void 0}function normalizeLonghandValue(e,t){let n=t.trim();if(n===``)return null;let r=splitComponents(n);if(r===null)return null;if(r.length===1&&r[0].type===1&&isCSSWideKeyword(r[0].lower))return r[0].lower;if(containsVar(n))return verbatim(n);let i=vc[e];if(i!==void 0)return i(r);let a=grammarFor(e);return a.types===2048?verbatim(n):normalizeComps(r,a)}function normalizeComps(e,t){let n=``,r=0,i=``;for(let a=0;a<e.length;a++){let o=e[a];if(o.type===100)continue;if(o.type===18&&t.types&4096){if(r===0)return null;r=0,i=`, `;continue}if(++r>t.max||o.type===18||o.type===9)return null;let s=normalizeComponent(o,t);if(s===null)return null;n=n===``?s:n+(r===1?i:` `)+s}return r===0?null:n}function normalizeCustom(e){let t=e.trim();return t===``||splitComponents(t)===null&&/[;!]/.test(t)?null:t}const bc=[`top`,`right`,`bottom`,`left`];function box(e,t){return bc.map(n=>e+n+t)}const xc=box(`border-`,`-width`),Sc=box(`border-`,`-style`),Cc=box(`border-`,`-color`),wc=/* @__PURE__ */ new Map([[`margin`,box(`margin-`,``)],[`padding`,box(`padding-`,``)],[`border-width`,xc],[`border-style`,Sc],[`border-color`,Cc],[`border-top`,[`border-top-width`,`border-top-style`,`border-top-color`]],[`border-right`,[`border-right-width`,`border-right-style`,`border-right-color`]],[`border-bottom`,[`border-bottom-width`,`border-bottom-style`,`border-bottom-color`]],[`border-left`,[`border-left-width`,`border-left-style`,`border-left-color`]],[`border`,[...xc,...Sc,...Cc,`border-image`]],[`flex`,[`flex-grow`,`flex-shrink`,`flex-basis`]],[`background`,[`background-image`,`background-position-x`,`background-position-y`,`background-size`,`background-repeat`,`background-origin`,`background-clip`,`background-attachment`,`background-color`]],[`background-position`,[`background-position-x`,`background-position-y`]],[`font`,[`font-style`,`font-variant`,`font-weight`,`font-size`,`line-height`,`font-family`]]]),Tc=/* @__PURE__ */ new Map;for(let[e,t]of wc)for(let n of t){let t=Tc.get(n);t===void 0&&Tc.set(n,t=[]),t.push(e)}for(let e of Tc.values())e.sort((e,t)=>wc.get(t).length-wc.get(e).length);const Ec=/* @__PURE__ */ new Map;{let e=/* @__PURE__ */ new Map;for(let[t,n]of Tc){let r=e.get(n[0]);r===void 0&&e.set(n[0],r=1<<e.size),Ec.set(t,r)}for(let e of wc.values())for(let t of e)if(Ec.get(t)!==Ec.get(e[0]))throw Error(`shorthand families overlap at ${t}`)}function shorthandFamily(e){return Ec.get(e)??0}function isExpandedShorthand(e){return wc.has(e)}function longhandsOf(e){return wc.get(e)}function shorthandsContaining(e){return Tc.get(e)}function items(e){let t=splitComponents(e);if(t===null)return null;let n=[];for(let e of t)e.type!==100&&n.push(e);return n}function expandBox(e,t){let n=items(t);if(n===null||n.length<1||n.length>4)return null;let r=grammarFor(e[0]),i=[];for(let e of n){if(e.type===18||e.type===9)return null;let t=normalizeComponent(e,r);if(t===null)return null;i.push(t)}let a=i[0],o=i[1]??a;return[a,o,i[2]??a,i[3]??o]}const Dc=/* @__PURE__ */ new Set([`none`,`hidden`,`dotted`,`dashed`,`solid`,`double`,`groove`,`ridge`,`inset`,`outset`]);function parseBorderSide(e){let t=items(e);if(t===null||t.length<1||t.length>3)return null;let n=``,r=``,i=``,a=grammarFor(`border-top-width`);for(let e of t){if(e.type===1&&Dc.has(e.lower)){if(r!==``)return null;r=e.lower;continue}let t=normalizeComponent(e,a);if(t!==null){if(n!==``)return null;n=t;continue}let o=normalizeColor(e.text);if(o!==null&&e.type!==10){if(i!==``)return null;i=o}else return null}return[n||`medium`,r||`none`,i||`currentcolor`]}const Oc=/* @__PURE__ */ new Set([`auto`,`content`,`min-content`,`max-content`,`fit-content`]);function expandFlex(e){let t=items(e);if(t===null||t.length<1||t.length>3)return null;if(t.length===1&&t[0].type===1){if(t[0].lower===`none`)return[`0`,`0`,`auto`];if(t[0].lower===`auto`)return[`1`,`1`,`auto`]}let n=grammarFor(`flex-basis`),num=e=>e!==void 0&&e.type===10&&e.num>=0?formatNumber(e.num):null,basisOf=e=>e.type===1&&!Oc.has(e.lower)?null:normalizeComponent(e,n),r,i=null,a=null,o=0;if((r=num(t[0]))!==null){if(o=1,(i=num(t[1]))!==null&&(o=2),o<t.length){if(a=basisOf(t[o]),a===null)return null;o++}}else{if(a=basisOf(t[0]),a===null)return null;o=1,(r=num(t[1]))!==null&&(o=2,(i=num(t[2]))!==null&&(o=3))}return o===t.length?r===null?[`1`,`1`,a]:[r,i??`1`,a??`0%`]:null}const kc=/* @__PURE__ */ new Set([`left`,`center`,`right`,`top`,`bottom`]),Ac=/* @__PURE__ */ new Set([`repeat-x`,`repeat-y`,`repeat`,`space`,`round`,`no-repeat`]),jc=/* @__PURE__ */ new Set([`scroll`,`fixed`,`local`]),Mc=/* @__PURE__ */ new Set([`border-box`,`padding-box`,`content-box`]),Nc=/* @__PURE__ */ new Set([`linear-gradient`,`radial-gradient`,`conic-gradient`,`repeating-linear-gradient`,`repeating-radial-gradient`,`repeating-conic-gradient`,`image-set`,`-webkit-image-set`,`image`,`cross-fade`,`element`,`paint`,`-webkit-linear-gradient`,`-webkit-radial-gradient`,`-webkit-gradient`,`-moz-linear-gradient`,`-moz-radial-gradient`]);function isPositionComp(e){return e.type===1?kc.has(e.lower):normalizeComponent(e,grammarFor(`margin-top`))!==null&&e.type!==1}function positionComp(e){return e.type===1?e.lower:normalizeComponent(e,grammarFor(`margin-top`))}function parsePosition(e){if(e.length<1||e.length>4)return null;let t=e.map(positionComp),isY=e=>e===`top`||e===`bottom`,isX=e=>e===`left`||e===`right`;if(t.length===1)return isY(t[0])?[`center`,t[0]]:[t[0],`center`];if(t.length===2)return isY(t[0])||isX(t[1])?isY(t[1])||isX(t[0])?null:[t[1],t[0]]:[t[0],t[1]];let n,r;return t.length===3?kc.has(t[1])?(n=t[0],r=t[1]+` `+t[2]):(n=t[0]+` `+t[1],r=t[2]):(n=t[0]+` `+t[1],r=t[2]+` `+t[3]),isY(n.split(` `)[0])?[r,n]:[n,r]}const Pc=[`none`,`0%`,`0%`,`auto`,`repeat`,`padding-box`,`border-box`,`scroll`,`transparent`];function parseBackgroundLayer(e,t){let n=``,r=``,i=``,a=``,o=``,s=``,c=``,l=``,u=``,d=0;for(;d<e.length;){let m=e[d];if(m.type===1&&m.lower===`none`&&n===``)n=`none`,d++;else if(m.type===7||m.type===2&&(m.lower===`url`||Nc.has(m.lower))){if(n!==``)return null;n=m.type===7?serializeUrl(m.value):normalizeComponent(m,grammarFor(`background-image`))??m.text,d++}else if(isPositionComp(m)&&r===``){let t=d;for(;t<e.length&&t-d<4&&isPositionComp(e[t]);)t++;let n=parsePosition(e.slice(d,t));if(n===null)return null;if(r=n[0],i=n[1],d=t,d<e.length&&e[d].type===9&&e[d].value===`/`){d++;let t=grammarFor(`background-size`),n=[];for(;d<e.length&&n.length<2;){let r=normalizeComponent(e[d],t);if(r===null||(n.push(r),d++,r===`cover`||r===`contain`))break}if(n.length===0)return null;a=n.join(` `)}}else if(m.type===1&&Ac.has(m.lower)&&o===``){if(o=m.lower,m.lower!==`repeat-x`&&m.lower!==`repeat-y`&&d+1<e.length){let t=e[d+1];t.type===1&&Ac.has(t.lower)&&t.lower!==`repeat-x`&&t.lower!==`repeat-y`&&(o+=` `+t.lower,d++)}d++}else if(m.type===1&&jc.has(m.lower)&&l===``)l=m.lower,d++;else if(m.type===1&&Mc.has(m.lower)){if(s===``)s=m.lower;else if(c===``)c=m.lower;else return null;d++}else{if(t&&u===``){let e=normalizeColor(m.text);if(e!==null&&m.type!==10){u=e,d++;continue}}return null}}c===``&&s!==``&&(c=s);let m=[n,r,i,a,o,s,c,l,u];for(let e=0;e<m.length;e++)m[e]===``&&(m[e]=Pc[e]);return m}const Fc=/* @__PURE__ */ new Set([`caption`,`icon`,`menu`,`message-box`,`small-caption`,`status-bar`]),Ic=/* @__PURE__ */ new Set([`italic`,`oblique`]),Lc=/* @__PURE__ */ new Set([`small-caps`]),Rc=/* @__PURE__ */ new Set([`bold`,`bolder`,`lighter`]),zc=/* @__PURE__ */ new Set([`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`]);function expandFont(e){let t=items(e);if(t===null||t.length<2||t.length===1&&t[0].type===1&&Fc.has(t[0].lower))return null;let n=``,r=``,i=``,a=0,o=0;for(;a<t.length&&a<4;a++){let e=t[a];if(e.type===1){if(e.lower===`normal`){o++;continue}if(Ic.has(e.lower)&&n===``){n=e.lower;continue}if(Lc.has(e.lower)&&r===``){r=e.lower;continue}if(Rc.has(e.lower)&&i===``){i=e.lower;continue}if(zc.has(e.lower))continue;break}if(e.type===10&&i===``&&e.num>=1&&e.num<=1e3)i=formatNumber(e.num);else break}if(a>=t.length)return null;let s=normalizeComponent(t[a],grammarFor(`font-size`));if(s===null)return null;a++;let c=`normal`;if(a<t.length&&t[a].type===9&&t[a].value===`/`){if(a++,a>=t.length)return null;let e=normalizeComponent(t[a],grammarFor(`line-height`));if(e===null)return null;c=e,a++}if(a>=t.length)return null;let l=``;for(;a<t.length;a++){let e=t[a];if(e.type===18){l+=`,`;continue}if(e.type===10||e.type===9)return null;let n=e.type===5?`"`+e.value.replace(/(["\\])/g,`\\$1`)+`"`:e.text;l+=(l===``||l.endsWith(`,`))&&l===``?n:` `+n}return o>3?null:[n||`normal`,r||`normal`,i||`normal`,s,c,l]}function expandShorthand(e,t){switch(e){case`margin`:case`padding`:case`border-width`:case`border-style`:case`border-color`:return expandBox(wc.get(e),t);case`border-top`:case`border-right`:case`border-bottom`:case`border-left`:return parseBorderSide(t);case`border`:{let e=parseBorderSide(t);return e===null?null:[e[0],e[0],e[0],e[0],e[1],e[1],e[1],e[1],e[2],e[2],e[2],e[2],`none`]}case`flex`:return expandFlex(t);case`background-position`:{let e=items(t);if(e===null)return null;for(let t of e)if(!isPositionComp(t))return null;return parsePosition(e)}case`background`:{let e=items(t);if(e===null||e.length===0)return null;let n=0,r=0,i=null;for(let t=0;t<=e.length;t++)if(t===e.length||e[t].type===18){let a=parseBackgroundLayer(e.slice(n,t),t===e.length);if(a===null)return null;i=a,r++,n=t+1}return r>1?Wc:i}case`font`:return expandFont(t)}return null}const Bc=/* @__PURE__ */ new Map([[`outline`,[`outline-color`,`outline-style`,`outline-width`]],[`overflow`,[`overflow-x`,`overflow-y`]],[`gap`,[`row-gap`,`column-gap`]],[`inset`,[`top`,`right`,`bottom`,`left`]],[`list-style`,[`list-style-position`,`list-style-image`,`list-style-type`]],[`flex-flow`,[`flex-direction`,`flex-wrap`]]]);function pendingLonghandsMap(){return new Map([...wc,...Bc])}function cascadeLonghandsOf(e){return wc.get(e)??Bc.get(e)}function isCascadeOnlyShorthand(e){return Bc.has(e)}const Vc=/* @__PURE__ */ new Set([`visible`,`hidden`,`clip`,`scroll`,`auto`,`overlay`]),Hc=/* @__PURE__ */ new Set([`row`,`row-reverse`,`column`,`column-reverse`]),Uc=/* @__PURE__ */ new Set([`nowrap`,`wrap`,`wrap-reverse`]);function expandCascadeShorthand(e,t){switch(e){case`outline`:{let e=items(t);if(e===null||e.length<1||e.length>3)return null;let n=``,r=``,i=``,a=grammarFor(`outline-width`);for(let t of e){if(t.type===1&&(Dc.has(t.lower)||t.lower===`auto`)&&t.lower!==`hidden`){if(r!==``)return null;r=t.lower;continue}let e=normalizeComponent(t,a);if(e!==null){if(n!==``)return null;n=e;continue}let o=normalizeColor(t.text);if(o!==null&&t.type!==10){if(i!==``)return null;i=o}else return null}return[i||`currentcolor`,r||`none`,n||`medium`]}case`overflow`:case`flex-flow`:{let n=items(t);if(n===null||n.length<1||n.length>2)return null;for(let e of n)if(e.type!==1)return null;if(e===`overflow`){for(let e of n)if(!Vc.has(e.lower))return null;return[n[0].lower,(n[1]??n[0]).lower]}let r=``,i=``;for(let e of n)if(Hc.has(e.lower)&&r===``)r=e.lower;else if(Uc.has(e.lower)&&i===``)i=e.lower;else return null;return[r||`row`,i||`nowrap`]}case`gap`:{let e=items(t);if(e===null||e.length<1||e.length>2)return null;let n=grammarFor(`row-gap`),r=[];for(let t of e){let e=normalizeComponent(t,n);if(e===null)return null;r.push(e)}return[r[0],r[1]??r[0]]}case`inset`:return expandBox(Bc.get(`inset`),t);case`list-style`:{let e=items(t);if(e===null||e.length<1||e.length>3)return null;let n=``,r=``,i=``,a=0;for(let t of e)if(t.type===1&&(t.lower===`inside`||t.lower===`outside`)&&n===``)n=t.lower;else if(t.type===1&&t.lower===`none`)a++;else if((t.type===7||t.type===2&&Nc.has(t.lower))&&r===``)r=t.type===7?serializeUrl(t.value):t.text;else if((t.type===1||t.type===5||t.type===2&&t.lower===`symbols`)&&i===``)i=t.type===1?t.lower:t.text;else return null;return a>+(r===``)+ +(i===``)?null:(a!==0&&(r===``&&(r=`none`),i===``&&(i=`none`)),[n||`outside`,r||`none`,i||`disc`])}}return null}function serializeCascadeShorthand(e,t){switch(e){case`overflow`:case`gap`:return t[0]===t[1]?t[0]:t[0]+` `+t[1];case`inset`:return serializeBox(t);case`outline`:case`list-style`:case`flex-flow`:return t.join(` `)}return``}const Wc=[];function serializeBox(e){let[t,n,r,i]=e;return i===n?r===t?n===t?t:t+` `+n:t+` `+n+` `+r:t+` `+n+` `+r+` `+i}function serializeSide(e,t,n,r){if(r)return e+` `+t+` `+n;let i=[];return e!==`medium`&&i.push(e),t!==`none`&&i.push(t),n!==`currentcolor`&&i.push(n),i.length===0?e:i.join(` `)}function serializeShorthand(e,t,n){let r=0;for(let e of t)isCSSWideKeyword(e)&&r++;if(r!==0){if(r!==t.length)return``;for(let e of t)if(e!==t[0])return``;return t[0]}switch(e){case`margin`:case`padding`:case`border-width`:case`border-style`:case`border-color`:return serializeBox(t);case`border-top`:case`border-right`:case`border-bottom`:case`border-left`:return serializeSide(t[0],t[1],t[2],n);case`border`:for(let e=0;e<3;e++){let n=e*4;if(t[n]!==t[n+1]||t[n]!==t[n+2]||t[n]!==t[n+3])return``}return t[12]===`none`?serializeSide(t[0],t[4],t[8],n):``;case`flex`:return t[0]+` `+t[1]+` `+t[2];case`background-position`:return t[0]+` `+t[1];case`background`:{if(n)return`${t[8]} ${t[0]} ${t[7]} ${t[4]} ${t[1]} ${t[2]} / ${t[3]} ${t[5]} ${t[6]}`.replace(/\s+/g,` `);let e=[];return t[0]!==`none`&&e.push(t[0]),(t[1]!==`0%`||t[2]!==`0%`||t[3]!==`auto`)&&e.push(t[1]+` `+t[2]+(t[3]===`auto`?``:` / `+t[3])),t[4]!==`repeat`&&e.push(t[4]),t[7]!==`scroll`&&e.push(t[7]),(t[5]!==`padding-box`||t[6]!==`border-box`)&&e.push(t[5]===t[6]?t[5]:t[5]+` `+t[6]),t[8]!==`transparent`&&t[8]!==`rgba(0, 0, 0, 0)`&&e.push(t[8]),e.length===0?`none`:e.join(` `)}case`font`:{let e=[];return t[0]!==`normal`&&e.push(t[0]),t[1]!==`normal`&&e.push(t[1]),t[2]!==`normal`&&!(n&&t[2]===`400`)&&e.push(t[2]),e.push(t[3]+(t[4]===`normal`?``:` / `+t[4])),e.push(t[5]),e.join(` `)}}return``}var DeclBlock=class{names;values;important;dirty;namesSynced;serialized;serializedCount;serializedFamilies;serializedPlain;constructor(){this.names=[],this.values=[],this.important=[],this.dirty=!1,this.namesSynced=0,this.serialized=``,this.serializedCount=0,this.serializedFamilies=0,this.serializedPlain=!0}get length(){return this.names.length}indexOf(e,t=0){let n=this.names;for(let r=t;r<n.length;r++)if(n[r]===e)return r;return-1}clear(){this.names.length=0,this.values.length=0,this.important.length=0,this.namesSynced=0,this.serialized=``,this.serializedCount=0,this.serializedFamilies=0,this.serializedPlain=!0}put(e,t,n){let r=this.indexOf(e);r===-1?(this.names.push(e),this.values.push(t),this.important.push(n),this.dirty=!0):(this.values[r]!==t||this.important[r]!==n)&&(this.serializedCount===this.names.length&&this.serializedPlain&&shorthandsContaining(e)===void 0?this.spliceSerialized(r,t,n):this.serializedCount=-1,this.values[r]=t,this.important[r]=n,this.dirty=!0)}spliceSerialized(e,t,n){let r=this.names,i=this.values,a=this.important,o=0;for(let t=0;t<e;t++)o+=r[t].length+i[t].length+(a[t]?15:4);let s=o+r[e].length+i[e].length+(a[e]?14:3),c=this.serialized;this.serialized=c.slice(0,o)+serializeDeclaration(r[e],t,n)+c.slice(s)}putParsed(e,t,n){let r=this.indexOf(e);if(r!==-1){if(this.important[r]&&!n)return;this.names.splice(r,1),this.values.splice(r,1),this.important.splice(r,1),r<this.namesSynced&&(this.namesSynced=r),this.serializedCount=-1}this.names.push(e),this.values.push(t),this.important.push(n)}removeOne(e){let t=this.indexOf(e);return t!==-1&&(this.names.splice(t,1),this.values.splice(t,1),this.important.splice(t,1),this.dirty=!0,t<this.namesSynced&&(this.namesSynced=t),this.serializedCount=-1,!0)}setValue(e,t,n,r){if(isCustomPropertyName(e)){let i=normalizeCustom(t);return i!==null&&(r?this.putParsed(e,i,n):this.put(e,i,n),!0)}if(isExpandedShorthand(e)){let i=longhandValues(e,t);if(i===null)return!1;let a=longhandsOf(e);if(i===Kc){for(let e of a)this.removeOne(e);return this.putOrParsed(e,t.trim(),n,r),!0}this.removeOne(e);for(let e=0;e<a.length;e++)this.putOrParsed(a[e],i[e],n,r);return!0}if(!isSupportedProperty(e))return!1;let i=normalizeLonghand(e,t);return i!==null&&(this.putOrParsed(e,i,n,r),!0)}putOrParsed(e,t,n,r){r?this.putParsed(e,t,n):this.put(e,t,n)}parse(e){this.clear(),e!==``&&this.addRaw(parseDeclarationList(e))}addRaw(e){for(let t=0;t<e.length;t++){let n=e[t],r=isCustomPropertyName(n.name)?n.name:n.name.toLowerCase();this.setValue(r,n.value,n.important,!0)}}remove(e){let t=this.removeOne(e),n=longhandsOf(e);if(n!==void 0)for(let e of n)this.removeOne(e)&&(t=!0);return t}getPropertyValue(e){let t=this.indexOf(e);if(t!==-1)return this.values[t];let n=longhandsOf(e);if(n===void 0)return``;let r=[],i=-1;for(let e of n){let t=this.indexOf(e);if(t===-1)return``;let n=+!!this.important[t];if(i===-1)i=n;else if(i!==n)return``;r.push(this.values[t])}return serializeShorthand(e,r,!1)}getPropertyPriority(e){let t=this.indexOf(e);if(t!==-1)return this.important[t]?`important`:``;let n=longhandsOf(e);if(n===void 0)return``;for(let e of n){let t=this.indexOf(e);if(t===-1||!this.important[t])return``}return`important`}serialize(){let e=this.names.length,t=this.serializedCount;return t===e||(t<0||!this.serializeAppended(t))&&(this.serialized=this.serializeAll(0),this.serializedCount=e,this.serializedFamilies=-1,this.serializedPlain=!Gc),this.serialized}serializeAppended(e){let t=this.names,n=t.length,r=0;for(let i=e;i<n;i++)r|=shorthandFamily(t[i]);let i=this.serializedFamilies;if(r!==0&&i===-1){i=0;for(let n=0;n<e;n++)i|=shorthandFamily(t[n])}if((r&i)!==0)return!1;let a=this.serializeAll(e);return Gc&&(this.serializedPlain=!1),this.serialized=this.serialized===``?a:this.serialized+` `+a,this.serializedCount=n,this.serializedFamilies=i===-1?-1:i|r,!0}serializeAll(e=0){let t=this.names,n=t.length;if(Gc=!1,n===e)return``;let r=``,i=null;for(let a=e;a<n;a++){let o=t[a];if(i!==null&&i.has(o))continue;let s=shorthandsContaining(o),c=!1;if(s!==void 0)for(let t=0;t<s.length&&!c;t++){let o=s[t],l=longhandsOf(o),u=l.length<=n-e;for(let t=0;t<l.length&&u;t++){let n=this.indexOf(l[t],e);u=n!==-1&&this.important[n]===this.important[a]&&(i===null||!i.has(l[t]))}if(!u)continue;let d=Array(l.length);for(let t=0;t<l.length;t++)d[t]=this.values[this.indexOf(l[t],e)];let m=serializeShorthand(o,d,!1);if(m!==``){i===null&&(i=/* @__PURE__ */ new Set);for(let e of l)i.add(e);r+=(r===``?``:` `)+serializeDeclaration(o,m,this.important[a]),c=!0}}c||(r+=(r===``?``:` `)+serializeDeclaration(o,this.values[a],this.important[a]))}return Gc=i!==null,r}};let Gc=!1;function serializeDeclaration(e,t,n){return e+`: `+t+(n?` !important;`:`;`)}const Kc=Wc,qc=/* @__PURE__ */ new Map;function longhandValues(e,t){let n=qc.get(e);if(n===void 0)qc.set(e,n=/* @__PURE__ */ new Map);else{let e=n.get(t);if(e!==void 0)return e}let r=null,i=t.trim(),a=i===``?null:splitComponents(i);return r=a===null?null:a.length===1&&a[0].type===1&&isCSSWideKeyword(a[0].lower)?Array(longhandsOf(e).length).fill(a[0].lower):containsVar(i)?Kc:expandShorthand(e,i),n.size===256&&n.clear(),n.set(t,r),r}function parseDeclBlock(e){let t=new DeclBlock;return t.parse(e),t}var CSSStyleDeclaration=class{[B];[zn];[w];[er];[Ur];[hn];constructor(e=null,t=null,n=null){if(Jc||installAccessors(),this[B]=e,this[zn]=n,this[w]=t??new DeclBlock,this[er]=!1,this[Ur]=!1,this[hn]=0,e!==null){let t=attr(e[M],`style`);t!==null&&t!==``&&this[w].parse(t)}this[w].names.length!==0&&this._syncIndices()}_attributeChanged(e){this[Ur]||(this[w].parse(e??``),this._syncIndices())}_changed(){this._syncIndices();let e=this[B];if(e!==null){this[Ur]=!0;try{setAttribute(e[M],`style`,this[w].serialize())}finally{this[Ur]=!1}}else this[zn]!==null&&this[zn]._declarationsChanged()}_syncIndices(){let e=this[w],t=e.names,n=t.length,r=e.namesSynced;if(r===n&&n===this[hn])return;let i=this;for(let e=r;e<n;e++)i[e]=t[e];for(let e=n;e<this[hn];e++)delete i[e];this[hn]=n,e.namesSynced=n}_checkWritable(){if(this[er])throw new DOMException(`Failed to execute on 'CSSStyleDeclaration': These styles are computed, and therefore read-only.`,`NoModificationAllowedError`)}get cssText(){return this[er]?``:this[w].serialize()}set cssText(e){this._checkWritable(),this[w].parse(e===null?``:String(e)),this._changed()}get length(){return this[w].names.length}item(e){return this[w].names[e>>>0]??``}getPropertyValue(e){let t=String(e);return this[w].getPropertyValue(isCustomPropertyName(t)?t:t.toLowerCase())}getPropertyPriority(e){let t=String(e);return this[w].getPropertyPriority(isCustomPropertyName(t)?t:t.toLowerCase())}setProperty(e,t,n=``){this._checkWritable();let r=String(e);isCustomPropertyName(r)||(r=r.toLowerCase());let i=t===null?``:idlString(t);if(i===``){this.removeProperty(r);return}let a=n===null?``:idlString(n),o=!1;if(a!==``){if(a.toLowerCase()!==`important`)return;o=!0}let s=this[w];s.dirty=!1,s.setValue(r,i,o,!1)&&s.dirty&&this._changed()}removeProperty(e){this._checkWritable();let t=String(e);isCustomPropertyName(t)||(t=t.toLowerCase());let n=this[w].getPropertyValue(t);return this[w].remove(t)&&this._changed(),n}get parentRule(){return this[zn]}get cssFloat(){return this.getPropertyValue(`float`)}set cssFloat(e){this._setNamed(`float`,e)}_setNamed(e,t){this[er]||this.setProperty(e,t===null?``:idlString(t))}*[Symbol.iterator](){let e=this.length;for(let t=0;t<e;t++)yield this.item(t)}get[Symbol.toStringTag](){return`CSSStyleDeclaration`}};let Jc=!1;function installAccessors(){Jc=!0;let e=CSSStyleDeclaration.prototype,t=Object.create(null),define=(n,r)=>{Object.hasOwn(t,n)||Object.hasOwn(e,n)||Object.defineProperty(t,n,r)};for(let e of allPropertyNames()){let t={get(){return this.getPropertyValue(e)},set(t){this._setNamed(e,t)},enumerable:!0,configurable:!0};define(e,t),e.indexOf(`-`)!==-1&&(define(cssPropertyToIDLAttribute(e,!1),t),e.startsWith(`-webkit-`)&&define(cssPropertyToIDLAttribute(e,!0),t))}Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.setPrototypeOf(e,t)}function idlString(e){if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}const Yc=[`jsdom-26`,`jsdom-30`,`modern`],Xc=`jsdom-30`,Zc=Yc,Qc=[`jsdom-30`,`modern`],$c=[`modern`],handlers=e=>e.map(e=>`on${e}`),on=(e,t)=>t.map(t=>`${e}.${t}`),el=handlers([`gotpointercapture`,`lostpointercapture`,`pointercancel`,`pointerdown`,`pointerenter`,`pointerleave`,`pointermove`,`pointerout`,`pointerover`,`pointerrawupdate`,`pointerup`]),tl=handlers([`animationcancel`,`animationend`,`animationiteration`,`animationstart`,`command`,`selectionchange`,`selectstart`,`transitioncancel`,`transitionend`,`transitionrun`,`transitionstart`]),nl=[`Document`,`HTMLElement`,`SVGElement`,`MathMLElement`],rl=[{globals:[`PointerEvent`,...el],members:nl.flatMap(e=>on(e,el)),profiles:Qc,reason:"jsdom 27 added pointer events. Libraries pick pointer or mouse/touch code paths by detecting `PointerEvent` or `onpointerdown` (React Aria caches the choice at import), so suites written for jsdom 26 break when they exist, and again when they `delete global.PointerEvent` after installing a fake."},{globals:[`matchMedia`,`MediaQueryList`,`MediaQueryListEvent`],profiles:$c,reason:"No jsdom has matchMedia. Suites install their own (mock-match-media only polyfills it when it is missing: React Aria's `setMedia({pointer: 'coarse'})` did nothing with ours present) and components feature-detect it."},{globals:[`ResizeObserver`],profiles:$c,reason:`No jsdom has ResizeObserver, and libraries detect it to pick their browser path: Base UI's ScrollArea then calls getAnimations(), which nothing implements. Suites written for jsdom install their own (Sentry's MockResizeObserver).`},{members:[`HTMLElement.inert`],profiles:$c,reason:"No jsdom has the `inert` IDL attribute. Libraries that find it mark content outside a modal `inert` instead of `aria-hidden` (React Aria's ariaHideOutside, Radix's hideOthers), which stock Testing Library's queries do not treat as inaccessible. The content attribute makes subtrees inert in every profile."},{globals:[`visualViewport`],profiles:$c,reason:"Without layout its numbers mislead positioning libraries (Floating UI), which fall back to the document element when it is absent, as under jsdom. `createWindow({ visualViewport })` overrides the profile."},{globals:[`CSS`,`CSSConditionRule`,`CSSContainerRule`,`CSSFontFaceRule`,`CSSGroupingRule`,`CSSKeyframeRule`,`CSSKeyframesRule`,`CSSLayerBlockRule`,`CSSLayerStatementRule`,`CSSNamespaceRule`,`CSSNestedDeclarations`,`CSSPageRule`,`CSSRuleList`,`CSSScopeRule`,`CSSSupportsRule`],members:[`HTMLStyleElement.disabled`],profiles:Zc,reason:"CSSOM classes are only reached through style sheets jsdom 26 also parses (its rule objects come from the cssom package). `CSS.escape`/`CSS.supports` behave as the polyfills suites install, which replace ours by assignment."},{globals:[`BeforeUnloadEvent`,`PromiseRejectionEvent`,`TransitionEvent`],members:[`MouseEvent.movementX`,`MouseEvent.movementY`,`CustomElementRegistry.getName`],profiles:Zc,reason:`Event classes and members nothing feature-detects; our own dispatch creates these events.`},{globals:[`AnimationEvent`,`ClipboardEvent`,`CommandEvent`,`DragEvent`,`FormDataEvent`,`TextEvent`,`ToggleEvent`,`Touch`,`TouchList`,...tl,`onpagereveal`,`onpageswap`],members:[...[`Document`,`HTMLElement`,`SVGElement`].flatMap(e=>on(e,tl)),...on(`HTMLBodyElement`,[`onpagereveal`,`onpageswap`]),...on(`HTMLFrameSetElement`,[`onpagereveal`,`onpageswap`]),`TouchEvent.getModifierState`,`PopStateEvent.hasUAVisualTransition`,`InputEvent.dataTransfer`],profiles:Zc,reason:`Event classes and handler attributes for events our dispatch fires (popover toggle, command, form data, drag, clipboard, animation/transition). Libraries construct or listen for them; none switch code paths on their presence.`},{globals:[`Clipboard`,`ClipboardItem`,`DataTransfer`,`DataTransferItem`,`DataTransferItemList`],members:[`Navigator.clipboard`],profiles:Zc,reason:"user-event's `setup()` replaces `navigator.clipboard` with its stub either way, and builds DataTransfer objects for drag/paste whether or not the DOM has the class."},{globals:[`IntersectionObserver`],profiles:Zc,reason:`Component libraries construct it unconditionally and crash when it is missing; ours never reports entries (no layout), and suites that need entries install a mock by assignment.`},{globals:/* @__PURE__ */ `SVGAElement.SVGCircleElement.SVGClipPathElement.SVGEllipseElement.SVGFilterElement.SVGForeignObjectElement.SVGGeometryElement.SVGGradientElement.SVGImageElement.SVGLineElement.SVGLinearGradientElement.SVGMarkerElement.SVGMaskElement.SVGPathElement.SVGPatternElement.SVGPolygonElement.SVGPolylineElement.SVGRadialGradientElement.SVGRectElement.SVGScriptElement.SVGStopElement.SVGStyleElement.SVGTSpanElement.SVGTextContentElement.SVGTextElement.SVGTextPathElement.SVGTextPositioningElement.SVGUseElement.SVGViewElement.MathMLElement`.split(`.`),members:[`SVGElement.autofocus`,...on(`SVGGraphicsElement`,[`getBBox`,`getCTM`,`getScreenCTM`]),...on(`SVGSVGElement`,[`animationsPaused`,`checkEnclosure`,`checkIntersection`,`createSVGAngle`,`createSVGLength`,`createSVGMatrix`,`createSVGPoint`,`createSVGTransform`,`deselectAll`,`getCurrentTime`,`getEnclosureList`,`getIntersectionList`,`pauseAnimations`,`setCurrentTime`,`unpauseAnimations`])],profiles:Zc,reason:`Element classes for markup jsdom creates as plain SVGElement/Element (instanceof checks only), and SVG geometry that returns zeros without layout; suites that need numbers assign their own getBBox.`},{globals:[`DOMMatrix`,`DOMMatrixReadOnly`,`DOMPoint`,`DOMPointReadOnly`,`DOMRectList`],members:[`Range.getBoundingClientRect`,`Range.getClientRects`],profiles:Zc,reason:"Geometry values (zeros without layout). Editors call `range.getBoundingClientRect()`, which jsdom lacks; suites mock it by assignment."},{globals:[`CSSPropertyRule`,`CSSStartingStyleRule`,`CustomStateSet`,`DOMStringList`,`MediaError`,`TimeRanges`,`VisualViewport`],members:[...on(`CSSRule`,[`DOCUMENT_RULE`,`REGION_STYLE_RULE`,`VIEWPORT_RULE`]),...on(`CSSRule.static`,[`DOCUMENT_RULE`,`REGION_STYLE_RULE`,`VIEWPORT_RULE`]),`CSSStyleDeclaration.cssFloat`,...on(`ElementInternals`,[`ariaActiveDescendantElement`,`ariaBrailleLabel`,`ariaBrailleRoleDescription`,`ariaControlsElements`,`ariaDescribedByElements`,`ariaDetailsElements`,`ariaErrorMessageElements`,`ariaFlowToElements`,`ariaLabelledByElements`,`ariaOwnsElements`,`checkValidity`,`form`,`reportValidity`,`setFormValue`,`setValidity`,`states`,`validationMessage`,`validity`,`willValidate`])],profiles:Zc,reason:`Interfaces reached only through objects that create them (style sheets, form-associated custom elements, media elements).`},{globals:[`cancelIdleCallback`,`requestIdleCallback`,`clientInformation`,`closed`,`crossOriginIsolated`,`isSecureContext`,`opener`,`reportError`],members:[`History.scrollRestoration`,...on(`Screen`,[`availLeft`,`availTop`,`isExtended`]),...on(`Navigator`,[`deviceMemory`,`doNotTrack`,`maxTouchPoints`,`oscpu`,`pdfViewerEnabled`,`registerProtocolHandler`,`sendBeacon`,`unregisterProtocolHandler`,`userActivation`,`vibrate`,`webdriver`])],profiles:Zc,reason:`Window and navigator members with browser defaults (no touch points, not a webdriver). Fake timers fake requestIdleCallback like the other timer functions; libraries that fall back to setTimeout without it behave the same.`},{members:[...on(`Document`,[`adoptedStyleSheets`,`alinkColor`,`bgColor`,`designMode`,`domain`,`fgColor`,`linkColor`,`moveBefore`,`scrollingElement`,`vlinkColor`]),`Document.static.parseHTMLUnsafe`,`DocumentFragment.moveBefore`,...on(`Element`,[`ariaActiveDescendantElement`,`ariaBrailleLabel`,`ariaBrailleRoleDescription`,`ariaControlsElements`,`ariaDescribedByElements`,`ariaDetailsElements`,`ariaErrorMessageElements`,`ariaFlowToElements`,`ariaLabelledByElements`,`ariaOwnsElements`,`checkVisibility`,`dataset`,`getHTML`,`moveBefore`,`part`,`scroll`,`scrollBy`,`scrollIntoView`,`scrollTo`,`setHTMLUnsafe`]),...on(`ShadowRoot`,[`adoptedStyleSheets`,`clonable`,`delegatesFocus`,`elementFromPoint`,`elementsFromPoint`,`getHTML`,`serializable`,`setHTMLUnsafe`,`slotAssignment`,`styleSheets`]),...on(`Selection`,[`direction`,`getComposedRanges`,`modify`])],profiles:Zc,reason:"DOM members suites written for jsdom stub by assignment when they need them (`Element.prototype.scrollIntoView = vi.fn()`), which replaces ours. `Element.dataset` is on Element (jsdom: on HTMLElement and SVGElement)."},{members:[...on(`HTMLElement`,[`accessKeyLabel`,`autocapitalize`,`autocorrect`,`autofocus`,`contentEditable`,`enterKeyHint`,`hidePopover`,`innerText`,`inputMode`,`isContentEditable`,`outerText`,`popover`,`showPopover`,`spellcheck`,`togglePopover`,`writingSuggestions`]),...on(`HTMLButtonElement`,[`command`,`commandForElement`,`formAction`,`formEnctype`,`formMethod`,`popoverTargetAction`,`popoverTargetElement`]),...on(`HTMLInputElement`,[`formAction`,`formEnctype`,`formMethod`,`height`,`popoverTargetAction`,`popoverTargetElement`,`showPicker`,`width`]),...on(`HTMLDialogElement`,[`close`,`closedBy`,`requestClose`,`returnValue`,`show`,`showModal`]),...on(`HTMLAnchorElement`,[`ping`,`referrerPolicy`]),...on(`HTMLAreaElement`,[`download`,`hreflang`,`ping`,`referrerPolicy`,`type`]),...on(`HTMLCanvasElement`,[`captureStream`,`transferControlToOffscreen`]),`HTMLDetailsElement.name`,`HTMLEmbedElement.getSVGDocument`,...on(`HTMLFormElement`,[`autocomplete`,`encoding`,`rel`,`relList`]),...on(`HTMLIFrameElement`,[`allow`,`loading`,`referrerPolicy`,`sandbox`]),...on(`HTMLImageElement`,[`decode`,`decoding`,`fetchPriority`,`loading`,`referrerPolicy`,`x`,`y`]),...on(`HTMLLinkElement`,[`as`,`blocking`,`disabled`,`fetchPriority`,`imageSizes`,`imageSrcset`,`integrity`,`referrerPolicy`,`sizes`]),...on(`HTMLMarqueeElement`,[`loop`,`start`,`stop`]),...on(`HTMLMediaElement`,[`disableRemotePlayback`,`error`,`fastSeek`,`getStartDate`,`loading`,`mediaKeys`,`preservesPitch`,`setMediaKeys`,`setSinkId`,`sinkId`,`srcObject`]),`HTMLMetaElement.media`,...on(`HTMLObjectElement`,[`contentWindow`,`getSVGDocument`]),...on(`HTMLScriptElement`,[`async`,`blocking`,`fetchPriority`,`integrity`,`noModule`,`referrerPolicy`]),`HTMLScriptElement.static.supports`,...on(`HTMLSelectElement`,[`autocomplete`,`showPicker`]),`HTMLSlotElement.assign`,...on(`HTMLSourceElement`,[`height`,`width`]),`HTMLStyleElement.blocking`,...on(`HTMLTemplateElement`,[`shadowRootClonable`,`shadowRootDelegatesFocus`,`shadowRootMode`,`shadowRootSerializable`,`shadowRootSlotAssignment`]),`HTMLTrackElement.track`,...on(`HTMLVideoElement`,[`cancelVideoFrameCallback`,`disablePictureInPicture`,`getVideoPlaybackQuality`,`requestPictureInPicture`,`requestVideoFrameCallback`])],profiles:Zc,reason:"Reflected attributes and element behavior we implement (popover, dialog, invoker commands, innerText). Where jsdom lacks a method, suites assign their own (`HTMLDialogElement.prototype.showModal = vi.fn()`), which replaces ours."}];function resolveCompat(e){if(e===void 0)return Xc;if(Yc.includes(e))return e;throw TypeError(`Unknown compat profile ${JSON.stringify(e)}: expected ${Yc.map(e=>JSON.stringify(e)).join(`, `)}.`)}const il=/* @__PURE__ */ new Map;function hiddenGlobals(e){let t=il.get(e);if(t===void 0){let n=/* @__PURE__ */ new Set;for(let t of rl)if(!(t.globals===void 0||t.profiles.includes(e)))for(let e of t.globals)n.add(e);il.set(e,t=n)}return t}function compatExposes(e,t){for(let n of rl)if(n.globals?.includes(t)||n.members?.includes(t))return n.profiles.includes(e);return!0}const al=/* @__PURE__ */ new Map;function deferCompatMember(e,t,n){let r=Object.getOwnPropertyDescriptor(e,n);if(r===void 0)throw Error(`deferCompatMember: ${t}.${n} is not defined`);delete e[n],al.set(`${t}.${n}`,{owner:e,descriptor:r})}const ol=/* @__PURE__ */ new Map;function deferredCompatMembers(){return al}let sl=null;function gatedMembers(){if(sl!==null)return sl;sl=[];for(let e of rl)if(e.members!==void 0&&e.profiles.length!==Yc.length)for(let t of e.members){let n=t.split(`.`),r=n.length===3&&n[1]===`static`;sl.push({key:t,iface:n[0],member:n[n.length-1],isStatic:r,profiles:e.profiles})}return sl}function installCompatMembers(e,t){let n=[];for(let r of gatedMembers()){let i=t[r.iface];if(i===void 0)continue;let a=r.isStatic?i:i.prototype;if(a===void 0)continue;let o=r.profiles.includes(e),s=Object.hasOwn(a,r.member);if(o&&!s){let e=al.get(r.key)?.descriptor??ol.get(r.key);if(e===void 0)continue;Object.defineProperty(a,r.member,e),n.push(()=>delete a[r.member])}else if(!o&&s){let e=Object.getOwnPropertyDescriptor(a,r.member);ol.set(r.key,e),delete a[r.member],n.push(()=>Object.defineProperty(a,r.member,e))}}return()=>{for(let e=n.length-1;e>=0;e--)n[e]()}}function fireAnEvent(e,t,n,r,i=!1){let a=n===void 0?new Event(e,r):new n(e,r);return a._s.flags|=128,dispatch(a,t,i)}function dispatchTrusted(e,t){return e._s.flags|=128,dispatch(e,t)}function fireSyntheticPointerEvent(e,t,n,r){let i=t[M],a=i===void 0?null:i.doc[J],o=new PointerEvent(e,{pointerId:-1,...r,bubbles:!0,cancelable:!0,composed:!0,view:a});return n||(o._s.flags|=128),dispatch(o,t)}function fireEvent(e,t,n=!1,r=!1){return fireAnEvent(t,e,void 0,{bubbles:n,cancelable:r})}function fireFocusEvent(e,t,n,r,i){fireAnEvent(t,e,FocusEvent,{bubbles:r,cancelable:!1,composed:!0,relatedTarget:n,view:i,detail:0})}function fireToggleEvent(e,t,n,r,i,a=null){return fireAnEvent(t,e,ToggleEvent,{bubbles:!1,cancelable:i,oldState:n,newState:r,source:a})}function fireSyntheticClick(e){return fireSyntheticPointerEvent(`click`,e,!0)}function queueElementTask(e,t){let n=(`doc`in e?e:e[M]).doc[J]??currentWindowOrNull();n===null?setTimeout(t,0):n._task(t,0)}var NodeCache=class{roleVersion;role;roleAttr;nameVersion;name;styleVersion;styleSheetVersion;style;computedStyle;ariaNameStyleVersion;ariaHiddenVersion;ariaHiddenStyleVersion;ariaHiddenBits;constructor(){this.roleVersion=-1,this.role=``,this.roleAttr=null,this.nameVersion=-1,this.name=``,this.styleVersion=-1,this.styleSheetVersion=-1,this.style=null,this.computedStyle=null,this.ariaNameStyleVersion=-1,this.ariaHiddenVersion=-1,this.ariaHiddenStyleVersion=-1,this.ariaHiddenBits=0}};function nodeCache(e){let t=e.cache;return t===null&&(e.cache=t=new NodeCache),t}function hex(e){return e.toString(16)}function serializeIdentifier(e){let t=``,n=e.length,r=n>0?e.charCodeAt(0):-1;for(let i=0;i<n;i++){let a=e.charCodeAt(i);t+=a===0?`�`:a>=1&&a<=31||a===127||i===0&&a>=48&&a<=57||i===1&&a>=48&&a<=57&&r===45?`\\`+hex(a)+` `:i===0&&a===45&&n===1?`\\-`:a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?e[i]:`\\`+e[i]}return t}function serializeString(e){let t=`"`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r===0?`�`:r>=1&&r<=31||r===127?`\\`+hex(r)+` `:r===34||r===92?`\\`+e[n]:e[n]}return t+`"`}function serializeAnPlusB(e,t){if(e===0)return String(t);let n=e===1?`n`:e===-1?`-n`:String(e)+`n`;return t>0?n+=`+`+String(t):t<0&&(n+=String(t)),n}let cl=null;function withNamespaceContext(e,t){let n=cl;cl=e??null;try{return t()}finally{cl=n}}function hasDefaultNamespace(){return cl!==null&&cl.defaultNamespace!==void 0}function serializeNamespace(e){switch(e.nsKind){case 1:return hasDefaultNamespace()?`*|`:``;case 2:return`|`;case 3:return prefixIsDefault(e.nsPrefix)?``:serializeIdentifier(e.nsPrefix)+`|`}return``}function prefixIsDefault(e){if(!hasDefaultNamespace()||cl.namespaces===void 0)return!1;let t=cl.namespaces.get(e);return t!==void 0&&t===cl.defaultNamespace}function attrOp(e){switch(e){case 1:return`=`;case 2:return`~=`;case 3:return`|=`;case 4:return`^=`;case 5:return`$=`;case 6:return`*=`}return``}function joinArgs(e,t,n){let r=``;for(let i=0;i<e.length;i++)i>0&&(r+=t),r+=n?serializeIdentifier(e[i]):e[i];return r}function serializeSimple(e){switch(e.kind){case 1:return serializeNamespace(e)+serializeIdentifier(e.name);case 2:return serializeNamespace(e)+`*`;case 3:return`#`+serializeIdentifier(e.name);case 4:return`.`+serializeIdentifier(e.name);case 5:{let t=`[`;return e.nsKind===1?t+=`*|`:e.nsKind===3&&(t+=serializeIdentifier(e.nsPrefix)+`|`),t+=serializeIdentifier(e.name),e.op!==0&&(t+=attrOp(e.op)+serializeString(e.value),e.caseFlag===1?t+=` i`:e.caseFlag===2&&(t+=` s`)),t+`]`}case 6:{let t=e.pseudo;if(t===5||t===6||t===7||t===8){let t=`:`+e.name+`(`+serializeAnPlusB(e.a,e.b);return e.list!==null&&(t+=` of `+serializeSelectorList(e.list)),t+`)`}if(t===11){let t=`:`+e.name+`(`;for(let n=0;n<e.args.length;n++)n>0&&(t+=`, `),t+=needsString(e.args[n])?serializeString(e.args[n]):serializeIdentifier(e.args[n]);return t+`)`}return t===12||t===13?`:`+e.name+`(`+serializeIdentifier(e.args[0])+`)`:t===88?e.args.length===0?`:heading`:`:heading(`+joinArgs(e.args,`, `,!1)+`)`:e.list===null?`:`+e.name:`:`+e.name+`(`+serializeSelectorList(e.list)+`)`}case 7:return e.list===null?e.pseudo===3||e.args.length!==0?`::`+e.name+`(`+joinArgs(e.args,` `,!0)+`)`:`::`+e.name:`::`+e.name+`(`+serializeSelectorList(e.list)+`)`}return``}function needsString(e){if(e.length===0)return!0;let t=e.charCodeAt(0);return t===42||t>=48&&t<=57}function serializeCompound(e){let t=``,n=e.simples.length;for(let r=0;r<n;r++){let i=e.simples[r];r===0&&n>1&&i.kind===2&&(i.nsKind===1&&!hasDefaultNamespace()||i.nsKind===0||i.nsKind===3&&prefixIsDefault(i.nsPrefix))||(t+=serializeSimple(i))}return t}function combinator(e){switch(e){case 1:return` `;case 2:return` > `;case 3:return` + `;case 4:return` ~ `}return` `}function serializeComplex(e){if(e.invalid)return e.text;let t=``;e.leading!==0&&e.leading!==1&&(t+=combinator(e.leading).slice(1));for(let n=0;n<e.compounds.length;n++)n>0&&(t+=combinator(e.combinators[n-1])),t+=serializeCompound(e.compounds[n]);return t}function serializeSelectorList(e){let t=``;for(let n=0;n<e.items.length;n++)n>0&&(t+=`, `),t+=serializeComplex(e.items[n]);return t}var CompiledSelector=class{text;specificity;keyKind;key;pseudoElement;volatile;h0;h1;h2;h3;direct;[St];[_n];constructor(e,t){this.text=e.text,this.specificity=e.specificity;let n=subjectKey(e);this.keyKind=n.kind,this.key=n.value,this.pseudoElement=e.pseudoElement,this.volatile=t.volatile;let r=ancestorHashes(e);this.h0=r.length>0?r[0]:-1,this.h1=r.length>1?r[1]:-1,this.h2=r.length>2?r[2]:-1,this.h3=r.length>3?r[3]:-1,this.direct=!t.usesScope&&t.nthTests.length===0,this[St]=e,this[_n]=t}get specificityTuple(){return unpackSpecificity(this.specificity)}};function compileSelectorList(e,t){let n=new SelectorParser(e).parseSelectorList();if(n===null)return null;let r=[];for(let e=0;e<n.items.length;e++){let i=new CompileInfo;if(t?.namespaces!==void 0){let e=t.namespaces;i.resolve=t=>e.has(t)?e.get(t):void 0}t!==void 0&&`defaultNamespace`in t&&(i.defaultNs=t.defaultNamespace);let a=compileComplex(n.items[e],i);if(i.error!==``)return null;r.push(new CompiledSelector(a,i))}return{text:e,serialized:serializeSelectorList(n),selectors:r}}function isSupportedSelector(e){let t=new SelectorParser(e).parseSelectorList();if(t===null)return!1;for(let e=0;e<t.items.length;e++){let n=new CompileInfo;if(compileComplex(t.items[e],n),n.error!==``||n.forgivingDropped)return!1}return!0}function serializeSelector(e,t){let n=new SelectorParser(e).parseSelectorList();return n===null?null:t===void 0?serializeSelectorList(n):withNamespaceContext(t,()=>serializeSelectorList(n))}function normalizePseudo(e){let t=0;for(;t<e.length&&e.charCodeAt(t)===58;)t++;return t===0?e:e.slice(t)}function matchesSelector(e,t,n,r){let i=n==null||n===``?``:normalizePseudo(n);if(e.pseudoElement!==i)return!1;let a=setScope(r?.scope??null),o=r?.shadowHost===void 0?null:setHostContext(r.shadowHost);try{return r?.shadowHost!==void 0&&r.shadowHost===t?matchFeaturelessHost(e[St],t):matchComplex(e[St],t)}finally{setScope(a),r?.shadowHost!==void 0&&setHostContext(o),e[_n].nthTests.length!==0&&resetMemos(e[_n])}}function matchesSelectorDirect(e,t,n){return e.pseudoElement===n?e.direct?e[St].fn(t):matchesSelector(e,t,n):!1}const ll={width:1024,height:768,devicePixelRatio:1,mediaType:`screen`};var Tok=class{type;text;lower;num;unit;constructor(e,t,n,r,i){this.type=e,this.text=t,this.lower=n,this.num=r,this.unit=i}};function tokenize(e){let t=new CSSTokenizer(e),n=[];for(;;){let r=t.next();if(r===0)break;let i=r===1||r===2?t.value.toLowerCase():r===9?t.value:``;n.push(new Tok(r,e.slice(t.start,t.end),i,t.num,r===12?t.unit.toLowerCase():``))}return n}var MQNode=class{kind;children;name;op;value;op2;value2;constructor(e){this.kind=e,this.children=[],this.name=``,this.op=``,this.value=null,this.op2=``,this.value2=null}},MediaQuery=class{text;negated;type;condition;invalid;constructor(e,t,n,r,i){this.text=e,this.negated=t,this.type=n,this.condition=r,this.invalid=i}},MQParser=class{toks;i;constructor(e){this.toks=e,this.i=0}ws(){for(;this.i<this.toks.length&&this.toks[this.i].type===13;)this.i++}peek(){return this.ws(),this.i<this.toks.length?this.toks[this.i]:null}ident(e){let t=this.peek();return t!==null&&t.type===1&&t.lower===e&&(this.i++,!0)}atEnd(){return this.peek()===null}condition(e){if(this.ident(`not`)){let e=this.inParens();if(e===null)return null;let t=new MQNode(1);return t.children.push(e),t}let t=this.inParens();if(t===null)return null;let n=this.peek();if(n===null||n.type!==1||n.lower!==`and`&&n.lower!==`or`)return t;let r=n.lower;if(r===`or`&&!e)return null;let i=new MQNode(r===`and`?2:3);for(i.children.push(t);this.ident(r);){let e=this.inParens();if(e===null)return null;i.children.push(e)}let a=this.peek();return a!==null&&a.type===1&&(a.lower===`and`||a.lower===`or`)?null:i}inParens(){let e=this.peek();if(e===null)return null;if(e.type===2)return this.i++,this.skipToClose()?new MQNode(5):null;if(e.type!==21)return null;this.i++;let t=this.i,n=this.peek();if(n!==null&&(n.type===21||n.type===1&&n.lower===`not`||n.type===2)){let e=this.condition(!0);if(e!==null){let t=this.peek();if(t!==null&&t.type===22)return this.i++,e}this.i=t}let r=this.feature();if(r!==null){let e=this.peek();if(e!==null&&e.type===22)return this.i++,r}return this.i=t,this.skipToClose()?new MQNode(5):null}skipToClose(){let e=1;for(;this.i<this.toks.length;){let t=this.toks[this.i++].type;if(t===21||t===2||t===19||t===23)e++;else if((t===22||t===20||t===24)&&(e--,e===0))return!0}return!1}value(){let e=this.peek();if(e===null)return null;if(e.type===10){this.i++;let t=this.i,n=this.peek();if(n!==null&&n.type===9&&n.lower===`/`){this.i++;let t=this.peek();return t!==null&&t.type===10?(this.i++,[e,t]):null}return this.i=t,[e]}return e.type===12||e.type===1||e.type===11?(this.i++,[e]):null}op(){let e=this.peek();if(e===null||e.type!==9)return``;let t=e.lower;return t!==`<`&&t!==`>`&&t!==`=`?``:(this.i++,t!==`=`&&this.i<this.toks.length&&this.toks[this.i].type===9&&this.toks[this.i].lower===`=`?(this.i++,t+`=`):t)}feature(){let e=this.peek();if(e===null)return null;if(e.type===1){let t=this.i;this.i++;let n=new MQNode(4);n.name=e.lower;let r=this.peek();if(r!==null&&r.type===22)return n;if(r!==null&&r.type===16){this.i++;let e=this.value();return e===null?null:(n.op=`:`,n.value=e,n)}let i=this.op();if(i!==``){let e=this.value();return e===null?null:(n.op=i,n.value=e,n)}this.i=t}let t=this.value();if(t===null)return null;let n=this.op();if(n===``)return null;let r=this.peek();if(r===null||r.type!==1)return null;this.i++;let i=new MQNode(4);i.name=r.lower,i.op=flip$1(n),i.value=t;let a=this.op();if(a!==``){if(n[0]!==a[0]||n===`=`||a===`=`)return null;let e=this.value();if(e===null)return null;i.op2=a,i.value2=e}return i}};function flip$1(e){switch(e){case`<`:return`>`;case`<=`:return`>=`;case`>`:return`<`;case`>=`:return`<=`}return e}__name(flip$1,`flip`);const ul=/* @__PURE__ */ new Set([`all`,`screen`,`print`,`speech`,`tty`,`tv`,`projection`,`handheld`,`braille`,`embossed`,`aural`]);function serializeTokens(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];switch(r.type){case 13:t!==``&&!t.endsWith(` `)&&!t.endsWith(`(`)&&(t+=` `);break;case 1:t+=r.lower;break;case 16:for(t=t.trimEnd()+`: `;n+1<e.length&&e[n+1].type===13;)n++;break;case 22:t=t.trimEnd()+`)`;break;case 10:t+=formatNumber(r.num);break;case 12:t+=formatNumber(r.num)+r.unit;break;case 9:if(r.lower===`/`)for(t=t.trimEnd()+` / `;n+1<e.length&&e[n+1].type===13;)n++;else t+=r.text;break;default:t+=r.text}}return t.trim()}function parseQuery(e){let t=new MQParser(e),n=serializeTokens(e),r=new MediaQuery(`not all`,!1,`all`,null,!0);if(t.atEnd())return r;let i=t.peek();if(i.type===1&&i.lower!==`not`&&i.lower!==`only`&&i.lower!==`and`&&i.lower!==`or`){let e=i.lower;t.i++;let a=null;return t.ident(`and`)&&(a=t.condition(!1),a===null)||!t.atEnd()||e===`layer`?r:new MediaQuery(n,!1,e,a,!1)}if(i.type===1&&(i.lower===`not`||i.lower===`only`)){let e=t.i,a=i.lower;t.i++;let o=t.peek();if(o!==null&&o.type===1&&o.lower!==`and`&&o.lower!==`or`&&o.lower!==`not`&&o.lower!==`only`){t.i++;let e=null;return t.ident(`and`)&&(e=t.condition(!1),e===null)||!t.atEnd()?r:new MediaQuery(n,a===`not`,o.lower,e,!1)}t.i=e}let a=t.condition(!0);return a===null||!t.atEnd()?r:new MediaQuery(n,!1,`all`,a,!1)}const dl=/* @__PURE__ */ new Map;function parseMediaQueryList(e){let t=dl.get(e);if(t!==void 0)return t;let n=tokenize(e),r=[],i=0,a=0,o=!1;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e]:null;if(t!==null&&(t.type===21||t.type===2||t.type===19?a++:(t.type===22||t.type===20)&&a--,t.type!==13&&(o=!0)),t===null||t.type===18&&a===0){let a=n.slice(i,e);(t!==null||o)&&r.push(parseQuery(a)),i=e+1}}return r.length===1&&r[0].invalid&&n.every(e=>e.type===13)&&(r.length=0),dl.size>500&&dl.clear(),dl.set(e,r),r}function serializeMediaQueryList(e){let t=``;for(let n=0;n<e.length;n++)t+=(n===0?``:`, `)+e[n].text;return t}function lengthPx(e){if(e.type===10)return e.num===0?0:null;if(e.type!==12)return null;switch(e.unit){case`px`:return e.num;case`em`:case`rem`:return e.num*16;case`in`:return e.num*96;case`cm`:return e.num*96/2.54;case`mm`:return e.num*96/25.4;case`pt`:return e.num*96/72;case`pc`:return e.num*16;case`q`:return e.num*96/101.6;case`vw`:return null}return null}function resolutionDppx(e){if(e.type!==12)return null;switch(e.unit){case`dppx`:case`x`:return e.num;case`dpi`:return e.num/96;case`dpcm`:return e.num*2.54/96}return null}function compare(e,t,n){let r=1e-9;switch(t){case`:`:case`=`:return Math.abs(e-n)<r;case`<`:return e<n-r;case`<=`:return e<=n+r;case`>`:return e>n+r;case`>=`:return e>=n-r}return!1}const fl={orientation:``,"prefers-color-scheme":`light`,"prefers-reduced-motion":`no-preference`,"prefers-reduced-transparency":`no-preference`,"prefers-reduced-data":`no-preference`,"prefers-contrast":`no-preference`,"forced-colors":`none`,"inverted-colors":`none`,hover:`hover`,"any-hover":`hover`,pointer:`fine`,"any-pointer":`fine`,"display-mode":`browser`,scripting:`enabled`,update:`fast`,"overflow-block":`scroll`,"overflow-inline":`scroll`,"color-gamut":`srgb`,"dynamic-range":`standard`,"video-dynamic-range":`standard`};function evalNode(e,t){switch(e.kind){case 6:return 1;case 5:return-1;case 1:{let n=evalNode(e.children[0],t);return n===-1?-1:1-n}case 2:{let n=1;for(let r of e.children){let e=evalNode(r,t);if(e===0)return 0;e===-1&&(n=-1)}return n}case 3:{let n=0;for(let r of e.children){let e=evalNode(r,t);if(e===1)return 1;e===-1&&(n=-1)}return n}case 4:return evalFeature(e,t)}return-1}function evalFeature(e,t){let n=e.name,r=e.op;if(n.startsWith(`-webkit-`)&&(n=n.slice(8)),r===`:`&&(n.startsWith(`min-`)||n.startsWith(`max-`)))r=n.startsWith(`min-`)?`>=`:`<=`,n=n.slice(4);else if(n.startsWith(`min-`)||n.startsWith(`max-`))return-1;let i=t.features?.[n],a=i===void 0?void 0:String(i),o=null,s=`range`;switch(n){case`width`:case`device-width`:o=t.width;break;case`height`:case`device-height`:o=t.height;break;case`aspect-ratio`:case`device-aspect-ratio`:o=t.height===0?0:t.width/t.height,s=`ratio`;break;case`resolution`:case`device-pixel-ratio`:o=t.devicePixelRatio,s=n===`resolution`?`resolution`:`number`;break;case`color`:o=8,s=`integer`;break;case`color-index`:case`monochrome`:case`grid`:o=0,s=`integer`;break;default:s=`discrete`}if(a!==void 0&&s!==`discrete`){let e=Number(a);Number.isNaN(e)||(o=e)}if(s===`discrete`){if(r!==``&&r!==`:`)return-1;let i=a??fl[n];if(n===`orientation`&&(i=a??(t.height>=t.width?`portrait`:`landscape`)),i===void 0)return-1;if(r===``)return+(i!==`none`&&i!==`no-preference`);let o=e.value;return o.length!==1||o[0].type!==1?0:+(o[0].lower===i)}if(o===null)return-1;if(r===``)return o===0?0:1;let check=(e,t)=>{let n=null;return s===`range`?n=e.length===1?lengthPx(e[0]):null:s===`ratio`?e.length===2?n=e[1].num===0?1/0:e[0].num/e[1].num:e.length===1&&e[0].type===10&&(n=e[0].num):s===`resolution`?n=e.length===1?resolutionDppx(e[0]):null:e.length===1&&e[0].type===10&&(n=e[0].num),n===null?-1:+!!compare(o,t,n)},c=check(e.value,r);return e.value2===null||c!==1?c:check(e.value2,e.op2)}function evaluateMediaQuery$1(e,t){if(e.invalid)return!1;let n=t.mediaType??`screen`,r=e.type===`all`||e.type===n;ul.has(e.type)||(r=!1);let i=r;return i&&e.condition!==null&&(i=evalNode(e.condition,t)===1),e.negated?!i:i}__name(evaluateMediaQuery$1,`evaluateMediaQuery`);function evaluateMediaQueryList$1(e,t){if(e.length===0)return!0;for(let n=0;n<e.length;n++)if(evaluateMediaQuery$1(e[n],t))return!0;return!1}__name(evaluateMediaQueryList$1,`evaluateMediaQueryList`);function matchMediaText(e,t){return evaluateMediaQueryList$1(parseMediaQueryList(e),t)}function splitSelectorList(e){let t=[],n=new CSSTokenizer(e),r=0,i=0;for(;;){let a=n.next();if(a===0)break;a===2||a===21||a===19?r++:a===22||a===20?r--:a===18&&r===0&&(t.push(e.slice(i,n.start).trim()),i=n.end)}return t.push(e.slice(i).trim()),t}function containsNesting(e){if(e.indexOf(`&`)===-1)return!1;let t=new CSSTokenizer(e);for(;;){let e=t.next();if(e===0)return!1;if(e===9&&t.value===`&`)return!0}}function resolveNested(e,t){let n=[],r=t.length===1&&isGluableCompound(t[0])?t[0]:`:is(`+t.join(`, `)+`)`;for(let t of splitSelectorList(e)){if(t===``)continue;let e=t;containsNesting(e)||(e=`& `+e),n.push(replaceNesting(e,r))}return n}function isGluableCompound(e){let t=e.charCodeAt(0);if(t!==46&&t!==35&&t!==91&&t!==58)return!1;let n=new CSSTokenizer(e),r=0;for(;;){let e=n.next();if(e===0)return!0;if(e===2||e===21||e===19)r++;else if(e===22||e===20)r--;else if(r===0&&(e===13||e===18||e===9&&(n.value===`>`||n.value===`+`||n.value===`~`||n.value===`|`)))return!1}}function replaceNesting(e,t){let n=new CSSTokenizer(e),r=``,i=0;for(;;){let a=n.next();if(a===0)break;a===9&&n.value===`&`&&(r+=e.slice(i,n.start)+t,i=n.end)}return r+e.slice(i)}function supportsDeclaration(e,t){let n=isCustomPropertyName(e)?e:e.toLowerCase();return isCustomPropertyName(n)?t.trim()!==``||!0:new DeclBlock().setValue(n,t,!1,!1)}var Cursor=class{src;t;type;constructor(e){this.src=e,this.t=new CSSTokenizer(e),this.type=0,this.next()}next(){do this.type=this.t.next();while(this.type===13)}block(){let e=this.t.end,t=1,n=e;for(;t>0;){let e=this.t.next();if(e===0)return null;e===21||e===2||e===19?t++:(e===22||e===20)&&(t--,n=this.t.start)}return this.next(),this.src.slice(e,n)}};function condition(e){if(e.type===1&&e.t.value.toLowerCase()===`not`){e.next();let t=inParens(e);return t===-1?-1:1-t}let t=inParens(e);if(t===-1)return-1;if(e.type!==1)return t;let n=e.t.value.toLowerCase();if(n!==`and`&&n!==`or`)return-1;for(;e.type===1&&e.t.value.toLowerCase()===n;){e.next();let r=inParens(e);if(r===-1)return-1;t=n===`and`?t&r:t|r}return e.type===1?-1:t}function inParens(e){if(e.type===2){let t=e.t.value.toLowerCase(),n=e.block();return n===null?-1:t===`selector`?+!!isSupportedSelector(n.trim()):0}if(e.type!==21)return-1;let t=e.block();if(t===null)return-1;let n=new Cursor(t);if(n.type===21||n.type===2||n.type===1&&n.t.value.toLowerCase()===`not`){let e=condition(n);if(e!==-1&&n.type===0)return e}return declaration(t)}function declaration(e){let t=new CSSTokenizer(e),n=t.next();for(;n===13;)n=t.next();if(n!==1)return 0;let r=t.value;for(n=t.next();n===13;)n=t.next();if(n!==16)return 0;let i=e.slice(t.end).trim(),a=/!\s*important\s*$/i.exec(i);return a!==null&&(i=i.slice(0,a.index).trim()),+!!supportsDeclaration(r,i)}function evaluateSupportsCondition(e){let t=new Cursor(e),n=condition(t);return n!==-1&&t.type===0?n===1:declaration(e)===1}var CSSRuleList=class{[H];[hn];constructor(e){this[H]=e,this[hn]=0,this._sync()}_setRules(e){this[H]=e,this._sync()}_sync(e=0){let t=this,n=this[H];for(let r=e;r<n.length;r++)t[r]=n[r];for(let e=n.length;e<this[hn];e++)delete t[e];this[hn]=n.length}get length(){return this[H].length}item(e){return this[H][e>>>0]??null}*[Symbol.iterator](){yield*this[H]}get[Symbol.toStringTag](){return`CSSRuleList`}},MediaList=class{[Zn];[B];[hn];constructor(e,t){this[Zn]=e===``?[]:parseMediaQueryList(e),this[B]=t,this[hn]=0,this._sync()}_sync(){let e=this,t=this[Zn];for(let n=0;n<t.length;n++)e[n]=t[n].text;for(let n=t.length;n<this[hn];n++)delete e[n];this[hn]=t.length}get mediaText(){return serializeMediaQueryList(this[Zn])}set mediaText(e){let t=e===null?``:String(e);this[Zn]=t===``?[]:parseMediaQueryList(t).slice(),this._sync(),this[B]?._changed()}get length(){return this[Zn].length}item(e){return this[Zn][e>>>0]?.text??null}appendMedium(e){let t=parseMediaQueryList(String(e));if(t.length===1){for(let e of this[Zn])if(e.text===t[0].text)return;this[Zn]=[...this[Zn],t[0]],this._sync(),this[B]?._changed()}}deleteMedium(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteMedium' on 'MediaList': 1 argument required, but only 0 present.`);let t=parseMediaQueryList(String(e));if(t.length!==1)return;let n=this[Zn].length;if(this[Zn]=this[Zn].filter(e=>e.text!==t[0].text),this[Zn].length===n)throw new DOMException(`Failed to execute 'deleteMedium' on 'MediaList': Failed to delete the medium.`,`NotFoundError`);this._sync(),this[B]?._changed()}toString(){return this.mediaText}*[Symbol.iterator](){for(let e of this[Zn])yield e.text}get[Symbol.toStringTag](){return`MediaList`}},StyleSheetList=class{[Or];[hn];constructor(){this[Or]=[],this[hn]=0}_set(e){this[Or]=e;let t=this;for(let n=0;n<e.length;n++)t[n]=e[n];for(let n=e.length;n<this[hn];n++)delete t[n];this[hn]=e.length}get length(){return this[Or].length}item(e){return this[Or][e>>>0]??null}*[Symbol.iterator](){yield*this[Or]}get[Symbol.toStringTag](){return`StyleSheetList`}},StyleSheet=class{[Ln];[L];[Mt];[zr];[sn];constructor(e,t,n,r){this[Ln]=e,this[L]=new MediaList(t,this),this[Mt]=!1,this[zr]=n,this[sn]=r}_changed(){}get type(){return`text/css`}get href(){return this[sn]}get ownerNode(){return this[Ln]}get parentStyleSheet(){return null}get title(){let e=this[Ln],t=e===null?this[zr]:e.getAttribute(`title`);return t===``?null:t}get media(){return this[L]}set media(e){this[L].mediaText=String(e)}get disabled(){return this[Mt]}set disabled(e){let t=!!e;t!==this[Mt]&&(this[Mt]=t,this._changed())}};function syntaxError(e,t,n){return new DOMException(`Failed to execute '${e}' on '${t}': Failed to parse the rule '${n}'.`,`SyntaxError`)}var pl=class CSSStyleSheet extends StyleSheet{[H];[wn];[Ft];[ut];[Nt];[Rn];[Nn];[Et];[q];[nr];constructor(e){let t=e?.media;super(null,t===void 0?``:typeof t==`string`?t:t.mediaText,null,null),this[H]=[],this[wn]=null,this[Ft]=null,this[ut]=!0,this[Nt]=!1,this[Rn]=null,this[Nn]=null,this[Et]=void 0,this[q]=0,this[nr]=0,e?.disabled&&(this[Mt]=!0),this[Ft]=currentWindowOrNull()?.document??null,e?.baseURL!==void 0&&(this[sn]=null)}static _forOwner(e,t,n,r){let i=new CSSStyleSheet;return i[ut]=!1,i[Ln]=e,i[Ft]=e[M].doc,i[sn]=r,i[zr]=e.getAttribute(`title`),n!==``&&(i[L].mediaText=n),i._setText(t),i}_changed(){this[q]++,this[nr]=this[q];let e=this[Ft];e!==null&&e[Mr]++}_inserted(e,t){if(t!==this[H].length-1||!appendableRule(e))return this._changed();this[q]++;let n=this[Ft];n!==null&&n[Mr]++}_setText(e){for(let e of this[H])e[Dr]=null;this[H]=[],this[Nn]=null,this[Et]=void 0;let t=e===``?[]:parseStylesheet(e),n=!1;for(let e of t){let t=e.kind===2?e.name.toLowerCase():``;if(t===`import`&&this[ut]||(t===`import`||t===`namespace`)&&(n&&t===`import`||n&&this[H].some(e=>!(e instanceof CSSImportRule)&&!(e instanceof CSSNamespaceRule)&&!(e instanceof CSSLayerStatementRule))))continue;let r=createRule(e,null,this,!1,!1);r!==null&&(r instanceof CSSImportRule||r instanceof CSSLayerStatementRule||r instanceof CSSNamespaceRule||(n=!0),r[Dr]=this,this[H].push(r),r instanceof CSSNamespaceRule&&this._registerNamespace(r))}this[wn]?._setRules(this[H]),this._changed()}_registerNamespace(e){e[qn]===``?this[Et]=e[Gr]===``?null:e[Gr]:(this[Nn]??=/* @__PURE__ */ new Map).set(e[qn],e[Gr]===``?null:e[Gr])}get parentStyleSheet(){return this[Rn]===null?null:this[Rn].parentStyleSheet}get ownerRule(){return this[Rn]}get cssRules(){return this[wn]??=new CSSRuleList(this[H])}get rules(){return this.cssRules}insertRule(e,t=0){if(arguments.length===0)throw TypeError(`Failed to execute 'insertRule' on 'CSSStyleSheet': 1 argument required, but only 0 present.`);if(this[Nt])throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Cannot modify a sheet while it is being replaced.`,`NotAllowedError`);let n=String(e),r=t>>>0;if(r>this[H].length)throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': The index provided (${r}) is larger than the maximum index (${this[H].length}).`,`IndexSizeError`);let i=parseRule(n);if(i===null||(i.kind===2?i.name.toLowerCase():``)===`import`&&this[ut])throw syntaxError(`insertRule`,`CSSStyleSheet`,n);let a=createRule(i,null,this,!1,!1);if(a===null)throw syntaxError(`insertRule`,`CSSStyleSheet`,n);if(a instanceof CSSImportRule)for(let e=0;e<r;e++){let t=this[H][e];if(!(t instanceof CSSImportRule)&&!(t instanceof CSSLayerStatementRule))throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': @import rules must precede all rules except @charset and @layer statements.`,`HierarchyRequestError`)}else if(!(a instanceof CSSNamespaceRule)&&!(a instanceof CSSLayerStatementRule)){for(let e=r;e<this[H].length;e++)if(this[H][e]instanceof CSSImportRule||this[H][e]instanceof CSSNamespaceRule)throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Rules cannot be inserted before @import or @namespace rules.`,`HierarchyRequestError`)}else if(a instanceof CSSNamespaceRule){for(let e of this[H])if(!(e instanceof CSSImportRule)&&!(e instanceof CSSNamespaceRule)&&!(e instanceof CSSLayerStatementRule))throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to insert a @namespace rule after other rules.`,`InvalidStateError`);this._registerNamespace(a)}return a[Dr]=this,this[H].splice(r,0,a),this[wn]?._sync(r),this._inserted(a,r),r}deleteRule(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteRule' on 'CSSStyleSheet': 1 argument required, but only 0 present.`);if(this[Nt])throw new DOMException(`Failed to execute 'deleteRule' on 'CSSStyleSheet': Cannot modify a sheet while it is being replaced.`,`NotAllowedError`);let t=e>>>0;if(t>=this[H].length)throw new DOMException(`Failed to execute 'deleteRule' on 'CSSStyleSheet': The index provided (${t}) is larger than the maximum index (${Math.max(0,this[H].length-1)}).`,`IndexSizeError`);let[n]=this[H].splice(t,1);n[Dr]=null,this[wn]?._sync(t),this._changed()}addRule(e=`undefined`,t=`undefined`,n){let r=String(e)+` { `+String(t)+` }`;return String(t)===``&&(r=String(e)+` { }`),this.insertRule(r,n===void 0?this[H].length:n),-1}removeRule(e=0){this.deleteRule(e)}replace(e){if(!this[ut]||this[Nt])return Promise.reject(new DOMException(`Failed to execute 'replace' on 'CSSStyleSheet': Can't call replace on non-constructed CSSStyleSheets.`,`NotAllowedError`));this[Nt]=!0;let t=String(e);return Promise.resolve().then(()=>(this._setText(t),this[Nt]=!1,this))}replaceSync(e){if(!this[ut]||this[Nt])throw new DOMException(`Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.`,`NotAllowedError`);this._setText(String(e))}get[Symbol.toStringTag](){return`CSSStyleSheet`}},ml=class CSSRule{[Dr];[V];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 MARGIN_RULE=9;static NAMESPACE_RULE=10;static COUNTER_STYLE_RULE=11;static SUPPORTS_RULE=12;static DOCUMENT_RULE=13;static FONT_FEATURE_VALUES_RULE=14;static VIEWPORT_RULE=15;static REGION_STYLE_RULE=16;constructor(){if(new.target===CSSRule)throw TypeError(`Illegal constructor`);this[Dr]=null,this[V]=null}get type(){return 0}get cssText(){return``}set cssText(e){}get parentRule(){return this[V]}get parentStyleSheet(){let e=this;for(;e[V]!==null;)e=e[V];return e[Dr]}_changed(){this.parentStyleSheet?._changed()}_declarationsChanged(){this._changed()}};for(let[e,t]of Object.entries({STYLE_RULE:1,CHARSET_RULE:2,IMPORT_RULE:3,MEDIA_RULE:4,FONT_FACE_RULE:5,PAGE_RULE:6,KEYFRAMES_RULE:7,KEYFRAME_RULE:8,MARGIN_RULE:9,NAMESPACE_RULE:10,COUNTER_STYLE_RULE:11,SUPPORTS_RULE:12,DOCUMENT_RULE:13,FONT_FEATURE_VALUES_RULE:14,VIEWPORT_RULE:15,REGION_STYLE_RULE:16}))Object.defineProperty(ml.prototype,e,{value:t,enumerable:!0});function indent(e){return` `+e.replace(/\n/g,`
7
+ `)})`)}startsWith(e){return this.src.startsWith(e,this.pos)}skipWs(){let e=this.pos;for(;this.pos<this.src.length&&isWs(this.src.charCodeAt(this.pos));)this.pos++;return this.pos>e}name(){let e=this.src,t=this.pos;for((t>=e.length||!isNameStartCode(e.charCodeAt(t)))&&this.fail(`expected a name`),this.pos++;this.pos<e.length&&isNameCode(e.charCodeAt(this.pos));)this.pos++;return e.slice(t,this.pos)}expect(e){this.startsWith(e)||this.fail(`expected "${e}"`),this.pos+=e.length}reference(){this.pos++;let e=this.src;if(e.charCodeAt(this.pos)===35){this.pos++;let t=!1;e.charCodeAt(this.pos)===120&&(t=!0,this.pos++);let n=this.pos;for(;this.pos<e.length&&e.charCodeAt(this.pos)!==59;)this.pos++;let r=e.slice(n,this.pos);r!==``&&(t?/^[0-9a-fA-F]+$/:/^[0-9]+$/).test(r)||this.fail(`invalid character reference`),this.expect(`;`);let i=parseInt(r,t?16:10);return i===9||i===10||i===13||i>=32&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111||this.fail(`character reference to an invalid character`),String.fromCodePoint(i)}let t=this.name();this.expect(`;`);let n=lo[t];if(n!==void 0)return n;let r=this.entities.get(t);if(r!==void 0)return r;this.fail(`undefined entity "${t}"`)}comment(e){this.pos+=4;let t=this.src.indexOf(`--`,this.pos);t<0&&this.fail(`unterminated comment`),this.src.charCodeAt(t+2)!==62&&(this.pos=t,this.fail(`"--" is not allowed in comments`));let n=this.src.slice(this.pos,t);checkChars(n,this),appendDetached(new Comment(n,this.doc)[M],e),this.pos=t+3}pi(e){this.pos+=2;let t=this.name();t.includes(`:`)&&this.fail(`processing instruction target contains a colon`);let n=``;if(this.startsWith(`?>`))this.pos+=2;else{this.skipWs()||this.fail(`expected whitespace after the processing instruction target`);let e=this.src.indexOf(`?>`,this.pos);e<0&&this.fail(`unterminated processing instruction`),n=this.src.slice(this.pos,e),this.pos=e+2}if(t.toLowerCase()===`xml`){if(e===null)return;this.fail(`XML declaration not at the start of the document`)}checkChars(n,this),e!==null&&appendDetached(new ProcessingInstruction(t,n,this.doc)[M],e)}quoted(){let e=this.src.charCodeAt(this.pos);e!==34&&e!==39&&this.fail(`expected a quoted string`);let t=this.src.indexOf(e===34?`"`:`'`,this.pos+1);t<0&&this.fail(`unterminated quoted string`);let n=this.src.slice(this.pos+1,t);return this.pos=t+1,n}doctype(e){this.pos+=9,this.skipWs()||this.fail(`expected whitespace after DOCTYPE`);let t=this.name(),n=``,r=``;this.skipWs(),this.startsWith(`PUBLIC`)?(this.pos+=6,this.skipWs(),n=this.quoted(),this.skipWs()||this.fail(`expected whitespace and a system literal after the public identifier`),r=this.quoted()):this.startsWith(`SYSTEM`)&&(this.pos+=6,this.skipWs(),r=this.quoted()),this.skipWs(),this.src.charCodeAt(this.pos)===91&&(this.internalSubset(),this.skipWs()),this.expect(`>`),appendDetached(new DocumentType(this.doc,t,n,r)[M],e)}internalSubset(){let e=this.src;for(this.pos++;this.pos<e.length;){if(e.charCodeAt(this.pos)===93){this.pos++;return}if(this.startsWith(`<!--`)){let t=e.indexOf(`-->`,this.pos+4);t<0&&this.fail(`unterminated comment`),this.pos=t+3}else if(this.startsWith(`<!ENTITY`)){this.pos+=8,this.skipWs();let t=!1;e.charCodeAt(this.pos)===37&&(t=!0,this.pos++,this.skipWs());let n=this.name();if(this.skipWs(),e.charCodeAt(this.pos)===34||e.charCodeAt(this.pos)===39){let e=this.quoted();t||this.entities.has(n)||e.includes(`<`)||e.includes(`&`)||this.entities.set(n,e)}this.skipToDeclEnd()}else if(this.startsWith(`<?`)){let t=e.indexOf(`?>`,this.pos);t<0&&this.fail(`unterminated processing instruction`),this.pos=t+2}else this.startsWith(`<!`)?(this.pos+=2,this.skipToDeclEnd()):this.pos++}this.fail(`unterminated DOCTYPE internal subset`)}skipToDeclEnd(){let e=this.src;for(;this.pos<e.length;){let t=e.charCodeAt(this.pos);if(t===34||t===39)this.quoted();else if(t===62){this.pos++;return}else this.pos++}this.fail(`unterminated markup declaration`)}lookup(e,t){let n=e.bindings.get(t);return n===void 0||n===``?null:n}element(e,t){let n=this.src;this.pos++;let r=this.name(),i=[],a=[],o=!1;for(;;){let e=this.skipWs();this.pos>=n.length&&this.fail(`unexpected end of input in a start tag`);let t=n.charCodeAt(this.pos);if(t===62){this.pos++;break}if(t===47){this.expect(`/>`),o=!0;break}e||this.fail(`expected whitespace between attributes`);let r=this.name();this.skipWs(),this.expect(`=`),this.skipWs();let s=this.attributeValue();i.includes(r)&&this.fail(`duplicate attribute "${r}"`),i.push(r),a.push(s)}let s=t;for(let e=0;e<i.length;e++){let n=i[e];if(n===`xmlns`||n.startsWith(`xmlns:`)){s===t&&(s={bindings:new Map(t.bindings)});let r=n===`xmlns`?``:n.slice(6),i=a[e];r===`xml`&&i!==`http://www.w3.org/XML/1998/namespace`&&this.fail(`the xml prefix cannot be rebound`),r===`xmlns`&&this.fail(`the xmlns prefix cannot be declared`),r!==``&&i===``&&this.fail(`empty namespace for prefix "${r}"`),(i===`http://www.w3.org/2000/xmlns/`||i===`http://www.w3.org/XML/1998/namespace`&&r!==`xml`)&&this.fail(`reserved namespace`),s.bindings.set(r,i)}}let c=r.indexOf(`:`),l=null,u=r,d;c>=0?(l=r.slice(0,c),u=r.slice(c+1),(l===``||u===``||u.includes(`:`))&&this.fail(`invalid qualified name "${r}"`),d=this.lookup(s,l),d===null&&this.fail(`unbound namespace prefix "${l}"`)):d=this.lookup(s,``);let m=createElementImpl(this.doc,u,d,l),h=/* @__PURE__ */ new Set;for(let e=0;e<i.length;e++){let t=i[e],n=t.indexOf(`:`),r=null,o=t,c=null;t===`xmlns`?c=ce:n>=0&&(r=t.slice(0,n),o=t.slice(n+1),(r===``||o===``||o.includes(`:`))&&this.fail(`invalid attribute name "${t}"`),r===`xmlns`?c=ce:r===`xml`?c=S:(c=this.lookup(s,r),c===null&&this.fail(`unbound namespace prefix "${r}"`)));let l=(c??``)+` `+o;h.has(l)&&this.fail(`duplicate attribute "${t}"`),h.add(l),appendAttributeDetached(m,o,a[e],c,r)}appendDetached(m,e),!o&&(this.content(m,s),this.expect(`</`),this.name()!==r&&this.fail(`mismatched end tag: expected "</${r}>"`),this.skipWs(),this.expect(`>`))}attributeValue(){let e=this.src,t=e.charCodeAt(this.pos);t!==34&&t!==39&&this.fail(`expected a quoted attribute value`),this.pos++;let n=``,r=this.pos;for(;;){this.pos>=e.length&&this.fail(`unterminated attribute value`);let i=e.charCodeAt(this.pos);if(i===t)break;i===60&&this.fail(`"<" is not allowed in attribute values`),i===38?(n+=e.slice(r,this.pos),n+=this.reference(),r=this.pos):((i===9||i===10||i===13)&&(n+=e.slice(r,this.pos)+` `,r=this.pos+1),this.pos++)}return n+=e.slice(r,this.pos),this.pos++,checkChars(n,this),n}content(e,t){let n=this.src,r=``;for(;;){this.pos>=n.length&&this.fail(`unexpected end of input: unclosed element`);let i=n.charCodeAt(this.pos);if(i===60){if(n.charCodeAt(this.pos+1)===47)break;if(this.flushText(e,r),r=``,this.startsWith(`<!--`))this.comment(e);else if(this.startsWith(`<![CDATA[`)){let t=n.indexOf(`]]>`,this.pos+9);t<0&&this.fail(`unterminated CDATA section`);let r=n.slice(this.pos+9,t);checkChars(r,this),appendDetached(new CDATASection(r,this.doc)[M],e),this.pos=t+3}else this.startsWith(`<?`)?this.pi(e):this.startsWith(`<!`)?this.fail(`unexpected markup declaration`):this.element(e,t);continue}if(i===38){r+=this.reference();continue}let a=this.pos;for(;this.pos<n.length;){let e=n.charCodeAt(this.pos);if(e===60||e===38)break;this.pos++}let o=n.slice(a,this.pos);o.includes(`]]>`)&&(this.pos=a+o.indexOf(`]]>`),this.fail(`"]]>" is not allowed in content`)),r+=o}this.flushText(e,r)}flushText(e,t){if(t===``)return;checkChars(t,this);let n=e.last;n!==null&&n.type===3?n.data+=t:appendDetached(new Text(t,this.doc)[M],e)}parseDocument(e){let t=this.src;t.charCodeAt(0)===65279&&(this.pos=1),this.startsWith(`<?xml`)&&isWs(t.charCodeAt(this.pos+5))&&this.pi(null);let n={bindings:/* @__PURE__ */ new Map([[`xml`,S]])},r=!1,i=!1;for(;this.skipWs(),!(this.pos>=t.length);)this.startsWith(`<!--`)?this.comment(e):this.startsWith(`<?`)?this.pi(e):this.startsWith(`<!DOCTYPE`)?((i||r)&&this.fail(`unexpected DOCTYPE`),i=!0,this.doctype(e)):t.charCodeAt(this.pos)===60&&this.pos+1<t.length&&isNameStartCode(t.charCodeAt(this.pos+1))?(r&&this.fail(`junk after document element`),r=!0,this.element(e,n)):r?this.fail(`junk after document element`):this.fail(t.charCodeAt(this.pos)===60?`not well-formed`:`text outside of the document element`);r||this.fail(`no root element found`)}parseFragment(e,t){this.src+=`</`,this.content(e,t),this.pos!==this.src.length-2&&this.fail(`not well-formed`)}};function parseXML(e,t,n){let r=new DocumentFragment(t)[M];try{new XMLParser(String(e).toWellFormed(),t).parseDocument(r)}catch(e){if(!(e instanceof XMLParseError))throw e;let n=createElementImpl(t,`parsererror`,`http://www.mozilla.org/newlayout/xml/parsererror.xml`,null);appendDetached(new Text(e.message,t)[M],n),append(n,t[M]);return}append(r,t[M])}function parseXMLFragment(e,t){let n=t.doc,r=new DocumentFragment(n)[M],i=/* @__PURE__ */ new Map([[`xml`,S]]),a=[];for(let e=t;e!==null;e=e.parent)e.type===1&&a.push(e);for(let e=a.length-1;e>=0;e--){let t=a[e];t.prefix!==null&&t.ns!==null&&i.set(t.prefix,t.ns);let n=t.attrs;if(n!==null)for(let e of n)e.ns===`http://www.w3.org/2000/xmlns/`&&i.set(e.prefix===null?``:e.localName,e.value)}i.set(``,t.type===1?t.ns??``:ie);try{new XMLParser(String(e),n).parseFragment(r,{bindings:i})}catch(e){throw e instanceof XMLParseError?new DOMException(`The provided markup is not well-formed XML: ${e.message}.`,`SyntaxError`):e}return r}var DomSink=class extends TreeSink{nodes;hooked;modeTarget;otherNs;constructor(){super(),this.nodes=[],this.hooked=[],this.modeTarget=null,this.otherNs=null}begin(e){this.nodes.length=0,this.hooked.length=0,this.modeTarget=e,this.otherNs=null}finish(){let e=this.hooked;for(let t=0;t<e.length;t++)e[t].node._childrenChangedSteps();e.length=0,this.nodes.length=0,this.modeTarget=null}register(e){let t=this.nodes;return t.push(e),t.length-1}parentOf(e,t){return e>=0?this.nodes[e]:this.nodes[t].parent}createElement(e,t,n,r,i,a,o,s,c){let l=this.parentOf(n,r).doc,u=createElementImpl(l,e,t===0?ie:t===1?ae:t===2?oe:this.otherNs,null);if(c)for(let e=0;e<s;e++){let t=o[e];t===0?appendAttributeDetached(u,i[e],a[e],null,null):t===1?appendAttributeDetached(u,i[e],a[e],se,`xlink`):t===2?appendAttributeDetached(u,i[e],a[e],S,`xml`):t===3&&appendAttributeDetached(u,i[e],a[e],ce,i[e]===`xmlns`?null:`xmlns`)}else for(let e=0;e<s;e++)appendAttributeDetached(u,i[e],a[e],null,null);return Pi&&t===0&&ceParserCreated(u),u.flags&16&&this.hooked.push(u),this.register(u)}insert(e,t,n){let r=this.nodes[n],i=this.parentOf(e,t);r.parent!==null&&remove(r,!0),r.doc!==i.doc&&adopt(r,i.doc),t<0?appendDetached(r,i):insertDetached(r,i,this.nodes[t])}insertText(e,t,n){let r=this.parentOf(e,t),i=t>=0?this.nodes[t]:null,a=i===null?r.last:i.prev;if(a!==null&&a.type===3){a.data+=n;return}let o=new Text(n,r.doc)[M];i===null?appendDetached(o,r):insertDetached(o,r,i)}insertComment(e,t,n){let r=this.parentOf(e,t),i=new Comment(n,r.doc)[M];t<0?appendDetached(i,r):insertDetached(i,r,this.nodes[t])}insertProcessingInstruction(e,t,n,r){let i=this.parentOf(e,t),a=new ProcessingInstruction(n,r,i.doc)[M];t<0?appendDetached(a,i):insertDetached(a,i,this.nodes[t])}insertDoctype(e,t,n,r){let i=this.nodes[e];for(let e=i.first;e!==null;e=e.next)if(e.type===1||e.type===10)return;appendDetached(new DocumentType(i.doc,t,n,r)[M],i)}remove(e){let t=this.nodes[e];t.parent!==null&&remove(t,!0)}hasParent(e){return this.nodes[e].parent!==null}reparentChildren(e,t){let n=this.nodes[e],r=this.nodes[t];for(let e=n.first;e!==null;e=n.first)remove(e,!0),appendDetached(e,r)}addMissingAttributes(e,t,n,r){let i=this.nodes[e];if(i.type===1)for(let e=0;e<r;e++)findAttributeByName(i,t[e])===null&&appendAttributeDetached(i,t[e],n[e],null,null)}templateContents(e){let t=this.nodes[e].node.content;return t==null?e:this.register(t[M])}attachDeclarativeShadowRoot(e,t,n,r,i,a){let o=this.nodes[e].node;if(o[U]!=null)return-1;try{let e=attachShadowRoot(o,t===`closed`?`closed`:`open`,a,r,n,i===`manual`?`manual`:`named`);return e[Tt]=!0,e[He]=!0,this.register(e[M])}catch{return-1}}associateForm(e,t){let n=this.nodes[e].node;typeof n._parserAssociateForm==`function`&&n._parserAssociateForm(this.nodes[t].node)}setDocumentMode(e){let t=this.modeTarget;t!==null&&(t[Mn]=e===1?`quirks`:e===2?`limited-quirks`:`no-quirks`)}};let uo=null,fo=!1;function acquire(){return fo?new TreeBuilder(new DomSink):(fo=!0,uo??=new TreeBuilder(new DomSink))}function release(e){e===uo&&(fo=!1)}const po=new ParseOptions,mo=new ParseOptions;function toOptions(e){if(e===void 0)return po;let t=mo;return t.scripting=e.scripting===!0,t.allowDeclarativeShadowRoots=e.allowDeclarativeShadowRoots===!0,t.processingInstructions=e.processingInstructions===!0,t.iframeSrcdoc=!1,t}function nsCode(e){return e===`http://www.w3.org/1999/xhtml`?0:e===`http://www.w3.org/2000/svg`?1:e===`http://www.w3.org/1998/Math/MathML`?2:3}function parseFragment(e,t,n){let r=t.doc;if(!r[N])return parseXMLFragment(e,t);let i=new DocumentFragment(r)[M],a=acquire(),o=a.sink;try{o.begin(null);let s=o.register(i),c=o.register(t),l=nsCode(t.ns);l===3&&(o.otherNs=t.ns);let u=-1;for(let e=t;e!==null;e=e.parent)if(e.type===1&&e.tag===Y.form&&e.ns===`http://www.w3.org/1999/xhtml`){u=o.register(e);break}let d=r[Mn]===`quirks`?1:r[Mn]===`limited-quirks`?2:0,m=l===2?attr(t,`encoding`)??``:``;a.parseFragment(e,s,c,t.name,l,m,u,d,toOptions(n)),o.finish()}finally{o.nodes.length=0,release(a)}return i}function parseDocument(e,t,n){let r=new DocumentFragment(t)[M],i=acquire(),a=i.sink;try{a.begin(t),t[Mn]=`no-quirks`;let o=a.register(r);i.parseDocument(e,o,toOptions(n)),a.finish()}finally{a.nodes.length=0,release(i)}append(r,t[M])}function setHTMLUnsafe(e,t){let n=e;if(e.type!==1){let t=e.node[j];if(t===null)throw TypeError(`setHTMLUnsafe: no context element`);n=t[M]}let r=parseFragment(t,n,{allowDeclarativeShadowRoots:!0}),i=e;if(e.type===1&&e.tag===Y.template&&e.ns===`http://www.w3.org/1999/xhtml`){let t=e.node.content;t!==void 0&&(i=t[M])}i.node._replaceAll(r.node)}function parseHTMLUnsafe(e,t){parseDocument(e,t,{allowDeclarativeShadowRoots:!0})}function isVoidTag(e){switch(e){case Y.area:case Y.base:case Y.basefont:case Y.bgsound:case Y.br:case Y.col:case Y.embed:case Y.frame:case Y.hr:case Y.img:case Y.input:case Y.keygen:case Y.link:case Y.meta:case Y.param:case Y.source:case Y.track:case Y.wbr:return!0}return!1}function isRawTextTag(e){switch(e){case Y.style:case Y.script:case Y.xmp:case Y.iframe:case Y.noembed:case Y.noframes:case Y.plaintext:return!0}return!1}function escapeText(e){let t=e.length,n=0;for(;n<t;n++){let t=e.charCodeAt(n);if(t===38||t===60||t===62||t===160)break}if(n===t)return e;let r=e.slice(0,n),i=n;for(;n<t;n++){let t=e.charCodeAt(n),a=``;if(t===38)a=`&amp;`;else if(t===60)a=`&lt;`;else if(t===62)a=`&gt;`;else if(t===160)a=`&nbsp;`;else continue;r+=e.slice(i,n)+a,i=n+1}return r+e.slice(i)}function escapeAttribute(e){let t=e.length,n=0;for(;n<t;n++){let t=e.charCodeAt(n);if(t===38||t===34||t===60||t===62||t===160)break}if(n===t)return e;let r=e.slice(0,n),i=n;for(;n<t;n++){let t=e.charCodeAt(n),a=``;if(t===38)a=`&amp;`;else if(t===34)a=`&quot;`;else if(t===60)a=`&lt;`;else if(t===62)a=`&gt;`;else if(t===160)a=`&nbsp;`;else continue;r+=e.slice(i,n)+a,i=n+1}return r+e.slice(i)}function serializedAttrName(e,t,n){return e===null?n:e===`http://www.w3.org/XML/1998/namespace`?`xml:`+n:e===`http://www.w3.org/2000/xmlns/`?n===`xmlns`?`xmlns`:`xmlns:`+n:e===`http://www.w3.org/1999/xlink`?`xlink:`+n:t}function templateContentsOf(e){let t=e.node.content;return t==null?e:t[M]}let ho=``,_o=!1,vo=null;function htmlChildren(e){if(e.type===1){if(e.ns===`http://www.w3.org/1999/xhtml`&&isVoidTag(e.tag))return;(_o||vo!==null)&&htmlShadowRoot(e),e.tag===Y.template&&e.ns===`http://www.w3.org/1999/xhtml`&&(e=templateContentsOf(e))}for(let t=e.first;t!==null;t=t.next)switch(t.type){case 1:htmlElement(t);break;case 3:case 4:{let e=t.parent;e!==null&&e.type===1&&e.ns===`http://www.w3.org/1999/xhtml`&&isRawTextTag(e.tag)?ho+=t.data:ho+=escapeText(t.data);break}case 8:ho+=`<!--`+t.data+`-->`;break;case 7:ho+=`<?`+t.name+` `+t.data+`?>`;break;case 10:ho+=`<!DOCTYPE `+t.name+`>`}}function htmlElement(e){let t=e.ns,n=t===`http://www.w3.org/1999/xhtml`||t===`http://www.w3.org/2000/svg`||t===`http://www.w3.org/1998/Math/MathML`||e.prefix===null?e.name:e.prefix+`:`+e.name,r=`<`+n,i=e.attrs;if(i!==null)for(let e=0;e<i.length;e++){let t=i[e];r+=` `+(t.ns===null?t.localName:serializedAttrName(t.ns,t.name,t.localName))+`="`+escapeAttribute(t.value)+`"`}ho+=r+`>`,!(t===`http://www.w3.org/1999/xhtml`&&isVoidTag(e.tag))&&(htmlChildren(e),ho+=`</`+n+`>`)}function htmlShadowRoot(e){let t=e.node[U];if(t==null||!(_o&&t[Tr]||vo!==null&&vo.includes(t)))return;let n=`<template shadowrootmode="`+(t[Mn]===`open`?`open`:`closed`)+`"`;t[Ot]&&(n+=` shadowrootdelegatesfocus=""`),t[Tr]&&(n+=` shadowrootserializable=""`),t[jr]===`manual`&&(n+=` shadowrootslotassignment="manual"`),t[at]&&(n+=` shadowrootclonable=""`),ho+=n+`>`,htmlChildren(t[M]),ho+=`</template>`}function runHtml(e,t,n,r){let i=ho,a=_o,o=vo;ho=``,_o=t,vo=n;try{if(r)switch(e.type){case 1:htmlElement(e);break;case 9:case 11:htmlChildren(e);break;default:{let t=e.parent;e.type===3||e.type===4?ho=t!==null&&t.type===1&&t.ns===`http://www.w3.org/1999/xhtml`&&isRawTextTag(t.tag)?e.data:escapeText(e.data):e.type===8?ho=`<!--`+e.data+`-->`:e.type===7?ho=`<?`+e.name+` `+e.data+`?>`:e.type===10&&(ho=`<!DOCTYPE `+e.name+`>`)}}else htmlChildren(e);return ho}finally{ho=i,_o=a,vo=o}}function inHTMLDocument(e){return e.doc[N]}function serializeChildren(e){if(inHTMLDocument(e))return runHtml(e,!1,null,!1);let t=``,n=e;e.type===1&&e.tag===Y.template&&e.ns===`http://www.w3.org/1999/xhtml`&&(n=templateContentsOf(e));for(let e=n.first;e!==null;e=e.next)t+=serializeXML(e,!0);return t}function serializeNode(e){return inHTMLDocument(e)?runHtml(e,!1,null,!0):serializeXML(e,!0)}function getHTML(e,t){let n=t?.serializableShadowRoots===!0,r=t?.shadowRoots;return runHtml(e,n,r!==void 0&&r.length!==0?r:null,!1)}var XmlError=class extends Error{};function invalid(e){throw new XmlError(e)}function copyMap(e){let t=/* @__PURE__ */ new Map;for(let[n,r]of e)t.set(n,r.slice());return t}function preferredPrefix(e,t,n){let r=e.get(n);if(r===void 0||r.length===0)return null;for(let e=0;e<r.length;e++)if(r[e]===t)return r[e];return r[r.length-1]}function prefixFound(e,t,n){let r=e.get(n);return r!==void 0&&r.includes(t)}function addPrefix(e,t,n){let r=e.get(n);r===void 0?e.set(n,[t]):r.push(t)}var PrefixIndex=class{value=1};function generatePrefix(e,t,n){let r=`ns`+String(n.value++);return addPrefix(e,r,t),r}function hasInvalidXmlChars(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==9&&n!==10&&n!==13){if(n<32||n===65534||n===65535)return!0;if(n>=55296&&n<=56319){let n=t+1<e.length?e.charCodeAt(t+1):0;if(n<56320||n>57343)return!0;t++}else if(n>=56320&&n<=57343)return!0}}return!1}function isNameStart(e){return e>=97&&e<=122||e>=65&&e<=90||e===58||e===95||e>=192&&e!==215&&e!==247}function isXmlName(e){if(e.length===0||!isNameStart(e.charCodeAt(0)))return!1;for(let t=1;t<e.length;t++){let n=e.charCodeAt(t);if(!(isNameStart(n)||n>=48&&n<=57||n===45||n===46||n===183))return!1}return!0}function escapeXmlText(e){let t=``,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r),a=``;if(i===38)a=`&amp;`;else if(i===60)a=`&lt;`;else if(i===62)a=`&gt;`;else continue;t+=e.slice(n,r)+a,n=r+1}return n===0?e:t+e.slice(n)}function serializeAttrValue(e,t){if(e===null)return``;t&&hasInvalidXmlChars(e)&&invalid(`attribute value contains invalid characters`);let n=``,r=0;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t),a=``;if(i===38)a=`&amp;`;else if(i===34)a=`&quot;`;else if(i===60)a=`&lt;`;else if(i===62)a=`&gt;`;else if(i===9)a=`&#x9;`;else if(i===10)a=`&#xA;`;else if(i===13)a=`&#xD;`;else continue;n+=e.slice(r,t)+a,r=t+1}return r===0?e:n+e.slice(r)}function prefixBound(e,t){for(let n of e.values())if(n.includes(t))return!0;return!1}const yo=/* @__PURE__ */ new Set([`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`]);function recordNamespaceInformation(e,t,n){let r=null,i=e.attrs;if(i===null)return null;for(let e=0;e<i.length;e++){let a=i[e];if(a.ns!==`http://www.w3.org/2000/xmlns/`)continue;if(a.prefix===null){r=a.value;continue}let o=a.localName,s=a.value;s!==`http://www.w3.org/XML/1998/namespace`&&(s===``&&(s=null),!prefixFound(t,o,s)&&(addPrefix(t,o,s),n.set(o,s??``)))}return r}function serializeAttributes(e,t,n,r,i,a){let o=``,s=e.attrs;if(s===null)return o;let c=a?/* @__PURE__ */ new Set:null;for(let e=0;e<s.length;e++){let l=s[e];if(c!==null){let e=(l.ns??``)+`\0`+l.localName;c.has(e)&&invalid(`duplicate attribute`),c.add(e)}let u=l.ns;if(u===null&&l.localName===`xmlns`){a&&invalid(`invalid attribute name`);continue}let d=null;if(u!==null){if(d=preferredPrefix(t,l.prefix,u),u===`http://www.w3.org/2000/xmlns/`){if(l.value===`http://www.w3.org/XML/1998/namespace`||l.prefix===null&&i||l.prefix!==null&&(!r.has(l.localName)||r.get(l.localName)!==l.value))continue;a&&l.value===`http://www.w3.org/2000/xmlns/`&&invalid(`xmlns namespace declared as a value`),a&&l.value===``&&invalid(`empty namespace declaration`),l.prefix===`xmlns`&&(d=`xmlns`)}else d===null&&(u===`http://www.w3.org/1999/xlink`&&l.prefix!==null&&!r.has(l.prefix)&&!prefixBound(t,l.prefix)?(d=l.prefix,addPrefix(t,d,u)):d=generatePrefix(t,u,n),o+=` xmlns:`+d+`="`+serializeAttrValue(u,a)+`"`)}o+=` `,d!==null&&(o+=d+`:`),a&&(l.localName.includes(`:`)||!isXmlName(l.localName)||l.localName===`xmlns`&&u===null)&&invalid(`invalid attribute name`),o+=l.localName+`="`+serializeAttrValue(l.value,a)+`"`}return o}function serializeElementXML(e,t,n,r,i){let a=e.name;i&&(a.includes(`:`)||!isXmlName(a))&&invalid(`invalid element name`);let o=`<`,s=``,c=!1,l=!1;n=copyMap(n);let u=/* @__PURE__ */ new Map,d=recordNamespaceInformation(e,n,u),m=t,h=e.ns;if(m===h)d!==null&&(l=!0),s=h===`http://www.w3.org/XML/1998/namespace`?`xml:`+a:a,o+=s;else{let t=e.prefix,c=preferredPrefix(n,t,h);t===`xmlns`&&(i&&invalid(`element prefix xmlns`),c=t),c===null?t===null?d===null||d!==h?(l=!0,s=a,m=h,o+=s+` xmlns="`+serializeAttrValue(h,i)+`"`):(s=a,m=h,o+=s):(u.has(t)?t=generatePrefix(n,h,r):addPrefix(n,t,h),s=t+`:`+a,o+=s+` xmlns:`+t+`="`+serializeAttrValue(h,i)+`"`,d!==null&&(m=d===``?null:d)):(s=c+`:`+a,d!==null&&d!==`http://www.w3.org/XML/1998/namespace`&&(m=d===``?null:d),o+=s)}o+=serializeAttributes(e,n,r,u,l,i);let _=h===`http://www.w3.org/1999/xhtml`&&a===`template`?templateContentsOf(e):e;if(h===`http://www.w3.org/1999/xhtml`&&_.first===null&&yo.has(a)?(o+=` /`,c=!0):h!==`http://www.w3.org/1999/xhtml`&&_.first===null&&(o+=`/`,c=!0),o+=`>`,c)return o;for(let e=_.first;e!==null;e=e.next)o+=xmlNode(e,m,n,r,i);return o+`</`+s+`>`}function xmlNode(e,t,n,r,i){switch(e.type){case 1:return serializeElementXML(e,t,n,r,i);case 9:{if(i){let t=!1;for(let n=e.first;n!==null;n=n.next)n.type===1&&(t=!0);t||invalid(`document without a document element`)}let a=``;for(let o=e.first;o!==null;o=o.next)a+=xmlNode(o,t,n,r,i);return a}case 11:{let a=``;for(let o=e.first;o!==null;o=o.next)a+=xmlNode(o,t,n,r,i);return a}case 8:{let t=e.data;return i&&(hasInvalidXmlChars(t)||t.includes(`--`)||t.endsWith(`-`))&&invalid(`invalid comment`),`<!--`+t+`-->`}case 3:{let t=e.data;return i&&hasInvalidXmlChars(t)&&invalid(`invalid text`),escapeXmlText(t)}case 4:return`<![CDATA[`+e.data+`]]>`;case 10:{let t=e.node;i&&(hasInvalidXmlChars(t.publicId)&&invalid(`invalid doctype public id`),(hasInvalidXmlChars(t.systemId)||t.systemId.includes(`"`)&&t.systemId.includes(`'`))&&invalid(`invalid doctype system id`));let n=`<!DOCTYPE `+e.name;return t.publicId!==``&&(n+=` PUBLIC "`+t.publicId+`"`),t.systemId!==``&&t.publicId===``&&(n+=` SYSTEM`),t.systemId!==``&&(n+=` "`+t.systemId+`"`),n+`>`}case 7:return i&&(e.name.includes(`:`)||e.name.toLowerCase()===`xml`||hasInvalidXmlChars(e.data)||e.data.includes(`?>`))&&invalid(`invalid processing instruction`),`<?`+e.name+` `+e.data+`?>`}return``}function serializeXML(e,t){let n=/* @__PURE__ */ new Map;n.set(S,[`xml`]);try{return xmlNode(e,null,n,new PrefixIndex,t)}catch(e){throw e instanceof XmlError?new DOMException(`The node could not be serialized as XML: ${e.message}.`,`InvalidStateError`):e}}let bo=null;function setShadowHostCustomStateCheck(e){bo=e}var ShadowRoot=class extends DocumentFragment{[Mn];[Ot];[jr];[at];[Tr];[Tt];[He];constructor(e,t,n,r,i,a,o){if(arguments.length<3)throw TypeError(`Illegal constructor`);super(e);let s=this[M];s.flags|=32,t[M].flags&1&&(s.flags|=1),this[j]=t,this[Mn]=n,this[Ot]=r,this[jr]=i,this[at]=a,this[Tr]=o,this[Tt]=!1,this[He]=bo!==null&&bo(t)}get mode(){return this[Mn]}get host(){return this[j]}get delegatesFocus(){return this[Ot]}get slotAssignment(){return this[jr]}get clonable(){return this[at]}get serializable(){return this[Tr]}get innerHTML(){return serializeChildren(this[M])}set innerHTML(e){let t=parseFragment(e===null?``:String(e),this[j][M]);this._replaceAll(t.node)}getHTML(e){return getHTML(this[M],e)}setHTMLUnsafe(e){setHTMLUnsafe(this[M],String(e))}get activeElement(){let e=this[M],t=e.doc[A];for(;t!==null;){let n=treeRoot(t);if(n===e)return t.node;if(!(n.flags&32))return null;let r=n.node[j];t=r===null?null:r[M]}return null}elementFromPoint(e,t){return null}elementsFromPoint(e,t){return[]}};Object.defineProperty(ShadowRoot.prototype,Symbol.toStringTag,{value:`ShadowRoot`,configurable:!0});const xo=[];function orderedSet(e){let t=e.length;if(t<2)return e;for(let n=1;n<t;n++){let t=e[n];for(let r=0;r<n;r++)if(e[r]===t){let t=[];for(let n of e)t.includes(n)||t.push(n);return t}}return e}function validateToken(e){if(e===``)throw new DOMException(`The token provided must not be empty.`,`SyntaxError`);for(let t=0;t<e.length;t++)if(isAsciiWhitespace(e.charCodeAt(t)))throw new DOMException(`The token provided ('${e}') contains HTML space characters, which are not valid in tokens.`,`InvalidCharacterError`)}let So=null;var Co=class DOMTokenList{#e;#t;#n;#r;#i;constructor(e,t,n=null){this.#e=e,this.#t=t,this.#n=n,this.#r=null,this.#i=xo,So===null&&(So=indexGetterTable(DOMTokenList.prototype,(e,t)=>e.item(t)??void 0,16))}#a(){let e=this.#e;if(this.#t===`class`){let t=classTokens(e);return t!==this.#r&&(this.#r=t,this.#i=orderedSet(t)),this.#i}let t=attr(e,this.#t);return t!==this.#r&&(this.#r=t,this.#i=t===null||t===``?xo:orderedSet(splitOnAsciiWhitespace(t))),this.#i}#o(e){let t=this.#e;(e.length!==0||attr(t,this.#t)!==null)&&setAttribute(t,this.#t,e.join(` `))}get length(){let e=this.#a().length;return e>So.count&&ensureIndexGetters(So,e),e}item(e){let t=this.#a(),n=Number(e)>>>0;return n<t.length?t[n]:null}contains(e){return this.#a().includes(String(e))}add(...e){let t=e.map(String);for(let e of t)validateToken(e);let n=this.#a().slice();for(let e of t)n.includes(e)||n.push(e);this.#o(n)}remove(...e){let t=e.map(String);for(let e of t)validateToken(e);let n=this.#a().filter(e=>!t.includes(e));this.#o(n)}toggle(e,t){let n=String(e);validateToken(n);let r=this.#a();return r.includes(n)?t===void 0||!t?(this.#o(r.filter(e=>e!==n)),!1):!0:t===void 0||t?(this.#o([...r,n]),!0):!1}replace(e,t){let n=String(e),r=String(t);if(n===``||r===``)throw new DOMException(`The token provided must not be empty.`,`SyntaxError`);validateToken(n),validateToken(r);let i=this.#a();if(!i.includes(n))return!1;let a=[],o=!1;for(let e of i)e===n||e===r?o||=(a.push(r),!0):a.push(e);return this.#o(a),!0}supports(e){let t=this.#n;if(t===null)throw TypeError(`'${this.#t}' attribute has no supported tokens`);return t.includes(String(e).toLowerCase())}get value(){return attr(this.#e,this.#t)??``}set value(e){setAttribute(this.#e,this.#t,String(e))}toString(){return this.value}_clear(){removeAttribute(this.#e,this.#t)}};Object.defineProperties(Co.prototype,{forEach:{value:Array.prototype.forEach,writable:!0,enumerable:!0,configurable:!0},entries:{value:Array.prototype.entries,writable:!0,enumerable:!0,configurable:!0},keys:{value:Array.prototype.keys,writable:!0,enumerable:!0,configurable:!0},values:{value:Array.prototype.values,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Array.prototype.values,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`DOMTokenList`,configurable:!0}});function toAttributeName(e){let t=`data-`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[n]}return t}function toPropertyName(e){if(!e.startsWith(`data-`))return null;let t=``;for(let n=5;n<e.length;n++){let r=e.charCodeAt(n);if(r>=65&&r<=90)return null;if(r===45&&n+1<e.length){let r=e.charCodeAt(n+1);if(r>=97&&r<=122){t+=String.fromCharCode(r-32),n++;continue}}t+=e[n]}return t}function getNamed(e,t){let n=e.attrs;if(n!==null)for(let e=0;e<n.length;e++){let r=n[e];if(r.ns===null&&toPropertyName(r.localName)===t)return r.value}}function supportedNames$1(e){let t=[],n=e.attrs;if(n===null)return t;for(let e=0;e<n.length;e++){let r=n[e];if(r.ns!==null)continue;let i=toPropertyName(r.localName);i!==null&&t.push(i)}return t}__name(supportedNames$1,`supportedNames`);function setNamed(e,t,n){for(let e=0;e<t.length-1;e++){let n=t.charCodeAt(e+1);if(t.charCodeAt(e)===45&&n>=97&&n<=122)throw new DOMException(`'${t}' is not a valid property name.`,`SyntaxError`)}let r=toAttributeName(t);if(!isValidAttributeLocalName(r))throw new DOMException(`'${r}' is not a valid attribute name.`,`InvalidCharacterError`);setAttribute(e,r,n)}function deleteNamed(e,t){let n=findAttributeByNamespace(e,null,toAttributeName(t));n!==null&&removeAttributeRecord(e,n)}const wo=Symbol(`DOMStringMap owner`),To={get(e,t,n){if(typeof t==`string`){let n=getNamed(e[wo],t);if(n!==void 0)return n}else if(t===wo)return;return Reflect.get(e,t,n)},set(e,t,n,r){return typeof t==`string`?(setNamed(e[wo],t,String(n)),!0):t!==wo&&Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&getNamed(e[wo],t)!==void 0||t!==wo&&Reflect.has(e,t)},deleteProperty(e,t){return typeof t==`string`?(deleteNamed(e[wo],t),!0):t===wo||Reflect.deleteProperty(e,t)},ownKeys(e){let t=supportedNames$1(e[wo]);for(let n of Reflect.ownKeys(e))n!==wo&&!t.includes(n)&&t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`){let n=getNamed(e[wo],t);if(n!==void 0)return{value:n,writable:!0,enumerable:!0,configurable:!0}}else if(t===wo)return;return Reflect.getOwnPropertyDescriptor(e,t)},defineProperty(e,t,n){return typeof t==`string`?n.get!==void 0||n.set!==void 0?!1:(setNamed(e[wo],t,String(n.value)),!0):t!==wo&&Reflect.defineProperty(e,t,n)}};function createDOMStringMap(e){let t=Object.create(DOMStringMap.prototype);return t[wo]=e,new Proxy(t,To)}var DOMStringMap=class{constructor(e){return createDOMStringMap(e)}};Object.defineProperty(DOMStringMap.prototype,Symbol.toStringTag,{value:`DOMStringMap`,configurable:!0});var Attr=class extends Node{[ar];[z];constructor(e,t,n,r,i,a,o=null){super(2,e);let s=this[M];s.name=t,s.data=n,s.ns=r,s.prefix=i,this[z]=a,this[ar]=o}get namespaceURI(){return this[M].ns}get prefix(){return this[M].prefix}get localName(){return this[M].name}get name(){let e=this[M];return e.prefix===null?e.name:e.prefix+`:`+e.name}get value(){return attrValue(this)}set value(e){setAttrValue(this,String(e))}get ownerElement(){return this[z]}get specified(){return!0}_attach(e,t){this[z]=e,this[ar]=t,this[M].doc=e[M].doc}_detach(){let e=this[ar];e!==null&&(this[M].data=e.value),this[z]=null,this[ar]=null}};function attrNode(e,t){let n=t.attr;return n===null&&(n=new Attr(e.doc,t.localName,t.value,t.ns,t.prefix,e.node,t),t.attr=n),n}function setAttributeNode(e,t){let n=t[z];if(n!==null&&n[M]!==e)throw new DOMException(`The attribute is in use by another element.`,`InUseAttributeError`);let r=t[M],i=findAttributeByNamespace(e,r.ns,r.name);if(i!==null&&i.attr===t)return t;let a=new AttrRecord(r.name,t.value,r.ns,r.prefix);if(a.attr=t,i!==null){let n=attrNode(e,i),r=e.attrs;return r[r.indexOf(i)]=a,t._attach(e.node,a),n._detach(),handleAttributeChanges(e,a,i.value,a.value),n}return t._attach(e.node,a),appendAttribute(e,a),null}function removeAttributeNode(e,t){let n=t[ar],r=e.attrs;if(n===null||r===null||!r.includes(n))throw new DOMException(`The attribute is not an attribute of this element.`,`NotFoundError`);return removeAttributeRecord(e,n),t}let Eo=null;const Do=Symbol(`NamedNodeMap.element`),isArrayIndex=e=>/^(?:0|[1-9]\d*)$/.test(e)&&Number(e)<4294967295;function namedAttribute(e,t){let n=e[Do];return n.flags&2&&/[A-Z]/.test(t)?null:findAttributeByName(n,t)}function named(e,t){return typeof t==`string`&&!(t in e)&&!isArrayIndex(t)?namedAttribute(e,t):null}const Oo={get(e,t){if(typeof t==`symbol`||t in e)return e[t];let n=isArrayIndex(t)?null:namedAttribute(e,t);return n===null?void 0:attrNode(e[Do],n)},has(e,t){return t in e||named(e,t)!==null},getOwnPropertyDescriptor(e,t){let n=named(e,t);return n===null?t===Do?void 0:Reflect.getOwnPropertyDescriptor(e,t):{value:attrNode(e[Do],n),writable:!1,enumerable:!1,configurable:!0}},ownKeys(e){let t=Reflect.ownKeys(e).filter(e=>e!==Do),n=e[Do].attrs;if(n!==null)for(let r=0;r<n.length;r++){let i=n[r].name;!t.includes(i)&&named(e,i)!==null&&t.push(i)}return t}};function byName(e,t){let n=String(t);return findAttributeByName(e,e.flags&2?asciiLowercase$1(n):n)}var ko=class NamedNodeMap{constructor(e){return Object.defineProperty(this,Do,{value:e,configurable:!0}),Eo===null&&(Eo=indexGetterTable(NamedNodeMap.prototype,(e,t)=>e.item(t)??void 0,16)),new Proxy(this,Oo)}get length(){let e=this[Do].attrs,t=e===null?0:e.length;return t>Eo.count&&ensureIndexGetters(Eo,t),t}item(e){let t=this[Do],n=t.attrs,r=Number(e)>>>0;return n===null||r>=n.length?null:attrNode(t,n[r])}getNamedItem(e){let t=byName(this[Do],e);return t===null?null:attrNode(this[Do],t)}getNamedItemNS(e,t){let n=this[Do],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));return r===null?null:attrNode(n,r)}setNamedItem(e){return setAttributeNode(this[Do],e)}setNamedItemNS(e){return setAttributeNode(this[Do],e)}removeNamedItem(e){let t=this[Do],n=byName(this[Do],e);if(n===null)throw new DOMException(`No item with name '${e}' was found.`,`NotFoundError`);let r=attrNode(t,n);return removeAttributeRecord(t,n),r}removeNamedItemNS(e,t){let n=this[Do],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));if(r===null)throw new DOMException(`No item with name '${e}::${t}' was found.`,`NotFoundError`);let i=attrNode(n,r);return removeAttributeRecord(n,r),i}};Object.defineProperties(ko.prototype,{[Symbol.iterator]:{value:Array.prototype.values,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NamedNodeMap`,configurable:!0}});function isValidElementLocalName(e){let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);if(n>=97&&n<=122||n>=65&&n<=90){for(let n=1;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===62)return!1}return!0}if(n!==58&&n!==95&&n<128)return!1;for(let n=1;n<t;n++){let t=e.charCodeAt(n);if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===45||t===46||t===58||t===95||t>=128))return!1}return!0}function isValidNamespacePrefix(e){let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===62)return!1}return!0}function isValidDoctypeName(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===32||n===9||n===10||n===12||n===13||n===0||n===62)return!1}return!0}const Ao=`A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}`,jo=RegExp(`^[:${Ao}][:${Ao}\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`,`u`);function isXMLName(e){return jo.test(e)}function validateAndExtract(e,t,n){e===``&&(e=null);let r=null,i=t,a=t.indexOf(`:`);if(a!==-1&&(r=t.slice(0,a),i=t.slice(a+1),!isValidNamespacePrefix(r)))throw new DOMException(`"${r}" is not a valid namespace prefix.`,`InvalidCharacterError`);if(n===`attribute`?!isValidAttributeLocalName(i):!isValidElementLocalName(i))throw new DOMException(`"${t}" is not a valid qualified name.`,`InvalidCharacterError`);if(r!==null&&e===null)throw new DOMException(`A prefix was given but no namespace was provided.`,`NamespaceError`);if(r===`xml`&&e!==`http://www.w3.org/XML/1998/namespace`)throw new DOMException(`A prefix of "xml" was given but the namespace was not the XML namespace.`,`NamespaceError`);if((t===`xmlns`||r===`xmlns`)&&e!==`http://www.w3.org/2000/xmlns/`)throw new DOMException(`A prefix or qualifiedName of "xmlns" was given but the namespace was not the XMLNS namespace.`,`NamespaceError`);if(e===`http://www.w3.org/2000/xmlns/`&&t!==`xmlns`&&r!==`xmlns`)throw new DOMException(`The XMLNS namespace was given but neither the prefix nor qualifiedName was "xmlns".`,`NamespaceError`);return{namespace:e,prefix:r,localName:i}}let setPoint,setRect;var DOMPointReadOnly=class{#e;#t;#n;#r;static{setPoint=(e,t,n)=>{t===0?e.#e=n:t===1?e.#t=n:t===2?e.#n=n:e.#r=n}}constructor(e=0,t=0,n=0,r=1){this.#e=Number(e),this.#t=Number(t),this.#n=Number(n),this.#r=Number(r)}static fromPoint(e={}){return new this(e.x,e.y,e.z,e.w)}get x(){return this.#e}get y(){return this.#t}get z(){return this.#n}get w(){return this.#r}matrixTransform(e){let t=e[I],n=this.#e,r=this.#t,i=this.#n,a=this.#r;return new Mo(t[0]*n+t[4]*r+t[8]*i+t[12]*a,t[1]*n+t[5]*r+t[9]*i+t[13]*a,t[2]*n+t[6]*r+t[10]*i+t[14]*a,t[3]*n+t[7]*r+t[11]*i+t[15]*a)}toJSON(){return{x:this.#e,y:this.#t,z:this.#n,w:this.#r}}},Mo=class DOMPoint extends DOMPointReadOnly{static fromPoint(e={}){return new DOMPoint(e.x,e.y,e.z,e.w)}get x(){return super.x}set x(e){setPoint(this,0,Number(e))}get y(){return super.y}set y(e){setPoint(this,1,Number(e))}get z(){return super.z}set z(e){setPoint(this,2,Number(e))}get w(){return super.w}set w(e){setPoint(this,3,Number(e))}},DOMRectReadOnly=class{#e;#t;#n;#r;static{setRect=(e,t,n)=>{t===0?e.#e=n:t===1?e.#t=n:t===2?e.#n=n:e.#r=n}}constructor(e=0,t=0,n=0,r=0){this.#e=Number(e),this.#t=Number(t),this.#n=Number(n),this.#r=Number(r)}static fromRect(e={}){return new this(e.x,e.y,e.width,e.height)}get x(){return this.#e}get y(){return this.#t}get width(){return this.#n}get height(){return this.#r}get top(){return Math.min(this.#t,this.#t+this.#r)}get right(){return Math.max(this.#e,this.#e+this.#n)}get bottom(){return Math.max(this.#t,this.#t+this.#r)}get left(){return Math.min(this.#e,this.#e+this.#n)}toJSON(){return{x:this.#e,y:this.#t,width:this.#n,height:this.#r,top:this.top,right:this.right,bottom:this.bottom,left:this.left}}},No=class DOMRect extends DOMRectReadOnly{static fromRect(e={}){return new DOMRect(e.x,e.y,e.width,e.height)}get x(){return super.x}set x(e){setRect(this,0,Number(e))}get y(){return super.y}set y(e){setRect(this,1,Number(e))}get width(){return super.width}set width(e){setRect(this,2,Number(e))}get height(){return super.height}set height(e){setRect(this,3,Number(e))}},DOMRectList=class{[sr];constructor(e=[]){this[sr]=e;for(let t=0;t<e.length;t++)Object.defineProperty(this,t,{value:e[t],enumerable:!0});hideInternals(this)}get length(){return this[sr].length}item(e){return this[sr][e]??null}[Symbol.iterator](){return this[sr][Symbol.iterator]()}};const Po=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function multiply(e,t){let n=Array.from({length:16},()=>0);for(let r=0;r<4;r++)for(let i=0;i<4;i++){let a=0;for(let n=0;n<4;n++)a+=e[n*4+i]*t[r*4+n];n[r*4+i]=a}return n}var DOMMatrixReadOnly=class{[I];[xn];constructor(e){if(e===void 0||e===``||e===`none`)this[I]=Po.slice(),this[xn]=!0;else if(Array.isArray(e)||ArrayBuffer.isView(e)){let t=Array.from(e,Number);if(t.length===6)this[I]=[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1],this[xn]=!0;else if(t.length===16)this[I]=t,this[xn]=!1;else throw TypeError(`Failed to construct 'DOMMatrix': The sequence must contain 6 elements for a 2D matrix or 16 elements for a 3D matrix.`)}else{let t=/^\s*matrix\(([^)]*)\)\s*$/.exec(String(e));if(t===null)throw new DOMException(`Failed to construct 'DOMMatrix': Failed to parse '${String(e)}'.`,`SyntaxError`);let n=t[1].split(/[\s,]+/).filter(Boolean).map(Number);this[I]=[n[0],n[1],0,0,n[2],n[3],0,0,0,0,1,0,n[4],n[5],0,1],this[xn]=!0}hideInternals(this)}static fromMatrix(e={}){let t=new this;return(e.a!==void 0||e.m11!==void 0)&&(t[I][0]=e.m11??e.a??1,t[I][1]=e.m12??e.b??0,t[I][4]=e.m21??e.c??0,t[I][5]=e.m22??e.d??1,t[I][12]=e.m41??e.e??0,t[I][13]=e.m42??e.f??0),t}static fromFloat64Array(e){return new this(Array.from(e))}static fromFloat32Array(e){return new this(Array.from(e))}get a(){return this[I][0]}get b(){return this[I][1]}get c(){return this[I][4]}get d(){return this[I][5]}get e(){return this[I][12]}get f(){return this[I][13]}get m11(){return this[I][0]}get m12(){return this[I][1]}get m13(){return this[I][2]}get m14(){return this[I][3]}get m21(){return this[I][4]}get m22(){return this[I][5]}get m23(){return this[I][6]}get m24(){return this[I][7]}get m31(){return this[I][8]}get m32(){return this[I][9]}get m33(){return this[I][10]}get m34(){return this[I][11]}get m41(){return this[I][12]}get m42(){return this[I][13]}get m43(){return this[I][14]}get m44(){return this[I][15]}get is2D(){return this[xn]}get isIdentity(){for(let e=0;e<16;e++)if(this[I][e]!==Po[e])return!1;return!0}multiply(e){let t=new Fo(multiply(this[I],e[I]));return t[xn]=this[xn]&&e[xn],t}translate(e=0,t=0,n=0){let r=new Fo([1,0,0,0,0,1,0,0,0,0,1,0,e,t,n,1]);return r[xn]=n===0,this.multiply(r)}scale(e=1,t=e,n=1){let r=new Fo([e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1]);return r[xn]=n===1,this.multiply(r)}inverse(){let[e,t,,,n,r,,,,,,,i,a]=this[I],o=e*r-t*n;if(!this[xn]||o===0){let e=new Fo(Array.from({length:16},()=>NaN));return e[xn]=!1,e}return new Fo([r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,(t*i-e*a)/o])}transformPoint(e={}){return Mo.fromPoint(e).matrixTransform(this)}toFloat64Array(){return Float64Array.from(this[I])}toFloat32Array(){return Float32Array.from(this[I])}toJSON(){let e={a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f},t=[`m11`,`m12`,`m13`,`m14`,`m21`,`m22`,`m23`,`m24`,`m31`,`m32`,`m33`,`m34`,`m41`,`m42`,`m43`,`m44`];for(let n=0;n<16;n++)e[t[n]]=this[I][n];return e.is2D=this[xn],e.isIdentity=this.isIdentity,e}toString(){return this[xn]?`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.e}, ${this.f})`:`matrix3d(${this[I].join(`, `)})`}},Fo=class DOMMatrix extends DOMMatrixReadOnly{static fromMatrix(e={}){return DOMMatrixReadOnly.fromMatrix.call(DOMMatrix,e)}get a(){return this[I][0]}set a(e){this[I][0]=Number(e)}get b(){return this[I][1]}set b(e){this[I][1]=Number(e)}get c(){return this[I][4]}set c(e){this[I][4]=Number(e)}get d(){return this[I][5]}set d(e){this[I][5]=Number(e)}get e(){return this[I][12]}set e(e){this[I][12]=Number(e)}get f(){return this[I][13]}set f(e){this[I][13]=Number(e)}};exposeMembers(DOMPointReadOnly,Mo,DOMRectReadOnly,No,DOMRectList,DOMMatrixReadOnly,Fo);function isPotentialCustomElementName(e){let t=e.charCodeAt(0);return t>=97&&t<=122&&e.includes(`-`)}var Io=class Element extends Node{constructor(e,t,n,r){super(1,e);let i=this[M];i.name=t,i.ns=n,i.prefix=r,n===`http://www.w3.org/1999/xhtml`&&(e[N]&&(i.flags|=2),i.tag=tagId(t),i.tag===0&&isPotentialCustomElementName(t)&&(i.flags|=128))}get namespaceURI(){return this[M].ns}get prefix(){return this[M].prefix}get localName(){return this[M].name}get tagName(){return htmlUppercasedQualifiedName(this[M])}get id(){return this[M].id}set id(e){setAttribute(this[M],`id`,String(e))}get className(){return getAttribute(this[M],`class`)??``}set className(e){setAttribute(this[M],`class`,String(e))}get classList(){return this[rt]??=new Co(this[M],`class`)}set classList(e){this.classList.value=e}get dataset(){return this[wt]??=createDOMStringMap(this[M])}get part(){let e=Lo.get(this);return e===void 0&&Lo.set(this,e=new Co(this[M],`part`)),e}set part(e){this.part.value=e}get attributes(){return this[Ve]??=new ko(this[M])}get slot(){return attr(this[M],`slot`)??``}set slot(e){let t=this[M],n=String(e),r=findAttributeByNamespace(t,null,`slot`);r===null?appendAttribute(t,new AttrRecord(`slot`,n,null,null)):changeAttribute(t,r,n)}hasAttributes(){let e=this[M].attrs;return e!==null&&e.length!==0}getAttributeNames(){let e=this[M].attrs;return e===null?[]:e.map(e=>e.name)}getAttribute(e){return getAttribute(this[M],String(e))}getAttributeNS(e,t){let n=findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t));return n===null?null:n.value}setAttribute(e,t){setAttribute(this[M],String(e),String(t))}setAttributeNS(e,t,n){let{namespace:r,prefix:i,localName:a}=validateAndExtract(e===void 0?null:e,String(t),`attribute`),o=this[M],s=String(n),c=findAttributeByNamespace(o,r,a);c===null?appendAttribute(o,new AttrRecord(a,s,r,i)):changeAttribute(o,c,s)}getAttributeNode(e){let t=this[M],n=String(e),r=findAttributeByName(t,t.flags&2?asciiLowercase$1(n):n);return r===null?null:attrNode(t,r)}getAttributeNodeNS(e,t){let n=this[M],r=findAttributeByNamespace(n,e===``||e===void 0?null:e,String(t));return r===null?null:attrNode(n,r)}setAttributeNode(e){return setAttributeNode(this[M],e)}setAttributeNodeNS(e){return setAttributeNode(this[M],e)}removeAttributeNode(e){return removeAttributeNode(this[M],e)}removeAttribute(e){removeAttribute(this[M],String(e))}removeAttributeNS(e,t){let n=findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t));n!==null&&removeAttributeRecord(this[M],n)}toggleAttribute(e,t){let n=this[M],r=String(e);if(!isValidAttributeLocalName(r))throw new DOMException(`"${r}" is not a valid attribute name.`,`InvalidCharacterError`);let i=n.flags&2?asciiLowercase$1(r):r,a=findAttributeByName(n,i);return a===null?t===void 0||t?(appendAttribute(n,new AttrRecord(i,``,null,null)),!0):!1:t===void 0||!t?(removeAttributeRecord(n,a),!1):!0}hasAttribute(e){return getAttribute(this[M],String(e))!==null}hasAttributeNS(e,t){return findAttributeByNamespace(this[M],e===``||e===void 0?null:e,String(t))!==null}matches(e){return matches(this[M],String(e))}webkitMatchesSelector(e){return this.matches(e)}closest(e){let t=closest(this[M],String(e));return t===null?null:t.node}getElementsByTagName(e){return getElementsByTagName(this[M],String(e))}getElementsByTagNameNS(e,t){return getElementsByTagNameNS(this[M],e,String(t))}getElementsByClassName(e){return getElementsByClassName(this[M],String(e))}get innerHTML(){return serializeChildren(this[M])}set innerHTML(e){let t=this[M],n=parseFragment(e===null?``:String(e),t);if(t.tag===Y.template&&t.ns===`http://www.w3.org/1999/xhtml`){let e=this.content;if(e!=null){e._replaceAll(n.node);return}}this._replaceAll(n.node)}getHTML(e){return getHTML(this[M],e)}setHTMLUnsafe(e){setHTMLUnsafe(this[M],String(e))}get outerHTML(){return serializeNode(this[M])}set outerHTML(e){let t=this[M],n=t.parent;if(n===null)return;if(n.type===9)throw new DOMException(`Cannot set outerHTML of the document element.`,`NoModificationAllowedError`);let r=n.type===11?t.doc.createElement(`body`)[M]:n,i=parseFragment(e===null?``:String(e),r);n.node.replaceChild(i.node,this)}insertAdjacentHTML(e,t){let n=asciiLowercase$1(String(e)),r=this[M],i;if(n===`beforebegin`||n===`afterend`){let e=r.parent;if(e===null||e.type===9)throw new DOMException(`The element has no parent.`,`NoModificationAllowedError`);i=e}else if(n===`afterbegin`||n===`beforeend`)i=r;else throw new DOMException(`"${e}" is not a valid position.`,`SyntaxError`);(i.type!==1||i.ns===`http://www.w3.org/1999/xhtml`&&i.name===`html`&&i.flags&2)&&(i=r.doc.createElement(`body`)[M]);let a=parseFragment(String(t),i).node;insertAdjacent(this,n,a)}insertAdjacentElement(e,t){if(!(t instanceof Element))throw TypeError(`Failed to execute 'insertAdjacentElement' on 'Element': parameter 2 is not of type 'Element'.`);return insertAdjacent(this,asciiLowercase$1(String(e)),t)}insertAdjacentText(e,t){insertAdjacent(this,asciiLowercase$1(String(e)),this[M].doc.createTextNode(String(t)))}get shadowRoot(){let e=this[U];return e!=null&&e.mode===`open`?e:null}attachShadow(e){if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'attachShadow' on 'Element': 1 argument required, but only 0 present.`);let t=e.mode;if(t!==`open`&&t!==`closed`)throw TypeError(`Failed to execute 'attachShadow' on 'Element': The provided value '${String(t)}' is not a valid enum value of type ShadowRootMode.`);let n=e.slotAssignment??`named`;if(n!==`named`&&n!==`manual`)throw TypeError(`Failed to execute 'attachShadow' on 'Element': The provided value '${String(n)}' is not a valid enum value of type SlotAssignmentMode.`);return attachShadowRoot(this,t,!!e.clonable,!!e.serializable,!!e.delegatesFocus,n)}get assignedSlot(){if(ra===0)return null;let e=assignedSlot(this[M]);if(e===null)return null;let t=this[M].parent,n=t===null||!(t.flags&512)?null:t.node[U];return n!=null&&n.mode===`open`?e.node:null}getBoundingClientRect(){return new No}getClientRects(){return new DOMRectList}checkVisibility(e){return!!(this[M].flags&1)}get scrollTop(){return 0}set scrollTop(e){}get scrollLeft(){return 0}set scrollLeft(e){}get scrollWidth(){return 0}get scrollHeight(){return 0}get clientTop(){return 0}get clientLeft(){return 0}get clientWidth(){return 0}get clientHeight(){return 0}scroll(e,t){}scrollTo(e,t){}scrollBy(e,t){}scrollIntoView(e){}get _hasActivationBehavior(){return!1}_connectedSteps(){}_disconnectedSteps(){}_attributeChangedSteps(e,t,n,r){}_childrenChangedSteps(){}_adoptingSteps(e){}_movingSteps(e,t){}_cloningSteps(e,t){}};installParentNode(Io),installChildNode(Io),installNonDocumentTypeChildNode(Io);function insertAdjacent(e,t,n){switch(t){case`beforebegin`:{let t=e.parentNode;return t===null?null:t.insertBefore(n,e)}case`afterbegin`:return e.insertBefore(n,e.firstChild);case`beforeend`:return e.appendChild(n);case`afterend`:{let t=e.parentNode;return t===null?null:t.insertBefore(n,e.nextSibling)}}throw new DOMException(`"${t}" is not a valid position.`,`SyntaxError`)}const Lo=/* @__PURE__ */ new WeakMap,Ro=/* @__PURE__ */ new Set([`article`,`aside`,`blockquote`,`body`,`div`,`footer`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`header`,`main`,`nav`,`p`,`section`,`span`]);let zo=!1;function attachShadowRoot(e,t,n,r,i,a){let o=e[M];if(o.ns!==`http://www.w3.org/1999/xhtml`)throw new DOMException(`This element does not support attachShadow`,`NotSupportedError`);let s=o.name;if(!(o.flags&128)&&!Ro.has(s))throw new DOMException(`Failed to execute 'attachShadow' on 'Element': This element does not support attachShadow`,`NotSupportedError`);let c=e._shadowDisabled;if(typeof c==`function`&&c.call(e))throw new DOMException(`Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host whose custom element definition disables it.`,`NotSupportedError`);let l=e[U];if(l!=null){if(!l[Tt]||l[Mn]!==t)throw new DOMException(`Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host which already hosts a shadow tree.`,`NotSupportedError`);return l._replaceAll(null),l[Tt]=!1,l}let u=new ShadowRoot(o.doc,e,t,i,a,n,r);return e[U]=u,o.flags|=512,_shadowRootAttached(),zo||(zo=!0,setAssignedSlotLookup(e=>{let t=assignedSlotForEventPath(e);return t===null?null:t.node})),u}const Bo=/* @__PURE__ */ new WeakMap;function cachedCollection(e,t,n){let r=Bo.get(e);r===void 0&&Bo.set(e,r=/* @__PURE__ */ new Map);let i=r.get(t);return i===void 0&&r.set(t,i=Aa._descendants(e,n)),i}function getElementsByTagName(e,t){if(t===`*`)return cachedCollection(e,`t*`,null);let n=asciiLowercase$1(t),r=e.doc[N],i=t.indexOf(`:`),a=i===-1?null:t.slice(0,i),o=i===-1?t:t.slice(i+1),s=i===-1?null:n.slice(0,i),c=i===-1?n:n.slice(i+1);return cachedCollection(e,`t`+t,e=>r&&e.ns===`http://www.w3.org/1999/xhtml`?e.name===c&&e.prefix===s:e.name===o&&e.prefix===a)}function getElementsByTagNameNS(e,t,n){let r=t===``||t==null?null:String(t),i=`n`+(r??``)+`\0`+(r===null?`0`:`1`)+n;return r===`*`&&n===`*`?cachedCollection(e,i,null):r===`*`?cachedCollection(e,i,e=>e.name===n):n===`*`?cachedCollection(e,i,e=>e.ns===r):cachedCollection(e,i,e=>e.ns===r&&e.name===n)}function getElementsByClassName(e,t){let n=[];for(let e of splitOnAsciiWhitespace(t))n.includes(e)||n.push(e);if(n.length===0)return cachedCollection(e,`c`,()=>!1);if(e.doc[Mn]===`quirks`){let r=n.map(asciiLowercase$1);return cachedCollection(e,`q`+t,e=>{let t=classTokens(e);outer:for(let e=0;e<r.length;e++){for(let n=0;n<t.length;n++)if(asciiLowercase$1(t[n])===r[e])continue outer;return!1}return!0})}if(n.length===1){let r=n[0];return cachedCollection(e,`c`+t,e=>{let t=classTokens(e);for(let e=0;e<t.length;e++)if(t[e]===r)return!0;return!1})}return cachedCollection(e,`c`+t,e=>{let t=classTokens(e);for(let e=0;e<n.length;e++)if(!t.includes(n[e]))return!1;return!0})}const Vo=/* @__PURE__ */ `abort.auxclick.beforeinput.beforematch.beforetoggle.blur.cancel.canplay.canplaythrough.change.click.close.command.contextlost.contextmenu.contextrestored.copy.cuechange.cut.dblclick.drag.dragend.dragenter.dragleave.dragover.dragstart.drop.durationchange.emptied.ended.error.focus.formdata.input.invalid.keydown.keypress.keyup.load.loadeddata.loadedmetadata.loadstart.mousedown.mouseenter.mouseleave.mousemove.mouseout.mouseover.mouseup.paste.pause.play.playing.progress.ratechange.reset.resize.scroll.scrollend.securitypolicyviolation.seeked.seeking.select.slotchange.stalled.submit.suspend.timeupdate.toggle.volumechange.waiting.webkitanimationend.webkitanimationiteration.webkitanimationstart.webkittransitionend.wheel.gotpointercapture.lostpointercapture.pointerdown.pointermove.pointerrawupdate.pointerup.pointercancel.pointerover.pointerout.pointerenter.pointerleave.touchstart.touchend.touchmove.touchcancel.animationstart.animationiteration.animationend.animationcancel.transitionrun.transitionstart.transitionend.transitioncancel.selectstart.selectionchange`.split(`.`),Ho=[`afterprint`,`beforeprint`,`beforeunload`,`hashchange`,`languagechange`,`message`,`messageerror`,`offline`,`online`,`pagehide`,`pagereveal`,`pageshow`,`pageswap`,`popstate`,`rejectionhandled`,`storage`,`unhandledrejection`,`unload`],Uo=[`blur`,`error`,`focus`,`load`,`resize`,`scroll`],Wo=[`readystatechange`,`visibilitychange`];var HandlerEntry=class{value;listener;constructor(){this.value=null,this.listener=null}};const Go=/* @__PURE__ */ new WeakMap;function makeProcessingListener(e){return function(t){let n=e.value;if(typeof n!=`function`)return;let r=n,i=t._s,a=i.currentTarget;if(t instanceof ErrorEvent&&i.type===`error`&&isWindow(a)){r.call(a,t.message,t.filename,t.lineno,t.colno,t.error)===!0&&setCanceledFlag(i);return}let o=r.call(a,t);t instanceof BeforeUnloadEvent&&i.type===`beforeunload`?o!=null&&(setCanceledFlag(i),t.returnValue===``&&(t.returnValue=String(o))):o===!1&&setCanceledFlag(i)}}function getEventHandler(e,t){let n=Go.get(e);return n===void 0?null:n.get(t)?.value??null}function setEventHandler(e,t,n){let r=n!==null&&(typeof n==`object`||typeof n==`function`)?n:null,i=Go.get(e);if(r===null){let n=i?.get(t);if(n===void 0)return;n.value=null,n.listener!==null&&(removeEventListener(e,t,n.listener,!1),n.listener=null);return}i===void 0&&Go.set(e,i=/* @__PURE__ */ new Map);let a=i.get(t);a===void 0&&i.set(t,a=new HandlerEntry),a.value=r,a.listener===null&&(a.listener=makeProcessingListener(a),addEventListener(e,t,a.listener,!1))}const Ko=/* @__PURE__ */ new Map;function handlerAccessor(e,t){if(t===null){let t=Ko.get(e);return t===void 0&&(t={get(){return getEventHandler(this,e)},set(t){setEventHandler(this,e,t)}},Ko.set(e,t)),t}return{get(){let n=t(this);return n===null?null:getEventHandler(n,e)},set(n){let r=t(this);r!==null&&setEventHandler(r,e,n)}}}const qo={webkitanimationend:`webkitAnimationEnd`,webkitanimationiteration:`webkitAnimationIteration`,webkitanimationstart:`webkitAnimationStart`,webkittransitionend:`webkitTransitionEnd`};function addHandler(e,t,n){let{get:r,set:i}=handlerAccessor(qo[t]??t,n);e[`on`+t]={configurable:!0,enumerable:!0,get:r,set:i}}function bodyWindow(e){let t=e[M];return t===void 0?null:t.doc[q]}function installEventHandlers(e,t){let n={};if(t===`body`){for(let e of Uo)addHandler(n,e,bodyWindow);for(let e of Ho)addHandler(n,e,bodyWindow)}else{for(let e of Vo)addHandler(n,e,null);if(t===`window`)for(let e of Ho)addHandler(n,e,null);if(t===`document`)for(let e of Wo)addHandler(n,e,null)}Object.defineProperties(e,n)}const Jo=Symbol(`already constructed`),Yo=/* @__PURE__ */ new WeakMap,Xo=/* @__PURE__ */ new WeakSet,Zo=/* @__PURE__ */ new WeakSet,Qo=/* @__PURE__ */ new WeakMap,$o=/* @__PURE__ */ new WeakMap;let es=0;const ts=/* @__PURE__ */ new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]),ns=RegExp(`^[a-z][\\-.0-9_a-z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}]*$`,`u`);function isValidCustomElementName(e){return e.includes(`-`)&&ns.test(e)&&!ts.has(e)}var CustomElementRegistry=class{[Ye];[Je];[ni];[dr];[q];constructor(e=null){this[Ye]=/* @__PURE__ */ new Map,this[Je]=/* @__PURE__ */ new Map,this[ni]=/* @__PURE__ */ new Map,this[dr]=!1,this[q]=e}define(e,t,n){if(typeof t!=`function`)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': parameter 2 is not of type 'Function'.`);if(e=String(e),!isConstructor(t))throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The provided value is not a constructor.`);if(!isValidCustomElementName(e))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': "${e}" is not a valid custom element name`,`SyntaxError`);if(this[Ye].has(e))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`,`NotSupportedError`);if(this[Je].has(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry`,`NotSupportedError`);let r=e,i=n?.extends;if(i!=null){let e=String(i);if(isValidCustomElementName(e))throw new DOMException(`"${e}" is a valid custom element name and cannot be extended.`,`NotSupportedError`);if(elementClassFor(e,`http://www.w3.org/1999/xhtml`).name===`HTMLUnknownElement`)throw new DOMException(`"${e}" is not a known HTML element and cannot be extended.`,`NotSupportedError`);r=e}if(this[dr])throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': an element definition is already running.`,`NotSupportedError`);this[dr]=!0;let a=!1,o=!1,s=!1,c=/* @__PURE__ */ new Set,l=null,u=null,d=null,m=null,h=null,_=null,v=null,ee=null,y=null;try{let e=t.prototype;if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The prototype of the constructor is not an object.`);let n=e,cb=e=>{let t=n[e];if(t===void 0)return null;if(typeof t!=`function`)throw TypeError(`Failed to execute 'define' on 'CustomElementRegistry': The '${e}' callback is not a function.`);return t};if(l=cb(`connectedCallback`),u=cb(`disconnectedCallback`),m=cb(`connectedMoveCallback`),d=cb(`adoptedCallback`),h=cb(`attributeChangedCallback`),h!==null){let e=t.observedAttributes;if(e!==void 0)for(let t of toSequence(e))c.add(String(t))}let r=t.disabledFeatures;if(r!==void 0)for(let e of toSequence(r)){let t=String(e);t===`internals`?o=!0:t===`shadow`&&(s=!0)}a=!!t.formAssociated,a&&(_=cb(`formAssociatedCallback`),v=cb(`formResetCallback`),ee=cb(`formDisabledCallback`),y=cb(`formStateRestoreCallback`))}finally{this[dr]=!1}let te={name:e,localName:r,constructor:t,observedAttributes:c,connectedCallback:l,disconnectedCallback:u,adoptedCallback:d,attributeChangedCallback:h,connectedMoveCallback:m,formAssociatedCallback:_,formResetCallback:v,formDisabledCallback:ee,formStateRestoreCallback:y,formAssociated:a,disableInternals:o,disableShadow:s,constructionStack:[],registry:this};this[Ye].set(e,te),this[Je].set(t,te),Qo.set(t,te),es++,setCEActive();let ne=this[q]?.document;if(ne!=null){let e=[];collectCandidates(ne[M],te,e);for(let t of e)enqueueUpgrade(t,te);flushReactions()}let re=this[ni].get(e);re!==void 0&&(re.resolve(t),this[ni].delete(e))}get(e){return this[Ye].get(String(e))?.constructor}getName(e){if(typeof e!=`function`)throw TypeError(`Failed to execute 'getName' on 'CustomElementRegistry': parameter 1 is not of type 'Function'.`);return this[Je].get(e)?.name??null}whenDefined(e){if(e=String(e),!isValidCustomElementName(e))return Promise.reject(new DOMException(`"${e}" is not a valid custom element name`,`SyntaxError`));let t=this[Ye].get(e);if(t!==void 0)return Promise.resolve(t.constructor);let n=this[ni].get(e);if(n===void 0){let{promise:t,resolve:r}=Promise.withResolvers();n={promise:t,resolve:r},this[ni].set(e,n)}return n.promise}upgrade(e){let t=[];forEachShadowIncludingInclusiveDescendant(e[M],e=>{e.type===1&&t.push(e.node)});for(let e of t)tryToUpgrade(e);flushReactions()}_lookup(e,t,n){if(e!==`http://www.w3.org/1999/xhtml`)return null;let r=this[Ye].get(t);if(r!==void 0&&r.localName===t)return r;if(n!==null){let e=this[Ye].get(n);if(e!==void 0&&e.localName===t)return e}return null}};const rs={construct:()=>({})};function isConstructor(e){try{return new new Proxy(e,rs),!0}catch{return!1}}function toSequence(e){if(e===null||typeof e!=`object`&&typeof e!=`function`||typeof e[Symbol.iterator]!=`function`)throw TypeError(`The value provided is not iterable.`);return Array.from(e)}function forEachShadowIncludingInclusiveDescendant(e,t){for(let n=e;n!==null;n=nextInTree(n,e))if(t(n),n.type===1){let e=n.node[U];e!=null&&forEachShadowIncludingInclusiveDescendant(e[M],t)}}function collectCandidates(e,t,n){forEachShadowIncludingInclusiveDescendant(e,e=>{if(e.type!==1||e.ns!==`http://www.w3.org/1999/xhtml`||e.name!==t.localName)return;let r=e.node;(t.localName===t.name||$o.get(r)===t.name)&&n.push(r)})}const is=/* @__PURE__ */ new WeakMap;function customElementRegistryFor(e){let t=is.get(e);return t===void 0&&(t=new CustomElementRegistry(e),is.set(e,t)),t}function lookupDefinition(e,t,n,r){if(es===0||t!==`http://www.w3.org/1999/xhtml`)return null;let i=e[q];if(i===null)return null;let a=is.get(i);return a===void 0?null:a._lookup(t,n,r)}function isDefined(e){return e.flags&1024?!0:e.flags&128?!isValidCustomElementName(e.name):as===0||!$o.has(e.node)}function definitionOf(e){return Yo.get(e)}function isValueOf(e){return $o.get(e)??null}let as=0;function setIsValue(e,t){$o.has(e)||as++,$o.set(e,t),setCEActive()}function isPrecustomizedOrCustom(e){return!!(e[M].flags&1024)||Zo.has(e)}let os=null;function htmlElementConstructorSteps(e){let t;try{t=is.get(currentWindow())}catch{t=void 0}let n=t?.[Je].get(e)??Qo.get(e);if(n===void 0||isBuiltinInterface(e))throw TypeError(`Illegal constructor`);let r=null;for(let t=Object.getPrototypeOf(e);t!==null&&t!==Function.prototype;t=Object.getPrototypeOf(t))if(isBuiltinInterface(t)){r=t;break}if(n.localName===n.name){if(r!==null&&r.name!==`HTMLElement`)throw TypeError(`Illegal constructor: autonomous custom elements must extend HTMLElement`)}else if(r!==null&&!usesInterface(r,n.localName))throw TypeError(`Illegal constructor: the custom element does not extend the interface of its local name`);let i=n.constructionStack;if(i.length===0)return{upgrade:null,doc:os??n.registry[q]?.document??currentWindow().document,localName:n.localName,def:n,active:r};let a=i[i.length-1];if(a===Jo)throw TypeError(`Failed to construct custom element: this element was already constructed`);let o=e.prototype;return typeof o==`object`&&o||(o=(r??elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)).prototype),Object.setPrototypeOf(a,o),i[i.length-1]=Jo,{upgrade:a,doc:null,localName:``,def:null,active:null}}function usesInterface(e,t){return localNamesForInterface(e).includes(t)?!0:e.name===`HTMLElement`&&elementClassFor(t,`http://www.w3.org/1999/xhtml`).name===`HTMLElement`}function initNewCustomElement(e,t,n){let r=Object.getPrototypeOf(e);r!==null&&Object.getPrototypeOf(r)===null&&Object.hasOwn(r,`isPrototypeOf`)&&r.constructor?.prototype===r&&Object.setPrototypeOf(e,(n??elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)).prototype),markCustom(e,t),t.localName!==t.name&&setIsValue(e,t.name)}function markCustom(e,t){let n=e[M];Yo.set(e,t),n.flags|=1028,t.formAssociated&&(n.flags|=16392),t.attributeChangedCallback!==null&&t.observedAttributes.size!==0&&(n.flags|=8),t.adoptedCallback!==null&&(n.flags|=xe)}function createElementSync(e,t,n,r,i){if(es===0&&i===null)return null;let a=lookupDefinition(e,n,t,i);if(a!==null&&a.name!==a.localName){let i=createElementImpl(e,t,n,r),o=i.node;setIsValue(o,a.name),i.flags|=4;try{upgrade(o,a)}catch(e){reportException(e)}return i}if(a!==null){let i=a.constructor,o=os;os=e;try{let n=new i;if(typeof n!=`object`||!n||!(n instanceof elementClassFor(`x-x`,`http://www.w3.org/1999/xhtml`)))throw TypeError(`The custom element constructor did not produce an HTMLElement.`);let a=n[M];if(a.attrs!==null&&a.attrs.length!==0)throw new DOMException(`The result must not have attributes`,`NotSupportedError`);if(a.first!==null)throw new DOMException(`The result must not have children`,`NotSupportedError`);if(a.parent!==null)throw new DOMException(`The result must not have a parent`,`NotSupportedError`);if(a.doc!==e)throw new DOMException(`The result must be in the same document`,`NotSupportedError`);if(a.name!==t)throw new DOMException(`The result must have the same localName`,`NotSupportedError`);return a.prefix=r,a}catch(i){return reportException(i),failedElement(e,t,n,r)}finally{os=o}}let o=createElementImpl(e,t,n,r);return i!==null&&n===`http://www.w3.org/1999/xhtml`&&(setIsValue(o.node,i),o.flags|=4),o}function failedElement(e,t,n,r){let i=new(elementClassFor(`applet`,ie))(e,t,n,r),a=i[M];return a.flags&=-5,Xo.add(i),a}function createElementUnsync(e,t,n,r,i){let a=createElementImpl(e,t,n,r);return n===`http://www.w3.org/1999/xhtml`&&initUnsync(a,i),a}function initUnsync(e,t){let n=e.node,r=lookupDefinition(e.doc,ie,e.name,t);r===null?t!==null&&(setIsValue(n,t),e.flags|=4):(r.name!==r.localName&&setIsValue(n,r.name),e.flags|=4,enqueueUpgrade(n,r))}function cloneElement(e,t){return createElementUnsync(e,t.name,t.ns,t.prefix,t.ns===`http://www.w3.org/1999/xhtml`?$o.get(t.node)??null:null)}function parserCreated(e){ss=!0;try{initUnsync(e,e.attrs===null?null:attr(e,`is`))}finally{ss=!1}}let ss=!1,cs=[];function releaseDeferred(e){let t=null,n=null;for(let r=0;r<cs.length;r++){let i=cs[r],a=i[M];for(;a.parent!==null;)a=a.parent;!e&&a.type===11&&!(a.flags&32)?(n??=[]).push(i):(t??=[]).push(i)}cs=n??[],t!==null&&(fs=fs.length===0?t:t.concat(fs))}setCustomElementCreate(createElementSync),setShadowHostCustomStateCheck(isPrecustomizedOrCustom),setCustomElementCloneHooks(cloneElement,parserCreated);let ls=null;function setFaceUpgradeHook(e){ls=e}function upgrade(e,t){let n=e[M];if(n.flags&1024||Xo.has(e)||Zo.has(e))return;Yo.set(e,t),Xo.add(e);let r=ds.get(e);r===void 0&&ds.set(e,r=[]);let i=n.attrs;if(i!==null&&t.attributeChangedCallback!==null)for(let e=0;e<i.length;e++){let n=i[e];t.observedAttributes.has(n.localName)&&r.push({kind:us,def:t,fn:t.attributeChangedCallback,args:[n.localName,null,n.value,n.ns]})}n.flags&1&&t.connectedCallback!==null&&r.push({kind:us,def:t,fn:t.connectedCallback,args:[]}),t.constructionStack.push(e);try{if(t.disableShadow&&e[U]!=null)throw new DOMException(`Failed to upgrade the custom element: its definition disables shadow roots, but it already has one.`,`NotSupportedError`);Zo.add(e);let r=t.constructor,i=new r;if(i!==e){if(typeof i!=`object`||!i||i[M]!==n)throw TypeError(`Custom element constructors must call super() first and must not return a different object.`);n.node=e}}catch(t){Yo.delete(e);let n=ds.get(e);throw n!==void 0&&(n.length=0),t}finally{Zo.delete(e),t.constructionStack.pop()}Xo.delete(e),markCustom(e,t),t.formAssociated&&(n.doc[K]++,ls!==null&&ls(n))}function tryToUpgrade(e){let t=e[M];if(t.flags&1024||Xo.has(e))return;let n=lookupDefinition(t.doc,t.ns,t.name,$o.get(e)??null);n!==null&&enqueueUpgrade(e,n)}const us=1,ds=/* @__PURE__ */ new WeakMap;let fs=[],ps=!1;function pushReaction(e,t){let n=ds.get(e);n===void 0&&(n=[],ds.set(e,n)),n.push(t),ss?cs.push(e):fs.push(e),setCEReactionsPending(!0),ps||(ps=!0,queueMicrotask(backupFlush))}let ms=0;function outsideCEReactions(e){ms++;try{return e()}finally{ms--}}function backupFlush(){ps=!1,cs.length!==0&&releaseDeferred(!0),flushReactions()}function enqueueUpgrade(e,t){pushReaction(e,{kind:0,def:t,fn:null,args:[]})}function enqueueCallback(e,t,n){let r=Yo.get(e);if(r===void 0)return;let i=r[t];i!==null&&(t!==`attributeChangedCallback`||r.observedAttributes.has(n[0]))&&pushReaction(e,{kind:1,def:r,fn:i,args:n})}function enqueueFormCallback(e,t,n){let r=Yo.get(e);if(r===void 0)return;let i=r[t];i!==null&&pushReaction(e,{kind:1,def:r,fn:i,args:n})}function flushReactions(){if(ms===0){for(cs.length!==0&&releaseDeferred(!1);fs.length!==0;){let e=fs;fs=[];for(let t=0;t<e.length;t++){let n=e[t],r=ds.get(n);for(;r.length!==0;){let e=r.shift();try{e.kind===0?upgrade(n,e.def):e.fn.apply(n,e.args)}catch(e){reportException(e)}}}}setCEReactionsPending(cs.length!==0)}}setCEReactionsFlush(flushReactions);function reportException(e,t=null){reportException$1(e,t)}function ceConnected(e){es!==0&&(e[M].flags&1024?enqueueCallback(e,`connectedCallback`,[]):tryToUpgrade(e))}function ceDisconnected(e){e[M].flags&1024&&enqueueCallback(e,`disconnectedCallback`,[])}function ceAttributeChanged(e,t,n,r,i){e[M].flags&1024&&enqueueCallback(e,`attributeChangedCallback`,[t,n,r,i])}function ceMoved(e){let t=e[M];if(!(t.flags&1024)||!(t.flags&1))return;let n=Yo.get(e);if(n===void 0)return;if(n.connectedMoveCallback!==null){pushReaction(e,{kind:1,def:n,fn:n.connectedMoveCallback,args:[]});return}let r=n.disconnectedCallback,i=n.connectedCallback;(r!==null||i!==null)&&pushReaction(e,{kind:1,def:n,fn:function(){r!==null&&r.call(this),i!==null&&i.call(this)},args:[]})}function ceAdopted(e,t,n){e[M].flags&1024&&enqueueCallback(e,`adoptedCallback`,[t,n])}function shadowDisabled(e){if(es===0)return!1;let t=e[M],n=Yo.get(e)??lookupDefinition(t.doc,t.ns,t.name,$o.get(e)??null);return n!=null&&n.disableShadow}const hs=2147483647;function contentAttr(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e];if(r.localName===t&&(r.rare===null||r.rare.ns===null))return r.value}return null}function lower(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)return e.replace(/[A-Z]+/g,e=>e.toLowerCase())}return e}function names(e){let t=[];for(let n of e.split(` `)){if(n===``)continue;let e=n.indexOf(`=`);e===-1?t.push([n,lower(n)]):t.push([n.slice(0,e),n.slice(e+1)])}return t}function defineAccessor(e,t,n,r){Object.defineProperty(e.prototype,t,{get:n,set:r,configurable:!0,enumerable:!0})}function parseInteger(e){let t=e.length,n=0;for(;n<t&&isAsciiWhitespace(e.charCodeAt(n));)n++;if(n===t)return NaN;let r=1,i=e.charCodeAt(n);if(i===45?(r=-1,n++):i===43&&n++,n===t||(i=e.charCodeAt(n),i<48||i>57))return NaN;let a=0;for(;n<t&&(i=e.charCodeAt(n),!(i<48||i>57));)a=a*10+(i-48),n++;return a>0x38d7ea4c68000&&(a=1/0),r*a+0}function parseNonNegativeInteger(e){let t=parseInteger(e);return t>=0?t+0:NaN}function parseFloatingPoint(e){let t=0,n=e.length;for(;t<n&&isAsciiWhitespace(e.charCodeAt(t));)t++;let r=/^[-+]?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][-+]?\d+)?/.exec(t===0?e:e.slice(t));if(r===null)return NaN;let i=Number(r[0]);return Number.isFinite(i)?i===0?0:i:NaN}function indexSizeError(e){return new DOMException(e,`IndexSizeError`)}function str(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)??``},function(e){setAttribute(this[M],r,String(e))})}function strNullEmpty(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)??``},function(e){setAttribute(this[M],r,e===null?``:String(e))})}function nullableStr(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)},function(e){e==null?removeAttribute(this[M],r):setAttribute(this[M],r,String(e))})}function bool(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){return contentAttr(this[M],r)!==null},function(e){e?setAttribute(this[M],r,``):removeAttribute(this[M],r)})}function url(e,t){for(let[n,r]of names(t))defineAccessor(e,n,function(){let e=this[M],t=contentAttr(e,r);return t===null?``:resolveURL(e,t)??t},function(e){setAttribute(this[M],r,String(e))})}function resolveURL(e,t){let n=e.doc.baseURI,r=URL.parse(t,n);return r===null?null:r.href}function long(e,t,n=0){for(let[r,i]of names(t))defineAccessor(e,r,function(){let e=contentAttr(this[M],i);if(e===null)return n;let t=parseInteger(e);return t>=-2147483648&&t<=hs?t:n},function(e){setAttribute(this[M],i,String(Number(e)|0))})}function nonNegativeLong(e,t,n=-1){for(let[r,i]of names(t))defineAccessor(e,r,function(){let e=contentAttr(this[M],i);if(e===null)return n;let t=parseNonNegativeInteger(e);return t<=hs?t:n},function(e){let t=Number(e)|0;if(t<0)throw indexSizeError(`The value provided (${t}) is negative.`);setAttribute(this[M],i,String(t))})}function ulong(e,t,n=0,r=!1){let i=+!!r;for(let[a,o]of names(t))defineAccessor(e,a,function(){let e=contentAttr(this[M],o);if(e===null)return n;let t=parseNonNegativeInteger(e);return t>=i&&t<=hs?t:n},function(e){let t=Number(e)>>>0;if(r&&t===0)throw indexSizeError(`The value provided is 0, which is not a positive number.`);t>hs&&(t=n),setAttribute(this[M],o,String(t))})}function clampedUlong(e,t,n,r,i,a){defineAccessor(e,t,function(){let e=contentAttr(this[M],n);if(e===null)return r;let t=parseNonNegativeInteger(e);return Number.isNaN(t)?r:t<i?i:t>a?a:t},function(e){let t=Number(e)>>>0;t>hs&&(t=r),setAttribute(this[M],n,String(t))})}function enumerated(e,t,n){let r=/* @__PURE__ */ new Map;for(let e of n.keywords){let t=e.indexOf(`:`);t===-1?r.set(e,e):r.set(e.slice(0,t),e.slice(t+1))}let i=n.missing===void 0?``:n.missing,a=n.invalid??``,o=n.empty??a,s=i===null;for(let[n,c]of names(t))defineAccessor(e,n,function(){let e=contentAttr(this[M],c);return e===null?i:e===``?r.get(``)??o:r.get(lower(e))??a},function(e){s&&e==null?removeAttribute(this[M],c):setAttribute(this[M],c,String(e))})}const gs={keywords:[`anonymous`,`use-credentials`],missing:null,invalid:`anonymous`,empty:`anonymous`},_s={keywords:[`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`]},vs={keywords:[`lazy`,`eager`],missing:`eager`,invalid:`eager`},ys={keywords:[`high`,`low`,`auto`],missing:`auto`,invalid:`auto`};function tokenList(e,t,n,r=null){let i=Symbol(t);defineAccessor(e,t,function(){let e=this[i];return e===void 0&&(e=new Co(this[M],n,r),Object.defineProperty(this,i,{value:e})),e},function(e){setAttribute(this[M],n,String(e))})}const bs=2147483647;function readNonNegativeLong(e,t,n){let r=contentAttr(e,t);if(r===null)return n;let i=parseNonNegativeInteger(r);return i<=bs?i:n}function readPositiveUnsigned(e,t,n){let r=contentAttr(e,t);if(r===null)return n;let i=parseNonNegativeInteger(r);return i>=1&&i<=bs?i:n}function positiveWithFallback(e,t,n,r){Object.defineProperty(e.prototype,t,{get(){return readPositiveUnsigned(this[M],n,r)},set(e){let t=toUnsignedLong(e);setAttribute(this[M],n,String(t>=1&&t<=bs?t:r))},enumerable:!0,configurable:!0})}function toUnsignedLong(e){let t=Number(e);return Number.isFinite(t)?Math.trunc(t)>>>0:0}function reflectActionURL(e,t){let n=contentAttr(e,t);if(n===null||n===``)return e.doc.URL;let r=URL.parse(n,e.doc.baseURI);return r===null?n:r.href}function isWS(e){return e===32||e===9||e===10||e===12||e===13}function stripNewlines(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===10||n===13)return e.replace(/[\r\n]/g,``)}return e}function trimASCII(e){let t=0,n=e.length;for(;t<n&&isWS(e.charCodeAt(t));)t++;for(;n>t&&isWS(e.charCodeAt(n-1));)n--;return t===0&&n===e.length?e:e.slice(t,n)}function stripAndCollapseWS(e){return trimASCII(e).replace(/[\t\n\f\r ]+/g,` `)}function normalizeNewlines(e){return e.indexOf(`\r`)===-1?e:e.replace(/\r\n?/g,`
8
+ `)}function fireEvent$1(e,t,n,r,i=!1){let a=new Event(t,{bubbles:n,cancelable:r,composed:i});return setTrusted(a),dispatch(a,e)}__name(fireEvent$1,`fireEvent`);function dispatchTrusted$1(e,t){return setTrusted(t),dispatch(t,e)}__name(dispatchTrusted$1,`dispatchTrusted`);const xs=[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`],Ss=/* @__PURE__ */ new Map;for(let e=0;e<xs.length;e++)Ss.set(xs[e],e);function inputTypeFromAttr(e){if(e===null)return 1;let t=Ss.get(e);return t===void 0?Ss.get(asciiLowercase$1(e))??1:t}function inputType(e){return inputTypeFromAttr(attr(e,`type`))}function valueMode(e){switch(e){case 0:case 18:case 19:case 20:case 21:return 1;case 15:case 16:return 2;case 17:return 3;default:return 0}}function supportsSelectionType(e){return e===1||e===2||e===3||e===4||e===6}function isTextualType(e){return e>=1&&e<=6}function isNumericType(e){return e>=7&&e<=13}function lengthApplies(e){return e>=1&&e<=6}function readonlyApplies(e){return e>=1&&e<=12}function requiredApplies(e){return e>=1&&e<=12||e===15||e===16||e===17}function placeholderApplies(e){return e>=1&&e<=6||e===12}function listApplies(e){return e>=1&&e<=5||e>=7&&e<=14}function isListed(e){let t=e.tag;return!!(e.flags&16384)||t===Y.input||t===Y.button||t===Y.select||t===Y.textarea||t===Y.fieldset||t===Y.output||t===Y.object}function isSubmittable(e){let t=e.tag;return!!(e.flags&16384)||t===Y.input||t===Y.button||t===Y.select||t===Y.textarea}function isResettable(e){let t=e.tag;return!!(e.flags&16384)||t===Y.input||t===Y.select||t===Y.textarea||t===Y.output}function isLabelable(e){switch(e.tag){case Y.button:case Y.meter:case Y.output:case Y.progress:case Y.select:case Y.textarea:return!0;case Y.input:return inputType(e)!==0}return!!(e.flags&Se)}function elementByIdInTree(e,t){if(t===``)return null;let n=treeRoot(e);return n.type===9?e.doc._idLookup(t):walkForId(n,t)}function walkForId(e,t){for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))if(n.id===t)return n;return null}function formOwner(e){if(ws!==0){let t=Cs.get(e);if(t!==void 0){if(parserAssociationValid(e,t))return t.form;Cs.delete(e),ws--}}if(e.tag!==Y.img){let t=attr(e,`form`);if(t!==null&&e.flags&1){let n=elementByIdInTree(e,t);return n!==null&&n.tag===Y.form?n:null}}for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Y.form)return t;return null}var ParserAssociation=class{form;gen;constructor(e,t){this.form=e,this.gen=t}};const Cs=/* @__PURE__ */ new WeakMap;let ws=0;function formGeneration(e){return e.node[ze]}function parserAssociateForm(e,t){t.tag===Y.form&&(Cs.has(e)||ws++,Cs.set(e,new ParserAssociation(t,formGeneration(t))),e.flags|=4,t.flags|=4)}function clearParserAssociation(e){ws!==0&&Cs.delete(e)&&ws--}function parserAssociationValid(e,t){return isListed(e)&&attr(e,`form`)!==null||formGeneration(t.form)!==t.gen?!1:treeRoot(e)===treeRoot(t.form)}function formOwnerScope(e,t){return ws===0&&(!t||e.id===``)?e:treeRoot(e)}function formControls(e,t,n){let r=formOwnerScope(e,!0);for(let i=r.type===1?r:nextElementInTree(r,r);i!==null;i=nextElementInTree(i,r))isListed(i)&&(n||i.tag!==Y.input||inputType(i)!==19)&&formOwner(i)===e&&t.push(i);return t}function firstLegend(e){for(let t=e.first;t!==null;t=t.next)if(t.tag===Y.legend)return t;return null}function inDisabledFieldset(e){let t=e;for(let n=e.parent;n!==null;t=n,n=n.parent)if(n.tag===Y.fieldset&&attr(n,`disabled`)!==null){if(t.tag===Y.legend&&firstLegend(n)===t)continue;return!0}return!1}function isActuallyDisabled(e){if(e.flags&16384)return attr(e,`disabled`)!==null||inDisabledFieldset(e);switch(e.tag){case Y.button:case Y.input:case Y.select:case Y.textarea:case Y.fieldset:return attr(e,`disabled`)!==null||inDisabledFieldset(e);case Y.optgroup:return attr(e,`disabled`)!==null;case Y.option:{if(attr(e,`disabled`)!==null)return!0;let t=e.parent;return t!==null&&t.tag===Y.optgroup&&attr(t,`disabled`)!==null}}return!1}function hasDatalistAncestor(e){for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Y.datalist)return!0;return!1}function labeledControl(e){let t=attr(e,`for`);if(t!==null){let n=elementByIdInTree(e,t);return n!==null&&isLabelable(n)?n:null}for(let t=nextElementInTree(e,e);t!==null;t=nextElementInTree(t,e))if(isLabelable(t))return t;return null}function addForLabel(e,t){let n=e.doc[qt]??=/* @__PURE__ */ new Map,r=n.get(t);r===void 0?n.set(t,[e]):r.push(e)}function removeForLabel(e,t){let n=e.doc[qt],r=n.get(t);r.length===1?n.delete(t):r.splice(r.indexOf(e),1)}function labelsFor(e,t){if(e.id===``||e.flags&1){let n=t.length;for(let r=e.parent;r!==null;r=r.parent)r.tag===Y.label&&attr(r,`for`)===null&&labeledControl(r)===e&&t.splice(n,0,r);let r=e.id===``?void 0:e.doc[qt]?.get(e.id);if(r!==void 0){let i=t.length;for(let n=0;n<r.length;n++)labeledControl(r[n])===e&&t.push(r[n]);t.length>i&&t.length-n>1&&t.push(...t.splice(n).sort(compareTreeOrder))}return t}let n=treeRoot(e);for(let r=n.type===1?n:nextElementInTree(n,n);r!==null;r=nextElementInTree(r,n))r.tag===Y.label&&labeledControl(r)===e&&t.push(r);return t}var SnapshotCache=class{items=[];version=-1;doc=null;_dropSnapshot(){this.items=[],this.version=-1,this.doc=null}},ComputedNodeList=class extends Ri{constructor(){super(null),Object.defineProperty(this,Xe,{value:new SnapshotCache})}_snapshot(){let e=this[Xe],t=this._ownerDocument();if(e.version===t[K]&&e.doc===t)return e.items;let n=this._compute();return e.items=n,e.version=t[K],e.doc=t,n.length!==0&&holdSnapshot(t,e,this._root()),n.length>Ts.count&&ensureIndexGetters(Ts,n.length),n}get length(){return this._snapshot().length}item(e){let t=this._snapshot(),n=e>>>0;return n<t.length?t[n]:null}};const Ts=indexGetterTable(ComputedNodeList.prototype,(e,t)=>{let n=e._snapshot();return t<n.length?n[t]:void 0});var LabelsNodeList=class extends ComputedNodeList{constructor(e){super(),Object.defineProperty(this,O,{value:e})}_ownerDocument(){return this[O].doc}_root(){return this[O]}_compute(){let e=labelsFor(this[O],[]),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].node;return t}},NameNodeList=class extends ComputedNodeList{constructor(e,t){super(),Object.defineProperty(this,O,{value:e}),Object.defineProperty(this,Nn,{value:t})}_ownerDocument(){return this[O].doc}_root(){return this[O]}_compute(){let e=this[O],t=this[Nn],n=[];for(let r=firstElementChild(e);r!==null;r=nextElementInTree(r,e))r.ns===`http://www.w3.org/1999/xhtml`&&r.attrs!==null&&attr(r,`name`)===t&&n.push(r.node);return n}},RadioNodeList=class extends ComputedNodeList{constructor(e,t){super(),Object.defineProperty(this,Kt,{value:e}),Object.defineProperty(this,Nn,{value:t})}_ownerDocument(){return this[Kt].doc}_root(){return this[Kt]}_compute(){let e=this[Kt].node._controls(),t=[],n=this[Nn];for(let r=0;r<e.length;r++){let i=e[r];(i.id===n||attr(i,`name`)===n)&&t.push(i.node)}return t}get value(){let e=this._snapshot();for(let t=0;t<e.length;t++){let n=e[t][M];if(n.tag===Y.input&&inputType(n)===16&&e[t].checked)return attr(n,`value`)??`on`}return``}set value(e){let t=String(e),n=this._snapshot();for(let e=0;e<n.length;e++){let r=n[e][M];if(r.tag===Y.input&&inputType(r)===16&&(attr(r,`value`)??`on`)===t){n[e].checked=!0;return}}}};Object.defineProperty(RadioNodeList.prototype,Symbol.toStringTag,{value:`RadioNodeList`,configurable:!0});var HTMLFormControlsCollection=class extends Aa{constructor(e){super(e,!1,null)}_collect(e){let t=this._s.root.node._controls();for(let n=0;n<t.length;n++)e.push(t[n].node)}namedItem(e){let t=String(e);if(t===``)return null;let n=this._snapshot(),r=null,i=0;for(let e=0;e<n.length;e++){let a=n[e][M];if((a.id===t||attr(a,`name`)===t)&&(i===0&&(r=n[e]),i++,i>1))break}return i<=1?r:new RadioNodeList(this._s.root,t)}};Object.defineProperty(HTMLFormControlsCollection.prototype,Symbol.toStringTag,{value:`HTMLFormControlsCollection`,configurable:!0});function createFormControlsCollection(e){return withNamedProperties(new HTMLFormControlsCollection(e))}function listOfOptions(e,t){let n=e.first,r=0;for(;n!==null;){let i=!1;if(n.type===1){let e=n.ns===`http://www.w3.org/1999/xhtml`?n.tag:0;e===Y.option?t.push(n):i=e===Y.optgroup?r===0:e!==Y.select&&e!==Y.hr&&e!==Y.datalist}if(i&&n.first!==null)n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Y.optgroup&&r++,n=n.first;else{for(;n!==null&&n.next===null;){if(n=n.parent,n===e||n===null)return t;n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Y.optgroup&&r--}if(n===null)return t;n=n.next}}return t}var HTMLOptionsCollection=class extends Aa{constructor(e){super(e,!1,null)}_collect(e){let t=listOfOptions(this._s.root,[]);for(let n=0;n<t.length;n++)e.push(t[n].node);ensureOptionIndexAccessors(e.length+1)}_setIndex(e,t){let n=this._s.root.node,r=this._snapshot();if(t==null){e<r.length&&r[e].remove();return}if(typeof t!=`object`||!(M in t)||t[M].tag!==Y.option)throw TypeError(`Failed to set an indexed property on 'HTMLOptionsCollection': parameter 2 is not of type 'HTMLOptionElement'.`);let i=e-r.length;if(i>0){let e=this._s.root.doc,t=e.createDocumentFragment();for(let n=0;n<i;n++)t.appendChild(e.createElement(`option`));n.appendChild(t)}if(i>=0)n.appendChild(t);else{let n=r[e];n.parentNode.replaceChild(t,n)}}get length(){return this._snapshot().length}set length(e){let t=Number(e)>>>0,n=this._s.root.node,r=this._snapshot(),i=r.length;if(t>i){if(t-i>1e5)return;let e=this._s.root.doc,r=e.createDocumentFragment();for(let n=i;n<t;n++)r.appendChild(e.createElement(`option`));n.appendChild(r)}else if(t<i){let e=r.slice(t);for(let t=0;t<e.length;t++)e[t].remove()}}add(e,t=null){let n=this._s.root.node;if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'add' on 'HTMLOptionsCollection': parameter 1 is not of type 'HTMLOptionElement or HTMLOptGroupElement'.`);let r=e[M].tag;if(r!==Y.option&&r!==Y.optgroup)throw TypeError(`Failed to execute 'add' on 'HTMLOptionsCollection': parameter 1 is not of type 'HTMLOptionElement or HTMLOptGroupElement'.`);for(let t=this._s.root;t!==null;t=t.parent)if(t===e[M])throw new DOMException(`The new element is an ancestor of the select element.`,`HierarchyRequestError`);let i=null;if(typeof t==`number`)i=this._snapshot()[t]??null;else if(t!=null){i=t;let e=!1;for(let n=t[M].parent;n!==null;n=n.parent)if(n===this._s.root){e=!0;break}if(!e)throw new DOMException(`The node before which the new node is to be inserted is not in this select.`,`NotFoundError`)}e!==i&&(i===null?n:i.parentNode).insertBefore(e,i)}remove(e){let t=this._snapshot(),n=Number(e)|0;t.length===0||n<0||n>=t.length||t[n].remove()}get selectedIndex(){return this._s.root.node.selectedIndex}set selectedIndex(e){this._s.root.node.selectedIndex=e}};let Es=0;const Ds=[{proto:HTMLOptionsCollection.prototype,coll:e=>e}];function addOptionIndexHost(e,t){Ds.push({proto:e,coll:t}),defineOptionIndices(Ds[Ds.length-1],0,Es)}function defineOptionIndices(e,t,n){let r=e.coll;for(let i=t;i<n;i++)Object.defineProperty(e.proto,i,{get(){return r(this).item(i)??void 0},set(e){r(this)._setIndex(i,e)},enumerable:!1,configurable:!0})}function ensureOptionIndexAccessors(e){if(e<=Es)return;let t=Math.max(e,Es*2,32);for(let e of Ds)defineOptionIndices(e,Es,t);Es=t}ensureOptionIndexAccessors(32);var ValidityState=class{[O];constructor(e){this[O]=e,hideInternals(this)}get valueMissing(){return!!(this[O]._validityFlags()&1)}get typeMismatch(){return!!(this[O]._validityFlags()&2)}get patternMismatch(){return!!(this[O]._validityFlags()&4)}get tooLong(){return!!(this[O]._validityFlags()&8)}get tooShort(){return!!(this[O]._validityFlags()&16)}get rangeUnderflow(){return!!(this[O]._validityFlags()&32)}get rangeOverflow(){return!!(this[O]._validityFlags()&64)}get stepMismatch(){return!!(this[O]._validityFlags()&128)}get badInput(){return!!(this[O]._validityFlags()&256)}get customError(){return!!(this[O]._validityFlags()&512)}get valid(){return this[O]._validityFlags()===0}get[Symbol.toStringTag](){return`ValidityState`}};exposeMembers(ValidityState);function isInvalidCandidate(e){return!e._barredFromValidation()&&e._validityFlags()!==0}function checkValidityOf(e){return!isInvalidCandidate(e)||(fireEvent$1(e,`invalid`,!1,!0),!1)}const Os={get willValidate(){return!this._barredFromValidation()},get validity(){let e=this;return e[Zr]??=new ValidityState(e)},get validationMessage(){let e=this;if(e._barredFromValidation())return``;let t=e._validityFlags();return t===0?``:t&512?e[T]:builtinMessage(e,t)},checkValidity(){return checkValidityOf(this)},reportValidity(){return checkValidityOf(this)},setCustomValidity(e){this[T]=normalizeNewlines(String(e))}};function installConstraintValidation(e){for(let t of Reflect.ownKeys(Os))Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(Os,t))}function builtinMessage(e,t){return e[M].doc[q]?.[R]?.validationMessages===`browser`?e._validationMessage(t):`Constraints not satisfied`}const ks=`Please fill out this field.`,As=`Please enter a valid value.`;function msgEmail(e){let t=e.indexOf(`@`);return t===-1?`Please include an '@' in the email address. '${e}' is missing an '@'.`:t===e.length-1?`Please enter a part following '@'. '${e}' is incomplete.`:t===0?`Please enter a part followed by '@'. '${e}' is incomplete.`:`Please enter an email address.`}function characters(e){return e===1?`1 character`:`${e} characters`}function msgTooLong(e,t){return`Please shorten this text to ${characters(e)} or less (you are currently using ${characters(t)}).`}function msgTooShort(e,t){return`Please lengthen this text to ${characters(e)} or more (you are currently using ${characters(t)}).`}function msgUnderflow(e,t){return t?`Value must be ${e} or later.`:`Value must be greater than or equal to ${e}.`}function msgOverflow(e,t){return t?`Value must be ${e} or earlier.`:`Value must be less than or equal to ${e}.`}function msgStep(e,t){if(e!==null&&t!==null)return`Please enter a valid value. The two nearest valid values are ${e} and ${t}.`;let n=e??t;return n===null?As:`Please enter a valid value. The nearest valid value is ${n}.`}const js=[[`valueMissing`,1],[`typeMismatch`,2],[`patternMismatch`,4],[`tooLong`,8],[`tooShort`,16],[`rangeUnderflow`,32],[`rangeOverflow`,64],[`stepMismatch`,128],[`badInput`,256],[`customError`,512]];var FaceState=class{impl;value;state;flags;message;anchor;validity;labels;lastOwner;lastDisabled;[T];[Zr];constructor(e){this.impl=e,this.value=null,this.state=null,this.flags=0,this.message=``,this.anchor=null,this.validity=null,this.labels=null,this.lastOwner=null,this.lastDisabled=!1,this[T]=``,this[Zr]=null}_validityFlags(){return this.flags}_barredFromValidation(){let e=this.impl;return isActuallyDisabled(e)||attr(e,`readonly`)!==null||hasDatalistAncestor(e)}_validationMessage(e){return this.message}};const Ms=/* @__PURE__ */ new WeakMap;function isFACE(e){return!!(e.flags&Se)}function faceState(e){let t=Ms.get(e);return t===void 0&&(t=new FaceState(e),Ms.set(e,t)),t}function validatableOf(e){return isFACE(e)?faceState(e):e.node}function assertFACE(e,t){if(!isFACE(e))throw new DOMException(`Failed to execute '${t}' on 'ElementInternals': The target element is not a form-associated custom element.`,`NotSupportedError`)}function internalsSetFormValue(e,t,n){assertFACE(e,`setFormValue`);let r=faceState(e);r.value=cloneSubmission(t),r.state=n===void 0?r.value:cloneSubmission(n)}function cloneSubmission(e){if(e==null)return null;if(e instanceof FormData){let t=new FormData;for(let[n,r]of e)t.append(n,r);return t}return e instanceof File?e:String(e)}function internalsForm(e){assertFACE(e,`form`);let t=formOwner(e);return t===null?null:t.node}function internalsLabels(e){assertFACE(e,`labels`);let t=faceState(e);return t.labels??=new LabelsNodeList(e)}function internalsSetValidity(e,t,n,r){assertFACE(e,`setValidity`);let i=0;if(t!=null)for(let[e,n]of js)t[e]&&(i|=n);if(i!==0&&(n===void 0||String(n)===``))throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.`);if(r!=null){let t=r[M];if(t===void 0||t.type!==1||t.ns!==`http://www.w3.org/1999/xhtml`)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': parameter 3 is not of type 'HTMLElement'.`);let n=!1;for(let r=t;r!==null;r=r.parent??r.node[j]?.[M]??null)if(r===e){n=!0;break}if(!n)throw new DOMException(`Failed to execute 'setValidity' on 'ElementInternals': The validation anchor is not a shadow-including descendant of the element.`,`NotFoundError`)}let a=faceState(e);a.flags=i,a.message=i===0?``:String(n).replace(/\r\n?/g,`
9
+ `),a.anchor=r??null}function internalsWillValidate(e){return assertFACE(e,`willValidate`),!faceState(e)._barredFromValidation()}function internalsValidity(e){assertFACE(e,`validity`);let t=faceState(e);return t.validity??=new ValidityState(t)}function internalsValidationMessage(e){assertFACE(e,`validationMessage`);let t=faceState(e);return t._barredFromValidation()?``:t.message}function internalsCheckValidity(e,t=`checkValidity`){assertFACE(e,t);let n=faceState(e);return n._barredFromValidation()||n.flags===0?!0:(fireEvent$1(e.node,`invalid`,!1,!0),!1)}function faceEntries(e,t){let n=Ms.get(e)?.value??null;if(n===null)return;if(n instanceof FormData){for(let[e,r]of n)t.push([e,r]);return}let r=attr(e,`name`);r!==null&&r!==``&&t.push([r,n])}function invoke(e,t,n){enqueueFormCallback(e.node,t,n)}function faceReset(e){invoke(e,`formResetCallback`,[])}function flushFaceReactions(){flushReactions()}function faceStateMaybeChanged(e){let t=faceState(e),n=formOwner(e);n!==t.lastOwner&&(t.lastOwner=n,invoke(e,`formAssociatedCallback`,[n===null?null:n.node]));let r=isActuallyDisabled(e);r!==t.lastDisabled&&(t.lastDisabled=r,invoke(e,`formDisabledCallback`,[r]))}setFaceUpgradeHook(faceStateMaybeChanged);function isNewline(e){return e===10||e===13||e===12}function isWhitespace(e){return e===32||e===9||e===10||e===13||e===12}function isDigit(e){return e>=48&&e<=57}function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexValue(e){return e<=57?e-48:e<=70?e-65+10:e-97+10}function isNonAsciiIdent(e){return e<183?!1:e===183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e===8204||e===8205||e===8255||e===8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=55296&&e<=57343||e>=63744&&e<=64975||e>=65008&&e<=65533}function isIdentStart(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||isNonAsciiIdent(e)}function isIdentChar(e){return isIdentStart(e)||isDigit(e)||e===45}function isNonPrintable(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}var CSSTokenizer=class{src;len;pos;type;start;end;value;num;isInteger;unit;hashId;sign;comments;constructor(e){this.src=e,this.len=e.length,this.pos=0,this.type=0,this.start=0,this.end=0,this.value=``,this.num=0,this.isInteger=!0,this.unit=``,this.hashId=!1,this.sign=``,this.comments=0}reset(e){this.pos=e}code(e){return e<this.len?this.src.charCodeAt(e):-1}validEscape(e){return this.code(e)===92&&!isNewline(this.code(e+1))}startsIdent(e){let t=this.code(e);if(t===45){let t=this.code(e+1);return isIdentStart(t)||t===45||this.validEscape(e+1)}return isIdentStart(t)?!0:this.validEscape(e)}startsNumber(e){let t=this.code(e);if(t===43||t===45){let t=this.code(e+1);return isDigit(t)?!0:t===46&&isDigit(this.code(e+2))}return isDigit(t===46?this.code(e+1):t)}consumeEscape(){let e=this.code(this.pos);if(e===-1)return`�`;if(isHexDigit(e)){let e=0,t=0;for(;t<6&&isHexDigit(this.code(this.pos));)e=e*16+hexValue(this.code(this.pos)),this.pos++,t++;let n=this.code(this.pos);return n===13&&this.code(this.pos+1)===10?this.pos+=2:isWhitespace(n)&&this.pos++,e===0||e>=55296&&e<=57343||e>1114111?`�`:String.fromCodePoint(e)}if(this.pos++,e===0)return`�`;if(e>=55296&&e<=56319){let e=this.code(this.pos);if(e>=56320&&e<=57343)return this.pos++,this.src.slice(this.pos-2,this.pos)}return this.src.slice(this.pos-1,this.pos)}consumeName(){let e=this.pos;for(;this.pos<this.len;){let e=this.src.charCodeAt(this.pos);if(isIdentChar(e)&&e!==0)this.pos++;else break}if(!this.validEscape(this.pos)&&this.code(this.pos)!==0)return this.src.slice(e,this.pos);let t=this.src.slice(e,this.pos);for(;this.pos<this.len;){let e=this.src.charCodeAt(this.pos);if(e===0)t+=`�`,this.pos++;else if(isIdentChar(e))t+=this.src.slice(this.pos,this.pos+1),this.pos++;else if(this.validEscape(this.pos))this.pos++,t+=this.consumeEscape();else break}return t}consumeNumber(){let e=this.pos,t=!0,n=this.code(this.pos);for(this.sign=``,(n===43||n===45)&&(this.sign=n===43?`+`:`-`,this.pos++);isDigit(this.code(this.pos));)this.pos++;if(this.code(this.pos)===46&&isDigit(this.code(this.pos+1)))for(this.pos+=2,t=!1;isDigit(this.code(this.pos));)this.pos++;if(n=this.code(this.pos),n===69||n===101){let e=this.code(this.pos+1);if(isDigit(e))for(this.pos+=2,t=!1;isDigit(this.code(this.pos));)this.pos++;else if((e===43||e===45)&&isDigit(this.code(this.pos+2)))for(this.pos+=3,t=!1;isDigit(this.code(this.pos));)this.pos++}this.num=Number(this.src.slice(e,this.pos)),this.isInteger=t}consumeNumeric(){return this.consumeNumber(),this.startsIdent(this.pos)?(this.unit=this.consumeName(),this.value=this.unit,12):this.code(this.pos)===37?(this.pos++,11):10}consumeString(e){let t=this.pos;for(;this.pos<this.len;){let n=this.src.charCodeAt(this.pos);if(n===e)return this.value=this.src.slice(t,this.pos),this.pos++,5;if(n===92||n===0||isNewline(n))break;this.pos++}let n=this.src.slice(t,this.pos);for(;;){if(this.pos>=this.len)return this.value=n,5;let t=this.src.charCodeAt(this.pos);if(t===e)return this.pos++,this.value=n,5;if(isNewline(t))return this.value=n,6;if(t===92){let e=this.code(this.pos+1);e===-1?this.pos++:isNewline(e)?this.pos+=e===13&&this.code(this.pos+2)===10?3:2:(this.pos++,n+=this.consumeEscape())}else t===0?(n+=`�`,this.pos++):(n+=this.src.slice(this.pos,this.pos+1),this.pos++)}}consumeBadUrl(){for(;this.pos<this.len;){if(this.src.charCodeAt(this.pos)===41){this.pos++;break}this.validEscape(this.pos)?(this.pos++,this.consumeEscape()):this.pos++}return this.value=``,8}consumeUrl(){for(;isWhitespace(this.code(this.pos));)this.pos++;let e=``;for(;;){if(this.pos>=this.len)return this.value=e,7;let t=this.src.charCodeAt(this.pos);if(t===41)return this.pos++,this.value=e,7;if(isWhitespace(t)){for(;isWhitespace(this.code(this.pos));)this.pos++;let t=this.code(this.pos);return t===41?(this.pos++,this.value=e,7):t===-1?(this.value=e,7):this.consumeBadUrl()}if(t===34||t===39||t===40||isNonPrintable(t))return this.pos++,this.consumeBadUrl();if(t===92){if(this.validEscape(this.pos))this.pos++,e+=this.consumeEscape();else return this.consumeBadUrl()}else t===0?(e+=`�`,this.pos++):(e+=this.src.slice(this.pos,this.pos+1),this.pos++)}}consumeIdentLike(){let e=this.consumeName();if(this.value=e,this.code(this.pos)===40){if(this.pos++,e.length===3&&asciiLower3(e)===`url`){let e=this.pos;for(;isWhitespace(this.code(e))&&isWhitespace(this.code(e+1));)e++;let t=this.code(e),n=isWhitespace(t)?this.code(e+1):t;return n===34||n===39?2:this.consumeUrl()}return 2}return 1}skipComments(){for(;this.code(this.pos)===47&&this.code(this.pos+1)===42;){let e=this.src.indexOf(`*/`,this.pos+2);this.pos=e===-1?this.len:e+2,this.comments++}}next(){this.skipComments(),this.start=this.pos,this.value=``;let e=this.consumeToken();return this.type=e,this.end=this.pos,e}consumeToken(){if(this.pos>=this.len)return 0;let e=this.src.charCodeAt(this.pos);if(isWhitespace(e)){for(this.pos++;isWhitespace(this.code(this.pos));)this.pos++;return 13}switch(e){case 34:case 39:return this.pos++,this.consumeString(e);case 35:return isIdentChar(this.code(this.pos+1))||this.validEscape(this.pos+1)?(this.pos++,this.hashId=this.startsIdent(this.pos),this.value=this.consumeName(),4):this.delim();case 40:return this.pos++,21;case 41:return this.pos++,22;case 43:return this.startsNumber(this.pos)?this.consumeNumeric():this.delim();case 44:return this.pos++,18;case 45:return this.startsNumber(this.pos)?this.consumeNumeric():this.code(this.pos+1)===45&&this.code(this.pos+2)===62?(this.pos+=3,15):this.startsIdent(this.pos)?this.consumeIdentLike():this.delim();case 46:return this.startsNumber(this.pos)?this.consumeNumeric():this.delim();case 58:return this.pos++,16;case 59:return this.pos++,17;case 60:return this.code(this.pos+1)===33&&this.code(this.pos+2)===45&&this.code(this.pos+3)===45?(this.pos+=4,14):this.delim();case 64:return this.startsIdent(this.pos+1)?(this.pos++,this.value=this.consumeName(),3):this.delim();case 91:return this.pos++,19;case 92:return this.validEscape(this.pos)?this.consumeIdentLike():this.delim();case 93:return this.pos++,20;case 123:return this.pos++,23;case 125:return this.pos++,24}return isDigit(e)?this.consumeNumeric():isIdentStart(e)||e===0?this.consumeIdentLike():this.delim()}delim(){let e=this.src.charCodeAt(this.pos);if(e>=55296&&e<=56319){let e=this.code(this.pos+1);if(e>=56320&&e<=57343)return this.value=this.src.slice(this.pos,this.pos+2),this.pos+=2,9}return this.value=this.src.slice(this.pos,this.pos+1),this.pos++,9}};function asciiLower3(e){return e.toLowerCase()}var RawDecl=class{name;value;important;constructor(e,t,n){this.name=e,this.value=t,this.important=n}},RawRule=class{kind;name;prelude;hasBlock;decls;leading;rules;constructor(e,t,n,r){this.kind=e,this.name=t,this.prelude=n,this.hasBlock=r,this.decls=[],this.leading=0,this.rules=[]}};function closerFor(e){return e===2||e===21?22:e===19?20:e===23?24:0}function stripComments(e){let t=new CSSTokenizer(e),n=``,r=0,i=t.next();for(;i!==0;)t.start!==r&&n!==``&&t.type!==13&&!n.endsWith(` `)&&needsSeparator(n.charCodeAt(n.length-1),e.charCodeAt(t.start))&&(n+=`/**/`),n+=e.slice(t.start,t.end),r=t.end,i=t.next();return n.trim()}function needsSeparator(e,t){return(e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===45||e===95||e>=128)&&(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===45||t===95||t>=128)}function isAsciiCaseInsensitive(e,t){return e.length===t.length&&e.toLowerCase()===t}var CSSParser=class{src;t;peeked;stack;valueStart;valueEnd;importantEnd;important;valueHasBlock;valueOtherCount;constructor(e){this.src=e,this.t=new CSSTokenizer(e),this.peeked=!1,this.stack=[],this.valueStart=0,this.valueEnd=0,this.importantEnd=0,this.important=!1,this.valueHasBlock=!1,this.valueOtherCount=0}advance(){return this.peeked?(this.peeked=!1,this.t.type):this.t.next()}reconsume(){this.peeked=!0}advanceNonWs(){let e=this.advance();for(;e===13;)e=this.advance();return e}mark(){return this.t.start}restore(e){this.t.reset(e),this.peeked=!1}skipBlock(e){let t=this.stack,n=t.length;for(t.push(closerFor(e));t.length>n;){let e=this.t.next();if(e===0)break;e===t[t.length-1]?t.pop():(e===2||e===21||e===19||e===23)&&t.push(closerFor(e))}t.length=n}text(e,t,n){let r=this.src.slice(e,t);return this.t.comments!==n&&r.indexOf(`/*`)!==-1?stripComments(r):r}parseStylesheet(){let e=[];for(;;){let t=this.advance();if(t===0)break;if(t!==13&&t!==14&&t!==15){if(t===3){let t=this.consumeAtRule(!1);t!==null&&e.push(t)}else{this.reconsume();let t=this.consumeQualifiedRule(!1);t!==null&&e.push(t)}}}return e}consumeAtRule(e){let t=this.t.value,n=this.t.comments,r=-1,i=-1;for(;;){let a=this.advance();if(a===17||a===0)return new RawRule(2,t,r===-1?``:this.text(r,i,n),!1);if(a===24){if(e)return this.reconsume(),new RawRule(2,t,r===-1?``:this.text(r,i,n),!1);r===-1&&(r=this.t.start),i=this.t.end}else{if(a===23){let e=new RawRule(2,t,r===-1?``:this.text(r,i,n),!0);return this.consumeBlockContents(e),e}a!==13&&(r===-1&&(r=this.t.start),(a===2||a===21||a===19)&&this.skipBlock(a),i=this.t.end)}}}consumeQualifiedRule(e){let t=this.t.comments,n=-1,r=-1;for(;;){let i=this.advance();if(i===0)return null;if(i===24){if(e)return this.reconsume(),null;n===-1&&(n=this.t.start),r=this.t.end}else{if(i===17&&e)return null;if(i===23){let e=n===-1?``:this.text(n,r,t);if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45&&e.indexOf(`:`)!==-1)return this.skipBlock(23),null;let i=new RawRule(1,``,e,!0);return this.consumeBlockContents(i),i}i!==13&&(n===-1&&(n=this.t.start),(i===2||i===21||i===19)&&this.skipBlock(i),r=this.t.end)}}}consumeBlockContents(e){for(;;){let t=this.advance();if(t===0||t===24)return;if(t===13||t===17)continue;if(t===3){let t=this.consumeAtRule(!0);t!==null&&e.rules.push(t);continue}let n=this.mark();if(t===1){let t=this.consumeDeclaration();if(t!==null){e.decls.push(t);let n=e.rules.length;if(n===0)e.leading=e.decls.length;else{let r=e.rules[n-1];r.kind!==3&&(r=new RawRule(3,``,``,!1),e.rules.push(r)),r.decls.push(t),r.leading=r.decls.length}continue}this.restore(n)}else this.reconsume();let r=this.consumeQualifiedRule(!0);r!==null&&e.rules.push(r)}}consumeDeclaration(){let e=this.t.value;if(this.advanceNonWs()!==16)return null;let t=this.t.comments;if(this.scanValue(),this.valueStart===-1)return e.charCodeAt(0)===45&&e.charCodeAt(1)===45?new RawDecl(e,``,this.important):new RawDecl(e,``,!1);let n=this.important?this.importantEnd:this.valueEnd,r=n<=this.valueStart?``:this.text(this.valueStart,n,t).trim();return(e.charCodeAt(0)!==45||e.charCodeAt(1)!==45)&&this.valueHasBlock&&this.valueOtherCount>0?null:new RawDecl(e,r,this.important)}scanValue(){this.valueStart=-1,this.valueEnd=-1,this.importantEnd=-1,this.important=!1,this.valueHasBlock=!1,this.valueOtherCount=0;let e=0,t=0,n=-1,r=-1,i=-1;for(;;){let a=this.advance();if(a===0||a===17)break;if(a===24){this.reconsume();break}if(a===13)continue;this.valueStart===-1&&(this.valueStart=this.t.start);let o=0;a===9&&this.t.value===`!`?o=1:a===1&&isAsciiCaseInsensitive(this.t.value,`important`)&&(o=2),a===23?this.valueHasBlock=!0:this.valueOtherCount++,(a===2||a===21||a===19||a===23)&&this.skipBlock(a),n=r,r=i,i=this.t.end,t=e,e=o}this.valueEnd=i,e===2&&t===1&&(this.important=!0,this.importantEnd=n===-1?this.valueStart:n,this.valueHasBlock&&(this.valueOtherCount-=2))}};function parseStylesheet(e){return new CSSParser(e).parseStylesheet()}function parseRule(e){let t=new CSSParser(e),n=t.advanceNonWs();if(n===0)return null;let r=null;return n===3?r=t.consumeAtRule(!1):(t.reconsume(),r=t.consumeQualifiedRule(!1)),r===null||(n=t.advanceNonWs(),n!==0)?null:r}function parseDeclarationList(e){let t=new CSSParser(e),n=new RawRule(1,``,``,!0);for(t.consumeBlockContents(n);t.t.type!==0;){let e=new RawRule(1,``,``,!0);t.consumeBlockContents(e);for(let t=0;t<e.decls.length;t++)n.decls.push(e.decls[t])}return n.decls}const Ns=[`-webkit-align-content`,0,``,``,`-webkit-align-items`,0,``,``,`-webkit-align-self`,0,``,``,`-webkit-animation`,0,``,`animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline`,`-webkit-animation-delay`,0,``,``,`-webkit-animation-direction`,0,``,``,`-webkit-animation-duration`,0,``,``,`-webkit-animation-fill-mode`,0,``,``,`-webkit-animation-iteration-count`,0,``,``,`-webkit-animation-name`,0,``,``,`-webkit-animation-play-state`,0,``,``,`-webkit-animation-timing-function`,0,``,``,`-webkit-appearance`,0,``,``,`-webkit-backface-visibility`,0,``,``,`-webkit-background-clip`,0,``,``,`-webkit-background-origin`,0,``,``,`-webkit-background-size`,0,``,``,`-webkit-border-bottom-left-radius`,0,``,``,`-webkit-border-bottom-right-radius`,0,``,``,`-webkit-border-radius`,0,``,`border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius`,`-webkit-border-top-left-radius`,0,``,``,`-webkit-border-top-right-radius`,0,``,``,`-webkit-box-align`,0,``,``,`-webkit-box-flex`,0,``,``,`-webkit-box-ordinal-group`,0,``,``,`-webkit-box-orient`,0,``,``,`-webkit-box-pack`,0,``,``,`-webkit-box-shadow`,0,``,`box-shadow-color box-shadow-offset box-shadow-blur box-shadow-spread box-shadow-position`,`-webkit-box-sizing`,0,``,``,`-webkit-filter`,0,``,``,`-webkit-flex`,0,``,`flex-grow flex-shrink flex-basis`,`-webkit-flex-basis`,0,``,``,`-webkit-flex-direction`,0,``,``,`-webkit-flex-flow`,0,``,`flex-direction flex-wrap`,`-webkit-flex-grow`,0,``,``,`-webkit-flex-shrink`,0,``,``,`-webkit-flex-wrap`,0,``,``,`-webkit-justify-content`,0,``,``,`-webkit-line-clamp`,0,`none`,`max-lines block-ellipsis continue`,`-webkit-mask`,0,``,`mask-image mask-position mask-size mask-repeat mask-origin mask-clip mask-composite mask-mode`,`-webkit-mask-box-image`,0,``,`mask-border-source mask-border-slice mask-border-width mask-border-outset mask-border-repeat mask-border-mode`,`-webkit-mask-box-image-outset`,0,``,``,`-webkit-mask-box-image-repeat`,0,``,``,`-webkit-mask-box-image-slice`,0,``,``,`-webkit-mask-box-image-source`,0,``,``,`-webkit-mask-box-image-width`,0,``,``,`-webkit-mask-clip`,0,``,``,`-webkit-mask-composite`,0,``,``,`-webkit-mask-image`,0,``,``,`-webkit-mask-origin`,0,``,``,`-webkit-mask-position`,0,``,``,`-webkit-mask-repeat`,0,``,``,`-webkit-mask-size`,0,``,``,`-webkit-order`,0,``,``,`-webkit-perspective`,0,``,``,`-webkit-perspective-origin`,0,``,``,`-webkit-text-fill-color`,1,`currentcolor`,``,`-webkit-text-size-adjust`,0,``,``,`-webkit-text-stroke`,1,``,`-webkit-text-stroke-width -webkit-text-stroke-color`,`-webkit-text-stroke-color`,1,`currentcolor`,``,`-webkit-text-stroke-width`,1,`0`,``,`-webkit-transform`,0,``,``,`-webkit-transform-origin`,0,``,``,`-webkit-transform-style`,0,``,``,`-webkit-transition`,0,``,`transition-property transition-duration transition-timing-function transition-delay transition-behavior`,`-webkit-transition-delay`,0,``,``,`-webkit-transition-duration`,0,``,``,`-webkit-transition-property`,0,``,``,`-webkit-transition-timing-function`,0,``,``,`-webkit-user-select`,0,``,``,`accent-color`,1,`auto`,``,`align-content`,0,`normal`,``,`align-items`,0,`normal`,``,`align-self`,0,`auto`,``,`alignment-baseline`,0,`baseline`,``,`all`,0,``,``,`anchor-name`,0,`none`,``,`anchor-scope`,0,`none`,``,`animation`,0,``,`animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline`,`animation-composition`,0,`replace`,``,`animation-delay`,0,``,`animation-delay-start animation-delay-end`,`animation-delay-end`,0,`0s`,``,`animation-delay-start`,0,`0s`,``,`animation-direction`,0,`normal`,``,`animation-duration`,0,`auto`,``,`animation-fill-mode`,0,`none`,``,`animation-iteration-count`,0,`1`,``,`animation-name`,0,`none`,``,`animation-play-state`,0,`running`,``,`animation-range`,0,``,`animation-range-start animation-range-end`,`animation-range-center`,0,`normal`,``,`animation-range-end`,0,`normal`,``,`animation-range-start`,0,`normal`,``,`animation-timeline`,0,`auto`,``,`animation-timing-function`,0,`ease`,``,`animation-trigger`,0,`none`,``,`appearance`,0,`none`,``,`aspect-ratio`,0,`auto`,``,`backdrop-filter`,0,`none`,``,`backface-visibility`,0,`visible`,``,`background`,0,``,`background-image background-position background-size background-repeat background-attachment background-origin background-clip background-color`,`background-attachment`,0,`scroll`,``,`background-blend-mode`,0,`normal`,``,`background-clip`,0,`border-box`,``,`background-color`,0,`transparent`,``,`background-image`,0,`none`,``,`background-origin`,0,`padding-box`,``,`background-position`,0,`0% 0%`,`background-position-x background-position-y`,`background-position-block`,0,`0%`,``,`background-position-inline`,0,`0%`,``,`background-position-x`,0,`0%`,``,`background-position-y`,0,`0%`,``,`background-repeat`,0,`repeat`,``,`background-repeat-block`,0,`repeat`,``,`background-repeat-inline`,0,`repeat`,``,`background-repeat-x`,0,`repeat`,``,`background-repeat-y`,0,`repeat`,``,`background-size`,0,`auto`,``,`background-tbd`,0,``,``,`baseline-shift`,0,`0`,``,`baseline-source`,0,`auto`,``,`block-ellipsis`,1,`no-ellipsis`,``,`block-size`,0,`auto`,``,`block-step`,0,``,`block-step-size block-step-insert block-step-align block-step-round`,`block-step-align`,0,`auto`,``,`block-step-insert`,0,`margin-box`,``,`block-step-round`,0,`up`,``,`block-step-size`,0,`none`,``,`bookmark-label`,0,`content(text)`,``,`bookmark-level`,0,`none`,``,`bookmark-state`,0,`open`,``,`border`,0,``,`border-width border-style border-color`,`border-block`,0,``,`border-block-start border-block-end`,`border-block-clip`,0,``,`border-block-start-clip border-block-end-clip`,`border-block-color`,0,``,`border-block-start-color border-block-end-color`,`border-block-end`,0,``,`border-block-end-width border-block-end-style border-block-end-color`,`border-block-end-clip`,0,`none`,``,`border-block-end-color`,0,`currentcolor`,``,`border-block-end-radius`,0,`0`,`border-end-start-radius border-end-end-radius`,`border-block-end-style`,0,`none`,``,`border-block-end-width`,0,`medium`,``,`border-block-start`,0,``,`border-block-start-width border-block-start-style border-block-start-color`,`border-block-start-clip`,0,`none`,``,`border-block-start-color`,0,`currentcolor`,``,`border-block-start-radius`,0,`0`,`border-start-start-radius border-start-end-radius`,`border-block-start-style`,0,`none`,``,`border-block-start-width`,0,`medium`,``,`border-block-style`,0,``,`border-block-start-style border-block-end-style`,`border-block-width`,0,``,`border-block-start-width border-block-end-width`,`border-bottom`,0,``,`border-bottom-width border-bottom-style border-bottom-color`,`border-bottom-clip`,0,`none`,``,`border-bottom-color`,0,`currentcolor`,``,`border-bottom-left-radius`,0,`0`,``,`border-bottom-radius`,0,`0`,`border-bottom-left-radius border-bottom-right-radius`,`border-bottom-right-radius`,0,`0`,``,`border-bottom-style`,0,`none`,``,`border-bottom-width`,0,`medium`,``,`border-boundary`,1,`none`,``,`border-clip`,0,``,`border-top-clip border-right-clip border-bottom-clip border-left-clip`,`border-collapse`,1,`separate`,``,`border-color`,0,``,`border-top-color border-right-color border-bottom-color border-left-color`,`border-end-end-radius`,0,`0`,``,`border-end-start-radius`,0,`0`,``,`border-image`,0,``,`border-image-source border-image-slice border-image-width border-image-outset border-image-repeat`,`border-image-outset`,0,`0`,``,`border-image-repeat`,0,`stretch`,``,`border-image-slice`,0,`100%`,``,`border-image-source`,0,`none`,``,`border-image-width`,0,`1`,``,`border-inline`,0,``,`border-inline-start border-inline-end`,`border-inline-clip`,0,``,`border-inline-start-clip border-inline-end-clip`,`border-inline-color`,0,``,`border-inline-start-color border-inline-end-color`,`border-inline-end`,0,``,`border-inline-end-width border-inline-end-style border-inline-end-color`,`border-inline-end-clip`,0,`none`,``,`border-inline-end-color`,0,`currentcolor`,``,`border-inline-end-radius`,0,`0`,`border-start-end-radius border-end-end-radius`,`border-inline-end-style`,0,`none`,``,`border-inline-end-width`,0,`medium`,``,`border-inline-start`,0,``,`border-inline-start-width border-inline-start-style border-inline-start-color`,`border-inline-start-clip`,0,`none`,``,`border-inline-start-color`,0,`currentcolor`,``,`border-inline-start-radius`,0,`0`,`border-start-start-radius border-end-start-radius`,`border-inline-start-style`,0,`none`,``,`border-inline-start-width`,0,`medium`,``,`border-inline-style`,0,``,`border-inline-start-style border-inline-end-style`,`border-inline-width`,0,``,`border-inline-start-width border-inline-end-width`,`border-left`,0,``,`border-left-width border-left-style border-left-color`,`border-left-clip`,0,`none`,``,`border-left-color`,0,`currentcolor`,``,`border-left-radius`,0,`0`,`border-top-left-radius border-bottom-left-radius`,`border-left-style`,0,`none`,``,`border-left-width`,0,`medium`,``,`border-limit`,0,`all`,``,`border-radius`,0,``,`border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius`,`border-right`,0,``,`border-right-width border-right-style border-right-color`,`border-right-clip`,0,`none`,``,`border-right-color`,0,`currentcolor`,``,`border-right-radius`,0,`0`,`border-top-right-radius border-bottom-right-radius`,`border-right-style`,0,`none`,``,`border-right-width`,0,`medium`,``,`border-shape`,0,`none`,``,`border-spacing`,1,`0px 0px`,``,`border-start-end-radius`,0,`0`,``,`border-start-start-radius`,0,`0`,``,`border-style`,0,``,`border-top-style border-right-style border-bottom-style border-left-style`,`border-top`,0,``,`border-top-width border-top-style border-top-color`,`border-top-clip`,0,`none`,``,`border-top-color`,0,`currentcolor`,``,`border-top-left-radius`,0,`0`,``,`border-top-radius`,0,`0`,`border-top-left-radius border-top-right-radius`,`border-top-right-radius`,0,`0`,``,`border-top-style`,0,`none`,``,`border-top-width`,0,`medium`,``,`border-width`,0,``,`border-top-width border-right-width border-bottom-width border-left-width`,`bottom`,0,`auto`,``,`box-decoration-break`,0,`slice`,``,`box-shadow`,0,`none`,`box-shadow-color box-shadow-offset box-shadow-blur box-shadow-spread box-shadow-position`,`box-shadow-blur`,0,`0`,``,`box-shadow-color`,0,`currentcolor`,``,`box-shadow-offset`,0,`none`,``,`box-shadow-position`,0,`outset`,``,`box-shadow-spread`,0,`0`,``,`box-sizing`,0,`content-box`,``,`box-snap`,1,`none`,``,`break-after`,0,`auto`,``,`break-before`,0,`auto`,``,`break-inside`,0,`auto`,``,`caption-side`,1,`top`,``,`caret`,1,`auto`,`caret-color caret-animation caret-shape`,`caret-animation`,1,`auto`,``,`caret-color`,1,`auto`,``,`caret-shape`,1,`auto`,``,`clear`,0,`none`,``,`clip`,0,`auto`,``,`clip-path`,0,`none`,``,`clip-rule`,1,`nonzero`,``,`color`,1,`CanvasText`,``,`color-adjust`,0,``,`print-color-adjust`,`color-interpolation`,1,`sRGB`,``,`color-interpolation-filters`,1,`linearRGB`,``,`color-scheme`,1,`normal`,``,`column-count`,0,`auto`,``,`column-fill`,0,`balance`,``,`column-gap`,0,`normal`,``,`column-height`,0,`auto`,``,`column-rule`,0,``,`column-rule-width column-rule-style column-rule-color`,`column-rule-break`,0,`normal`,``,`column-rule-color`,0,`currentcolor`,``,`column-rule-inset`,0,``,`column-rule-inset-cap-start column-rule-inset-cap-end column-rule-inset-junction-start column-rule-inset-junction-end`,`column-rule-inset-cap`,0,``,`column-rule-inset-cap-start column-rule-inset-cap-end`,`column-rule-inset-cap-end`,0,`0`,``,`column-rule-inset-cap-start`,0,`0`,``,`column-rule-inset-end`,0,``,`column-rule-inset-cap-end column-rule-inset-junction-end`,`column-rule-inset-junction`,0,``,`column-rule-inset-junction-start column-rule-inset-junction-end`,`column-rule-inset-junction-end`,0,`0`,``,`column-rule-inset-junction-start`,0,`0`,``,`column-rule-inset-start`,0,``,`column-rule-inset-cap-start column-rule-inset-junction-start`,`column-rule-style`,0,`none`,``,`column-rule-visibility-items`,0,`normal`,``,`column-rule-width`,0,`medium`,``,`column-span`,0,`none`,``,`column-width`,0,``,``,`column-wrap`,0,`auto`,``,`columns`,0,``,`column-width column-count column-height`,`contain`,0,`none`,``,`contain-intrinsic-block-size`,0,`none`,``,`contain-intrinsic-height`,0,`none`,``,`contain-intrinsic-inline-size`,0,`none`,``,`contain-intrinsic-size`,0,``,`contain-intrinsic-width contain-intrinsic-height`,`contain-intrinsic-width`,0,`none`,``,`container`,0,``,`container-name container-type`,`container-name`,0,`none`,``,`container-type`,0,`normal`,``,`content`,0,`normal`,``,`content-visibility`,0,`visible`,``,`continue`,0,`auto`,``,`copy-into`,0,`none`,``,`corner`,0,`0`,`border-radius corner-shape`,`corner-block-end`,0,`0`,`border-block-end-radius corner-block-end-shape`,`corner-block-end-shape`,0,``,`corner-end-start-shape corner-end-end-shape`,`corner-block-start`,0,`0`,`border-block-start-radius corner-block-start-shape`,`corner-block-start-shape`,0,``,`corner-start-start-shape corner-start-end-shape`,`corner-bottom`,0,`0`,`border-bottom-radius corner-bottom-shape`,`corner-bottom-left`,0,`0`,`border-bottom-left-radius corner-bottom-left-shape`,`corner-bottom-left-shape`,0,`round`,``,`corner-bottom-right`,0,`0`,`border-bottom-right-radius corner-bottom-right-shape`,`corner-bottom-right-shape`,0,`round`,``,`corner-bottom-shape`,0,``,`corner-bottom-left-shape corner-bottom-right-shape`,`corner-end-end`,0,`0`,`border-end-end-radius corner-end-end-shape`,`corner-end-end-shape`,0,`round`,``,`corner-end-start`,0,`0`,`border-end-start-radius corner-end-start-shape`,`corner-end-start-shape`,0,`round`,``,`corner-inline-end`,0,`0`,`border-inline-end-radius corner-inline-end-shape`,`corner-inline-end-shape`,0,``,`corner-start-end-shape corner-end-end-shape`,`corner-inline-start`,0,`0`,`border-inline-start-radius corner-inline-start-shape`,`corner-inline-start-shape`,0,``,`corner-start-start-shape corner-end-start-shape`,`corner-left`,0,`0`,`border-left-radius corner-left-shape`,`corner-left-shape`,0,``,`corner-top-left-shape corner-bottom-left-shape`,`corner-right`,0,`0`,`border-right-radius corner-right-shape`,`corner-right-shape`,0,``,`corner-top-right-shape corner-bottom-right-shape`,`corner-shape`,0,`round`,`corner-top-left-shape corner-top-right-shape corner-bottom-right-shape corner-bottom-left-shape`,`corner-start-end`,0,`0`,`border-start-end-radius corner-start-end-shape`,`corner-start-end-shape`,0,`round`,``,`corner-start-start`,0,`0`,`border-start-start-radius corner-start-start-shape`,`corner-start-start-shape`,0,`round`,``,`corner-top`,0,`0`,`border-top-radius corner-top-shape`,`corner-top-left`,0,`0`,`border-top-left-radius corner-top-left-shape`,`corner-top-left-shape`,0,`round`,``,`corner-top-right`,0,`0`,`border-top-right-radius corner-top-right-shape`,`corner-top-right-shape`,0,`round`,``,`corner-top-shape`,0,``,`corner-top-left-shape corner-top-right-shape`,`counter-increment`,0,`none`,``,`counter-reset`,0,`none`,``,`counter-set`,0,`none`,``,`cue`,0,``,`cue-before cue-after`,`cue-after`,0,`none`,``,`cue-before`,0,`none`,``,`cursor`,1,`auto`,``,`cx`,0,`0`,``,`cy`,0,`0`,``,`d`,0,`none`,``,`direction`,1,`ltr`,``,`display`,0,`inline`,``,`dominant-baseline`,1,`auto`,``,`dynamic-range-limit`,1,`no-limit`,``,`empty-cells`,1,`show`,``,`event-trigger`,0,`none`,``,`event-trigger-name`,0,`none`,``,`event-trigger-source`,0,`none`,``,`field-sizing`,0,`fixed`,``,`fill`,1,`black`,``,`fill-break`,0,`bounding-box`,``,`fill-color`,1,`currentcolor`,``,`fill-image`,1,`none`,``,`fill-opacity`,1,`1`,``,`fill-origin`,0,`match-parent`,``,`fill-position`,1,`0% 0%`,``,`fill-repeat`,1,`repeat`,``,`fill-rule`,1,`nonzero`,``,`fill-size`,1,`auto`,``,`filter`,0,`none`,``,`flex`,0,`0 1 auto`,`flex-grow flex-shrink flex-basis`,`flex-basis`,0,`auto`,``,`flex-direction`,0,`row`,``,`flex-flow`,0,``,`flex-direction flex-wrap`,`flex-grow`,0,`0`,``,`flex-line-count`,0,`1`,``,`flex-shrink`,0,`1`,``,`flex-wrap`,0,`nowrap`,``,`float`,0,`none`,``,`float-defer`,0,`none`,``,`float-offset`,0,`0`,``,`float-reference`,0,`inline`,``,`flood-color`,0,`black`,``,`flood-opacity`,0,`1`,``,`flow-from`,0,`none`,``,`flow-into`,0,`none`,``,`flow-tolerance`,0,`normal`,``,`font`,1,``,`font-style font-variant font-weight font-stretch font-size line-height font-family`,`font-family`,1,``,``,`font-feature-settings`,1,`normal`,``,`font-kerning`,1,`auto`,``,`font-language-override`,1,`normal`,``,`font-optical-sizing`,1,`auto`,``,`font-palette`,1,`normal`,``,`font-size`,1,`medium`,``,`font-size-adjust`,1,`none`,``,`font-stretch`,0,``,``,`font-style`,1,`normal`,``,`font-synthesis`,1,`weight style small-caps position`,`font-synthesis-weight font-synthesis-style font-synthesis-small-caps`,`font-synthesis-position`,1,`auto`,``,`font-synthesis-small-caps`,1,`auto`,``,`font-synthesis-style`,1,`auto`,``,`font-synthesis-weight`,1,`auto`,``,`font-variant`,1,`normal`,`font-variant-ligatures font-variant-caps font-variant-alternates font-variant-numeric font-variant-east-asian font-variant-position font-variant-emoji`,`font-variant-alternates`,1,`normal`,``,`font-variant-caps`,1,`normal`,``,`font-variant-east-asian`,1,`normal`,``,`font-variant-emoji`,1,`normal`,``,`font-variant-ligatures`,1,`normal`,``,`font-variant-numeric`,1,`normal`,``,`font-variant-position`,1,`normal`,``,`font-variation-settings`,1,`normal`,``,`font-weight`,1,`normal`,``,`font-width`,1,`normal`,``,`footnote-display`,0,`block`,``,`footnote-policy`,0,`auto`,``,`forced-color-adjust`,1,`auto`,``,`frame-sizing`,0,`auto`,``,`gap`,0,``,`row-gap column-gap`,`glyph-orientation-vertical`,0,``,``,`grid`,0,`none`,`grid-template-rows grid-template-columns grid-template-areas grid-auto-rows grid-auto-columns grid-auto-flow`,`grid-area`,0,`auto`,`grid-row-start grid-column-start grid-row-end grid-column-end`,`grid-auto-columns`,0,`auto`,``,`grid-auto-flow`,0,`row`,``,`grid-auto-rows`,0,`auto`,``,`grid-column`,0,`auto`,`grid-column-start grid-column-end`,`grid-column-end`,0,`auto`,``,`grid-column-gap`,0,``,``,`grid-column-start`,0,`auto`,``,`grid-gap`,0,``,`row-gap column-gap`,`grid-row`,0,`auto`,`grid-row-start grid-row-end`,`grid-row-end`,0,`auto`,``,`grid-row-gap`,0,``,``,`grid-row-start`,0,`auto`,``,`grid-template`,0,`none`,`grid-template-rows grid-template-columns grid-template-areas`,`grid-template-areas`,0,`none`,``,`grid-template-columns`,0,`none`,``,`grid-template-rows`,0,`none`,``,`hanging-punctuation`,1,`none`,``,`height`,0,`auto`,``,`hyphenate-character`,1,`auto`,``,`hyphenate-limit-chars`,1,`auto`,``,`hyphenate-limit-last`,1,`none`,``,`hyphenate-limit-lines`,1,`no-limit`,``,`hyphenate-limit-zone`,1,`0`,``,`hyphens`,1,`manual`,``,`image-animation`,1,`normal`,``,`image-orientation`,1,`from-image`,``,`image-rendering`,1,`auto`,``,`image-resolution`,1,`1dppx`,``,`initial-letter`,0,`normal`,``,`initial-letter-align`,1,`alphabetic`,``,`initial-letter-wrap`,1,`none`,``,`inline-size`,0,`auto`,``,`inline-sizing`,1,`normal`,``,`input-security`,0,`auto`,``,`inset`,0,`auto`,`top right bottom left`,`inset-block`,0,`auto`,`inset-block-start inset-block-end`,`inset-block-end`,0,`auto`,``,`inset-block-start`,0,`auto`,``,`inset-inline`,0,`auto`,`inset-inline-start inset-inline-end`,`inset-inline-end`,0,`auto`,``,`inset-inline-start`,0,`auto`,``,`interactivity`,1,`auto`,``,`interest-delay`,0,``,`interest-delay-start interest-delay-end`,`interest-delay-end`,1,`normal`,``,`interest-delay-start`,1,`normal`,``,`interpolate-size`,1,`numeric-only`,``,`isolation`,0,`auto`,``,`justify-content`,0,`normal`,``,`justify-items`,0,`legacy`,``,`justify-self`,0,`auto`,``,`left`,0,`auto`,``,`letter-spacing`,1,`normal`,``,`lighting-color`,0,`white`,``,`line-break`,1,`auto`,``,`line-clamp`,0,`none`,`max-lines block-ellipsis continue`,`line-fit-edge`,1,`leading`,``,`line-grid`,0,`match-parent`,``,`line-height`,1,`normal`,``,`line-height-step`,1,`0`,``,`line-padding`,1,`0`,``,`line-snap`,1,`none`,``,`link-parameters`,0,`none`,``,`list-style`,0,``,`list-style-type list-style-position list-style-image`,`list-style-image`,1,`none`,``,`list-style-position`,1,`outside`,``,`list-style-type`,1,`disc`,``,`margin`,0,`0`,`margin-top margin-right margin-bottom margin-left`,`margin-block`,0,``,`margin-block-start margin-block-end`,`margin-block-end`,0,`0`,``,`margin-block-start`,0,`0`,``,`margin-bottom`,0,`0`,``,`margin-break`,0,`auto`,``,`margin-inline`,0,``,`margin-inline-start margin-inline-end`,`margin-inline-end`,0,`0`,``,`margin-inline-start`,0,`0`,``,`margin-left`,0,`0`,``,`margin-right`,0,`0`,``,`margin-top`,0,`0`,``,`margin-trim`,0,`none`,``,`marker`,1,``,`marker-start marker-mid marker-end`,`marker-end`,1,`none`,``,`marker-mid`,1,`none`,``,`marker-side`,1,`match-self`,``,`marker-start`,1,`none`,``,`mask`,0,``,`mask-image mask-position mask-size mask-repeat mask-origin mask-clip mask-composite mask-mode`,`mask-border`,0,``,`mask-border-source mask-border-slice mask-border-width mask-border-outset mask-border-repeat mask-border-mode`,`mask-border-mode`,0,`alpha`,``,`mask-border-outset`,0,`0`,``,`mask-border-repeat`,0,`stretch`,``,`mask-border-slice`,0,`0`,``,`mask-border-source`,0,`none`,``,`mask-border-width`,0,`auto`,``,`mask-clip`,0,`border-box`,``,`mask-composite`,0,`add`,``,`mask-image`,0,`none`,``,`mask-mode`,0,`match-source`,``,`mask-origin`,0,`border-box`,``,`mask-position`,0,`0% 0%`,``,`mask-repeat`,0,`repeat`,``,`mask-size`,0,`auto`,``,`mask-type`,0,`luminance`,``,`math-depth`,1,`0`,``,`math-shift`,1,`normal`,``,`math-style`,1,`normal`,``,`max-block-size`,0,`none`,``,`max-height`,0,`none`,``,`max-inline-size`,0,`none`,``,`max-lines`,0,`none`,``,`max-size`,0,`none`,`max-width max-height`,`max-width`,0,`none`,``,`min-block-size`,0,`auto`,``,`min-height`,0,`auto`,``,`min-inline-size`,0,`auto`,``,`min-intrinsic-sizing`,0,`legacy`,``,`min-size`,0,`auto`,`min-width min-height`,`min-width`,0,`auto`,``,`mix-blend-mode`,0,`normal`,``,`nav-down`,0,`auto`,``,`nav-left`,0,`auto`,``,`nav-right`,0,`auto`,``,`nav-up`,0,`auto`,``,`object-fit`,0,`fill`,``,`object-position`,0,`50% 50%`,``,`object-view-box`,0,`none`,``,`offset`,0,``,`offset-path offset-distance offset-rotate offset-anchor offset-position`,`offset-anchor`,0,`auto`,``,`offset-distance`,0,`0`,``,`offset-path`,0,`none`,``,`offset-position`,0,`normal`,``,`offset-rotate`,0,`auto`,``,`opacity`,0,`1`,``,`order`,0,`0`,``,`orphans`,1,`2`,``,`outline`,0,``,`outline-width outline-style outline-color`,`outline-color`,0,`auto`,``,`outline-offset`,0,`0`,``,`outline-style`,0,`none`,``,`outline-width`,0,`medium`,``,`overflow`,0,`visible`,`overflow-x overflow-y`,`overflow-anchor`,0,`auto`,``,`overflow-block`,0,`visible`,``,`overflow-clip-margin`,0,`0px`,`overflow-clip-margin-top overflow-clip-margin-right overflow-clip-margin-bottom overflow-clip-margin-left`,`overflow-clip-margin-block`,0,`0px`,`overflow-clip-margin-block-start overflow-clip-margin-block-end`,`overflow-clip-margin-block-end`,0,`0px`,``,`overflow-clip-margin-block-start`,0,`0px`,``,`overflow-clip-margin-bottom`,0,`0px`,``,`overflow-clip-margin-inline`,0,`0px`,`overflow-clip-margin-inline-start overflow-clip-margin-inline-end`,`overflow-clip-margin-inline-end`,0,`0px`,``,`overflow-clip-margin-inline-start`,0,`0px`,``,`overflow-clip-margin-left`,0,`0px`,``,`overflow-clip-margin-right`,0,`0px`,``,`overflow-clip-margin-top`,0,`0px`,``,`overflow-inline`,0,`visible`,``,`overflow-wrap`,1,`normal`,``,`overflow-x`,0,`visible`,``,`overflow-y`,0,`visible`,``,`overlay`,0,`none`,``,`overscroll-behavior`,0,`auto auto`,`overscroll-behavior-x overscroll-behavior-y`,`overscroll-behavior-block`,0,`auto`,``,`overscroll-behavior-inline`,0,`auto`,``,`overscroll-behavior-x`,0,`auto`,``,`overscroll-behavior-y`,0,`auto`,``,`padding`,0,`0`,`padding-top padding-right padding-bottom padding-left`,`padding-block`,0,``,`padding-block-start padding-block-end`,`padding-block-end`,0,`0`,``,`padding-block-start`,0,`0`,``,`padding-bottom`,0,`0`,``,`padding-inline`,0,``,`padding-inline-start padding-inline-end`,`padding-inline-end`,0,`0`,``,`padding-inline-start`,0,`0`,``,`padding-left`,0,`0`,``,`padding-right`,0,`0`,``,`padding-top`,0,`0`,``,`page`,0,`auto`,``,`page-break-after`,0,`auto`,``,`page-break-before`,0,`auto`,``,`page-break-inside`,0,`auto`,``,`paint-order`,1,`normal`,``,`path-length`,0,`none`,``,`pause`,0,``,`pause-before pause-after`,`pause-after`,0,`none`,``,`pause-before`,0,`none`,``,`perspective`,0,`none`,``,`perspective-origin`,0,`50% 50%`,``,`place-content`,0,`normal`,`align-content justify-content`,`place-items`,0,``,`align-items justify-items`,`place-self`,0,`auto`,`align-self justify-self`,`pointer-events`,1,`auto`,``,`pointer-timeline`,0,``,`pointer-timeline-name pointer-timeline-axis`,`pointer-timeline-axis`,0,`block`,``,`pointer-timeline-name`,0,`none`,``,`position`,0,`static`,``,`position-anchor`,0,`normal`,``,`position-area`,0,`none`,``,`position-try`,0,``,`position-try-order position-try-fallbacks`,`position-try-fallbacks`,0,`none`,``,`position-try-order`,0,`normal`,``,`position-visibility`,0,`anchor-visible`,``,`print-color-adjust`,1,`economy`,``,`quotes`,1,`auto`,``,`r`,0,`0`,``,`reading-flow`,0,`normal`,``,`reading-order`,0,`0`,``,`region-fragment`,0,`auto`,``,`resize`,0,`none`,``,`rest`,0,``,`rest-before rest-after`,`rest-after`,0,`none`,``,`rest-before`,0,`none`,``,`right`,0,`auto`,``,`rotate`,0,`none`,``,`row-gap`,0,`normal`,``,`row-rule`,0,``,`row-rule-width row-rule-style row-rule-color`,`row-rule-break`,0,`normal`,``,`row-rule-color`,0,`currentcolor`,``,`row-rule-inset`,0,``,`row-rule-inset-cap-start row-rule-inset-cap-end row-rule-inset-junction-start row-rule-inset-junction-end`,`row-rule-inset-cap`,0,``,`row-rule-inset-cap-start row-rule-inset-cap-end`,`row-rule-inset-cap-end`,0,`0`,``,`row-rule-inset-cap-start`,0,`0`,``,`row-rule-inset-end`,0,``,`row-rule-inset-cap-end row-rule-inset-junction-end`,`row-rule-inset-junction`,0,``,`row-rule-inset-junction-start row-rule-inset-junction-end`,`row-rule-inset-junction-end`,0,`0`,``,`row-rule-inset-junction-start`,0,`0`,``,`row-rule-inset-start`,0,``,`row-rule-inset-cap-start row-rule-inset-junction-start`,`row-rule-style`,0,`none`,``,`row-rule-visibility-items`,0,`normal`,``,`row-rule-width`,0,`medium`,``,`ruby-align`,1,`space-around`,``,`ruby-merge`,1,`separate`,``,`ruby-overhang`,1,`auto`,``,`ruby-position`,1,`alternate`,``,`rule`,0,``,`column-rule row-rule`,`rule-break`,0,``,`column-rule-break row-rule-break`,`rule-color`,0,``,`column-rule-color row-rule-color`,`rule-inset`,0,``,`column-rule-inset row-rule-inset`,`rule-inset-cap`,0,``,`column-rule-inset-cap`,`rule-inset-end`,0,``,`column-rule-inset-end row-rule-inset-end`,`rule-inset-junction`,0,``,`column-rule-inset-junction`,`rule-inset-start`,0,``,`column-rule-inset-start row-rule-inset-start`,`rule-overlap`,0,`row-over-column`,``,`rule-style`,0,``,`column-rule-style row-rule-style`,`rule-visibility-items`,0,``,`column-rule-visibility-items`,`rule-width`,0,``,`column-rule-width row-rule-width`,`rx`,0,`auto`,``,`ry`,0,`auto`,``,`scale`,0,`none`,``,`scroll-axis-lock`,0,`auto`,``,`scroll-behavior`,0,`auto`,``,`scroll-initial-target`,0,`none`,``,`scroll-margin`,0,`0`,`scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left`,`scroll-margin-block`,0,`0`,`scroll-margin-block-start scroll-margin-block-end`,`scroll-margin-block-end`,0,`0`,``,`scroll-margin-block-start`,0,`0`,``,`scroll-margin-bottom`,0,`0`,``,`scroll-margin-inline`,0,`0`,`scroll-margin-inline-start scroll-margin-inline-end`,`scroll-margin-inline-end`,0,`0`,``,`scroll-margin-inline-start`,0,`0`,``,`scroll-margin-left`,0,`0`,``,`scroll-margin-right`,0,`0`,``,`scroll-margin-top`,0,`0`,``,`scroll-marker-group`,0,`none`,``,`scroll-padding`,0,`auto`,`scroll-padding-top scroll-padding-right scroll-padding-bottom scroll-padding-left`,`scroll-padding-block`,0,`auto`,`scroll-padding-block-start scroll-padding-block-end`,`scroll-padding-block-end`,0,`auto`,``,`scroll-padding-block-start`,0,`auto`,``,`scroll-padding-bottom`,0,`auto`,``,`scroll-padding-inline`,0,`auto`,`scroll-padding-inline-start scroll-padding-inline-end`,`scroll-padding-inline-end`,0,`auto`,``,`scroll-padding-inline-start`,0,`auto`,``,`scroll-padding-left`,0,`auto`,``,`scroll-padding-right`,0,`auto`,``,`scroll-padding-top`,0,`auto`,``,`scroll-snap-align`,0,`none`,``,`scroll-snap-stop`,0,`normal`,``,`scroll-snap-type`,0,`none`,``,`scroll-target-group`,0,`none`,``,`scroll-timeline`,0,``,`scroll-timeline-name scroll-timeline-axis`,`scroll-timeline-axis`,0,`block`,``,`scroll-timeline-name`,0,`none`,``,`scrollbar-color`,1,`auto`,``,`scrollbar-gutter`,0,`auto`,``,`scrollbar-width`,0,`auto`,``,`shape-image-threshold`,0,`0`,``,`shape-inside`,0,`auto`,``,`shape-margin`,0,`0`,``,`shape-outside`,0,`none`,``,`shape-padding`,0,`0`,``,`shape-rendering`,1,`auto`,``,`size`,0,`auto`,`width height`,`slider-orientation`,0,`auto`,``,`spatial-navigation-action`,0,`auto`,``,`spatial-navigation-contain`,0,`auto`,``,`spatial-navigation-function`,0,`normal`,``,`speak`,1,`auto`,``,`speak-as`,1,`normal`,``,`stop-color`,0,``,``,`stop-opacity`,0,``,``,`string-set`,0,`none`,``,`stroke`,1,`none`,``,`stroke-align`,1,`center`,``,`stroke-alignment`,1,`center`,``,`stroke-break`,0,`bounding-box`,``,`stroke-color`,1,`transparent`,``,`stroke-dash-corner`,1,`none`,``,`stroke-dash-justify`,1,`none`,``,`stroke-dashadjust`,1,`none`,``,`stroke-dasharray`,1,`none`,``,`stroke-dashcorner`,1,`none`,``,`stroke-dashoffset`,1,`0`,``,`stroke-image`,1,`none`,``,`stroke-linecap`,1,`butt`,``,`stroke-linejoin`,1,`miter`,``,`stroke-miterlimit`,1,`4`,``,`stroke-opacity`,1,`1`,``,`stroke-origin`,0,`match-parent`,``,`stroke-position`,1,`0% 0%`,``,`stroke-repeat`,1,`repeat`,``,`stroke-size`,1,`auto`,``,`stroke-width`,1,`1px`,``,`tab-size`,1,`8`,``,`table-layout`,0,`auto`,``,`text-align`,1,`start`,`text-align-all text-align-last`,`text-align-all`,1,`start`,``,`text-align-last`,1,`auto`,``,`text-anchor`,1,`start`,``,`text-autospace`,1,`normal`,``,`text-box`,0,`normal`,``,`text-box-edge`,1,`auto`,``,`text-box-trim`,0,`none`,``,`text-combine-upright`,1,`none`,``,`text-decoration`,0,``,`text-decoration-line text-decoration-thickness text-decoration-style text-decoration-color`,`text-decoration-color`,0,`currentcolor`,``,`text-decoration-inset`,0,`0`,``,`text-decoration-line`,0,`none`,``,`text-decoration-skip`,1,``,`text-decoration-skip-self text-decoration-skip-box text-decoration-skip-spaces text-decoration-skip-ink`,`text-decoration-skip-box`,1,`none`,``,`text-decoration-skip-ink`,1,`auto`,``,`text-decoration-skip-self`,0,`auto`,``,`text-decoration-skip-spaces`,1,`start end`,``,`text-decoration-style`,0,`solid`,``,`text-decoration-thickness`,0,`auto`,``,`text-emphasis`,0,``,`text-emphasis-style text-emphasis-color`,`text-emphasis-color`,1,`currentcolor`,``,`text-emphasis-position`,1,`over right`,``,`text-emphasis-skip`,1,`spaces punctuation`,``,`text-emphasis-style`,1,`none`,``,`text-fit`,1,`none`,``,`text-group-align`,0,`none`,``,`text-indent`,1,`0`,``,`text-justify`,1,`auto`,``,`text-orientation`,1,`mixed`,``,`text-overflow`,0,`clip`,``,`text-rendering`,1,`auto`,``,`text-shadow`,1,`none`,``,`text-size-adjust`,1,`auto`,``,`text-spacing`,1,``,`text-spacing-trim text-autospace`,`text-spacing-trim`,1,`normal`,``,`text-transform`,1,`none`,``,`text-underline-offset`,1,`auto`,``,`text-underline-position`,1,`auto`,``,`text-wrap`,0,`wrap`,`text-wrap-mode text-wrap-style`,`text-wrap-mode`,1,`wrap`,``,`text-wrap-style`,1,`auto`,``,`timeline-scope`,0,`none`,``,`timeline-trigger`,0,``,`timeline-trigger-name timeline-trigger-source timeline-trigger-activation-range timeline-trigger-active-range`,`timeline-trigger-activation-range`,0,``,`timeline-trigger-activation-range-start timeline-trigger-activation-range-end`,`timeline-trigger-activation-range-end`,0,`normal`,``,`timeline-trigger-activation-range-start`,0,`normal`,``,`timeline-trigger-active-range`,0,``,`timeline-trigger-active-range-start timeline-trigger-active-range-end`,`timeline-trigger-active-range-end`,0,`auto`,``,`timeline-trigger-active-range-start`,0,`auto`,``,`timeline-trigger-name`,0,`none`,``,`timeline-trigger-source`,0,`auto`,``,`top`,0,`auto`,``,`touch-action`,0,`auto`,``,`transform`,0,`none`,``,`transform-box`,0,`view-box`,``,`transform-origin`,0,`50% 50%`,``,`transform-style`,0,`flat`,``,`transition`,0,``,`transition-property transition-duration transition-timing-function transition-delay transition-behavior`,`transition-behavior`,0,`normal`,``,`transition-delay`,0,`0s`,``,`transition-duration`,0,`0s`,``,`transition-property`,0,`all`,``,`transition-timing-function`,0,`ease`,``,`translate`,0,`none`,``,`trigger-scope`,0,`none`,``,`unicode-bidi`,0,`normal`,``,`user-select`,0,`auto`,``,`vector-effect`,0,`none`,``,`vertical-align`,0,`baseline`,`alignment-baseline baseline-shift baseline-source`,`view-timeline`,0,``,`view-timeline-name view-timeline-axis`,`view-timeline-axis`,0,`block`,``,`view-timeline-inset`,0,`auto`,``,`view-timeline-name`,0,`none`,``,`view-transition-class`,0,`none`,``,`view-transition-group`,0,`normal`,``,`view-transition-name`,0,`none`,``,`view-transition-scope`,0,`none`,``,`visibility`,1,`visible`,``,`voice-balance`,1,`center`,``,`voice-duration`,0,`auto`,``,`voice-family`,1,`implementation-dependent`,``,`voice-pitch`,1,`medium`,``,`voice-range`,1,`medium`,``,`voice-rate`,1,`normal`,``,`voice-stress`,1,`normal`,``,`voice-volume`,1,`medium`,``,`white-space`,0,`normal`,`white-space-collapse text-wrap-mode`,`white-space-collapse`,1,`collapse`,``,`white-space-trim`,0,`none`,``,`widows`,1,`2`,``,`width`,0,`auto`,``,`will-change`,0,`auto`,``,`window-drag`,1,`none`,``,`word-break`,1,`normal`,``,`word-space-transform`,1,`none`,``,`word-spacing`,1,`normal`,``,`word-wrap`,0,``,``,`wrap-after`,0,`auto`,``,`wrap-before`,0,`auto`,``,`wrap-flow`,0,`auto`,``,`wrap-inside`,0,`auto`,``,`wrap-through`,0,`wrap`,``,`writing-mode`,1,`horizontal-tb`,``,`x`,0,`0`,``,`y`,0,`0`,``,`z-index`,0,`auto`,``,`zoom`,0,`1`,``];var PropInfo=class{name;inherited;initial;specLonghands;constructor(e,t,n,r){this.name=e,this.inherited=t,this.initial=n,this.specLonghands=r}};const Ps={color:`rgb(0, 0, 0)`,"background-color":`rgba(0, 0, 0, 0)`,"border-top-color":`currentcolor`,"border-right-color":`currentcolor`,"border-bottom-color":`currentcolor`,"border-left-color":`currentcolor`,"outline-color":`currentcolor`,"border-block-start-color":`currentcolor`,"border-block-end-color":`currentcolor`,"border-inline-start-color":`currentcolor`,"border-inline-end-color":`currentcolor`,"text-decoration-color":`currentcolor`,"column-rule-color":`currentcolor`,"caret-color":`currentcolor`,"text-emphasis-color":`currentcolor`,"-webkit-text-fill-color":`currentcolor`,"-webkit-text-stroke-color":`currentcolor`,"margin-top":`0px`,"margin-right":`0px`,"margin-bottom":`0px`,"margin-left":`0px`,"padding-top":`0px`,"padding-right":`0px`,"padding-bottom":`0px`,"padding-left":`0px`,"border-top-width":`medium`,"border-right-width":`medium`,"border-bottom-width":`medium`,"border-left-width":`medium`,"outline-width":`medium`,"column-rule-width":`medium`,"border-top-left-radius":`0px`,"border-top-right-radius":`0px`,"border-bottom-right-radius":`0px`,"border-bottom-left-radius":`0px`,"font-size":`16px`,"font-weight":`400`,"font-family":`"Times New Roman"`,"font-style":`normal`,"font-variant":`normal`,"line-height":`normal`,"letter-spacing":`normal`,"word-spacing":`0px`,"text-indent":`0px`,"outline-offset":`0px`,"min-width":`auto`,"min-height":`auto`,"max-width":`none`,"max-height":`none`,"flex-basis":`auto`,"flex-grow":`0`,"flex-shrink":`1`,order:`0`,"background-image":`none`,"background-position-x":`0%`,"background-position-y":`0%`,"background-position":`0% 0%`,"background-size":`auto`,"background-repeat":`repeat`,"background-origin":`padding-box`,"background-clip":`border-box`,"background-attachment":`scroll`,"border-image":`none`,"border-spacing":`0px 0px`,"transition-duration":`0s`,"transition-delay":`0s`,"animation-duration":`0s`,"animation-delay":`0s`,"text-align":`start`,opacity:`1`,"z-index":`auto`,"row-gap":`normal`,"column-gap":`normal`,"user-select":`auto`,"-webkit-user-select":`auto`,content:`normal`,quotes:`auto`,"list-style-type":`disc`,"vertical-align":`baseline`,"white-space":`normal`,"text-transform":`none`};let Fs=null,Is=null;function buildTable(){Fs=/* @__PURE__ */ new Map,Is=[];for(let e=0;e<Ns.length;e+=4){let t=Ns[e],n=Ns[e+1]===1,r=Ps[t]??Ns[e+2],i=Ns[e+3];Fs.set(t,new PropInfo(t,n,r,i===``?null:i.split(` `))),Is.push(t)}for(let e of Is){if(!e.startsWith(`-webkit-`))continue;let t=Fs.get(e),n=Fs.get(e.slice(8));n!==void 0&&t.initial===``&&t.specLonghands===null&&(t.inherited=n.inherited,t.initial=n.initial)}}function propertyInfo(e){return Fs===null&&buildTable(),Fs.get(e)}function isSupportedProperty(e){return Fs===null&&buildTable(),Fs.has(e)}function isCustomPropertyName(e){return e.length>2&&e.charCodeAt(0)===45&&e.charCodeAt(1)===45}function allPropertyNames(){return Is===null&&buildTable(),Is}let Ls=null;function computedPropertyNames(){if(Ls!==null)return Ls;Ls=[],Fs===null&&buildTable();for(let e of Is){let t=Fs.get(e);e.charCodeAt(0)!==45&&t.specLonghands===null&&Ls.push(e)}return Ls}function cssPropertyToIDLAttribute(e,t){t&&e.charCodeAt(0)===45&&(e=e.slice(1));let n=``,r=!1;for(let t=0;t<e.length;t++){let i=e[t];i===`-`?r=!0:r?(r=!1,n+=i.toUpperCase()):n+=i}return n}const Rs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},zs={accentcolor:30207,accentcolortext:16777215,activetext:16711680,buttonborder:7763574,buttonface:15724527,buttontext:0,canvas:16777215,canvastext:0,field:16777215,fieldtext:0,graytext:8421504,highlight:11916799,highlighttext:0,linktext:238,mark:16776960,marktext:0,selecteditem:30207,selecteditemtext:16777215,visitedtext:5577355},Bs=/* @__PURE__ */ new Set([`lab`,`lch`,`oklab`,`oklch`,`color`,`color-mix`,`light-dark`,`device-cmyk`,`contrast-color`]);function isNamedColor(e){return Rs[e]!==void 0||zs[e]!==void 0||e===`transparent`||e===`currentcolor`}var RGBA=class{r;g;b;a;constructor(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}};function clamp$1(e,t,n){return e<t?t:e>n?n:e}__name(clamp$1,`clamp`);function formatAlpha(e){let t=Math.round(clamp$1(e,0,1)*255),n=Math.round(t/255*100)/100;return Math.round(n*255)!==t&&(n=Math.round(t/255*1e3)/1e3),String(n)}function serializeRGBA(e){let t=Math.round(clamp$1(e.r,0,255)),n=Math.round(clamp$1(e.g,0,255)),r=Math.round(clamp$1(e.b,0,255)),i=clamp$1(e.a,0,1);return i>=1?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${formatAlpha(i)})`}function fromPacked(e,t){return new RGBA(e>>16&255,e>>8&255,e&255,t)}function hexDigit(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e>=65&&e<=70?e-55:-1}function parseHex(e){let t=e.length;if(t!==3&&t!==4&&t!==6&&t!==8)return null;let n=[];for(let r=0;r<t;r++){let t=hexDigit(e.charCodeAt(r));if(t===-1)return null;n.push(t)}return t<=4?new RGBA(n[0]*17,n[1]*17,n[2]*17,t===4?n[3]*17/255:1):new RGBA(n[0]*16+n[1],n[2]*16+n[3],n[4]*16+n[5],t===8?(n[6]*16+n[7])/255:1)}function splitArgs(e){let t=e.trim();if(t.indexOf(`,`)!==-1){let e=t.split(`,`).map(e=>e.trim());for(let t of e)if(t===``||/\s/.test(t))return null;return e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);if(n!==-1){let e=t.slice(n+1).trim();if(e===``||/\s/.test(e))return null;r.push(e)}return r}const Vs=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function parseChannel(e,t){if(e.toLowerCase()===`none`)return 0;let n=Vs.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function parseAlpha(e){if(e===void 0)return 1;let t=parseChannel(e,1);return t===null?null:clamp$1(t,0,1)}function parseHue(e){if(e.toLowerCase()===`none`)return 0;let t=Vs.exec(e);if(t===null)return null;let n=Number(t[1]),r=t[2]?.toLowerCase();return r===void 0||r===`deg`?n:r===`grad`?n*360/400:r===`rad`?n*180/Math.PI:r===`turn`?n*360:null}function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp$1(t,0,1),n=clamp$1(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return n-a*Math.max(-1,Math.min(i-3,9-i,1))};return[f(0)*255,f(8)*255,f(4)*255]}function hwbToRgb(e,t,n){if(t+n>=1){let e=t/(t+n)*255;return[e,e,e]}let r=hslToRgb(e,1,.5);for(let e=0;e<3;e++)r[e]=r[e]/255*(1-t-n)*255+t*255;return r}function parseColorFunction(e,t){let n=splitArgs(t);if(n===null||n.length!==3&&n.length!==4)return null;if(e===`rgb`||e===`rgba`){let e=parseChannel(n[0],255),t=parseChannel(n[1],255),r=parseChannel(n[2],255),i=parseAlpha(n[3]);return e===null||t===null||r===null||i===null?null:new RGBA(e,t,r,i)}if(e===`hsl`||e===`hsla`||e===`hwb`){let t=parseHue(n[0]),r=parseChannel(n[1],1),i=parseChannel(n[2],1),a=parseAlpha(n[3]);if(t===null||r===null||i===null||a===null)return null;let o=n[1].endsWith(`%`)?r:r/100,s=n[2].endsWith(`%`)?i:i/100,[c,l,u]=e===`hwb`?hwbToRgb(t,o,s):hslToRgb(t,o,s);return new RGBA(c,l,u,a)}return null}function normalizeColor(e){let t=e.trim();if(t===``)return null;if(t.charCodeAt(0)===35){let e=parseHex(t.slice(1));return e===null?null:serializeRGBA(e)}let n=t.indexOf(`(`);if(n===-1){let e=t.toLowerCase();return isNamedColor(e)?e:null}if(!t.endsWith(`)`))return null;let r=t.slice(0,n).toLowerCase(),i=t.slice(n+1,-1);if(Ws.test(i)&&(Hs.has(r)||Us.has(r)))return normalizeRelativeColor(r,i);if(Bs.has(r))return normalizeOtherColorFunction(r,i,t);let a=parseColorFunction(r,i);return a===null?null:serializeRGBA(a)}const Hs=/* @__PURE__ */ new Set([`rgb`,`rgba`,`hsl`,`hsla`,`hwb`]),Us=/* @__PURE__ */ new Set([`lab`,`lch`,`oklab`,`oklch`]),Ws=/^\s*from\s/i,Gs=/^(calc|min|max|clamp|round|mod|rem|abs|sign|sin|cos|tan|asin|acos|atan|atan2|pow|sqrt|hypot|log|exp)\(/i,Ks={lab:[100,125,125],lch:[100,150,0],oklab:[1,.4,.4],oklch:[1,.4,0]},qs=/* @__PURE__ */ new Set([`srgb`,`srgb-linear`,`display-p3`,`display-p3-linear`,`a98-rgb`,`prophoto-rgb`,`rec2020`,`xyz`,`xyz-d50`,`xyz-d65`]),Js=/* @__PURE__ */ new Set([`hsl`,`hwb`,`lch`,`oklch`]),Ys=/* @__PURE__ */ new Set([`srgb`,`srgb-linear`,`display-p3`,`display-p3-linear`,`a98-rgb`,`prophoto-rgb`,`rec2020`,`lab`,`oklab`,`xyz`,`xyz-d50`,`xyz-d65`]),Xs=/* @__PURE__ */ new Set([`shorter`,`longer`,`increasing`,`decreasing`]);function roundSig(e,t){return e===0?`0`:formatNumber(Number(e.toPrecision(t)))}function alphaText(e){if(e.type===1)return e.lower===`none`?`none`:null;let t;if(e.type===10)t=e.num;else if(e.type===11)t=e.num/100;else return null;return t=clamp$1(t,0,1),t===1?``:formatNumber(Math.round(t*1e3)/1e3)}function channelsAndAlpha(e){let t=[],n=null,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(a.type!==100){if(a.type===18)return null;if(a.type===9){if(a.value!==`/`||r)return null;r=!0}else if(r){if(n!==null)return null;n=a}else t.push(a)}}return r&&n===null?null:[t,n]}function withAlpha(e,t){if(t===null)return e+`)`;let n=alphaText(t);return n===null?null:n===``?e+`)`:e+` / `+n+`)`}function normalizeCanonical(e,t){let n=channelsAndAlpha(t);if(n===null||n[0].length!==3)return null;let[r,i]=n,a=Ks[e],o=e===`lch`||e===`oklch`,s=e===`lab`||e===`lch`?100:1,c=e+`(`;for(let e=0;e<3;e++){let t=r[e],n;if(t.type===1&&t.lower===`none`)n=`none`;else if(o&&e===2){let e;if(t.type===10)e=t.num;else if(t.type===12){let n=parseHue(t.text);if(n===null)return null;e=n}else return null;n=roundSig((e%360+360)%360,6)}else{let r;if(t.type===10)r=t.num;else if(t.type===11)r=t.num/100*a[e];else return null;e===0?r=clamp$1(r,0,s):o&&e===1&&r<0&&(r=0),n=roundSig(r,6)}c+=(e===0?``:` `)+n}return withAlpha(c,i)}function normalizeColorFn(e){let t=0;for(;t<e.length&&e[t].type===100;)t++;let n=e[t];if(n===void 0||n.type!==1||!qs.has(n.lower))return null;let r=channelsAndAlpha(e.slice(t+1));if(r===null||r[0].length!==3)return null;let[i,a]=r,o=`color(`+(n.lower===`xyz`?`xyz-d65`:n.lower);for(let e of i)if(e.type===1&&e.lower===`none`)o+=` none`;else if(e.type===10)o+=` `+roundSig(e.num,5);else if(e.type===11)o+=` `+roundSig(e.num/100,5);else return null;return withAlpha(o,a)}function commaArgs(e){let t=[[]];for(let n of e)n.type===18?t.push([]):n.type!==100&&t[t.length-1].push(n);return t}function colorComponent(e){return e.type===4||e.type===1||e.type===2?normalizeColor(e.text):null}function normalizeColorMix(e){let t=commaArgs(e);if(t.length!==3)return null;let n=t[0];if(n.length<2||n[0].type!==1||n[0].lower!==`in`||n[1].type!==1)return null;let r=n[1].lower,i=`in `+r;if(Js.has(r)){if(n.length===4){if(n[2].type!==1||!Xs.has(n[2].lower)||n[3].type!==1||n[3].lower!==`hue`)return null;i+=` `+n[2].lower+` hue`}else if(n.length!==2)return null}else if(!Ys.has(r)||n.length!==2)return null;let a=[],o=[];for(let e=1;e<=2;e++){let n=t[e];if(n.length<1||n.length>2)return null;let r=null,i=null;for(let e of n)if(e.type===11&&i===null){if(e.num<0||e.num>100)return null;i=e.num}else if(r!==null||(r=colorComponent(e),r===null))return null;if(r===null)return null;a.push(r),o.push(i)}let[s,c]=o;if(s===0&&c===0)return null;let l=a[0],u=a[1];if(s!==null&&c!==null)l+=` `+formatNumber(s)+`%`,u+=` `+formatNumber(c)+`%`;else if(s!==null||c!==null){let e=s===null?100-c:s;e!==50&&(l+=` `+formatNumber(e)+`%`)}return`color-mix(`+i+`, `+l+`, `+u+`)`}function normalizeLightDark(e){let t=commaArgs(e);if(t.length!==2||t[0].length!==1||t[1].length!==1)return null;let n=colorComponent(t[0][0]),r=colorComponent(t[1][0]);return n===null||r===null?null:`light-dark(`+n+`, `+r+`)`}function normalizeRelativeColor(e,t){let n=splitComponents(t);if(n===null)return null;let r=(e===`rgba`?`rgb`:e===`hsla`?`hsl`:e)+`(from`,i=!1;for(let e=0;e<n.length;e++){let t=n[e];if(t.type!==100&&!(e===0||t.type===1&&t.lower===`from`&&!i&&r.endsWith(`(from`))){if(i)r+=` `+(t.type===1?t.lower:t.text);else{let e=colorComponent(t);if(e===null)return null;r+=` `+e,i=!0}}}return i?r+`)`:null}function normalizeOtherColorFunction(e,t,n){let r=splitComponents(t);if(r===null)return null;for(let t of r)if(t.type===2&&Gs.test(t.text))return e+n.slice(e.length);switch(e){case`lab`:case`lch`:case`oklab`:case`oklch`:return normalizeCanonical(e,r);case`color`:return normalizeColorFn(r);case`color-mix`:return normalizeColorMix(r);case`light-dark`:return normalizeLightDark(r);default:return e+n.slice(e.length)}}function computeColor(e,t){let n=e.trim(),r=n.toLowerCase();if(r===`currentcolor`)return t;if(r===`transparent`)return`rgba(0, 0, 0, 0)`;let i=Rs[r]??zs[r];if(i!==void 0)return serializeRGBA(fromPacked(i,1));if(n.charCodeAt(0)===35){let e=parseHex(n.slice(1));return e===null?n:serializeRGBA(e)}let a=n.indexOf(`(`);if(a!==-1&&n.endsWith(`)`)){let e=parseColorFunction(n.slice(0,a).toLowerCase(),n.slice(a+1,-1));if(e!==null)return serializeRGBA(e)}return n}var Comp=class{type;text;lower;num;isInteger;value;constructor(e,t,n,r,i,a){this.type=e,this.text=t,this.lower=n,this.num=r,this.isInteger=i,this.value=a}};function splitComponents(e){let t=new CSSTokenizer(e),n=[],r=[];for(;;){let i=t.next();if(i===0)break;switch(i){case 13:n.length!==0&&n[n.length-1].type!==100&&n.push(new Comp(100,` `,``,0,!0,``));continue;case 6:case 8:case 17:case 22:case 20:case 24:case 23:return null;case 9:if(t.value===`!`)return null;n.push(new Comp(9,t.value,t.value,0,!0,t.value));continue;case 2:case 21:case 19:{let a=t.start,o=i===2?t.value.toLowerCase():``;for(r.length=0,r.push(i===19?20:22);r.length>0;){let e=t.next();if(e===0)break;if(e===6||e===8)return null;if(e===r[r.length-1])r.pop();else if(e===2||e===21)r.push(22);else if(e===19)r.push(20);else if(e===23)r.push(24);else if(e===22||e===20||e===24)return null}let s=e.slice(a,t.end);for(let e=r.length-1;e>=0;e--)s+=r[e]===22?`)`:r[e]===20?`]`:`}`;n.push(new Comp(i,s,o,0,!0,``));continue}default:n.push(new Comp(i,e.slice(t.start,t.end),i===1?t.value.toLowerCase():i===12?t.unit.toLowerCase():``,t.num,t.isInteger,t.value))}}return n.length!==0&&n[n.length-1].type===100&&n.pop(),n}function significant(e){let t=[];for(let n=0;n<e.length;n++)e[n].type!==100&&t.push(e[n]);return t}function formatNumber(e){if(Object.is(e,-0))return`0`;let t=String(e);return t.indexOf(`e`)===-1?t:Math.abs(e)<1e-6?`0`:e.toFixed(0)}const Zs=/* @__PURE__ */ new Set(/* @__PURE__ */ `px.em.rem.ex.rex.ch.rch.cap.rcap.ic.ric.lh.rlh.vw.vh.vi.vb.vmin.vmax.svw.svh.svi.svb.svmin.svmax.lvw.lvh.lvi.lvb.lvmin.lvmax.dvw.dvh.dvi.dvb.dvmin.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax.cm.mm.q.in.pt.pc`.split(`.`)),Qs=/* @__PURE__ */ new Set([`s`,`ms`]),$s=/* @__PURE__ */ new Set([`deg`,`grad`,`rad`,`turn`]),ec=/* @__PURE__ */ new Set(/* @__PURE__ */ `calc.min.max.clamp.round.mod.rem.sin.cos.tan.asin.acos.atan.atan2.pow.sqrt.hypot.log.exp.abs.sign.env.-webkit-calc.-moz-calc.calc-size.anchor.anchor-size`.split(`.`)),tc=1024;var Grammar=class{types;keywords;fns;max;constructor(e,t,n,r){this.types=e,this.keywords=t,this.fns=n,this.max=r}};const nc=new Grammar(2048,/* @__PURE__ */ new Set,/* @__PURE__ */ new Set,1);function grammar(e){let t=0,n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set,i=1;for(let a of e.split(` `)){if(a===``)continue;let e=a.endsWith(`+`)?a.slice(0,-1):a;switch(a.endsWith(`+`)&&e.length===1&&(t|=tc),e){case`L`:t|=1;continue;case`P`:t|=2;continue;case`N`:t|=4;continue;case`I`:t|=8;continue;case`C`:t|=16;continue;case`T`:t|=32;continue;case`A`:t|=64;continue;case`S`:t|=128;continue;case`U`:t|=256;continue}a===`#`?t|=4096:a.startsWith(`*`)?i=Number(a.slice(1)):a.endsWith(`()`)?r.add(a.slice(0,-2)):n.add(a)}return new Grammar(t,n,r,i)}const rc=`L+ P+ auto min-content max-content fit-content stretch -webkit-fill-available -moz-available -webkit-min-content -webkit-max-content -webkit-fit-content fit-content()`,ic=`L+ P+ none min-content max-content fit-content stretch -webkit-fill-available -moz-available fit-content()`,ac=`L P auto`,oc=`L P auto`,sc=`L+ P+`,cc=`none hidden dotted dashed solid double groove ridge inset outset`,lc=`L+ thin medium thick`,uc=`L+ P+ *2`,dc=`visible hidden clip scroll auto overlay -webkit-paged-x -webkit-paged-y`,fc={width:rc,height:rc,"min-width":rc,"min-height":rc,"inline-size":rc,"block-size":rc,"min-inline-size":rc,"min-block-size":rc,"max-width":ic,"max-height":ic,"max-inline-size":ic,"max-block-size":ic,top:ac,right:ac,bottom:ac,left:ac,"inset-block-start":ac,"inset-block-end":ac,"inset-inline-start":ac,"inset-inline-end":ac,"margin-top":oc,"margin-right":oc,"margin-bottom":oc,"margin-left":oc,"margin-block-start":oc,"margin-block-end":oc,"margin-inline-start":oc,"margin-inline-end":oc,"padding-top":sc,"padding-right":sc,"padding-bottom":sc,"padding-left":sc,"padding-block-start":sc,"padding-block-end":sc,"padding-inline-start":sc,"padding-inline-end":sc,"border-top-width":lc,"border-right-width":lc,"border-bottom-width":lc,"border-left-width":lc,"outline-width":lc,"column-rule-width":lc,"border-top-style":cc,"border-right-style":cc,"border-bottom-style":cc,"border-left-style":cc,"outline-style":cc+` auto`,"column-rule-style":cc,"border-block-start-color":`C`,"border-block-end-color":`C`,"border-inline-start-color":`C`,"border-inline-end-color":`C`,"border-top-color":`C`,"border-right-color":`C`,"border-bottom-color":`C`,"border-left-color":`C`,color:`C`,"background-color":`C`,"outline-color":`C invert`,"caret-color":`C auto`,"text-decoration-color":`C`,"column-rule-color":`C`,"accent-color":`C auto`,"flood-color":`C`,"lighting-color":`C`,"stop-color":`C`,"text-emphasis-color":`C`,"-webkit-text-fill-color":`C`,"-webkit-text-stroke-color":`C`,"border-top-left-radius":uc,"border-top-right-radius":uc,"border-bottom-right-radius":uc,"border-bottom-left-radius":uc,opacity:`N P`,"fill-opacity":`N P`,"stroke-opacity":`N P`,"flood-opacity":`N P`,"stop-opacity":`N P`,"z-index":`I auto`,order:`I`,"flex-grow":`N+`,"flex-shrink":`N+`,"flex-basis":`L+ P+ auto content min-content max-content fit-content`,"line-height":`N+ L+ P+ normal`,"font-size":`L+ P+ xx-small x-small small medium large x-large xx-large xxx-large larger smaller math`,"font-weight":`N+ normal bold bolder lighter`,"font-style":`normal italic oblique`,"font-variant":`normal none small-caps all-small-caps petite-caps all-petite-caps unicase titling-caps`,"font-stretch":`P+ normal ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded`,visibility:`visible hidden collapse`,"pointer-events":`auto none visiblepainted visiblefill visiblestroke visible painted fill stroke all bounding-box`,position:`static relative absolute fixed sticky -webkit-sticky`,float:`left right none inline-start inline-end`,clear:`none left right both inline-start inline-end`,"box-sizing":`content-box border-box`,"overflow-x":dc,"overflow-y":dc,"overflow-block":dc,"overflow-inline":dc,"text-align":`start end left right center justify match-parent justify-all -webkit-left -webkit-right -webkit-center -moz-left -moz-right -moz-center`,"white-space":`normal pre nowrap pre-wrap break-spaces pre-line`,"user-select":`auto text none contain all`,"-webkit-user-select":`auto text none contain all`,"background-image":`U none # linear-gradient() radial-gradient() conic-gradient() repeating-linear-gradient() repeating-radial-gradient() repeating-conic-gradient() image-set() -webkit-image-set() url() image() cross-fade() element() paint() -webkit-linear-gradient() -webkit-radial-gradient() -webkit-gradient()`,"background-attachment":`# scroll fixed local`,"background-origin":`# border-box padding-box content-box`,"background-clip":`# border-box padding-box content-box text border-area`,"background-repeat":`# repeat-x repeat-y repeat space round no-repeat *2`,"background-size":`# L+ P+ auto cover contain *2`,"list-style-type":`*1`,"text-transform":`none capitalize uppercase lowercase full-width full-size-kana math-auto`,"word-break":`normal keep-all break-all break-word auto-phrase`,"text-overflow":`clip ellipsis`,"vertical-align":`L P baseline sub super text-top text-bottom middle top bottom`,"table-layout":`auto fixed`,"border-collapse":`collapse separate`,"empty-cells":`show hide`,"caption-side":`top bottom`,"list-style-position":`inside outside`,resize:`none both horizontal vertical block inline`,"object-fit":`fill contain cover none scale-down`,isolation:`auto isolate`,"mix-blend-mode":`normal multiply screen overlay darken lighten color-dodge color-burn hard-light soft-light difference exclusion hue saturation color luminosity plus-darker plus-lighter`,"backface-visibility":`visible hidden`,"flex-direction":`row row-reverse column column-reverse`,"flex-wrap":`nowrap wrap wrap-reverse`,"animation-duration":`# T+ auto`,"transition-duration":`# T+`,"animation-delay":`# T`,"transition-delay":`# T`,"animation-iteration-count":`# N+ infinite`,"animation-direction":`# normal reverse alternate alternate-reverse`,"animation-fill-mode":`# none forwards backwards both`,"animation-play-state":`# running paused`,"tab-size":`N+ L+`,"row-gap":`L+ P+ normal`,"column-gap":`L+ P+ normal`,"outline-offset":`L`,"letter-spacing":`L P normal`,"word-spacing":`L P normal`,"text-indent":`L P`,"aspect-ratio":`*1`,inset:`L P auto *4`,cursor:`# U N *3 auto default none context-menu help pointer progress wait cell crosshair text vertical-text alias copy move no-drop not-allowed grab grabbing e-resize n-resize ne-resize nw-resize s-resize se-resize sw-resize w-resize ew-resize ns-resize nesw-resize nwse-resize col-resize row-resize all-scroll zoom-in zoom-out -webkit-grab -webkit-grabbing -webkit-zoom-in -webkit-zoom-out hand`,"unicode-bidi":`normal embed isolate bidi-override isolate-override plaintext`,direction:`ltr rtl`,"writing-mode":`horizontal-tb vertical-rl vertical-lr sideways-rl sideways-lr`,"content-visibility":`visible auto hidden`,"scroll-behavior":`auto smooth`,"touch-action":`*1`,"will-change":`*1`,appearance:`none auto menulist-button textfield base-select button checkbox listbox menulist meter progress-bar push-button radio searchfield slider-horizontal square-button textarea`,"-webkit-appearance":`*1`},pc=/* @__PURE__ */ new Map;function grammarFor(e){let t=pc.get(e);if(t!==void 0)return t;let n=fc[e];return t=n===void 0||n===`*1`?nc:grammar(n),pc.set(e,t),t}function isCSSWideKeyword(e){return e===`inherit`||e===`initial`||e===`unset`||e===`revert`||e===`revert-layer`}function normalizeComponent(e,t){let n=t.types,r=!!(n&tc);switch(e.type){case 1:return t.keywords.has(e.lower)?e.lower:n&16?normalizeColor(e.text):null;case 10:return n&8&&e.isInteger&&(!r||e.num>=0)||n&4&&(!r||e.num>=0)?formatNumber(e.num):e.num===0&&n&1?`0px`:null;case 11:return n&2&&(!r||e.num>=0)?formatNumber(e.num)+`%`:null;case 12:return r&&e.num<0?null:n&1&&Zs.has(e.lower)||n&32&&Qs.has(e.lower)||n&64&&$s.has(e.lower)?formatNumber(e.num)+e.lower:null;case 4:return n&16?normalizeColor(e.text):null;case 5:return n&128?serializeString$1(e.value):null;case 7:return n&256?serializeUrl(e.value):null;case 2:{let r=e.lower;if(r===`url`&&n&256){let t=splitComponents(e.text.slice(4,-1));return t!==null&&t.length===1&&t[0].type===5?serializeUrl(t[0].value):e.text}if(n&111&&ec.has(r))return e.text;if(n&16){let t=normalizeColor(e.text);if(t!==null)return t}return t.fns.has(r)?mc.has(r)?normalizeGradient(e):e.text:null}}return null}const mc=/* @__PURE__ */ new Set([`linear-gradient`,`radial-gradient`,`conic-gradient`,`repeating-linear-gradient`,`repeating-radial-gradient`,`repeating-conic-gradient`]);function normalizeGradient(e){let t=e.text.indexOf(`(`),n=splitComponents(e.text.slice(t+1,-1));if(n===null)return null;let r=e.lower,i=r.endsWith(`linear-gradient`),a=r.endsWith(`radial-gradient`),o=r.endsWith(`conic-gradient`),s=[],c=0,l=[],u=!1;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e]:null;if(t===null||t.type===18){if(l.length===0)return null;if(u&&c++,s.length===0&&!u){let e=l.join(` `);i&&e===`to bottom`?l=[]:(a||o)&&(l.length>=2&&l[l.length-2]===`at`&&l[l.length-1]===`center`&&(l.length-=2),a&&(l=l.filter(e=>e!==`ellipse`&&e!==`farthest-corner`))),l.length!==0&&s.push(l.join(` `))}else s.push(l.join(` `));l=[],u=!1;continue}if(t.type===100)continue;let r=null;(t.type===4||t.type===1||t.type===2)&&(r=normalizeColor(t.text),r!==null&&(u=!0)),r===null&&(r=t.type===1?t.lower:t.type===12?t.text.toLowerCase():t.type===2?t.lower+t.text.slice(t.lower.length):t.text),l.push(r)}return c<2?null:r+`(`+s.join(`, `)+`)`}function normalizePaint(e){let t=significant(e);if(t.length!==1)return verbatimComps(e);let n=t[0];switch(n.type){case 1:return n.lower===`none`||n.lower===`context-fill`||n.lower===`context-stroke`?n.lower:normalizeColor(n.text);case 7:return serializeUrl(n.value);case 4:return normalizeColor(n.text);case 2:return n.lower===`url`?normalizeComponent(n,vc):normalizeColor(n.text)??n.text}return verbatimComps(e)}function normalizeImageLoose(e){let t=significant(e);if(t.length===1){let e=t[0];if(e.type===7)return serializeUrl(e.value);if(e.type===1)return e.lower===`none`?`none`:e.text;if(e.type===2&&mc.has(e.lower))return normalizeGradient(e)??e.text}return verbatimComps(e)}function verbatimComps(e){let t=``;for(let n of e)t+=n.text;return t}function serializeString$1(e){let t=`"`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r===0?`�`:r>=1&&r<=31||r===127?`\\`+r.toString(16)+` `:r===34||r===92?`\\`+e[n]:e[n]}return t+`"`}__name(serializeString$1,`serializeString`);function serializeUrl(e){return`url(`+serializeString$1(e)+`)`}function containsVar(e){return e.indexOf(`(`)===-1?!1:/var\(/i.test(e)||/env\(/i.test(e)||/attr\(/i.test(e)}function verbatim(e){return e.trim()}const hc=/* @__PURE__ */ new Set([`block`,`inline`,`run-in`]),gc=/* @__PURE__ */ new Set([`flow`,`flow-root`,`table`,`flex`,`grid`,`ruby`,`math`]),_c=/* @__PURE__ */ new Set(/* @__PURE__ */ `none.contents.block.inline.inline-block.flex.inline-flex.grid.inline-grid.flow-root.list-item.table.inline-table.table-row.table-cell.table-column.table-column-group.table-header-group.table-footer-group.table-row-group.table-caption.run-in.ruby.ruby-text.ruby-base.ruby-base-container.ruby-text-container.flow.math.-webkit-box.-webkit-inline-box.-moz-box.-moz-inline-box.inline-list-item.-webkit-flex.-webkit-inline-flex.-ms-flexbox.-ms-inline-flexbox.-ms-grid.-ms-inline-grid`.split(`.`));function normalizeDisplay(e){let t=[];for(let n of e)if(n.type!==100){if(n.type!==1)return null;t.push(n.lower)}if(t.length===1)return _c.has(t[0])?t[0]:null;if(t.length>3)return null;let n=``,r=``,i=!1;for(let e of t)if(hc.has(e)&&n===``)n=e;else if(gc.has(e)&&r===``)r=e;else if(e===`list-item`&&!i)i=!0;else return null;return i&&r!==``&&r!==`flow`&&r!==`flow-root`?null:(n===``&&(n=`block`),r===``&&(r=`flow`),i?(n===`block`?``:n+` `)+(r===`flow-root`?`flow-root `:``)+`list-item`:n===`block`?r===`flow`?`block`:r:n===`inline`?r===`flow`?`inline`:r===`flow-root`?`inline-block`:r===`table`||r===`flex`||r===`grid`?`inline-`+r:`inline `+r:n+(r===`flow`?``:` `+r))}function normalizeContent(e){let t=``;for(let n of e)if(n.type===100)t+=` `;else{if(n.type===18)return null;n.type===5?t+=serializeString$1(n.value):n.type===7?t+=serializeUrl(n.value):n.type===1?t+=isCSSWideKeyword(n.lower)||n.lower===`none`||n.lower===`normal`||n.lower.endsWith(`-quote`)?n.lower:n.text:t+=n.text}return t===``?null:t}const vc=new Grammar(256,/* @__PURE__ */ new Set,/* @__PURE__ */ new Set,1),yc={display:normalizeDisplay,content:normalizeContent,fill:normalizePaint,stroke:normalizePaint,"list-style-image":normalizeImageLoose,"border-image-source":normalizeImageLoose,"mask-image":normalizeImageLoose,"-webkit-mask-image":normalizeImageLoose},bc=/* @__PURE__ */ new Map;function normalizeLonghand(e,t){let n=bc.get(e);if(n===void 0)bc.set(e,n=/* @__PURE__ */ new Map);else{let e=n.get(t);if(e!==void 0)return e}let r=fastLonghand(e,t),i=r===void 0?normalizeLonghandValue(e,t):r;return n.size===256&&n.clear(),n.set(t,i),i}function fastLonghand(e,t){let n=t.length;if(n===0)return;let r=t.charCodeAt(0);if(r>=97&&r<=122){for(let e=1;e<n;e++)if(r=t.charCodeAt(e),(r<97||r>122)&&r!==45)return;if(isCSSWideKeyword(t))return t;if(e===`display`)return _c.has(t)?t:void 0;if(yc[e]!==void 0)return;let i=grammarFor(e);return i.types===2048||i.keywords.has(t)?t:void 0}let i=r===45,a=+!!i,o=a;for(;a<n&&(r=t.charCodeAt(a))>=48&&r<=57;)a++;let s=a-o;if(s===0||s>1&&t.charCodeAt(o)===48)return;let c=s===1&&t.charCodeAt(o)===48,l=s,u=!0;if(a<n&&t.charCodeAt(a)===46){let e=++a;for(;a<n&&(r=t.charCodeAt(a))>=48&&r<=57;)a++;if(a===e||t.charCodeAt(a-1)===48)return;if(c){let n=0;for(;t.charCodeAt(e+n)===48;)n++;if(n>=6)return}l+=a-e,u=!1}if(l>15||i&&c&&u||yc[e]!==void 0)return;let d=grammarFor(e).types,m=a;if(m<n){if(t.charCodeAt(a)===37)return a+1===n&&(d===2048||d&2&&!(i&&d&1024))?t:void 0;for(;a<n&&(r=t.charCodeAt(a))>=97&&r<=122;)a++;if(a!==n)return;if(d===2048)return t;if(i&&d&1024)return;if(n-m===2&&t.charCodeAt(m)===112&&t.charCodeAt(m+1)===120)return d&1?t:void 0;let e=t.slice(m);return d&1&&Zs.has(e)||d&32&&Qs.has(e)||d&64&&$s.has(e)?t:void 0}if(d===2048)return t;if(!(i&&d&1024))return d&8&&u||d&4?t:c&&u&&d&1?`0px`:void 0}function normalizeLonghandValue(e,t){let n=t.trim();if(n===``)return null;let r=splitComponents(n);if(r===null)return null;if(r.length===1&&r[0].type===1&&isCSSWideKeyword(r[0].lower))return r[0].lower;if(containsVar(n))return verbatim(n);let i=yc[e];if(i!==void 0)return i(r);let a=grammarFor(e);return a.types===2048?verbatim(n):normalizeComps(r,a)}function normalizeComps(e,t){let n=``,r=0,i=``;for(let a=0;a<e.length;a++){let o=e[a];if(o.type===100)continue;if(o.type===18&&t.types&4096){if(r===0)return null;r=0,i=`, `;continue}if(++r>t.max||o.type===18||o.type===9)return null;let s=normalizeComponent(o,t);if(s===null)return null;n=n===``?s:n+(r===1?i:` `)+s}return r===0?null:n}function normalizeCustom(e){let t=e.trim();return t===``||splitComponents(t)===null&&/[;!]/.test(t)?null:t}const xc=[`top`,`right`,`bottom`,`left`];function box(e,t){return xc.map(n=>e+n+t)}const Sc=box(`border-`,`-width`),Cc=box(`border-`,`-style`),wc=box(`border-`,`-color`),Tc=/* @__PURE__ */ new Map([[`margin`,box(`margin-`,``)],[`padding`,box(`padding-`,``)],[`border-width`,Sc],[`border-style`,Cc],[`border-color`,wc],[`border-top`,[`border-top-width`,`border-top-style`,`border-top-color`]],[`border-right`,[`border-right-width`,`border-right-style`,`border-right-color`]],[`border-bottom`,[`border-bottom-width`,`border-bottom-style`,`border-bottom-color`]],[`border-left`,[`border-left-width`,`border-left-style`,`border-left-color`]],[`border`,[...Sc,...Cc,...wc,`border-image`]],[`flex`,[`flex-grow`,`flex-shrink`,`flex-basis`]],[`background`,[`background-image`,`background-position-x`,`background-position-y`,`background-size`,`background-repeat`,`background-origin`,`background-clip`,`background-attachment`,`background-color`]],[`background-position`,[`background-position-x`,`background-position-y`]],[`font`,[`font-style`,`font-variant`,`font-weight`,`font-size`,`line-height`,`font-family`]]]),Ec=/* @__PURE__ */ new Map;for(let[e,t]of Tc)for(let n of t){let t=Ec.get(n);t===void 0&&Ec.set(n,t=[]),t.push(e)}for(let e of Ec.values())e.sort((e,t)=>Tc.get(t).length-Tc.get(e).length);const Dc=/* @__PURE__ */ new Map;{let e=/* @__PURE__ */ new Map;for(let[t,n]of Ec){let r=e.get(n[0]);r===void 0&&e.set(n[0],r=1<<e.size),Dc.set(t,r)}for(let e of Tc.values())for(let t of e)if(Dc.get(t)!==Dc.get(e[0]))throw Error(`shorthand families overlap at ${t}`)}function shorthandFamily(e){return Dc.get(e)??0}function isExpandedShorthand(e){return Tc.has(e)}function longhandsOf(e){return Tc.get(e)}function shorthandsContaining(e){return Ec.get(e)}function items(e){let t=splitComponents(e);if(t===null)return null;let n=[];for(let e of t)e.type!==100&&n.push(e);return n}function expandBox(e,t){let n=items(t);if(n===null||n.length<1||n.length>4)return null;let r=grammarFor(e[0]),i=[];for(let e of n){if(e.type===18||e.type===9)return null;let t=normalizeComponent(e,r);if(t===null)return null;i.push(t)}let a=i[0],o=i[1]??a;return[a,o,i[2]??a,i[3]??o]}const Oc=/* @__PURE__ */ new Set([`none`,`hidden`,`dotted`,`dashed`,`solid`,`double`,`groove`,`ridge`,`inset`,`outset`]);function parseBorderSide(e){let t=items(e);if(t===null||t.length<1||t.length>3)return null;let n=``,r=``,i=``,a=grammarFor(`border-top-width`);for(let e of t){if(e.type===1&&Oc.has(e.lower)){if(r!==``)return null;r=e.lower;continue}let t=normalizeComponent(e,a);if(t!==null){if(n!==``)return null;n=t;continue}let o=normalizeColor(e.text);if(o!==null&&e.type!==10){if(i!==``)return null;i=o}else return null}return[n||`medium`,r||`none`,i||`currentcolor`]}const kc=/* @__PURE__ */ new Set([`auto`,`content`,`min-content`,`max-content`,`fit-content`]);function expandFlex(e){let t=items(e);if(t===null||t.length<1||t.length>3)return null;if(t.length===1&&t[0].type===1){if(t[0].lower===`none`)return[`0`,`0`,`auto`];if(t[0].lower===`auto`)return[`1`,`1`,`auto`]}let n=grammarFor(`flex-basis`),num=e=>e!==void 0&&e.type===10&&e.num>=0?formatNumber(e.num):null,basisOf=e=>e.type===1&&!kc.has(e.lower)?null:normalizeComponent(e,n),r,i=null,a=null,o=0;if((r=num(t[0]))!==null){if(o=1,(i=num(t[1]))!==null&&(o=2),o<t.length){if(a=basisOf(t[o]),a===null)return null;o++}}else{if(a=basisOf(t[0]),a===null)return null;o=1,(r=num(t[1]))!==null&&(o=2,(i=num(t[2]))!==null&&(o=3))}return o===t.length?r===null?[`1`,`1`,a]:[r,i??`1`,a??`0%`]:null}const Ac=/* @__PURE__ */ new Set([`left`,`center`,`right`,`top`,`bottom`]),jc=/* @__PURE__ */ new Set([`repeat-x`,`repeat-y`,`repeat`,`space`,`round`,`no-repeat`]),Mc=/* @__PURE__ */ new Set([`scroll`,`fixed`,`local`]),Nc=/* @__PURE__ */ new Set([`border-box`,`padding-box`,`content-box`]),Pc=/* @__PURE__ */ new Set([`linear-gradient`,`radial-gradient`,`conic-gradient`,`repeating-linear-gradient`,`repeating-radial-gradient`,`repeating-conic-gradient`,`image-set`,`-webkit-image-set`,`image`,`cross-fade`,`element`,`paint`,`-webkit-linear-gradient`,`-webkit-radial-gradient`,`-webkit-gradient`,`-moz-linear-gradient`,`-moz-radial-gradient`]);function isPositionComp(e){return e.type===1?Ac.has(e.lower):normalizeComponent(e,grammarFor(`margin-top`))!==null&&e.type!==1}function positionComp(e){return e.type===1?e.lower:normalizeComponent(e,grammarFor(`margin-top`))}function parsePosition(e){if(e.length<1||e.length>4)return null;let t=e.map(positionComp),isY=e=>e===`top`||e===`bottom`,isX=e=>e===`left`||e===`right`;if(t.length===1)return isY(t[0])?[`center`,t[0]]:[t[0],`center`];if(t.length===2)return isY(t[0])||isX(t[1])?isY(t[1])||isX(t[0])?null:[t[1],t[0]]:[t[0],t[1]];let n,r;return t.length===3?Ac.has(t[1])?(n=t[0],r=t[1]+` `+t[2]):(n=t[0]+` `+t[1],r=t[2]):(n=t[0]+` `+t[1],r=t[2]+` `+t[3]),isY(n.split(` `)[0])?[r,n]:[n,r]}const Fc=[`none`,`0%`,`0%`,`auto`,`repeat`,`padding-box`,`border-box`,`scroll`,`transparent`];function parseBackgroundLayer(e,t){let n=``,r=``,i=``,a=``,o=``,s=``,c=``,l=``,u=``,d=0;for(;d<e.length;){let m=e[d];if(m.type===1&&m.lower===`none`&&n===``)n=`none`,d++;else if(m.type===7||m.type===2&&(m.lower===`url`||Pc.has(m.lower))){if(n!==``)return null;n=m.type===7?serializeUrl(m.value):normalizeComponent(m,grammarFor(`background-image`))??m.text,d++}else if(isPositionComp(m)&&r===``){let t=d;for(;t<e.length&&t-d<4&&isPositionComp(e[t]);)t++;let n=parsePosition(e.slice(d,t));if(n===null)return null;if(r=n[0],i=n[1],d=t,d<e.length&&e[d].type===9&&e[d].value===`/`){d++;let t=grammarFor(`background-size`),n=[];for(;d<e.length&&n.length<2;){let r=normalizeComponent(e[d],t);if(r===null||(n.push(r),d++,r===`cover`||r===`contain`))break}if(n.length===0)return null;a=n.join(` `)}}else if(m.type===1&&jc.has(m.lower)&&o===``){if(o=m.lower,m.lower!==`repeat-x`&&m.lower!==`repeat-y`&&d+1<e.length){let t=e[d+1];t.type===1&&jc.has(t.lower)&&t.lower!==`repeat-x`&&t.lower!==`repeat-y`&&(o+=` `+t.lower,d++)}d++}else if(m.type===1&&Mc.has(m.lower)&&l===``)l=m.lower,d++;else if(m.type===1&&Nc.has(m.lower)){if(s===``)s=m.lower;else if(c===``)c=m.lower;else return null;d++}else{if(t&&u===``){let e=normalizeColor(m.text);if(e!==null&&m.type!==10){u=e,d++;continue}}return null}}c===``&&s!==``&&(c=s);let m=[n,r,i,a,o,s,c,l,u];for(let e=0;e<m.length;e++)m[e]===``&&(m[e]=Fc[e]);return m}const Ic=/* @__PURE__ */ new Set([`caption`,`icon`,`menu`,`message-box`,`small-caption`,`status-bar`]),Lc=/* @__PURE__ */ new Set([`italic`,`oblique`]),Rc=/* @__PURE__ */ new Set([`small-caps`]),zc=/* @__PURE__ */ new Set([`bold`,`bolder`,`lighter`]),Bc=/* @__PURE__ */ new Set([`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`]);function expandFont(e){let t=items(e);if(t===null||t.length<2||t.length===1&&t[0].type===1&&Ic.has(t[0].lower))return null;let n=``,r=``,i=``,a=0,o=0;for(;a<t.length&&a<4;a++){let e=t[a];if(e.type===1){if(e.lower===`normal`){o++;continue}if(Lc.has(e.lower)&&n===``){n=e.lower;continue}if(Rc.has(e.lower)&&r===``){r=e.lower;continue}if(zc.has(e.lower)&&i===``){i=e.lower;continue}if(Bc.has(e.lower))continue;break}if(e.type===10&&i===``&&e.num>=1&&e.num<=1e3)i=formatNumber(e.num);else break}if(a>=t.length)return null;let s=normalizeComponent(t[a],grammarFor(`font-size`));if(s===null)return null;a++;let c=`normal`;if(a<t.length&&t[a].type===9&&t[a].value===`/`){if(a++,a>=t.length)return null;let e=normalizeComponent(t[a],grammarFor(`line-height`));if(e===null)return null;c=e,a++}if(a>=t.length)return null;let l=``;for(;a<t.length;a++){let e=t[a];if(e.type===18){l+=`,`;continue}if(e.type===10||e.type===9)return null;let n=e.type===5?`"`+e.value.replace(/(["\\])/g,`\\$1`)+`"`:e.text;l+=(l===``||l.endsWith(`,`))&&l===``?n:` `+n}return o>3?null:[n||`normal`,r||`normal`,i||`normal`,s,c,l]}function expandShorthand(e,t){switch(e){case`margin`:case`padding`:case`border-width`:case`border-style`:case`border-color`:return expandBox(Tc.get(e),t);case`border-top`:case`border-right`:case`border-bottom`:case`border-left`:return parseBorderSide(t);case`border`:{let e=parseBorderSide(t);return e===null?null:[e[0],e[0],e[0],e[0],e[1],e[1],e[1],e[1],e[2],e[2],e[2],e[2],`none`]}case`flex`:return expandFlex(t);case`background-position`:{let e=items(t);if(e===null)return null;for(let t of e)if(!isPositionComp(t))return null;return parsePosition(e)}case`background`:{let e=items(t);if(e===null||e.length===0)return null;let n=0,r=0,i=null;for(let t=0;t<=e.length;t++)if(t===e.length||e[t].type===18){let a=parseBackgroundLayer(e.slice(n,t),t===e.length);if(a===null)return null;i=a,r++,n=t+1}return r>1?Gc:i}case`font`:return expandFont(t)}return null}const Vc=/* @__PURE__ */ new Map([[`outline`,[`outline-color`,`outline-style`,`outline-width`]],[`overflow`,[`overflow-x`,`overflow-y`]],[`gap`,[`row-gap`,`column-gap`]],[`inset`,[`top`,`right`,`bottom`,`left`]],[`list-style`,[`list-style-position`,`list-style-image`,`list-style-type`]],[`flex-flow`,[`flex-direction`,`flex-wrap`]]]);function pendingLonghandsMap(){return new Map([...Tc,...Vc])}function cascadeLonghandsOf(e){return Tc.get(e)??Vc.get(e)}function isCascadeOnlyShorthand(e){return Vc.has(e)}const Hc=/* @__PURE__ */ new Set([`visible`,`hidden`,`clip`,`scroll`,`auto`,`overlay`]),Uc=/* @__PURE__ */ new Set([`row`,`row-reverse`,`column`,`column-reverse`]),Wc=/* @__PURE__ */ new Set([`nowrap`,`wrap`,`wrap-reverse`]);function expandCascadeShorthand(e,t){switch(e){case`outline`:{let e=items(t);if(e===null||e.length<1||e.length>3)return null;let n=``,r=``,i=``,a=grammarFor(`outline-width`);for(let t of e){if(t.type===1&&(Oc.has(t.lower)||t.lower===`auto`)&&t.lower!==`hidden`){if(r!==``)return null;r=t.lower;continue}let e=normalizeComponent(t,a);if(e!==null){if(n!==``)return null;n=e;continue}let o=normalizeColor(t.text);if(o!==null&&t.type!==10){if(i!==``)return null;i=o}else return null}return[i||`currentcolor`,r||`none`,n||`medium`]}case`overflow`:case`flex-flow`:{let n=items(t);if(n===null||n.length<1||n.length>2)return null;for(let e of n)if(e.type!==1)return null;if(e===`overflow`){for(let e of n)if(!Hc.has(e.lower))return null;return[n[0].lower,(n[1]??n[0]).lower]}let r=``,i=``;for(let e of n)if(Uc.has(e.lower)&&r===``)r=e.lower;else if(Wc.has(e.lower)&&i===``)i=e.lower;else return null;return[r||`row`,i||`nowrap`]}case`gap`:{let e=items(t);if(e===null||e.length<1||e.length>2)return null;let n=grammarFor(`row-gap`),r=[];for(let t of e){let e=normalizeComponent(t,n);if(e===null)return null;r.push(e)}return[r[0],r[1]??r[0]]}case`inset`:return expandBox(Vc.get(`inset`),t);case`list-style`:{let e=items(t);if(e===null||e.length<1||e.length>3)return null;let n=``,r=``,i=``,a=0;for(let t of e)if(t.type===1&&(t.lower===`inside`||t.lower===`outside`)&&n===``)n=t.lower;else if(t.type===1&&t.lower===`none`)a++;else if((t.type===7||t.type===2&&Pc.has(t.lower))&&r===``)r=t.type===7?serializeUrl(t.value):t.text;else if((t.type===1||t.type===5||t.type===2&&t.lower===`symbols`)&&i===``)i=t.type===1?t.lower:t.text;else return null;return a>+(r===``)+ +(i===``)?null:(a!==0&&(r===``&&(r=`none`),i===``&&(i=`none`)),[n||`outside`,r||`none`,i||`disc`])}}return null}function serializeCascadeShorthand(e,t){switch(e){case`overflow`:case`gap`:return t[0]===t[1]?t[0]:t[0]+` `+t[1];case`inset`:return serializeBox(t);case`outline`:case`list-style`:case`flex-flow`:return t.join(` `)}return``}const Gc=[];function serializeBox(e){let[t,n,r,i]=e;return i===n?r===t?n===t?t:t+` `+n:t+` `+n+` `+r:t+` `+n+` `+r+` `+i}function serializeSide(e,t,n,r){if(r)return e+` `+t+` `+n;let i=[];return e!==`medium`&&i.push(e),t!==`none`&&i.push(t),n!==`currentcolor`&&i.push(n),i.length===0?e:i.join(` `)}function serializeShorthand(e,t,n){let r=0;for(let e of t)isCSSWideKeyword(e)&&r++;if(r!==0){if(r!==t.length)return``;for(let e of t)if(e!==t[0])return``;return t[0]}switch(e){case`margin`:case`padding`:case`border-width`:case`border-style`:case`border-color`:return serializeBox(t);case`border-top`:case`border-right`:case`border-bottom`:case`border-left`:return serializeSide(t[0],t[1],t[2],n);case`border`:for(let e=0;e<3;e++){let n=e*4;if(t[n]!==t[n+1]||t[n]!==t[n+2]||t[n]!==t[n+3])return``}return t[12]===`none`?serializeSide(t[0],t[4],t[8],n):``;case`flex`:return t[0]+` `+t[1]+` `+t[2];case`background-position`:return t[0]+` `+t[1];case`background`:{if(n)return`${t[8]} ${t[0]} ${t[7]} ${t[4]} ${t[1]} ${t[2]} / ${t[3]} ${t[5]} ${t[6]}`.replace(/\s+/g,` `);let e=[];return t[0]!==`none`&&e.push(t[0]),(t[1]!==`0%`||t[2]!==`0%`||t[3]!==`auto`)&&e.push(t[1]+` `+t[2]+(t[3]===`auto`?``:` / `+t[3])),t[4]!==`repeat`&&e.push(t[4]),t[7]!==`scroll`&&e.push(t[7]),(t[5]!==`padding-box`||t[6]!==`border-box`)&&e.push(t[5]===t[6]?t[5]:t[5]+` `+t[6]),t[8]!==`transparent`&&t[8]!==`rgba(0, 0, 0, 0)`&&e.push(t[8]),e.length===0?`none`:e.join(` `)}case`font`:{let e=[];return t[0]!==`normal`&&e.push(t[0]),t[1]!==`normal`&&e.push(t[1]),t[2]!==`normal`&&!(n&&t[2]===`400`)&&e.push(t[2]),e.push(t[3]+(t[4]===`normal`?``:` / `+t[4])),e.push(t[5]),e.join(` `)}}return``}var DeclBlock=class{names;values;important;dirty;namesSynced;serialized;serializedCount;serializedFamilies;serializedPlain;constructor(){this.names=[],this.values=[],this.important=[],this.dirty=!1,this.namesSynced=0,this.serialized=``,this.serializedCount=0,this.serializedFamilies=0,this.serializedPlain=!0}get length(){return this.names.length}indexOf(e,t=0){let n=this.names;for(let r=t;r<n.length;r++)if(n[r]===e)return r;return-1}clear(){this.names.length=0,this.values.length=0,this.important.length=0,this.namesSynced=0,this.serialized=``,this.serializedCount=0,this.serializedFamilies=0,this.serializedPlain=!0}put(e,t,n){let r=this.indexOf(e);r===-1?(this.names.push(e),this.values.push(t),this.important.push(n),this.dirty=!0):(this.values[r]!==t||this.important[r]!==n)&&(this.serializedCount===this.names.length&&this.serializedPlain&&shorthandsContaining(e)===void 0?this.spliceSerialized(r,t,n):this.serializedCount=-1,this.values[r]=t,this.important[r]=n,this.dirty=!0)}spliceSerialized(e,t,n){let r=this.names,i=this.values,a=this.important,o=0;for(let t=0;t<e;t++)o+=r[t].length+i[t].length+(a[t]?15:4);let s=o+r[e].length+i[e].length+(a[e]?14:3),c=this.serialized;this.serialized=c.slice(0,o)+serializeDeclaration(r[e],t,n)+c.slice(s)}putParsed(e,t,n){let r=this.indexOf(e);if(r!==-1){if(this.important[r]&&!n)return;this.names.splice(r,1),this.values.splice(r,1),this.important.splice(r,1),r<this.namesSynced&&(this.namesSynced=r),this.serializedCount=-1}this.names.push(e),this.values.push(t),this.important.push(n)}removeOne(e){let t=this.indexOf(e);return t!==-1&&(this.names.splice(t,1),this.values.splice(t,1),this.important.splice(t,1),this.dirty=!0,t<this.namesSynced&&(this.namesSynced=t),this.serializedCount=-1,!0)}setValue(e,t,n,r){if(isCustomPropertyName(e)){let i=normalizeCustom(t);return i!==null&&(r?this.putParsed(e,i,n):this.put(e,i,n),!0)}if(isExpandedShorthand(e)){let i=longhandValues(e,t);if(i===null)return!1;let a=longhandsOf(e);if(i===qc){for(let e of a)this.removeOne(e);return this.putOrParsed(e,t.trim(),n,r),!0}this.removeOne(e);for(let e=0;e<a.length;e++)this.putOrParsed(a[e],i[e],n,r);return!0}if(!isSupportedProperty(e))return!1;let i=normalizeLonghand(e,t);return i!==null&&(this.putOrParsed(e,i,n,r),!0)}putOrParsed(e,t,n,r){r?this.putParsed(e,t,n):this.put(e,t,n)}parse(e){this.clear(),e!==``&&this.addRaw(parseDeclarationList(e))}addRaw(e){for(let t=0;t<e.length;t++){let n=e[t],r=isCustomPropertyName(n.name)?n.name:n.name.toLowerCase();this.setValue(r,n.value,n.important,!0)}}remove(e){let t=this.removeOne(e),n=longhandsOf(e);if(n!==void 0)for(let e of n)this.removeOne(e)&&(t=!0);return t}getPropertyValue(e){let t=this.indexOf(e);if(t!==-1)return this.values[t];let n=longhandsOf(e);if(n===void 0)return``;let r=[],i=-1;for(let e of n){let t=this.indexOf(e);if(t===-1)return``;let n=+!!this.important[t];if(i===-1)i=n;else if(i!==n)return``;r.push(this.values[t])}return serializeShorthand(e,r,!1)}getPropertyPriority(e){let t=this.indexOf(e);if(t!==-1)return this.important[t]?`important`:``;let n=longhandsOf(e);if(n===void 0)return``;for(let e of n){let t=this.indexOf(e);if(t===-1||!this.important[t])return``}return`important`}serialize(){let e=this.names.length,t=this.serializedCount;return t===e||(t<0||!this.serializeAppended(t))&&(this.serialized=this.serializeAll(0),this.serializedCount=e,this.serializedFamilies=-1,this.serializedPlain=!Kc),this.serialized}serializeAppended(e){let t=this.names,n=t.length,r=0;for(let i=e;i<n;i++)r|=shorthandFamily(t[i]);let i=this.serializedFamilies;if(r!==0&&i===-1){i=0;for(let n=0;n<e;n++)i|=shorthandFamily(t[n])}if((r&i)!==0)return!1;let a=this.serializeAll(e);return Kc&&(this.serializedPlain=!1),this.serialized=this.serialized===``?a:this.serialized+` `+a,this.serializedCount=n,this.serializedFamilies=i===-1?-1:i|r,!0}serializeAll(e=0){let t=this.names,n=t.length;if(Kc=!1,n===e)return``;let r=``,i=null;for(let a=e;a<n;a++){let o=t[a];if(i!==null&&i.has(o))continue;let s=shorthandsContaining(o),c=!1;if(s!==void 0)for(let t=0;t<s.length&&!c;t++){let o=s[t],l=longhandsOf(o),u=l.length<=n-e;for(let t=0;t<l.length&&u;t++){let n=this.indexOf(l[t],e);u=n!==-1&&this.important[n]===this.important[a]&&(i===null||!i.has(l[t]))}if(!u)continue;let d=Array(l.length);for(let t=0;t<l.length;t++)d[t]=this.values[this.indexOf(l[t],e)];let m=serializeShorthand(o,d,!1);if(m!==``){i===null&&(i=/* @__PURE__ */ new Set);for(let e of l)i.add(e);r+=(r===``?``:` `)+serializeDeclaration(o,m,this.important[a]),c=!0}}c||(r+=(r===``?``:` `)+serializeDeclaration(o,this.values[a],this.important[a]))}return Kc=i!==null,r}};let Kc=!1;function serializeDeclaration(e,t,n){return e+`: `+t+(n?` !important;`:`;`)}const qc=Gc,Jc=/* @__PURE__ */ new Map;function longhandValues(e,t){let n=Jc.get(e);if(n===void 0)Jc.set(e,n=/* @__PURE__ */ new Map);else{let e=n.get(t);if(e!==void 0)return e}let r=null,i=t.trim(),a=i===``?null:splitComponents(i);return r=a===null?null:a.length===1&&a[0].type===1&&isCSSWideKeyword(a[0].lower)?Array(longhandsOf(e).length).fill(a[0].lower):containsVar(i)?qc:expandShorthand(e,i),n.size===256&&n.clear(),n.set(t,r),r}function parseDeclBlock(e){let t=new DeclBlock;return t.parse(e),t}var CSSStyleDeclaration=class{[z];[Vn];[w];[nr];[Gr];[gn];constructor(e=null,t=null,n=null){if(Yc||installAccessors(),this[z]=e,this[Vn]=n,this[w]=t??new DeclBlock,this[nr]=!1,this[Gr]=!1,this[gn]=0,e!==null){let t=attr(e[M],`style`);t!==null&&t!==``&&this[w].parse(t)}this[w].names.length!==0&&this._syncIndices()}_attributeChanged(e){this[Gr]||(this[w].parse(e??``),this._syncIndices())}_changed(){this._syncIndices();let e=this[z];if(e!==null){this[Gr]=!0;try{setAttribute(e[M],`style`,this[w].serialize())}finally{this[Gr]=!1}}else this[Vn]!==null&&this[Vn]._declarationsChanged()}_syncIndices(){let e=this[w],t=e.names,n=t.length,r=e.namesSynced;if(r===n&&n===this[gn])return;let i=this;for(let e=r;e<n;e++)i[e]=t[e];for(let e=n;e<this[gn];e++)delete i[e];this[gn]=n,e.namesSynced=n}_checkWritable(){if(this[nr])throw new DOMException(`Failed to execute on 'CSSStyleDeclaration': These styles are computed, and therefore read-only.`,`NoModificationAllowedError`)}get cssText(){return this[nr]?``:this[w].serialize()}set cssText(e){this._checkWritable(),this[w].parse(e===null?``:String(e)),this._changed()}get length(){return this[w].names.length}item(e){return this[w].names[e>>>0]??``}getPropertyValue(e){let t=String(e);return this[w].getPropertyValue(isCustomPropertyName(t)?t:t.toLowerCase())}getPropertyPriority(e){let t=String(e);return this[w].getPropertyPriority(isCustomPropertyName(t)?t:t.toLowerCase())}setProperty(e,t,n=``){this._checkWritable();let r=String(e);isCustomPropertyName(r)||(r=r.toLowerCase());let i=t===null?``:idlString(t);if(i===``){this.removeProperty(r);return}let a=n===null?``:idlString(n),o=!1;if(a!==``){if(a.toLowerCase()!==`important`)return;o=!0}let s=this[w];s.dirty=!1,s.setValue(r,i,o,!1)&&s.dirty&&this._changed()}removeProperty(e){this._checkWritable();let t=String(e);isCustomPropertyName(t)||(t=t.toLowerCase());let n=this[w].getPropertyValue(t);return this[w].remove(t)&&this._changed(),n}get parentRule(){return this[Vn]}get cssFloat(){return this.getPropertyValue(`float`)}set cssFloat(e){this._setNamed(`float`,e)}_setNamed(e,t){this[nr]||this.setProperty(e,t===null?``:idlString(t))}*[Symbol.iterator](){let e=this.length;for(let t=0;t<e;t++)yield this.item(t)}get[Symbol.toStringTag](){return`CSSStyleDeclaration`}};let Yc=!1;function installAccessors(){Yc=!0;let e=CSSStyleDeclaration.prototype,t=Object.create(null),define=(n,r)=>{Object.hasOwn(t,n)||Object.hasOwn(e,n)||Object.defineProperty(t,n,r)};for(let e of allPropertyNames()){let t={get(){return this.getPropertyValue(e)},set(t){this._setNamed(e,t)},enumerable:!0,configurable:!0};define(e,t),e.indexOf(`-`)!==-1&&(define(cssPropertyToIDLAttribute(e,!1),t),e.startsWith(`-webkit-`)&&define(cssPropertyToIDLAttribute(e,!0),t))}Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.setPrototypeOf(e,t)}function idlString(e){if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}const Xc=[`jsdom-26`,`jsdom-30`,`modern`],Zc=`jsdom-30`,Qc=Xc,$c=[`jsdom-30`,`modern`],el=[`modern`],handlers=e=>e.map(e=>`on${e}`),on=(e,t)=>t.map(t=>`${e}.${t}`),tl=handlers([`gotpointercapture`,`lostpointercapture`,`pointercancel`,`pointerdown`,`pointerenter`,`pointerleave`,`pointermove`,`pointerout`,`pointerover`,`pointerrawupdate`,`pointerup`]),nl=handlers([`animationcancel`,`animationend`,`animationiteration`,`animationstart`,`command`,`selectionchange`,`selectstart`,`transitioncancel`,`transitionend`,`transitionrun`,`transitionstart`]),rl=[`Document`,`HTMLElement`,`SVGElement`,`MathMLElement`],il=[{globals:[`PointerEvent`,...tl],members:rl.flatMap(e=>on(e,tl)),profiles:$c,reason:"jsdom 27 added pointer events. Libraries pick pointer or mouse/touch code paths by detecting `PointerEvent` or `onpointerdown` (React Aria caches the choice at import), so suites written for jsdom 26 break when they exist, and again when they `delete global.PointerEvent` after installing a fake."},{globals:[`matchMedia`,`MediaQueryList`,`MediaQueryListEvent`],profiles:el,reason:"No jsdom has matchMedia. Suites install their own (mock-match-media only polyfills it when it is missing: React Aria's `setMedia({pointer: 'coarse'})` did nothing with ours present) and components feature-detect it."},{globals:[`ResizeObserver`],profiles:el,reason:`No jsdom has ResizeObserver, and libraries detect it to pick their browser path: Base UI's ScrollArea then calls getAnimations(), which nothing implements. Suites written for jsdom install their own (Sentry's MockResizeObserver).`},{members:[`HTMLElement.inert`],profiles:el,reason:"No jsdom has the `inert` IDL attribute. Libraries that find it mark content outside a modal `inert` instead of `aria-hidden` (React Aria's ariaHideOutside, Radix's hideOthers), which stock Testing Library's queries do not treat as inaccessible. The content attribute makes subtrees inert in every profile."},{globals:[`visualViewport`],profiles:el,reason:"Without layout its numbers mislead positioning libraries (Floating UI), which fall back to the document element when it is absent, as under jsdom. `createWindow({ visualViewport })` overrides the profile."},{globals:[`CSS`,`CSSConditionRule`,`CSSContainerRule`,`CSSFontFaceRule`,`CSSGroupingRule`,`CSSKeyframeRule`,`CSSKeyframesRule`,`CSSLayerBlockRule`,`CSSLayerStatementRule`,`CSSNamespaceRule`,`CSSNestedDeclarations`,`CSSPageRule`,`CSSRuleList`,`CSSScopeRule`,`CSSSupportsRule`],members:[`HTMLStyleElement.disabled`],profiles:Qc,reason:"CSSOM classes are only reached through style sheets jsdom 26 also parses (its rule objects come from the cssom package). `CSS.escape`/`CSS.supports` behave as the polyfills suites install, which replace ours by assignment."},{globals:[`BeforeUnloadEvent`,`PromiseRejectionEvent`,`TransitionEvent`],members:[`MouseEvent.movementX`,`MouseEvent.movementY`,`CustomElementRegistry.getName`],profiles:Qc,reason:`Event classes and members nothing feature-detects; our own dispatch creates these events.`},{globals:[`AnimationEvent`,`ClipboardEvent`,`CommandEvent`,`DragEvent`,`FormDataEvent`,`TextEvent`,`ToggleEvent`,`Touch`,`TouchList`,...nl,`onpagereveal`,`onpageswap`],members:[...[`Document`,`HTMLElement`,`SVGElement`].flatMap(e=>on(e,nl)),...on(`HTMLBodyElement`,[`onpagereveal`,`onpageswap`]),...on(`HTMLFrameSetElement`,[`onpagereveal`,`onpageswap`]),`TouchEvent.getModifierState`,`PopStateEvent.hasUAVisualTransition`,`InputEvent.dataTransfer`],profiles:Qc,reason:`Event classes and handler attributes for events our dispatch fires (popover toggle, command, form data, drag, clipboard, animation/transition). Libraries construct or listen for them; none switch code paths on their presence.`},{globals:[`Clipboard`,`ClipboardItem`,`DataTransfer`,`DataTransferItem`,`DataTransferItemList`],members:[`Navigator.clipboard`],profiles:Qc,reason:"user-event's `setup()` replaces `navigator.clipboard` with its stub either way, and builds DataTransfer objects for drag/paste whether or not the DOM has the class."},{globals:[`IntersectionObserver`],profiles:Qc,reason:`Component libraries construct it unconditionally and crash when it is missing; ours never reports entries (no layout), and suites that need entries install a mock by assignment.`},{globals:/* @__PURE__ */ `SVGAElement.SVGCircleElement.SVGClipPathElement.SVGEllipseElement.SVGFilterElement.SVGForeignObjectElement.SVGGeometryElement.SVGGradientElement.SVGImageElement.SVGLineElement.SVGLinearGradientElement.SVGMarkerElement.SVGMaskElement.SVGPathElement.SVGPatternElement.SVGPolygonElement.SVGPolylineElement.SVGRadialGradientElement.SVGRectElement.SVGScriptElement.SVGStopElement.SVGStyleElement.SVGTSpanElement.SVGTextContentElement.SVGTextElement.SVGTextPathElement.SVGTextPositioningElement.SVGUseElement.SVGViewElement.MathMLElement`.split(`.`),members:[`SVGElement.autofocus`,...on(`SVGGraphicsElement`,[`getBBox`,`getCTM`,`getScreenCTM`]),...on(`SVGSVGElement`,[`animationsPaused`,`checkEnclosure`,`checkIntersection`,`createSVGAngle`,`createSVGLength`,`createSVGMatrix`,`createSVGPoint`,`createSVGTransform`,`deselectAll`,`getCurrentTime`,`getEnclosureList`,`getIntersectionList`,`pauseAnimations`,`setCurrentTime`,`unpauseAnimations`])],profiles:Qc,reason:`Element classes for markup jsdom creates as plain SVGElement/Element (instanceof checks only), and SVG geometry that returns zeros without layout; suites that need numbers assign their own getBBox.`},{globals:[`DOMMatrix`,`DOMMatrixReadOnly`,`DOMPoint`,`DOMPointReadOnly`,`DOMRectList`],members:[`Range.getBoundingClientRect`,`Range.getClientRects`],profiles:Qc,reason:"Geometry values (zeros without layout). Editors call `range.getBoundingClientRect()`, which jsdom lacks; suites mock it by assignment."},{globals:[`CSSPropertyRule`,`CSSStartingStyleRule`,`CustomStateSet`,`DOMStringList`,`MediaError`,`TimeRanges`,`VisualViewport`],members:[...on(`CSSRule`,[`DOCUMENT_RULE`,`REGION_STYLE_RULE`,`VIEWPORT_RULE`]),...on(`CSSRule.static`,[`DOCUMENT_RULE`,`REGION_STYLE_RULE`,`VIEWPORT_RULE`]),`CSSStyleDeclaration.cssFloat`,...on(`ElementInternals`,[`ariaActiveDescendantElement`,`ariaBrailleLabel`,`ariaBrailleRoleDescription`,`ariaControlsElements`,`ariaDescribedByElements`,`ariaDetailsElements`,`ariaErrorMessageElements`,`ariaFlowToElements`,`ariaLabelledByElements`,`ariaOwnsElements`,`checkValidity`,`form`,`reportValidity`,`setFormValue`,`setValidity`,`states`,`validationMessage`,`validity`,`willValidate`])],profiles:Qc,reason:`Interfaces reached only through objects that create them (style sheets, form-associated custom elements, media elements).`},{globals:[`cancelIdleCallback`,`requestIdleCallback`,`clientInformation`,`closed`,`crossOriginIsolated`,`isSecureContext`,`opener`,`reportError`],members:[`History.scrollRestoration`,...on(`Screen`,[`availLeft`,`availTop`,`isExtended`]),...on(`Navigator`,[`deviceMemory`,`doNotTrack`,`maxTouchPoints`,`oscpu`,`pdfViewerEnabled`,`registerProtocolHandler`,`sendBeacon`,`unregisterProtocolHandler`,`userActivation`,`vibrate`,`webdriver`])],profiles:Qc,reason:`Window and navigator members with browser defaults (no touch points, not a webdriver). Fake timers fake requestIdleCallback like the other timer functions; libraries that fall back to setTimeout without it behave the same.`},{members:[...on(`Document`,[`adoptedStyleSheets`,`alinkColor`,`bgColor`,`designMode`,`domain`,`fgColor`,`linkColor`,`moveBefore`,`scrollingElement`,`vlinkColor`]),`Document.static.parseHTMLUnsafe`,`DocumentFragment.moveBefore`,...on(`Element`,[`ariaActiveDescendantElement`,`ariaBrailleLabel`,`ariaBrailleRoleDescription`,`ariaControlsElements`,`ariaDescribedByElements`,`ariaDetailsElements`,`ariaErrorMessageElements`,`ariaFlowToElements`,`ariaLabelledByElements`,`ariaOwnsElements`,`checkVisibility`,`dataset`,`getHTML`,`moveBefore`,`part`,`scroll`,`scrollBy`,`scrollIntoView`,`scrollTo`,`setHTMLUnsafe`]),...on(`ShadowRoot`,[`adoptedStyleSheets`,`clonable`,`delegatesFocus`,`elementFromPoint`,`elementsFromPoint`,`getHTML`,`serializable`,`setHTMLUnsafe`,`slotAssignment`,`styleSheets`]),...on(`Selection`,[`direction`,`getComposedRanges`,`modify`])],profiles:Qc,reason:"DOM members suites written for jsdom stub by assignment when they need them (`Element.prototype.scrollIntoView = vi.fn()`), which replaces ours. `Element.dataset` is on Element (jsdom: on HTMLElement and SVGElement)."},{members:[...on(`HTMLElement`,[`accessKeyLabel`,`autocapitalize`,`autocorrect`,`autofocus`,`contentEditable`,`enterKeyHint`,`hidePopover`,`innerText`,`inputMode`,`isContentEditable`,`outerText`,`popover`,`showPopover`,`spellcheck`,`togglePopover`,`writingSuggestions`]),...on(`HTMLButtonElement`,[`command`,`commandForElement`,`formAction`,`formEnctype`,`formMethod`,`popoverTargetAction`,`popoverTargetElement`]),...on(`HTMLInputElement`,[`formAction`,`formEnctype`,`formMethod`,`height`,`popoverTargetAction`,`popoverTargetElement`,`showPicker`,`width`]),...on(`HTMLDialogElement`,[`close`,`closedBy`,`requestClose`,`returnValue`,`show`,`showModal`]),...on(`HTMLAnchorElement`,[`ping`,`referrerPolicy`]),...on(`HTMLAreaElement`,[`download`,`hreflang`,`ping`,`referrerPolicy`,`type`]),...on(`HTMLCanvasElement`,[`captureStream`,`transferControlToOffscreen`]),`HTMLDetailsElement.name`,`HTMLEmbedElement.getSVGDocument`,...on(`HTMLFormElement`,[`autocomplete`,`encoding`,`rel`,`relList`]),...on(`HTMLIFrameElement`,[`allow`,`loading`,`referrerPolicy`,`sandbox`]),...on(`HTMLImageElement`,[`decode`,`decoding`,`fetchPriority`,`loading`,`referrerPolicy`,`x`,`y`]),...on(`HTMLLinkElement`,[`as`,`blocking`,`disabled`,`fetchPriority`,`imageSizes`,`imageSrcset`,`integrity`,`referrerPolicy`,`sizes`]),...on(`HTMLMarqueeElement`,[`loop`,`start`,`stop`]),...on(`HTMLMediaElement`,[`disableRemotePlayback`,`error`,`fastSeek`,`getStartDate`,`loading`,`mediaKeys`,`preservesPitch`,`setMediaKeys`,`setSinkId`,`sinkId`,`srcObject`]),`HTMLMetaElement.media`,...on(`HTMLObjectElement`,[`contentWindow`,`getSVGDocument`]),...on(`HTMLScriptElement`,[`async`,`blocking`,`fetchPriority`,`integrity`,`noModule`,`referrerPolicy`]),`HTMLScriptElement.static.supports`,...on(`HTMLSelectElement`,[`autocomplete`,`showPicker`]),`HTMLSlotElement.assign`,...on(`HTMLSourceElement`,[`height`,`width`]),`HTMLStyleElement.blocking`,...on(`HTMLTemplateElement`,[`shadowRootClonable`,`shadowRootDelegatesFocus`,`shadowRootMode`,`shadowRootSerializable`,`shadowRootSlotAssignment`]),`HTMLTrackElement.track`,...on(`HTMLVideoElement`,[`cancelVideoFrameCallback`,`disablePictureInPicture`,`getVideoPlaybackQuality`,`requestPictureInPicture`,`requestVideoFrameCallback`])],profiles:Qc,reason:"Reflected attributes and element behavior we implement (popover, dialog, invoker commands, innerText). Where jsdom lacks a method, suites assign their own (`HTMLDialogElement.prototype.showModal = vi.fn()`), which replaces ours."}];function resolveCompat(e){if(e===void 0)return Zc;if(Xc.includes(e))return e;throw TypeError(`Unknown compat profile ${JSON.stringify(e)}: expected ${Xc.map(e=>JSON.stringify(e)).join(`, `)}.`)}const al=/* @__PURE__ */ new Map;function hiddenGlobals(e){let t=al.get(e);if(t===void 0){let n=/* @__PURE__ */ new Set;for(let t of il)if(!(t.globals===void 0||t.profiles.includes(e)))for(let e of t.globals)n.add(e);al.set(e,t=n)}return t}function compatExposes(e,t){for(let n of il)if(n.globals?.includes(t)||n.members?.includes(t))return n.profiles.includes(e);return!0}const ol=/* @__PURE__ */ new Map;function deferCompatMember(e,t,n){let r=Object.getOwnPropertyDescriptor(e,n);if(r===void 0)throw Error(`deferCompatMember: ${t}.${n} is not defined`);delete e[n],ol.set(`${t}.${n}`,{owner:e,descriptor:r})}const sl=/* @__PURE__ */ new Map;function deferredCompatMembers(){return ol}let cl=null;function gatedMembers(){if(cl!==null)return cl;cl=[];for(let e of il)if(e.members!==void 0&&e.profiles.length!==Xc.length)for(let t of e.members){let n=t.split(`.`),r=n.length===3&&n[1]===`static`;cl.push({key:t,iface:n[0],member:n[n.length-1],isStatic:r,profiles:e.profiles})}return cl}function installCompatMembers(e,t){let n=[];for(let r of gatedMembers()){let i=t[r.iface];if(i===void 0)continue;let a=r.isStatic?i:i.prototype;if(a===void 0)continue;let o=r.profiles.includes(e),s=Object.hasOwn(a,r.member);if(o&&!s){let e=ol.get(r.key)?.descriptor??sl.get(r.key);if(e===void 0)continue;Object.defineProperty(a,r.member,e),n.push(()=>delete a[r.member])}else if(!o&&s){let e=Object.getOwnPropertyDescriptor(a,r.member);sl.set(r.key,e),delete a[r.member],n.push(()=>Object.defineProperty(a,r.member,e))}}return()=>{for(let e=n.length-1;e>=0;e--)n[e]()}}function fireAnEvent(e,t,n,r,i=!1){let a=n===void 0?new Event(e,r):new n(e,r);return a._s.flags|=128,dispatch(a,t,i)}function dispatchTrusted(e,t){return e._s.flags|=128,dispatch(e,t)}function fireSyntheticPointerEvent(e,t,n,r){let i=t[M],a=i===void 0?null:i.doc[q],o=new PointerEvent(e,{pointerId:-1,...r,bubbles:!0,cancelable:!0,composed:!0,view:a});return n||(o._s.flags|=128),dispatch(o,t)}function fireEvent(e,t,n=!1,r=!1){return fireAnEvent(t,e,void 0,{bubbles:n,cancelable:r})}function fireFocusEvent(e,t,n,r,i){fireAnEvent(t,e,FocusEvent,{bubbles:r,cancelable:!1,composed:!0,relatedTarget:n,view:i,detail:0})}function fireToggleEvent(e,t,n,r,i,a=null){return fireAnEvent(t,e,ToggleEvent,{bubbles:!1,cancelable:i,oldState:n,newState:r,source:a})}function fireSyntheticClick(e){return fireSyntheticPointerEvent(`click`,e,!0)}function queueElementTask(e,t){let n=(`doc`in e?e:e[M]).doc[q]??currentWindowOrNull();n===null?setTimeout(t,0):n._task(t,0)}var NodeCache=class{roleVersion;role;roleAttr;nameVersion;name;styleVersion;styleSheetVersion;style;computedStyle;ariaNameStyleVersion;ariaHiddenVersion;ariaHiddenStyleVersion;ariaHiddenBits;constructor(){this.roleVersion=-1,this.role=``,this.roleAttr=null,this.nameVersion=-1,this.name=``,this.styleVersion=-1,this.styleSheetVersion=-1,this.style=null,this.computedStyle=null,this.ariaNameStyleVersion=-1,this.ariaHiddenVersion=-1,this.ariaHiddenStyleVersion=-1,this.ariaHiddenBits=0}};function nodeCache(e){let t=e.cache;return t===null&&(e.cache=t=new NodeCache),t}function hex(e){return e.toString(16)}function serializeIdentifier(e){let t=``,n=e.length,r=n>0?e.charCodeAt(0):-1;for(let i=0;i<n;i++){let a=e.charCodeAt(i);t+=a===0?`�`:a>=1&&a<=31||a===127||i===0&&a>=48&&a<=57||i===1&&a>=48&&a<=57&&r===45?`\\`+hex(a)+` `:i===0&&a===45&&n===1?`\\-`:a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?e[i]:`\\`+e[i]}return t}function serializeString(e){let t=`"`;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r===0?`�`:r>=1&&r<=31||r===127?`\\`+hex(r)+` `:r===34||r===92?`\\`+e[n]:e[n]}return t+`"`}function serializeAnPlusB(e,t){if(e===0)return String(t);let n=e===1?`n`:e===-1?`-n`:String(e)+`n`;return t>0?n+=`+`+String(t):t<0&&(n+=String(t)),n}let ll=null;function withNamespaceContext(e,t){let n=ll;ll=e??null;try{return t()}finally{ll=n}}function hasDefaultNamespace(){return ll!==null&&ll.defaultNamespace!==void 0}function serializeNamespace(e){switch(e.nsKind){case 1:return hasDefaultNamespace()?`*|`:``;case 2:return`|`;case 3:return prefixIsDefault(e.nsPrefix)?``:serializeIdentifier(e.nsPrefix)+`|`}return``}function prefixIsDefault(e){if(!hasDefaultNamespace()||ll.namespaces===void 0)return!1;let t=ll.namespaces.get(e);return t!==void 0&&t===ll.defaultNamespace}function attrOp(e){switch(e){case 1:return`=`;case 2:return`~=`;case 3:return`|=`;case 4:return`^=`;case 5:return`$=`;case 6:return`*=`}return``}function joinArgs(e,t,n){let r=``;for(let i=0;i<e.length;i++)i>0&&(r+=t),r+=n?serializeIdentifier(e[i]):e[i];return r}function serializeSimple(e){switch(e.kind){case 1:return serializeNamespace(e)+serializeIdentifier(e.name);case 2:return serializeNamespace(e)+`*`;case 3:return`#`+serializeIdentifier(e.name);case 4:return`.`+serializeIdentifier(e.name);case 5:{let t=`[`;return e.nsKind===1?t+=`*|`:e.nsKind===3&&(t+=serializeIdentifier(e.nsPrefix)+`|`),t+=serializeIdentifier(e.name),e.op!==0&&(t+=attrOp(e.op)+serializeString(e.value),e.caseFlag===1?t+=` i`:e.caseFlag===2&&(t+=` s`)),t+`]`}case 6:{let t=e.pseudo;if(t===5||t===6||t===7||t===8){let t=`:`+e.name+`(`+serializeAnPlusB(e.a,e.b);return e.list!==null&&(t+=` of `+serializeSelectorList(e.list)),t+`)`}if(t===11){let t=`:`+e.name+`(`;for(let n=0;n<e.args.length;n++)n>0&&(t+=`, `),t+=needsString(e.args[n])?serializeString(e.args[n]):serializeIdentifier(e.args[n]);return t+`)`}return t===12||t===13?`:`+e.name+`(`+serializeIdentifier(e.args[0])+`)`:t===88?e.args.length===0?`:heading`:`:heading(`+joinArgs(e.args,`, `,!1)+`)`:e.list===null?`:`+e.name:`:`+e.name+`(`+serializeSelectorList(e.list)+`)`}case 7:return e.list===null?e.pseudo===3||e.args.length!==0?`::`+e.name+`(`+joinArgs(e.args,` `,!0)+`)`:`::`+e.name:`::`+e.name+`(`+serializeSelectorList(e.list)+`)`}return``}function needsString(e){if(e.length===0)return!0;let t=e.charCodeAt(0);return t===42||t>=48&&t<=57}function serializeCompound(e){let t=``,n=e.simples.length;for(let r=0;r<n;r++){let i=e.simples[r];r===0&&n>1&&i.kind===2&&(i.nsKind===1&&!hasDefaultNamespace()||i.nsKind===0||i.nsKind===3&&prefixIsDefault(i.nsPrefix))||(t+=serializeSimple(i))}return t}function combinator(e){switch(e){case 1:return` `;case 2:return` > `;case 3:return` + `;case 4:return` ~ `}return` `}function serializeComplex(e){if(e.invalid)return e.text;let t=``;e.leading!==0&&e.leading!==1&&(t+=combinator(e.leading).slice(1));for(let n=0;n<e.compounds.length;n++)n>0&&(t+=combinator(e.combinators[n-1])),t+=serializeCompound(e.compounds[n]);return t}function serializeSelectorList(e){let t=``;for(let n=0;n<e.items.length;n++)n>0&&(t+=`, `),t+=serializeComplex(e.items[n]);return t}var CompiledSelector=class{text;specificity;keyKind;key;pseudoElement;volatile;h0;h1;h2;h3;direct;[St];[vn];constructor(e,t){this.text=e.text,this.specificity=e.specificity;let n=subjectKey(e);this.keyKind=n.kind,this.key=n.value,this.pseudoElement=e.pseudoElement,this.volatile=t.volatile;let r=ancestorHashes(e);this.h0=r.length>0?r[0]:-1,this.h1=r.length>1?r[1]:-1,this.h2=r.length>2?r[2]:-1,this.h3=r.length>3?r[3]:-1,this.direct=!t.usesScope&&t.nthTests.length===0,this[St]=e,this[vn]=t}get specificityTuple(){return unpackSpecificity(this.specificity)}};function compileSelectorList(e,t){let n=new SelectorParser(e).parseSelectorList();if(n===null)return null;let r=[];for(let e=0;e<n.items.length;e++){let i=new CompileInfo;if(t?.namespaces!==void 0){let e=t.namespaces;i.resolve=t=>e.has(t)?e.get(t):void 0}t!==void 0&&`defaultNamespace`in t&&(i.defaultNs=t.defaultNamespace);let a=compileComplex(n.items[e],i);if(i.error!==``)return null;r.push(new CompiledSelector(a,i))}return{text:e,serialized:serializeSelectorList(n),selectors:r}}function isSupportedSelector(e){let t=new SelectorParser(e).parseSelectorList();if(t===null)return!1;for(let e=0;e<t.items.length;e++){let n=new CompileInfo;if(compileComplex(t.items[e],n),n.error!==``||n.forgivingDropped)return!1}return!0}function serializeSelector(e,t){let n=new SelectorParser(e).parseSelectorList();return n===null?null:t===void 0?serializeSelectorList(n):withNamespaceContext(t,()=>serializeSelectorList(n))}function normalizePseudo(e){let t=0;for(;t<e.length&&e.charCodeAt(t)===58;)t++;return t===0?e:e.slice(t)}function matchesSelector(e,t,n,r){let i=n==null||n===``?``:normalizePseudo(n);if(e.pseudoElement!==i)return!1;let a=setScope(r?.scope??null),o=r?.shadowHost===void 0?null:setHostContext(r.shadowHost);try{return r?.shadowHost!==void 0&&r.shadowHost===t?matchFeaturelessHost(e[St],t):matchComplex(e[St],t)}finally{setScope(a),r?.shadowHost!==void 0&&setHostContext(o),e[vn].nthTests.length!==0&&resetMemos(e[vn])}}function matchesSelectorDirect(e,t,n){return e.pseudoElement===n?e.direct?e[St].fn(t):matchesSelector(e,t,n):!1}const ul={width:1024,height:768,devicePixelRatio:1,mediaType:`screen`};var Tok=class{type;text;lower;num;unit;constructor(e,t,n,r,i){this.type=e,this.text=t,this.lower=n,this.num=r,this.unit=i}};function tokenize(e){let t=new CSSTokenizer(e),n=[];for(;;){let r=t.next();if(r===0)break;let i=r===1||r===2?t.value.toLowerCase():r===9?t.value:``;n.push(new Tok(r,e.slice(t.start,t.end),i,t.num,r===12?t.unit.toLowerCase():``))}return n}var MQNode=class{kind;children;name;op;value;op2;value2;constructor(e){this.kind=e,this.children=[],this.name=``,this.op=``,this.value=null,this.op2=``,this.value2=null}},MediaQuery=class{text;negated;type;condition;invalid;constructor(e,t,n,r,i){this.text=e,this.negated=t,this.type=n,this.condition=r,this.invalid=i}},MQParser=class{toks;i;constructor(e){this.toks=e,this.i=0}ws(){for(;this.i<this.toks.length&&this.toks[this.i].type===13;)this.i++}peek(){return this.ws(),this.i<this.toks.length?this.toks[this.i]:null}ident(e){let t=this.peek();return t!==null&&t.type===1&&t.lower===e&&(this.i++,!0)}atEnd(){return this.peek()===null}condition(e){if(this.ident(`not`)){let e=this.inParens();if(e===null)return null;let t=new MQNode(1);return t.children.push(e),t}let t=this.inParens();if(t===null)return null;let n=this.peek();if(n===null||n.type!==1||n.lower!==`and`&&n.lower!==`or`)return t;let r=n.lower;if(r===`or`&&!e)return null;let i=new MQNode(r===`and`?2:3);for(i.children.push(t);this.ident(r);){let e=this.inParens();if(e===null)return null;i.children.push(e)}let a=this.peek();return a!==null&&a.type===1&&(a.lower===`and`||a.lower===`or`)?null:i}inParens(){let e=this.peek();if(e===null)return null;if(e.type===2)return this.i++,this.skipToClose()?new MQNode(5):null;if(e.type!==21)return null;this.i++;let t=this.i,n=this.peek();if(n!==null&&(n.type===21||n.type===1&&n.lower===`not`||n.type===2)){let e=this.condition(!0);if(e!==null){let t=this.peek();if(t!==null&&t.type===22)return this.i++,e}this.i=t}let r=this.feature();if(r!==null){let e=this.peek();if(e!==null&&e.type===22)return this.i++,r}return this.i=t,this.skipToClose()?new MQNode(5):null}skipToClose(){let e=1;for(;this.i<this.toks.length;){let t=this.toks[this.i++].type;if(t===21||t===2||t===19||t===23)e++;else if((t===22||t===20||t===24)&&(e--,e===0))return!0}return!1}value(){let e=this.peek();if(e===null)return null;if(e.type===10){this.i++;let t=this.i,n=this.peek();if(n!==null&&n.type===9&&n.lower===`/`){this.i++;let t=this.peek();return t!==null&&t.type===10?(this.i++,[e,t]):null}return this.i=t,[e]}return e.type===12||e.type===1||e.type===11?(this.i++,[e]):null}op(){let e=this.peek();if(e===null||e.type!==9)return``;let t=e.lower;return t!==`<`&&t!==`>`&&t!==`=`?``:(this.i++,t!==`=`&&this.i<this.toks.length&&this.toks[this.i].type===9&&this.toks[this.i].lower===`=`?(this.i++,t+`=`):t)}feature(){let e=this.peek();if(e===null)return null;if(e.type===1){let t=this.i;this.i++;let n=new MQNode(4);n.name=e.lower;let r=this.peek();if(r!==null&&r.type===22)return n;if(r!==null&&r.type===16){this.i++;let e=this.value();return e===null?null:(n.op=`:`,n.value=e,n)}let i=this.op();if(i!==``){let e=this.value();return e===null?null:(n.op=i,n.value=e,n)}this.i=t}let t=this.value();if(t===null)return null;let n=this.op();if(n===``)return null;let r=this.peek();if(r===null||r.type!==1)return null;this.i++;let i=new MQNode(4);i.name=r.lower,i.op=flip$1(n),i.value=t;let a=this.op();if(a!==``){if(n[0]!==a[0]||n===`=`||a===`=`)return null;let e=this.value();if(e===null)return null;i.op2=a,i.value2=e}return i}};function flip$1(e){switch(e){case`<`:return`>`;case`<=`:return`>=`;case`>`:return`<`;case`>=`:return`<=`}return e}__name(flip$1,`flip`);const dl=/* @__PURE__ */ new Set([`all`,`screen`,`print`,`speech`,`tty`,`tv`,`projection`,`handheld`,`braille`,`embossed`,`aural`]);function serializeTokens(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];switch(r.type){case 13:t!==``&&!t.endsWith(` `)&&!t.endsWith(`(`)&&(t+=` `);break;case 1:t+=r.lower;break;case 16:for(t=t.trimEnd()+`: `;n+1<e.length&&e[n+1].type===13;)n++;break;case 22:t=t.trimEnd()+`)`;break;case 10:t+=formatNumber(r.num);break;case 12:t+=formatNumber(r.num)+r.unit;break;case 9:if(r.lower===`/`)for(t=t.trimEnd()+` / `;n+1<e.length&&e[n+1].type===13;)n++;else t+=r.text;break;default:t+=r.text}}return t.trim()}function parseQuery(e){let t=new MQParser(e),n=serializeTokens(e),r=new MediaQuery(`not all`,!1,`all`,null,!0);if(t.atEnd())return r;let i=t.peek();if(i.type===1&&i.lower!==`not`&&i.lower!==`only`&&i.lower!==`and`&&i.lower!==`or`){let e=i.lower;t.i++;let a=null;return t.ident(`and`)&&(a=t.condition(!1),a===null)||!t.atEnd()||e===`layer`?r:new MediaQuery(n,!1,e,a,!1)}if(i.type===1&&(i.lower===`not`||i.lower===`only`)){let e=t.i,a=i.lower;t.i++;let o=t.peek();if(o!==null&&o.type===1&&o.lower!==`and`&&o.lower!==`or`&&o.lower!==`not`&&o.lower!==`only`){t.i++;let e=null;return t.ident(`and`)&&(e=t.condition(!1),e===null)||!t.atEnd()?r:new MediaQuery(n,a===`not`,o.lower,e,!1)}t.i=e}let a=t.condition(!0);return a===null||!t.atEnd()?r:new MediaQuery(n,!1,`all`,a,!1)}const fl=/* @__PURE__ */ new Map;function parseMediaQueryList(e){let t=fl.get(e);if(t!==void 0)return t;let n=tokenize(e),r=[],i=0,a=0,o=!1;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e]:null;if(t!==null&&(t.type===21||t.type===2||t.type===19?a++:(t.type===22||t.type===20)&&a--,t.type!==13&&(o=!0)),t===null||t.type===18&&a===0){let a=n.slice(i,e);(t!==null||o)&&r.push(parseQuery(a)),i=e+1}}return r.length===1&&r[0].invalid&&n.every(e=>e.type===13)&&(r.length=0),fl.size>500&&fl.clear(),fl.set(e,r),r}function serializeMediaQueryList(e){let t=``;for(let n=0;n<e.length;n++)t+=(n===0?``:`, `)+e[n].text;return t}function lengthPx(e){if(e.type===10)return e.num===0?0:null;if(e.type!==12)return null;switch(e.unit){case`px`:return e.num;case`em`:case`rem`:return e.num*16;case`in`:return e.num*96;case`cm`:return e.num*96/2.54;case`mm`:return e.num*96/25.4;case`pt`:return e.num*96/72;case`pc`:return e.num*16;case`q`:return e.num*96/101.6;case`vw`:return null}return null}function resolutionDppx(e){if(e.type!==12)return null;switch(e.unit){case`dppx`:case`x`:return e.num;case`dpi`:return e.num/96;case`dpcm`:return e.num*2.54/96}return null}function compare(e,t,n){let r=1e-9;switch(t){case`:`:case`=`:return Math.abs(e-n)<r;case`<`:return e<n-r;case`<=`:return e<=n+r;case`>`:return e>n+r;case`>=`:return e>=n-r}return!1}const pl={orientation:``,"prefers-color-scheme":`light`,"prefers-reduced-motion":`no-preference`,"prefers-reduced-transparency":`no-preference`,"prefers-reduced-data":`no-preference`,"prefers-contrast":`no-preference`,"forced-colors":`none`,"inverted-colors":`none`,hover:`hover`,"any-hover":`hover`,pointer:`fine`,"any-pointer":`fine`,"display-mode":`browser`,scripting:`enabled`,update:`fast`,"overflow-block":`scroll`,"overflow-inline":`scroll`,"color-gamut":`srgb`,"dynamic-range":`standard`,"video-dynamic-range":`standard`};function evalNode(e,t){switch(e.kind){case 6:return 1;case 5:return-1;case 1:{let n=evalNode(e.children[0],t);return n===-1?-1:1-n}case 2:{let n=1;for(let r of e.children){let e=evalNode(r,t);if(e===0)return 0;e===-1&&(n=-1)}return n}case 3:{let n=0;for(let r of e.children){let e=evalNode(r,t);if(e===1)return 1;e===-1&&(n=-1)}return n}case 4:return evalFeature(e,t)}return-1}function evalFeature(e,t){let n=e.name,r=e.op;if(n.startsWith(`-webkit-`)&&(n=n.slice(8)),r===`:`&&(n.startsWith(`min-`)||n.startsWith(`max-`)))r=n.startsWith(`min-`)?`>=`:`<=`,n=n.slice(4);else if(n.startsWith(`min-`)||n.startsWith(`max-`))return-1;let i=t.features?.[n],a=i===void 0?void 0:String(i),o=null,s=`range`;switch(n){case`width`:case`device-width`:o=t.width;break;case`height`:case`device-height`:o=t.height;break;case`aspect-ratio`:case`device-aspect-ratio`:o=t.height===0?0:t.width/t.height,s=`ratio`;break;case`resolution`:case`device-pixel-ratio`:o=t.devicePixelRatio,s=n===`resolution`?`resolution`:`number`;break;case`color`:o=8,s=`integer`;break;case`color-index`:case`monochrome`:case`grid`:o=0,s=`integer`;break;default:s=`discrete`}if(a!==void 0&&s!==`discrete`){let e=Number(a);Number.isNaN(e)||(o=e)}if(s===`discrete`){if(r!==``&&r!==`:`)return-1;let i=a??pl[n];if(n===`orientation`&&(i=a??(t.height>=t.width?`portrait`:`landscape`)),i===void 0)return-1;if(r===``)return+(i!==`none`&&i!==`no-preference`);let o=e.value;return o.length!==1||o[0].type!==1?0:+(o[0].lower===i)}if(o===null)return-1;if(r===``)return o===0?0:1;let check=(e,t)=>{let n=null;return s===`range`?n=e.length===1?lengthPx(e[0]):null:s===`ratio`?e.length===2?n=e[1].num===0?1/0:e[0].num/e[1].num:e.length===1&&e[0].type===10&&(n=e[0].num):s===`resolution`?n=e.length===1?resolutionDppx(e[0]):null:e.length===1&&e[0].type===10&&(n=e[0].num),n===null?-1:+!!compare(o,t,n)},c=check(e.value,r);return e.value2===null||c!==1?c:check(e.value2,e.op2)}function evaluateMediaQuery$1(e,t){if(e.invalid)return!1;let n=t.mediaType??`screen`,r=e.type===`all`||e.type===n;dl.has(e.type)||(r=!1);let i=r;return i&&e.condition!==null&&(i=evalNode(e.condition,t)===1),e.negated?!i:i}__name(evaluateMediaQuery$1,`evaluateMediaQuery`);function evaluateMediaQueryList$1(e,t){if(e.length===0)return!0;for(let n=0;n<e.length;n++)if(evaluateMediaQuery$1(e[n],t))return!0;return!1}__name(evaluateMediaQueryList$1,`evaluateMediaQueryList`);function matchMediaText(e,t){return evaluateMediaQueryList$1(parseMediaQueryList(e),t)}function splitSelectorList(e){let t=[],n=new CSSTokenizer(e),r=0,i=0;for(;;){let a=n.next();if(a===0)break;a===2||a===21||a===19?r++:a===22||a===20?r--:a===18&&r===0&&(t.push(e.slice(i,n.start).trim()),i=n.end)}return t.push(e.slice(i).trim()),t}function containsNesting(e){if(e.indexOf(`&`)===-1)return!1;let t=new CSSTokenizer(e);for(;;){let e=t.next();if(e===0)return!1;if(e===9&&t.value===`&`)return!0}}function resolveNested(e,t){let n=[],r=t.length===1&&isGluableCompound(t[0])?t[0]:`:is(`+t.join(`, `)+`)`;for(let t of splitSelectorList(e)){if(t===``)continue;let e=t;containsNesting(e)||(e=`& `+e),n.push(replaceNesting(e,r))}return n}function isGluableCompound(e){let t=e.charCodeAt(0);if(t!==46&&t!==35&&t!==91&&t!==58)return!1;let n=new CSSTokenizer(e),r=0;for(;;){let e=n.next();if(e===0)return!0;if(e===2||e===21||e===19)r++;else if(e===22||e===20)r--;else if(r===0&&(e===13||e===18||e===9&&(n.value===`>`||n.value===`+`||n.value===`~`||n.value===`|`)))return!1}}function replaceNesting(e,t){let n=new CSSTokenizer(e),r=``,i=0;for(;;){let a=n.next();if(a===0)break;a===9&&n.value===`&`&&(r+=e.slice(i,n.start)+t,i=n.end)}return r+e.slice(i)}function supportsDeclaration(e,t){let n=isCustomPropertyName(e)?e:e.toLowerCase();return isCustomPropertyName(n)?t.trim()!==``||!0:new DeclBlock().setValue(n,t,!1,!1)}var Cursor=class{src;t;type;constructor(e){this.src=e,this.t=new CSSTokenizer(e),this.type=0,this.next()}next(){do this.type=this.t.next();while(this.type===13)}block(){let e=this.t.end,t=1,n=e;for(;t>0;){let e=this.t.next();if(e===0)return null;e===21||e===2||e===19?t++:(e===22||e===20)&&(t--,n=this.t.start)}return this.next(),this.src.slice(e,n)}};function condition(e){if(e.type===1&&e.t.value.toLowerCase()===`not`){e.next();let t=inParens(e);return t===-1?-1:1-t}let t=inParens(e);if(t===-1)return-1;if(e.type!==1)return t;let n=e.t.value.toLowerCase();if(n!==`and`&&n!==`or`)return-1;for(;e.type===1&&e.t.value.toLowerCase()===n;){e.next();let r=inParens(e);if(r===-1)return-1;t=n===`and`?t&r:t|r}return e.type===1?-1:t}function inParens(e){if(e.type===2){let t=e.t.value.toLowerCase(),n=e.block();return n===null?-1:t===`selector`?+!!isSupportedSelector(n.trim()):0}if(e.type!==21)return-1;let t=e.block();if(t===null)return-1;let n=new Cursor(t);if(n.type===21||n.type===2||n.type===1&&n.t.value.toLowerCase()===`not`){let e=condition(n);if(e!==-1&&n.type===0)return e}return declaration(t)}function declaration(e){let t=new CSSTokenizer(e),n=t.next();for(;n===13;)n=t.next();if(n!==1)return 0;let r=t.value;for(n=t.next();n===13;)n=t.next();if(n!==16)return 0;let i=e.slice(t.end).trim(),a=/!\s*important\s*$/i.exec(i);return a!==null&&(i=i.slice(0,a.index).trim()),+!!supportsDeclaration(r,i)}function evaluateSupportsCondition(e){let t=new Cursor(e),n=condition(t);return n!==-1&&t.type===0?n===1:declaration(e)===1}var CSSRuleList=class{[V];[gn];constructor(e){this[V]=e,this[gn]=0,this._sync()}_setRules(e){this[V]=e,this._sync()}_sync(e=0){let t=this,n=this[V];for(let r=e;r<n.length;r++)t[r]=n[r];for(let e=n.length;e<this[gn];e++)delete t[e];this[gn]=n.length}get length(){return this[V].length}item(e){return this[V][e>>>0]??null}*[Symbol.iterator](){yield*this[V]}get[Symbol.toStringTag](){return`CSSRuleList`}},MediaList=class{[$n];[z];[gn];constructor(e,t){this[$n]=e===``?[]:parseMediaQueryList(e),this[z]=t,this[gn]=0,this._sync()}_sync(){let e=this,t=this[$n];for(let n=0;n<t.length;n++)e[n]=t[n].text;for(let n=t.length;n<this[gn];n++)delete e[n];this[gn]=t.length}get mediaText(){return serializeMediaQueryList(this[$n])}set mediaText(e){let t=e===null?``:String(e);this[$n]=t===``?[]:parseMediaQueryList(t).slice(),this._sync(),this[z]?._changed()}get length(){return this[$n].length}item(e){return this[$n][e>>>0]?.text??null}appendMedium(e){let t=parseMediaQueryList(String(e));if(t.length===1){for(let e of this[$n])if(e.text===t[0].text)return;this[$n]=[...this[$n],t[0]],this._sync(),this[z]?._changed()}}deleteMedium(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteMedium' on 'MediaList': 1 argument required, but only 0 present.`);let t=parseMediaQueryList(String(e));if(t.length!==1)return;let n=this[$n].length;if(this[$n]=this[$n].filter(e=>e.text!==t[0].text),this[$n].length===n)throw new DOMException(`Failed to execute 'deleteMedium' on 'MediaList': Failed to delete the medium.`,`NotFoundError`);this._sync(),this[z]?._changed()}toString(){return this.mediaText}*[Symbol.iterator](){for(let e of this[$n])yield e.text}get[Symbol.toStringTag](){return`MediaList`}},StyleSheetList=class{[Ar];[gn];constructor(){this[Ar]=[],this[gn]=0}_set(e){this[Ar]=e;let t=this;for(let n=0;n<e.length;n++)t[n]=e[n];for(let n=e.length;n<this[gn];n++)delete t[n];this[gn]=e.length}get length(){return this[Ar].length}item(e){return this[Ar][e>>>0]??null}*[Symbol.iterator](){yield*this[Ar]}get[Symbol.toStringTag](){return`StyleSheetList`}},StyleSheet=class{[zn];[L];[Mt];[Vr];[cn];constructor(e,t,n,r){this[zn]=e,this[L]=new MediaList(t,this),this[Mt]=!1,this[Vr]=n,this[cn]=r}_changed(){}get type(){return`text/css`}get href(){return this[cn]}get ownerNode(){return this[zn]}get parentStyleSheet(){return null}get title(){let e=this[zn],t=e===null?this[Vr]:e.getAttribute(`title`);return t===``?null:t}get media(){return this[L]}set media(e){this[L].mediaText=String(e)}get disabled(){return this[Mt]}set disabled(e){let t=!!e;t!==this[Mt]&&(this[Mt]=t,this._changed())}};function syntaxError(e,t,n){return new DOMException(`Failed to execute '${e}' on '${t}': Failed to parse the rule '${n}'.`,`SyntaxError`)}var ml=class CSSStyleSheet extends StyleSheet{[V];[Tn];[Ft];[ut];[Nt];[Bn];[Fn];[Et];[K];[ir];constructor(e){let t=e?.media;super(null,t===void 0?``:typeof t==`string`?t:t.mediaText,null,null),this[V]=[],this[Tn]=null,this[Ft]=null,this[ut]=!0,this[Nt]=!1,this[Bn]=null,this[Fn]=null,this[Et]=void 0,this[K]=0,this[ir]=0,e?.disabled&&(this[Mt]=!0),this[Ft]=currentWindowOrNull()?.document??null,e?.baseURL!==void 0&&(this[cn]=null)}static _forOwner(e,t,n,r){let i=new CSSStyleSheet;return i[ut]=!1,i[zn]=e,i[Ft]=e[M].doc,i[cn]=r,i[Vr]=e.getAttribute(`title`),n!==``&&(i[L].mediaText=n),i._setText(t),i}_changed(){this[K]++,this[ir]=this[K];let e=this[Ft];e!==null&&e[Pr]++}_inserted(e,t){if(t!==this[V].length-1||!appendableRule(e))return this._changed();this[K]++;let n=this[Ft];n!==null&&n[Pr]++}_setText(e){for(let e of this[V])e[kr]=null;this[V]=[],this[Fn]=null,this[Et]=void 0;let t=e===``?[]:parseStylesheet(e),n=!1;for(let e of t){let t=e.kind===2?e.name.toLowerCase():``;if(t===`import`&&this[ut]||(t===`import`||t===`namespace`)&&(n&&t===`import`||n&&this[V].some(e=>!(e instanceof CSSImportRule)&&!(e instanceof CSSNamespaceRule)&&!(e instanceof CSSLayerStatementRule))))continue;let r=createRule(e,null,this,!1,!1);r!==null&&(r instanceof CSSImportRule||r instanceof CSSLayerStatementRule||r instanceof CSSNamespaceRule||(n=!0),r[kr]=this,this[V].push(r),r instanceof CSSNamespaceRule&&this._registerNamespace(r))}this[Tn]?._setRules(this[V]),this._changed()}_registerNamespace(e){e[Yn]===``?this[Et]=e[qr]===``?null:e[qr]:(this[Fn]??=/* @__PURE__ */ new Map).set(e[Yn],e[qr]===``?null:e[qr])}get parentStyleSheet(){return this[Bn]===null?null:this[Bn].parentStyleSheet}get ownerRule(){return this[Bn]}get cssRules(){return this[Tn]??=new CSSRuleList(this[V])}get rules(){return this.cssRules}insertRule(e,t=0){if(arguments.length===0)throw TypeError(`Failed to execute 'insertRule' on 'CSSStyleSheet': 1 argument required, but only 0 present.`);if(this[Nt])throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Cannot modify a sheet while it is being replaced.`,`NotAllowedError`);let n=String(e),r=t>>>0;if(r>this[V].length)throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': The index provided (${r}) is larger than the maximum index (${this[V].length}).`,`IndexSizeError`);let i=parseRule(n);if(i===null||(i.kind===2?i.name.toLowerCase():``)===`import`&&this[ut])throw syntaxError(`insertRule`,`CSSStyleSheet`,n);let a=createRule(i,null,this,!1,!1);if(a===null)throw syntaxError(`insertRule`,`CSSStyleSheet`,n);if(a instanceof CSSImportRule)for(let e=0;e<r;e++){let t=this[V][e];if(!(t instanceof CSSImportRule)&&!(t instanceof CSSLayerStatementRule))throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': @import rules must precede all rules except @charset and @layer statements.`,`HierarchyRequestError`)}else if(!(a instanceof CSSNamespaceRule)&&!(a instanceof CSSLayerStatementRule)){for(let e=r;e<this[V].length;e++)if(this[V][e]instanceof CSSImportRule||this[V][e]instanceof CSSNamespaceRule)throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Rules cannot be inserted before @import or @namespace rules.`,`HierarchyRequestError`)}else if(a instanceof CSSNamespaceRule){for(let e of this[V])if(!(e instanceof CSSImportRule)&&!(e instanceof CSSNamespaceRule)&&!(e instanceof CSSLayerStatementRule))throw new DOMException(`Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to insert a @namespace rule after other rules.`,`InvalidStateError`);this._registerNamespace(a)}return a[kr]=this,this[V].splice(r,0,a),this[Tn]?._sync(r),this._inserted(a,r),r}deleteRule(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteRule' on 'CSSStyleSheet': 1 argument required, but only 0 present.`);if(this[Nt])throw new DOMException(`Failed to execute 'deleteRule' on 'CSSStyleSheet': Cannot modify a sheet while it is being replaced.`,`NotAllowedError`);let t=e>>>0;if(t>=this[V].length)throw new DOMException(`Failed to execute 'deleteRule' on 'CSSStyleSheet': The index provided (${t}) is larger than the maximum index (${Math.max(0,this[V].length-1)}).`,`IndexSizeError`);let[n]=this[V].splice(t,1);n[kr]=null,this[Tn]?._sync(t),this._changed()}addRule(e=`undefined`,t=`undefined`,n){let r=String(e)+` { `+String(t)+` }`;return String(t)===``&&(r=String(e)+` { }`),this.insertRule(r,n===void 0?this[V].length:n),-1}removeRule(e=0){this.deleteRule(e)}replace(e){if(!this[ut]||this[Nt])return Promise.reject(new DOMException(`Failed to execute 'replace' on 'CSSStyleSheet': Can't call replace on non-constructed CSSStyleSheets.`,`NotAllowedError`));this[Nt]=!0;let t=String(e);return Promise.resolve().then(()=>(this._setText(t),this[Nt]=!1,this))}replaceSync(e){if(!this[ut]||this[Nt])throw new DOMException(`Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.`,`NotAllowedError`);this._setText(String(e))}get[Symbol.toStringTag](){return`CSSStyleSheet`}},hl=class CSSRule{[kr];[B];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 MARGIN_RULE=9;static NAMESPACE_RULE=10;static COUNTER_STYLE_RULE=11;static SUPPORTS_RULE=12;static DOCUMENT_RULE=13;static FONT_FEATURE_VALUES_RULE=14;static VIEWPORT_RULE=15;static REGION_STYLE_RULE=16;constructor(){if(new.target===CSSRule)throw TypeError(`Illegal constructor`);this[kr]=null,this[B]=null}get type(){return 0}get cssText(){return``}set cssText(e){}get parentRule(){return this[B]}get parentStyleSheet(){let e=this;for(;e[B]!==null;)e=e[B];return e[kr]}_changed(){this.parentStyleSheet?._changed()}_declarationsChanged(){this._changed()}};for(let[e,t]of Object.entries({STYLE_RULE:1,CHARSET_RULE:2,IMPORT_RULE:3,MEDIA_RULE:4,FONT_FACE_RULE:5,PAGE_RULE:6,KEYFRAMES_RULE:7,KEYFRAME_RULE:8,MARGIN_RULE:9,NAMESPACE_RULE:10,COUNTER_STYLE_RULE:11,SUPPORTS_RULE:12,DOCUMENT_RULE:13,FONT_FEATURE_VALUES_RULE:14,VIEWPORT_RULE:15,REGION_STYLE_RULE:16}))Object.defineProperty(hl.prototype,e,{value:t,enumerable:!0});function indent(e){return` `+e.replace(/\n/g,`
10
10
  `)}function blockText(e,t){if(t.length===0)return e+` {
11
11
  }`;let n=e+` {`;for(let e of t)n+=`
12
12
  `+indent(e.cssText);return n+`
13
- }`}var CSSGroupingRule=class extends ml{[H];[wn];constructor(){super(),this[H]=[],this[wn]=null}get cssRules(){return this[wn]??=new CSSRuleList(this[H])}_nestedContext(){for(let e=this;e!==null;e=e[V])if(e instanceof hl)return!0;return!1}insertRule(e,t=0){if(arguments.length===0)throw TypeError(`Failed to execute 'insertRule' on '${this.constructor.name}': 1 argument required, but only 0 present.`);let n=String(e),r=t>>>0;if(r>this[H].length)throw new DOMException(`Failed to execute 'insertRule' on '${this.constructor.name}': The index provided (${r}) is larger than the maximum index (${this[H].length}).`,`IndexSizeError`);let i=parseRule(n);if(i===null)throw syntaxError(`insertRule`,this.constructor.name,n);let a=this._nestedContext(),o=createRule(i,this,this.parentStyleSheet,a,!1);if(o===null||o instanceof CSSImportRule||o instanceof CSSNamespaceRule)throw o instanceof CSSImportRule||o instanceof CSSNamespaceRule?new DOMException(`Failed to execute 'insertRule' on '${this.constructor.name}': '${n}' is not allowed here.`,`HierarchyRequestError`):syntaxError(`insertRule`,this.constructor.name,n);return this[H].splice(r,0,o),this[wn]?._sync(r),this._changed(),r}deleteRule(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteRule' on '${this.constructor.name}': 1 argument required, but only 0 present.`);let t=e>>>0;if(t>=this[H].length)throw new DOMException(`Failed to execute 'deleteRule' on '${this.constructor.name}': The index provided (${t}) is larger than the maximum index (${Math.max(0,this[H].length-1)}).`,`IndexSizeError`);let[n]=this[H].splice(t,1);n[V]=null,this[wn]?._sync(t),this._changed()}},hl=class CSSStyleRule extends CSSGroupingRule{[Sr];[w];[jr];[st];[ct];constructor(e,t){super(),this[Sr]=e,this[w]=t,this[jr]=null,this[st]=null,this[ct]=``}get type(){return 1}get selectorText(){return containsNesting(this[Sr])?this[Sr]:serializeSelector(this[Sr],namespaceOptions(this.parentStyleSheet))??this[Sr]}set selectorText(e){let t=String(e).trim();isValidSelectorFor(t,this._nestedContextForSelf(),this.parentStyleSheet)&&(this[Sr]=t,this[st]=null,this._changed())}_nestedContextForSelf(){for(let e=this[V];e!==null;e=e[V])if(e instanceof CSSStyleRule)return!0;return!1}get style(){return this[jr]??=new CSSStyleDeclaration(null,this[w],this)}set style(e){this.style.cssText=String(e)}get cssText(){let e=this[w].serialize();if(this[H].length===0)return e===``?`${this.selectorText} { }`:`${this.selectorText} { ${e} }`;let t=`${this.selectorText} {`;e!==``&&(t+=`
14
- `+e);for(let e of this[H])t+=`
13
+ }`}var CSSGroupingRule=class extends hl{[V];[Tn];constructor(){super(),this[V]=[],this[Tn]=null}get cssRules(){return this[Tn]??=new CSSRuleList(this[V])}_nestedContext(){for(let e=this;e!==null;e=e[B])if(e instanceof gl)return!0;return!1}insertRule(e,t=0){if(arguments.length===0)throw TypeError(`Failed to execute 'insertRule' on '${this.constructor.name}': 1 argument required, but only 0 present.`);let n=String(e),r=t>>>0;if(r>this[V].length)throw new DOMException(`Failed to execute 'insertRule' on '${this.constructor.name}': The index provided (${r}) is larger than the maximum index (${this[V].length}).`,`IndexSizeError`);let i=parseRule(n);if(i===null)throw syntaxError(`insertRule`,this.constructor.name,n);let a=this._nestedContext(),o=createRule(i,this,this.parentStyleSheet,a,!1);if(o===null||o instanceof CSSImportRule||o instanceof CSSNamespaceRule)throw o instanceof CSSImportRule||o instanceof CSSNamespaceRule?new DOMException(`Failed to execute 'insertRule' on '${this.constructor.name}': '${n}' is not allowed here.`,`HierarchyRequestError`):syntaxError(`insertRule`,this.constructor.name,n);return this[V].splice(r,0,o),this[Tn]?._sync(r),this._changed(),r}deleteRule(e){if(arguments.length===0)throw TypeError(`Failed to execute 'deleteRule' on '${this.constructor.name}': 1 argument required, but only 0 present.`);let t=e>>>0;if(t>=this[V].length)throw new DOMException(`Failed to execute 'deleteRule' on '${this.constructor.name}': The index provided (${t}) is larger than the maximum index (${Math.max(0,this[V].length-1)}).`,`IndexSizeError`);let[n]=this[V].splice(t,1);n[B]=null,this[Tn]?._sync(t),this._changed()}},gl=class CSSStyleRule extends CSSGroupingRule{[wr];[w];[Nr];[st];[ct];constructor(e,t){super(),this[wr]=e,this[w]=t,this[Nr]=null,this[st]=null,this[ct]=``}get type(){return 1}get selectorText(){return containsNesting(this[wr])?this[wr]:serializeSelector(this[wr],namespaceOptions(this.parentStyleSheet))??this[wr]}set selectorText(e){let t=String(e).trim();isValidSelectorFor(t,this._nestedContextForSelf(),this.parentStyleSheet)&&(this[wr]=t,this[st]=null,this._changed())}_nestedContextForSelf(){for(let e=this[B];e!==null;e=e[B])if(e instanceof CSSStyleRule)return!0;return!1}get style(){return this[Nr]??=new CSSStyleDeclaration(null,this[w],this)}set style(e){this.style.cssText=String(e)}get cssText(){let e=this[w].serialize();if(this[V].length===0)return e===``?`${this.selectorText} { }`:`${this.selectorText} { ${e} }`;let t=`${this.selectorText} {`;e!==``&&(t+=`
14
+ `+e);for(let e of this[V])t+=`
15
15
  `+indent(e.cssText);return t+`
16
- }`}_resolvedSelectors(){let e=this[V];for(;e!==null&&!(e instanceof CSSStyleRule);)e=e[V];return e===null?containsNesting(this[Sr])?resolveNested(this[Sr],[`:scope`]):[this[Sr]]:resolveNested(this[Sr],e._resolvedSelectors())}_compile(){let e=this._resolvedSelectors().join(`, `);return this[st]!==null&&this[ct]===e||(this[st]=compileSelectorList(e,namespaceOptions(this.parentStyleSheet)),this[ct]=e),this[st]}get[Symbol.toStringTag](){return`CSSStyleRule`}},CSSNestedDeclarations=class extends ml{[w];[jr];constructor(e){super(),this[w]=e,this[jr]=null}get type(){return 0}get style(){return this[jr]??=new CSSStyleDeclaration(null,this[w],this)}get cssText(){return this[w].serialize()}},CSSConditionRule=class extends CSSGroupingRule{get conditionText(){return``}},CSSMediaRule=class extends CSSConditionRule{[L];constructor(e){super(),this[L]=new MediaList(e,this)}get type(){return 4}get media(){return this[L]}set media(e){this[L].mediaText=String(e)}get conditionText(){return this[L].mediaText}get cssText(){return blockText(`@media `+this[L].mediaText,this[H])}},CSSSupportsRule=class extends CSSConditionRule{[lt];[kn];constructor(e){super(),this[lt]=e,this[kn]=evaluateSupportsCondition(e)}get type(){return 12}get conditionText(){return this[lt]}get cssText(){return blockText(`@supports `+this[lt],this[H])}},CSSContainerRule=class extends CSSConditionRule{[lt];constructor(e){super(),this[lt]=e}get conditionText(){return this[lt]}get containerName(){let e=/^([^\s(]+)\s/.exec(this[lt]);return e!==null&&e[1].toLowerCase()!==`not`?e[1]:``}get containerQuery(){let e=this.containerName;return e===``?this[lt]:this[lt].slice(e.length).trim()}get cssText(){return blockText(`@container `+this[lt],this[H])}},CSSLayerBlockRule=class extends CSSGroupingRule{[R];constructor(e){super(),this[R]=e}get name(){return this[R]}get cssText(){return blockText(this[R]===``?`@layer`:`@layer `+this[R],this[H])}},CSSLayerStatementRule=class extends ml{[Mn];constructor(e){super(),this[Mn]=e}get nameList(){return Object.freeze(this[Mn].slice())}get cssText(){return`@layer `+this[Mn].join(`, `)+`;`}},CSSScopeRule=class extends CSSGroupingRule{[Jn];constructor(e){super(),this[Jn]=e}get start(){let e=this[Jn];return e.charCodeAt(0)===40?parenContents(e,0):null}get end(){let e=this[Jn],t=0;if(e.charCodeAt(0)===40){if(t=matchingParen(e,0),t===-1)return null;t++}let n=/^\s*to\s*\(/i.exec(e.slice(t));return n===null?null:parenContents(e,t+n[0].length-1)}get cssText(){return blockText(this[Jn]===``?`@scope`:`@scope `+this[Jn],this[H])}};function matchingParen(e,t){let n=0;for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);if(t===92)r++;else if(t===34||t===39)for(r++;r<e.length&&e.charCodeAt(r)!==t;r++)e.charCodeAt(r)===92&&r++;else if(t===40)n++;else if(t===41&&--n===0)return r}return-1}function parenContents(e,t){let n=matchingParen(e,t);return n===-1?null:e.slice(t+1,n).trim()}var CSSStartingStyleRule=class extends CSSGroupingRule{get cssText(){return blockText(`@starting-style`,this[H])}},CSSImportRule=class extends ml{[sn];[L];[Cn];[Nr];constructor(e,t,n,r){super(),this[sn]=e,this[L]=new MediaList(t,this),this[Cn]=n,this[Nr]=r}get type(){return 3}get href(){return this[sn]}get media(){return this[L]}get styleSheet(){return null}get layerName(){return this[Cn]}get supportsText(){return this[Nr]}get cssText(){let e=`@import `+serializeUrl(this[sn]);this[Cn]!==null&&(e+=this[Cn]===``?` layer`:` layer(${this[Cn]})`),this[Nr]!==null&&(e+=` supports(${this[Nr]})`);let t=this[L].mediaText;return t!==``&&(e+=` `+t),e+`;`}},CSSNamespaceRule=class extends ml{[qn];[Gr];constructor(e,t){super(),this[qn]=e,this[Gr]=t}get type(){return 10}get namespaceURI(){return this[Gr]}get prefix(){return this[qn]}get cssText(){return`@namespace `+(this[qn]===``?``:this[qn]+` `)+serializeUrl(this[Gr])+`;`}},DescriptorRule=class extends ml{[w];[jr];constructor(e){super(),this[w]=e,this[jr]=null}get style(){return this[jr]??=new CSSStyleDeclaration(null,this[w],this)}},CSSFontFaceRule=class extends DescriptorRule{get type(){return 5}get cssText(){let e=this[w].serialize();return e===``?`@font-face { }`:`@font-face { ${e} }`}},CSSPageRule=class extends DescriptorRule{[Sr];constructor(e,t){super(t),this[Sr]=e}get type(){return 6}get selectorText(){return this[Sr]}set selectorText(e){this[Sr]=String(e).trim()}get cssText(){let e=this[w].serialize(),t=this[Sr]===``?`@page`:`@page `+this[Sr];return e===``?`${t} { }`:`${t} { ${e} }`}},CSSPropertyRule=class extends ml{[R];[w];constructor(e,t){super(),this[R]=e,this[w]=t}get name(){return this[R]}get syntax(){return unquote(this[w].getPropertyValue(`syntax`))}get inherits(){return this[w].getPropertyValue(`inherits`).toLowerCase()===`true`}get initialValue(){let e=this[w].indexOf(`initial-value`);return e===-1?null:this[w].values[e]}get cssText(){let e=this[w].serialize();return e===``?`@property ${this[R]} { }`:`@property ${this[R]} { ${e} }`}};function unquote(e){return e.length>=2&&(e[0]===`"`||e[0]===`'`)?e.slice(1,-1):e}var CSSKeyframeRule=class extends DescriptorRule{[xn];constructor(e,t){super(t),this[xn]=e}get type(){return 8}get keyText(){return this[xn]}set keyText(e){let t=normalizeKeyText(String(e));if(t===null)throw new DOMException(`Failed to set the 'keyText' property on 'CSSKeyframeRule': The key '${e}' is invalid and cannot be parsed`,`SyntaxError`);this[xn]=t,this._changed()}get cssText(){let e=this[w].serialize();return e===``?`${this[xn]} { }`:`${this[xn]} { ${e} }`}},CSSKeyframesRule=class extends ml{[R];[H];[wn];constructor(e){super(),this[R]=e,this[H]=[],this[wn]=null}get type(){return 7}get name(){return this[R]}set name(e){this[R]=String(e),this._changed()}get cssRules(){return this[wn]??=new CSSRuleList(this[H])}get length(){return this[H].length}appendRule(e){let t=parseRule(String(e));if(t===null||t.kind!==1)return;let n=createKeyframe(t);n!==null&&(n[V]=this,this[H].push(n),this[wn]?._sync(this[H].length-1),this._changed())}deleteRule(e){let t=this._findIndex(String(e));if(t===-1)return;let[n]=this[H].splice(t,1);n[V]=null,this[wn]?._sync(t),this._changed()}findRule(e){let t=this._findIndex(String(e));return t===-1?null:this[H][t]}_findIndex(e){let t=normalizeKeyText(e);if(t===null)return-1;for(let e=this[H].length-1;e>=0;e--)if(this[H][e][xn]===t)return e;return-1}get cssText(){return blockText(`@keyframes `+this[R],this[H])}};function namespaceOptions(e){return e!==null&&(e[Nn]!==null||e[Et]!==void 0)?{namespaces:e[Nn]??void 0,defaultNamespace:e[Et]}:void 0}function isValidSelectorFor(e,t,n){if(e===``)return!1;let r=namespaceOptions(n);return t?compileSelectorList(resolveNested(e,[`*`]).join(`, `),r)!==null:containsNesting(e)?compileSelectorList(resolveNested(e,[`:scope`]).join(`, `),r)!==null:compileSelectorList(e,r)!==null}function normalizeKeyText(e){let t=e.split(`,`),n=[];for(let e of t){let t=e.trim().toLowerCase();if(t===`from`)n.push(`0%`);else if(t===`to`)n.push(`100%`);else{let e=/^([+]?\d*\.?\d+(?:e[+-]?\d+)?)%$/.exec(t);if(e===null)return null;let r=Number(e[1]);if(r<0||r>100)return null;n.push(String(r)+`%`)}}return n.join(`, `)}function createKeyframe(e){let t=normalizeKeyText(e.prelude);if(t===null)return null;let n=new DeclBlock;return n.addRaw(e.decls),new CSSKeyframeRule(t,n)}function leadingDecls(e){return e.leading===e.decls.length?e.decls:e.decls.slice(0,e.leading)}function nestedDeclarations(e,t){let n=new DeclBlock;n.addRaw(t);let r=new CSSNestedDeclarations(n);return r[V]=e,r}function fillChildren(e,t,n,r){let i=r||e instanceof hl;r&&t.leading!==0&&!(e instanceof hl)&&e[H].push(nestedDeclarations(e,leadingDecls(t)));for(let r of t.rules){if(r.kind===3){i&&e[H].push(nestedDeclarations(e,r.decls));continue}let t=createRule(r,e,n,i,!1);t===null||t instanceof CSSImportRule||t instanceof CSSNamespaceRule||e[H].push(t)}}function parseImportPrelude(e){let t=splitComponents(e);if(t===null)return null;let n=0;for(;n<t.length&&t[n].type===100;)n++;let r=t[n];if(r===void 0)return null;let i;if(r.type===5||r.type===7)i=r.value;else if(r.type===2&&r.lower===`url`){let e=splitComponents(r.text.slice(4,-1).trim());if(e===null||e.length!==1||e[0].type!==5)return null;i=e[0].value}else return null;n++;let a=null,o=null,s=t.slice(n),c=0,skipWs=()=>{for(;c<s.length&&s[c].type===100;)c++};skipWs(),c<s.length&&s[c].type===1&&s[c].lower===`layer`?(a=``,c++):c<s.length&&s[c].type===2&&s[c].lower===`layer`&&(a=s[c].text.slice(6,-1).trim(),c++),skipWs(),c<s.length&&s[c].type===2&&s[c].lower===`supports`&&(o=s[c].text.slice(9,-1).trim(),c++);let l=``;for(;c<s.length;c++)l+=s[c].text;return{href:i,layer:a,supports:o,media:l.trim()}}function appendableRule(e){if(e instanceof CSSLayerBlockRule||e instanceof CSSLayerStatementRule||e instanceof CSSImportRule||e instanceof CSSNamespaceRule)return!1;if(e instanceof hl||e instanceof CSSMediaRule||e instanceof CSSSupportsRule){let t=e[H];for(let e=0;e<t.length;e++)if(!appendableRule(t[e]))return!1}return!0}function createRule(e,t,n,r,i){let a=null;if(e.kind===1){if(i)return createKeyframe(e);if(!e.hasBlock||!isValidSelectorFor(e.prelude,r,n))return null;let a=new DeclBlock;a.addRaw(leadingDecls(e));let o=new hl(e.prelude,a);return o[V]=t,fillChildren(o,e,n,!0),o}let o=e.name.toLowerCase(),s=e.prelude;switch(o){case`media`:{if(!e.hasBlock)return null;let i=new CSSMediaRule(s);i[V]=t,fillChildren(i,e,n,r),a=i;break}case`supports`:{if(!e.hasBlock||s===``)return null;let i=new CSSSupportsRule(s);i[V]=t,fillChildren(i,e,n,r),a=i;break}case`container`:{if(!e.hasBlock)return null;let i=new CSSContainerRule(s);i[V]=t,fillChildren(i,e,n,r),a=i;break}case`layer`:{let i=s===``?[]:s.split(`,`).map(e=>e.trim());for(let e of i)if(!/^-?[_a-zA-Z\u0080-￿][-_a-zA-Z0-9\u0080-￿]*(\.-?[_a-zA-Z\u0080-￿][-_a-zA-Z0-9\u0080-￿]*)*$/.test(e))return null;if(e.hasBlock){if(i.length>1)return null;let o=new CSSLayerBlockRule(i[0]??``);o[V]=t,fillChildren(o,e,n,r),a=o}else{if(i.length===0)return null;a=new CSSLayerStatementRule(i)}break}case`scope`:{if(!e.hasBlock)return null;let r=new CSSScopeRule(s);r[V]=t,fillChildren(r,e,n,!0),a=r;break}case`starting-style`:{if(!e.hasBlock)return null;let i=new CSSStartingStyleRule;i[V]=t,fillChildren(i,e,n,r),a=i;break}case`keyframes`:case`-webkit-keyframes`:case`-moz-keyframes`:{if(!e.hasBlock||r)return null;let t=splitComponents(s);if(t===null||t.length!==1||t[0].type!==1&&t[0].type!==5)return null;let n=new CSSKeyframesRule(t[0].type===5?serializeString$1(t[0].value):t[0].text);for(let t of e.rules){if(t.kind!==1)continue;let e=createKeyframe(t);e!==null&&(e[V]=n,n[H].push(e))}a=n;break}case`font-face`:{if(!e.hasBlock||s!==``)return null;let t=new DeclBlock;for(let n of e.decls)t.putParsed(n.name.toLowerCase(),n.value,n.important);a=new CSSFontFaceRule(t);break}case`page`:{if(!e.hasBlock)return null;let t=new DeclBlock;t.addRaw(e.decls),a=new CSSPageRule(s,t);break}case`property`:{if(!e.hasBlock||!s.startsWith(`--`))return null;let t=new DeclBlock;for(let n of e.decls)t.putParsed(n.name.toLowerCase(),n.value,!1);a=new CSSPropertyRule(s,t);break}case`import`:{if(e.hasBlock||r)return null;let t=parseImportPrelude(s);if(t===null)return null;a=new CSSImportRule(t.href,t.media,t.layer,t.supports);break}case`namespace`:{if(e.hasBlock||r)return null;let t=splitComponents(s);if(t===null)return null;let n=t.filter(e=>e.type!==100),i=``,o=0;if(n.length===2&&n[0].type===1)i=n[0].text,o=1;else if(n.length!==1)return null;let c=n[o],l;if(c.type===5||c.type===7)l=c.value;else if(c.type===2&&c.lower===`url`){let e=splitComponents(c.text.slice(4,-1).trim());if(e===null||e.length!==1||e[0].type!==5)return null;l=e[0].value}else return null;a=new CSSNamespaceRule(i,l);break}default:return null}return a!==null&&(a[V]=t),a}{let e=Object.getOwnPropertyDescriptor(ml.prototype,`cssText`);for(let t of[hl,CSSNestedDeclarations,CSSMediaRule,CSSSupportsRule,CSSContainerRule,CSSLayerBlockRule,CSSLayerStatementRule,CSSScopeRule,CSSStartingStyleRule,CSSImportRule,CSSNamespaceRule,DescriptorRule,CSSFontFaceRule,CSSPageRule,CSSPropertyRule,CSSKeyframeRule,CSSKeyframesRule]){let n=Object.getOwnPropertyDescriptor(t.prototype,`cssText`);n!==void 0&&n.set===void 0&&Object.defineProperty(t.prototype,"cssText",{...n,set:e.set})}}const gl={getComputedStyle:null,evaluateMediaQuery:null,createCustomElementRegistry:null,setComputedColorMode:null};var MediaQueryListEvent=class extends Event{media;matches;constructor(e,t={}){super(e,t),this.media=t.media===void 0?``:String(t.media),this.matches=!!t.matches}},MediaQueryList=class extends EventTarget{[J];[L];[kn];[In];constructor(e,t){super(),this[J]=e,this[L]=t,this[kn]=!1,this[In]=null}get media(){return this[L]}get matches(){return evaluateMediaQuery(this[L],this[J])}addListener(e){this.addEventListener(`change`,e)}removeListener(e){this.removeEventListener(`change`,e)}addEventListener(e,t,n){super.addEventListener(e,t,n),t!==null&&e===`change`&&this._watch()}get onchange(){return this[In]}set onchange(e){this[In]!==null&&super.removeEventListener(`change`,this[In]),this[In]=typeof e==`function`||typeof e==`object`&&e?e:null,this[In]!==null&&(super.addEventListener(`change`,this[In]),this._watch())}_watch(){let e=this[J][An];e.has(this)||(this[kn]=this.matches,e.add(this))}get[Symbol.toStringTag](){return`MediaQueryList`}};function reportMediaQueryChanges(e){for(let t of e[An]){let e=t.matches;e!==t[kn]&&(t[kn]=e,t.dispatchEvent(new MediaQueryListEvent(`change`,{media:t[L],matches:e})))}}function mediaEnvironment(e){return{width:e.innerWidth,height:e.innerHeight,devicePixelRatio:e.devicePixelRatio,mediaType:`screen`,features:e[z].mediaFeatures??null}}function evaluateMediaQuery(e,t){let n=mediaEnvironment(t),r=gl.evaluateMediaQuery;return r===null?evaluateMediaQueryList(e,n,n.features??void 0):r(e,n)}const _l={"prefers-color-scheme":`light`,"prefers-reduced-motion":`no-preference`,"prefers-reduced-transparency":`no-preference`,"prefers-reduced-data":`no-preference`,"prefers-contrast":`no-preference`,"forced-colors":`none`,"inverted-colors":`none`,hover:`hover`,"any-hover":`hover`,pointer:`fine`,"any-pointer":`fine`,"display-mode":`browser`,scripting:`enabled`,update:`fast`,"color-gamut":`srgb`,"dynamic-range":`standard`,"video-dynamic-range":`standard`,"overflow-block":`scroll`,"overflow-inline":`scroll`,color:8,"color-index":0,monochrome:0,grid:0};function evaluateMediaQueryList(e,t,n){let r=splitTopLevel(String(e).toLowerCase(),`,`);if(r.length===1&&r[0].trim()===``)return!0;for(let e of r)if(evaluateQuery(e.trim(),t,n)===!0)return!0;return!1}function splitTopLevel(e,t){let n=[],r=0,i=0;for(let a=0;a<e.length;a++){let o=e[a];o===`(`?r++:o===`)`?r--:o===t&&r===0&&(n.push(e.slice(i,a)),i=a+1)}return n.push(e.slice(i)),n}function evaluateQuery(e,t,n){if(e===``)return null;if(e[0]===`(`||e.startsWith(`not (`)||e.startsWith(`not(`))return evaluateCondition(e,t,n);let r=/^(?:(not|only)\s+)?([a-z-]+)(?:\s+and\s+([\s\S]+))?$/.exec(e);if(r===null)return null;let[,i,a,o]=r,s=a===`all`||a===t.mediaType;return a!==`all`&&![`screen`,`print`,`speech`,`tv`,`tty`,`projection`,`handheld`,`braille`,`embossed`,`aural`].includes(a)&&(s=!1),o!==void 0&&s&&(s=evaluateCondition(o,t,n)),s===null?null:i===`not`?!s:s}function evaluateCondition(e,t,n){if(e=e.trim(),e.startsWith(`not`)){let r=evaluateInParens(e.slice(3).trim(),t,n);return r===null?null:!r}let r=[],i=[],a=0,o=0;for(let t=0;t<e.length;t++){let n=e[t];if(n===`(`)a++;else if(n===`)`)a--;else if(a===0){let n=e.slice(t),a=/^\s+(and|or)\s+/.exec(n)??(e[t-1]===`)`?/^\s*(and|or)\s*(?=\()/.exec(n):null);a!==null&&(r.push(e.slice(o,t)),i.push(a[1]),t+=a[0].length-1,o=t+1)}}r.push(e.slice(o));let s=evaluateInParens(r[0].trim(),t,n);for(let e=1;e<r.length;e++){let a=evaluateInParens(r[e].trim(),t,n);s=i[e-1]===`and`?s===!1||a===!1?!1:s===null||a===null?null:!0:s===!0||a===!0?!0:s===null||a===null?null:!1}return s}function evaluateInParens(e,t,n){if(e[0]!==`(`||e[e.length-1]!==`)`)return null;let r=e.slice(1,-1).trim();return r[0]===`(`||r.startsWith(`not `)||r.startsWith(`not(`)?evaluateCondition(r,t,n):evaluateFeature(r,t,n)}const vl=/^([^<>=]+?)\s*(<=|>=|<|>|=)\s*([^<>=]+?)(?:\s*(<=|>=|<|>|=)\s*([^<>=]+?))?$/;function evaluateFeature(e,t,n){let r=e.indexOf(`:`);if(r!==-1){let i=e.slice(0,r).trim(),a=e.slice(r+1).trim(),o=`=`;return i.startsWith(`min-`)?(i=i.slice(4),o=`>=`):i.startsWith(`max-`)&&(i=i.slice(4),o=`<=`),compareFeature(i,o,a,t,n)}let i=vl.exec(e);if(i!==null){let[,e,r,a,o,s]=i;if(o===void 0)return isFeatureName(e)?compareFeature(e.trim(),r,a,t,n):compareFeature(a.trim(),flip(r),e,t,n);let c=compareFeature(a.trim(),flip(r),e,t,n),l=compareFeature(a.trim(),o,s,t,n);return c===null||l===null?null:c&&l}let a=featureValue(e.trim(),t,n);return a===void 0?null:a!==0&&a!==`none`&&a!==`no-preference`}function isFeatureName(e){return/^[a-z-]+$/.test(e.trim())}function flip(e){return e===`<`?`>`:e===`>`?`<`:e===`<=`?`>=`:e===`>=`?`<=`:e}function featureValue(e,t,n){if(n!==void 0&&e in n)return n[e];switch(e){case`width`:case`device-width`:return t.width;case`height`:case`device-height`:return t.height;case`aspect-ratio`:case`device-aspect-ratio`:return t.height===0?0:t.width/t.height;case`orientation`:return t.height>=t.width?`portrait`:`landscape`;case`resolution`:case`-webkit-device-pixel-ratio`:case`device-pixel-ratio`:return t.devicePixelRatio;case`-webkit-min-device-pixel-ratio`:case`-webkit-max-device-pixel-ratio`:return t.devicePixelRatio}return _l[e]}function compareFeature(e,t,n,r,i){e===`-webkit-min-device-pixel-ratio`?t=`>=`:e===`-webkit-max-device-pixel-ratio`&&(t=`<=`);let a=featureValue(e,r,i);if(a===void 0)return null;let o=n.trim();if(typeof a==`string`)return t===`=`?a===o:null;let s=parseValue$1(e,o);if(s===null)return null;let c=a-s;switch(t){case`=`:return Math.abs(c)<1e-9;case`<`:return c<-1e-9;case`>`:return c>1e-9;case`<=`:return c<=1e-9;case`>=`:return c>=-1e-9}return null}function parseValue$1(e,t){if(e.endsWith(`aspect-ratio`)){let e=/^([\d.]+)\s*(?:\/\s*([\d.]+))?$/.exec(t);return e===null?null:Number(e[1])/(e[2]===void 0?1:Number(e[2]))}let n=/^(-?[\d.]+(?:e[+-]?\d+)?)([a-z%]*)$/.exec(t);if(n===null)return null;let r=Number(n[1]);if(Number.isNaN(r))return null;switch(n[2]){case``:return r;case`px`:return r;case`em`:case`rem`:return r*16;case`pt`:return r*96/72;case`pc`:return r*16;case`in`:return r*96;case`cm`:return r*96/2.54;case`mm`:return r*96/25.4;case`dppx`:case`x`:return r;case`dpi`:return r/96;case`dpcm`:return r*2.54/96}return null}__name(parseValue$1,`parseValue`);var RootStyles=class{root;owners;ownerNodes;adopted;adoptedSnapshot;list;adoptedExposed;indexed;ref;index;constructor(e){this.root=e,this.owners=[],this.ownerNodes=[],this.adopted=[],this.adoptedSnapshot=[],this.list=null,this.adoptedExposed=!1,this.indexed=!1,this.ref=null,this.index=null}hasSheets(){return this.owners.length!==0||this.adopted.length!==0}},RootRefs=class{refs;pruneAt;constructor(){this.refs=/* @__PURE__ */ new Set,this.pruneAt=64}add(e){let t=this.refs;if(t.add(e.ref??=new WeakRef(e)),!(t.size<this.pruneAt)){for(let e of t)e.deref()===void 0&&t.delete(e);this.pruneAt=Math.max(64,t.size*2)}}delete(e){e.ref!==null&&this.refs.delete(e.ref)}},DocCSS=class{doc;main;shadows;watched;envWidth;envHeight;envDpr;authorVersion;authorStyleVersion;authorResult;constructor(e){this.doc=e,this.main=new RootStyles(e[M]),this.shadows=null,this.watched=null,this.envWidth=-1,this.envHeight=-1,this.envDpr=-1,this.authorVersion=-1,this.authorStyleVersion=-1,this.authorResult=!1}};function docCSS(e){let t=e[yt];return t===null&&(e[yt]=t=new DocCSS(e)),t}function existingDocCSS(e){return e[yt]}const yl=/* @__PURE__ */ new WeakMap;function rootStylesFor(e,t){let n=e.doc,r=t?docCSS(n):existingDocCSS(n);if(r===null)return null;if(e.type===9)return r.main;let i=yl.get(e)??null;return t&&(i===null&&yl.set(e,i=new RootStyles(e)),i.indexed||((r.shadows??=new RootRefs).add(i),i.indexed=!0)),i}function releaseIfUnused(e,t){t===e.main||t.hasSheets()||t.list!==null||t.adoptedExposed||!t.indexed||(e.shadows?.delete(t),t.indexed=!1)}const bl=/* @__PURE__ */ new WeakMap;function treeTop(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function isStyleRoot(e){return e.type===9||!!(e.flags&32)}function ancestors(e){let t=[];for(let n=e;n!==null;n=n.parent)t.push(n);return t}function compareTreeOrder(e,t){if(e===t)return 0;let n=ancestors(e),r=ancestors(t),i=n.length-1,a=r.length-1;for(;i>=0&&a>=0&&n[i]===r[a];)i--,a--;if(i<0)return-1;if(a<0)return 1;let o=n[i],s=r[a];for(let e=o.next;e!==null;e=e.next)if(e===s)return-1;return 1}function syncList(e){e.list?._set(e.owners.slice())}function registerOwnerSheet(e,t){let n=treeTop(e);if(!isStyleRoot(n))return;let r=rootStylesFor(n,!0),i=r.ownerNodes.length;for(;i>0&&compareTreeOrder(r.ownerNodes[i-1],e)>0;)i--;r.ownerNodes.splice(i,0,e),r.owners.splice(i,0,t),bl.set(t,r),syncList(r),e.doc[Mr]++}function unregisterOwnerSheet(e,t){let n=existingDocCSS(e.doc),r=bl.get(t);if(n!==null&&r!==void 0){let e=r.owners.indexOf(t);e!==-1&&(r.owners.splice(e,1),r.ownerNodes.splice(e,1),syncList(r)),bl.delete(t),releaseIfUnused(n,r)}t[Ln]=null,e.doc[Mr]++}function createOwnerSheet(e,t,n){let r=pl._forOwner(e.node,t,n,null);return registerOwnerSheet(e,r),r}function createLinkSheet(e,t,n){let r=pl._forOwner(e.node,``,n,t);return registerOwnerSheet(e,r),r}function removeOwnerSheet(e,t){t instanceof pl&&unregisterOwnerSheet(e,t)}function styleSheetsOf(e){let t=rootStylesFor(e,!0);return t.list===null&&(t.list=new StyleSheetList,syncList(t)),t.list}function adoptedStyleSheetsOf(e){let t=rootStylesFor(e,!0);if(!t.adoptedExposed){t.adoptedExposed=!0;let n=docCSS(e.doc);t!==n.main&&(n.watched??=new RootRefs).add(t)}return t.adopted}function setAdoptedStyleSheets(e,t){if(typeof t!=`object`||!t||typeof t.length!=`number`)throw TypeError(`Failed to set the 'adoptedStyleSheets' property: The provided value cannot be converted to a sequence.`);let n=Array.from(t);for(let t of n){if(!(t instanceof pl))throw TypeError(`Failed to set the 'adoptedStyleSheets' property: Failed to convert value to 'CSSStyleSheet'.`);if(!t[ut])throw new DOMException(`Failed to set the 'adoptedStyleSheets' property: Can't adopt non-constructed stylesheets.`,`NotAllowedError`);if(t[Ft]!==null&&t[Ft]!==e.doc)throw new DOMException(`Failed to set the 'adoptedStyleSheets' property: Sharing constructed stylesheets in multiple documents is not allowed`,`NotAllowedError`)}let r=rootStylesFor(e,!0);r.adopted=n,r.adoptedSnapshot=r.adopted.slice(),r.adoptedExposed&&r!==docCSS(e.doc).main&&(r.adoptedExposed=!1,docCSS(e.doc).watched?.delete(r));for(let t of r.adopted)t[Ft]===null&&(t[Ft]=e.doc);e.doc[Mr]++,releaseIfUnused(docCSS(e.doc),r)}function validateAdopted(e){if(checkAdopted(e.main)&&e.doc[Mr]++,e.watched===null)return;let t=e.watched.refs;for(let n of t){let r=n.deref();r===void 0?t.delete(n):checkAdopted(r)&&e.doc[Mr]++}}function checkAdopted(e){let t=e.adopted,n=e.adoptedSnapshot,r=t.length!==n.length;if(!r)for(let e=0;e<t.length;e++)t[e]!==n[e]&&(r=!0);if(r){e.adoptedSnapshot=t.slice();for(let n of t)n instanceof pl&&n[Ft]===null&&(n[Ft]=e.root.doc)}return r}var IndexedRule=class{sel;specificity;sheetIndex;order;layer;block;layerNode;h0;h1;h2;h3;constructor(e,t,n,r,i){this.sel=e,this.specificity=e.specificity,this.h0=e.h0,this.h1=e.h1,this.h2=e.h2,this.h3=e.h3,this.sheetIndex=t,this.order=n,this.layer=0,this.block=r,this.layerNode=i}},Bucket=class{rules;hashed;constructor(){this.rules=[],this.hashed=0}push(e){this.rules.push(e),e.h0>=0&&this.hashed++}},RuleBuckets=class{ids;classes;tags;universal;size;quirks;constructor(e){this.ids=/* @__PURE__ */ new Map,this.classes=/* @__PURE__ */ new Map,this.tags=/* @__PURE__ */ new Map,this.universal=new Bucket,this.size=0,this.quirks=e}add(e,t=!1){this.size++;let n=e.sel.keyKind,r=this.quirks&&(n===1||n===2)?asciiLowercase$1(e.sel.key):e.sel.key,i=null;if(n===1?i=this.ids:n===2?i=this.classes:n===3&&(i=this.tags),i===null){t&&(this.universal=copyBucket(this.universal)),this.universal.push(e);return}let a=i.get(r);a===void 0?i.set(r,a=new Bucket):t&&i.set(r,a=copyBucket(a)),a.push(e)}};function copyBucket(e){let t=new Bucket;for(let n=0;n<e.rules.length;n++)t.push(e.rules[n]);return t}var LayerNode=class{name;children;rank;constructor(e){this.name=e,this.children=/* @__PURE__ */ new Map,this.rank=0}},RuleIndex=class{main;before;after;volatile;styleVersion;builder;sheets;constructor(e,t=!1){this.main=new RuleBuckets(t),this.before=new RuleBuckets(t),this.after=new RuleBuckets(t),this.volatile=!1,this.styleVersion=e,this.builder=null,this.sheets=[]}},IndexedSheet=class{sheet;version;rules;applied;constructor(e,t){this.sheet=e,this.version=e[q],this.rules=e[H].length,this.applied=t}},IndexBuilder=class{index;env;sheetIndex;order;root;anon;all;extending;constructor(e,t){this.index=e,this.env=t,this.sheetIndex=0,this.order=0,this.root=new LayerNode(``),this.anon=0,this.all=[],this.extending=!1}layer(e,t){let n=e;for(let e of t.split(`.`)){let t=n.children.get(e);t===void 0&&n.children.set(e,t=new LayerNode(e)),n=t}return n}sheet(e){return e[Mt]||e[L][Zn].length!==0&&!evaluateMediaQueryList$1(e[L][Zn],this.env)?!1:(this.rules(e[H],this.root,null),!0)}rules(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];if(i instanceof hl)this.style(i,i[w],t),i[H].length!==0&&this.rules(i[H],t,i);else if(i instanceof CSSNestedDeclarations)n!==null&&this.style(n,i[w],t);else if(i instanceof CSSMediaRule)evaluateMediaQueryList$1(i[L][Zn],this.env)&&this.rules(i[H],t,n);else if(i instanceof CSSSupportsRule)i[kn]&&this.rules(i[H],t,n);else if(i instanceof CSSLayerBlockRule){let e=i[R]===``?`\0anon`+this.anon++:i[R];this.rules(i[H],this.layer(t,e),n)}else if(i instanceof CSSLayerStatementRule)for(let e of i[Mn])this.layer(t,e);else i instanceof CSSGroupingRule}}style(e,t,n){t.names.length!==0&&this.add(e._compile(),t,n)}add(e,t,n){if(e===null||t.names.length===0)return;let r=this.order++;for(let i of e.selectors){let e=new IndexedRule(i,this.sheetIndex,r,t,n);i.volatile&&(this.index.volatile=!0);let a=i.pseudoElement;if(a===``)this.index.main.add(e,this.extending);else if(a===`before`)this.index.before.add(e,this.extending);else if(a===`after`)this.index.after.add(e,this.extending);else continue;this.all.push(e)}}extend(e,t){let n=this.all.length;this.extending=!0;let r=!0;t===0?r=this.sheet(e):this.rules(e[H].slice(t),this.root,null),this.extending=!1;for(let e=n;e<this.all.length;e++)this.all[e].layer=this.all[e].layerNode.rank;return r}finish(){let e=0,visit=t=>{for(let e of t.children.values())visit(e);t.rank=e++};visit(this.root);for(let e of this.all)e.layer=e.layerNode.rank}};function windowEnv(e){let t=e[J];return t===null?ll:mediaEnvironment(t)}function currentStyleVersion(e){let t=e[yt];if(t===null)return e[Mr];validateAdopted(t);let n=e[J];if(n!==null){let r=n.innerWidth??1024,i=n.innerHeight??768,a=n.devicePixelRatio??1;(r!==t.envWidth||i!==t.envHeight||a!==t.envDpr)&&(t.envWidth!==-1&&e[Mr]++,t.envWidth=r,t.envHeight=i,t.envDpr=a)}return e[Mr]}function sheetsHaveRules(e){for(let t of e.owners)if(t[H].length!==0)return!0;for(let t of e.adopted)if(t instanceof pl&&t[H].length!==0)return!0;return!1}function ruleIndexFor(e,t,n){if(!e.hasSheets())return null;let r=e.index,i=t[jn]===`quirks`;if(r!==null&&r.main.quirks===i&&(r.styleVersion===n||extendIndex(r,e,windowEnv(t),n)))return r.main.size+r.before.size+r.after.size===0?null:r;r=new RuleIndex(n,i);let a=new IndexBuilder(r,windowEnv(t)),o=treeSheets(e);for(let e=0;e<o.length;e++)a.sheetIndex=e,r.sheets.push(new IndexedSheet(o[e],a.sheet(o[e])));return a.finish(),r.builder=a,e.index=r,r.main.size+r.before.size+r.after.size===0?null:r}function treeSheets(e){let t=e.owners.slice();for(let n of e.adopted)n instanceof pl&&t.push(n);return t}function extendIndex(e,t,n,r){let i=e.builder;if(i===null||!sameEnvironment(i.env,n))return!1;let a=treeSheets(t),o=e.sheets;if(a.length<o.length)return!1;for(let e=0;e<o.length;e++){let t=o[e],n=t.sheet;if(a[e]!==n||n[nr]>t.version)return!1}for(let e=o.length;e<a.length;e++){let t=a[e][H];for(let e=0;e<t.length;e++)if(!appendableRule(t[e]))return!1}for(let e=0;e<o.length;e++){let t=o[e],n=t.sheet[H];t.applied&&n.length>t.rules&&(i.sheetIndex=e,i.extend(t.sheet,t.rules)),t.version=t.sheet[q],t.rules=n.length}for(let e=o.length;e<a.length;e++)i.sheetIndex=e,o.push(new IndexedSheet(a[e],i.extend(a[e],0)));return e.styleVersion=r,!0}function sameEnvironment(e,t){return e.width===t.width&&e.height===t.height&&e.devicePixelRatio===t.devicePixelRatio&&e.mediaType===t.mediaType&&e.features===t.features}function uaDisplay(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return e.parent!==null&&e.parent.type===9?`block`:`inline`;if(e.attrs!==null){if(e.tag!==X.embed){let t=attr(e,`hidden`);if(t!==null&&asciiLowercase$1(t)!==`until-found`)return`none`}if(attr(e,`popover`)!==null&&!fa[`popover-open`](e)&&(e.tag!==X.dialog||attr(e,`open`)===null))return`none`}switch(e.tag){case X.area:case X.base:case X.basefont:case X.datalist:case X.head:case X.link:case X.meta:case X.noembed:case X.noframes:case X.param:case X.rp:case X.script:case X.style:case X.template:case X.title:return`none`;case X.dialog:return attr(e,`open`)===null&&!fa[`popover-open`](e)?`none`:`block`;case X.html:case X.body:case X.address:case X.blockquote:case X.center:case X.div:case X.figure:case X.figcaption:case X.footer:case X.form:case X.header:case X.hr:case X.legend:case X.listing:case X.main:case X.p:case X.plaintext:case X.pre:case X.search:case X.xmp:case X.details:case X.summary:case X.dir:case X.dd:case X.dl:case X.dt:case X.menu:case X.ol:case X.ul:case X.article:case X.aside:case X.h1:case X.h2:case X.h3:case X.h4:case X.h5:case X.h6:case X.hgroup:case X.nav:case X.section:case X.fieldset:case X.optgroup:case X.option:case X.frameset:case X.frame:return`block`;case X.li:return`list-item`;case X.table:return`table`;case X.caption:return`table-caption`;case X.colgroup:return`table-column-group`;case X.col:return`table-column`;case X.thead:return`table-header-group`;case X.tbody:return`table-row-group`;case X.tfoot:return`table-footer-group`;case X.tr:return`table-row`;case X.td:case X.th:return`table-cell`;case X.input:return attr(e,`type`)!==null&&asciiLowercase$1(attr(e,`type`))===`hidden`?`none`:`inline-block`;case X.button:case X.select:case X.textarea:case X.meter:case X.progress:case X.marquee:return`inline-block`;case X.ruby:return`ruby`;case X.rt:return`ruby-text`;case X.slot:return`contents`}return`inline`}function uaDisplayImportant(e){if(e.tag!==X.input||e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=attr(e,`type`);return t!==null&&asciiLowercase$1(t)===`hidden`}function uaRules(){let e=[];for(let t of`
16
+ }`}_resolvedSelectors(){let e=this[B];for(;e!==null&&!(e instanceof CSSStyleRule);)e=e[B];return e===null?containsNesting(this[wr])?resolveNested(this[wr],[`:scope`]):[this[wr]]:resolveNested(this[wr],e._resolvedSelectors())}_compile(){let e=this._resolvedSelectors().join(`, `);return this[st]!==null&&this[ct]===e||(this[st]=compileSelectorList(e,namespaceOptions(this.parentStyleSheet)),this[ct]=e),this[st]}get[Symbol.toStringTag](){return`CSSStyleRule`}},CSSNestedDeclarations=class extends hl{[w];[Nr];constructor(e){super(),this[w]=e,this[Nr]=null}get type(){return 0}get style(){return this[Nr]??=new CSSStyleDeclaration(null,this[w],this)}get cssText(){return this[w].serialize()}},CSSConditionRule=class extends CSSGroupingRule{get conditionText(){return``}},CSSMediaRule=class extends CSSConditionRule{[L];constructor(e){super(),this[L]=new MediaList(e,this)}get type(){return 4}get media(){return this[L]}set media(e){this[L].mediaText=String(e)}get conditionText(){return this[L].mediaText}get cssText(){return blockText(`@media `+this[L].mediaText,this[V])}},CSSSupportsRule=class extends CSSConditionRule{[lt];[An];constructor(e){super(),this[lt]=e,this[An]=evaluateSupportsCondition(e)}get type(){return 12}get conditionText(){return this[lt]}get cssText(){return blockText(`@supports `+this[lt],this[V])}},CSSContainerRule=class extends CSSConditionRule{[lt];constructor(e){super(),this[lt]=e}get conditionText(){return this[lt]}get containerName(){let e=/^([^\s(]+)\s/.exec(this[lt]);return e!==null&&e[1].toLowerCase()!==`not`?e[1]:``}get containerQuery(){let e=this.containerName;return e===``?this[lt]:this[lt].slice(e.length).trim()}get cssText(){return blockText(`@container `+this[lt],this[V])}},CSSLayerBlockRule=class extends CSSGroupingRule{[Nn];constructor(e){super(),this[Nn]=e}get name(){return this[Nn]}get cssText(){return blockText(this[Nn]===``?`@layer`:`@layer `+this[Nn],this[V])}},CSSLayerStatementRule=class extends hl{[Pn];constructor(e){super(),this[Pn]=e}get nameList(){return Object.freeze(this[Pn].slice())}get cssText(){return`@layer `+this[Pn].join(`, `)+`;`}},CSSScopeRule=class extends CSSGroupingRule{[Xn];constructor(e){super(),this[Xn]=e}get start(){let e=this[Xn];return e.charCodeAt(0)===40?parenContents(e,0):null}get end(){let e=this[Xn],t=0;if(e.charCodeAt(0)===40){if(t=matchingParen(e,0),t===-1)return null;t++}let n=/^\s*to\s*\(/i.exec(e.slice(t));return n===null?null:parenContents(e,t+n[0].length-1)}get cssText(){return blockText(this[Xn]===``?`@scope`:`@scope `+this[Xn],this[V])}};function matchingParen(e,t){let n=0;for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);if(t===92)r++;else if(t===34||t===39)for(r++;r<e.length&&e.charCodeAt(r)!==t;r++)e.charCodeAt(r)===92&&r++;else if(t===40)n++;else if(t===41&&--n===0)return r}return-1}function parenContents(e,t){let n=matchingParen(e,t);return n===-1?null:e.slice(t+1,n).trim()}var CSSStartingStyleRule=class extends CSSGroupingRule{get cssText(){return blockText(`@starting-style`,this[V])}},CSSImportRule=class extends hl{[cn];[L];[wn];[Fr];constructor(e,t,n,r){super(),this[cn]=e,this[L]=new MediaList(t,this),this[wn]=n,this[Fr]=r}get type(){return 3}get href(){return this[cn]}get media(){return this[L]}get styleSheet(){return null}get layerName(){return this[wn]}get supportsText(){return this[Fr]}get cssText(){let e=`@import `+serializeUrl(this[cn]);this[wn]!==null&&(e+=this[wn]===``?` layer`:` layer(${this[wn]})`),this[Fr]!==null&&(e+=` supports(${this[Fr]})`);let t=this[L].mediaText;return t!==``&&(e+=` `+t),e+`;`}},CSSNamespaceRule=class extends hl{[Yn];[qr];constructor(e,t){super(),this[Yn]=e,this[qr]=t}get type(){return 10}get namespaceURI(){return this[qr]}get prefix(){return this[Yn]}get cssText(){return`@namespace `+(this[Yn]===``?``:this[Yn]+` `)+serializeUrl(this[qr])+`;`}},DescriptorRule=class extends hl{[w];[Nr];constructor(e){super(),this[w]=e,this[Nr]=null}get style(){return this[Nr]??=new CSSStyleDeclaration(null,this[w],this)}},CSSFontFaceRule=class extends DescriptorRule{get type(){return 5}get cssText(){let e=this[w].serialize();return e===``?`@font-face { }`:`@font-face { ${e} }`}},CSSPageRule=class extends DescriptorRule{[wr];constructor(e,t){super(t),this[wr]=e}get type(){return 6}get selectorText(){return this[wr]}set selectorText(e){this[wr]=String(e).trim()}get cssText(){let e=this[w].serialize(),t=this[wr]===``?`@page`:`@page `+this[wr];return e===``?`${t} { }`:`${t} { ${e} }`}},CSSPropertyRule=class extends hl{[Nn];[w];constructor(e,t){super(),this[Nn]=e,this[w]=t}get name(){return this[Nn]}get syntax(){return unquote(this[w].getPropertyValue(`syntax`))}get inherits(){return this[w].getPropertyValue(`inherits`).toLowerCase()===`true`}get initialValue(){let e=this[w].indexOf(`initial-value`);return e===-1?null:this[w].values[e]}get cssText(){let e=this[w].serialize();return e===``?`@property ${this[Nn]} { }`:`@property ${this[Nn]} { ${e} }`}};function unquote(e){return e.length>=2&&(e[0]===`"`||e[0]===`'`)?e.slice(1,-1):e}var CSSKeyframeRule=class extends DescriptorRule{[Sn];constructor(e,t){super(t),this[Sn]=e}get type(){return 8}get keyText(){return this[Sn]}set keyText(e){let t=normalizeKeyText(String(e));if(t===null)throw new DOMException(`Failed to set the 'keyText' property on 'CSSKeyframeRule': The key '${e}' is invalid and cannot be parsed`,`SyntaxError`);this[Sn]=t,this._changed()}get cssText(){let e=this[w].serialize();return e===``?`${this[Sn]} { }`:`${this[Sn]} { ${e} }`}},CSSKeyframesRule=class extends hl{[Nn];[V];[Tn];constructor(e){super(),this[Nn]=e,this[V]=[],this[Tn]=null}get type(){return 7}get name(){return this[Nn]}set name(e){this[Nn]=String(e),this._changed()}get cssRules(){return this[Tn]??=new CSSRuleList(this[V])}get length(){return this[V].length}appendRule(e){let t=parseRule(String(e));if(t===null||t.kind!==1)return;let n=createKeyframe(t);n!==null&&(n[B]=this,this[V].push(n),this[Tn]?._sync(this[V].length-1),this._changed())}deleteRule(e){let t=this._findIndex(String(e));if(t===-1)return;let[n]=this[V].splice(t,1);n[B]=null,this[Tn]?._sync(t),this._changed()}findRule(e){let t=this._findIndex(String(e));return t===-1?null:this[V][t]}_findIndex(e){let t=normalizeKeyText(e);if(t===null)return-1;for(let e=this[V].length-1;e>=0;e--)if(this[V][e][Sn]===t)return e;return-1}get cssText(){return blockText(`@keyframes `+this[Nn],this[V])}};function namespaceOptions(e){return e!==null&&(e[Fn]!==null||e[Et]!==void 0)?{namespaces:e[Fn]??void 0,defaultNamespace:e[Et]}:void 0}function isValidSelectorFor(e,t,n){if(e===``)return!1;let r=namespaceOptions(n);return t?compileSelectorList(resolveNested(e,[`*`]).join(`, `),r)!==null:containsNesting(e)?compileSelectorList(resolveNested(e,[`:scope`]).join(`, `),r)!==null:compileSelectorList(e,r)!==null}function normalizeKeyText(e){let t=e.split(`,`),n=[];for(let e of t){let t=e.trim().toLowerCase();if(t===`from`)n.push(`0%`);else if(t===`to`)n.push(`100%`);else{let e=/^([+]?\d*\.?\d+(?:e[+-]?\d+)?)%$/.exec(t);if(e===null)return null;let r=Number(e[1]);if(r<0||r>100)return null;n.push(String(r)+`%`)}}return n.join(`, `)}function createKeyframe(e){let t=normalizeKeyText(e.prelude);if(t===null)return null;let n=new DeclBlock;return n.addRaw(e.decls),new CSSKeyframeRule(t,n)}function leadingDecls(e){return e.leading===e.decls.length?e.decls:e.decls.slice(0,e.leading)}function nestedDeclarations(e,t){let n=new DeclBlock;n.addRaw(t);let r=new CSSNestedDeclarations(n);return r[B]=e,r}function fillChildren(e,t,n,r){let i=r||e instanceof gl;r&&t.leading!==0&&!(e instanceof gl)&&e[V].push(nestedDeclarations(e,leadingDecls(t)));for(let r of t.rules){if(r.kind===3){i&&e[V].push(nestedDeclarations(e,r.decls));continue}let t=createRule(r,e,n,i,!1);t===null||t instanceof CSSImportRule||t instanceof CSSNamespaceRule||e[V].push(t)}}function parseImportPrelude(e){let t=splitComponents(e);if(t===null)return null;let n=0;for(;n<t.length&&t[n].type===100;)n++;let r=t[n];if(r===void 0)return null;let i;if(r.type===5||r.type===7)i=r.value;else if(r.type===2&&r.lower===`url`){let e=splitComponents(r.text.slice(4,-1).trim());if(e===null||e.length!==1||e[0].type!==5)return null;i=e[0].value}else return null;n++;let a=null,o=null,s=t.slice(n),c=0,skipWs=()=>{for(;c<s.length&&s[c].type===100;)c++};skipWs(),c<s.length&&s[c].type===1&&s[c].lower===`layer`?(a=``,c++):c<s.length&&s[c].type===2&&s[c].lower===`layer`&&(a=s[c].text.slice(6,-1).trim(),c++),skipWs(),c<s.length&&s[c].type===2&&s[c].lower===`supports`&&(o=s[c].text.slice(9,-1).trim(),c++);let l=``;for(;c<s.length;c++)l+=s[c].text;return{href:i,layer:a,supports:o,media:l.trim()}}function appendableRule(e){if(e instanceof CSSLayerBlockRule||e instanceof CSSLayerStatementRule||e instanceof CSSImportRule||e instanceof CSSNamespaceRule)return!1;if(e instanceof gl||e instanceof CSSMediaRule||e instanceof CSSSupportsRule){let t=e[V];for(let e=0;e<t.length;e++)if(!appendableRule(t[e]))return!1}return!0}function createRule(e,t,n,r,i){let a=null;if(e.kind===1){if(i)return createKeyframe(e);if(!e.hasBlock||!isValidSelectorFor(e.prelude,r,n))return null;let a=new DeclBlock;a.addRaw(leadingDecls(e));let o=new gl(e.prelude,a);return o[B]=t,fillChildren(o,e,n,!0),o}let o=e.name.toLowerCase(),s=e.prelude;switch(o){case`media`:{if(!e.hasBlock)return null;let i=new CSSMediaRule(s);i[B]=t,fillChildren(i,e,n,r),a=i;break}case`supports`:{if(!e.hasBlock||s===``)return null;let i=new CSSSupportsRule(s);i[B]=t,fillChildren(i,e,n,r),a=i;break}case`container`:{if(!e.hasBlock)return null;let i=new CSSContainerRule(s);i[B]=t,fillChildren(i,e,n,r),a=i;break}case`layer`:{let i=s===``?[]:s.split(`,`).map(e=>e.trim());for(let e of i)if(!/^-?[_a-zA-Z\u0080-￿][-_a-zA-Z0-9\u0080-￿]*(\.-?[_a-zA-Z\u0080-￿][-_a-zA-Z0-9\u0080-￿]*)*$/.test(e))return null;if(e.hasBlock){if(i.length>1)return null;let o=new CSSLayerBlockRule(i[0]??``);o[B]=t,fillChildren(o,e,n,r),a=o}else{if(i.length===0)return null;a=new CSSLayerStatementRule(i)}break}case`scope`:{if(!e.hasBlock)return null;let r=new CSSScopeRule(s);r[B]=t,fillChildren(r,e,n,!0),a=r;break}case`starting-style`:{if(!e.hasBlock)return null;let i=new CSSStartingStyleRule;i[B]=t,fillChildren(i,e,n,r),a=i;break}case`keyframes`:case`-webkit-keyframes`:case`-moz-keyframes`:{if(!e.hasBlock||r)return null;let t=splitComponents(s);if(t===null||t.length!==1||t[0].type!==1&&t[0].type!==5)return null;let n=new CSSKeyframesRule(t[0].type===5?serializeString$1(t[0].value):t[0].text);for(let t of e.rules){if(t.kind!==1)continue;let e=createKeyframe(t);e!==null&&(e[B]=n,n[V].push(e))}a=n;break}case`font-face`:{if(!e.hasBlock||s!==``)return null;let t=new DeclBlock;for(let n of e.decls)t.putParsed(n.name.toLowerCase(),n.value,n.important);a=new CSSFontFaceRule(t);break}case`page`:{if(!e.hasBlock)return null;let t=new DeclBlock;t.addRaw(e.decls),a=new CSSPageRule(s,t);break}case`property`:{if(!e.hasBlock||!s.startsWith(`--`))return null;let t=new DeclBlock;for(let n of e.decls)t.putParsed(n.name.toLowerCase(),n.value,!1);a=new CSSPropertyRule(s,t);break}case`import`:{if(e.hasBlock||r)return null;let t=parseImportPrelude(s);if(t===null)return null;a=new CSSImportRule(t.href,t.media,t.layer,t.supports);break}case`namespace`:{if(e.hasBlock||r)return null;let t=splitComponents(s);if(t===null)return null;let n=t.filter(e=>e.type!==100),i=``,o=0;if(n.length===2&&n[0].type===1)i=n[0].text,o=1;else if(n.length!==1)return null;let c=n[o],l;if(c.type===5||c.type===7)l=c.value;else if(c.type===2&&c.lower===`url`){let e=splitComponents(c.text.slice(4,-1).trim());if(e===null||e.length!==1||e[0].type!==5)return null;l=e[0].value}else return null;a=new CSSNamespaceRule(i,l);break}default:return null}return a!==null&&(a[B]=t),a}{let e=Object.getOwnPropertyDescriptor(hl.prototype,`cssText`);for(let t of[gl,CSSNestedDeclarations,CSSMediaRule,CSSSupportsRule,CSSContainerRule,CSSLayerBlockRule,CSSLayerStatementRule,CSSScopeRule,CSSStartingStyleRule,CSSImportRule,CSSNamespaceRule,DescriptorRule,CSSFontFaceRule,CSSPageRule,CSSPropertyRule,CSSKeyframeRule,CSSKeyframesRule]){let n=Object.getOwnPropertyDescriptor(t.prototype,`cssText`);n!==void 0&&n.set===void 0&&Object.defineProperty(t.prototype,"cssText",{...n,set:e.set})}}const _l={getComputedStyle:null,evaluateMediaQuery:null,createCustomElementRegistry:null,setComputedColorMode:null};var MediaQueryListEvent=class extends Event{media;matches;constructor(e,t={}){super(e,t),this.media=t.media===void 0?``:String(t.media),this.matches=!!t.matches}},MediaQueryList=class extends EventTarget{[q];[L];[An];[Rn];constructor(e,t){super(),this[q]=e,this[L]=t,this[An]=!1,this[Rn]=null}get media(){return this[L]}get matches(){return evaluateMediaQuery(this[L],this[q])}addListener(e){this.addEventListener(`change`,e)}removeListener(e){this.removeEventListener(`change`,e)}addEventListener(e,t,n){super.addEventListener(e,t,n),t!==null&&e===`change`&&this._watch()}get onchange(){return this[Rn]}set onchange(e){this[Rn]!==null&&super.removeEventListener(`change`,this[Rn]),this[Rn]=typeof e==`function`||typeof e==`object`&&e?e:null,this[Rn]!==null&&(super.addEventListener(`change`,this[Rn]),this._watch())}_watch(){let e=this[q][jn];e.has(this)||(this[An]=this.matches,e.add(this))}get[Symbol.toStringTag](){return`MediaQueryList`}};function reportMediaQueryChanges(e){for(let t of e[jn]){let e=t.matches;e!==t[An]&&(t[An]=e,t.dispatchEvent(new MediaQueryListEvent(`change`,{media:t[L],matches:e})))}}function mediaEnvironment(e){return{width:e.innerWidth,height:e.innerHeight,devicePixelRatio:e.devicePixelRatio,mediaType:`screen`,features:e[R].mediaFeatures??null}}function evaluateMediaQuery(e,t){let n=mediaEnvironment(t),r=_l.evaluateMediaQuery;return r===null?evaluateMediaQueryList(e,n,n.features??void 0):r(e,n)}const vl={"prefers-color-scheme":`light`,"prefers-reduced-motion":`no-preference`,"prefers-reduced-transparency":`no-preference`,"prefers-reduced-data":`no-preference`,"prefers-contrast":`no-preference`,"forced-colors":`none`,"inverted-colors":`none`,hover:`hover`,"any-hover":`hover`,pointer:`fine`,"any-pointer":`fine`,"display-mode":`browser`,scripting:`enabled`,update:`fast`,"color-gamut":`srgb`,"dynamic-range":`standard`,"video-dynamic-range":`standard`,"overflow-block":`scroll`,"overflow-inline":`scroll`,color:8,"color-index":0,monochrome:0,grid:0};function evaluateMediaQueryList(e,t,n){let r=splitTopLevel(String(e).toLowerCase(),`,`);if(r.length===1&&r[0].trim()===``)return!0;for(let e of r)if(evaluateQuery(e.trim(),t,n)===!0)return!0;return!1}function splitTopLevel(e,t){let n=[],r=0,i=0;for(let a=0;a<e.length;a++){let o=e[a];o===`(`?r++:o===`)`?r--:o===t&&r===0&&(n.push(e.slice(i,a)),i=a+1)}return n.push(e.slice(i)),n}function evaluateQuery(e,t,n){if(e===``)return null;if(e[0]===`(`||e.startsWith(`not (`)||e.startsWith(`not(`))return evaluateCondition(e,t,n);let r=/^(?:(not|only)\s+)?([a-z-]+)(?:\s+and\s+([\s\S]+))?$/.exec(e);if(r===null)return null;let[,i,a,o]=r,s=a===`all`||a===t.mediaType;return a!==`all`&&![`screen`,`print`,`speech`,`tv`,`tty`,`projection`,`handheld`,`braille`,`embossed`,`aural`].includes(a)&&(s=!1),o!==void 0&&s&&(s=evaluateCondition(o,t,n)),s===null?null:i===`not`?!s:s}function evaluateCondition(e,t,n){if(e=e.trim(),e.startsWith(`not`)){let r=evaluateInParens(e.slice(3).trim(),t,n);return r===null?null:!r}let r=[],i=[],a=0,o=0;for(let t=0;t<e.length;t++){let n=e[t];if(n===`(`)a++;else if(n===`)`)a--;else if(a===0){let n=e.slice(t),a=/^\s+(and|or)\s+/.exec(n)??(e[t-1]===`)`?/^\s*(and|or)\s*(?=\()/.exec(n):null);a!==null&&(r.push(e.slice(o,t)),i.push(a[1]),t+=a[0].length-1,o=t+1)}}r.push(e.slice(o));let s=evaluateInParens(r[0].trim(),t,n);for(let e=1;e<r.length;e++){let a=evaluateInParens(r[e].trim(),t,n);s=i[e-1]===`and`?s===!1||a===!1?!1:s===null||a===null?null:!0:s===!0||a===!0?!0:s===null||a===null?null:!1}return s}function evaluateInParens(e,t,n){if(e[0]!==`(`||e[e.length-1]!==`)`)return null;let r=e.slice(1,-1).trim();return r[0]===`(`||r.startsWith(`not `)||r.startsWith(`not(`)?evaluateCondition(r,t,n):evaluateFeature(r,t,n)}const yl=/^([^<>=]+?)\s*(<=|>=|<|>|=)\s*([^<>=]+?)(?:\s*(<=|>=|<|>|=)\s*([^<>=]+?))?$/;function evaluateFeature(e,t,n){let r=e.indexOf(`:`);if(r!==-1){let i=e.slice(0,r).trim(),a=e.slice(r+1).trim(),o=`=`;return i.startsWith(`min-`)?(i=i.slice(4),o=`>=`):i.startsWith(`max-`)&&(i=i.slice(4),o=`<=`),compareFeature(i,o,a,t,n)}let i=yl.exec(e);if(i!==null){let[,e,r,a,o,s]=i;if(o===void 0)return isFeatureName(e)?compareFeature(e.trim(),r,a,t,n):compareFeature(a.trim(),flip(r),e,t,n);let c=compareFeature(a.trim(),flip(r),e,t,n),l=compareFeature(a.trim(),o,s,t,n);return c===null||l===null?null:c&&l}let a=featureValue(e.trim(),t,n);return a===void 0?null:a!==0&&a!==`none`&&a!==`no-preference`}function isFeatureName(e){return/^[a-z-]+$/.test(e.trim())}function flip(e){return e===`<`?`>`:e===`>`?`<`:e===`<=`?`>=`:e===`>=`?`<=`:e}function featureValue(e,t,n){if(n!==void 0&&e in n)return n[e];switch(e){case`width`:case`device-width`:return t.width;case`height`:case`device-height`:return t.height;case`aspect-ratio`:case`device-aspect-ratio`:return t.height===0?0:t.width/t.height;case`orientation`:return t.height>=t.width?`portrait`:`landscape`;case`resolution`:case`-webkit-device-pixel-ratio`:case`device-pixel-ratio`:return t.devicePixelRatio;case`-webkit-min-device-pixel-ratio`:case`-webkit-max-device-pixel-ratio`:return t.devicePixelRatio}return vl[e]}function compareFeature(e,t,n,r,i){e===`-webkit-min-device-pixel-ratio`?t=`>=`:e===`-webkit-max-device-pixel-ratio`&&(t=`<=`);let a=featureValue(e,r,i);if(a===void 0)return null;let o=n.trim();if(typeof a==`string`)return t===`=`?a===o:null;let s=parseValue$1(e,o);if(s===null)return null;let c=a-s;switch(t){case`=`:return Math.abs(c)<1e-9;case`<`:return c<-1e-9;case`>`:return c>1e-9;case`<=`:return c<=1e-9;case`>=`:return c>=-1e-9}return null}function parseValue$1(e,t){if(e.endsWith(`aspect-ratio`)){let e=/^([\d.]+)\s*(?:\/\s*([\d.]+))?$/.exec(t);return e===null?null:Number(e[1])/(e[2]===void 0?1:Number(e[2]))}let n=/^(-?[\d.]+(?:e[+-]?\d+)?)([a-z%]*)$/.exec(t);if(n===null)return null;let r=Number(n[1]);if(Number.isNaN(r))return null;switch(n[2]){case``:return r;case`px`:return r;case`em`:case`rem`:return r*16;case`pt`:return r*96/72;case`pc`:return r*16;case`in`:return r*96;case`cm`:return r*96/2.54;case`mm`:return r*96/25.4;case`dppx`:case`x`:return r;case`dpi`:return r/96;case`dpcm`:return r*2.54/96}return null}__name(parseValue$1,`parseValue`);var RootStyles=class{root;owners;ownerNodes;adopted;adoptedSnapshot;list;adoptedExposed;indexed;ref;index;constructor(e){this.root=e,this.owners=[],this.ownerNodes=[],this.adopted=[],this.adoptedSnapshot=[],this.list=null,this.adoptedExposed=!1,this.indexed=!1,this.ref=null,this.index=null}hasSheets(){return this.owners.length!==0||this.adopted.length!==0}},RootRefs=class{refs;pruneAt;constructor(){this.refs=/* @__PURE__ */ new Set,this.pruneAt=64}add(e){let t=this.refs;if(t.add(e.ref??=new WeakRef(e)),!(t.size<this.pruneAt)){for(let e of t)e.deref()===void 0&&t.delete(e);this.pruneAt=Math.max(64,t.size*2)}}delete(e){e.ref!==null&&this.refs.delete(e.ref)}},DocCSS=class{doc;main;shadows;watched;envWidth;envHeight;envDpr;authorVersion;authorStyleVersion;authorResult;constructor(e){this.doc=e,this.main=new RootStyles(e[M]),this.shadows=null,this.watched=null,this.envWidth=-1,this.envHeight=-1,this.envDpr=-1,this.authorVersion=-1,this.authorStyleVersion=-1,this.authorResult=!1}};function docCSS(e){let t=e[yt];return t===null&&(e[yt]=t=new DocCSS(e)),t}function existingDocCSS(e){return e[yt]}const bl=/* @__PURE__ */ new WeakMap;function rootStylesFor(e,t){let n=e.doc,r=t?docCSS(n):existingDocCSS(n);if(r===null)return null;if(e.type===9)return r.main;let i=bl.get(e)??null;return t&&(i===null&&bl.set(e,i=new RootStyles(e)),i.indexed||((r.shadows??=new RootRefs).add(i),i.indexed=!0)),i}function releaseIfUnused(e,t){t===e.main||t.hasSheets()||t.list!==null||t.adoptedExposed||!t.indexed||(e.shadows?.delete(t),t.indexed=!1)}const xl=/* @__PURE__ */ new WeakMap;function treeTop(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function isStyleRoot(e){return e.type===9||!!(e.flags&32)}function syncList(e){e.list?._set(e.owners.slice())}function registerOwnerSheet(e,t){let n=treeTop(e);if(!isStyleRoot(n))return;let r=rootStylesFor(n,!0),i=r.ownerNodes.length;for(;i>0&&compareTreeOrder(r.ownerNodes[i-1],e)>0;)i--;r.ownerNodes.splice(i,0,e),r.owners.splice(i,0,t),xl.set(t,r),syncList(r),e.doc[Pr]++}function unregisterOwnerSheet(e,t){let n=existingDocCSS(e.doc),r=xl.get(t);if(n!==null&&r!==void 0){let e=r.owners.indexOf(t);e!==-1&&(r.owners.splice(e,1),r.ownerNodes.splice(e,1),syncList(r)),xl.delete(t),releaseIfUnused(n,r)}t[zn]=null,e.doc[Pr]++}function createOwnerSheet(e,t,n){let r=ml._forOwner(e.node,t,n,null);return registerOwnerSheet(e,r),r}function createLinkSheet(e,t,n){let r=ml._forOwner(e.node,``,n,t);return registerOwnerSheet(e,r),r}function removeOwnerSheet(e,t){t instanceof ml&&unregisterOwnerSheet(e,t)}function styleSheetsOf(e){let t=rootStylesFor(e,!0);return t.list===null&&(t.list=new StyleSheetList,syncList(t)),t.list}function adoptedStyleSheetsOf(e){let t=rootStylesFor(e,!0);if(!t.adoptedExposed){t.adoptedExposed=!0;let n=docCSS(e.doc);t!==n.main&&(n.watched??=new RootRefs).add(t)}return t.adopted}function setAdoptedStyleSheets(e,t){if(typeof t!=`object`||!t||typeof t.length!=`number`)throw TypeError(`Failed to set the 'adoptedStyleSheets' property: The provided value cannot be converted to a sequence.`);let n=Array.from(t);for(let t of n){if(!(t instanceof ml))throw TypeError(`Failed to set the 'adoptedStyleSheets' property: Failed to convert value to 'CSSStyleSheet'.`);if(!t[ut])throw new DOMException(`Failed to set the 'adoptedStyleSheets' property: Can't adopt non-constructed stylesheets.`,`NotAllowedError`);if(t[Ft]!==null&&t[Ft]!==e.doc)throw new DOMException(`Failed to set the 'adoptedStyleSheets' property: Sharing constructed stylesheets in multiple documents is not allowed`,`NotAllowedError`)}let r=rootStylesFor(e,!0);r.adopted=n,r.adoptedSnapshot=r.adopted.slice(),r.adoptedExposed&&r!==docCSS(e.doc).main&&(r.adoptedExposed=!1,docCSS(e.doc).watched?.delete(r));for(let t of r.adopted)t[Ft]===null&&(t[Ft]=e.doc);e.doc[Pr]++,releaseIfUnused(docCSS(e.doc),r)}function validateAdopted(e){if(checkAdopted(e.main)&&e.doc[Pr]++,e.watched===null)return;let t=e.watched.refs;for(let n of t){let r=n.deref();r===void 0?t.delete(n):checkAdopted(r)&&e.doc[Pr]++}}function checkAdopted(e){let t=e.adopted,n=e.adoptedSnapshot,r=t.length!==n.length;if(!r)for(let e=0;e<t.length;e++)t[e]!==n[e]&&(r=!0);if(r){e.adoptedSnapshot=t.slice();for(let n of t)n instanceof ml&&n[Ft]===null&&(n[Ft]=e.root.doc)}return r}var IndexedRule=class{sel;specificity;sheetIndex;order;layer;block;layerNode;h0;h1;h2;h3;constructor(e,t,n,r,i){this.sel=e,this.specificity=e.specificity,this.h0=e.h0,this.h1=e.h1,this.h2=e.h2,this.h3=e.h3,this.sheetIndex=t,this.order=n,this.layer=0,this.block=r,this.layerNode=i}},Bucket=class{rules;hashed;constructor(){this.rules=[],this.hashed=0}push(e){this.rules.push(e),e.h0>=0&&this.hashed++}},RuleBuckets=class{ids;classes;tags;universal;size;quirks;constructor(e){this.ids=/* @__PURE__ */ new Map,this.classes=/* @__PURE__ */ new Map,this.tags=/* @__PURE__ */ new Map,this.universal=new Bucket,this.size=0,this.quirks=e}add(e,t=!1){this.size++;let n=e.sel.keyKind,r=this.quirks&&(n===1||n===2)?asciiLowercase$1(e.sel.key):e.sel.key,i=null;if(n===1?i=this.ids:n===2?i=this.classes:n===3&&(i=this.tags),i===null){t&&(this.universal=copyBucket(this.universal)),this.universal.push(e);return}let a=i.get(r);a===void 0?i.set(r,a=new Bucket):t&&i.set(r,a=copyBucket(a)),a.push(e)}};function copyBucket(e){let t=new Bucket;for(let n=0;n<e.rules.length;n++)t.push(e.rules[n]);return t}var LayerNode=class{name;children;rank;constructor(e){this.name=e,this.children=/* @__PURE__ */ new Map,this.rank=0}},RuleIndex=class{main;before;after;volatile;styleVersion;builder;sheets;constructor(e,t=!1){this.main=new RuleBuckets(t),this.before=new RuleBuckets(t),this.after=new RuleBuckets(t),this.volatile=!1,this.styleVersion=e,this.builder=null,this.sheets=[]}},IndexedSheet=class{sheet;version;rules;applied;constructor(e,t){this.sheet=e,this.version=e[K],this.rules=e[V].length,this.applied=t}},IndexBuilder=class{index;env;sheetIndex;order;root;anon;all;extending;constructor(e,t){this.index=e,this.env=t,this.sheetIndex=0,this.order=0,this.root=new LayerNode(``),this.anon=0,this.all=[],this.extending=!1}layer(e,t){let n=e;for(let e of t.split(`.`)){let t=n.children.get(e);t===void 0&&n.children.set(e,t=new LayerNode(e)),n=t}return n}sheet(e){return e[Mt]||e[L][$n].length!==0&&!evaluateMediaQueryList$1(e[L][$n],this.env)?!1:(this.rules(e[V],this.root,null),!0)}rules(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];if(i instanceof gl)this.style(i,i[w],t),i[V].length!==0&&this.rules(i[V],t,i);else if(i instanceof CSSNestedDeclarations)n!==null&&this.style(n,i[w],t);else if(i instanceof CSSMediaRule)evaluateMediaQueryList$1(i[L][$n],this.env)&&this.rules(i[V],t,n);else if(i instanceof CSSSupportsRule)i[An]&&this.rules(i[V],t,n);else if(i instanceof CSSLayerBlockRule){let e=i[Nn]===``?`\0anon`+this.anon++:i[Nn];this.rules(i[V],this.layer(t,e),n)}else if(i instanceof CSSLayerStatementRule)for(let e of i[Pn])this.layer(t,e);else i instanceof CSSGroupingRule}}style(e,t,n){t.names.length!==0&&this.add(e._compile(),t,n)}add(e,t,n){if(e===null||t.names.length===0)return;let r=this.order++;for(let i of e.selectors){let e=new IndexedRule(i,this.sheetIndex,r,t,n);i.volatile&&(this.index.volatile=!0);let a=i.pseudoElement;if(a===``)this.index.main.add(e,this.extending);else if(a===`before`)this.index.before.add(e,this.extending);else if(a===`after`)this.index.after.add(e,this.extending);else continue;this.all.push(e)}}extend(e,t){let n=this.all.length;this.extending=!0;let r=!0;t===0?r=this.sheet(e):this.rules(e[V].slice(t),this.root,null),this.extending=!1;for(let e=n;e<this.all.length;e++)this.all[e].layer=this.all[e].layerNode.rank;return r}finish(){let e=0,visit=t=>{for(let e of t.children.values())visit(e);t.rank=e++};visit(this.root);for(let e of this.all)e.layer=e.layerNode.rank}};function windowEnv(e){let t=e[q];return t===null?ul:mediaEnvironment(t)}function currentStyleVersion(e){let t=e[yt];if(t===null)return e[Pr];validateAdopted(t);let n=e[q];if(n!==null){let r=n.innerWidth??1024,i=n.innerHeight??768,a=n.devicePixelRatio??1;(r!==t.envWidth||i!==t.envHeight||a!==t.envDpr)&&(t.envWidth!==-1&&e[Pr]++,t.envWidth=r,t.envHeight=i,t.envDpr=a)}return e[Pr]}function sheetsHaveRules(e){for(let t of e.owners)if(t[V].length!==0)return!0;for(let t of e.adopted)if(t instanceof ml&&t[V].length!==0)return!0;return!1}function ruleIndexFor(e,t,n){if(!e.hasSheets())return null;let r=e.index,i=t[Mn]===`quirks`;if(r!==null&&r.main.quirks===i&&(r.styleVersion===n||extendIndex(r,e,windowEnv(t),n)))return r.main.size+r.before.size+r.after.size===0?null:r;r=new RuleIndex(n,i);let a=new IndexBuilder(r,windowEnv(t)),o=treeSheets(e);for(let e=0;e<o.length;e++)a.sheetIndex=e,r.sheets.push(new IndexedSheet(o[e],a.sheet(o[e])));return a.finish(),r.builder=a,e.index=r,r.main.size+r.before.size+r.after.size===0?null:r}function treeSheets(e){let t=e.owners.slice();for(let n of e.adopted)n instanceof ml&&t.push(n);return t}function extendIndex(e,t,n,r){let i=e.builder;if(i===null||!sameEnvironment(i.env,n))return!1;let a=treeSheets(t),o=e.sheets;if(a.length<o.length)return!1;for(let e=0;e<o.length;e++){let t=o[e],n=t.sheet;if(a[e]!==n||n[ir]>t.version)return!1}for(let e=o.length;e<a.length;e++){let t=a[e][V];for(let e=0;e<t.length;e++)if(!appendableRule(t[e]))return!1}for(let e=0;e<o.length;e++){let t=o[e],n=t.sheet[V];t.applied&&n.length>t.rules&&(i.sheetIndex=e,i.extend(t.sheet,t.rules)),t.version=t.sheet[K],t.rules=n.length}for(let e=o.length;e<a.length;e++)i.sheetIndex=e,o.push(new IndexedSheet(a[e],i.extend(a[e],0)));return e.styleVersion=r,!0}function sameEnvironment(e,t){return e.width===t.width&&e.height===t.height&&e.devicePixelRatio===t.devicePixelRatio&&e.mediaType===t.mediaType&&e.features===t.features}function uaDisplay(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return e.parent!==null&&e.parent.type===9?`block`:`inline`;if(e.attrs!==null){if(e.tag!==Y.embed){let t=attr(e,`hidden`);if(t!==null&&asciiLowercase$1(t)!==`until-found`)return`none`}if(attr(e,`popover`)!==null&&!ma[`popover-open`](e)&&(e.tag!==Y.dialog||attr(e,`open`)===null))return`none`}switch(e.tag){case Y.area:case Y.base:case Y.basefont:case Y.datalist:case Y.head:case Y.link:case Y.meta:case Y.noembed:case Y.noframes:case Y.param:case Y.rp:case Y.script:case Y.style:case Y.template:case Y.title:return`none`;case Y.dialog:return attr(e,`open`)===null&&!ma[`popover-open`](e)?`none`:`block`;case Y.html:case Y.body:case Y.address:case Y.blockquote:case Y.center:case Y.div:case Y.figure:case Y.figcaption:case Y.footer:case Y.form:case Y.header:case Y.hr:case Y.legend:case Y.listing:case Y.main:case Y.p:case Y.plaintext:case Y.pre:case Y.search:case Y.xmp:case Y.details:case Y.summary:case Y.dir:case Y.dd:case Y.dl:case Y.dt:case Y.menu:case Y.ol:case Y.ul:case Y.article:case Y.aside:case Y.h1:case Y.h2:case Y.h3:case Y.h4:case Y.h5:case Y.h6:case Y.hgroup:case Y.nav:case Y.section:case Y.fieldset:case Y.optgroup:case Y.option:case Y.frameset:case Y.frame:return`block`;case Y.li:return`list-item`;case Y.table:return`table`;case Y.caption:return`table-caption`;case Y.colgroup:return`table-column-group`;case Y.col:return`table-column`;case Y.thead:return`table-header-group`;case Y.tbody:return`table-row-group`;case Y.tfoot:return`table-footer-group`;case Y.tr:return`table-row`;case Y.td:case Y.th:return`table-cell`;case Y.input:return attr(e,`type`)!==null&&asciiLowercase$1(attr(e,`type`))===`hidden`?`none`:`inline-block`;case Y.button:case Y.select:case Y.textarea:case Y.meter:case Y.progress:case Y.marquee:return`inline-block`;case Y.ruby:return`ruby`;case Y.rt:return`ruby-text`;case Y.slot:return`contents`}return`inline`}function uaDisplayImportant(e){if(e.tag!==Y.input||e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=attr(e,`type`);return t!==null&&asciiLowercase$1(t)===`hidden`}function uaRules(){let e=[];for(let t of`
17
17
  a[href], area[href] { color: rgb(0, 0, 238); text-decoration: underline; cursor: pointer; }
18
18
  b, strong, th, h1, h2, h3, h4, h5, h6, optgroup { font-weight: bold; }
19
19
  i, em, cite, var, dfn, address { font-style: italic; }
@@ -32,18 +32,18 @@ button, select, meter, progress { box-sizing: border-box; }
32
32
  ol { list-style-type: decimal; } ul, menu, dir { list-style-type: disc; }
33
33
  nobr { white-space: nowrap; }
34
34
  colgroup[hidden], col[hidden], thead[hidden], tbody[hidden], tfoot[hidden], tr[hidden] { visibility: collapse; }
35
- `.split(`}`)){let n=t.indexOf(`{`);if(n===-1)continue;let r=new DeclBlock;for(let e of t.slice(n+1).split(`;`)){let t=e.indexOf(`:`);t!==-1&&r.put(e.slice(0,t).trim(),e.slice(t+1).trim(),!1)}e.push([t.slice(0,n).trim(),r])}return e}let xl=null;function uaRuleIndex(){if(xl!==null)return xl;xl=new RuleIndex(0);let e=new IndexBuilder(xl,ll);for(let[t,n]of uaRules())e.add(compileSelectorList(t),n,e.root);return e.finish(),xl}const Sl=pendingLonghandsMap();var StyleRecord=class{el;pseudo;decls;ua;displayLocked;computed;custom;customDone;display;visibility;pointerEvents;volatile;deps;inheritsVolatile;before;after;root;constructor(e,t){this.el=e,this.pseudo=t,this.decls=null,this.ua=null,this.displayLocked=!1,this.computed=null,this.custom=null,this.customDone=!1,this.display=``,this.visibility=``,this.pointerEvents=``,this.volatile=!1,this.deps=null,this.inheritsVolatile=!1,this.before=null,this.after=null,this.root=null}};const Cl=/* @__PURE__ */ new Map;function inlineBlock(e){if(!(e.flags&64))return null;let t=e.node[jr];if(t!=null)return t[w];let n=attr(e,`style`);if(n===null||n===``)return null;let r=Cl.get(n);return r===void 0&&(r=parseDeclBlock(n),Cl.size>2e3&&Cl.clear(),Cl.set(n,r)),r}function inheritanceParent(e){let t=e.parent;if(t===null)return null;if(t.type===1)return t;if(t.flags&32){let e=t.node[j];return e?e[M]:null}return null}function rootOf(e){let t=e;for(;t.parent!==null;)t=t.parent;return t.type===9||t.flags&32?rootStylesFor(t,!1):null}function shadowStylesOf(e){let t=e.node[W];return t==null?null:rootStylesFor(t[M],!1)}function hostOf(e){if(e.root.type===9)return null;let t=e.root.node[j];return t?t[M]:null}var Matched=class{rule;context;constructor(e,t){this.rule=e,this.context=t}};let wl=null,Tl=[],El=0;function buildFilter(e){Tl=buildAncestorFilter(e),wl=e,Ol=null}function resetFilter(){wl=null,Ol=null}var Survivors=class{hashes;lists;constructor(e){this.hashes=e,this.lists=/* @__PURE__ */ new WeakMap}};const Dl=/* @__PURE__ */ new WeakMap;let Ol=null;function sameHashes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function filterSurvivors(e,t,n){wl!==t&&buildFilter(t);let r=Ol;r===null&&(r=Dl.get(n)??null,r!==null&&sameHashes(r.hashes,Tl)||(r=new Survivors(Tl.slice()),Dl.set(n,r)),Ol=r);let i=r.lists.get(e);if(i===void 0){i=[];let t=e.rules;for(let e=0;e<t.length;e++){let n=t[e];mayMatchAncestors(n.h0,n.h1,n.h2,n.h3)&&i.push(n)}r.lists.set(e,i)}return i}function testRules(e,t,n,r,i,a,o){if(e===void 0)return;let s=e.rules;i&&e.hashed>=16&&t.parent!==null&&(s=filterSurvivors(e,t,t.parent),i=!1);for(let e=0;e<s.length;e++){let c=s[e];i&&c.h0>=0&&(wl!==t&&++El>2&&buildFilter(t),wl===t&&!mayMatchAncestors(c.h0,c.h1,c.h2,c.h3))||(r===void 0?matchesSelectorDirect(c.sel,t,n):matchesSelector(c.sel,t,n,r))&&o.push(new Matched(c,a))}}function collect$2(e,t,n,r,i,a){if(e.size===0)return;let o=r===null?void 0:{shadowHost:r},s=e.quirks,c=!s;if(t.id!==``&&e.ids.size!==0&&testRules(e.ids.get(s?asciiLowercase$1(t.id):t.id),t,n,o,c,i,a),e.classes.size!==0&&t.attrs!==null){let r=classTokens(t);for(let l=0;l<r.length;l++)testRules(e.classes.get(s?asciiLowercase$1(r[l]):r[l]),t,n,o,c,i,a)}e.tags.size!==0&&testRules(e.tags.get(asciiLowercase$1(t.name)),t,n,o,c,i,a),testRules(e.universal,t,n,o,c,i,a)}__name(collect$2,`collect`);function bucketsFor(e,t){return t===0?e.main:t===1?e.before:e.after}function applyBlock(e,t,n){let r=t.names,i=t.values,a=t.important;for(let t=0;t<r.length;t++){if(a[t]!==n)continue;let o=r[t],s=Sl.get(o);if(s!==void 0){let n=`\0`+o+`\0`+i[t];for(let t=0;t<s.length;t++)e.set(s[t],n);e.set(o,i[t])}else e.set(o,i[t])}}function cascade(e,t,n,r){let i=null;if(r.length!==0){i=/* @__PURE__ */ new Map,r.sort(normalOrder);for(let e of r)applyBlock(i,e.rule.block,!1);e.ua=new Map(i)}if(t.length!==0){i??=/* @__PURE__ */ new Map,t.sort(normalOrder);for(let e of t)applyBlock(i,e.rule.block,!1)}if(n!==null&&n.names.length!==0&&(i??=/* @__PURE__ */ new Map,applyBlock(i,n,!1)),t.length!==0){let e=!1;for(let n of t)n.rule.block.important.indexOf(!0)!==-1&&(e=!0);if(e){let e=t.slice().sort(importantOrder);for(let t of e)applyBlock(i,t.rule.block,!0)}}n!==null&&n.important.indexOf(!0)!==-1&&applyBlock(i,n,!0),e.decls=i}function normalOrder(e,t){return e.context-t.context||e.rule.layer-t.rule.layer||e.rule.specificity-t.rule.specificity||e.rule.sheetIndex-t.rule.sheetIndex||e.rule.order-t.rule.order}function importantOrder(e,t){return t.context-e.context||t.rule.layer-e.rule.layer||e.rule.specificity-t.rule.specificity||e.rule.sheetIndex-t.rule.sheetIndex||e.rule.order-t.rule.order}function collectAuthor(e,t,n,r,i){let a=e.doc,o=t===0?``:t===1?`before`:`after`;if(n!==null){let s=ruleIndexFor(n,a,r);s!==null&&collect$2(bucketsFor(s,t),e,o,hostOf(n),1,i)}let s=shadowStylesOf(e);if(s!==null){let n=ruleIndexFor(s,a,r);n!==null&&collect$2(bucketsFor(n,t),e,o,e,0,i)}}function layerKey(e){return e.context*1048576+e.rule.layer}let kl,Al=0;function winnerIn(e,t,n,r){let i=e.names,a=e.important;for(let o=0;o<i.length;o++){if(a[o]!==t)continue;let s=i[o];if(s===n)kl=e.values[o],Al=r;else{let t=Sl.get(s);t!==void 0&&t.indexOf(n)!==-1&&(kl=`\0`+s+`\0`+e.values[o],Al=r)}}}function effectiveValue(e,t,n){if(n.charCodeAt(0)===0)return isCustomPropertyName(t)?n:resolvePending(e,t,n);if(!isCustomPropertyName(t)&&containsVar(n)){let t=substitute(n,t=>customProps(e)?.get(t)??null);return t===null?null:t.trim()}return n}function revertLayerValue(e,t){let n=e.el,r=[];resetFilter(),El=0,collectAuthor(n,e.pseudo,e.root,currentStyleVersion(n.doc),r),resetFilter(),r.sort(normalOrder);let i=r.slice().sort(importantOrder),a=e.pseudo===0?inlineBlock(n):null,o=[];for(;;){kl=void 0,Al=0;for(let e=0;e<r.length;e++){let n=layerKey(r[e]);o.indexOf(n)===-1&&winnerIn(r[e].rule.block,!1,t,n)}a!==null&&o.indexOf(-1)===-1&&winnerIn(a,!1,t,-1);for(let e=0;e<i.length;e++){let n=layerKey(i[e]);o.indexOf(n)===-1&&winnerIn(i[e].rule.block,!0,t,n)}a!==null&&o.indexOf(-1)===-1&&winnerIn(a,!0,t,-1);let n=kl;if(n===void 0)return;let s=effectiveValue(e,t,n);if(s===null||s.toLowerCase()!==`revert-layer`)return n;o.push(Al)}}function computeRecord(e,t,n){resetFilter(),El=0;let r=new StyleRecord(e,t),i=rootOf(e);r.root=i;let a=[],o=beginStateDeps();collectAuthor(e,t,i,n,a);let s=endStateDeps(o);s!==null&&(depsOnAncestors(s,e)?r.deps=s:r.volatile=!0);let c=[];return t===0&&e.ns===`http://www.w3.org/1999/xhtml`&&collect$2(uaRuleIndex().main,e,``,null,0,c),cascade(r,a,t===0?inlineBlock(e):null,c),t===0&&(r.displayLocked=uaDisplayImportant(e),e.attrs!==null&&attr(e,`popover`)!==null&&(r.volatile=!0)),resetFilter(),r}function depsOnAncestors(e,t){let n=e.els;outer:for(let e=0;e<n.length;e++){let r=n[e];for(let e=t;e!==null;e=e.parent)if(e===r)continue outer;return!1}return!0}function reusable(e){if(e.volatile)return!1;if(e.deps===null){if(!e.inheritsVolatile)return!0}else if(!stateDepsHold(e.deps))return!1;return e.computed=null,e.custom=null,e.customDone=!1,e.display=``,e.visibility=``,e.pointerEvents=``,e.before=null,e.after=null,!0}function styleRecord(e){let t=e.doc,n=currentStyleVersion(t),r=nodeCache(e),i=r.style;if(i!==null&&r.styleVersion===t[q]&&r.styleSheetVersion===n&&reusable(i))return i;let a=computeRecord(e,0,n);return r.style=a,r.styleVersion=t[q],r.styleSheetVersion=n,a}function pseudoRecord(e,t){let n=styleRecord(e),r=t===1?n.before:n.after;if(r!==null&&reusable(r))return r;let i=computeRecord(e,t,e.doc[Mr]);return t===1?n.before=i:n.after=i,i}function recordFor(e,t){return t===0?styleRecord(e):pseudoRecord(e,t)}function dependOn(e,t){return(t.volatile||t.deps!==null||t.inheritsVolatile)&&(e.inheritsVolatile=!0),t}function parentRecord(e){if(e.pseudo!==0)return dependOn(e,styleRecord(e.el));let t=inheritanceParent(e.el);return t===null?null:dependOn(e,styleRecord(t))}function customProps(e){if(e.customDone)return e.custom;e.customDone=!0;let t=parentRecord(e),n=t===null?null:customProps(t),r=e.decls,i=null;if(r!==null)for(let e of r.keys())isCustomPropertyName(e)&&(i??=[]).push(e);if(i===null)return e.custom=n,n;let a=n===null?/* @__PURE__ */ new Map:new Map(n);e.custom=a;let o=/* @__PURE__ */ new Map,resolve=t=>{let i=o.get(t);if(i===2)return a.get(t)??null;if(i===1)return null;let s=r.get(t);if(s===void 0)return a.get(t)??null;o.set(t,1);let c=s.toLowerCase();if(c===`revert-layer`){let n=revertLayerValue(e,t);n!==void 0&&(s=n,c=n.toLowerCase())}let l=s;return c===`initial`?l=null:c===`inherit`||c===`unset`||c===`revert`||c===`revert-layer`?l=n?.get(t)??null:containsVar(s)&&(l=substitute(s,e=>r.has(e)?resolve(e):a.get(e)??null)),o.set(t,2),l===null?a.delete(t):a.set(t,l),l};for(let e of i)resolve(e);return a}function substitute(e,t){let n=new CSSTokenizer(e),r=``,i=0;for(;;){let a=n.next();if(a===0)break;if(a!==2)continue;let o=n.value.toLowerCase();if(o!==`var`&&o!==`env`)continue;let s=n.start,c=n.end,l=1,u=-1,d=e.length,m=e.length;for(;l>0;){let e=n.next();if(e===0)break;e===2||e===21||e===19?l++:e===22||e===20?(l--,l===0&&(d=n.start,m=n.end)):e===18&&l===1&&u===-1&&(u=n.start)}let h=e.slice(c,u===-1?d:u).trim(),_=u===-1?null:e.slice(u+1,d).trim(),v=o===`var`?t(h):envValue(h);if(v===null&&_!==null&&(v=containsVar(_)?substitute(_,t):_),v===null)return null;r+=e.slice(i,s)+v,i=m}return r+e.slice(i)}function envValue(e){return e.startsWith(`safe-area-inset-`)||e.startsWith(`keyboard-inset-`)?`0px`:null}const jl={"xx-small":9,"x-small":10,small:13,medium:16,large:18,"x-large":24,"xx-large":32,"xxx-large":48};function px(e){return formatNumber(Math.round(e*1e4)/1e4)+`px`}function parentPx(e,t,n){let r=parentRecord(e);if(r===null)return n;let i=computedValueOf(r,t),a=parseFloat(i);return Number.isNaN(a)?n:a}function rootFontSize(e){let t=e.el.doc,n=null;for(let e=t[M].first;e!==null;e=e.next)e.type===1&&(n=e);return n===null||n===e.el?16:parseFloat(computedValueOf(dependOn(e,styleRecord(n)),`font-size`))||16}function absLength(e,t,n,r){switch(t){case`px`:return e;case`em`:return e*n;case`rem`:return e*r;case`ex`:return e*n*.5;case`ch`:return e*n*.5;case`in`:return e*96;case`cm`:return e*96/2.54;case`mm`:return e*96/25.4;case`q`:return e*96/101.6;case`pt`:return e*96/72;case`pc`:return e*16}return null}function computeFontSize(e,t){let n=splitComponents(t);if(n===null||n.length!==1)return t;let r=n[0];if(r.type===1){let n=jl[r.lower];return n===void 0?r.lower===`smaller`?px(parentPx(e,`font-size`,16)/1.2):r.lower===`larger`?px(parentPx(e,`font-size`,16)*1.2):t:px(n)}if(r.type===11)return px(parentPx(e,`font-size`,16)*r.num/100);if(r.type===12){let n=absLength(r.num,r.lower,parentPx(e,`font-size`,16),r.lower===`rem`?rootFontSize(e):16);return n===null?t:px(n)}return t}function computeFontWeight(e,t){switch(t){case`normal`:return`400`;case`bold`:return`700`;case`bolder`:{let t=parentPx(e,`font-weight`,400);return t<350?`400`:t<550?`700`:t<900?`900`:formatNumber(t)}case`lighter`:{let t=parentPx(e,`font-weight`,400);return t<100?formatNumber(t):t<550?`100`:t<750?`400`:`700`}}return t}let Ml=`specified`;function setComputedColorMode(e){Ml=e}const Nl={thin:`1px`,medium:`3px`,thick:`5px`};function borderStyleFor(e){let t=/^(border-(?:top|right|bottom|left)|outline|column-rule)-width$/.exec(e);return t===null?null:t[1]+`-style`}function computeSpecified(e,t,n){if(t===`font-size`)return computeFontSize(e,n);if(t===`font-weight`)return computeFontWeight(e,n);let r=borderStyleFor(t);if(r!==null){let t=computedValueOf(e,r);return t===`none`||t===`hidden`?`0px`:Nl[n]??n}if(grammarFor(t).types&16){if(Ml===`specified`){if(n.toLowerCase()!==`currentcolor`)return n;if(t!==`color`)return computedValueOf(e,`color`);let r=parentRecord(e);return r===null?`rgb(0, 0, 0)`:computedValueOf(r,`color`)}if(t===`color`){if(n.toLowerCase()===`currentcolor`){let t=parentRecord(e);return t===null?`rgb(0, 0, 0)`:computedValueOf(t,`color`)}return computeColor(n,`rgb(0, 0, 0)`)}return computeColor(n,n.toLowerCase().indexOf(`currentcolor`)===-1?``:computedValueOf(e,`color`))}return n}function initialValue(e,t){if(t===`display`)return`inline`;if(t===`content`&&e.pseudo!==0)return`none`;let n=propertyInfo(t);return n===void 0||n.initial===``?``:computeSpecified(e,t,n.initial)}function inheritedValue(e,t){let n=parentRecord(e);return n===null?initialValue(e,t):computedValueOf(n,t)}function resolvePending(e,t,n){let r=n.indexOf(`\0`,1),i=n.slice(1,r),a=n.slice(r+1);if(containsVar(a)&&(a=substitute(a,t=>customProps(e)?.get(t)??null)),a===null)return null;let o=a.trim().toLowerCase();if(isCSSWideKeyword(o))return o;let s=isCascadeOnlyShorthand(i)?expandCascadeShorthand(i,a):expandShorthand(i,a);if(s===null||s===Wc)return null;let c=cascadeLonghandsOf(i).indexOf(t);return c===-1?null:s[c]}function computedValueOf(e,t){if(isCustomPropertyName(t))return customProps(e)?.get(t)??``;let n=e.computed;if(n!==null){let e=n.get(t);if(e!==void 0)return e}let r,i=Sl.get(t);if(i!==void 0){let n=[];for(let t of i)n.push(computedValueOf(e,t));r=n.indexOf(``)===-1?isCascadeOnlyShorthand(t)?serializeCascadeShorthand(t,n):serializeShorthand(t,n,t!==`background`):``}else r=t===`display`?computeDisplay(e):cascadedToComputed(e,t,e.decls?.get(t));return n===null&&(e.computed=n=/* @__PURE__ */ new Map),n.set(t,r),r}function cascadedToComputed(e,t,n){let r=propertyInfo(t),i=r!==void 0&&r.inherited;if(n!==void 0&&n.charCodeAt(0)===0){let r=resolvePending(e,t,n);n=r===null?`unset`:r}else if(n!==void 0&&containsVar(n)){let r=substitute(n,t=>customProps(e)?.get(t)??null);n=r===null||normalizeLonghand(t,r)===null?`unset`:r.trim()}if(n===void 0){if(t===`direction`&&e.pseudo===0){let t=uaDirection(e.el);if(t!==``)return t}return i?inheritedValue(e,t):initialValue(e,t)}switch(n){case`inherit`:return inheritedValue(e,t);case`initial`:return initialValue(e,t);case`unset`:return i?inheritedValue(e,t):initialValue(e,t);case`revert-layer`:{let n=revertLayerValue(e,t);if(n!==void 0)return cascadedToComputed(e,t,n)}case`revert`:{let n=e.ua?.get(t);return n!==void 0&&n!==`revert`&&n!==`revert-layer`?cascadedToComputed(e,t,n):i?inheritedValue(e,t):initialValue(e,t)}}return computeSpecified(e,t,n)}function uaDirection(e){return e.ns!==`http://www.w3.org/1999/xhtml`||attr(e,`dir`)===null&&e.tag!==X.bdi&&(e.tag!==X.input||inputTypeName(e)!==`tel`)?``:directionality(e)===2?e.tag===X.input&&attr(e,`dir`)===null?`ltr`:`rtl`:`ltr`}function substituteDisplay(e,t){let n=substitute(t,t=>customProps(e)?.get(t)??null);return n===null||normalizeLonghand(`display`,n)===null?`unset`:n.trim()}function computeDisplay(e){if(e.display!==``)return e.display;let t;if(e.displayLocked)t=`none`;else{let n=e.decls?.get(`display`);n!==void 0&&containsVar(n)&&(n=substituteDisplay(e,n)),n===`revert-layer`&&(n=revertLayerValue(e,`display`),n!==void 0&&containsVar(n)&&(n=substituteDisplay(e,n)));let r=e.pseudo===0?uaDisplay(e.el):`inline`;t=n===void 0||n===`revert`||n===`revert-layer`?r:n===`inherit`?inheritedValue(e,`display`):n===`initial`||n===`unset`?`inline`:n}if(e.pseudo!==0&&t!==`none`&&t!==`contents`){let n=computeDisplay(dependOn(e,styleRecord(e.el)));(n===`flex`||n===`inline-flex`||n===`grid`||n===`inline-grid`)&&(t=blockify(t))}return e.display=t,t}function blockify(e){switch(e){case`inline`:case`inline-block`:case`run-in`:return`block`;case`inline-flex`:return`flex`;case`inline-grid`:return`grid`;case`inline-table`:return`table`;case`inline-list-item`:return`list-item`}return e.startsWith(`inline `)?e.slice(7):e}function hasAuthorStyles(e){let t=existingDocCSS(e);if(t!==null){let n=currentStyleVersion(e);if(t.authorVersion===e[q]&&t.authorStyleVersion===n)return t.authorResult;let r=sheetsHaveRules(t.main);if(!r&&t.shadows!==null){let e=t.shadows.refs;for(let t of e){let n=t.deref();n===void 0?e.delete(t):sheetsHaveRules(n)&&(r=!0)}}return!r&&inlineStyleCount(e)>0&&(r=hasConnectedInlineStyle(e)),t.authorVersion=e[q],t.authorStyleVersion=n,t.authorResult=r,r}return inlineStyleCount(e)!==0&&hasAuthorStyles(docCSSFor(e))}function docCSSFor(e){return docCSS(e),e}function hasConnectedInlineStyle(e){let t=e[M];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.flags&64)return!0;return!1}function sheetsApply(e){let t=e.doc[yt];return t===null?!1:t.main.hasSheets()?!0:t.shadows!==null&&t.shadows.refs.size!==0}function plain$1(e){return!(e.flags&64)&&!sheetsApply(e)}__name(plain$1,`plain`);function computedPosition(e){return plain$1(e)?`static`:computedValueOf(styleRecord(e),`position`)}function computedDisplay(e){return plain$1(e)?uaDisplay(e):computeDisplay(styleRecord(e))}function styledDisplay(e){return plain$1(e)?null:computeDisplay(styleRecord(e))}function isDisplayNone(e){return plain$1(e)?uaDisplay(e)===`none`:computeDisplay(styleRecord(e))===`none`}function isDisplayNoneInclusive(e){for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return!0;return!1}function inheritedKeyword(e,t,n,r){if(plain$1(e)){let i=inheritanceParent(e);return i===null?r:inheritedKeyword(i,t,n,r)}let i=styleRecord(e);if(i[n]!==``)return i[n];let a=computedValueOf(i,t);return i[n]=a,a}function computedVisibility(e){return inheritedKeyword(e,`visibility`,`visibility`,`visible`)}function isVisibilityHidden(e){let t=computedVisibility(e);return t===`hidden`||t===`collapse`}function pointerEvents(e){return inheritedKeyword(e,`pointer-events`,`pointerEvents`,`auto`)}function pointerEventsNone(e){return pointerEvents(e)===`none`}function pseudoKind(e){if(e==null||e===``)return 0;let t=e.toLowerCase();return t===`::before`||t===`:before`?1:t===`::after`||t===`:after`?2:-1}function computedValue(e,t,n){let r=pseudoKind(n);if(r===-1)return``;let i=isCustomPropertyName(t)?t:t.toLowerCase();if(r===0){if(i===`display`)return computedDisplay(e);if(i===`visibility`)return computedVisibility(e);if(i===`pointer-events`)return pointerEvents(e)}return computedValueOf(recordFor(e,r),i)}function customPropertyNames(e,t){let n=pseudoKind(t);if(n===-1||plain$1(e))return Pl;let r=customProps(recordFor(e,n));return r===null?Pl:[...r.keys()].sort()}const Pl=[];function pseudoContent(e,t){if(e.doc[yt]===null||!sheetsApply(e))return``;let n=pseudoKind(t);if(n<=0)return``;let r=rootOf(e);if(r===null)return``;let i=ruleIndexFor(r,e.doc,currentStyleVersion(e.doc));return i===null||bucketsFor(i,n).size===0?``:contentText(e,computedValueOf(recordFor(e,n),`content`))}function contentText(e,t){if(t===``||t===`none`||t===`normal`)return``;let n=splitComponents(t);if(n===null)return``;let r=``;for(let t of n)if(t.type!==100){if(t.type===9&&t.value===`/`)break;if(t.type===5)r+=t.value;else if(t.type===2&&t.lower===`attr`){let n=t.text.slice(5,-1).trim().split(/\s|,/)[0];r+=attr(e,n.toLowerCase())??``}}return r}var Fl=class CSSComputedStyleDeclaration extends CSSStyleDeclaration{[O];[Xn];constructor(e,t){super(null,null,null),this[O]=e,this[Xn]=t,this[er]=!0,Il===null&&(Il=indexGetterTable(CSSComputedStyleDeclaration.prototype,(e,t)=>e.item(t),0)),ensureIndexGetters(Il,computedPropertyNames().length)}get length(){if(this[Xn]===Ll)return 0;let e=computedPropertyNames().length+customNames(this[O],this[Xn]).length;return Il!==null&&e>Il.count&&ensureIndexGetters(Il,e),e}item(e){if(this[Xn]===Ll)return``;let t=computedPropertyNames(),n=e>>>0;return n<t.length?t[n]:customNames(this[O],this[Xn])[n-t.length]??``}getPropertyValue(e){if(this[Xn]===Ll)return``;let t=String(e);return computedValue(this[O],isCustomPropertyName(t)?t:t.toLowerCase(),this[Xn])}getPropertyPriority(e){return``}get cssText(){return``}set cssText(e){this._checkWritable()}_syncIndices(){}};let Il=null;const Ll=`\0invalid`;function customNames(e,t){return customPropertyNames(e,t)}function getComputedStyle(e,t){let n=e[M],r=t==null||t===``?null:String(t);if(r!==null){let e=r.toLowerCase();e.charCodeAt(0)===58?e!==`::before`&&e!==`::after`&&e!==`:before`&&e!==`:after`&&(r=Ll):r=null}if(r===null){let e=nodeCache(n);return e.computedStyle??=new Fl(n,null)}return new Fl(n,r)}function styleElementUpdated(e,t,n=``){return createOwnerSheet(e,t,n)}function styleElementRemoved(e,t){removeOwnerSheet(e,t)}function isRenderingHidden(e){return isDisplayNoneInclusive(e)}function contentEditableState(e){if(!(e.flags&131072))return-1;let t=contentAttr(e,`contenteditable`);if(t===null)return-1;switch(asciiLowercase$1(t)){case``:case`true`:return 1;case`false`:return 0;case`plaintext-only`:return 2}return-1}const Rl=/* @__PURE__ */ new WeakSet;let zl=!1;function isDesignModeEnabled(e){return zl&&Rl.has(e)}function setDesignModeEnabled(e,t){t?(zl=!0,Rl.add(e)):Rl.delete(e)}function isDesignModeRoot(e,t){return zl&&t.type===9&&e.ns===`http://www.w3.org/1999/xhtml`&&Rl.has(t.node)}function isEditable(e){if(e.type!==1)return!1;for(let t=e;;){if(t.ns===`http://www.w3.org/1999/xhtml`){let e=contentEditableState(t);if(e===1||e===2)return!0;if(e===0)return!1}let e=t.parent;if(e===null)return!1;if(e.type!==1)return isDesignModeRoot(t,e);t=e}}function isEditingHost(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.parent;if(t!==null&&isDesignModeRoot(e,t))return!0;let n=contentEditableState(e);return n!==1&&n!==2?!1:t===null||t.type!==1||!isEditable(t)}function noteChangeDispatch(e,t){let n=t._s;n.pathLength===1&&n.type===`change`&&(e[Jr]=!0)}function hasUserValidity(e){switch(e.tag){case X.input:case X.textarea:case X.select:return e.node[Jr]}return!1}function setUserValidity(e,t){switch(e.tag){case X.input:case X.textarea:case X.select:e.node[Jr]=t}}let Bl=null;function setNotImplementedHandler(e){Bl=e}function notImplementedActive(){return Bl!==null}const Vl=[`navigation (except hash changes)`,`navigation to another Document`],Hl=[`window.getComputedStyle(elt, pseudoElt)`,`Window's getComputedStyle() method: with pseudo-elements`];function stubbedMethod(e,t){return[e===`Window`?`window.${t}`:`${e}.prototype.${t}`,`${e}'s ${t}() method`]}function reportNotImplemented(e,t){if(Bl===null||e===null)return;let n=e[z]?.compat;if(n!==`jsdom-26`&&n!==`jsdom-30`)return;let r=n===`jsdom-26`,i=/* @__PURE__ */ Error(`Not implemented: ${r?t[0]:t[1]}`);i.type=r?`not implemented`:`not-implemented`,Bl(i,n)}const Ul=stubbedMethod(`HTMLFormElement`,`requestSubmit`),Wl={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:``,invalid:`application/x-www-form-urlencoded`},Gl={keywords:[`get`,`post`,`dialog`],missing:``,invalid:`get`};function isSubmitButton(e){if(e.tag===X.button)return buttonType(e)===`submit`;if(e.tag===X.input){let t=inputType(e);return t===18||t===19}return!1}function buttonType(e){let t=attr(e,`type`);if(t!==null){let e=asciiLowercase$1(t);if(e===`reset`||e===`button`||e===`submit`)return e}return e.attrs!==null&&(attr(e,`commandfor`)!==null||attr(e,`command`)!==null)?`button`:`submit`}function defaultButton(e){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++)if(isSubmitButton(t[e]))return t[e];return null}function staticallyValidate(e){let t=e.node._controls(),n=[];for(let e=0;e<t.length;e++){let r=t[e];isSubmittable(r)&&isInvalidCandidate(validatableOf(r))&&n.push(r)}if(n.length===0)return null;let r=[];for(let e=0;e<n.length;e++)fireEvent$1(n[e].node,`invalid`,!1,!0)&&r.push(n[e]);return r}function formCheckValidity(e){return staticallyValidate(e)===null}function submitForm(e,t,n){let r=e.node;if(e.flags&1&&!r[dt]){if(!n){if(r[Gt])return;r[Gt]=!0;try{let n=r._controls();for(let e=0;e<n.length;e++)isSubmittable(n[e])&&setUserValidity(n[e],!0);if(!(t!==e&&attr(t,`formnovalidate`)!==null||attr(e,`novalidate`)!==null)&&staticallyValidate(e)!==null||!dispatchTrusted$1(r,new SubmitEvent(`submit`,{bubbles:!0,cancelable:!0,submitter:t===e?null:t.node})))return}finally{r[Gt]=!1}if(!(e.flags&1))return}Kl!==null&&Kl(e,t)||n||reportNotImplemented(e.doc[J],Ul)}}let Kl=null;function setDialogSubmission(e){Kl=e}function resetForm(e){let t=e.node;if(!t[On]){t[On]=!0;try{if(fireEvent$1(t,`reset`,!0,!0)){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++){let n=t[e];isFACE(n)?faceReset(n):isResettable(n)&&n.node._reset()}}}finally{t[On]=!1}}}function blocksImplicitSubmission(e){switch(e){case 1:case 2:case 4:case 3:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:return!0}return!1}function implicitSubmission(e){let t=defaultButton(e);if(t!==null){if(isActuallyDisabled(t))return;syntheticClick(t.node);return}let n=e.node._controls(),r=0;for(let e=0;e<n.length;e++){let t=n[e];t.tag===X.input&&blocksImplicitSubmission(inputType(t))&&r++}r>1||submitForm(e,e,!1)}function syntheticClick(e){let t=e.click;if(typeof t==`function`){t.call(e);return}let n=new Event(`click`,{bubbles:!0,cancelable:!0,composed:!0});e.dispatchEvent(n)&&e._activationBehavior?.(n)}function textareaWrappingTransformation(e,t){let n=attr(e,`wrap`);if(n===null||asciiLowercase$1(n)!==`hard`)return t;let r=e.node.cols,i=t.split(`
35
+ `.split(`}`)){let n=t.indexOf(`{`);if(n===-1)continue;let r=new DeclBlock;for(let e of t.slice(n+1).split(`;`)){let t=e.indexOf(`:`);t!==-1&&r.put(e.slice(0,t).trim(),e.slice(t+1).trim(),!1)}e.push([t.slice(0,n).trim(),r])}return e}let Sl=null;function uaRuleIndex(){if(Sl!==null)return Sl;Sl=new RuleIndex(0);let e=new IndexBuilder(Sl,ul);for(let[t,n]of uaRules())e.add(compileSelectorList(t),n,e.root);return e.finish(),Sl}const Cl=pendingLonghandsMap();var StyleRecord=class{el;pseudo;decls;ua;displayLocked;computed;custom;customDone;display;visibility;pointerEvents;volatile;deps;inheritsVolatile;before;after;root;constructor(e,t){this.el=e,this.pseudo=t,this.decls=null,this.ua=null,this.displayLocked=!1,this.computed=null,this.custom=null,this.customDone=!1,this.display=``,this.visibility=``,this.pointerEvents=``,this.volatile=!1,this.deps=null,this.inheritsVolatile=!1,this.before=null,this.after=null,this.root=null}};const wl=/* @__PURE__ */ new Map;function inlineBlock(e){if(!(e.flags&64))return null;let t=e.node[Nr];if(t!=null)return t[w];let n=attr(e,`style`);if(n===null||n===``)return null;let r=wl.get(n);return r===void 0&&(r=parseDeclBlock(n),wl.size>2e3&&wl.clear(),wl.set(n,r)),r}function inheritanceParent(e){let t=e.parent;if(t===null)return null;if(t.type===1)return t;if(t.flags&32){let e=t.node[j];return e?e[M]:null}return null}function rootOf(e){let t=e;for(;t.parent!==null;)t=t.parent;return t.type===9||t.flags&32?rootStylesFor(t,!1):null}function shadowStylesOf(e){let t=e.node[U];return t==null?null:rootStylesFor(t[M],!1)}function hostOf(e){if(e.root.type===9)return null;let t=e.root.node[j];return t?t[M]:null}var Matched=class{rule;context;constructor(e,t){this.rule=e,this.context=t}};let Tl=null,El=[],Dl=0;function buildFilter(e){El=buildAncestorFilter(e),Tl=e,kl=null}function resetFilter(){Tl=null,kl=null}var Survivors=class{hashes;lists;constructor(e){this.hashes=e,this.lists=/* @__PURE__ */ new WeakMap}};const Ol=/* @__PURE__ */ new WeakMap;let kl=null;function sameHashes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function filterSurvivors(e,t,n){Tl!==t&&buildFilter(t);let r=kl;r===null&&(r=Ol.get(n)??null,r!==null&&sameHashes(r.hashes,El)||(r=new Survivors(El.slice()),Ol.set(n,r)),kl=r);let i=r.lists.get(e);if(i===void 0){i=[];let t=e.rules;for(let e=0;e<t.length;e++){let n=t[e];mayMatchAncestors(n.h0,n.h1,n.h2,n.h3)&&i.push(n)}r.lists.set(e,i)}return i}function testRules(e,t,n,r,i,a,o){if(e===void 0)return;let s=e.rules;i&&e.hashed>=16&&t.parent!==null&&(s=filterSurvivors(e,t,t.parent),i=!1);for(let e=0;e<s.length;e++){let c=s[e];i&&c.h0>=0&&(Tl!==t&&++Dl>2&&buildFilter(t),Tl===t&&!mayMatchAncestors(c.h0,c.h1,c.h2,c.h3))||(r===void 0?matchesSelectorDirect(c.sel,t,n):matchesSelector(c.sel,t,n,r))&&o.push(new Matched(c,a))}}function collect$2(e,t,n,r,i,a){if(e.size===0)return;let o=r===null?void 0:{shadowHost:r},s=e.quirks,c=!s;if(t.id!==``&&e.ids.size!==0&&testRules(e.ids.get(s?asciiLowercase$1(t.id):t.id),t,n,o,c,i,a),e.classes.size!==0&&t.attrs!==null){let r=classTokens(t);for(let l=0;l<r.length;l++)testRules(e.classes.get(s?asciiLowercase$1(r[l]):r[l]),t,n,o,c,i,a)}e.tags.size!==0&&testRules(e.tags.get(asciiLowercase$1(t.name)),t,n,o,c,i,a),testRules(e.universal,t,n,o,c,i,a)}__name(collect$2,`collect`);function bucketsFor(e,t){return t===0?e.main:t===1?e.before:e.after}function applyBlock(e,t,n){let r=t.names,i=t.values,a=t.important;for(let t=0;t<r.length;t++){if(a[t]!==n)continue;let o=r[t],s=Cl.get(o);if(s!==void 0){let n=`\0`+o+`\0`+i[t];for(let t=0;t<s.length;t++)e.set(s[t],n);e.set(o,i[t])}else e.set(o,i[t])}}function cascade(e,t,n,r){let i=null;if(r.length!==0){i=/* @__PURE__ */ new Map,r.sort(normalOrder);for(let e of r)applyBlock(i,e.rule.block,!1);e.ua=new Map(i)}if(t.length!==0){i??=/* @__PURE__ */ new Map,t.sort(normalOrder);for(let e of t)applyBlock(i,e.rule.block,!1)}if(n!==null&&n.names.length!==0&&(i??=/* @__PURE__ */ new Map,applyBlock(i,n,!1)),t.length!==0){let e=!1;for(let n of t)n.rule.block.important.indexOf(!0)!==-1&&(e=!0);if(e){let e=t.slice().sort(importantOrder);for(let t of e)applyBlock(i,t.rule.block,!0)}}n!==null&&n.important.indexOf(!0)!==-1&&applyBlock(i,n,!0),e.decls=i}function normalOrder(e,t){return e.context-t.context||e.rule.layer-t.rule.layer||e.rule.specificity-t.rule.specificity||e.rule.sheetIndex-t.rule.sheetIndex||e.rule.order-t.rule.order}function importantOrder(e,t){return t.context-e.context||t.rule.layer-e.rule.layer||e.rule.specificity-t.rule.specificity||e.rule.sheetIndex-t.rule.sheetIndex||e.rule.order-t.rule.order}function collectAuthor(e,t,n,r,i){let a=e.doc,o=t===0?``:t===1?`before`:`after`;if(n!==null){let s=ruleIndexFor(n,a,r);s!==null&&collect$2(bucketsFor(s,t),e,o,hostOf(n),1,i)}let s=shadowStylesOf(e);if(s!==null){let n=ruleIndexFor(s,a,r);n!==null&&collect$2(bucketsFor(n,t),e,o,e,0,i)}}function layerKey(e){return e.context*1048576+e.rule.layer}let Al,jl=0;function winnerIn(e,t,n,r){let i=e.names,a=e.important;for(let o=0;o<i.length;o++){if(a[o]!==t)continue;let s=i[o];if(s===n)Al=e.values[o],jl=r;else{let t=Cl.get(s);t!==void 0&&t.indexOf(n)!==-1&&(Al=`\0`+s+`\0`+e.values[o],jl=r)}}}function effectiveValue(e,t,n){if(n.charCodeAt(0)===0)return isCustomPropertyName(t)?n:resolvePending(e,t,n);if(!isCustomPropertyName(t)&&containsVar(n)){let t=substitute(n,t=>customProps(e)?.get(t)??null);return t===null?null:t.trim()}return n}function revertLayerValue(e,t){let n=e.el,r=[];resetFilter(),Dl=0,collectAuthor(n,e.pseudo,e.root,currentStyleVersion(n.doc),r),resetFilter(),r.sort(normalOrder);let i=r.slice().sort(importantOrder),a=e.pseudo===0?inlineBlock(n):null,o=[];for(;;){Al=void 0,jl=0;for(let e=0;e<r.length;e++){let n=layerKey(r[e]);o.indexOf(n)===-1&&winnerIn(r[e].rule.block,!1,t,n)}a!==null&&o.indexOf(-1)===-1&&winnerIn(a,!1,t,-1);for(let e=0;e<i.length;e++){let n=layerKey(i[e]);o.indexOf(n)===-1&&winnerIn(i[e].rule.block,!0,t,n)}a!==null&&o.indexOf(-1)===-1&&winnerIn(a,!0,t,-1);let n=Al;if(n===void 0)return;let s=effectiveValue(e,t,n);if(s===null||s.toLowerCase()!==`revert-layer`)return n;o.push(jl)}}function computeRecord(e,t,n){resetFilter(),Dl=0;let r=new StyleRecord(e,t),i=rootOf(e);r.root=i;let a=[],o=beginStateDeps();collectAuthor(e,t,i,n,a);let s=endStateDeps(o);s!==null&&(depsOnAncestors(s,e)?r.deps=s:r.volatile=!0);let c=[];return t===0&&e.ns===`http://www.w3.org/1999/xhtml`&&collect$2(uaRuleIndex().main,e,``,null,0,c),cascade(r,a,t===0?inlineBlock(e):null,c),t===0&&(r.displayLocked=uaDisplayImportant(e),e.attrs!==null&&attr(e,`popover`)!==null&&(r.volatile=!0)),resetFilter(),r}function depsOnAncestors(e,t){let n=e.els;outer:for(let e=0;e<n.length;e++){let r=n[e];for(let e=t;e!==null;e=e.parent)if(e===r)continue outer;return!1}return!0}function reusable(e){if(e.volatile)return!1;if(e.deps===null){if(!e.inheritsVolatile)return!0}else if(!stateDepsHold(e.deps))return!1;return e.computed=null,e.custom=null,e.customDone=!1,e.display=``,e.visibility=``,e.pointerEvents=``,e.before=null,e.after=null,!0}function styleRecord(e){let t=e.doc,n=currentStyleVersion(t),r=nodeCache(e),i=r.style;if(i!==null&&r.styleVersion===t[K]&&r.styleSheetVersion===n&&reusable(i))return i;let a=computeRecord(e,0,n);return r.style=a,r.styleVersion=t[K],r.styleSheetVersion=n,a}function pseudoRecord(e,t){let n=styleRecord(e),r=t===1?n.before:n.after;if(r!==null&&reusable(r))return r;let i=computeRecord(e,t,e.doc[Pr]);return t===1?n.before=i:n.after=i,i}function recordFor(e,t){return t===0?styleRecord(e):pseudoRecord(e,t)}function dependOn(e,t){return(t.volatile||t.deps!==null||t.inheritsVolatile)&&(e.inheritsVolatile=!0),t}function parentRecord(e){if(e.pseudo!==0)return dependOn(e,styleRecord(e.el));let t=inheritanceParent(e.el);return t===null?null:dependOn(e,styleRecord(t))}function customProps(e){if(e.customDone)return e.custom;e.customDone=!0;let t=parentRecord(e),n=t===null?null:customProps(t),r=e.decls,i=null;if(r!==null)for(let e of r.keys())isCustomPropertyName(e)&&(i??=[]).push(e);if(i===null)return e.custom=n,n;let a=n===null?/* @__PURE__ */ new Map:new Map(n);e.custom=a;let o=/* @__PURE__ */ new Map,resolve=t=>{let i=o.get(t);if(i===2)return a.get(t)??null;if(i===1)return null;let s=r.get(t);if(s===void 0)return a.get(t)??null;o.set(t,1);let c=s.toLowerCase();if(c===`revert-layer`){let n=revertLayerValue(e,t);n!==void 0&&(s=n,c=n.toLowerCase())}let l=s;return c===`initial`?l=null:c===`inherit`||c===`unset`||c===`revert`||c===`revert-layer`?l=n?.get(t)??null:containsVar(s)&&(l=substitute(s,e=>r.has(e)?resolve(e):a.get(e)??null)),o.set(t,2),l===null?a.delete(t):a.set(t,l),l};for(let e of i)resolve(e);return a}function substitute(e,t){let n=new CSSTokenizer(e),r=``,i=0;for(;;){let a=n.next();if(a===0)break;if(a!==2)continue;let o=n.value.toLowerCase();if(o!==`var`&&o!==`env`)continue;let s=n.start,c=n.end,l=1,u=-1,d=e.length,m=e.length;for(;l>0;){let e=n.next();if(e===0)break;e===2||e===21||e===19?l++:e===22||e===20?(l--,l===0&&(d=n.start,m=n.end)):e===18&&l===1&&u===-1&&(u=n.start)}let h=e.slice(c,u===-1?d:u).trim(),_=u===-1?null:e.slice(u+1,d).trim(),v=o===`var`?t(h):envValue(h);if(v===null&&_!==null&&(v=containsVar(_)?substitute(_,t):_),v===null)return null;r+=e.slice(i,s)+v,i=m}return r+e.slice(i)}function envValue(e){return e.startsWith(`safe-area-inset-`)||e.startsWith(`keyboard-inset-`)?`0px`:null}const Ml={"xx-small":9,"x-small":10,small:13,medium:16,large:18,"x-large":24,"xx-large":32,"xxx-large":48};function px(e){return formatNumber(Math.round(e*1e4)/1e4)+`px`}function parentPx(e,t,n){let r=parentRecord(e);if(r===null)return n;let i=computedValueOf(r,t),a=parseFloat(i);return Number.isNaN(a)?n:a}function rootFontSize(e){let t=e.el.doc,n=null;for(let e=t[M].first;e!==null;e=e.next)e.type===1&&(n=e);return n===null||n===e.el?16:parseFloat(computedValueOf(dependOn(e,styleRecord(n)),`font-size`))||16}function absLength(e,t,n,r){switch(t){case`px`:return e;case`em`:return e*n;case`rem`:return e*r;case`ex`:return e*n*.5;case`ch`:return e*n*.5;case`in`:return e*96;case`cm`:return e*96/2.54;case`mm`:return e*96/25.4;case`q`:return e*96/101.6;case`pt`:return e*96/72;case`pc`:return e*16}return null}function computeFontSize(e,t){let n=splitComponents(t);if(n===null||n.length!==1)return t;let r=n[0];if(r.type===1){let n=Ml[r.lower];return n===void 0?r.lower===`smaller`?px(parentPx(e,`font-size`,16)/1.2):r.lower===`larger`?px(parentPx(e,`font-size`,16)*1.2):t:px(n)}if(r.type===11)return px(parentPx(e,`font-size`,16)*r.num/100);if(r.type===12){let n=absLength(r.num,r.lower,parentPx(e,`font-size`,16),r.lower===`rem`?rootFontSize(e):16);return n===null?t:px(n)}return t}function computeFontWeight(e,t){switch(t){case`normal`:return`400`;case`bold`:return`700`;case`bolder`:{let t=parentPx(e,`font-weight`,400);return t<350?`400`:t<550?`700`:t<900?`900`:formatNumber(t)}case`lighter`:{let t=parentPx(e,`font-weight`,400);return t<100?formatNumber(t):t<550?`100`:t<750?`400`:`700`}}return t}let Nl=`specified`;function setComputedColorMode(e){Nl=e}const Pl={thin:`1px`,medium:`3px`,thick:`5px`};function borderStyleFor(e){let t=/^(border-(?:top|right|bottom|left)|outline|column-rule)-width$/.exec(e);return t===null?null:t[1]+`-style`}function computeSpecified(e,t,n){if(t===`font-size`)return computeFontSize(e,n);if(t===`font-weight`)return computeFontWeight(e,n);let r=borderStyleFor(t);if(r!==null){let t=computedValueOf(e,r);return t===`none`||t===`hidden`?`0px`:Pl[n]??n}if(grammarFor(t).types&16){if(Nl===`specified`){if(n.toLowerCase()!==`currentcolor`)return n;if(t!==`color`)return computedValueOf(e,`color`);let r=parentRecord(e);return r===null?`rgb(0, 0, 0)`:computedValueOf(r,`color`)}if(t===`color`){if(n.toLowerCase()===`currentcolor`){let t=parentRecord(e);return t===null?`rgb(0, 0, 0)`:computedValueOf(t,`color`)}return computeColor(n,`rgb(0, 0, 0)`)}return computeColor(n,n.toLowerCase().indexOf(`currentcolor`)===-1?``:computedValueOf(e,`color`))}return n}function initialValue(e,t){if(t===`display`)return`inline`;if(t===`content`&&e.pseudo!==0)return`none`;let n=propertyInfo(t);return n===void 0||n.initial===``?``:computeSpecified(e,t,n.initial)}function inheritedValue(e,t){let n=parentRecord(e);return n===null?initialValue(e,t):computedValueOf(n,t)}function resolvePending(e,t,n){let r=n.indexOf(`\0`,1),i=n.slice(1,r),a=n.slice(r+1);if(containsVar(a)&&(a=substitute(a,t=>customProps(e)?.get(t)??null)),a===null)return null;let o=a.trim().toLowerCase();if(isCSSWideKeyword(o))return o;let s=isCascadeOnlyShorthand(i)?expandCascadeShorthand(i,a):expandShorthand(i,a);if(s===null||s===Gc)return null;let c=cascadeLonghandsOf(i).indexOf(t);return c===-1?null:s[c]}function computedValueOf(e,t){if(isCustomPropertyName(t))return customProps(e)?.get(t)??``;let n=e.computed;if(n!==null){let e=n.get(t);if(e!==void 0)return e}let r,i=Cl.get(t);if(i!==void 0){let n=[];for(let t of i)n.push(computedValueOf(e,t));r=n.indexOf(``)===-1?isCascadeOnlyShorthand(t)?serializeCascadeShorthand(t,n):serializeShorthand(t,n,t!==`background`):``}else r=t===`display`?computeDisplay(e):cascadedToComputed(e,t,e.decls?.get(t));return n===null&&(e.computed=n=/* @__PURE__ */ new Map),n.set(t,r),r}function cascadedToComputed(e,t,n){let r=propertyInfo(t),i=r!==void 0&&r.inherited;if(n!==void 0&&n.charCodeAt(0)===0){let r=resolvePending(e,t,n);n=r===null?`unset`:r}else if(n!==void 0&&containsVar(n)){let r=substitute(n,t=>customProps(e)?.get(t)??null);n=r===null||normalizeLonghand(t,r)===null?`unset`:r.trim()}if(n===void 0){if(t===`direction`&&e.pseudo===0){let t=uaDirection(e.el);if(t!==``)return t}return i?inheritedValue(e,t):initialValue(e,t)}switch(n){case`inherit`:return inheritedValue(e,t);case`initial`:return initialValue(e,t);case`unset`:return i?inheritedValue(e,t):initialValue(e,t);case`revert-layer`:{let n=revertLayerValue(e,t);if(n!==void 0)return cascadedToComputed(e,t,n)}case`revert`:{let n=e.ua?.get(t);return n!==void 0&&n!==`revert`&&n!==`revert-layer`?cascadedToComputed(e,t,n):i?inheritedValue(e,t):initialValue(e,t)}}return computeSpecified(e,t,n)}function uaDirection(e){return e.ns!==`http://www.w3.org/1999/xhtml`||attr(e,`dir`)===null&&e.tag!==Y.bdi&&(e.tag!==Y.input||inputTypeName(e)!==`tel`)?``:directionality(e)===2?e.tag===Y.input&&attr(e,`dir`)===null?`ltr`:`rtl`:`ltr`}function substituteDisplay(e,t){let n=substitute(t,t=>customProps(e)?.get(t)??null);return n===null||normalizeLonghand(`display`,n)===null?`unset`:n.trim()}function computeDisplay(e){if(e.display!==``)return e.display;let t;if(e.displayLocked)t=`none`;else{let n=e.decls?.get(`display`);n!==void 0&&containsVar(n)&&(n=substituteDisplay(e,n)),n===`revert-layer`&&(n=revertLayerValue(e,`display`),n!==void 0&&containsVar(n)&&(n=substituteDisplay(e,n)));let r=e.pseudo===0?uaDisplay(e.el):`inline`;t=n===void 0||n===`revert`||n===`revert-layer`?r:n===`inherit`?inheritedValue(e,`display`):n===`initial`||n===`unset`?`inline`:n}if(e.pseudo!==0&&t!==`none`&&t!==`contents`){let n=computeDisplay(dependOn(e,styleRecord(e.el)));(n===`flex`||n===`inline-flex`||n===`grid`||n===`inline-grid`)&&(t=blockify(t))}return e.display=t,t}function blockify(e){switch(e){case`inline`:case`inline-block`:case`run-in`:return`block`;case`inline-flex`:return`flex`;case`inline-grid`:return`grid`;case`inline-table`:return`table`;case`inline-list-item`:return`list-item`}return e.startsWith(`inline `)?e.slice(7):e}function hasAuthorStyles(e){let t=existingDocCSS(e);if(t!==null){let n=currentStyleVersion(e);if(t.authorVersion===e[K]&&t.authorStyleVersion===n)return t.authorResult;let r=sheetsHaveRules(t.main);if(!r&&t.shadows!==null){let e=t.shadows.refs;for(let t of e){let n=t.deref();n===void 0?e.delete(t):sheetsHaveRules(n)&&(r=!0)}}return!r&&inlineStyleCount(e)>0&&(r=hasConnectedInlineStyle(e)),t.authorVersion=e[K],t.authorStyleVersion=n,t.authorResult=r,r}return inlineStyleCount(e)!==0&&hasAuthorStyles(docCSSFor(e))}function docCSSFor(e){return docCSS(e),e}function hasConnectedInlineStyle(e){let t=e[M];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.flags&64)return!0;return!1}function sheetsApply(e){let t=e.doc[yt];return t===null?!1:t.main.hasSheets()?!0:t.shadows!==null&&t.shadows.refs.size!==0}function plain$1(e){return!(e.flags&64)&&!sheetsApply(e)}__name(plain$1,`plain`);function computedPosition(e){return plain$1(e)?`static`:computedValueOf(styleRecord(e),`position`)}function computedDisplay(e){return plain$1(e)?uaDisplay(e):computeDisplay(styleRecord(e))}function styledDisplay(e){return plain$1(e)?null:computeDisplay(styleRecord(e))}function isDisplayNone(e){return plain$1(e)?uaDisplay(e)===`none`:computeDisplay(styleRecord(e))===`none`}function isDisplayNoneInclusive(e){for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return!0;return!1}function inheritedKeyword(e,t,n,r){if(plain$1(e)){let i=inheritanceParent(e);return i===null?r:inheritedKeyword(i,t,n,r)}let i=styleRecord(e);if(i[n]!==``)return i[n];let a=computedValueOf(i,t);return i[n]=a,a}function computedVisibility(e){return inheritedKeyword(e,`visibility`,`visibility`,`visible`)}function isVisibilityHidden(e){let t=computedVisibility(e);return t===`hidden`||t===`collapse`}function pointerEvents(e){return inheritedKeyword(e,`pointer-events`,`pointerEvents`,`auto`)}function pointerEventsNone(e){return pointerEvents(e)===`none`}function pseudoKind(e){if(e==null||e===``)return 0;let t=e.toLowerCase();return t===`::before`||t===`:before`?1:t===`::after`||t===`:after`?2:-1}function computedValue(e,t,n){let r=pseudoKind(n);if(r===-1)return``;let i=isCustomPropertyName(t)?t:t.toLowerCase();if(r===0){if(i===`display`)return computedDisplay(e);if(i===`visibility`)return computedVisibility(e);if(i===`pointer-events`)return pointerEvents(e)}return computedValueOf(recordFor(e,r),i)}function customPropertyNames(e,t){let n=pseudoKind(t);if(n===-1||plain$1(e))return Fl;let r=customProps(recordFor(e,n));return r===null?Fl:[...r.keys()].sort()}const Fl=[];function pseudoContent(e,t){if(e.doc[yt]===null||!sheetsApply(e))return``;let n=pseudoKind(t);if(n<=0)return``;let r=rootOf(e);if(r===null)return``;let i=ruleIndexFor(r,e.doc,currentStyleVersion(e.doc));return i===null||bucketsFor(i,n).size===0?``:contentText(e,computedValueOf(recordFor(e,n),`content`))}function contentText(e,t){if(t===``||t===`none`||t===`normal`)return``;let n=splitComponents(t);if(n===null)return``;let r=``;for(let t of n)if(t.type!==100){if(t.type===9&&t.value===`/`)break;if(t.type===5)r+=t.value;else if(t.type===2&&t.lower===`attr`){let n=t.text.slice(5,-1).trim().split(/\s|,/)[0];r+=attr(e,n.toLowerCase())??``}}return r}var Il=class CSSComputedStyleDeclaration extends CSSStyleDeclaration{[O];[Qn];constructor(e,t){super(null,null,null),this[O]=e,this[Qn]=t,this[nr]=!0,Ll===null&&(Ll=indexGetterTable(CSSComputedStyleDeclaration.prototype,(e,t)=>e.item(t),0)),ensureIndexGetters(Ll,computedPropertyNames().length)}get length(){if(this[Qn]===Rl)return 0;let e=computedPropertyNames().length+customNames(this[O],this[Qn]).length;return Ll!==null&&e>Ll.count&&ensureIndexGetters(Ll,e),e}item(e){if(this[Qn]===Rl)return``;let t=computedPropertyNames(),n=e>>>0;return n<t.length?t[n]:customNames(this[O],this[Qn])[n-t.length]??``}getPropertyValue(e){if(this[Qn]===Rl)return``;let t=String(e);return computedValue(this[O],isCustomPropertyName(t)?t:t.toLowerCase(),this[Qn])}getPropertyPriority(e){return``}get cssText(){return``}set cssText(e){this._checkWritable()}_syncIndices(){}};let Ll=null;const Rl=`\0invalid`;function customNames(e,t){return customPropertyNames(e,t)}function getComputedStyle(e,t){let n=e[M],r=t==null||t===``?null:String(t);if(r!==null){let e=r.toLowerCase();e.charCodeAt(0)===58?e!==`::before`&&e!==`::after`&&e!==`:before`&&e!==`:after`&&(r=Rl):r=null}if(r===null){let e=nodeCache(n);return e.computedStyle??=new Il(n,null)}return new Il(n,r)}function styleElementUpdated(e,t,n=``){return createOwnerSheet(e,t,n)}function styleElementRemoved(e,t){removeOwnerSheet(e,t)}function isRenderingHidden(e){return isDisplayNoneInclusive(e)}function contentEditableState(e){if(!(e.flags&131072))return-1;let t=contentAttr(e,`contenteditable`);if(t===null)return-1;switch(asciiLowercase$1(t)){case``:case`true`:return 1;case`false`:return 0;case`plaintext-only`:return 2}return-1}const zl=/* @__PURE__ */ new WeakSet;let Bl=!1;function isDesignModeEnabled(e){return Bl&&zl.has(e)}function setDesignModeEnabled(e,t){t?(Bl=!0,zl.add(e)):zl.delete(e)}function isDesignModeRoot(e,t){return Bl&&t.type===9&&e.ns===`http://www.w3.org/1999/xhtml`&&zl.has(t.node)}function isEditable(e){if(e.type!==1)return!1;for(let t=e;;){if(t.ns===`http://www.w3.org/1999/xhtml`){let e=contentEditableState(t);if(e===1||e===2)return!0;if(e===0)return!1}let e=t.parent;if(e===null)return!1;if(e.type!==1)return isDesignModeRoot(t,e);t=e}}function isEditingHost(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.parent;if(t!==null&&isDesignModeRoot(e,t))return!0;let n=contentEditableState(e);return n!==1&&n!==2?!1:t===null||t.type!==1||!isEditable(t)}function noteChangeDispatch(e,t){let n=t._s;n.pathLength===1&&n.type===`change`&&(e[Xr]=!0)}function hasUserValidity(e){switch(e.tag){case Y.input:case Y.textarea:case Y.select:return e.node[Xr]}return!1}function setUserValidity(e,t){switch(e.tag){case Y.input:case Y.textarea:case Y.select:e.node[Xr]=t}}let Vl=null;function setNotImplementedHandler(e){Vl=e}function notImplementedActive(){return Vl!==null}const Hl=[`navigation (except hash changes)`,`navigation to another Document`],Ul=[`window.getComputedStyle(elt, pseudoElt)`,`Window's getComputedStyle() method: with pseudo-elements`];function stubbedMethod(e,t){return[e===`Window`?`window.${t}`:`${e}.prototype.${t}`,`${e}'s ${t}() method`]}function reportNotImplemented(e,t){if(Vl===null||e===null)return;let n=e[R]?.compat;if(n!==`jsdom-26`&&n!==`jsdom-30`)return;let r=n===`jsdom-26`,i=/* @__PURE__ */ Error(`Not implemented: ${r?t[0]:t[1]}`);i.type=r?`not implemented`:`not-implemented`,Vl(i,n)}const Wl=stubbedMethod(`HTMLFormElement`,`requestSubmit`),Gl={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:``,invalid:`application/x-www-form-urlencoded`},Kl={keywords:[`get`,`post`,`dialog`],missing:``,invalid:`get`};function isSubmitButton(e){if(e.tag===Y.button)return buttonType(e)===`submit`;if(e.tag===Y.input){let t=inputType(e);return t===18||t===19}return!1}function buttonType(e){let t=attr(e,`type`);if(t!==null){let e=asciiLowercase$1(t);if(e===`reset`||e===`button`||e===`submit`)return e}return e.attrs!==null&&(attr(e,`commandfor`)!==null||attr(e,`command`)!==null)?`button`:`submit`}function defaultButton(e){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++)if(isSubmitButton(t[e]))return t[e];return null}function staticallyValidate(e){let t=e.node._controls(),n=[];for(let e=0;e<t.length;e++){let r=t[e];isSubmittable(r)&&isInvalidCandidate(validatableOf(r))&&n.push(r)}if(n.length===0)return null;let r=[];for(let e=0;e<n.length;e++)fireEvent$1(n[e].node,`invalid`,!1,!0)&&r.push(n[e]);return r}function formCheckValidity(e){return staticallyValidate(e)===null}function submitForm(e,t,n){let r=e.node;if(e.flags&1&&!r[dt]){if(!n){if(r[Gt])return;r[Gt]=!0;try{let n=r._controls();for(let e=0;e<n.length;e++)isSubmittable(n[e])&&setUserValidity(n[e],!0);if(!(t!==e&&attr(t,`formnovalidate`)!==null||attr(e,`novalidate`)!==null)&&staticallyValidate(e)!==null||!dispatchTrusted$1(r,new SubmitEvent(`submit`,{bubbles:!0,cancelable:!0,submitter:t===e?null:t.node})))return}finally{r[Gt]=!1}if(!(e.flags&1))return}ql!==null&&ql(e,t)||n||reportNotImplemented(e.doc[q],Wl)}}let ql=null;function setDialogSubmission(e){ql=e}function resetForm(e){let t=e.node;if(!t[kn]){t[kn]=!0;try{if(fireEvent$1(t,`reset`,!0,!0)){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++){let n=t[e];isFACE(n)?faceReset(n):isResettable(n)&&n.node._reset()}}}finally{t[kn]=!1}}}function blocksImplicitSubmission(e){switch(e){case 1:case 2:case 4:case 3:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:return!0}return!1}function implicitSubmission(e){let t=defaultButton(e);if(t!==null){if(isActuallyDisabled(t))return;syntheticClick(t.node);return}let n=e.node._controls(),r=0;for(let e=0;e<n.length;e++){let t=n[e];t.tag===Y.input&&blocksImplicitSubmission(inputType(t))&&r++}r>1||submitForm(e,e,!1)}function syntheticClick(e){let t=e.click;if(typeof t==`function`){t.call(e);return}let n=new Event(`click`,{bubbles:!0,cancelable:!0,composed:!0});e.dispatchEvent(n)&&e._activationBehavior?.(n)}function textareaWrappingTransformation(e,t){let n=attr(e,`wrap`);if(n===null||asciiLowercase$1(n)!==`hard`)return t;let r=e.node.cols,i=t.split(`
36
36
  `);for(let e=0;e<i.length;e++){let t=i[e];if(t.length<=r)continue;let n=``;for(;t.length>r;){let e=t.lastIndexOf(` `,r),i=e>0?e+1:r;n+=t.slice(0,i)+`
37
37
  `,t=t.slice(i)}i[e]=n+t}return i.join(`
38
- `)}const ql=/* @__PURE__ */ new WeakMap;function constructEntryList(e,t,n=null){let r=e.node;if(r[dt])return null;r[dt]=!0;let i=[];try{let r=formControls(e,[],!0);for(let e=0;e<r.length;e++){let n=r[e];if(!isSubmittable(n)||hasDatalistAncestor(n)||isActuallyDisabled(n))continue;let a=n.tag,o=a===X.input?inputType(n):-1;if((a===X.button||o===18||o===20||o===21||o===19)&&n!==t)continue;let s=n.node;if((o===15||o===16)&&!s.checked)continue;if(o===19){let e=attr(n,`name`)??``,t=e===``?``:e+`.`,r=ql.get(n);i.push([t+`x`,r===void 0?`0`:String(r.x)],[t+`y`,r===void 0?`0`:String(r.y)]);continue}if(isFACE(n)){faceEntries(n,i);continue}let c=attr(n,`name`);if(c!==null&&c!==``){if(a===X.select){let e=listOfOptions(n,[]);for(let t=0;t<e.length;t++){let n=e[t],r=n.node;r.selected&&!isActuallyDisabled(n)&&i.push([c,r.value])}}else if(o===15||o===16)i.push([c,attr(n,`value`)??`on`]);else if(o===17){let e=s.files;if(e===null||e.length===0)i.push([c,new File([],``,{type:`application/octet-stream`})]);else for(let t=0;t<e.length;t++)i.push([c,e.item(t)])}else o===0&&c.toLowerCase()===`_charset_`?i.push([c,`UTF-8`]):a===X.textarea?i.push([c,textareaWrappingTransformation(n,s.value)]):i.push([c,s.value]);if(a===X.textarea||a===X.input&&(o===1||o===2||o===0||o===18||o===20||o===3||o===4||o===5||o===6)){let e=attr(n,`dirname`);e!==null&&e!==``&&i.push([e,`ltr`])}}}n!==null&&n(i)}finally{r[dt]=!1}return i}const Jl=/* @__PURE__ */ new WeakMap;function isShadowIncludingAncestor(e,t){for(let n=t;n!==null;){let t=n.parent;if(t!==null)n=t;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else return!1;if(n===e)return!0}return!1}function attrAssociated(e,t){let n=Jl.get(e)?.get(t)?.deref();if(n!==void 0){let t=n[M],r=treeRoot(t);return r===treeRoot(e)||isShadowIncludingAncestor(r,e)?t:null}let r=contentAttr(e,t);if(r===null||r===``)return null;let i=treeRoot(e);for(let e=nextElementInTree(i,i);e!==null;e=nextElementInTree(e,i))if(e.id===r)return e;return null}function elementReflection(e,t,n){defineAccessor(e,t,function(){let e=attrAssociated(this[M],n);return e===null?null:e.node},function(e){let t=this[M],r=Jl.get(t);e==null?(r?.delete(n),removeAttribute(t,n)):(r===void 0&&Jl.set(t,r=/* @__PURE__ */ new Map),setAttribute(t,n,``),r.set(n,new WeakRef(e)))})}function installPopoverInvoker(e){elementReflection(e,`popoverTargetElement`,`popovertarget`),enumerated(e,`popoverTargetAction=popovertargetaction`,{keywords:[`toggle`,`show`,`hide`],missing:`toggle`,invalid:`toggle`})}const Yl=[`toggle-popover`,`show-popover`,`hide-popover`,`show-modal`,`close`,`request-close`];function commandState(e){let t=contentAttr(e,`command`);if(t===null)return``;if(t.startsWith(`--`))return t;let n=t.toLowerCase();return Yl.includes(n)?n:``}function installCommandInvoker(e){elementReflection(e,`commandForElement`,`commandfor`),defineAccessor(e,`command`,function(){return commandState(this[M])},function(e){setAttribute(this[M],`command`,String(e))})}function isButton(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;if(e.tag===X.button)return!0;if(e.tag!==X.input)return!1;let t=inputType(e);return t===18||t===19||t===20||t===21}function isResetButton(e){return e.tag===X.input?inputType(e)===20:e.tag===X.button&&buttonTypeAttrState(e)===`reset`}function popoverTargetElement(e){if(!isButton(e)||isActuallyDisabled(e)||formOwner(e)!==null&&(isSubmitButton(e)||isResetButton(e)))return null;let t=attrAssociated(e,`popovertarget`);return t===null||t.type!==1||popoverState(t)===0?null:t}function popoverTargetAttributeActivation(e,t){let n=popoverTargetElement(e);if(n===null||t!==null&&(t===n||isShadowIncludingAncestor(n,t))&&isShadowIncludingAncestor(e,n))return;let r=(contentAttr(e,`popovertargetaction`)??``).toLowerCase(),i=isPopoverShowing(n);if(!(r===`show`&&i)&&(r!==`hide`||i)){if(i)hidePopover(n,!0,!0,!1,e);else try{showPopover(n,!1,e)}catch{}}}function targetPopover(e){if(e.ns!==`http://www.w3.org/1999/xhtml`||e.tag!==X.button)return isButton(e)?popoverTargetElement(e):null;if(isActuallyDisabled(e))return null;let t=attrAssociated(e,`commandfor`);if(t===null)return popoverTargetElement(e);if(formOwner(e)!==null&&(isSubmitButton(e)||buttonTypeAttrState(e)!==`button`))return null;let n=commandState(e);return n!==`toggle-popover`&&n!==`hide-popover`&&n!==`show-popover`||popoverState(t)===0?null:t}function buttonTypeAttrState(e){let t=contentAttr(e,`type`)?.toLowerCase();return t===`submit`||t===`reset`||t===`button`?t:`auto`}var CommandEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t?.source??null;this.#e=n,this.#t=t?.command===void 0?``:String(t.command)}get source(){let e=this.#e;if(e===null)return null;let t=this.currentTarget;return t===null?e:retarget(e,t)}get command(){return this.#t}};setToStringTag(CommandEvent,1);function isValidCommand(e,t){return e===``?!1:e.startsWith(`--`)?!0:t.type!==1||t.ns!==`http://www.w3.org/1999/xhtml`?!1:e===`toggle-popover`||e===`show-popover`||e===`hide-popover`?!0:t.tag===X.dialog?e===`close`||e===`request-close`||e===`show-modal`:!1}let Xl=null;function setDialogCommandSteps(e){Xl=e}function popoverValid(e,t){return popoverState(e)!==0&&isPopoverShowing(e)===t&&(t||!!(e.flags&1))}function buttonInvokerActivation(e,t=null){if(e.tag!==X.button){e.tag===X.input&&popoverTargetAttributeActivation(e,t);return}if(isActuallyDisabled(e)||formOwner(e)!==null&&buttonTypeAttrState(e)===`auto`)return;let n=attrAssociated(e,`commandfor`);if(n===null){popoverTargetAttributeActivation(e,t);return}let r=commandState(e);if(!isValidCommand(r,n))return;let i={cancelable:!0,command:r,source:e.node};fireAnEvent(`command`,n.node,CommandEvent,i)&&n.flags&1&&!r.startsWith(`--`)&&(r===`hide-popover`?popoverValid(n,!0)&&hidePopover(n,!0,!0,!1,e):r===`toggle-popover`?popoverValid(n,!1)?showPopover(n,!1,e):popoverValid(n,!0)&&hidePopover(n,!0,!0,!1,e):r===`show-popover`?popoverValid(n,!1)&&showPopover(n,!1,e):n.tag===X.dialog&&n.ns===`http://www.w3.org/1999/xhtml`&&Xl?.(n,e,r))}const Zl=/* @__PURE__ */ new WeakMap;function state$3(e){let t=Zl.get(e);return t===void 0&&(t={layer:[],modals:[],openDialogs:[],watchers:[],popoverPointerdownTarget:null,dialogPointerdownTarget:null,hintStackParent:null,showingPopover:!1,hidingPopoverNestingCount:0},Zl.set(e,t),setPostDispatchHook(postDispatch)),t}__name(state$3,`state`);function styleChanged(e){e[Mr]++}function addToTopLayer(e){styleChanged(e.doc);let t=state$3(e.doc),n=t.layer.indexOf(e);n!==-1&&t.layer.splice(n,1),t.layer.push(e)}function removeFromTopLayer(e){let t=Zl.get(e.doc);if(t===void 0)return;let n=t.layer.indexOf(e);n!==-1&&t.layer.splice(n,1);let r=t.modals.indexOf(e);r!==-1&&t.modals.splice(r,1),(n!==-1||r!==-1)&&styleChanged(e.doc)}function isInTopLayer(e){return Zl.get(e.doc)?.layer.includes(e)??!1}const Ql=/* @__PURE__ */ new WeakMap;function getPreviouslyFocused(e){return Ql.get(e)??null}function setPreviouslyFocused(e,t){t===null?Ql.delete(e):Ql.set(e,t)}function setModal(e,t){if(!t){let t=Zl.get(e.doc),n=t===void 0?-1:t.modals.indexOf(e);n!==-1&&(t.modals.splice(n,1),styleChanged(e.doc));return}let n=state$3(e.doc);n.modals.includes(e)||(n.modals.push(e),styleChanged(e.doc))}function matchesModal(e){return Zl.get(e.doc)?.modals.includes(e)??!1}function openDialogsList(e){return state$3(e).openDialogs}function inertByModal(e){let t=Zl.get(e.doc);if(t===void 0||t.modals.length===0)return!1;let n=null,r=-1;for(let e=t.layer.length-1;e>=0;e--)if(t.modals.includes(t.layer[e])){n=t.layer[e],r=e;break}if(n===null)return!1;for(let i=e;i!==null;i=flatParent(i))if(i===n||t.layer.indexOf(i)>r)return!1;return!0}function flatParent(e){let t=e.parent;if(t!==null){if(t.flags&512&&t.type===1){let t=assignedSlotForEventPath(e);if(t!==null)return t}return t}if(e.flags&32){let t=e.node[j];return t===null?null:t[M]}return null}function isFlatInclusiveAncestor(e,t){for(let n=t;n!==null;n=flatParent(n))if(n===e)return!0;return!1}function isShadowIncludingInclusiveAncestor$2(e,t){for(let n=t;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$2,`isShadowIncludingInclusiveAncestor`);function isFullyActive(e){return e[J]!=null}function establishCloseWatcher(e,t,n,r){let i={cancelAction:t,closeAction:n,getEnabledState:r,isRunningCancelAction:!1,doc:e};return state$3(e).watchers.push(i),i}function destroyCloseWatcher(e){let t=Zl.get(e.doc)?.watchers,n=t===void 0?-1:t.indexOf(e);n!==-1&&t.splice(n,1)}function isActive(e){return Zl.get(e.doc)?.watchers.includes(e)??!1}function closeWatcherClose(e){isActive(e)&&e.getEnabledState()&&isFullyActive(e.doc)&&(destroyCloseWatcher(e),e.closeAction())}function requestCloseWatcher(e,t){if(!isActive(e)||!e.getEnabledState()||e.isRunningCancelAction||!isFullyActive(e.doc))return!0;e.isRunningCancelAction=!0;let n;try{n=e.cancelAction(!0)}finally{e.isRunningCancelAction=!1}return n?(closeWatcherClose(e),!0):!1}function processCloseWatchers(e){let t=Zl.get(e);return t===void 0||t.watchers.length===0?!1:(requestCloseWatcher(t.watchers[t.watchers.length-1],!0),!0)}function popoverState(e){if(e.ns!==`http://www.w3.org/1999/xhtml`||e.type!==1)return 0;let t=contentAttr(e,`popover`);return t===null?0:popoverKeyword(t)}function popoverKeyword(e){switch(e.toLowerCase()){case``:case`auto`:return 1;case`hint`:return 3}return 2}const $l=/* @__PURE__ */ new WeakMap;function record(e){let t=$l.get(e);return t===void 0&&(t={showing:!1,trigger:null,hiding:!1,openedMode:0,toggleTracker:null,closeWatcher:null},$l.set(e,t)),t}function isPopoverShowing(e){return $l.get(e)?.showing??!1}function matchesPopoverOpen(e){return($l.get(e)?.showing??!1)&&popoverState(e)!==0}function showingPopoverList(e,t){let n=[],r=Zl.get(e);if(r===void 0)return n;for(let e of r.layer){let r=$l.get(e);r!==void 0&&r.showing&&r.openedMode===t&&n.push(e)}return n}function checkPopoverValidity(e,t,n){if(popoverState(e)===0&&e!==iu)throw new DOMException(`Not supported on elements that do not have a valid value for the 'popover' attribute.`,`NotSupportedError`);if(t!==isPopoverShowing(e))return!1;if(!t&&!(e.flags&1)||!t&&!isFullyActive(e.doc)||n!==null&&e.doc!==n||e.tag===X.dialog&&matchesModal(e))throw new DOMException(`Invalid on popover elements which aren't connected, or are modal dialogs.`,`InvalidStateError`);return!0}function validity(e,t,n,r){try{return checkPopoverValidity(e,t,n)}catch(e){if(r)throw e;return!1}}function queuePopoverToggle(e,t,n,r){let i=record(e);i.toggleTracker!==null&&(t=i.toggleTracker.oldState,i.toggleTracker.cancelled=!0,i.toggleTracker=null);let a={oldState:t,cancelled:!1};i.toggleTracker=a,queueElementTask(e,()=>{a.cancelled||(fireToggleEvent(e.node,`toggle`,t,n,!1,r===null?null:r.node),i.toggleTracker===a&&(i.toggleTracker=null))})}function topmostPopoverAncestor(e,t,n){let r=e.doc,i=showingPopoverList(r,1).concat(showingPopoverList(r,3)),a=lastIndexOfAncestor(i,e),o=t===null?-1:lastIndexOfAncestor(i,t,!0),s=Math.max(a,o);return s===-1?null:i[s]}function lastIndexOfAncestor(e,t,n=!1){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i===t){if(n)return r}else if(isFlatInclusiveAncestor(i,t))return r}return-1}function topmostAutoOrHintPopover(e){let t=showingPopoverList(e,3);if(t.length!==0)return t[t.length-1];let n=showingPopoverList(e,1);return n.length===0?null:n[n.length-1]}function hidePopoverStackUntil(e,t,n,r,i){let a=showingPopoverList(e,n),o=t===null?-1:a.indexOf(t),s=o===-1?0:o+1,c=a.slice(0,s);for(let e=a.length-1;e>=s;e--)hidePopover(a[e],r,i,!1,null);let l=showingPopoverList(e,n);for(let e=l.length-1;e>=0;e--){let t=l[e];c.includes(t)||hidePopover(t,r,!1,!1,null)}}function hidePopoversUntil(e,t,n,r){let i=t!==null&&showingPopoverList(e,3).includes(t);hidePopoverStackUntil(e,t,3,n,r),hidePopoverStackUntil(e,i?Zl.get(e)?.hintStackParent??null:t,1,n,r)}function showPopover(e,t,n){let r=e.doc,i=state$3(r);if(i.showingPopover||i.hidingPopoverNestingCount!==0){if(t)throw new DOMException(`A popover is already being shown or hidden.`,`InvalidStateError`);return}if(!validity(e,!1,null,t))return;i.showingPopover=!0;let cleanupShowingSteps=()=>{i.showingPopover=!1};if(!fireToggleEvent(e.node,`beforetoggle`,`closed`,`open`,!0,n===null?null:n.node)){cleanupShowingSteps();return}try{if(!checkPopoverValidity(e,!1,r)){cleanupShowingSteps();return}}catch(e){if(cleanupShowingSteps(),t)throw e;return}let a=!1,o=popoverState(e),s=o,c=null,l=record(e);if(o===1||o===3){if(c=topmostPopoverAncestor(e,n,!0),c!==null&&$l.get(c)?.openedMode===3&&s===1&&(s=3),hidePopoverStackUntil(r,c,3,a,!0),s===1&&hidePopoverStackUntil(r,c,1,a,!0),o!==popoverState(e)){if(cleanupShowingSteps(),t)throw new DOMException(`The popover attribute changed while showing the popover.`,`InvalidStateError`);return}try{if(!checkPopoverValidity(e,!1,r)){cleanupShowingSteps();return}}catch(e){if(cleanupShowingSteps(),t)throw e;return}topmostAutoOrHintPopover(r)===null&&(a=!0),l.openedMode=s===1?1:3,l.closeWatcher=establishCloseWatcher(r,()=>!0,()=>hidePopover(e,!0,!0,!1,null),()=>!0)}setPreviouslyFocused(e,null);let u=r[A];addToTopLayer(e),s===3&&c!==null&&$l.get(c)?.openedMode===1&&(i.hintStackParent=c),l.showing=!0,l.trigger=n,popoverFocusingSteps(e),a&&popoverState(e)!==0&&setPreviouslyFocused(e,u),cleanupShowingSteps(),queuePopoverToggle(e,`closed`,`open`,n)}function hidePopover(e,t,n,r,i){if(!validity(e,!0,null,r))return;let a=e.doc,o=state$3(a),s=record(e),c=s.hiding;s.hiding=!0,c&&(n=!1),o.hidingPopoverNestingCount++;let cleanupSteps=()=>{c||(s.hiding=!1),o.hidingPopoverNestingCount--};try{let r=showingPopoverList(a,1).includes(e),c=showingPopoverList(a,3).includes(e);if((s.openedMode===1||s.openedMode===3)&&(c&&hidePopoverStackUntil(a,e,3,t,n),e===o.hintStackParent&&hidePopoverStackUntil(a,null,3,t,n),r&&hidePopoverStackUntil(a,e,1,t,n),!checkPopoverValidity(e,!0,a))||n&&(fireToggleEvent(e.node,`beforetoggle`,`open`,`closed`,!1,i===null?null:i.node),!checkPopoverValidity(e,!0,a)))return;removeFromTopLayer(e),s.trigger=null,s.openedMode=0,s.showing=!1,(e===o.hintStackParent||showingPopoverList(a,3).length===0)&&(o.hintStackParent=null),n&&queuePopoverToggle(e,`open`,`closed`,i);let l=getPreviouslyFocused(e);if(l!==null){setPreviouslyFocused(e,null);let n=a[A];t&&n!==null&&isShadowIncludingInclusiveAncestor$2(e,n)&&eu?.(l)}s.closeWatcher!==null&&(destroyCloseWatcher(s.closeWatcher),s.closeWatcher=null)}catch(e){if(r)throw e}finally{cleanupSteps()}}function popoverFocusingSteps(e){if(e.tag===X.dialog&&e.ns===`http://www.w3.org/1999/xhtml`){nu?.(e);return}let t=contentAttr(e,`autofocus`)===null?tu?.(e)??null:e;t!==null&&eu?.(t)}let eu=null,tu=null,nu=null,ru=null;function setTopLayerFocusHooks(e,t){eu=e,tu=t}function setTopLayerDialogHooks(e,t){nu=e,ru=t}function topLayerRemovingSteps(e){isPopoverShowing(e)&&popoverState(e)!==0?hidePopover(e,!1,!1,!1,null):isPopoverShowing(e)&&forceHidden(e),e.tag!==X.dialog&&removeFromTopLayer(e)}function forceHidden(e){let t=record(e);t.showing=!1,t.trigger=null,t.openedMode=0,t.closeWatcher!==null&&(destroyCloseWatcher(t.closeWatcher),t.closeWatcher=null),removeFromTopLayer(e);let n=Zl.get(e.doc);n!==void 0&&(e===n.hintStackParent||showingPopoverList(e.doc,3).length===0)&&(n.hintStackParent=null)}let iu=null;function popoverAttributeChanged(e,t,n){if(!isPopoverShowing(e))return;let r=t===null?0:popoverKeyword(t),i=n===null?0:popoverKeyword(n);if(r===i)return;let a=iu;i===0&&(iu=e);try{hidePopover(e,!0,!0,!1,null)}finally{iu=a}isPopoverShowing(e)&&popoverState(e)===0&&forceHidden(e)}function nearestInclusiveOpenPopover(e){for(let t=e;t!==null;t=flatParent(t)){let e=$l.get(t);if(e!==void 0&&e.showing&&(e.openedMode===1||e.openedMode===3))return t}return null}function nearestInclusiveTargetPopover(e){for(let t=e;t!==null;t=flatParent(t)){if(t.type!==1)continue;let e=targetPopover(t);if(e!==null&&isPopoverShowing(e)){let t=popoverState(e);if(t===1||t===3)return e}}return null}function popoverStackPosition(e){if(e===null)return 0;let t=showingPopoverList(e.doc,3),n=showingPopoverList(e.doc,1),r=t.indexOf(e);if(r!==-1)return r+n.length+1;let i=n.indexOf(e);return i===-1?0:i+1}function topmostClickedPopover(e){let t=nearestInclusiveOpenPopover(e),n=nearestInclusiveTargetPopover(e);return popoverStackPosition(t)>popoverStackPosition(n)?t:n}function lightDismissOpenPopovers(e,t,n,r){if(topmostAutoOrHintPopover(e)===null)return;if(r===`pointerdown`){t.popoverPointerdownTarget=topmostClickedPopover(n);return}let i=topmostClickedPopover(n),a=i===t.popoverPointerdownTarget;t.popoverPointerdownTarget=null,a&&hidePopoversUntil(e,i,!1,!0)}function postDispatch(e,t){let n=e.type;if(n!==`pointerdown`&&n!==`pointerup`&&n!==`keydown`)return;let r=t?.[M];if(r===void 0)return;let i=r.doc,a=Zl.get(i);if(a!==void 0){if(n===`keydown`){if(e.key!==`Escape`||e.defaultPrevented||!isFullyActive(i))return;processCloseWatchers(i)}else r.flags&1&&(lightDismissOpenPopovers(i,a,r,n),ru?.(i,r,n))}}function dialogPointerdownTarget(e,t){let n=state$3(e);return t!==void 0&&(n.dialogPointerdownTarget=t),n.dialogPointerdownTarget}let au=null;function setNestedWindowFactory(e){au=e}const ou=/* @__PURE__ */ new WeakMap;function frameContentWindow(e){return ou.get(e)??null}function frameConnected(e){if(au===null||ou.has(e))return;let t=e[M].doc[J];if(t===null||t[ot])return;let n=e[M],r=au(e,t,attr(n,`src`),attr(n,`srcdoc`));ou.set(e,r),t._task(()=>{ou.get(e)===r&&e.dispatchEvent(new Event(`load`))},0)}function frameDisconnected(e){let t=ou.get(e);t!==void 0&&(ou.delete(e),t.close())}function isCharacterData(e){let t=e.type;return t===3||t===4||t===8||t===7}function isText(e){return e.type===3||e.type===4}function nodeLength(e){switch(e.type){case 10:case 2:return 0;case 3:case 4:case 8:case 7:return e.data.length;default:return e.childCount}}function toNodeImpl(e,t,n=`Range`){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute '${t}' on '${n}': parameter 1 is not of type 'Node'.`);return e[M]}function compareBoundaryPoints(e,t,n,r){if(e===n)return t===r?0:t<r?-1:1;let i=0;for(let t=e.parent;t!==null;t=t.parent)i++;let a=0;for(let e=n.parent;e!==null;e=e.parent)a++;let o=e,s=n,c=null,l=null;for(;i>a;)c=o,o=o.parent,i--;for(;a>i;)l=s,s=s.parent,a--;for(;o!==s;)c=o,o=o.parent,l=s,s=s.parent;if(o===e)return indexOf(l)<t?1:-1;if(o===n)return indexOf(c)<r?-1:1;for(let e=c.next;e!==null;e=e.next)if(e===l)return-1;return 1}function childOfAncestor(e,t){let n=e;for(;n.parent!==t;)n=n.parent;return n}function commonAncestor(e,t){let n=e;for(;!isInclusiveAncestor(n,t);)n=n.parent;return n}var AbstractRange=class{[U];[G];[D];[k];[an];constructor(e,t,n,r){this[U]=e,this[G]=t,this[D]=n,this[k]=r,this[an]=null}get startContainer(){return this[U].node}get startOffset(){return this[G]}get endContainer(){return this[D].node}get endOffset(){return this[k]}get collapsed(){return this[U]===this[D]&&this[G]===this[k]}},StaticRange=class extends AbstractRange{constructor(e){if(typeof e!=`object`||!e)throw TypeError(`Failed to construct 'StaticRange': 1 argument required.`);for(let t of[`startContainer`,`startOffset`,`endContainer`,`endOffset`])if(e[t]===void 0)throw TypeError(`Failed to construct 'StaticRange': required member ${t} is undefined.`);let t=toNodeImpl(e.startContainer,`constructor`,`StaticRange`),n=toNodeImpl(e.endContainer,`constructor`,`StaticRange`);if(t.type===10||t.type===2||n.type===10||n.type===2)throw new DOMException(`Failed to construct 'StaticRange': Invalid boundary container.`,`InvalidNodeTypeError`);super(t,Number(e.startOffset)>>>0,n,Number(e.endOffset)>>>0)}},su=class Range extends AbstractRange{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;constructor(e){let t=(e??currentDocument())[M];super(t,0,t,0),registerLiveRange(this)}static _create(e,t,n,r,i){let a=new Range(e);return a[U]=t,a[G]=n,a[D]=r,a[k]=i,refileRange(a),a}_treeRoot(){return treeRoot(this[U])}get commonAncestorContainer(){return commonAncestor(this[U],this[D]).node}_setStart(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`);(treeRoot(e)!==this._treeRoot()||compareBoundaryPoints(e,t,this[D],this[k])>0)&&(this[D]=e,this[k]=t),this[U]=e,this[G]=t,refileRange(this)}_setEnd(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`);(treeRoot(e)!==this._treeRoot()||compareBoundaryPoints(e,t,this[U],this[G])<0)&&(this[U]=e,this[G]=t),this[D]=e,this[k]=t,refileRange(this)}setStart(e,t){this._setStart(toNodeImpl(e,`setStart`),Number(t)>>>0)}setEnd(e,t){this._setEnd(toNodeImpl(e,`setEnd`),Number(t)>>>0)}setStartBefore(e){let t=toNodeImpl(e,`setStartBefore`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setStart(n,indexOf(t))}setStartAfter(e){let t=toNodeImpl(e,`setStartAfter`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setStart(n,indexOf(t)+1)}setEndBefore(e){let t=toNodeImpl(e,`setEndBefore`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setEnd(n,indexOf(t))}setEndAfter(e){let t=toNodeImpl(e,`setEndAfter`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setEnd(n,indexOf(t)+1)}collapse(e=!1){e?(this[D]=this[U],this[k]=this[G]):(this[U]=this[D],this[G]=this[k])}_select(e){let t=e.parent;if(t===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);let n=indexOf(e);this[U]=t,this[G]=n,this[D]=t,this[k]=n+1,refileRange(this)}selectNode(e){this._select(toNodeImpl(e,`selectNode`))}_selectContents(e){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);this[U]=e,this[G]=0,this[D]=e,this[k]=nodeLength(e),refileRange(this)}selectNodeContents(e){this._selectContents(toNodeImpl(e,`selectNodeContents`))}compareBoundaryPoints(e,t){let n=Number(e)>>>0&65535;if(n>3)throw new DOMException(`The comparison method provided must be one of 'START_TO_START', 'START_TO_END', 'END_TO_END', or 'END_TO_START'.`,`NotSupportedError`);if(!(t instanceof Range))throw TypeError(`Failed to execute 'compareBoundaryPoints' on 'Range': parameter 2 is not of type 'Range'.`);if(this._treeRoot()!==t._treeRoot())throw new DOMException(`The two Ranges are not in the same tree.`,`WrongDocumentError`);switch(n){case 0:return compareBoundaryPoints(this[U],this[G],t[U],t[G]);case 1:return compareBoundaryPoints(this[D],this[k],t[U],t[G]);case 2:return compareBoundaryPoints(this[D],this[k],t[D],t[k]);default:return compareBoundaryPoints(this[U],this[G],t[D],t[k])}}_contains(e){return compareBoundaryPoints(e,0,this[U],this[G])>0&&compareBoundaryPoints(e,nodeLength(e),this[D],this[k])<0}deleteContents(){if(this.collapsed)return;let e=this[U],t=this[G],n=this[D],r=this[k];if(e===n&&isCharacterData(e)){replaceData(e,t,r-t,``);return}let i=containedNodes(this,!0),a,o;if(isInclusiveAncestor(e,n))a=e,o=t;else{let t=e;for(;t.parent!==null&&!isInclusiveAncestor(t.parent,n);)t=t.parent;a=t.parent,o=indexOf(t)+1}isCharacterData(e)&&replaceData(e,t,e.data.length-t,``);for(let e=0;e<i.length;e++){let t=i[e];t.parent!==null&&remove(t,!1)}isCharacterData(n)&&replaceData(n,0,r,``),this[U]=this[D]=a,this[G]=this[k]=o}extractContents(){return extract(this,this[U],this[G],this[D],this[k]).node}cloneContents(){return cloneContents(this[U],this[G],this[D],this[k]).node}insertNode(e){insertIntoRange(this,toNodeImpl(e,`insertNode`))}surroundContents(e){let t=toNodeImpl(e,`surroundContents`),n=commonAncestor(this[U],this[D]);for(let e=this[U];e!==n;e=e.parent)if(!isText(e)&&!isInclusiveAncestor(e,this[D]))throw new DOMException(`The Range has partially selected a non-Text node.`,`InvalidStateError`);for(let e=this[D];e!==n;e=e.parent)if(!isText(e)&&!isInclusiveAncestor(e,this[U]))throw new DOMException(`The Range has partially selected a non-Text node.`,`InvalidStateError`);let r=t.type;if(r===9||r===10||r===11)throw new DOMException(`The node provided is a Document, DocumentType or DocumentFragment.`,`InvalidNodeTypeError`);let i=extract(this,this[U],this[G],this[D],this[k]);t.first!==null&&replaceAll(null,t),insertIntoRange(this,t),append(i,t),this._select(t)}cloneRange(){return Range._create(this[U].doc,this[U],this[G],this[D],this[k])}detach(){}isPointInRange(e,t){let n=toNodeImpl(e,`isPointInRange`),r=Number(t)>>>0;if(treeRoot(n)!==this._treeRoot())return!1;if(n.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(r>nodeLength(n))throw new DOMException(`There is no child at offset ${r}.`,`IndexSizeError`);return compareBoundaryPoints(n,r,this[U],this[G])>=0&&compareBoundaryPoints(n,r,this[D],this[k])<=0}comparePoint(e,t){let n=toNodeImpl(e,`comparePoint`),r=Number(t)>>>0;if(treeRoot(n)!==this._treeRoot())throw new DOMException(`The node provided and the Range are not in the same tree.`,`WrongDocumentError`);if(n.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(r>nodeLength(n))throw new DOMException(`There is no child at offset ${r}.`,`IndexSizeError`);return compareBoundaryPoints(n,r,this[U],this[G])<0?-1:+(compareBoundaryPoints(n,r,this[D],this[k])>0)}intersectsNode(e){let t=toNodeImpl(e,`intersectsNode`);if(treeRoot(t)!==this._treeRoot())return!1;let n=t.parent;if(n===null)return!0;let r=indexOf(t);return compareBoundaryPoints(n,r,this[D],this[k])<0&&compareBoundaryPoints(n,r+1,this[U],this[G])>0}toString(){let e=this[U],t=this[D];if(e===t&&isText(e))return e.data.slice(this[G],this[k]);let n=``;isText(e)&&(n+=e.data.slice(this[G]));let r=treeRoot(e),i=isCharacterData(t)?t:afterBoundary(t,this[k],r);for(let t=afterBoundary(e,this[G],r);t!==null&&t!==i;t=nextInTree(t,r))isText(t)&&(n+=t.data);return isText(t)&&(n+=t.data.slice(0,this[k])),n}createContextualFragment(e){if(arguments.length===0)throw TypeError(`Failed to execute 'createContextualFragment' on 'Range': 1 argument required, but only 0 present.`);let t=this[U],n;switch(t.type){case 9:case 11:n=null;break;case 1:n=t;break;default:{let e=t.parent;n=e!==null&&e.type===1?e:null}}return(n===null||n.name===`html`&&n.ns===`http://www.w3.org/1999/xhtml`&&n.flags&2)&&(n=t.doc.createElement(`body`)[M]),parseFragment(String(e),n).node}getClientRects(){return new DOMRectList}getBoundingClientRect(){return new Mo}};for(let[e,t]of[[`START_TO_START`,0],[`START_TO_END`,1],[`END_TO_END`,2],[`END_TO_START`,3]])Object.defineProperty(su.prototype,e,{value:t,enumerable:!0});Object.defineProperty(AbstractRange.prototype,Symbol.toStringTag,{value:`AbstractRange`,configurable:!0}),Object.defineProperty(su.prototype,Symbol.toStringTag,{value:`Range`,configurable:!0}),Object.defineProperty(StaticRange.prototype,Symbol.toStringTag,{value:`StaticRange`,configurable:!0});function afterBoundary(e,t,n){if(!isCharacterData(e)){let n=childAt(e,t);if(n!==null)return n}return nextSkippingChildren(e,n)}function containedNodes(e,t){let n=[],r=treeRoot(e[U]),i=isCharacterData(e[D])?e[D]:afterBoundary(e[D],e[k],r),a=afterBoundary(e[U],e[G],r);for(;a!==null&&a!==i;)e._contains(a)?(n.push(a),a=t?nextSkippingChildren(a,r):nextInTree(a,r)):a=nextInTree(a,r);return n}function rangeContents(e,t,n,r){let i=commonAncestor(e,n),a=isInclusiveAncestor(e,n)?null:childOfAncestor(e,i),o=isInclusiveAncestor(n,e)?null:childOfAncestor(n,i),s=[],c=a===null?childAt(i,t):a.next,l=o===null?childAt(i,r):o;for(;c!==null&&c!==l;c=c.next){if(c.type===10)throw new DOMException(`A DocumentType node cannot be extracted.`,`HierarchyRequestError`);s.push(c)}return{first:a,last:o,contained:s}}function cloneWithData(e,t){let n=cloneNode(e,e.doc,!1);return n.data=t,n}function extract(e,t,n,r,i){let a=t.doc.createDocumentFragment()[M];if(t===r&&n===i)return a;if(t===r&&isCharacterData(t))return append(cloneWithData(t,t.data.slice(n,i)),a),replaceData(t,n,i-n,``),a;let{first:o,last:s,contained:c}=rangeContents(t,n,r,i),l,u;if(isInclusiveAncestor(t,r))l=t,u=n;else{let e=t;for(;e.parent!==null&&!isInclusiveAncestor(e.parent,r);)e=e.parent;l=e.parent,u=indexOf(e)+1}if(o!==null){if(isCharacterData(o))append(cloneWithData(t,t.data.slice(n)),a),replaceData(t,n,t.data.length-n,``);else{let e=cloneNode(o,o.doc,!1);append(e,a),append(extract(null,t,n,o,nodeLength(o)),e)}}for(let e=0;e<c.length;e++)append(c[e],a);if(s!==null){if(isCharacterData(s))append(cloneWithData(r,r.data.slice(0,i)),a),replaceData(r,0,i,``);else{let e=cloneNode(s,s.doc,!1);append(e,a),append(extract(null,s,0,r,i),e)}}return e!==null&&(e[U]=e[D]=l,e[G]=e[k]=u),a}function cloneContents(e,t,n,r){let i=e.doc.createDocumentFragment()[M];if(e===n&&t===r)return i;if(e===n&&isCharacterData(e))return append(cloneWithData(e,e.data.slice(t,r)),i),i;let{first:a,last:o,contained:s}=rangeContents(e,t,n,r);if(a!==null){if(isCharacterData(a))append(cloneWithData(e,e.data.slice(t)),i);else{let n=cloneNode(a,a.doc,!1);append(n,i),append(cloneContents(e,t,a,nodeLength(a)),n)}}for(let e=0;e<s.length;e++)append(cloneNode(s[e],s[e].doc,!0),i);if(o!==null){if(isCharacterData(o))append(cloneWithData(n,n.data.slice(0,r)),i);else{let e=cloneNode(o,o.doc,!1);append(e,i),append(cloneContents(o,0,n,r),e)}}return i}function insertIntoRange(e,t){let n=e[U],r=e[G];if(n.type===7||n.type===8||isText(n)&&n.parent===null||n===t)throw new DOMException(`The Range's start node cannot contain the inserted node.`,`HierarchyRequestError`);let i=isText(n)?n:childAt(n,r),a=i===null?n:i.parent;ensurePreInsertionValidity(t,a,i),isText(n)&&(i=splitText(n,r)),t===i&&(i=i.next),t.parent!==null&&remove(t,!1);let o=i===null?nodeLength(a):indexOf(i);o+=t.type===11?nodeLength(t):1,preInsert(t,a,i),e.collapsed&&(e[D]=a,e[k]=o)}const cu=Object.freeze({FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048});function rootImpl(e,t){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'create${t}' on 'Document': parameter 1 is not of type 'Node'.`);return e[M]}var Traverser=class{[cr];[$r];[Wt];[Re];constructor(e,t,n){this[cr]=e,this[$r]=Number(t)>>>0,this[Wt]=n===void 0?null:n,this[Re]=!1}get root(){return this[cr].node}get whatToShow(){return this[$r]}get filter(){return this[Wt]}_filterNode(e){if(this[Re])throw new DOMException(`Recursive node filtering is not allowed.`,`InvalidStateError`);if(!(this[$r]&1<<e.type-1))return 3;let t=this[Wt];if(t===null)return 1;this[Re]=!0;let n;try{if(typeof t==`function`)n=t.call(void 0,e.node);else{let r=t.acceptNode;if(typeof r!=`function`)throw TypeError(`NodeFilter.acceptNode is not a function.`);n=r.call(t,e.node)}}finally{this[Re]=!1}return Number(n)>>>0&65535}},NodeIterator=class extends Traverser{[or];[Hn];[gn];constructor(e,t=4294967295,n=null){let r=rootImpl(e,`NodeIterator`);super(r,t,n),this[or]=r,this[Hn]=!0,this[gn]=null,registerNodeIterator(this)}get referenceNode(){return this[or].node}get pointerBeforeReferenceNode(){return this[Hn]}#e(e){let t=this[cr],n={[cr]:t,[or]:this[or],[Hn]:this[Hn],[gn]:null};this[gn]=n;try{for(;;){let r=n[or],i=n[Hn];if(e){if(i)i=!1;else{let e=nextInTree(r,t);if(e===null)return null;r=e}}else if(i){let e=previousInTree(r,t);if(e===null)return null;r=e}else i=!0;if(n[or]=r,n[Hn]=i,this._filterNode(r)===1)return this[or]=n[or],this[Hn]=n[Hn],r.node}}finally{this[gn]=null}}nextNode(){return this.#e(!0)}previousNode(){return this.#e(!1)}detach(){}},TreeWalker=class extends Traverser{[bt];constructor(e,t=4294967295,n=null){let r=rootImpl(e,`TreeWalker`);super(r,t,n),this[bt]=r}get currentNode(){return this[bt].node}set currentNode(e){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to set the 'currentNode' property on 'TreeWalker': The provided value is not of type 'Node'.`);this[bt]=e[M]}parentNode(){let e=this[bt];for(;e!==null&&e!==this[cr];)if(e=e.parent,e!==null&&this._filterNode(e)===1)return this[bt]=e,e.node;return null}#e(e){let t=e?this[bt].first:this[bt].last;for(;t!==null;){let n=this._filterNode(t);if(n===1)return this[bt]=t,t.node;if(n===3){let n=e?t.first:t.last;if(n!==null){t=n;continue}}for(;t!==null;){let n=e?t.next:t.prev;if(n!==null){t=n;break}let r=t.parent;if(r===null||r===this[cr]||r===this[bt])return null;t=r}}return null}firstChild(){return this.#e(!0)}lastChild(){return this.#e(!1)}#t(e){let t=this[bt];if(t===this[cr])return null;for(;;){let n=e?t.next:t.prev;for(;n!==null;){t=n;let r=this._filterNode(t);if(r===1)return this[bt]=t,t.node;n=e?t.first:t.last,(r===2||n===null)&&(n=e?t.next:t.prev)}let r=t.parent;if(r===null||r===this[cr]||(t=r,this._filterNode(t)===1))return null}}nextSibling(){return this.#t(!0)}previousSibling(){return this.#t(!1)}previousNode(){let e=this[bt];for(;e!==this[cr];){let t=e.prev;for(;t!==null;){e=t;let n=this._filterNode(e);for(;n!==2&&e.first!==null;)e=e.last,n=this._filterNode(e);if(n===1)return this[bt]=e,e.node;t=e.prev}let n=e.parent;if(e===this[cr]||n===null)return null;if(e=n,this._filterNode(e)===1)return this[bt]=e,e.node}return null}nextNode(){let e=this[bt],t=1;for(;;){for(;t!==2&&e.first!==null;)if(e=e.first,t=this._filterNode(e),t===1)return this[bt]=e,e.node;let n=null,r=e;for(;r!==null;){if(r===this[cr])return null;if(n=r.next,n!==null){e=n;break}r=r.parent}if(r===null)return null;if(t=this._filterNode(e),t===1)return this[bt]=e,e.node}}};Object.defineProperty(NodeIterator.prototype,Symbol.toStringTag,{value:`NodeIterator`,configurable:!0}),Object.defineProperty(TreeWalker.prototype,Symbol.toStringTag,{value:`TreeWalker`,configurable:!0});function toImpl(e,t){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute '${t}' on 'Selection': parameter 1 is not of type 'Node'.`);return e[M]}function arity(e,t,n){if(e<t)throw TypeError(`Failed to execute '${n}' on 'Selection': ${t} argument${t===1?``:`s`} required, but only ${e} present.`)}function checkBoundary(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`)}var Selection=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=null,this.#n=0,this.#r=!1}#i(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[j];if(e===null)return!1;t=treeRoot(e[M])}return t===this.#e[M]}#a(e,t){let n=this.#t;this.#t=e,this.#n=t,n!==e&&(n===null||e===null||n[U]!==e[U]||n[G]!==e[G]||n[D]!==e[D]||n[k]!==e[k])&&this.#o()}#o(){this.#r||(this.#r=!0,queueUserAgentTask(()=>{this.#r=!1;let e=this.#e.defaultView;e!==null&&e.closed!==!0&&fireAnEvent(`selectionchange`,this.#e)}))}get anchorNode(){let e=this.#t;return e===null?null:(this.#n===2?e[D]:e[U]).node}get anchorOffset(){let e=this.#t;return e===null?0:this.#n===2?e[k]:e[G]}get focusNode(){let e=this.#t;return e===null?null:(this.#n===2?e[U]:e[D]).node}get focusOffset(){let e=this.#t;return e===null?0:this.#n===2?e[G]:e[k]}get isCollapsed(){let e=this.#t;return e===null||e.collapsed}get rangeCount(){return this.#t===null?0:1}get type(){let e=this.#t;return e===null?`None`:e.collapsed?`Caret`:`Range`}get direction(){let e=this.#t;return e===null||e.collapsed||this.#n===0?`none`:this.#n===2?`backward`:`forward`}getRangeAt(e){let t=this.#t;if(Number(e)!==0||t===null)throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (${this.rangeCount}).`,`IndexSizeError`);return t}addRange(e){if(arity(arguments.length,1,`addRange`),!(e instanceof su))throw TypeError(`Failed to execute 'addRange' on 'Selection': parameter 1 is not of type 'Range'.`);e._treeRoot()===this.#e[M]&&this.#t===null&&this.#a(e,1)}removeRange(e){if(arity(arguments.length,1,`removeRange`),!(e instanceof su))throw TypeError(`Failed to execute 'removeRange' on 'Selection': parameter 1 is not of type 'Range'.`);if(e!==this.#t)throw new DOMException(`The given range isn't in document.`,`NotFoundError`);this.#a(null,0)}removeAllRanges(){this.#a(null,0)}empty(){this.removeAllRanges()}collapse(e,t=0){if(arity(arguments.length,1,`collapse`),e===null){this.removeAllRanges();return}let n=toImpl(e,`collapse`),r=Number(t)>>>0;if(checkBoundary(n,r),!this.#i(n))return;let i=new su(this.#e);i._setStart(n,r),i._setEnd(n,r),this.#a(i,1)}setPosition(e,t=0){arity(arguments.length,1,`setPosition`),this.collapse(e,t)}collapseToStart(){let e=this.#t;if(e===null)throw new DOMException(`There is no selection to collapse.`,`InvalidStateError`);let t=new su(this.#e);t._setStart(e[U],e[G]),t._setEnd(e[U],e[G]),this.#a(t,1)}collapseToEnd(){let e=this.#t;if(e===null)throw new DOMException(`There is no selection to collapse.`,`InvalidStateError`);let t=new su(this.#e);t._setStart(e[D],e[k]),t._setEnd(e[D],e[k]),this.#a(t,1)}extend(e,t=0){arity(arguments.length,1,`extend`);let n=toImpl(e,`extend`),r=Number(t)>>>0;if(!this.#i(n))return;let i=this.#t;if(i===null)throw new DOMException(`This Selection object doesn't have any Ranges.`,`InvalidStateError`);checkBoundary(n,r);let a=this.#n===2?i[D]:i[U],o=this.#n===2?i[k]:i[G],s=new su(this.#e);treeRoot(n)===i._treeRoot()?compareBoundaryPoints(a,o,n,r)<=0?(s._setStart(a,o),s._setEnd(n,r)):(s._setStart(n,r),s._setEnd(a,o)):(s._setStart(n,r),s._setEnd(n,r));let c=treeRoot(n)===treeRoot(a)&&compareBoundaryPoints(n,r,a,o)<0;this.#a(s,c?2:1)}setBaseAndExtent(e,t,n,r){arity(arguments.length,4,`setBaseAndExtent`);let i=toImpl(e,`setBaseAndExtent`),a=toImpl(n,`setBaseAndExtent`),o=Number(t)>>>0,s=Number(r)>>>0;if(checkBoundary(i,o),checkBoundary(a,s),!this.#i(i)||!this.#i(a))return;let c=new su(this.#e),l=compareBoundaryPoints(a,s,i,o)<0;l?(c._setStart(a,s),c._setEnd(i,o)):(c._setStart(i,o),c._setEnd(a,s)),this.#a(c,l?2:1)}selectAllChildren(e){let t=toImpl(e,`selectAllChildren`);if(t.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(!this.#i(t))return;let n=new su(this.#e);n._setStart(t,0),n._setEnd(t,t.childCount),this.#a(n,1)}deleteFromDocument(){this.#t?.deleteContents()}containsNode(e,t=!1){arity(arguments.length,1,`containsNode`);let n=toImpl(e,`containsNode`),r=this.#t;if(r===null||!this.#i(n)||treeRoot(n)!==r._treeRoot())return!1;let i=nodeLength(n);return t?compareBoundaryPoints(r[U],r[G],n,i)<=0&&compareBoundaryPoints(r[D],r[k],n,0)>=0:compareBoundaryPoints(r[U],r[G],n,0)<=0&&compareBoundaryPoints(r[D],r[k],n,i)>=0}getComposedRanges(...e){let t=this.#t;return t===null?[]:[new StaticRange({startContainer:t[U].node,startOffset:t[G],endContainer:t[D].node,endOffset:t[k]})]}modify(e,t,n){}toString(){let e=this.#t;return e===null?``:e.toString()}};Object.defineProperty(Selection.prototype,Symbol.toStringTag,{value:`Selection`,configurable:!0});const lu={__proto__:null,beforeunloadevent:BeforeUnloadEvent,compositionevent:CompositionEvent,customevent:CustomEvent,devicemotionevent:null,deviceorientationevent:null,dragevent:DragEvent,event:Event,events:Event,focusevent:FocusEvent,hashchangeevent:HashChangeEvent,htmlevents:Event,keyboardevent:KeyboardEvent,messageevent:MessageEvent,mouseevent:MouseEvent,mouseevents:MouseEvent,storageevent:StorageEvent,svgevents:Event,textevent:TextEvent,touchevent:TouchEvent,uievent:UIEvent,uievents:UIEvent};function createEvent(e){let t=lu[String(e).replace(/[A-Z]/g,e=>e.toLowerCase())];if(t==null)throw new DOMException(`Failed to execute 'createEvent' on 'Document': The provided event type ('${e}') is invalid.`,`NotSupportedError`);let n=withInternalConstruct(()=>new t(``));return n._s.flags&=-33,n}var Z=class Document extends Node{[J];[q];[Mr];[dn];[A];[N];[ft];[K];[jn];[fn];[yt];[ni];[xr];[Qn];[Pt];[qt];[Le];[Ge];[Ke];[qe];[We];constructor(){super(9,null),this[M].flags|=1,this[J]=null,this[q]=0,this[Mr]=0,this[dn]=/* @__PURE__ */ new Map,this[A]=null,this[N]=!1,this[ft]=`application/xml`,this[K]=`about:blank`,this[jn]=`no-quirks`,this[fn]=null,this[yt]=null,this[ni]=null,this[xr]=null,this[qt]=null,this[Qn]=null,this[Pt]=null,this[Le]=null,this[Ge]=null,this[Ke]=``,this[qe]=-1,this[We]=``,hideInternals(this)}static _createHTML(e,t=`about:blank`){let n=new Document;return n[J]=e,n[N]=!0,n[ft]=`text/html`,n[K]=t,n}_idAdd(e){let t=e.id,n=this[dn].get(t);n===void 0?this[dn].set(t,e):Array.isArray(n)?n.push(e):this[dn].set(t,[n,e])}_idRemove(e){let t=e.id,n=this[dn].get(t);if(n!==void 0){if(n===e)this[dn].delete(t);else if(Array.isArray(n)){let r=n.indexOf(e);r!==-1&&n.splice(r,1),n.length===1&&this[dn].set(t,n[0])}}}_idLookup(e){let t=this[dn].get(e);if(t===void 0)return null;if(!Array.isArray(t))return t;let n=this[M];for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))if(t.id===e)return t;return null}get URL(){return this[K]}get documentURI(){return this[K]}get baseURI(){if(this[qe]===this[q]&&this[We]===this[K])return this[Ke];let e=documentBaseURL(this);return this[Ke]=e,this[qe]=this[q],this[We]=this[K],e}get compatMode(){return this[jn]===`quirks`?`BackCompat`:`CSS1Compat`}get characterSet(){return`UTF-8`}get charset(){return`UTF-8`}get inputEncoding(){return`UTF-8`}get contentType(){return this[ft]}get defaultView(){return this[J]}get implementation(){return this[fn]??=new DOMImplementation(this)}get doctype(){for(let e=this[M].first;e!==null;e=e.next)if(e.type===10)return e.node;return null}get documentElement(){let e=firstElementChild(this[M]);return e===null?null:e.node}get head(){let e=firstElementChild(this[M]);if(e===null||e.tag!==X.html)return null;for(let t=e.first;t!==null;t=t.next)if(t.type===1&&t.tag===X.head)return t.node;return null}get body(){let e=firstElementChild(this[M]);if(e===null||e.tag!==X.html)return null;for(let t=e.first;t!==null;t=t.next)if(t.type===1&&(t.tag===X.body||t.tag===X.frameset))return t.node;return null}set body(e){let t=e==null?null:e[M];if(t===null||t.ns!==`http://www.w3.org/1999/xhtml`||t.tag!==X.body&&t.tag!==X.frameset)throw new DOMException(`The new body element must be a 'body' or 'frameset' element.`,`HierarchyRequestError`);let n=this.body;if(e===n)return;if(n!==null){n.parentNode.replaceChild(e,n);return}let r=this.documentElement;if(r===null)throw new DOMException(`The document has no document element.`,`HierarchyRequestError`);r.appendChild(e)}createElement(e,t){let n=String(e);if(!isValidElementLocalName(n))throw new DOMException(`"${n}" is not a valid element name.`,`InvalidCharacterError`);this[N]&&(n=asciiLowercase$1(n));let r=this[N]||this[ft]===`application/xhtml+xml`?ie:null,i=typeof t==`object`&&t&&t.is!==void 0?String(t.is):null;return createElementImplSync(this,n,r,null,i).node}createElementNS(e,t,n){let{namespace:r,prefix:i,localName:a}=validateAndExtract(e===void 0?null:e,String(t),`element`),o=typeof n==`object`&&n&&n.is!==void 0?String(n.is):null;return createElementImplSync(this,a,r,i,o).node}createDocumentFragment(){return new DocumentFragment(this)}createTextNode(e){return new Text(String(e),this)}createCDATASection(e){if(this[N])throw new DOMException(`CDATA sections are not supported in HTML documents.`,`NotSupportedError`);if(String(e).includes(`]]>`))throw new DOMException(`Data contains "]]>".`,`InvalidCharacterError`);return new CDATASection(String(e),this)}createComment(e){return new Comment(String(e),this)}createProcessingInstruction(e,t){if(!isXMLName(String(e)))throw new DOMException(`"${e}" is not a valid processing instruction target.`,`InvalidCharacterError`);if(String(t).includes(`?>`))throw new DOMException(`Data contains "?>".`,`InvalidCharacterError`);return new ProcessingInstruction(String(e),String(t),this)}createAttribute(e){let t=String(e);if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);return this[N]&&(t=asciiLowercase$1(t)),new Attr(this,t,``,null,null,null)}createAttributeNS(e,t){let{namespace:n,prefix:r,localName:i}=validateAndExtract(e===void 0?null:e,String(t),`attribute`);return new Attr(this,i,``,n,r,null)}importNode(e,t=!1){if(e[M].type===9||e[M].flags&32)throw new DOMException(`Documents and shadow roots cannot be imported.`,`NotSupportedError`);return cloneNode(e[M],this,t).node}adoptNode(e){if(e[M].type===9)throw new DOMException(`Documents cannot be adopted.`,`NotSupportedError`);if(e[M].flags&32)throw new DOMException(`Shadow roots cannot be adopted.`,`HierarchyRequestError`);return adopt(e[M],this),ki&&flushCEReactions(),e}getElementsByTagName(e){return getElementsByTagName(this[M],String(e))}getElementsByTagNameNS(e,t){return getElementsByTagNameNS(this[M],e,String(t))}getElementsByClassName(e){return getElementsByClassName(this[M],String(e))}getElementsByName(e){return new NameNodeList(this[M],String(e))}get forms(){return this[qt]??=withNamedProperties(cachedCollection(this[M],`forms`,e=>e.tag===X.form&&e.ns===`http://www.w3.org/1999/xhtml`))}get images(){return cachedCollection(this[M],`images`,e=>e.tag===X.img&&e.ns===`http://www.w3.org/1999/xhtml`)}get embeds(){return cachedCollection(this[M],`embeds`,e=>e.tag===X.embed&&e.ns===`http://www.w3.org/1999/xhtml`)}get plugins(){return this.embeds}get scripts(){return cachedCollection(this[M],`scripts`,e=>e.tag===X.script&&e.ns===`http://www.w3.org/1999/xhtml`)}get links(){return cachedCollection(this[M],`links`,e=>(e.tag===X.a||e.tag===X.area)&&e.ns===`http://www.w3.org/1999/xhtml`&&attr(e,`href`)!==null)}get anchors(){return cachedCollection(this[M],`anchors`,e=>e.tag===X.a&&e.ns===`http://www.w3.org/1999/xhtml`&&attr(e,`name`)!==null)}get applets(){return cachedCollection(this[M],`applets`,()=>!1)}createRange(){return new su(this)}createTreeWalker(e,t=4294967295,n=null){return new TreeWalker(e,t,n)}createNodeIterator(e,t=4294967295,n=null){return new NodeIterator(e,t,n)}getSelection(){return this[J]===null?null:this[xr]??=new Selection(this)}open(...e){if(e.length>=3)return this[J]?.open?.(...e)??null;if(!this[N])throw new DOMException(`Only HTML documents can be opened.`,`InvalidStateError`);return this._replaceAll(null),this[ni]=``,this}write(...e){if(!this[N])throw new DOMException(`Only HTML documents can be written to.`,`InvalidStateError`);this[ni]===null&&this.open(),this[ni]+=e.map(String).join(``),this._replaceAll(null),parseDocument(this[ni],this)}writeln(...e){this.write(...e,`
39
- `)}close(){if(!this[N])throw new DOMException(`Only HTML documents can be closed.`,`InvalidStateError`);this[ni]=null}_cloneDocument(){let e=this instanceof XMLDocument?new XMLDocument:new Document;return e[Ge]=this.baseURI,e[N]=this[N],e[ft]=this[ft],e[K]=this[K],e[jn]=this[jn],e}createEvent(e){if(arguments.length===0)throw TypeError(`Failed to execute 'createEvent' on 'Document': 1 argument required, but only 0 present.`);return createEvent(e)}_getTheParent(e){return e.type===`load`||this[J]===null?null:this[J]}};installParentNode(Z),installNonElementParentNode(Z),installEventHandlers(Z.prototype,`document`);function documentBaseURL(e){let t=e[K],n=e[Le]!==null&&(t===`about:blank`||t===`about:srcdoc`)?e[Le]:t,r=e[M];for(let e=nextElementInTree(r,r);e!==null;e=nextElementInTree(e,r)){if(e.tag!==X.base||e.ns!==`http://www.w3.org/1999/xhtml`)continue;let t=attr(e,`href`);if(t===null)continue;let r=URL.parse(t,n);return r===null||r.protocol===`data:`||r.protocol===`javascript:`?n:r.href}return e[Ge]??n}var XMLDocument=class extends Z{};Object.defineProperty(XMLDocument.prototype,Symbol.toStringTag,{value:`XMLDocument`,configurable:!0});var DOMImplementation=class{[Ft];constructor(e){if(!(e instanceof Z))throw TypeError(`Illegal constructor`);this[Ft]=e}createDocumentType(e,t,n){if(!isValidDoctypeName(String(e)))throw new DOMException(`"${e}" is not a valid doctype name.`,`InvalidCharacterError`);return new DocumentType(this[Ft],String(e),String(t),String(n))}createHTMLDocument(e){let t=Z._createHTML(null);t.appendChild(new DocumentType(t,`html`,``,``));let n=t.createElement(`html`);t.appendChild(n);let r=t.createElement(`head`);if(n.appendChild(r),e!==void 0){let n=t.createElement(`title`);n.appendChild(t.createTextNode(String(e))),r.appendChild(n)}return n.appendChild(t.createElement(`body`)),t}createDocument(e,t,n=null){arguments.length<2&&argumentsRequired(`createDocument`,`DOMImplementation`,2,arguments.length);let r=new XMLDocument;return e===`http://www.w3.org/1999/xhtml`?r[ft]=`application/xhtml+xml`:e===`http://www.w3.org/2000/svg`&&(r[ft]=`image/svg+xml`),n!==null&&r.appendChild(n),t!==null&&t!==``&&r.appendChild(r.createElementNS(e,t)),r}hasFeature(){return!0}};let uu=Object.create(null);function registerDomNamespace(e){uu=e}let du=null;function isInterfaceName(e){let t=e.charCodeAt(0);return t>=65&&t<=90}const fu=/* @__PURE__ */ new Set([`ResizeObserver`]);function optInInterfaces(){let e=Object.create(null);for(let t of fu)uu[t]!==void 0&&(e[t]=uu[t]);return e}function ensureInterfaces(e,t={}){if(du!==null)return du;let n=Object.create(null),r=uu;for(let e of Object.keys(r)){if(!isInterfaceName(e)||fu.has(e))continue;let t=r[e];(typeof t==`function`||typeof t==`object`&&t)&&(n[e]=t)}for(let e of Object.keys(t))e in n||(n[e]=t[e]);let i={};for(let t of Object.keys(n))Object.hasOwn(e,t)||(i[t]={value:n[t],writable:!0,configurable:!0,enumerable:!1});let a=Object.create(Object.getPrototypeOf(e));return Object.defineProperties(a,i),Object.setPrototypeOf(e,a),du=n,n}function eventInterface(e){return uu[e]}function domExport(e){return uu[e]}const pu=[`text/xml`,`application/xml`,`application/xhtml+xml`,`image/svg+xml`];var DOMParser=class{parseFromString(e,t){let n=currentWindowOrNull()?.document.URL??`about:blank`;if(t=String(t),t===`text/html`){let t=Z._createHTML(null,n);return parseDocument(String(e),t),t}if(!pu.includes(t))throw TypeError(`Failed to execute 'parseFromString' on 'DOMParser': The provided value '${t}' is not a valid enum value of type DOMParserSupportedType.`);let r=new Z;return r[ft]=t,r[K]=n,parseXML(String(e),r,t),r}},XMLSerializer=class{serializeToString(e){return serializeXML(e[M],!1)}};function documentParseHTMLUnsafe(e){let t=Z._createHTML(null,`about:blank`);return parseHTMLUnsafe(String(e),t),t}function escape$1(e){let t=String(e),n=t.length,r=``,i=n>0?t.charCodeAt(0):0;for(let e=0;e<n;e++){let a=t.charCodeAt(e);r+=a===0?`�`:a>=1&&a<=31||a===127||e===0&&a>=48&&a<=57||e===1&&a>=48&&a<=57&&i===45?`\\${a.toString(16)} `:e===0&&a===45&&n===1?`\\-`:a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?t[e]:`\\${t[e]}`}return r}__name(escape$1,`escape`);const mu={escape:escape$1,supports(e,t){return!1}},hu=Symbol(`construct`);var DOMStringList=class{#e;constructor(e,t=[]){if(e!==hu)throw TypeError(`Illegal constructor`);this.#e=t;for(let e=0;e<t.length;e++)Object.defineProperty(this,e,{value:t[e],writable:!1,enumerable:!0,configurable:!0});Object.preventExtensions(this)}get length(){return this.#e.length}item(e){return this.#e[Number(e)>>>0]??null}contains(e){return this.#e.includes(String(e))}*[Symbol.iterator](){yield*this.#e}get[Symbol.toStringTag](){return`DOMStringList`}};function createDOMStringList(e){return new DOMStringList(hu,e)}const gu=globalThis.AbortSignal,_u=globalThis.AbortController;function enforceRange(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to execute 'timeout' on 'AbortSignal': parameter 1 is not a finite number.`);let n=Math.trunc(t);if(n<0||n>2**53-1)throw TypeError(`Failed to execute 'timeout' on 'AbortSignal': parameter 1 is outside the accepted range.`);return n}const vu=function AbortSignal(){throw TypeError(`Illegal constructor`)};Object.defineProperty(vu,"prototype",{value:gu.prototype,writable:!1,enumerable:!1,configurable:!1}),Object.setPrototypeOf(vu,gu),Object.defineProperty(vu,"timeout",{value:function timeout(e){let t=enforceRange(e),n=currentWindowOrNull();if(n===null)return gu.timeout(t);let r=new _u;return n.setTimeout(()=>r.abort(new DOMException(`The operation timed out.`,`TimeoutError`)),t),r.signal},writable:!0,enumerable:!0,configurable:!0});function windowOrigin(e){let t=e;for(;t[K].protocol===`about:`&&t[Bn]!==null;)t=t[Bn];return t[K].origin}function parseURL(e,t){let n=URL.parse(String(t),e[K].href);if(n===null)throw new DOMException(`Failed to execute 'assign' on 'Location': '${t}' is not a valid URL.`,`SyntaxError`);return n}const yu={toString:{value:function toString(){return this[J][K].href},writable:!1,enumerable:!0,configurable:!1},valueOf:{value:Object.prototype.valueOf,writable:!1,enumerable:!1,configurable:!1},[Symbol.toPrimitive]:{value:void 0,writable:!1,enumerable:!1,configurable:!1}};function inactive(e){return e[J][ot]}function isSchemeInput(e){let t=e.replace(/[\t\n\r]/g,``)+`:`;return/^[A-Za-z][A-Za-z0-9+\-.]*:/.test(t)}var Location=class{[J];#e=null;#t=null;constructor(e){this[J]=e,Object.defineProperties(this,yu)}get href(){return this[J][K].href}set href(e){inactive(this)||this[J]._navigate(parseURL(this[J],e),!1)}get origin(){return this[J][K].origin}get protocol(){return this[J][K].protocol}set protocol(e){if(inactive(this))return;let t=String(e);if(!isSchemeInput(t))throw new DOMException(`Failed to set the 'protocol' property on 'Location': '${t}' is an invalid protocol.`,`SyntaxError`);let n=new URL(this[J][K].href);n.protocol=t,(n.protocol===`http:`||n.protocol===`https:`)&&this[J]._navigate(n,!1)}get host(){return this[J][K].host}set host(e){this._set(`host`,e)}get hostname(){return this[J][K].hostname}set hostname(e){this._set(`hostname`,e)}get port(){return this[J][K].port}set port(e){this._set(`port`,e)}get pathname(){return this[J][K].pathname}set pathname(e){this._set(`pathname`,e)}get search(){return this[J][K].search}set search(e){this._set(`search`,e)}get hash(){return this[J][K].hash}set hash(e){if(inactive(this))return;let t=this[J][K],n=t.hash.slice(1),r=String(e);r.startsWith(`#`)&&(r=r.slice(1));let i=new URL(t.href);i.hash=r,r===``&&(i=new URL(i.href+`#`)),i.hash.slice(1)!==n&&this[J]._navigate(i,!1)}get ancestorOrigins(){if(inactive(this))return this.#t??=createDOMStringList([]);if(this.#e===null){let e=[];for(let t=this[J][Bn];t!==null;t=t[Bn])e.push(windowOrigin(t));this.#e=createDOMStringList(e)}return this.#e}assign(e){inactive(this)||this[J]._navigate(parseURL(this[J],e),!1)}replace(e){inactive(this)||this[J]._navigate(parseURL(this[J],e),!0)}reload(){inactive(this)||reportNotImplemented(this[J],Vl)}_set(e,t){if(inactive(this))return;let n=new URL(this[J][K].href);n[e]=String(t),this[J]._navigate(n,!1)}get[Symbol.toStringTag](){return`Location`}};function checkFullyActive(e,t){if(e[J][ot])throw new DOMException(`Failed to ${t} 'History': May not use a History object associated with a Document that is not fully active`,`SecurityError`)}function withoutFragment(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}var History=class{[J];[zt];[mn];[fr];constructor(e){this[J]=e,this[zt]=[{url:e[K].href,state:null}],this[mn]=0,this[fr]=`auto`}get length(){return checkFullyActive(this,`read the 'length' property from`),this[zt].length}get state(){return checkFullyActive(this,`read the 'state' property from`),this[zt][this[mn]].state}get scrollRestoration(){return checkFullyActive(this,`read the 'scrollRestoration' property from`),this[fr]}set scrollRestoration(e){checkFullyActive(this,`set the 'scrollRestoration' property on`),(e===`auto`||e===`manual`)&&(this[fr]=e)}go(e=0){checkFullyActive(this,`execute 'go' on`);let t=Math.trunc(Number(e))||0;t!==0&&this[J]._task(()=>{let e=this[mn]+t;e<0||e>=this[zt].length||this._traverseTo(e)},0)}back(){checkFullyActive(this,`execute 'back' on`),this.go(-1)}forward(){checkFullyActive(this,`execute 'forward' on`),this.go(1)}pushState(e,t,n){this._sharedPushReplaceState(e,n,!1,`pushState`)}replaceState(e,t,n){this._sharedPushReplaceState(e,n,!0,`replaceState`)}_sharedPushReplaceState(e,t,n,r){let i=this[J];checkFullyActive(this,`execute '${r}' on`);let a=e==null?null:structuredClone(e),o=i[K];if(t!=null&&t!==``){let e=URL.parse(String(t),i[K].href);if(e===null)throw new DOMException(`Failed to execute '${r}' on 'History': A history state object with URL '${String(t)}' cannot be created.`,`SecurityError`);if(!canHaveURLRewritten(i[K],e))throw new DOMException(`Failed to execute '${r}' on 'History': A history state object with URL '${e.href}' cannot be created in a document with origin '${i[K].origin}' and URL '${i[K].href}'.`,`SecurityError`);o=e}let s={url:o.href,state:a};n?this[zt][this[mn]]=s:(this[zt].length=this[mn]+1,this[zt].push(s),this[mn]++),i._setURL(o)}_navigate(e,t){let n=this[J],r=n[K].href,i=e.href;e.protocol!==`javascript:`&&withoutFragment(r)!==withoutFragment(i)&&reportNotImplemented(n,Vl),i===r&&(t=!0);let a={url:i,state:null};if(t?this[zt][this[mn]]=a:(this[zt].length=this[mn]+1,this[zt].push(a),this[mn]++),n._setURL(e),(e.hash!==``||i.endsWith(`#`))&&withoutFragment(r)===withoutFragment(i)){let e=eventInterface(`PopStateEvent`);n.dispatchEvent(new e(`popstate`,{state:null})),r!==i&&this._queueHashChange(r,i)}}_traverseTo(e){let t=this[J],n=t[K].href;this[mn]=e;let r=this[zt][e];r.url!==n&&t._setURL(new URL(r.url));let i=eventInterface(`PopStateEvent`);t.dispatchEvent(new i(`popstate`,{state:r.state})),n!==r.url&&withoutFragment(n)===withoutFragment(r.url)&&this._queueHashChange(n,r.url)}_queueHashChange(e,t){let n=this[J];n._task(()=>{let r=eventInterface(`HashChangeEvent`);n.dispatchEvent(new r(`hashchange`,{oldURL:e,newURL:t}))},0)}get[Symbol.toStringTag](){return`History`}};function canHaveURLRewritten(e,t){return e.protocol!==t.protocol||e.username!==t.username||e.password!==t.password||e.host!==t.host?!1:t.protocol===`http:`||t.protocol===`https:`?!0:t.protocol===`file:`?e.pathname===t.pathname:withoutFragment(e.href).split(`?`)[0]===withoutFragment(t.href).split(`?`)[0]}var ClipboardItem=class{[P];[Yn];constructor(e,t={}){if(typeof e!=`object`||!e||Object.keys(e).length===0)throw TypeError(`Failed to construct 'ClipboardItem': Empty dictionary argument`);this[P]=new Map(Object.entries(e)),this[Yn]=t.presentationStyle??`unspecified`}get types(){return Object.freeze([...this[P].keys()])}get presentationStyle(){return this[Yn]}async getType(e){if(!this[P].has(e))throw new DOMException(`Failed to execute 'getType' on 'ClipboardItem': The type was not found`,`NotFoundError`);let t=await this[P].get(e);return typeof t==`string`?new Blob([t],{type:e}):t}static supports(e){return e===`text/plain`||e===`text/html`||e===`image/png`||e.startsWith(`web `)}},Clipboard=class extends EventTarget{[Ct];constructor(){super(),this[Ct]=[]}async read(){return this[Ct].slice()}async readText(){for(let e of this[Ct])if(e[P].has(`text/plain`))return(await e.getType(`text/plain`)).text();return``}async write(e){this[Ct]=Array.from(e)}async writeText(e){this[Ct]=[new ClipboardItem({"text/plain":String(e)})]}};let bu=0;var Navigator=class{[J];[it];[Kr];constructor(e){this[J]=e,this[it]=null,this[Kr]=null}get appCodeName(){return`Mozilla`}get appName(){return`Netscape`}get appVersion(){return this.userAgent.replace(/^Mozilla\//,``)}get platform(){return this[J][z].platform}get product(){return`Gecko`}get productSub(){return`20030107`}get userAgent(){return this[J][z].userAgent}get vendor(){return`Apple Computer, Inc.`}get vendorSub(){return``}get oscpu(){}get language(){return this[J][z].languages[0]??`en-US`}get languages(){return this[J][z].languages}get onLine(){return!0}get cookieEnabled(){return!0}get hardwareConcurrency(){return bu||=r()}get pdfViewerEnabled(){return!1}get plugins(){return[]}get mimeTypes(){return[]}javaEnabled(){return!1}get maxTouchPoints(){return 0}get webdriver(){return!1}get doNotTrack(){return null}get deviceMemory(){return 8}get clipboard(){return this[it]??=new Clipboard}set clipboard(e){Object.defineProperty(this,"clipboard",{value:e,writable:!0,enumerable:!0,configurable:!0})}get userActivation(){return this[Kr]??={hasBeenActive:!1,isActive:!1}}sendBeacon(e,t){return!0}vibrate(e){return!0}registerProtocolHandler(){}unregisterProtocolHandler(){}get[Symbol.toStringTag](){return`Navigator`}},Screen=class extends EventTarget{[J];constructor(e){super(),this[J]=e}get width(){return this[J][z].screenWidth}get height(){return this[J][z].screenHeight}get availWidth(){return this[J][z].screenWidth}get availHeight(){return this[J][z].screenHeight}get availLeft(){return 0}get availTop(){return 0}get colorDepth(){return 24}get pixelDepth(){return 24}get isExtended(){return!1}},VisualViewport=class extends EventTarget{[J];constructor(e){super(),this[J]=e}get offsetLeft(){return 0}get offsetTop(){return 0}get pageLeft(){return this[J].scrollX}get pageTop(){return this[J].scrollY}get width(){return this[J].innerWidth}get height(){return this[J].innerHeight}get scale(){return 1}};function createStorageShed(){return{areas:/* @__PURE__ */ new Map,windows:/* @__PURE__ */ new Set}}const xu=Symbol(`storage`),Su=Symbol(`construct`);function state$2(e){return e[xu]}__name(state$2,`state`);function visible(e,t){return!(t in e)&&state$2(e).map.has(t)}const Cu={get(e,t,n){return typeof t==`string`&&!(t in e)?state$2(e).map.get(t):Reflect.get(e,t,n)},set(e,t,n,r){return typeof t==`string`&&r===wu.get(e)?typeof n==`function`&&t in e?Reflect.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):(e.setItem(t,n),!0):Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&state$2(e).map.has(t)?!0:Reflect.has(e,t)},deleteProperty(e,t){return typeof t==`string`&&visible(e,t)?(e.removeItem(t),!0):Reflect.deleteProperty(e,t)},ownKeys(e){let t=[];for(let n of state$2(e).map.keys())n in e||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!(t in e)){let n=state$2(e).map.get(t);if(n!==void 0)return{value:n,writable:!0,enumerable:!0,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},defineProperty(e,t,n){return typeof t==`string`&&!Object.hasOwn(e,t)&&`value`in n&&typeof n.value!=`function`?(e.setItem(t,n.value),!0):Reflect.defineProperty(e,t,n)}},wu=/* @__PURE__ */ new WeakMap;function requireArgs(e,t,n){if(e<t)throw TypeError(`Failed to execute '${n}' on 'Storage': ${t} argument${t===1?``:`s`} required, but only ${e} present.`)}var Storage=class{constructor(e,t,n,r){if(e!==Su)throw TypeError(`Illegal constructor`);let i=0;for(let[e,t]of r)i+=e.length+t.length;let a={map:r,window:t,type:n,size:i};Object.defineProperty(this,xu,{value:a,writable:!1,enumerable:!1,configurable:!1});let o=new Proxy(this,Cu);return wu.set(this,o),o}get length(){return state$2(this).map.size}key(e){requireArgs(arguments.length,1,`key`);let t=Number(e)>>>0,n=state$2(this).map;if(t>=n.size)return null;let r=0;for(let e of n.keys())if(r++===t)return e;return null}getItem(e){return requireArgs(arguments.length,1,`getItem`),state$2(this).map.get(String(e))??null}setItem(e,t){requireArgs(arguments.length,2,`setItem`);let n=state$2(this),r=String(e),i=String(t),a=n.map.get(r);if(a===i)return;let o=n.size-(a===void 0?0:r.length+a.length)+r.length+i.length;if(o>5e6){let e=`Failed to execute 'setItem' on 'Storage': Setting the value of '${r}' exceeded the quota.`,t=globalThis.QuotaExceededError;throw t===void 0?new DOMException(e,`QuotaExceededError`):new t(e)}n.map.set(r,i),n.size=o,broadcast(n,r,a??null,i)}removeItem(e){requireArgs(arguments.length,1,`removeItem`);let t=state$2(this),n=String(e),r=t.map.get(n);r!==void 0&&(t.map.delete(n),t.size-=n.length+r.length,broadcast(t,n,r,null))}clear(){let e=state$2(this);e.map.size!==0&&(e.map.clear(),e.size=0,broadcast(e,null,null,null))}get[Symbol.toStringTag](){return`Storage`}};function topWindow(e){let t=e;for(;t[Bn]!==null;)t=t[Bn];return t}function broadcast(e,t,n,r){let i=e.window,a=i._storageShed;if(a.windows.size<2)return;let o=windowOrigin(i),s=i[K].href,c=e.type===`session`?topWindow(i):null;for(let l of a.windows){if(l===i||l[ot]||windowOrigin(l)!==o||c!==null&&topWindow(l)!==c)continue;let a=e.type===`local`;l._task(()=>{let e=eventInterface(`StorageEvent`),i=a?l.localStorage:l.sessionStorage;l.dispatchEvent(new e(`storage`,{key:t,oldValue:n,newValue:r,url:s,storageArea:i}))},0)}}function createLocalStorage(e){let t=e._storageShed,n=windowOrigin(e),r=t.areas.get(n);return r===void 0&&t.areas.set(n,r=/* @__PURE__ */ new Map),new Storage(Su,e,`local`,r)}const Tu=/* @__PURE__ */ new WeakMap;function createSessionStorage(e){let t=topWindow(e),n=Tu.get(t);n===void 0&&Tu.set(t,n=/* @__PURE__ */ new Map);let r=windowOrigin(e),i=n.get(r);return i===void 0&&n.set(r,i=/* @__PURE__ */ new Map),new Storage(Su,e,`session`,i)}function defaultPath(e){let t=e.pathname;if(!t.startsWith(`/`))return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function pathMatches(e,t){return e===t?!0:e.startsWith(t)?t.endsWith(`/`)||e[t.length]===`/`:!1}function domainMatches(e,t){return e===t||e.endsWith(`.`+t)&&!/^[\d.]+$/.test(e)&&!e.startsWith(`[`)}function cookieDomainMatches(e,t){return e.hostOnly?t===e.domain:domainMatches(t,e.domain)}var CookieJar=class{[vt];constructor(){this[vt]=[]}set(e,t,n=Date.now()){let r=String(e).split(`;`),i=r[0],a=i.indexOf(`=`),o=(a===-1?``:i.slice(0,a)).trim(),s=(a===-1?i:i.slice(a+1)).trim();if(o===``&&s===``)return;let c=defaultPath(t),l=1/0,u=!1,d=!1,m=``;for(let e=1;e<r.length;e++){let i=r[e],a=i.indexOf(`=`),o=(a===-1?i:i.slice(0,a)).trim().toLowerCase(),s=a===-1?``:i.slice(a+1).trim();switch(o){case`max-age`:{if(!/^-?\d+$/.test(s))break;let e=Number(s);l=e<=0?-1/0:n+e*1e3,u=!0;break}case`expires`:{if(u)break;let e=Date.parse(s);Number.isNaN(e)||(l=e);break}case`domain`:if(s===``)break;m=(s.startsWith(`.`)?s.slice(1):s).toLowerCase();break;case`path`:c=s.startsWith(`/`)?s:defaultPath(t);break;case`secure`:d=!0;break;case`httponly`:return}}if(d&&t.protocol!==`https:`&&t.hostname!==`localhost`)return;let h=t.hostname.toLowerCase();if(m!==``&&!domainMatches(h,m))return;let _=m===``,v=_?h:m,ee=this[vt].findIndex(e=>e.name===o&&e.domain===v&&e.path===c);if(l<=n){ee!==-1&&this[vt].splice(ee,1);return}let y={name:o,value:s,domain:v,hostOnly:_,path:c,expires:l,secure:d};ee===-1?this[vt].push(y):this[vt][ee]=y}get(e,t=Date.now()){let n=``,r=e.hostname.toLowerCase(),i=[];for(let n=this[vt].length-1;n>=0;n--){let a=this[vt][n];a.expires<=t?this[vt].splice(n,1):a.secure&&e.protocol!==`https:`&&e.hostname!==`localhost`||cookieDomainMatches(a,r)&&pathMatches(e.pathname,a.path)&&i.push(a)}i.reverse(),i.sort((e,t)=>t.path.length-e.path.length);for(let e of i)n!==``&&(n+=`; `),n+=e.name===``?e.value:`${e.name}=${e.value}`;return n}};function windowOf$1(e){return e[J]}__name(windowOf$1,`windowOf`);const Eu={cookie:{get(){let e=windowOf$1(this);return e===null?``:e._cookieStore.get(e[K])},set(e){let t=windowOf$1(this);t!==null&&t._cookieStore.set(String(e),t[K])}},referrer:{get(){return windowOf$1(this)?.[z].referrer??``}},currentScript:{get(){return null}},readyState:{get(){return`complete`}},visibilityState:{get(){return`visible`}},hidden:{get(){return!1}},location:{get(){return windowOf$1(this)?.location??null},set(e){let t=windowOf$1(this);t!==null&&(t.location.href=e)}},lastModified:{get(){let e=/* @__PURE__ */ new Date,p=e=>String(e).padStart(2,`0`);return`${p(e.getMonth()+1)}/${p(e.getDate())}/${e.getFullYear()} ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`}},domain:{get(){return windowOf$1(this)?.[K].hostname??``},set(){}},designMode:{get(){return isDesignModeEnabled(this)?`on`:`off`},set(e){let t=asciiLowercase$1(String(e));t===`on`?setDesignModeEnabled(this,!0):t===`off`&&setDesignModeEnabled(this,!1)}}},Du=Z.prototype;for(let e of Object.keys(Eu))e in Du||Object.defineProperty(Du,e,{...Eu[e],enumerable:!0,configurable:!0});Object.hasOwn(Z,`parseHTMLUnsafe`)||Object.defineProperty(Z,"parseHTMLUnsafe",{value:documentParseHTMLUnsafe,writable:!0,enumerable:!0,configurable:!0});var TimerList=class{handles;sweepAt;constructor(){this.handles=/* @__PURE__ */ new Map,this.sweepAt=256}};function trackTimer(e,t,n){let r=e[Rr]??=new TimerList,i=r.handles;i.size>=r.sweepAt&&sweep(r),i.set(t,n)}function sweep(e){let t=e.handles;for(let e of t.keys())typeof e==`object`&&e&&e._destroyed===!0&&t.delete(e);e.sweepAt=Math.max(256,t.size*2)}function clearTimers(e){let t=e[Rr];if(t!==null){e[Rr]=null;for(let[e,n]of t.handles)try{n(e)}catch{}t.handles.clear()}}function timerTimeout(e){let t=e|0;return t<0?0:t}function startTimer(e,t,n,r,i,a){let o=timerTimeout(i);if(e[ot])return 0;let s=t[n?`setInterval`:`setTimeout`],c=a.length===0?s(r,o):s(r,o,...a);return trackTimer(e,c,t[n?`clearInterval`:`clearTimeout`]),c}function wrapTimer(e,t,n){let r=t[n?`setInterval`:`setTimeout`],i=t[n?`clearInterval`:`clearTimeout`],a={setTimeout(t,n,...a){let o=timerTimeout(n);if(e[ot])return 0;let s=a.length===0?r(t,o):r(t,o,...a);return trackTimer(e,s,i),s},setInterval(t,n,...a){let o=timerTimeout(n);if(e[ot])return 0;let s=a.length===0?r(t,o):r(t,o,...a);return trackTimer(e,s,i),s}}[n?`setInterval`:`setTimeout`];for(let e of Object.getOwnPropertySymbols(r))Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e));return a}function trackGlobalTimers(e,t){let n=[];for(let r of[!1,!0]){let i=r?`setInterval`:`setTimeout`;typeof t[i]==`function`&&typeof t[r?`clearInterval`:`clearTimeout`]==`function`&&(n.push([i,Object.getOwnPropertyDescriptor(t,i)]),Object.defineProperty(t,i,{value:wrapTimer(e,t,r),writable:!0,enumerable:!0,configurable:!0}))}return function restore(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.length=0}}let Ou=!1;function enableLayout(){Ou=!0}const ku=Object.freeze([`en-US`,`en`]);let Au=!1;const ju=/* @__PURE__ */ new WeakMap;function receiver(e,t){return e!=null&&e[ot]!==void 0?e:otherReceiver(e,t)}function otherReceiver(e,t){let n=e==null?currentWindowOrNull():typeof e==`object`||typeof e==`function`?ju.get(e):void 0;if(n==null)throw TypeError(`Failed to execute '${t}' on 'Window': Illegal invocation`);return n}var Window=class extends EventTarget{document;name;status;opener;[z];[K];[Dn];[rn];[Pn];[dr];[Zr];[En];[wr];[Er];[xt];[_t];[An];[Lr];[Rr];[Jt];[ur];[Zt];[Qt];[Xt];[ln];[un];[yn];[vn];[kt];[pr];[mr];[ot];[j];[Bn];[Yt];[en];[tt];constructor(e={},t){super(),Au||preparePrototype();let n=new URL(e.url??`http://localhost/`),r=Z._createHTML(this,n.href);this.document=r,this.name=``,this.status=``,this.opener=null;let i=e.width??1024,a=e.height??768;if(this[z]={userAgent:e.userAgent??`Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) ctrl-dom/0.0.0`,platform:e.platform??``,languages:e.languages??ku,referrer:e.referrer??``,screenWidth:e.screenWidth??i,screenHeight:e.screenHeight??a,mediaFeatures:e.mediaFeatures,validationMessages:e.validationMessages===`browser`?`browser`:`jsdom`,compat:resolveCompat(e.compat),layout:e.layout===`lite`?`lite`:`none`},e.layout===`lite`&&enableLayout(),this[K]=n,this[Dn]=null,this[rn]=null,this[Pn]=null,this[dr]=null,this[Zr]=null,this[En]=null,this[wr]=null,this[Er]=e.shareStorageWith===void 0?null:e.shareStorageWith._storageShed,this[xt]=null,this[_t]=null,this[An]=/* @__PURE__ */ new Set,this[Lr]=null,this[Rr]=null,this[Jt]=null,this[ur]=null,this[Zt]=null,this[Qt]=-1,this[Xt]=0,this[ln]=null,this[un]=0,this[yn]=i,this[vn]=a,this[kt]=e.devicePixelRatio??1,this[pr]=0,this[mr]=0,this[ot]=!1,this[j]=globalThis,this[Bn]=null,this[Yt]=null,this[tt]=null,this[en]=null,this[Er]!==null&&this[Er].windows.add(this),(e.visualViewport??compatExposes(this[z].compat,`visualViewport`))&&Object.defineProperty(this,"visualViewport",{get:visualViewportGetter,enumerable:!0,configurable:!0}),t!==void 0){if(this[Bn]=t.parent,this[Yt]=t.frameElement,this[j]=t.parent[j],(t.parent[tt]??=/* @__PURE__ */ new Set).add(this),this[Er]=t.parent._storageShed,this[Er].windows.add(this),t.srcdoc!==null)parseDocument(t.srcdoc,r);else{let e=r.createElement(`html`);e.appendChild(r.createElement(`head`)),e.appendChild(r.createElement(`body`)),r.appendChild(e)}}else{if(gl.setComputedColorMode?.(e.cssComputedColors??`specified`),setCurrentWindow(this),e.html!==void 0)parseDocument(e.html,r);else{r.appendChild(new DocumentType(r,`html`,``,``));let e=r.createElement(`html`);e.appendChild(r.createElement(`head`)),e.appendChild(r.createElement(`body`)),r.appendChild(e)}hideInternals(this)}}get window(){return this}get self(){return this}get frames(){return this}get parent(){let e=this[Bn];return e===null?this:e[en]??e}get top(){let e=this[Bn];if(e===null)return this;for(;e[Bn]!==null;)e=e[Bn];return e[en]??e}get length(){return 0}get frameElement(){return this[Yt]}get closed(){return this[ot]}get origin(){return windowOrigin(this)}get isSecureContext(){let{protocol:e,hostname:t}=this[K];return e===`https:`||e===`wss:`||e===`file:`||t===`localhost`||t.endsWith(`.localhost`)||/^127\.\d+\.\d+\.\d+$/.test(t)||t===`[::1]`}get crossOriginIsolated(){return!1}get event(){return getCurrentEvent()}get location(){return this[Dn]??=new Location(this)}set location(e){this.location.href=e}get history(){return this[rn]??=new History(this)}get navigator(){return this[Pn]??=new Navigator(this)}get clientInformation(){return this.navigator}get screen(){return this[dr]??=new Screen(this)}get localStorage(){return this[En]??=createLocalStorage(this)}get sessionStorage(){return this[wr]??=createSessionStorage(this)}get customElements(){if(this[xt]===null){let e=gl.createCustomElementRegistry;if(e!==null)this[xt]=e(this);else return}return this[xt]}get _storageShed(){return this[Er]===null&&(this[Er]=createStorageShed(),this[Er].windows.add(this)),this[Er]}get _cookieStore(){return this[_t]??=new CookieJar}get innerWidth(){return this[yn]}set innerWidth(e){this[yn]=e,this[An].size!==0&&reportMediaQueryChanges(this)}get innerHeight(){return this[vn]}set innerHeight(e){this[vn]=e,this[An].size!==0&&reportMediaQueryChanges(this)}get outerWidth(){return this[yn]}get outerHeight(){return this[vn]}get devicePixelRatio(){return this[kt]}set devicePixelRatio(e){this[kt]=e,this[An].size!==0&&reportMediaQueryChanges(this)}get screenX(){return 0}get screenY(){return 0}get screenLeft(){return 0}get screenTop(){return 0}get scrollX(){return this[pr]}set scrollX(e){this[pr]=e}get scrollY(){return this[mr]}set scrollY(e){this[mr]=e}get pageXOffset(){return this[pr]}set pageXOffset(e){this[pr]=e}get pageYOffset(){return this[mr]}set pageYOffset(e){this[mr]=e}scroll(e,t){let n=receiver(this,`scroll`);reportNotImplemented(n,Nu.scroll),scrollWindow(n,e,t)}scrollTo(e,t){let n=receiver(this,`scrollTo`);reportNotImplemented(n,Nu.scrollTo),scrollWindow(n,e,t)}scrollBy(e,t){let n=receiver(this,`scrollBy`);reportNotImplemented(n,Nu.scrollBy),typeof e==`object`&&e?scrollWindow(n,{left:n[pr]+(Number(e.left)||0),top:n[mr]+(Number(e.top)||0)}):scrollWindow(n,n[pr]+(Number(e)||0),n[mr]+(Number(t)||0))}resizeTo(e,t){let n=receiver(this,`resizeTo`);reportNotImplemented(n,Nu.resizeTo),resizeWindow(n,Number(e),Number(t))}resizeBy(e,t){let n=receiver(this,`resizeBy`);reportNotImplemented(n,Nu.resizeBy),resizeWindow(n,n[yn]+Number(e),n[vn]+Number(t))}moveTo(e,t){reportNotImplemented(receiver(this,`moveTo`),Nu.moveTo)}moveBy(e,t){reportNotImplemented(receiver(this,`moveBy`),Nu.moveBy)}getComputedStyle(e,t){if(typeof e!=`object`||!e||!(M in e)||e[M].type!==1)throw TypeError(`Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.`);t!=null&&String(t)!==``&&reportNotImplemented(receiver(this,`getComputedStyle`),Hl);let n=gl.getComputedStyle??domExport(`getComputedStyle`)??null;return n===null?new CSSStyleDeclaration(e):n(e,t,receiver(this,`getComputedStyle`))}matchMedia(e){if(arguments.length===0)throw TypeError(`Failed to execute 'matchMedia' on 'Window': 1 argument required, but only 0 present.`);return new MediaQueryList(receiver(this,`matchMedia`),String(e).trim())}getSelection(){let e=receiver(this,`getSelection`).document;return typeof e.getSelection==`function`?e.getSelection():null}requestAnimationFrame(e){if(typeof e!=`function`)throw TypeError(`Failed to execute 'requestAnimationFrame' on 'Window': The callback provided as parameter 1 is not a function.`);let t=receiver(this,`requestAnimationFrame`),n=++t[Xt];(t[Jt]??=/* @__PURE__ */ new Map).set(n,e);let r=frameTimers(t),i=t[Zt];return(i===null||i.scheduledWith!==r.setTimeout)&&(i!==null&&t._cancelTask(i),t[Zt]=t._schedule(r,runAnimationFrame,nextFrameDelay(t))),n}cancelAnimationFrame(e){let t=receiver(this,`cancelAnimationFrame`);t[Jt]?.delete(e),t[ur]?.delete(e)}requestIdleCallback(e,t){if(typeof e!=`function`)throw TypeError(`Failed to execute 'requestIdleCallback' on 'Window': The callback provided as parameter 1 is not a function.`);let n=receiver(this,`requestIdleCallback`),r=++n[un],i=n[ln]??=/* @__PURE__ */ new Map,a=n._task(()=>{i.delete(r);let t=Date.now()+50;e({didTimeout:!1,timeRemaining:()=>Math.max(0,t-Date.now())})},1);return a!==null&&i.set(r,a),r}cancelIdleCallback(e){let t=receiver(this,`cancelIdleCallback`),n=t[ln]?.get(e);n!==void 0&&(t[ln].delete(e),t._cancelTask(n))}setTimeout(e,t,...n){let r=receiver(this,`setTimeout`);return startTimer(r,r._timerHost(),!1,e,t,n)}setInterval(e,t,...n){let r=receiver(this,`setInterval`);return startTimer(r,r._timerHost(),!0,e,t,n)}_timerHost(){let e=this[j];return typeof e.setTimeout==`function`?e:globalThis}_task(e,t){return this._schedule(this._timerHost(),e,t)}_schedule(e,t,n){if(this[ot])return null;let r=this[Lr]??=/* @__PURE__ */ new Set,i={handle:void 0,clear:e.clearTimeout,scheduledWith:e.setTimeout};return i.handle=e.setTimeout(()=>{r.delete(i),t.call(this)},n),r.add(i),i}_closeable(e){if(this[ot])return null;let t={handle:void 0,clear:e,scheduledWith:null};return(this[Lr]??=/* @__PURE__ */ new Set).add(t),t}_releaseCloseable(e){this[Lr]?.delete(e)}_cancelTask(e){this[Lr]?.delete(e),e.clear(e.handle)}postMessage(e,t,n){let r=receiver(this,`postMessage`),i=typeof t==`object`&&t?t.targetOrigin??`/`:t??`/`;if(i=String(i),i===`/`)i=r.origin;else if(i!==`*`){let e=URL.parse(i);if(e===null)throw new DOMException(`Failed to execute 'postMessage' on 'Window': Invalid target origin '${i}' in a call to 'postMessage'.`,`SyntaxError`);i=e.origin}if(i!==`*`&&i!==r.origin)return;let a=Array.isArray(n)?n:typeof t==`object`&&t?t.transfer:void 0,o,s;if(a===void 0||a.length===0)o=structuredClone(e);else{let t=structuredClone({message:e,transferred:a},{transfer:a});o=t.message;let n=globalThis.MessagePort;s=n===void 0?[]:t.transferred.filter(e=>e instanceof n)}let c=r.origin;r._task(function(){let e=eventInterface(`MessageEvent`);this.dispatchEvent(new e(`message`,{data:o,origin:c,source:this,ports:s}))},0)}reportError(e){reportException$1(e,receiver(this,`reportError`))}alert(e){reportNotImplemented(receiver(this,`alert`),Nu.alert)}confirm(e){return reportNotImplemented(receiver(this,`confirm`),Nu.confirm),!1}prompt(e,t){return reportNotImplemented(receiver(this,`prompt`),Nu.prompt),null}print(){reportNotImplemented(receiver(this,`print`),Nu.print)}open(e,t,n){return reportNotImplemented(receiver(this,`open`),Nu.open),null}stop(){}focus(){reportNotImplemented(receiver(this,`focus`),Nu.focus)}blur(){reportNotImplemented(receiver(this,`blur`),Nu.blur)}captureEvents(){}releaseEvents(){}close(){if(this==null||this[ot]===void 0)return receiver(this,`close`).close();if(this[ot])return;this[ot]=!0,clearTimers(this);let e=this[Lr];if(e!==null){for(let t of e)t.clear(t.handle);e.clear()}if(this[Jt]=null,this[ur]=null,this[Zt]=null,this[ln]=null,this[An].clear(),this[Er]?.windows.delete(this),this[tt]!==null){for(let e of this[tt])e.close();this[tt]=null}this[Bn]?.[tt]?.delete(this),currentWindowOrNull()===this&&setCurrentWindow(null)}_navigate(e,t){this.history._navigate(e,t)}_setURL(e){this[K]=e,this.document[K]=e.href}_getTheParent(e){return null}get[Symbol.toStringTag](){return`Window`}};function visualViewportGetter(){return this[Zr]??=new VisualViewport(this)}let Mu=null;function setRenderingUpdateHook(e){Mu=e}function nextFrameDelay(e){if(!clockSkipping()||e[ur]!==null)return 16;let t=e[Qt];return t!==-1&&(e[j].performance??performance).now()-t<1?16:1}function frameTimers(e){return clockSkipping()&&e[j]!==globalThis?Fe:globalThis}function runAnimationFrame(){this[Zt]=null,Mu!==null&&Mu(this.document);let e=this[Jt];if(e===null)return;this[Jt]=null,this[ur]=e;let t=(this[j].performance??performance).now();this[Qt]=t;for(let[n,r]of e)if(e.has(n))try{r.call(this,t)}catch(e){reportException$1(e,this)}this[ur]=null}const Nu={alert:stubbedMethod(`Window`,`alert`),blur:stubbedMethod(`Window`,`blur`),confirm:stubbedMethod(`Window`,`confirm`),focus:stubbedMethod(`Window`,`focus`),moveBy:stubbedMethod(`Window`,`moveBy`),moveTo:stubbedMethod(`Window`,`moveTo`),open:stubbedMethod(`Window`,`open`),print:stubbedMethod(`Window`,`print`),prompt:stubbedMethod(`Window`,`prompt`),resizeBy:stubbedMethod(`Window`,`resizeBy`),resizeTo:stubbedMethod(`Window`,`resizeTo`),scroll:stubbedMethod(`Window`,`scroll`),scrollBy:stubbedMethod(`Window`,`scrollBy`),scrollTo:stubbedMethod(`Window`,`scrollTo`)};function scrollWindow(e,t,n){typeof t==`object`&&t?(t.left!==void 0&&(e[pr]=normalizeScroll(t.left)),t.top!==void 0&&(e[mr]=normalizeScroll(t.top))):t!==void 0&&(e[pr]=normalizeScroll(t),e[mr]=normalizeScroll(n??0))}function resizeWindow(e,t,n){e[yn]=t,e[vn]=n,e[An].size!==0&&reportMediaQueryChanges(e),e.dispatchEvent(new Event(`resize`))}function normalizeScroll(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}const Pu=/* @__PURE__ */ `clearTimeout.clearInterval.queueMicrotask.structuredClone.atob.btoa.crypto.performance.console.URL.URLSearchParams.URLPattern.AbortController.Blob.File.TextEncoder.TextDecoder.TextEncoderStream.TextDecoderStream.ReadableStream.ReadableStreamDefaultReader.ReadableByteStreamController.WritableStream.WritableStreamDefaultWriter.TransformStream.ByteLengthQueuingStrategy.CountQueuingStrategy.CompressionStream.DecompressionStream.Headers.FormData.BroadcastChannel.MessageChannel.MessagePort.WebSocket.DOMException.QuotaExceededError.Crypto.CryptoKey.SubtleCrypto.PerformanceEntry.PerformanceMark.PerformanceMeasure.PerformanceObserver.PerformanceObserverEntryList.PerformanceResourceTiming.WebAssembly.Intl`.split(`.`);installEventHandlers(Window.prototype,`window`);const Fu=Object.freeze({visible:!0});for(let e of[`locationbar`,`menubar`,`personalbar`,`scrollbars`,`statusbar`,`toolbar`])Object.defineProperty(Window.prototype,e,{get:()=>Fu,enumerable:!0,configurable:!0});function preparePrototype(){Au=!0;let e=Window.prototype;ensureInterfaces(e,{CSS:mu,DOMStringList,AbortSignal:vu});let t={};for(let n of Pu)n in e||(t[n]={get(){return this[j][n]??globalThis[n]},set(e){Object.defineProperty(this,n,{value:e,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0});Object.defineProperties(e,t)}function windowInterfaces(){return Au||preparePrototype(),ensureInterfaces(Window.prototype,{CSS:mu,DOMStringList,AbortSignal:vu})}function createWindow(e){return new Window(e)}function createNestedWindow(e,t,n,r){let i=`about:blank`;r===null?n!==null&&n!==``&&(i=URL.parse(n,t.document.baseURI)?.href??`about:blank`):i=`about:srcdoc`;let a=new Window({url:i,width:t[yn],height:t[vn],devicePixelRatio:t[kt],userAgent:t[z].userAgent,layout:t[z].layout},{parent:t,frameElement:e,srcdoc:r});return(i===`about:blank`||i===`about:srcdoc`)&&(a.document[Le]=t.document.baseURI),a}setNestedWindowFactory(createNestedWindow);function tabIndexValue(e){if(!(e.flags&8192))return NaN;let t=contentAttr(e,`tabindex`);if(t===null)return NaN;let n=parseInteger(t);return n>=-2147483648&&n<=2147483647?n:NaN}function isSummaryForParentDetails(e){let t=e.parent;if(t===null||t.tag!==X.details||t.ns!==`http://www.w3.org/1999/xhtml`)return!1;for(let n=t.first;n!==null;n=n.next)if(n.type===1&&n.tag===X.summary&&n.ns===`http://www.w3.org/1999/xhtml`)return n===e;return!1}function focusableByDefault(e){if(e.ns===`http://www.w3.org/1999/xhtml`){switch(e.tag){case X.a:case X.area:return contentAttr(e,`href`)!==null;case X.button:case X.select:case X.textarea:case X.iframe:case X.frame:return!0;case X.input:return contentAttr(e,`type`)?.toLowerCase()!==`hidden`;case X.summary:return isSummaryForParentDetails(e);case X.audio:case X.video:return contentAttr(e,`controls`)!==null}return isEditingHost(e)}return e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`&&(contentAttr(e,`href`)!==null||hasXlinkHref(e))}function hasXlinkHref(e){let t=e.attrs;if(t===null)return!1;for(let e=0;e<t.length;e++)if(t[e].localName===`href`&&t[e].ns===`http://www.w3.org/1999/xlink`)return!0;return!1}function defaultTabIndex(e){if(e.ns===`http://www.w3.org/1999/xhtml`){switch(e.tag){case X.a:case X.area:case X.button:case X.frame:case X.iframe:case X.input:case X.object:case X.select:case X.textarea:return 0;case X.summary:return isSummaryForParentDetails(e)?0:-1}return-1}return e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`?0:-1}function isInert(e){for(let t=e;t!==null;t=parentOrHost(t))if(t.flags&262144&&t.type===1&&contentAttr(t,`inert`)!==null)return!0;return inertByModal(e)}function parentOrHost(e){let t=e.parent;if(t!==null)return t;if(e.flags&32){let t=e.node[j];return t===null?null:t[M]}return null}function hasTabIndexFocusFlag(e){return Number.isNaN(tabIndexValue(e))?focusableByDefault(e):e.ns===`http://www.w3.org/1999/xhtml`||e.ns===`http://www.w3.org/2000/svg`||e.ns===`http://www.w3.org/1998/Math/MathML`}function isFocusable(e){return e.type!==1||!(e.flags&1)||!hasTabIndexFocusFlag(e)||isActuallyDisabled(e)||isInert(e)?!1:!isRenderingHidden(e)}function isSequentiallyFocusable(e){if(!isFocusable(e))return!1;let t=tabIndexValue(e);return Number.isNaN(t)||t>=0}function shadowRootOf(e){return e.node[W]??null}function getFocusableArea(e){let t=shadowRootOf(e);if(t===null||!t.delegatesFocus)return null;let n=e.doc[A];return n!==null&&isShadowIncludingInclusiveAncestor$1(e,n)?n:focusDelegate(e)}function focusDelegate(e){let t=shadowRootOf(e);if(t!==null&&!t.delegatesFocus)return null;let n=t===null?e:t[M],r=autofocusDelegate(n);if(r!==null)return r;let i=e.tag===X.dialog&&e.ns===`http://www.w3.org/1999/xhtml`;for(let e=n.first;e!==null;e=nextInTree(e,n)){if(e.type!==1)continue;let t;if(t=i&&isSequentiallyFocusable(e)||!i&&isFocusable(e)?e:getFocusableArea(e),t!==null)return t}return null}let Iu=!0;function focusElement(e,t){let n=e;if(n.tag===X.dialog&&n.ns===`http://www.w3.org/1999/xhtml`&&!isFocusable(n)){if(!(n.flags&1)||isInert(n)||isRenderingHidden(n))return!1}else if(isFocusable(n)){let e=shadowRootOf(n);if(e!==null&&e.delegatesFocus){let e=n.doc[A];if(e!==null&&isShadowIncludingInclusiveAncestor$1(n,e))return!0;let t=focusDelegate(n);if(t===null)return!1;n=t}}else{if(!(n.flags&1))return!1;let e=getFocusableArea(n);if(e===null)return!1;n=e}let r=n.doc;focusContainerChain(r);let i=r[A];return i===n||(Iu=t?.focusVisible??!wasPointerFocus(n),runFocusUpdate(r,i,n),r[A]===n)}function containerOf(e){let t=e[J]?.[Yt]??null;return t===null?null:t[M]}function nestedDocument(e){return e.tag!==X.iframe&&e.tag!==X.frame?null:frameContentWindow(e.node)?.document??null}function focusContainerChain(e){let t=containerOf(e);if(t===null||!(t.flags&1))return;let n=t.doc;focusContainerChain(n),n[A]!==t&&runFocusUpdate(n,n[A],t,!1)}function blurElement(e){let t=e.doc,n=t[A];n!==null&&(n===e||isShadowIncludingInclusiveAncestor$1(e,n))&&runFocusUpdate(t,n,null)}function runFocusUpdate(e,t,n,r=!0){let i=e[J];if(t!==null){let r=nestedDocument(t);r!==null&&r[A]!==null&&runFocusUpdate(r,r[A],null),e[A]=null;let a=t.node,o=n===null?null:n.node;if(fireFocusEvent(a,`blur`,o,!1,i),fireFocusEvent(a,`focusout`,o,!0,i),e[A]!==null)return}if(n===null||!(n.flags&1)||(e[A]=n,!r))return;let a=n.node,o=t===null?null:t.node;fireFocusEvent(a,`focus`,o,!1,i),e[A]===n&&fireFocusEvent(a,`focusin`,o,!0,i)}function isShadowIncludingInclusiveAncestor$1(e,t){for(let n=t;n!==null;n=parentOrHost(n))if(n===e)return!0;return!1}__name(isShadowIncludingInclusiveAncestor$1,`isShadowIncludingInclusiveAncestor`);let Lu=!1;function wasPointerFocus(e){return Lu?(Lu=!1,!(e.tag===X.textarea||e.tag===X.input||isEditingHost(e))):!1}function activeElement(e){let t=e.doc,n=t[A];if(e.type===11){for(;n!==null;){let t=treeRoot(n);if(t===e)return n.node;if(!(t.flags&32))return null;n=parentOrHost(t)}return null}if(n===null)return t.body??t.documentElement;for(;;){let e=treeRoot(n);if(!(e.flags&32))break;let t=parentOrHost(e);if(t===null)break;n=t}return n.node}function documentHasFocus(e){return e[A]!==null}function matchesFocus(e){let t=e.doc[A];if(t===null)return!1;if(t===e)return!0;if(shadowRootOf(e)===null)return!1;for(let n=t;n!==null;){let t=treeRoot(n);if(!(t.flags&32))return!1;if(n=parentOrHost(t),n===e)return!0}return!1}function matchesFocusWithin(e){let t=e.doc[A];return t!==null&&isShadowIncludingInclusiveAncestor$1(e,t)}function matchesFocusVisible(e){return e.doc[A]===e&&Iu}function autofocusDelegate(e){for(let t=e.first;t!==null;t=nextInTree(t,e)){if(t.type!==1||contentAttr(t,`autofocus`)===null)continue;let e=isFocusable(t)?t:getFocusableArea(t);if(e!==null)return e}return null}function focusFixup(e){let t=e[A];t===null||isFocusable(t)||t.tag===X.dialog&&t.ns===`http://www.w3.org/1999/xhtml`&&t.flags&1&&!isInert(t)&&!isRenderingHidden(t)||runFocusUpdate(e,t,null)}setRenderingUpdateHook(focusFixup),setTopLayerFocusHooks(e=>{focusElement(e)},autofocusDelegate);function isReplaced$1(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case X.img:case X.canvas:case X.video:case X.audio:case X.iframe:case X.object:case X.embed:case X.input:case X.textarea:case X.meter:case X.progress:case X.frame:return!0}return!1}__name(isReplaced$1,`isReplaced`);function svgRendersContent(e){switch(e.name){case`svg`:case`g`:case`a`:case`switch`:case`text`:case`tspan`:case`textPath`:case`foreignObject`:return!0}return!1}function svgRendersText(e){let t=e.name;return t===`text`||t===`tspan`||t===`textPath`||t===`a`}function kindOf$1(e){switch(e){case`none`:return 0;case`inline`:case`contents`:case`ruby`:case`ruby-base`:case`ruby-text`:case`ruby-base-container`:case`ruby-text-container`:case`table-column`:case`table-column-group`:return 1;case`inline-block`:case`inline-flex`:case`inline-grid`:case`inline-table`:case`inline-flow-root`:case`inline list-item`:return 5;case`table-cell`:return 3;case`table-row`:return 4}return 2}__name(kindOf$1,`kindOf`);function isFlexOrGrid(e){return e===`flex`||e===`grid`||e===`inline-flex`||e===`inline-grid`}function boxKind(e,t){let n=kindOf$1(computedDisplay(e));if(n===0)return 0;if(e.ns===`http://www.w3.org/2000/svg`)return+!!svgRendersContent(e);if(e.ns!==`http://www.w3.org/1999/xhtml`)return n;if(t&&(n===1||n===5)){let t=e.parent;if(t!==null&&t.type===1&&isFlexOrGrid(computedDisplay(t)))n=2;else if(computedValue(e,`float`)!==`none`)n=2;else{let t=computedValue(e,`position`);(t===`absolute`||t===`fixed`)&&(n=2)}}return n}function isBeingRendered(e){if(!(e.flags&1))return!1;for(let t=e;t!==null&&t.type===1;t=t.parent){if(computedDisplay(t)===`none`)return!1;let e=t.parent;if(e!==null&&e.tag===X.details&&e.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(e,`open`)===null&&!(t.tag===X.summary&&isFirstSummary(t)))return!1}return!0}function isFirstSummary(e){for(let t=e.parent.first;t!==null;t=t.next)if(t.type===1&&t.tag===X.summary)return t===e;return!1}function whiteSpaceMode(e,t){if(t){let t=computedValue(e,`white-space`);return t===`pre-line`?1:t===`pre`||t===`pre-wrap`||t===`break-spaces`||t.startsWith(`preserve`)?2:0}for(let t=e;t!==null&&t.type===1;t=t.parent){if(t.ns!==`http://www.w3.org/1999/xhtml`)continue;let e=t.tag;if(e===X.pre||e===X.listing||e===X.xmp||e===X.plaintext||e===X.textarea)return 2}return 0}function languageOf(e){for(let t=e;t!==null&&t.type===1;t=t.parent){let e=contentAttr(t,`lang`);if(e!==null)return e===``?void 0:e}}function upper(e,t){try{return e.toLocaleUpperCase(t)}catch{return e.toUpperCase()}}function transform(e,t){let n=computedValue(t,`text-transform`);if(n===``||n===`none`)return e;if(n.includes(`uppercase`))return upper(e,languageOf(t));if(n.includes(`lowercase`)){let n=languageOf(t);try{return e.toLocaleLowerCase(n)}catch{return e.toLowerCase()}}if(n.includes(`capitalize`)){let n=languageOf(t);return e.replace(/(^|[\s\-(["'])(\p{L})/gu,(e,t,r)=>t+upper(r,n))}return e}var Builder=class{parts=[];breaks=0;lastSpace=!0;trimmable=!1;styled;constructor(e){this.styled=e}text(e,t){if(e!==``){if(t===0){if(e=e.replace(/[ \t\n\f\r]+/g,` `),this.lastSpace&&e.charCodeAt(0)===32&&(e=e.slice(1)),e===``)return}else if(t===1){if(e=e.replace(/\r\n?/g,`
38
+ `)}const Jl=/* @__PURE__ */ new WeakMap;function constructEntryList(e,t,n=null){let r=e.node;if(r[dt])return null;r[dt]=!0;let i=[];try{let r=formControls(e,[],!0);for(let e=0;e<r.length;e++){let n=r[e];if(!isSubmittable(n)||hasDatalistAncestor(n)||isActuallyDisabled(n))continue;let a=n.tag,o=a===Y.input?inputType(n):-1;if((a===Y.button||o===18||o===20||o===21||o===19)&&n!==t)continue;let s=n.node;if((o===15||o===16)&&!s.checked)continue;if(o===19){let e=attr(n,`name`)??``,t=e===``?``:e+`.`,r=Jl.get(n);i.push([t+`x`,r===void 0?`0`:String(r.x)],[t+`y`,r===void 0?`0`:String(r.y)]);continue}if(isFACE(n)){faceEntries(n,i);continue}let c=attr(n,`name`);if(c!==null&&c!==``){if(a===Y.select){let e=listOfOptions(n,[]);for(let t=0;t<e.length;t++){let n=e[t],r=n.node;r.selected&&!isActuallyDisabled(n)&&i.push([c,r.value])}}else if(o===15||o===16)i.push([c,attr(n,`value`)??`on`]);else if(o===17){let e=s.files;if(e===null||e.length===0)i.push([c,new File([],``,{type:`application/octet-stream`})]);else for(let t=0;t<e.length;t++)i.push([c,e.item(t)])}else o===0&&c.toLowerCase()===`_charset_`?i.push([c,`UTF-8`]):a===Y.textarea?i.push([c,textareaWrappingTransformation(n,s.value)]):i.push([c,s.value]);if(a===Y.textarea||a===Y.input&&(o===1||o===2||o===0||o===18||o===20||o===3||o===4||o===5||o===6)){let e=attr(n,`dirname`);e!==null&&e!==``&&i.push([e,`ltr`])}}}n!==null&&n(i)}finally{r[dt]=!1}return i}const Yl=/* @__PURE__ */ new WeakMap;function isShadowIncludingAncestor(e,t){for(let n=t;n!==null;){let t=n.parent;if(t!==null)n=t;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else return!1;if(n===e)return!0}return!1}function attrAssociated(e,t){let n=Yl.get(e)?.get(t)?.deref();if(n!==void 0){let t=n[M],r=treeRoot(t);return r===treeRoot(e)||isShadowIncludingAncestor(r,e)?t:null}let r=contentAttr(e,t);if(r===null||r===``)return null;let i=treeRoot(e);for(let e=nextElementInTree(i,i);e!==null;e=nextElementInTree(e,i))if(e.id===r)return e;return null}function elementReflection(e,t,n){defineAccessor(e,t,function(){let e=attrAssociated(this[M],n);return e===null?null:e.node},function(e){let t=this[M],r=Yl.get(t);e==null?(r?.delete(n),removeAttribute(t,n)):(r===void 0&&Yl.set(t,r=/* @__PURE__ */ new Map),setAttribute(t,n,``),r.set(n,new WeakRef(e)))})}function installPopoverInvoker(e){elementReflection(e,`popoverTargetElement`,`popovertarget`),enumerated(e,`popoverTargetAction=popovertargetaction`,{keywords:[`toggle`,`show`,`hide`],missing:`toggle`,invalid:`toggle`})}const Xl=[`toggle-popover`,`show-popover`,`hide-popover`,`show-modal`,`close`,`request-close`];function commandState(e){let t=contentAttr(e,`command`);if(t===null)return``;if(t.startsWith(`--`))return t;let n=t.toLowerCase();return Xl.includes(n)?n:``}function installCommandInvoker(e){elementReflection(e,`commandForElement`,`commandfor`),defineAccessor(e,`command`,function(){return commandState(this[M])},function(e){setAttribute(this[M],`command`,String(e))})}function isButton(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;if(e.tag===Y.button)return!0;if(e.tag!==Y.input)return!1;let t=inputType(e);return t===18||t===19||t===20||t===21}function isResetButton(e){return e.tag===Y.input?inputType(e)===20:e.tag===Y.button&&buttonTypeAttrState(e)===`reset`}function popoverTargetElement(e){if(!isButton(e)||isActuallyDisabled(e)||formOwner(e)!==null&&(isSubmitButton(e)||isResetButton(e)))return null;let t=attrAssociated(e,`popovertarget`);return t===null||t.type!==1||popoverState(t)===0?null:t}function popoverTargetAttributeActivation(e,t){let n=popoverTargetElement(e);if(n===null||t!==null&&(t===n||isShadowIncludingAncestor(n,t))&&isShadowIncludingAncestor(e,n))return;let r=(contentAttr(e,`popovertargetaction`)??``).toLowerCase(),i=isPopoverShowing(n);if(!(r===`show`&&i)&&(r!==`hide`||i)){if(i)hidePopover(n,!0,!0,!1,e);else try{showPopover(n,!1,e)}catch{}}}function targetPopover(e){if(e.ns!==`http://www.w3.org/1999/xhtml`||e.tag!==Y.button)return isButton(e)?popoverTargetElement(e):null;if(isActuallyDisabled(e))return null;let t=attrAssociated(e,`commandfor`);if(t===null)return popoverTargetElement(e);if(formOwner(e)!==null&&(isSubmitButton(e)||buttonTypeAttrState(e)!==`button`))return null;let n=commandState(e);return n!==`toggle-popover`&&n!==`hide-popover`&&n!==`show-popover`||popoverState(t)===0?null:t}function buttonTypeAttrState(e){let t=contentAttr(e,`type`)?.toLowerCase();return t===`submit`||t===`reset`||t===`button`?t:`auto`}var CommandEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target.name),super(e,t);let n=t?.source??null;this.#e=n,this.#t=t?.command===void 0?``:String(t.command)}get source(){let e=this.#e;if(e===null)return null;let t=this.currentTarget;return t===null?e:retarget(e,t)}get command(){return this.#t}};setToStringTag(CommandEvent,1);function isValidCommand(e,t){return e===``?!1:e.startsWith(`--`)?!0:t.type!==1||t.ns!==`http://www.w3.org/1999/xhtml`?!1:e===`toggle-popover`||e===`show-popover`||e===`hide-popover`?!0:t.tag===Y.dialog?e===`close`||e===`request-close`||e===`show-modal`:!1}let Zl=null;function setDialogCommandSteps(e){Zl=e}function popoverValid(e,t){return popoverState(e)!==0&&isPopoverShowing(e)===t&&(t||!!(e.flags&1))}function buttonInvokerActivation(e,t=null){if(e.tag!==Y.button){e.tag===Y.input&&popoverTargetAttributeActivation(e,t);return}if(isActuallyDisabled(e)||formOwner(e)!==null&&buttonTypeAttrState(e)===`auto`)return;let n=attrAssociated(e,`commandfor`);if(n===null){popoverTargetAttributeActivation(e,t);return}let r=commandState(e);if(!isValidCommand(r,n))return;let i={cancelable:!0,command:r,source:e.node};fireAnEvent(`command`,n.node,CommandEvent,i)&&n.flags&1&&!r.startsWith(`--`)&&(r===`hide-popover`?popoverValid(n,!0)&&hidePopover(n,!0,!0,!1,e):r===`toggle-popover`?popoverValid(n,!1)?showPopover(n,!1,e):popoverValid(n,!0)&&hidePopover(n,!0,!0,!1,e):r===`show-popover`?popoverValid(n,!1)&&showPopover(n,!1,e):n.tag===Y.dialog&&n.ns===`http://www.w3.org/1999/xhtml`&&Zl?.(n,e,r))}const Ql=/* @__PURE__ */ new WeakMap;function state$3(e){let t=Ql.get(e);return t===void 0&&(t={layer:[],modals:[],openDialogs:[],watchers:[],popoverPointerdownTarget:null,dialogPointerdownTarget:null,hintStackParent:null,showingPopover:!1,hidingPopoverNestingCount:0},Ql.set(e,t),setPostDispatchHook(postDispatch)),t}__name(state$3,`state`);function styleChanged(e){e[Pr]++}function addToTopLayer(e){styleChanged(e.doc);let t=state$3(e.doc),n=t.layer.indexOf(e);n!==-1&&t.layer.splice(n,1),t.layer.push(e)}function removeFromTopLayer(e){let t=Ql.get(e.doc);if(t===void 0)return;let n=t.layer.indexOf(e);n!==-1&&t.layer.splice(n,1);let r=t.modals.indexOf(e);r!==-1&&t.modals.splice(r,1),(n!==-1||r!==-1)&&styleChanged(e.doc)}function isInTopLayer(e){return Ql.get(e.doc)?.layer.includes(e)??!1}const $l=/* @__PURE__ */ new WeakMap;function getPreviouslyFocused(e){return $l.get(e)??null}function setPreviouslyFocused(e,t){t===null?$l.delete(e):$l.set(e,t)}function setModal(e,t){if(!t){let t=Ql.get(e.doc),n=t===void 0?-1:t.modals.indexOf(e);n!==-1&&(t.modals.splice(n,1),styleChanged(e.doc));return}let n=state$3(e.doc);n.modals.includes(e)||(n.modals.push(e),styleChanged(e.doc))}function matchesModal(e){return Ql.get(e.doc)?.modals.includes(e)??!1}function openDialogsList(e){return state$3(e).openDialogs}function inertByModal(e){let t=Ql.get(e.doc);if(t===void 0||t.modals.length===0)return!1;let n=null,r=-1;for(let e=t.layer.length-1;e>=0;e--)if(t.modals.includes(t.layer[e])){n=t.layer[e],r=e;break}if(n===null)return!1;for(let i=e;i!==null;i=flatParent(i))if(i===n||t.layer.indexOf(i)>r)return!1;return!0}function flatParent(e){let t=e.parent;if(t!==null){if(t.flags&512&&t.type===1){let t=assignedSlotForEventPath(e);if(t!==null)return t}return t}if(e.flags&32){let t=e.node[j];return t===null?null:t[M]}return null}function isFlatInclusiveAncestor(e,t){for(let n=t;n!==null;n=flatParent(n))if(n===e)return!0;return!1}function isShadowIncludingInclusiveAncestor$2(e,t){for(let n=t;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$2,`isShadowIncludingInclusiveAncestor`);function isFullyActive(e){return e[q]!=null}function establishCloseWatcher(e,t,n,r){let i={cancelAction:t,closeAction:n,getEnabledState:r,isRunningCancelAction:!1,doc:e};return state$3(e).watchers.push(i),i}function destroyCloseWatcher(e){let t=Ql.get(e.doc)?.watchers,n=t===void 0?-1:t.indexOf(e);n!==-1&&t.splice(n,1)}function isActive(e){return Ql.get(e.doc)?.watchers.includes(e)??!1}function closeWatcherClose(e){isActive(e)&&e.getEnabledState()&&isFullyActive(e.doc)&&(destroyCloseWatcher(e),e.closeAction())}function requestCloseWatcher(e,t){if(!isActive(e)||!e.getEnabledState()||e.isRunningCancelAction||!isFullyActive(e.doc))return!0;e.isRunningCancelAction=!0;let n;try{n=e.cancelAction(!0)}finally{e.isRunningCancelAction=!1}return n?(closeWatcherClose(e),!0):!1}function processCloseWatchers(e){let t=Ql.get(e);return t===void 0||t.watchers.length===0?!1:(requestCloseWatcher(t.watchers[t.watchers.length-1],!0),!0)}function popoverState(e){if(e.ns!==`http://www.w3.org/1999/xhtml`||e.type!==1)return 0;let t=contentAttr(e,`popover`);return t===null?0:popoverKeyword(t)}function popoverKeyword(e){switch(e.toLowerCase()){case``:case`auto`:return 1;case`hint`:return 3}return 2}const eu=/* @__PURE__ */ new WeakMap;function record(e){let t=eu.get(e);return t===void 0&&(t={showing:!1,trigger:null,hiding:!1,openedMode:0,toggleTracker:null,closeWatcher:null},eu.set(e,t)),t}function isPopoverShowing(e){return eu.get(e)?.showing??!1}function matchesPopoverOpen(e){return(eu.get(e)?.showing??!1)&&popoverState(e)!==0}function showingPopoverList(e,t){let n=[],r=Ql.get(e);if(r===void 0)return n;for(let e of r.layer){let r=eu.get(e);r!==void 0&&r.showing&&r.openedMode===t&&n.push(e)}return n}function checkPopoverValidity(e,t,n){if(popoverState(e)===0&&e!==au)throw new DOMException(`Not supported on elements that do not have a valid value for the 'popover' attribute.`,`NotSupportedError`);if(t!==isPopoverShowing(e))return!1;if(!t&&!(e.flags&1)||!t&&!isFullyActive(e.doc)||n!==null&&e.doc!==n||e.tag===Y.dialog&&matchesModal(e))throw new DOMException(`Invalid on popover elements which aren't connected, or are modal dialogs.`,`InvalidStateError`);return!0}function validity(e,t,n,r){try{return checkPopoverValidity(e,t,n)}catch(e){if(r)throw e;return!1}}function queuePopoverToggle(e,t,n,r){let i=record(e);i.toggleTracker!==null&&(t=i.toggleTracker.oldState,i.toggleTracker.cancelled=!0,i.toggleTracker=null);let a={oldState:t,cancelled:!1};i.toggleTracker=a,queueElementTask(e,()=>{a.cancelled||(fireToggleEvent(e.node,`toggle`,t,n,!1,r===null?null:r.node),i.toggleTracker===a&&(i.toggleTracker=null))})}function topmostPopoverAncestor(e,t,n){let r=e.doc,i=showingPopoverList(r,1).concat(showingPopoverList(r,3)),a=lastIndexOfAncestor(i,e),o=t===null?-1:lastIndexOfAncestor(i,t,!0),s=Math.max(a,o);return s===-1?null:i[s]}function lastIndexOfAncestor(e,t,n=!1){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i===t){if(n)return r}else if(isFlatInclusiveAncestor(i,t))return r}return-1}function topmostAutoOrHintPopover(e){let t=showingPopoverList(e,3);if(t.length!==0)return t[t.length-1];let n=showingPopoverList(e,1);return n.length===0?null:n[n.length-1]}function hidePopoverStackUntil(e,t,n,r,i){let a=showingPopoverList(e,n),o=t===null?-1:a.indexOf(t),s=o===-1?0:o+1,c=a.slice(0,s);for(let e=a.length-1;e>=s;e--)hidePopover(a[e],r,i,!1,null);let l=showingPopoverList(e,n);for(let e=l.length-1;e>=0;e--){let t=l[e];c.includes(t)||hidePopover(t,r,!1,!1,null)}}function hidePopoversUntil(e,t,n,r){let i=t!==null&&showingPopoverList(e,3).includes(t);hidePopoverStackUntil(e,t,3,n,r),hidePopoverStackUntil(e,i?Ql.get(e)?.hintStackParent??null:t,1,n,r)}function showPopover(e,t,n){let r=e.doc,i=state$3(r);if(i.showingPopover||i.hidingPopoverNestingCount!==0){if(t)throw new DOMException(`A popover is already being shown or hidden.`,`InvalidStateError`);return}if(!validity(e,!1,null,t))return;i.showingPopover=!0;let cleanupShowingSteps=()=>{i.showingPopover=!1};if(!fireToggleEvent(e.node,`beforetoggle`,`closed`,`open`,!0,n===null?null:n.node)){cleanupShowingSteps();return}try{if(!checkPopoverValidity(e,!1,r)){cleanupShowingSteps();return}}catch(e){if(cleanupShowingSteps(),t)throw e;return}let a=!1,o=popoverState(e),s=o,c=null,l=record(e);if(o===1||o===3){if(c=topmostPopoverAncestor(e,n,!0),c!==null&&eu.get(c)?.openedMode===3&&s===1&&(s=3),hidePopoverStackUntil(r,c,3,a,!0),s===1&&hidePopoverStackUntil(r,c,1,a,!0),o!==popoverState(e)){if(cleanupShowingSteps(),t)throw new DOMException(`The popover attribute changed while showing the popover.`,`InvalidStateError`);return}try{if(!checkPopoverValidity(e,!1,r)){cleanupShowingSteps();return}}catch(e){if(cleanupShowingSteps(),t)throw e;return}topmostAutoOrHintPopover(r)===null&&(a=!0),l.openedMode=s===1?1:3,l.closeWatcher=establishCloseWatcher(r,()=>!0,()=>hidePopover(e,!0,!0,!1,null),()=>!0)}setPreviouslyFocused(e,null);let u=r[A];addToTopLayer(e),s===3&&c!==null&&eu.get(c)?.openedMode===1&&(i.hintStackParent=c),l.showing=!0,l.trigger=n,popoverFocusingSteps(e),a&&popoverState(e)!==0&&setPreviouslyFocused(e,u),cleanupShowingSteps(),queuePopoverToggle(e,`closed`,`open`,n)}function hidePopover(e,t,n,r,i){if(!validity(e,!0,null,r))return;let a=e.doc,o=state$3(a),s=record(e),c=s.hiding;s.hiding=!0,c&&(n=!1),o.hidingPopoverNestingCount++;let cleanupSteps=()=>{c||(s.hiding=!1),o.hidingPopoverNestingCount--};try{let r=showingPopoverList(a,1).includes(e),c=showingPopoverList(a,3).includes(e);if((s.openedMode===1||s.openedMode===3)&&(c&&hidePopoverStackUntil(a,e,3,t,n),e===o.hintStackParent&&hidePopoverStackUntil(a,null,3,t,n),r&&hidePopoverStackUntil(a,e,1,t,n),!checkPopoverValidity(e,!0,a))||n&&(fireToggleEvent(e.node,`beforetoggle`,`open`,`closed`,!1,i===null?null:i.node),!checkPopoverValidity(e,!0,a)))return;removeFromTopLayer(e),s.trigger=null,s.openedMode=0,s.showing=!1,(e===o.hintStackParent||showingPopoverList(a,3).length===0)&&(o.hintStackParent=null),n&&queuePopoverToggle(e,`open`,`closed`,i);let l=getPreviouslyFocused(e);if(l!==null){setPreviouslyFocused(e,null);let n=a[A];t&&n!==null&&isShadowIncludingInclusiveAncestor$2(e,n)&&tu?.(l)}s.closeWatcher!==null&&(destroyCloseWatcher(s.closeWatcher),s.closeWatcher=null)}catch(e){if(r)throw e}finally{cleanupSteps()}}function popoverFocusingSteps(e){if(e.tag===Y.dialog&&e.ns===`http://www.w3.org/1999/xhtml`){ru?.(e);return}let t=contentAttr(e,`autofocus`)===null?nu?.(e)??null:e;t!==null&&tu?.(t)}let tu=null,nu=null,ru=null,iu=null;function setTopLayerFocusHooks(e,t){tu=e,nu=t}function setTopLayerDialogHooks(e,t){ru=e,iu=t}function topLayerRemovingSteps(e){isPopoverShowing(e)&&popoverState(e)!==0?hidePopover(e,!1,!1,!1,null):isPopoverShowing(e)&&forceHidden(e),e.tag!==Y.dialog&&removeFromTopLayer(e)}function forceHidden(e){let t=record(e);t.showing=!1,t.trigger=null,t.openedMode=0,t.closeWatcher!==null&&(destroyCloseWatcher(t.closeWatcher),t.closeWatcher=null),removeFromTopLayer(e);let n=Ql.get(e.doc);n!==void 0&&(e===n.hintStackParent||showingPopoverList(e.doc,3).length===0)&&(n.hintStackParent=null)}let au=null;function popoverAttributeChanged(e,t,n){if(!isPopoverShowing(e))return;let r=t===null?0:popoverKeyword(t),i=n===null?0:popoverKeyword(n);if(r===i)return;let a=au;i===0&&(au=e);try{hidePopover(e,!0,!0,!1,null)}finally{au=a}isPopoverShowing(e)&&popoverState(e)===0&&forceHidden(e)}function nearestInclusiveOpenPopover(e){for(let t=e;t!==null;t=flatParent(t)){let e=eu.get(t);if(e!==void 0&&e.showing&&(e.openedMode===1||e.openedMode===3))return t}return null}function nearestInclusiveTargetPopover(e){for(let t=e;t!==null;t=flatParent(t)){if(t.type!==1)continue;let e=targetPopover(t);if(e!==null&&isPopoverShowing(e)){let t=popoverState(e);if(t===1||t===3)return e}}return null}function popoverStackPosition(e){if(e===null)return 0;let t=showingPopoverList(e.doc,3),n=showingPopoverList(e.doc,1),r=t.indexOf(e);if(r!==-1)return r+n.length+1;let i=n.indexOf(e);return i===-1?0:i+1}function topmostClickedPopover(e){let t=nearestInclusiveOpenPopover(e),n=nearestInclusiveTargetPopover(e);return popoverStackPosition(t)>popoverStackPosition(n)?t:n}function lightDismissOpenPopovers(e,t,n,r){if(topmostAutoOrHintPopover(e)===null)return;if(r===`pointerdown`){t.popoverPointerdownTarget=topmostClickedPopover(n);return}let i=topmostClickedPopover(n),a=i===t.popoverPointerdownTarget;t.popoverPointerdownTarget=null,a&&hidePopoversUntil(e,i,!1,!0)}function postDispatch(e,t){let n=e.type;if(n!==`pointerdown`&&n!==`pointerup`&&n!==`keydown`)return;let r=t?.[M];if(r===void 0)return;let i=r.doc,a=Ql.get(i);if(a!==void 0){if(n===`keydown`){if(e.key!==`Escape`||e.defaultPrevented||!isFullyActive(i))return;processCloseWatchers(i)}else r.flags&1&&(lightDismissOpenPopovers(i,a,r,n),iu?.(i,r,n))}}function dialogPointerdownTarget(e,t){let n=state$3(e);return t!==void 0&&(n.dialogPointerdownTarget=t),n.dialogPointerdownTarget}let ou=null;function setNestedWindowFactory(e){ou=e}const su=/* @__PURE__ */ new WeakMap;function frameContentWindow(e){return su.get(e)??null}function frameConnected(e){if(ou===null||su.has(e))return;let t=e[M].doc[q];if(t===null||t[ot])return;let n=e[M],r=ou(e,t,attr(n,`src`),attr(n,`srcdoc`));su.set(e,r),t._task(()=>{su.get(e)===r&&e.dispatchEvent(new Event(`load`))},0)}function frameDisconnected(e){let t=su.get(e);t!==void 0&&(su.delete(e),t.close())}function isCharacterData(e){let t=e.type;return t===3||t===4||t===8||t===7}function isText(e){return e.type===3||e.type===4}function nodeLength(e){switch(e.type){case 10:case 2:return 0;case 3:case 4:case 8:case 7:return e.data.length;default:return e.childCount}}function toNodeImpl(e,t,n=`Range`){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute '${t}' on '${n}': parameter 1 is not of type 'Node'.`);return e[M]}function compareBoundaryPoints(e,t,n,r){if(e===n)return t===r?0:t<r?-1:1;let i=0;for(let t=e.parent;t!==null;t=t.parent)i++;let a=0;for(let e=n.parent;e!==null;e=e.parent)a++;let o=e,s=n,c=null,l=null;for(;i>a;)c=o,o=o.parent,i--;for(;a>i;)l=s,s=s.parent,a--;for(;o!==s;)c=o,o=o.parent,l=s,s=s.parent;if(o===e)return indexOf(l)<t?1:-1;if(o===n)return indexOf(c)<r?-1:1;for(let e=c.next;e!==null;e=e.next)if(e===l)return-1;return 1}function childOfAncestor(e,t){let n=e;for(;n.parent!==t;)n=n.parent;return n}function commonAncestor(e,t){let n=e;for(;!isInclusiveAncestor(n,t);)n=n.parent;return n}var AbstractRange=class{[H];[W];[D];[k];[sn];constructor(e,t,n,r){this[H]=e,this[W]=t,this[D]=n,this[k]=r,this[sn]=null}get startContainer(){return this[H].node}get startOffset(){return this[W]}get endContainer(){return this[D].node}get endOffset(){return this[k]}get collapsed(){return this[H]===this[D]&&this[W]===this[k]}},StaticRange=class extends AbstractRange{constructor(e){if(typeof e!=`object`||!e)throw TypeError(`Failed to construct 'StaticRange': 1 argument required.`);for(let t of[`startContainer`,`startOffset`,`endContainer`,`endOffset`])if(e[t]===void 0)throw TypeError(`Failed to construct 'StaticRange': required member ${t} is undefined.`);let t=toNodeImpl(e.startContainer,`constructor`,`StaticRange`),n=toNodeImpl(e.endContainer,`constructor`,`StaticRange`);if(t.type===10||t.type===2||n.type===10||n.type===2)throw new DOMException(`Failed to construct 'StaticRange': Invalid boundary container.`,`InvalidNodeTypeError`);super(t,Number(e.startOffset)>>>0,n,Number(e.endOffset)>>>0)}},cu=class Range extends AbstractRange{static START_TO_START=0;static START_TO_END=1;static END_TO_END=2;static END_TO_START=3;constructor(e){let t=(e??currentDocument())[M];super(t,0,t,0),registerLiveRange(this)}static _create(e,t,n,r,i){let a=new Range(e);return a[H]=t,a[W]=n,a[D]=r,a[k]=i,refileRange(a),a}_treeRoot(){return treeRoot(this[H])}get commonAncestorContainer(){return commonAncestor(this[H],this[D]).node}_setStart(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`);(treeRoot(e)!==this._treeRoot()||compareBoundaryPoints(e,t,this[D],this[k])>0)&&(this[D]=e,this[k]=t),this[H]=e,this[W]=t,refileRange(this)}_setEnd(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`);(treeRoot(e)!==this._treeRoot()||compareBoundaryPoints(e,t,this[H],this[W])<0)&&(this[H]=e,this[W]=t),this[D]=e,this[k]=t,refileRange(this)}setStart(e,t){this._setStart(toNodeImpl(e,`setStart`),Number(t)>>>0)}setEnd(e,t){this._setEnd(toNodeImpl(e,`setEnd`),Number(t)>>>0)}setStartBefore(e){let t=toNodeImpl(e,`setStartBefore`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setStart(n,indexOf(t))}setStartAfter(e){let t=toNodeImpl(e,`setStartAfter`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setStart(n,indexOf(t)+1)}setEndBefore(e){let t=toNodeImpl(e,`setEndBefore`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setEnd(n,indexOf(t))}setEndAfter(e){let t=toNodeImpl(e,`setEndAfter`),n=t.parent;if(n===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);this._setEnd(n,indexOf(t)+1)}collapse(e=!1){e?(this[D]=this[H],this[k]=this[W]):(this[H]=this[D],this[W]=this[k])}_select(e){let t=e.parent;if(t===null)throw new DOMException(`The given Node has no parent.`,`InvalidNodeTypeError`);let n=indexOf(e);this[H]=t,this[W]=n,this[D]=t,this[k]=n+1,refileRange(this)}selectNode(e){this._select(toNodeImpl(e,`selectNode`))}_selectContents(e){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);this[H]=e,this[W]=0,this[D]=e,this[k]=nodeLength(e),refileRange(this)}selectNodeContents(e){this._selectContents(toNodeImpl(e,`selectNodeContents`))}compareBoundaryPoints(e,t){let n=Number(e)>>>0&65535;if(n>3)throw new DOMException(`The comparison method provided must be one of 'START_TO_START', 'START_TO_END', 'END_TO_END', or 'END_TO_START'.`,`NotSupportedError`);if(!(t instanceof Range))throw TypeError(`Failed to execute 'compareBoundaryPoints' on 'Range': parameter 2 is not of type 'Range'.`);if(this._treeRoot()!==t._treeRoot())throw new DOMException(`The two Ranges are not in the same tree.`,`WrongDocumentError`);switch(n){case 0:return compareBoundaryPoints(this[H],this[W],t[H],t[W]);case 1:return compareBoundaryPoints(this[D],this[k],t[H],t[W]);case 2:return compareBoundaryPoints(this[D],this[k],t[D],t[k]);default:return compareBoundaryPoints(this[H],this[W],t[D],t[k])}}_contains(e){return compareBoundaryPoints(e,0,this[H],this[W])>0&&compareBoundaryPoints(e,nodeLength(e),this[D],this[k])<0}deleteContents(){if(this.collapsed)return;let e=this[H],t=this[W],n=this[D],r=this[k];if(e===n&&isCharacterData(e)){replaceData(e,t,r-t,``);return}let i=containedNodes(this,!0),a,o;if(isInclusiveAncestor(e,n))a=e,o=t;else{let t=e;for(;t.parent!==null&&!isInclusiveAncestor(t.parent,n);)t=t.parent;a=t.parent,o=indexOf(t)+1}isCharacterData(e)&&replaceData(e,t,e.data.length-t,``);for(let e=0;e<i.length;e++){let t=i[e];t.parent!==null&&remove(t,!1)}isCharacterData(n)&&replaceData(n,0,r,``),this[H]=this[D]=a,this[W]=this[k]=o}extractContents(){return extract(this,this[H],this[W],this[D],this[k]).node}cloneContents(){return cloneContents(this[H],this[W],this[D],this[k]).node}insertNode(e){insertIntoRange(this,toNodeImpl(e,`insertNode`))}surroundContents(e){let t=toNodeImpl(e,`surroundContents`),n=commonAncestor(this[H],this[D]);for(let e=this[H];e!==n;e=e.parent)if(!isText(e)&&!isInclusiveAncestor(e,this[D]))throw new DOMException(`The Range has partially selected a non-Text node.`,`InvalidStateError`);for(let e=this[D];e!==n;e=e.parent)if(!isText(e)&&!isInclusiveAncestor(e,this[H]))throw new DOMException(`The Range has partially selected a non-Text node.`,`InvalidStateError`);let r=t.type;if(r===9||r===10||r===11)throw new DOMException(`The node provided is a Document, DocumentType or DocumentFragment.`,`InvalidNodeTypeError`);let i=extract(this,this[H],this[W],this[D],this[k]);t.first!==null&&replaceAll(null,t),insertIntoRange(this,t),append(i,t),this._select(t)}cloneRange(){return Range._create(this[H].doc,this[H],this[W],this[D],this[k])}detach(){}isPointInRange(e,t){let n=toNodeImpl(e,`isPointInRange`),r=Number(t)>>>0;if(treeRoot(n)!==this._treeRoot())return!1;if(n.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(r>nodeLength(n))throw new DOMException(`There is no child at offset ${r}.`,`IndexSizeError`);return compareBoundaryPoints(n,r,this[H],this[W])>=0&&compareBoundaryPoints(n,r,this[D],this[k])<=0}comparePoint(e,t){let n=toNodeImpl(e,`comparePoint`),r=Number(t)>>>0;if(treeRoot(n)!==this._treeRoot())throw new DOMException(`The node provided and the Range are not in the same tree.`,`WrongDocumentError`);if(n.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(r>nodeLength(n))throw new DOMException(`There is no child at offset ${r}.`,`IndexSizeError`);return compareBoundaryPoints(n,r,this[H],this[W])<0?-1:+(compareBoundaryPoints(n,r,this[D],this[k])>0)}intersectsNode(e){let t=toNodeImpl(e,`intersectsNode`);if(treeRoot(t)!==this._treeRoot())return!1;let n=t.parent;if(n===null)return!0;let r=indexOf(t);return compareBoundaryPoints(n,r,this[D],this[k])<0&&compareBoundaryPoints(n,r+1,this[H],this[W])>0}toString(){let e=this[H],t=this[D];if(e===t&&isText(e))return e.data.slice(this[W],this[k]);let n=``;isText(e)&&(n+=e.data.slice(this[W]));let r=treeRoot(e),i=isCharacterData(t)?t:afterBoundary(t,this[k],r);for(let t=afterBoundary(e,this[W],r);t!==null&&t!==i;t=nextInTree(t,r))isText(t)&&(n+=t.data);return isText(t)&&(n+=t.data.slice(0,this[k])),n}createContextualFragment(e){if(arguments.length===0)throw TypeError(`Failed to execute 'createContextualFragment' on 'Range': 1 argument required, but only 0 present.`);let t=this[H],n;switch(t.type){case 9:case 11:n=null;break;case 1:n=t;break;default:{let e=t.parent;n=e!==null&&e.type===1?e:null}}return(n===null||n.name===`html`&&n.ns===`http://www.w3.org/1999/xhtml`&&n.flags&2)&&(n=t.doc.createElement(`body`)[M]),parseFragment(String(e),n).node}getClientRects(){return new DOMRectList}getBoundingClientRect(){return new No}};for(let[e,t]of[[`START_TO_START`,0],[`START_TO_END`,1],[`END_TO_END`,2],[`END_TO_START`,3]])Object.defineProperty(cu.prototype,e,{value:t,enumerable:!0});Object.defineProperty(AbstractRange.prototype,Symbol.toStringTag,{value:`AbstractRange`,configurable:!0}),Object.defineProperty(cu.prototype,Symbol.toStringTag,{value:`Range`,configurable:!0}),Object.defineProperty(StaticRange.prototype,Symbol.toStringTag,{value:`StaticRange`,configurable:!0});function afterBoundary(e,t,n){if(!isCharacterData(e)){let n=childAt(e,t);if(n!==null)return n}return nextSkippingChildren(e,n)}function containedNodes(e,t){let n=[],r=treeRoot(e[H]),i=isCharacterData(e[D])?e[D]:afterBoundary(e[D],e[k],r),a=afterBoundary(e[H],e[W],r);for(;a!==null&&a!==i;)e._contains(a)?(n.push(a),a=t?nextSkippingChildren(a,r):nextInTree(a,r)):a=nextInTree(a,r);return n}function rangeContents(e,t,n,r){let i=commonAncestor(e,n),a=isInclusiveAncestor(e,n)?null:childOfAncestor(e,i),o=isInclusiveAncestor(n,e)?null:childOfAncestor(n,i),s=[],c=a===null?childAt(i,t):a.next,l=o===null?childAt(i,r):o;for(;c!==null&&c!==l;c=c.next){if(c.type===10)throw new DOMException(`A DocumentType node cannot be extracted.`,`HierarchyRequestError`);s.push(c)}return{first:a,last:o,contained:s}}function cloneWithData(e,t){let n=cloneNode(e,e.doc,!1);return n.data=t,n}function extract(e,t,n,r,i){let a=t.doc.createDocumentFragment()[M];if(t===r&&n===i)return a;if(t===r&&isCharacterData(t))return append(cloneWithData(t,t.data.slice(n,i)),a),replaceData(t,n,i-n,``),a;let{first:o,last:s,contained:c}=rangeContents(t,n,r,i),l,u;if(isInclusiveAncestor(t,r))l=t,u=n;else{let e=t;for(;e.parent!==null&&!isInclusiveAncestor(e.parent,r);)e=e.parent;l=e.parent,u=indexOf(e)+1}if(o!==null){if(isCharacterData(o))append(cloneWithData(t,t.data.slice(n)),a),replaceData(t,n,t.data.length-n,``);else{let e=cloneNode(o,o.doc,!1);append(e,a),append(extract(null,t,n,o,nodeLength(o)),e)}}for(let e=0;e<c.length;e++)append(c[e],a);if(s!==null){if(isCharacterData(s))append(cloneWithData(r,r.data.slice(0,i)),a),replaceData(r,0,i,``);else{let e=cloneNode(s,s.doc,!1);append(e,a),append(extract(null,s,0,r,i),e)}}return e!==null&&(e[H]=e[D]=l,e[W]=e[k]=u),a}function cloneContents(e,t,n,r){let i=e.doc.createDocumentFragment()[M];if(e===n&&t===r)return i;if(e===n&&isCharacterData(e))return append(cloneWithData(e,e.data.slice(t,r)),i),i;let{first:a,last:o,contained:s}=rangeContents(e,t,n,r);if(a!==null){if(isCharacterData(a))append(cloneWithData(e,e.data.slice(t)),i);else{let n=cloneNode(a,a.doc,!1);append(n,i),append(cloneContents(e,t,a,nodeLength(a)),n)}}for(let e=0;e<s.length;e++)append(cloneNode(s[e],s[e].doc,!0),i);if(o!==null){if(isCharacterData(o))append(cloneWithData(n,n.data.slice(0,r)),i);else{let e=cloneNode(o,o.doc,!1);append(e,i),append(cloneContents(o,0,n,r),e)}}return i}function insertIntoRange(e,t){let n=e[H],r=e[W];if(n.type===7||n.type===8||isText(n)&&n.parent===null||n===t)throw new DOMException(`The Range's start node cannot contain the inserted node.`,`HierarchyRequestError`);let i=isText(n)?n:childAt(n,r),a=i===null?n:i.parent;ensurePreInsertionValidity(t,a,i),isText(n)&&(i=splitText(n,r)),t===i&&(i=i.next),t.parent!==null&&remove(t,!1);let o=i===null?nodeLength(a):indexOf(i);o+=t.type===11?nodeLength(t):1,preInsert(t,a,i),e.collapsed&&(e[D]=a,e[k]=o)}const lu=Object.freeze({FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048});function rootImpl(e,t){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'create${t}' on 'Document': parameter 1 is not of type 'Node'.`);return e[M]}var Traverser=class{[ur];[ti];[Wt];[Re];constructor(e,t,n){this[ur]=e,this[ti]=Number(t)>>>0,this[Wt]=n===void 0?null:n,this[Re]=!1}get root(){return this[ur].node}get whatToShow(){return this[ti]}get filter(){return this[Wt]}_filterNode(e){if(this[Re])throw new DOMException(`Recursive node filtering is not allowed.`,`InvalidStateError`);if(!(this[ti]&1<<e.type-1))return 3;let t=this[Wt];if(t===null)return 1;this[Re]=!0;let n;try{if(typeof t==`function`)n=t.call(void 0,e.node);else{let r=t.acceptNode;if(typeof r!=`function`)throw TypeError(`NodeFilter.acceptNode is not a function.`);n=r.call(t,e.node)}}finally{this[Re]=!1}return Number(n)>>>0&65535}},NodeIterator=class extends Traverser{[cr];[Wn];[_n];constructor(e,t=4294967295,n=null){let r=rootImpl(e,`NodeIterator`);super(r,t,n),this[cr]=r,this[Wn]=!0,this[_n]=null,registerNodeIterator(this)}get referenceNode(){return this[cr].node}get pointerBeforeReferenceNode(){return this[Wn]}#e(e){let t=this[ur],n={[ur]:t,[cr]:this[cr],[Wn]:this[Wn],[_n]:null};this[_n]=n;try{for(;;){let r=n[cr],i=n[Wn];if(e){if(i)i=!1;else{let e=nextInTree(r,t);if(e===null)return null;r=e}}else if(i){let e=previousInTree(r,t);if(e===null)return null;r=e}else i=!0;if(n[cr]=r,n[Wn]=i,this._filterNode(r)===1)return this[cr]=n[cr],this[Wn]=n[Wn],r.node}}finally{this[_n]=null}}nextNode(){return this.#e(!0)}previousNode(){return this.#e(!1)}detach(){}},TreeWalker=class extends Traverser{[bt];constructor(e,t=4294967295,n=null){let r=rootImpl(e,`TreeWalker`);super(r,t,n),this[bt]=r}get currentNode(){return this[bt].node}set currentNode(e){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to set the 'currentNode' property on 'TreeWalker': The provided value is not of type 'Node'.`);this[bt]=e[M]}parentNode(){let e=this[bt];for(;e!==null&&e!==this[ur];)if(e=e.parent,e!==null&&this._filterNode(e)===1)return this[bt]=e,e.node;return null}#e(e){let t=e?this[bt].first:this[bt].last;for(;t!==null;){let n=this._filterNode(t);if(n===1)return this[bt]=t,t.node;if(n===3){let n=e?t.first:t.last;if(n!==null){t=n;continue}}for(;t!==null;){let n=e?t.next:t.prev;if(n!==null){t=n;break}let r=t.parent;if(r===null||r===this[ur]||r===this[bt])return null;t=r}}return null}firstChild(){return this.#e(!0)}lastChild(){return this.#e(!1)}#t(e){let t=this[bt];if(t===this[ur])return null;for(;;){let n=e?t.next:t.prev;for(;n!==null;){t=n;let r=this._filterNode(t);if(r===1)return this[bt]=t,t.node;n=e?t.first:t.last,(r===2||n===null)&&(n=e?t.next:t.prev)}let r=t.parent;if(r===null||r===this[ur]||(t=r,this._filterNode(t)===1))return null}}nextSibling(){return this.#t(!0)}previousSibling(){return this.#t(!1)}previousNode(){let e=this[bt];for(;e!==this[ur];){let t=e.prev;for(;t!==null;){e=t;let n=this._filterNode(e);for(;n!==2&&e.first!==null;)e=e.last,n=this._filterNode(e);if(n===1)return this[bt]=e,e.node;t=e.prev}let n=e.parent;if(e===this[ur]||n===null)return null;if(e=n,this._filterNode(e)===1)return this[bt]=e,e.node}return null}nextNode(){let e=this[bt],t=1;for(;;){for(;t!==2&&e.first!==null;)if(e=e.first,t=this._filterNode(e),t===1)return this[bt]=e,e.node;let n=null,r=e;for(;r!==null;){if(r===this[ur])return null;if(n=r.next,n!==null){e=n;break}r=r.parent}if(r===null)return null;if(t=this._filterNode(e),t===1)return this[bt]=e,e.node}}};Object.defineProperty(NodeIterator.prototype,Symbol.toStringTag,{value:`NodeIterator`,configurable:!0}),Object.defineProperty(TreeWalker.prototype,Symbol.toStringTag,{value:`TreeWalker`,configurable:!0});function toImpl(e,t){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute '${t}' on 'Selection': parameter 1 is not of type 'Node'.`);return e[M]}function arity(e,t,n){if(e<t)throw TypeError(`Failed to execute '${n}' on 'Selection': ${t} argument${t===1?``:`s`} required, but only ${e} present.`)}function checkBoundary(e,t){if(e.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(t>nodeLength(e))throw new DOMException(`There is no child at offset ${t}.`,`IndexSizeError`)}var Selection=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=null,this.#n=0,this.#r=!1}#i(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[j];if(e===null)return!1;t=treeRoot(e[M])}return t===this.#e[M]}#a(e,t){let n=this.#t;this.#t=e,this.#n=t,n!==e&&(n===null||e===null||n[H]!==e[H]||n[W]!==e[W]||n[D]!==e[D]||n[k]!==e[k])&&this.#o()}#o(){this.#r||(this.#r=!0,queueUserAgentTask(()=>{this.#r=!1;let e=this.#e.defaultView;e!==null&&e.closed!==!0&&fireAnEvent(`selectionchange`,this.#e)}))}get anchorNode(){let e=this.#t;return e===null?null:(this.#n===2?e[D]:e[H]).node}get anchorOffset(){let e=this.#t;return e===null?0:this.#n===2?e[k]:e[W]}get focusNode(){let e=this.#t;return e===null?null:(this.#n===2?e[H]:e[D]).node}get focusOffset(){let e=this.#t;return e===null?0:this.#n===2?e[W]:e[k]}get isCollapsed(){let e=this.#t;return e===null||e.collapsed}get rangeCount(){return this.#t===null?0:1}get type(){let e=this.#t;return e===null?`None`:e.collapsed?`Caret`:`Range`}get direction(){let e=this.#t;return e===null||e.collapsed||this.#n===0?`none`:this.#n===2?`backward`:`forward`}getRangeAt(e){let t=this.#t;if(Number(e)!==0||t===null)throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (${this.rangeCount}).`,`IndexSizeError`);return t}addRange(e){if(arity(arguments.length,1,`addRange`),!(e instanceof cu))throw TypeError(`Failed to execute 'addRange' on 'Selection': parameter 1 is not of type 'Range'.`);e._treeRoot()===this.#e[M]&&this.#t===null&&this.#a(e,1)}removeRange(e){if(arity(arguments.length,1,`removeRange`),!(e instanceof cu))throw TypeError(`Failed to execute 'removeRange' on 'Selection': parameter 1 is not of type 'Range'.`);if(e!==this.#t)throw new DOMException(`The given range isn't in document.`,`NotFoundError`);this.#a(null,0)}removeAllRanges(){this.#a(null,0)}empty(){this.removeAllRanges()}collapse(e,t=0){if(arity(arguments.length,1,`collapse`),e===null){this.removeAllRanges();return}let n=toImpl(e,`collapse`),r=Number(t)>>>0;if(checkBoundary(n,r),!this.#i(n))return;let i=new cu(this.#e);i._setStart(n,r),i._setEnd(n,r),this.#a(i,1)}setPosition(e,t=0){arity(arguments.length,1,`setPosition`),this.collapse(e,t)}collapseToStart(){let e=this.#t;if(e===null)throw new DOMException(`There is no selection to collapse.`,`InvalidStateError`);let t=new cu(this.#e);t._setStart(e[H],e[W]),t._setEnd(e[H],e[W]),this.#a(t,1)}collapseToEnd(){let e=this.#t;if(e===null)throw new DOMException(`There is no selection to collapse.`,`InvalidStateError`);let t=new cu(this.#e);t._setStart(e[D],e[k]),t._setEnd(e[D],e[k]),this.#a(t,1)}extend(e,t=0){arity(arguments.length,1,`extend`);let n=toImpl(e,`extend`),r=Number(t)>>>0;if(!this.#i(n))return;let i=this.#t;if(i===null)throw new DOMException(`This Selection object doesn't have any Ranges.`,`InvalidStateError`);checkBoundary(n,r);let a=this.#n===2?i[D]:i[H],o=this.#n===2?i[k]:i[W],s=new cu(this.#e);treeRoot(n)===i._treeRoot()?compareBoundaryPoints(a,o,n,r)<=0?(s._setStart(a,o),s._setEnd(n,r)):(s._setStart(n,r),s._setEnd(a,o)):(s._setStart(n,r),s._setEnd(n,r));let c=treeRoot(n)===treeRoot(a)&&compareBoundaryPoints(n,r,a,o)<0;this.#a(s,c?2:1)}setBaseAndExtent(e,t,n,r){arity(arguments.length,4,`setBaseAndExtent`);let i=toImpl(e,`setBaseAndExtent`),a=toImpl(n,`setBaseAndExtent`),o=Number(t)>>>0,s=Number(r)>>>0;if(checkBoundary(i,o),checkBoundary(a,s),!this.#i(i)||!this.#i(a))return;let c=new cu(this.#e),l=compareBoundaryPoints(a,s,i,o)<0;l?(c._setStart(a,s),c._setEnd(i,o)):(c._setStart(i,o),c._setEnd(a,s)),this.#a(c,l?2:1)}selectAllChildren(e){let t=toImpl(e,`selectAllChildren`);if(t.type===10)throw new DOMException(`DocumentType Node can't be used as boundary point.`,`InvalidNodeTypeError`);if(!this.#i(t))return;let n=new cu(this.#e);n._setStart(t,0),n._setEnd(t,t.childCount),this.#a(n,1)}deleteFromDocument(){this.#t?.deleteContents()}containsNode(e,t=!1){arity(arguments.length,1,`containsNode`);let n=toImpl(e,`containsNode`),r=this.#t;if(r===null||!this.#i(n)||treeRoot(n)!==r._treeRoot())return!1;let i=nodeLength(n);return t?compareBoundaryPoints(r[H],r[W],n,i)<=0&&compareBoundaryPoints(r[D],r[k],n,0)>=0:compareBoundaryPoints(r[H],r[W],n,0)<=0&&compareBoundaryPoints(r[D],r[k],n,i)>=0}getComposedRanges(...e){let t=this.#t;return t===null?[]:[new StaticRange({startContainer:t[H].node,startOffset:t[W],endContainer:t[D].node,endOffset:t[k]})]}modify(e,t,n){}toString(){let e=this.#t;return e===null?``:e.toString()}};Object.defineProperty(Selection.prototype,Symbol.toStringTag,{value:`Selection`,configurable:!0});const uu={__proto__:null,beforeunloadevent:BeforeUnloadEvent,compositionevent:CompositionEvent,customevent:CustomEvent,devicemotionevent:null,deviceorientationevent:null,dragevent:DragEvent,event:Event,events:Event,focusevent:FocusEvent,hashchangeevent:HashChangeEvent,htmlevents:Event,keyboardevent:KeyboardEvent,messageevent:MessageEvent,mouseevent:MouseEvent,mouseevents:MouseEvent,storageevent:StorageEvent,svgevents:Event,textevent:TextEvent,touchevent:TouchEvent,uievent:UIEvent,uievents:UIEvent};function createEvent(e){let t=uu[String(e).replace(/[A-Z]/g,e=>e.toLowerCase())];if(t==null)throw new DOMException(`Failed to execute 'createEvent' on 'Document': The provided event type ('${e}') is invalid.`,`NotSupportedError`);let n=withInternalConstruct(()=>new t(``));return n._s.flags&=-33,n}var Z=class Document extends Node{[q];[K];[Pr];[fn];[A];[N];[ft];[G];[Mn];[pn];[yt];[ii];[Cr];[er];[Pt];[qt];[Jt];[Le];[Ge];[Ke];[qe];[We];constructor(){super(9,null),this[M].flags|=1,this[q]=null,this[K]=0,this[Pr]=0,this[fn]=/* @__PURE__ */ new Map,this[A]=null,this[N]=!1,this[ft]=`application/xml`,this[G]=`about:blank`,this[Mn]=`no-quirks`,this[pn]=null,this[yt]=null,this[ii]=null,this[Cr]=null,this[Jt]=null,this[er]=null,this[Pt]=null,this[qt]=null,this[Le]=null,this[Ge]=null,this[Ke]=``,this[qe]=-1,this[We]=``,hideInternals(this)}static _createHTML(e,t=`about:blank`){let n=new Document;return n[q]=e,n[N]=!0,n[ft]=`text/html`,n[G]=t,n}_idAdd(e){let t=e.id,n=this[fn].get(t);n===void 0?this[fn].set(t,e):Array.isArray(n)?n.push(e):this[fn].set(t,[n,e])}_idRemove(e){let t=e.id,n=this[fn].get(t);if(n!==void 0){if(n===e)this[fn].delete(t);else if(Array.isArray(n)){let r=n.indexOf(e);r!==-1&&n.splice(r,1),n.length===1&&this[fn].set(t,n[0])}}}_idLookup(e){let t=this[fn].get(e);if(t===void 0)return null;if(!Array.isArray(t))return t;let n=this[M];for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))if(t.id===e)return t;return null}get URL(){return this[G]}get documentURI(){return this[G]}get baseURI(){if(this[qe]===this[K]&&this[We]===this[G])return this[Ke];let e=documentBaseURL(this);return this[Ke]=e,this[qe]=this[K],this[We]=this[G],e}get compatMode(){return this[Mn]===`quirks`?`BackCompat`:`CSS1Compat`}get characterSet(){return`UTF-8`}get charset(){return`UTF-8`}get inputEncoding(){return`UTF-8`}get contentType(){return this[ft]}get defaultView(){return this[q]}get implementation(){return this[pn]??=new DOMImplementation(this)}get doctype(){for(let e=this[M].first;e!==null;e=e.next)if(e.type===10)return e.node;return null}get documentElement(){let e=firstElementChild(this[M]);return e===null?null:e.node}get head(){let e=firstElementChild(this[M]);if(e===null||e.tag!==Y.html)return null;for(let t=e.first;t!==null;t=t.next)if(t.type===1&&t.tag===Y.head)return t.node;return null}get body(){let e=firstElementChild(this[M]);if(e===null||e.tag!==Y.html)return null;for(let t=e.first;t!==null;t=t.next)if(t.type===1&&(t.tag===Y.body||t.tag===Y.frameset))return t.node;return null}set body(e){let t=e==null?null:e[M];if(t===null||t.ns!==`http://www.w3.org/1999/xhtml`||t.tag!==Y.body&&t.tag!==Y.frameset)throw new DOMException(`The new body element must be a 'body' or 'frameset' element.`,`HierarchyRequestError`);let n=this.body;if(e===n)return;if(n!==null){n.parentNode.replaceChild(e,n);return}let r=this.documentElement;if(r===null)throw new DOMException(`The document has no document element.`,`HierarchyRequestError`);r.appendChild(e)}createElement(e,t){let n=String(e);if(!isValidElementLocalName(n))throw new DOMException(`"${n}" is not a valid element name.`,`InvalidCharacterError`);this[N]&&(n=asciiLowercase$1(n));let r=this[N]||this[ft]===`application/xhtml+xml`?ie:null,i=typeof t==`object`&&t&&t.is!==void 0?String(t.is):null;return createElementImplSync(this,n,r,null,i).node}createElementNS(e,t,n){let{namespace:r,prefix:i,localName:a}=validateAndExtract(e===void 0?null:e,String(t),`element`),o=typeof n==`object`&&n&&n.is!==void 0?String(n.is):null;return createElementImplSync(this,a,r,i,o).node}createDocumentFragment(){return new DocumentFragment(this)}createTextNode(e){return new Text(String(e),this)}createCDATASection(e){if(this[N])throw new DOMException(`CDATA sections are not supported in HTML documents.`,`NotSupportedError`);if(String(e).includes(`]]>`))throw new DOMException(`Data contains "]]>".`,`InvalidCharacterError`);return new CDATASection(String(e),this)}createComment(e){return new Comment(String(e),this)}createProcessingInstruction(e,t){if(!isXMLName(String(e)))throw new DOMException(`"${e}" is not a valid processing instruction target.`,`InvalidCharacterError`);if(String(t).includes(`?>`))throw new DOMException(`Data contains "?>".`,`InvalidCharacterError`);return new ProcessingInstruction(String(e),String(t),this)}createAttribute(e){let t=String(e);if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);return this[N]&&(t=asciiLowercase$1(t)),new Attr(this,t,``,null,null,null)}createAttributeNS(e,t){let{namespace:n,prefix:r,localName:i}=validateAndExtract(e===void 0?null:e,String(t),`attribute`);return new Attr(this,i,``,n,r,null)}importNode(e,t=!1){if(e[M].type===9||e[M].flags&32)throw new DOMException(`Documents and shadow roots cannot be imported.`,`NotSupportedError`);return cloneNode(e[M],this,t).node}adoptNode(e){if(e[M].type===9)throw new DOMException(`Documents cannot be adopted.`,`NotSupportedError`);if(e[M].flags&32)throw new DOMException(`Shadow roots cannot be adopted.`,`HierarchyRequestError`);return adopt(e[M],this),ji&&flushCEReactions(),e}getElementsByTagName(e){return getElementsByTagName(this[M],String(e))}getElementsByTagNameNS(e,t){return getElementsByTagNameNS(this[M],e,String(t))}getElementsByClassName(e){return getElementsByClassName(this[M],String(e))}getElementsByName(e){return new NameNodeList(this[M],String(e))}get forms(){return this[Jt]??=withNamedProperties(cachedCollection(this[M],`forms`,e=>e.tag===Y.form&&e.ns===`http://www.w3.org/1999/xhtml`))}get images(){return cachedCollection(this[M],`images`,e=>e.tag===Y.img&&e.ns===`http://www.w3.org/1999/xhtml`)}get embeds(){return cachedCollection(this[M],`embeds`,e=>e.tag===Y.embed&&e.ns===`http://www.w3.org/1999/xhtml`)}get plugins(){return this.embeds}get scripts(){return cachedCollection(this[M],`scripts`,e=>e.tag===Y.script&&e.ns===`http://www.w3.org/1999/xhtml`)}get links(){return cachedCollection(this[M],`links`,e=>(e.tag===Y.a||e.tag===Y.area)&&e.ns===`http://www.w3.org/1999/xhtml`&&attr(e,`href`)!==null)}get anchors(){return cachedCollection(this[M],`anchors`,e=>e.tag===Y.a&&e.ns===`http://www.w3.org/1999/xhtml`&&attr(e,`name`)!==null)}get applets(){return cachedCollection(this[M],`applets`,()=>!1)}createRange(){return new cu(this)}createTreeWalker(e,t=4294967295,n=null){return new TreeWalker(e,t,n)}createNodeIterator(e,t=4294967295,n=null){return new NodeIterator(e,t,n)}getSelection(){return this[q]===null?null:this[Cr]??=new Selection(this)}open(...e){if(e.length>=3)return this[q]?.open?.(...e)??null;if(!this[N])throw new DOMException(`Only HTML documents can be opened.`,`InvalidStateError`);return this._replaceAll(null),this[ii]=``,this}write(...e){if(!this[N])throw new DOMException(`Only HTML documents can be written to.`,`InvalidStateError`);this[ii]===null&&this.open(),this[ii]+=e.map(String).join(``),this._replaceAll(null),parseDocument(this[ii],this)}writeln(...e){this.write(...e,`
39
+ `)}close(){if(!this[N])throw new DOMException(`Only HTML documents can be closed.`,`InvalidStateError`);this[ii]=null}_cloneDocument(){let e=this instanceof XMLDocument?new XMLDocument:new Document;return e[Ge]=this.baseURI,e[N]=this[N],e[ft]=this[ft],e[G]=this[G],e[Mn]=this[Mn],e}createEvent(e){if(arguments.length===0)throw TypeError(`Failed to execute 'createEvent' on 'Document': 1 argument required, but only 0 present.`);return createEvent(e)}_getTheParent(e){return e.type===`load`||this[q]===null?null:this[q]}};installParentNode(Z),installNonElementParentNode(Z),installEventHandlers(Z.prototype,`document`);function documentBaseURL(e){let t=e[G],n=e[Le]!==null&&(t===`about:blank`||t===`about:srcdoc`)?e[Le]:t,r=e[M];for(let e=nextElementInTree(r,r);e!==null;e=nextElementInTree(e,r)){if(e.tag!==Y.base||e.ns!==`http://www.w3.org/1999/xhtml`)continue;let t=attr(e,`href`);if(t===null)continue;let r=URL.parse(t,n);return r===null||r.protocol===`data:`||r.protocol===`javascript:`?n:r.href}return e[Ge]??n}var XMLDocument=class extends Z{};Object.defineProperty(XMLDocument.prototype,Symbol.toStringTag,{value:`XMLDocument`,configurable:!0});var DOMImplementation=class{[Ft];constructor(e){if(!(e instanceof Z))throw TypeError(`Illegal constructor`);this[Ft]=e}createDocumentType(e,t,n){if(!isValidDoctypeName(String(e)))throw new DOMException(`"${e}" is not a valid doctype name.`,`InvalidCharacterError`);return new DocumentType(this[Ft],String(e),String(t),String(n))}createHTMLDocument(e){let t=Z._createHTML(null);t.appendChild(new DocumentType(t,`html`,``,``));let n=t.createElement(`html`);t.appendChild(n);let r=t.createElement(`head`);if(n.appendChild(r),e!==void 0){let n=t.createElement(`title`);n.appendChild(t.createTextNode(String(e))),r.appendChild(n)}return n.appendChild(t.createElement(`body`)),t}createDocument(e,t,n=null){arguments.length<2&&argumentsRequired(`createDocument`,`DOMImplementation`,2,arguments.length);let r=new XMLDocument;return e===`http://www.w3.org/1999/xhtml`?r[ft]=`application/xhtml+xml`:e===`http://www.w3.org/2000/svg`&&(r[ft]=`image/svg+xml`),n!==null&&r.appendChild(n),t!==null&&t!==``&&r.appendChild(r.createElementNS(e,t)),r}hasFeature(){return!0}};let du=Object.create(null);function registerDomNamespace(e){du=e}let fu=null;function isInterfaceName(e){let t=e.charCodeAt(0);return t>=65&&t<=90}const pu=/* @__PURE__ */ new Set([`ResizeObserver`]);function optInInterfaces(){let e=Object.create(null);for(let t of pu)du[t]!==void 0&&(e[t]=du[t]);return e}function ensureInterfaces(e,t={}){if(fu!==null)return fu;let n=Object.create(null),r=du;for(let e of Object.keys(r)){if(!isInterfaceName(e)||pu.has(e))continue;let t=r[e];(typeof t==`function`||typeof t==`object`&&t)&&(n[e]=t)}for(let e of Object.keys(t))e in n||(n[e]=t[e]);let i={};for(let t of Object.keys(n))Object.hasOwn(e,t)||(i[t]={value:n[t],writable:!0,configurable:!0,enumerable:!1});let a=Object.create(Object.getPrototypeOf(e));return Object.defineProperties(a,i),Object.setPrototypeOf(e,a),fu=n,n}function eventInterface(e){return du[e]}function domExport(e){return du[e]}const mu=[`text/xml`,`application/xml`,`application/xhtml+xml`,`image/svg+xml`];var DOMParser=class{parseFromString(e,t){let n=currentWindowOrNull()?.document.URL??`about:blank`;if(t=String(t),t===`text/html`){let t=Z._createHTML(null,n);return parseDocument(String(e),t),t}if(!mu.includes(t))throw TypeError(`Failed to execute 'parseFromString' on 'DOMParser': The provided value '${t}' is not a valid enum value of type DOMParserSupportedType.`);let r=new Z;return r[ft]=t,r[G]=n,parseXML(String(e),r,t),r}},XMLSerializer=class{serializeToString(e){return serializeXML(e[M],!1)}};function documentParseHTMLUnsafe(e){let t=Z._createHTML(null,`about:blank`);return parseHTMLUnsafe(String(e),t),t}function escape$1(e){let t=String(e),n=t.length,r=``,i=n>0?t.charCodeAt(0):0;for(let e=0;e<n;e++){let a=t.charCodeAt(e);r+=a===0?`�`:a>=1&&a<=31||a===127||e===0&&a>=48&&a<=57||e===1&&a>=48&&a<=57&&i===45?`\\${a.toString(16)} `:e===0&&a===45&&n===1?`\\-`:a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?t[e]:`\\${t[e]}`}return r}__name(escape$1,`escape`);const hu={escape:escape$1,supports(e,t){return!1}},gu=Symbol(`construct`);var DOMStringList=class{#e;constructor(e,t=[]){if(e!==gu)throw TypeError(`Illegal constructor`);this.#e=t;for(let e=0;e<t.length;e++)Object.defineProperty(this,e,{value:t[e],writable:!1,enumerable:!0,configurable:!0});Object.preventExtensions(this)}get length(){return this.#e.length}item(e){return this.#e[Number(e)>>>0]??null}contains(e){return this.#e.includes(String(e))}*[Symbol.iterator](){yield*this.#e}get[Symbol.toStringTag](){return`DOMStringList`}};function createDOMStringList(e){return new DOMStringList(gu,e)}const _u=globalThis.AbortSignal,vu=globalThis.AbortController;function enforceRange(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to execute 'timeout' on 'AbortSignal': parameter 1 is not a finite number.`);let n=Math.trunc(t);if(n<0||n>2**53-1)throw TypeError(`Failed to execute 'timeout' on 'AbortSignal': parameter 1 is outside the accepted range.`);return n}const yu=function AbortSignal(){throw TypeError(`Illegal constructor`)};Object.defineProperty(yu,"prototype",{value:_u.prototype,writable:!1,enumerable:!1,configurable:!1}),Object.setPrototypeOf(yu,_u),Object.defineProperty(yu,"timeout",{value:function timeout(e){let t=enforceRange(e),n=currentWindowOrNull();if(n===null)return _u.timeout(t);let r=new vu;return n.setTimeout(()=>r.abort(new DOMException(`The operation timed out.`,`TimeoutError`)),t),r.signal},writable:!0,enumerable:!0,configurable:!0});function windowOrigin(e){let t=e;for(;t[G].protocol===`about:`&&t[Hn]!==null;)t=t[Hn];return t[G].origin}function parseURL(e,t){let n=URL.parse(String(t),e[G].href);if(n===null)throw new DOMException(`Failed to execute 'assign' on 'Location': '${t}' is not a valid URL.`,`SyntaxError`);return n}const bu={toString:{value:function toString(){return this[q][G].href},writable:!1,enumerable:!0,configurable:!1},valueOf:{value:Object.prototype.valueOf,writable:!1,enumerable:!1,configurable:!1},[Symbol.toPrimitive]:{value:void 0,writable:!1,enumerable:!1,configurable:!1}};function inactive(e){return e[q][ot]}function isSchemeInput(e){let t=e.replace(/[\t\n\r]/g,``)+`:`;return/^[A-Za-z][A-Za-z0-9+\-.]*:/.test(t)}var Location=class{[q];#e=null;#t=null;constructor(e){this[q]=e,Object.defineProperties(this,bu)}get href(){return this[q][G].href}set href(e){inactive(this)||this[q]._navigate(parseURL(this[q],e),!1)}get origin(){return this[q][G].origin}get protocol(){return this[q][G].protocol}set protocol(e){if(inactive(this))return;let t=String(e);if(!isSchemeInput(t))throw new DOMException(`Failed to set the 'protocol' property on 'Location': '${t}' is an invalid protocol.`,`SyntaxError`);let n=new URL(this[q][G].href);n.protocol=t,(n.protocol===`http:`||n.protocol===`https:`)&&this[q]._navigate(n,!1)}get host(){return this[q][G].host}set host(e){this._set(`host`,e)}get hostname(){return this[q][G].hostname}set hostname(e){this._set(`hostname`,e)}get port(){return this[q][G].port}set port(e){this._set(`port`,e)}get pathname(){return this[q][G].pathname}set pathname(e){this._set(`pathname`,e)}get search(){return this[q][G].search}set search(e){this._set(`search`,e)}get hash(){return this[q][G].hash}set hash(e){if(inactive(this))return;let t=this[q][G],n=t.hash.slice(1),r=String(e);r.startsWith(`#`)&&(r=r.slice(1));let i=new URL(t.href);i.hash=r,r===``&&(i=new URL(i.href+`#`)),i.hash.slice(1)!==n&&this[q]._navigate(i,!1)}get ancestorOrigins(){if(inactive(this))return this.#t??=createDOMStringList([]);if(this.#e===null){let e=[];for(let t=this[q][Hn];t!==null;t=t[Hn])e.push(windowOrigin(t));this.#e=createDOMStringList(e)}return this.#e}assign(e){inactive(this)||this[q]._navigate(parseURL(this[q],e),!1)}replace(e){inactive(this)||this[q]._navigate(parseURL(this[q],e),!0)}reload(){inactive(this)||reportNotImplemented(this[q],Hl)}_set(e,t){if(inactive(this))return;let n=new URL(this[q][G].href);n[e]=String(t),this[q]._navigate(n,!1)}get[Symbol.toStringTag](){return`Location`}};function checkFullyActive(e,t){if(e[q][ot])throw new DOMException(`Failed to ${t} 'History': May not use a History object associated with a Document that is not fully active`,`SecurityError`)}function withoutFragment(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}var History=class{[q];[zt];[hn];[mr];constructor(e){this[q]=e,this[zt]=[{url:e[G].href,state:null}],this[hn]=0,this[mr]=`auto`}get length(){return checkFullyActive(this,`read the 'length' property from`),this[zt].length}get state(){return checkFullyActive(this,`read the 'state' property from`),this[zt][this[hn]].state}get scrollRestoration(){return checkFullyActive(this,`read the 'scrollRestoration' property from`),this[mr]}set scrollRestoration(e){checkFullyActive(this,`set the 'scrollRestoration' property on`),(e===`auto`||e===`manual`)&&(this[mr]=e)}go(e=0){checkFullyActive(this,`execute 'go' on`);let t=Math.trunc(Number(e))||0;t!==0&&this[q]._task(()=>{let e=this[hn]+t;e<0||e>=this[zt].length||this._traverseTo(e)},0)}back(){checkFullyActive(this,`execute 'back' on`),this.go(-1)}forward(){checkFullyActive(this,`execute 'forward' on`),this.go(1)}pushState(e,t,n){this._sharedPushReplaceState(e,n,!1,`pushState`)}replaceState(e,t,n){this._sharedPushReplaceState(e,n,!0,`replaceState`)}_sharedPushReplaceState(e,t,n,r){let i=this[q];checkFullyActive(this,`execute '${r}' on`);let a=e==null?null:structuredClone(e),o=i[G];if(t!=null&&t!==``){let e=URL.parse(String(t),i[G].href);if(e===null)throw new DOMException(`Failed to execute '${r}' on 'History': A history state object with URL '${String(t)}' cannot be created.`,`SecurityError`);if(!canHaveURLRewritten(i[G],e))throw new DOMException(`Failed to execute '${r}' on 'History': A history state object with URL '${e.href}' cannot be created in a document with origin '${i[G].origin}' and URL '${i[G].href}'.`,`SecurityError`);o=e}let s={url:o.href,state:a};n?this[zt][this[hn]]=s:(this[zt].length=this[hn]+1,this[zt].push(s),this[hn]++),i._setURL(o)}_navigate(e,t){let n=this[q],r=n[G].href,i=e.href;e.protocol!==`javascript:`&&withoutFragment(r)!==withoutFragment(i)&&reportNotImplemented(n,Hl),i===r&&(t=!0);let a={url:i,state:null};if(t?this[zt][this[hn]]=a:(this[zt].length=this[hn]+1,this[zt].push(a),this[hn]++),n._setURL(e),(e.hash!==``||i.endsWith(`#`))&&withoutFragment(r)===withoutFragment(i)){let e=eventInterface(`PopStateEvent`);n.dispatchEvent(new e(`popstate`,{state:null})),r!==i&&this._queueHashChange(r,i)}}_traverseTo(e){let t=this[q],n=t[G].href;this[hn]=e;let r=this[zt][e];r.url!==n&&t._setURL(new URL(r.url));let i=eventInterface(`PopStateEvent`);t.dispatchEvent(new i(`popstate`,{state:r.state})),n!==r.url&&withoutFragment(n)===withoutFragment(r.url)&&this._queueHashChange(n,r.url)}_queueHashChange(e,t){let n=this[q];n._task(()=>{let r=eventInterface(`HashChangeEvent`);n.dispatchEvent(new r(`hashchange`,{oldURL:e,newURL:t}))},0)}get[Symbol.toStringTag](){return`History`}};function canHaveURLRewritten(e,t){return e.protocol!==t.protocol||e.username!==t.username||e.password!==t.password||e.host!==t.host?!1:t.protocol===`http:`||t.protocol===`https:`?!0:t.protocol===`file:`?e.pathname===t.pathname:withoutFragment(e.href).split(`?`)[0]===withoutFragment(t.href).split(`?`)[0]}var ClipboardItem=class{[P];[Zn];constructor(e,t={}){if(typeof e!=`object`||!e||Object.keys(e).length===0)throw TypeError(`Failed to construct 'ClipboardItem': Empty dictionary argument`);this[P]=new Map(Object.entries(e)),this[Zn]=t.presentationStyle??`unspecified`}get types(){return Object.freeze([...this[P].keys()])}get presentationStyle(){return this[Zn]}async getType(e){if(!this[P].has(e))throw new DOMException(`Failed to execute 'getType' on 'ClipboardItem': The type was not found`,`NotFoundError`);let t=await this[P].get(e);return typeof t==`string`?new Blob([t],{type:e}):t}static supports(e){return e===`text/plain`||e===`text/html`||e===`image/png`||e.startsWith(`web `)}},Clipboard=class extends EventTarget{[Ct];constructor(){super(),this[Ct]=[]}async read(){return this[Ct].slice()}async readText(){for(let e of this[Ct])if(e[P].has(`text/plain`))return(await e.getType(`text/plain`)).text();return``}async write(e){this[Ct]=Array.from(e)}async writeText(e){this[Ct]=[new ClipboardItem({"text/plain":String(e)})]}};let xu=0;var Navigator=class{[q];[it];[Jr];constructor(e){this[q]=e,this[it]=null,this[Jr]=null}get appCodeName(){return`Mozilla`}get appName(){return`Netscape`}get appVersion(){return this.userAgent.replace(/^Mozilla\//,``)}get platform(){return this[q][R].platform}get product(){return`Gecko`}get productSub(){return`20030107`}get userAgent(){return this[q][R].userAgent}get vendor(){return`Apple Computer, Inc.`}get vendorSub(){return``}get oscpu(){}get language(){return this[q][R].languages[0]??`en-US`}get languages(){return this[q][R].languages}get onLine(){return!0}get cookieEnabled(){return!0}get hardwareConcurrency(){return xu||=r()}get pdfViewerEnabled(){return!1}get plugins(){return[]}get mimeTypes(){return[]}javaEnabled(){return!1}get maxTouchPoints(){return 0}get webdriver(){return!1}get doNotTrack(){return null}get deviceMemory(){return 8}get clipboard(){return this[it]??=new Clipboard}set clipboard(e){Object.defineProperty(this,"clipboard",{value:e,writable:!0,enumerable:!0,configurable:!0})}get userActivation(){return this[Jr]??={hasBeenActive:!1,isActive:!1}}sendBeacon(e,t){return!0}vibrate(e){return!0}registerProtocolHandler(){}unregisterProtocolHandler(){}get[Symbol.toStringTag](){return`Navigator`}},Screen=class extends EventTarget{[q];constructor(e){super(),this[q]=e}get width(){return this[q][R].screenWidth}get height(){return this[q][R].screenHeight}get availWidth(){return this[q][R].screenWidth}get availHeight(){return this[q][R].screenHeight}get availLeft(){return 0}get availTop(){return 0}get colorDepth(){return 24}get pixelDepth(){return 24}get isExtended(){return!1}},VisualViewport=class extends EventTarget{[q];constructor(e){super(),this[q]=e}get offsetLeft(){return 0}get offsetTop(){return 0}get pageLeft(){return this[q].scrollX}get pageTop(){return this[q].scrollY}get width(){return this[q].innerWidth}get height(){return this[q].innerHeight}get scale(){return 1}};function createStorageShed(){return{areas:/* @__PURE__ */ new Map,windows:/* @__PURE__ */ new Set}}const Su=Symbol(`storage`),Cu=Symbol(`construct`);function state$2(e){return e[Su]}__name(state$2,`state`);function visible(e,t){return!(t in e)&&state$2(e).map.has(t)}const wu={get(e,t,n){return typeof t==`string`&&!(t in e)?state$2(e).map.get(t):Reflect.get(e,t,n)},set(e,t,n,r){return typeof t==`string`&&r===Tu.get(e)?typeof n==`function`&&t in e?Reflect.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):(e.setItem(t,n),!0):Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&state$2(e).map.has(t)?!0:Reflect.has(e,t)},deleteProperty(e,t){return typeof t==`string`&&visible(e,t)?(e.removeItem(t),!0):Reflect.deleteProperty(e,t)},ownKeys(e){let t=[];for(let n of state$2(e).map.keys())n in e||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!(t in e)){let n=state$2(e).map.get(t);if(n!==void 0)return{value:n,writable:!0,enumerable:!0,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},defineProperty(e,t,n){return typeof t==`string`&&!Object.hasOwn(e,t)&&`value`in n&&typeof n.value!=`function`?(e.setItem(t,n.value),!0):Reflect.defineProperty(e,t,n)}},Tu=/* @__PURE__ */ new WeakMap;function requireArgs(e,t,n){if(e<t)throw TypeError(`Failed to execute '${n}' on 'Storage': ${t} argument${t===1?``:`s`} required, but only ${e} present.`)}var Storage=class{constructor(e,t,n,r){if(e!==Cu)throw TypeError(`Illegal constructor`);let i=0;for(let[e,t]of r)i+=e.length+t.length;let a={map:r,window:t,type:n,size:i};Object.defineProperty(this,Su,{value:a,writable:!1,enumerable:!1,configurable:!1});let o=new Proxy(this,wu);return Tu.set(this,o),o}get length(){return state$2(this).map.size}key(e){requireArgs(arguments.length,1,`key`);let t=Number(e)>>>0,n=state$2(this).map;if(t>=n.size)return null;let r=0;for(let e of n.keys())if(r++===t)return e;return null}getItem(e){return requireArgs(arguments.length,1,`getItem`),state$2(this).map.get(String(e))??null}setItem(e,t){requireArgs(arguments.length,2,`setItem`);let n=state$2(this),r=String(e),i=String(t),a=n.map.get(r);if(a===i)return;let o=n.size-(a===void 0?0:r.length+a.length)+r.length+i.length;if(o>5e6){let e=`Failed to execute 'setItem' on 'Storage': Setting the value of '${r}' exceeded the quota.`,t=globalThis.QuotaExceededError;throw t===void 0?new DOMException(e,`QuotaExceededError`):new t(e)}n.map.set(r,i),n.size=o,broadcast(n,r,a??null,i)}removeItem(e){requireArgs(arguments.length,1,`removeItem`);let t=state$2(this),n=String(e),r=t.map.get(n);r!==void 0&&(t.map.delete(n),t.size-=n.length+r.length,broadcast(t,n,r,null))}clear(){let e=state$2(this);e.map.size!==0&&(e.map.clear(),e.size=0,broadcast(e,null,null,null))}get[Symbol.toStringTag](){return`Storage`}};function topWindow(e){let t=e;for(;t[Hn]!==null;)t=t[Hn];return t}function broadcast(e,t,n,r){let i=e.window,a=i._storageShed;if(a.windows.size<2)return;let o=windowOrigin(i),s=i[G].href,c=e.type===`session`?topWindow(i):null;for(let l of a.windows){if(l===i||l[ot]||windowOrigin(l)!==o||c!==null&&topWindow(l)!==c)continue;let a=e.type===`local`;l._task(()=>{let e=eventInterface(`StorageEvent`),i=a?l.localStorage:l.sessionStorage;l.dispatchEvent(new e(`storage`,{key:t,oldValue:n,newValue:r,url:s,storageArea:i}))},0)}}function createLocalStorage(e){let t=e._storageShed,n=windowOrigin(e),r=t.areas.get(n);return r===void 0&&t.areas.set(n,r=/* @__PURE__ */ new Map),new Storage(Cu,e,`local`,r)}const Eu=/* @__PURE__ */ new WeakMap;function createSessionStorage(e){let t=topWindow(e),n=Eu.get(t);n===void 0&&Eu.set(t,n=/* @__PURE__ */ new Map);let r=windowOrigin(e),i=n.get(r);return i===void 0&&n.set(r,i=/* @__PURE__ */ new Map),new Storage(Cu,e,`session`,i)}function defaultPath(e){let t=e.pathname;if(!t.startsWith(`/`))return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function pathMatches(e,t){return e===t?!0:e.startsWith(t)?t.endsWith(`/`)||e[t.length]===`/`:!1}function domainMatches(e,t){return e===t||e.endsWith(`.`+t)&&!/^[\d.]+$/.test(e)&&!e.startsWith(`[`)}function cookieDomainMatches(e,t){return e.hostOnly?t===e.domain:domainMatches(t,e.domain)}var CookieJar=class{[vt];constructor(){this[vt]=[]}set(e,t,n=Date.now()){let r=String(e).split(`;`),i=r[0],a=i.indexOf(`=`),o=(a===-1?``:i.slice(0,a)).trim(),s=(a===-1?i:i.slice(a+1)).trim();if(o===``&&s===``)return;let c=defaultPath(t),l=1/0,u=!1,d=!1,m=``;for(let e=1;e<r.length;e++){let i=r[e],a=i.indexOf(`=`),o=(a===-1?i:i.slice(0,a)).trim().toLowerCase(),s=a===-1?``:i.slice(a+1).trim();switch(o){case`max-age`:{if(!/^-?\d+$/.test(s))break;let e=Number(s);l=e<=0?-1/0:n+e*1e3,u=!0;break}case`expires`:{if(u)break;let e=Date.parse(s);Number.isNaN(e)||(l=e);break}case`domain`:if(s===``)break;m=(s.startsWith(`.`)?s.slice(1):s).toLowerCase();break;case`path`:c=s.startsWith(`/`)?s:defaultPath(t);break;case`secure`:d=!0;break;case`httponly`:return}}if(d&&t.protocol!==`https:`&&t.hostname!==`localhost`)return;let h=t.hostname.toLowerCase();if(m!==``&&!domainMatches(h,m))return;let _=m===``,v=_?h:m,ee=this[vt].findIndex(e=>e.name===o&&e.domain===v&&e.path===c);if(l<=n){ee!==-1&&this[vt].splice(ee,1);return}let y={name:o,value:s,domain:v,hostOnly:_,path:c,expires:l,secure:d};ee===-1?this[vt].push(y):this[vt][ee]=y}get(e,t=Date.now()){let n=``,r=e.hostname.toLowerCase(),i=[];for(let n=this[vt].length-1;n>=0;n--){let a=this[vt][n];a.expires<=t?this[vt].splice(n,1):a.secure&&e.protocol!==`https:`&&e.hostname!==`localhost`||cookieDomainMatches(a,r)&&pathMatches(e.pathname,a.path)&&i.push(a)}i.reverse(),i.sort((e,t)=>t.path.length-e.path.length);for(let e of i)n!==``&&(n+=`; `),n+=e.name===``?e.value:`${e.name}=${e.value}`;return n}};function windowOf$1(e){return e[q]}__name(windowOf$1,`windowOf`);const Du={cookie:{get(){let e=windowOf$1(this);return e===null?``:e._cookieStore.get(e[G])},set(e){let t=windowOf$1(this);t!==null&&t._cookieStore.set(String(e),t[G])}},referrer:{get(){return windowOf$1(this)?.[R].referrer??``}},currentScript:{get(){return null}},readyState:{get(){return`complete`}},visibilityState:{get(){return`visible`}},hidden:{get(){return!1}},location:{get(){return windowOf$1(this)?.location??null},set(e){let t=windowOf$1(this);t!==null&&(t.location.href=e)}},lastModified:{get(){let e=/* @__PURE__ */ new Date,p=e=>String(e).padStart(2,`0`);return`${p(e.getMonth()+1)}/${p(e.getDate())}/${e.getFullYear()} ${p(e.getHours())}:${p(e.getMinutes())}:${p(e.getSeconds())}`}},domain:{get(){return windowOf$1(this)?.[G].hostname??``},set(){}},designMode:{get(){return isDesignModeEnabled(this)?`on`:`off`},set(e){let t=asciiLowercase$1(String(e));t===`on`?setDesignModeEnabled(this,!0):t===`off`&&setDesignModeEnabled(this,!1)}}},Ou=Z.prototype;for(let e of Object.keys(Du))e in Ou||Object.defineProperty(Ou,e,{...Du[e],enumerable:!0,configurable:!0});Object.hasOwn(Z,`parseHTMLUnsafe`)||Object.defineProperty(Z,"parseHTMLUnsafe",{value:documentParseHTMLUnsafe,writable:!0,enumerable:!0,configurable:!0});var TimerList=class{handles;sweepAt;constructor(){this.handles=/* @__PURE__ */ new Map,this.sweepAt=256}};function trackTimer(e,t,n){let r=e[Br]??=new TimerList,i=r.handles;i.size>=r.sweepAt&&sweep(r),i.set(t,n)}function sweep(e){let t=e.handles;for(let e of t.keys())typeof e==`object`&&e&&e._destroyed===!0&&t.delete(e);e.sweepAt=Math.max(256,t.size*2)}function clearTimers(e){let t=e[Br];if(t!==null){e[Br]=null;for(let[e,n]of t.handles)try{n(e)}catch{}t.handles.clear()}}function timerTimeout(e){let t=e|0;return t<0?0:t}function startTimer(e,t,n,r,i,a){let o=timerTimeout(i);if(e[ot])return 0;let s=t[n?`setInterval`:`setTimeout`],c=a.length===0?s(r,o):s(r,o,...a);return trackTimer(e,c,t[n?`clearInterval`:`clearTimeout`]),c}function wrapTimer(e,t,n){let r=t[n?`setInterval`:`setTimeout`],i=t[n?`clearInterval`:`clearTimeout`],a={setTimeout(t,n,...a){let o=timerTimeout(n);if(e[ot])return 0;let s=a.length===0?r(t,o):r(t,o,...a);return trackTimer(e,s,i),s},setInterval(t,n,...a){let o=timerTimeout(n);if(e[ot])return 0;let s=a.length===0?r(t,o):r(t,o,...a);return trackTimer(e,s,i),s}}[n?`setInterval`:`setTimeout`];for(let e of Object.getOwnPropertySymbols(r))Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e));return a}function trackGlobalTimers(e,t){let n=[];for(let r of[!1,!0]){let i=r?`setInterval`:`setTimeout`;typeof t[i]==`function`&&typeof t[r?`clearInterval`:`clearTimeout`]==`function`&&(n.push([i,Object.getOwnPropertyDescriptor(t,i)]),Object.defineProperty(t,i,{value:wrapTimer(e,t,r),writable:!0,enumerable:!0,configurable:!0}))}return function restore(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.length=0}}let ku=!1;function enableLayout(){ku=!0}const Au=Object.freeze([`en-US`,`en`]);let ju=!1;const Mu=/* @__PURE__ */ new WeakMap;function receiver(e,t){return e!=null&&e[ot]!==void 0?e:otherReceiver(e,t)}function otherReceiver(e,t){let n=e==null?currentWindowOrNull():typeof e==`object`||typeof e==`function`?Mu.get(e):void 0;if(n==null)throw TypeError(`Failed to execute '${t}' on 'Window': Illegal invocation`);return n}var Window=class extends EventTarget{document;name;status;opener;[R];[G];[On];[an];[In];[pr];[$r];[Dn];[Er];[Or];[xt];[_t];[jn];[zr];[Br];[Yt];[fr];[Qt];[$t];[Zt];[un];[dn];[bn];[yn];[kt];[hr];[gr];[ot];[j];[Hn];[Xt];[tn];[tt];constructor(e={},t){super(),ju||preparePrototype();let n=new URL(e.url??`http://localhost/`),r=Z._createHTML(this,n.href);this.document=r,this.name=``,this.status=``,this.opener=null;let i=e.width??1024,a=e.height??768;if(this[R]={userAgent:e.userAgent??`Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) ctrl-dom/0.0.0`,platform:e.platform??``,languages:e.languages??Au,referrer:e.referrer??``,screenWidth:e.screenWidth??i,screenHeight:e.screenHeight??a,mediaFeatures:e.mediaFeatures,validationMessages:e.validationMessages===`browser`?`browser`:`jsdom`,compat:resolveCompat(e.compat),layout:e.layout===`lite`?`lite`:`none`},e.layout===`lite`&&enableLayout(),this[G]=n,this[On]=null,this[an]=null,this[In]=null,this[pr]=null,this[$r]=null,this[Dn]=null,this[Er]=null,this[Or]=e.shareStorageWith===void 0?null:e.shareStorageWith._storageShed,this[xt]=null,this[_t]=null,this[jn]=/* @__PURE__ */ new Set,this[zr]=null,this[Br]=null,this[Yt]=null,this[fr]=null,this[Qt]=null,this[$t]=-1,this[Zt]=0,this[un]=null,this[dn]=0,this[bn]=i,this[yn]=a,this[kt]=e.devicePixelRatio??1,this[hr]=0,this[gr]=0,this[ot]=!1,this[j]=globalThis,this[Hn]=null,this[Xt]=null,this[tt]=null,this[tn]=null,this[Or]!==null&&this[Or].windows.add(this),(e.visualViewport??compatExposes(this[R].compat,`visualViewport`))&&Object.defineProperty(this,"visualViewport",{get:visualViewportGetter,enumerable:!0,configurable:!0}),t!==void 0){if(this[Hn]=t.parent,this[Xt]=t.frameElement,this[j]=t.parent[j],(t.parent[tt]??=/* @__PURE__ */ new Set).add(this),this[Or]=t.parent._storageShed,this[Or].windows.add(this),t.srcdoc!==null)parseDocument(t.srcdoc,r);else{let e=r.createElement(`html`);e.appendChild(r.createElement(`head`)),e.appendChild(r.createElement(`body`)),r.appendChild(e)}}else{if(_l.setComputedColorMode?.(e.cssComputedColors??`specified`),setCurrentWindow(this),e.html!==void 0)parseDocument(e.html,r);else{r.appendChild(new DocumentType(r,`html`,``,``));let e=r.createElement(`html`);e.appendChild(r.createElement(`head`)),e.appendChild(r.createElement(`body`)),r.appendChild(e)}hideInternals(this)}}get window(){return this}get self(){return this}get frames(){return this}get parent(){let e=this[Hn];return e===null?this:e[tn]??e}get top(){let e=this[Hn];if(e===null)return this;for(;e[Hn]!==null;)e=e[Hn];return e[tn]??e}get length(){return 0}get frameElement(){return this[Xt]}get closed(){return this[ot]}get origin(){return windowOrigin(this)}get isSecureContext(){let{protocol:e,hostname:t}=this[G];return e===`https:`||e===`wss:`||e===`file:`||t===`localhost`||t.endsWith(`.localhost`)||/^127\.\d+\.\d+\.\d+$/.test(t)||t===`[::1]`}get crossOriginIsolated(){return!1}get event(){return getCurrentEvent()}get location(){return this[On]??=new Location(this)}set location(e){this.location.href=e}get history(){return this[an]??=new History(this)}get navigator(){return this[In]??=new Navigator(this)}get clientInformation(){return this.navigator}get screen(){return this[pr]??=new Screen(this)}get localStorage(){return this[Dn]??=createLocalStorage(this)}get sessionStorage(){return this[Er]??=createSessionStorage(this)}get customElements(){if(this[xt]===null){let e=_l.createCustomElementRegistry;if(e!==null)this[xt]=e(this);else return}return this[xt]}get _storageShed(){return this[Or]===null&&(this[Or]=createStorageShed(),this[Or].windows.add(this)),this[Or]}get _cookieStore(){return this[_t]??=new CookieJar}get innerWidth(){return this[bn]}set innerWidth(e){this[bn]=e,this[jn].size!==0&&reportMediaQueryChanges(this)}get innerHeight(){return this[yn]}set innerHeight(e){this[yn]=e,this[jn].size!==0&&reportMediaQueryChanges(this)}get outerWidth(){return this[bn]}get outerHeight(){return this[yn]}get devicePixelRatio(){return this[kt]}set devicePixelRatio(e){this[kt]=e,this[jn].size!==0&&reportMediaQueryChanges(this)}get screenX(){return 0}get screenY(){return 0}get screenLeft(){return 0}get screenTop(){return 0}get scrollX(){return this[hr]}set scrollX(e){this[hr]=e}get scrollY(){return this[gr]}set scrollY(e){this[gr]=e}get pageXOffset(){return this[hr]}set pageXOffset(e){this[hr]=e}get pageYOffset(){return this[gr]}set pageYOffset(e){this[gr]=e}scroll(e,t){let n=receiver(this,`scroll`);reportNotImplemented(n,Pu.scroll),scrollWindow(n,e,t)}scrollTo(e,t){let n=receiver(this,`scrollTo`);reportNotImplemented(n,Pu.scrollTo),scrollWindow(n,e,t)}scrollBy(e,t){let n=receiver(this,`scrollBy`);reportNotImplemented(n,Pu.scrollBy),typeof e==`object`&&e?scrollWindow(n,{left:n[hr]+(Number(e.left)||0),top:n[gr]+(Number(e.top)||0)}):scrollWindow(n,n[hr]+(Number(e)||0),n[gr]+(Number(t)||0))}resizeTo(e,t){let n=receiver(this,`resizeTo`);reportNotImplemented(n,Pu.resizeTo),resizeWindow(n,Number(e),Number(t))}resizeBy(e,t){let n=receiver(this,`resizeBy`);reportNotImplemented(n,Pu.resizeBy),resizeWindow(n,n[bn]+Number(e),n[yn]+Number(t))}moveTo(e,t){reportNotImplemented(receiver(this,`moveTo`),Pu.moveTo)}moveBy(e,t){reportNotImplemented(receiver(this,`moveBy`),Pu.moveBy)}getComputedStyle(e,t){if(typeof e!=`object`||!e||!(M in e)||e[M].type!==1)throw TypeError(`Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.`);t!=null&&String(t)!==``&&reportNotImplemented(receiver(this,`getComputedStyle`),Ul);let n=_l.getComputedStyle??domExport(`getComputedStyle`)??null;return n===null?new CSSStyleDeclaration(e):n(e,t,receiver(this,`getComputedStyle`))}matchMedia(e){if(arguments.length===0)throw TypeError(`Failed to execute 'matchMedia' on 'Window': 1 argument required, but only 0 present.`);return new MediaQueryList(receiver(this,`matchMedia`),String(e).trim())}getSelection(){let e=receiver(this,`getSelection`).document;return typeof e.getSelection==`function`?e.getSelection():null}requestAnimationFrame(e){if(typeof e!=`function`)throw TypeError(`Failed to execute 'requestAnimationFrame' on 'Window': The callback provided as parameter 1 is not a function.`);let t=receiver(this,`requestAnimationFrame`),n=++t[Zt];(t[Yt]??=/* @__PURE__ */ new Map).set(n,e);let r=frameTimers(t),i=t[Qt];return(i===null||i.scheduledWith!==r.setTimeout)&&(i!==null&&t._cancelTask(i),t[Qt]=t._schedule(r,runAnimationFrame,nextFrameDelay(t))),n}cancelAnimationFrame(e){let t=receiver(this,`cancelAnimationFrame`);t[Yt]?.delete(e),t[fr]?.delete(e)}requestIdleCallback(e,t){if(typeof e!=`function`)throw TypeError(`Failed to execute 'requestIdleCallback' on 'Window': The callback provided as parameter 1 is not a function.`);let n=receiver(this,`requestIdleCallback`),r=++n[dn],i=n[un]??=/* @__PURE__ */ new Map,a=n._task(()=>{i.delete(r);let t=Date.now()+50;e({didTimeout:!1,timeRemaining:()=>Math.max(0,t-Date.now())})},1);return a!==null&&i.set(r,a),r}cancelIdleCallback(e){let t=receiver(this,`cancelIdleCallback`),n=t[un]?.get(e);n!==void 0&&(t[un].delete(e),t._cancelTask(n))}setTimeout(e,t,...n){let r=receiver(this,`setTimeout`);return startTimer(r,r._timerHost(),!1,e,t,n)}setInterval(e,t,...n){let r=receiver(this,`setInterval`);return startTimer(r,r._timerHost(),!0,e,t,n)}_timerHost(){let e=this[j];return typeof e.setTimeout==`function`?e:globalThis}_task(e,t){return this._schedule(this._timerHost(),e,t)}_schedule(e,t,n){if(this[ot])return null;let r=this[zr]??=/* @__PURE__ */ new Set,i={handle:void 0,clear:e.clearTimeout,scheduledWith:e.setTimeout};return i.handle=e.setTimeout(()=>{r.delete(i),t.call(this)},n),r.add(i),i}_closeable(e){if(this[ot])return null;let t={handle:void 0,clear:e,scheduledWith:null};return(this[zr]??=/* @__PURE__ */ new Set).add(t),t}_releaseCloseable(e){this[zr]?.delete(e)}_cancelTask(e){this[zr]?.delete(e),e.clear(e.handle)}postMessage(e,t,n){let r=receiver(this,`postMessage`),i=typeof t==`object`&&t?t.targetOrigin??`/`:t??`/`;if(i=String(i),i===`/`)i=r.origin;else if(i!==`*`){let e=URL.parse(i);if(e===null)throw new DOMException(`Failed to execute 'postMessage' on 'Window': Invalid target origin '${i}' in a call to 'postMessage'.`,`SyntaxError`);i=e.origin}if(i!==`*`&&i!==r.origin)return;let a=Array.isArray(n)?n:typeof t==`object`&&t?t.transfer:void 0,o,s;if(a===void 0||a.length===0)o=structuredClone(e);else{let t=structuredClone({message:e,transferred:a},{transfer:a});o=t.message;let n=globalThis.MessagePort;s=n===void 0?[]:t.transferred.filter(e=>e instanceof n)}let c=r.origin;r._task(function(){let e=eventInterface(`MessageEvent`);this.dispatchEvent(new e(`message`,{data:o,origin:c,source:this,ports:s}))},0)}reportError(e){reportException$1(e,receiver(this,`reportError`))}alert(e){reportNotImplemented(receiver(this,`alert`),Pu.alert)}confirm(e){return reportNotImplemented(receiver(this,`confirm`),Pu.confirm),!1}prompt(e,t){return reportNotImplemented(receiver(this,`prompt`),Pu.prompt),null}print(){reportNotImplemented(receiver(this,`print`),Pu.print)}open(e,t,n){return reportNotImplemented(receiver(this,`open`),Pu.open),null}stop(){}focus(){reportNotImplemented(receiver(this,`focus`),Pu.focus)}blur(){reportNotImplemented(receiver(this,`blur`),Pu.blur)}captureEvents(){}releaseEvents(){}close(){if(this==null||this[ot]===void 0)return receiver(this,`close`).close();if(this[ot])return;this[ot]=!0,clearTimers(this);let e=this[zr];if(e!==null){for(let t of e)t.clear(t.handle);e.clear()}if(this[Yt]=null,this[fr]=null,this[Qt]=null,this[un]=null,this[jn].clear(),this[Or]?.windows.delete(this),this[tt]!==null){for(let e of this[tt])e.close();this[tt]=null}this[Hn]?.[tt]?.delete(this),currentWindowOrNull()===this&&setCurrentWindow(null)}_navigate(e,t){this.history._navigate(e,t)}_setURL(e){this[G]=e,this.document[G]=e.href}_getTheParent(e){return null}get[Symbol.toStringTag](){return`Window`}};function visualViewportGetter(){return this[$r]??=new VisualViewport(this)}let Nu=null;function setRenderingUpdateHook(e){Nu=e}function nextFrameDelay(e){if(!clockSkipping()||e[fr]!==null)return 16;let t=e[$t];return t!==-1&&(e[j].performance??performance).now()-t<1?16:1}function frameTimers(e){return clockSkipping()&&e[j]!==globalThis?Fe:globalThis}function runAnimationFrame(){this[Qt]=null,Nu!==null&&Nu(this.document);let e=this[Yt];if(e===null)return;this[Yt]=null,this[fr]=e;let t=(this[j].performance??performance).now();this[$t]=t;for(let[n,r]of e)if(e.has(n))try{r.call(this,t)}catch(e){reportException$1(e,this)}this[fr]=null}const Pu={alert:stubbedMethod(`Window`,`alert`),blur:stubbedMethod(`Window`,`blur`),confirm:stubbedMethod(`Window`,`confirm`),focus:stubbedMethod(`Window`,`focus`),moveBy:stubbedMethod(`Window`,`moveBy`),moveTo:stubbedMethod(`Window`,`moveTo`),open:stubbedMethod(`Window`,`open`),print:stubbedMethod(`Window`,`print`),prompt:stubbedMethod(`Window`,`prompt`),resizeBy:stubbedMethod(`Window`,`resizeBy`),resizeTo:stubbedMethod(`Window`,`resizeTo`),scroll:stubbedMethod(`Window`,`scroll`),scrollBy:stubbedMethod(`Window`,`scrollBy`),scrollTo:stubbedMethod(`Window`,`scrollTo`)};function scrollWindow(e,t,n){typeof t==`object`&&t?(t.left!==void 0&&(e[hr]=normalizeScroll(t.left)),t.top!==void 0&&(e[gr]=normalizeScroll(t.top))):t!==void 0&&(e[hr]=normalizeScroll(t),e[gr]=normalizeScroll(n??0))}function resizeWindow(e,t,n){e[bn]=t,e[yn]=n,e[jn].size!==0&&reportMediaQueryChanges(e),e.dispatchEvent(new Event(`resize`))}function normalizeScroll(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}const Fu=/* @__PURE__ */ `clearTimeout.clearInterval.queueMicrotask.structuredClone.atob.btoa.crypto.performance.console.URL.URLSearchParams.URLPattern.AbortController.Blob.File.TextEncoder.TextDecoder.TextEncoderStream.TextDecoderStream.ReadableStream.ReadableStreamDefaultReader.ReadableByteStreamController.WritableStream.WritableStreamDefaultWriter.TransformStream.ByteLengthQueuingStrategy.CountQueuingStrategy.CompressionStream.DecompressionStream.Headers.FormData.BroadcastChannel.MessageChannel.MessagePort.WebSocket.DOMException.QuotaExceededError.Crypto.CryptoKey.SubtleCrypto.PerformanceEntry.PerformanceMark.PerformanceMeasure.PerformanceObserver.PerformanceObserverEntryList.PerformanceResourceTiming.WebAssembly.Intl`.split(`.`);installEventHandlers(Window.prototype,`window`);const Iu=Object.freeze({visible:!0});for(let e of[`locationbar`,`menubar`,`personalbar`,`scrollbars`,`statusbar`,`toolbar`])Object.defineProperty(Window.prototype,e,{get:()=>Iu,enumerable:!0,configurable:!0});function preparePrototype(){ju=!0;let e=Window.prototype;ensureInterfaces(e,{CSS:hu,DOMStringList,AbortSignal:yu});let t={};for(let n of Fu)n in e||(t[n]={get(){return this[j][n]??globalThis[n]},set(e){Object.defineProperty(this,n,{value:e,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0});Object.defineProperties(e,t)}function windowInterfaces(){return ju||preparePrototype(),ensureInterfaces(Window.prototype,{CSS:hu,DOMStringList,AbortSignal:yu})}function createWindow(e){return new Window(e)}function createNestedWindow(e,t,n,r){let i=`about:blank`;r===null?n!==null&&n!==``&&(i=URL.parse(n,t.document.baseURI)?.href??`about:blank`):i=`about:srcdoc`;let a=new Window({url:i,width:t[bn],height:t[yn],devicePixelRatio:t[kt],userAgent:t[R].userAgent,layout:t[R].layout},{parent:t,frameElement:e,srcdoc:r});return(i===`about:blank`||i===`about:srcdoc`)&&(a.document[Le]=t.document.baseURI),a}setNestedWindowFactory(createNestedWindow);function tabIndexValue(e){if(!(e.flags&8192))return NaN;let t=contentAttr(e,`tabindex`);if(t===null)return NaN;let n=parseInteger(t);return n>=-2147483648&&n<=2147483647?n:NaN}function isSummaryForParentDetails(e){let t=e.parent;if(t===null||t.tag!==Y.details||t.ns!==`http://www.w3.org/1999/xhtml`)return!1;for(let n=t.first;n!==null;n=n.next)if(n.type===1&&n.tag===Y.summary&&n.ns===`http://www.w3.org/1999/xhtml`)return n===e;return!1}function focusableByDefault(e){if(e.ns===`http://www.w3.org/1999/xhtml`){switch(e.tag){case Y.a:case Y.area:return contentAttr(e,`href`)!==null;case Y.button:case Y.select:case Y.textarea:case Y.iframe:case Y.frame:return!0;case Y.input:return contentAttr(e,`type`)?.toLowerCase()!==`hidden`;case Y.summary:return isSummaryForParentDetails(e);case Y.audio:case Y.video:return contentAttr(e,`controls`)!==null}return isEditingHost(e)}return e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`&&(contentAttr(e,`href`)!==null||hasXlinkHref(e))}function hasXlinkHref(e){let t=e.attrs;if(t===null)return!1;for(let e=0;e<t.length;e++)if(t[e].localName===`href`&&t[e].ns===`http://www.w3.org/1999/xlink`)return!0;return!1}function defaultTabIndex(e){if(e.ns===`http://www.w3.org/1999/xhtml`){switch(e.tag){case Y.a:case Y.area:case Y.button:case Y.frame:case Y.iframe:case Y.input:case Y.object:case Y.select:case Y.textarea:return 0;case Y.summary:return isSummaryForParentDetails(e)?0:-1}return-1}return e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`?0:-1}function isInert(e){for(let t=e;t!==null;t=parentOrHost(t))if(t.flags&262144&&t.type===1&&contentAttr(t,`inert`)!==null)return!0;return inertByModal(e)}function parentOrHost(e){let t=e.parent;if(t!==null)return t;if(e.flags&32){let t=e.node[j];return t===null?null:t[M]}return null}function hasTabIndexFocusFlag(e){return Number.isNaN(tabIndexValue(e))?focusableByDefault(e):e.ns===`http://www.w3.org/1999/xhtml`||e.ns===`http://www.w3.org/2000/svg`||e.ns===`http://www.w3.org/1998/Math/MathML`}function isFocusable(e){return e.type!==1||!(e.flags&1)||!hasTabIndexFocusFlag(e)||isActuallyDisabled(e)||isInert(e)?!1:!isRenderingHidden(e)}function isSequentiallyFocusable(e){if(!isFocusable(e))return!1;let t=tabIndexValue(e);return Number.isNaN(t)||t>=0}function shadowRootOf(e){return e.node[U]??null}function getFocusableArea(e){let t=shadowRootOf(e);if(t===null||!t.delegatesFocus)return null;let n=e.doc[A];return n!==null&&isShadowIncludingInclusiveAncestor$1(e,n)?n:focusDelegate(e)}function focusDelegate(e){let t=shadowRootOf(e);if(t!==null&&!t.delegatesFocus)return null;let n=t===null?e:t[M],r=autofocusDelegate(n);if(r!==null)return r;let i=e.tag===Y.dialog&&e.ns===`http://www.w3.org/1999/xhtml`;for(let e=n.first;e!==null;e=nextInTree(e,n)){if(e.type!==1)continue;let t;if(t=i&&isSequentiallyFocusable(e)||!i&&isFocusable(e)?e:getFocusableArea(e),t!==null)return t}return null}let Lu=!0;function focusElement(e,t){let n=e;if(n.tag===Y.dialog&&n.ns===`http://www.w3.org/1999/xhtml`&&!isFocusable(n)){if(!(n.flags&1)||isInert(n)||isRenderingHidden(n))return!1}else if(isFocusable(n)){let e=shadowRootOf(n);if(e!==null&&e.delegatesFocus){let e=n.doc[A];if(e!==null&&isShadowIncludingInclusiveAncestor$1(n,e))return!0;let t=focusDelegate(n);if(t===null)return!1;n=t}}else{if(!(n.flags&1))return!1;let e=getFocusableArea(n);if(e===null)return!1;n=e}let r=n.doc;focusContainerChain(r);let i=r[A];return i===n||(Lu=t?.focusVisible??!wasPointerFocus(n),runFocusUpdate(r,i,n),r[A]===n)}function containerOf(e){let t=e[q]?.[Xt]??null;return t===null?null:t[M]}function nestedDocument(e){return e.tag!==Y.iframe&&e.tag!==Y.frame?null:frameContentWindow(e.node)?.document??null}function focusContainerChain(e){let t=containerOf(e);if(t===null||!(t.flags&1))return;let n=t.doc;focusContainerChain(n),n[A]!==t&&runFocusUpdate(n,n[A],t,!1)}function blurElement(e){let t=e.doc,n=t[A];n!==null&&(n===e||isShadowIncludingInclusiveAncestor$1(e,n))&&runFocusUpdate(t,n,null)}function runFocusUpdate(e,t,n,r=!0){let i=e[q];if(t!==null){let r=nestedDocument(t);r!==null&&r[A]!==null&&runFocusUpdate(r,r[A],null),e[A]=null;let a=t.node,o=n===null?null:n.node;if(fireFocusEvent(a,`blur`,o,!1,i),fireFocusEvent(a,`focusout`,o,!0,i),e[A]!==null)return}if(n===null||!(n.flags&1)||(e[A]=n,!r))return;let a=n.node,o=t===null?null:t.node;fireFocusEvent(a,`focus`,o,!1,i),e[A]===n&&fireFocusEvent(a,`focusin`,o,!0,i)}function isShadowIncludingInclusiveAncestor$1(e,t){for(let n=t;n!==null;n=parentOrHost(n))if(n===e)return!0;return!1}__name(isShadowIncludingInclusiveAncestor$1,`isShadowIncludingInclusiveAncestor`);let Ru=!1;function wasPointerFocus(e){return Ru?(Ru=!1,!(e.tag===Y.textarea||e.tag===Y.input||isEditingHost(e))):!1}function activeElement(e){let t=e.doc,n=t[A];if(e.type===11){for(;n!==null;){let t=treeRoot(n);if(t===e)return n.node;if(!(t.flags&32))return null;n=parentOrHost(t)}return null}if(n===null)return t.body??t.documentElement;for(;;){let e=treeRoot(n);if(!(e.flags&32))break;let t=parentOrHost(e);if(t===null)break;n=t}return n.node}function documentHasFocus(e){return e[A]!==null}function matchesFocus(e){let t=e.doc[A];if(t===null)return!1;if(t===e)return!0;if(shadowRootOf(e)===null)return!1;for(let n=t;n!==null;){let t=treeRoot(n);if(!(t.flags&32))return!1;if(n=parentOrHost(t),n===e)return!0}return!1}function matchesFocusWithin(e){let t=e.doc[A];return t!==null&&isShadowIncludingInclusiveAncestor$1(e,t)}function matchesFocusVisible(e){return e.doc[A]===e&&Lu}function autofocusDelegate(e){for(let t=e.first;t!==null;t=nextInTree(t,e)){if(t.type!==1||contentAttr(t,`autofocus`)===null)continue;let e=isFocusable(t)?t:getFocusableArea(t);if(e!==null)return e}return null}function focusFixup(e){let t=e[A];t===null||isFocusable(t)||t.tag===Y.dialog&&t.ns===`http://www.w3.org/1999/xhtml`&&t.flags&1&&!isInert(t)&&!isRenderingHidden(t)||runFocusUpdate(e,t,null)}setRenderingUpdateHook(focusFixup),setTopLayerFocusHooks(e=>{focusElement(e)},autofocusDelegate);function isReplaced$1(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case Y.img:case Y.canvas:case Y.video:case Y.audio:case Y.iframe:case Y.object:case Y.embed:case Y.input:case Y.textarea:case Y.meter:case Y.progress:case Y.frame:return!0}return!1}__name(isReplaced$1,`isReplaced`);function svgRendersContent(e){switch(e.name){case`svg`:case`g`:case`a`:case`switch`:case`text`:case`tspan`:case`textPath`:case`foreignObject`:return!0}return!1}function svgRendersText(e){let t=e.name;return t===`text`||t===`tspan`||t===`textPath`||t===`a`}function kindOf$1(e){switch(e){case`none`:return 0;case`inline`:case`contents`:case`ruby`:case`ruby-base`:case`ruby-text`:case`ruby-base-container`:case`ruby-text-container`:case`table-column`:case`table-column-group`:return 1;case`inline-block`:case`inline-flex`:case`inline-grid`:case`inline-table`:case`inline-flow-root`:case`inline list-item`:return 5;case`table-cell`:return 3;case`table-row`:return 4}return 2}__name(kindOf$1,`kindOf`);function isFlexOrGrid(e){return e===`flex`||e===`grid`||e===`inline-flex`||e===`inline-grid`}function boxKind(e,t){let n=kindOf$1(computedDisplay(e));if(n===0)return 0;if(e.ns===`http://www.w3.org/2000/svg`)return+!!svgRendersContent(e);if(e.ns!==`http://www.w3.org/1999/xhtml`)return n;if(t&&(n===1||n===5)){let t=e.parent;if(t!==null&&t.type===1&&isFlexOrGrid(computedDisplay(t)))n=2;else if(computedValue(e,`float`)!==`none`)n=2;else{let t=computedValue(e,`position`);(t===`absolute`||t===`fixed`)&&(n=2)}}return n}function isBeingRendered(e){if(!(e.flags&1))return!1;for(let t=e;t!==null&&t.type===1;t=t.parent){if(computedDisplay(t)===`none`)return!1;let e=t.parent;if(e!==null&&e.tag===Y.details&&e.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(e,`open`)===null&&!(t.tag===Y.summary&&isFirstSummary(t)))return!1}return!0}function isFirstSummary(e){for(let t=e.parent.first;t!==null;t=t.next)if(t.type===1&&t.tag===Y.summary)return t===e;return!1}function whiteSpaceMode(e,t){if(t){let t=computedValue(e,`white-space`);return t===`pre-line`?1:t===`pre`||t===`pre-wrap`||t===`break-spaces`||t.startsWith(`preserve`)?2:0}for(let t=e;t!==null&&t.type===1;t=t.parent){if(t.ns!==`http://www.w3.org/1999/xhtml`)continue;let e=t.tag;if(e===Y.pre||e===Y.listing||e===Y.xmp||e===Y.plaintext||e===Y.textarea)return 2}return 0}function languageOf(e){for(let t=e;t!==null&&t.type===1;t=t.parent){let e=contentAttr(t,`lang`);if(e!==null)return e===``?void 0:e}}function upper(e,t){try{return e.toLocaleUpperCase(t)}catch{return e.toUpperCase()}}function transform(e,t){let n=computedValue(t,`text-transform`);if(n===``||n===`none`)return e;if(n.includes(`uppercase`))return upper(e,languageOf(t));if(n.includes(`lowercase`)){let n=languageOf(t);try{return e.toLocaleLowerCase(n)}catch{return e.toLowerCase()}}if(n.includes(`capitalize`)){let n=languageOf(t);return e.replace(/(^|[\s\-(["'])(\p{L})/gu,(e,t,r)=>t+upper(r,n))}return e}var Builder=class{parts=[];breaks=0;lastSpace=!0;trimmable=!1;styled;constructor(e){this.styled=e}text(e,t){if(e!==``){if(t===0){if(e=e.replace(/[ \t\n\f\r]+/g,` `),this.lastSpace&&e.charCodeAt(0)===32&&(e=e.slice(1)),e===``)return}else if(t===1){if(e=e.replace(/\r\n?/g,`
40
40
  `).replace(/[ \t\f]+/g,` `).replace(/ ?\n ?/g,`
41
41
  `),this.lastSpace&&e.charCodeAt(0)===32&&(e=e.slice(1)),e===``)return}else e=e.replace(/\r\n?/g,`
42
42
  `);this.flushBreaks(),this.parts.push(e),this.lastSpace=t!==2&&e.charCodeAt(e.length-1)===32,this.trimmable=this.lastSpace}}raw(e){this.trimTrailingSpace(),this.flushBreaks(),this.parts.push(e),this.lastSpace=!0,this.trimmable=!1}lineBreak(e){this.trimTrailingSpace(),e>this.breaks&&(this.breaks=e),this.lastSpace=!0}atomicStart(){return this.lastSpace=!0,this.parts.length}atomicEnd(e){this.parts.length>e&&this.trimTrailingSpace(),this.lastSpace=!1,this.trimmable=!1}flushBreaks(){this.breaks!==0&&(this.parts.length!==0&&this.parts.push(`
43
- `.repeat(this.breaks)),this.breaks=0)}trimTrailingSpace(){let e=this.parts,t=e.length-1;if(t>=0&&this.trimmable&&e[t].endsWith(` `)){let n=e[t].slice(0,-1);n===``?e.pop():e[t]=n}this.trimmable=!1}result(){return this.trimTrailingSpace(),this.parts.join(``)}};function isTableInternal(e){let t=computedDisplay(e);return t===`table`||t===`inline-table`||t===`table-row`||t===`table-row-group`||t===`table-header-group`||t===`table-footer-group`}function isWhitespaceOnly(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==12&&n!==13)return!1}return!0}function textRendered(e,t){if(e.ns===`http://www.w3.org/2000/svg`&&!svgRendersText(e))return!1;if(t){let t=computedVisibility(e);if(t===`hidden`||t===`collapse`)return!1}return!0}function collect$1(e,t){if(e.type===3||e.type===4){let n=e.parent;if(n===null||n.type!==1){t.text(e.data,0);return}if(!textRendered(n,t.styled)||isTableInternal(n)&&isWhitespaceOnly(e.data))return;t.text(t.styled?transform(e.data,n):e.data,whiteSpaceMode(n,t.styled));return}if(e.type!==1)return;let n=boxKind(e,t.styled);if(n===0)return;let r=e.ns===ie;if(r&&e.tag===X.br){t.raw(`
44
- `);return}if(r&&e.tag===X.select){collectOptions(e,t);return}if(isReplaced$1(e)){n===2?t.lineBreak(1):t.atomicEnd(t.atomicStart());return}if(r&&e.tag===X.details&&contentAttr(e,`open`)===null){t.lineBreak(1);for(let n=e.first;n!==null;n=n.next)if(n.type===1&&n.tag===X.summary){collect$1(n,t);break}t.lineBreak(1);return}let i=r&&e.tag===X.p;if(n===5){i&&t.lineBreak(2);let n=t.atomicStart();for(let n=e.first;n!==null;n=n.next)collect$1(n,t);t.atomicEnd(n),i&&t.lineBreak(2)}else{i?t.lineBreak(2):n===2&&t.lineBreak(1);for(let n=e.first;n!==null;n=n.next)collect$1(n,t);n===3?isLastOfKind(e,3,t.styled)||t.raw(` `):n===4&&(isLastRow(e,t.styled)||t.raw(`
45
- `)),i?t.lineBreak(2):n===2&&t.lineBreak(1)}}__name(collect$1,`collect`);function collectOptions(e,t){for(let n=e.first;n!==null;)n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===X.option?(collect$1(n,t),n=nextSkippingChildren(n,e)):(n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===X.optgroup&&t.lineBreak(1),n=nextInTree(n,e))}function isLastOfKind(e,t,n){for(let r=e.next;r!==null;r=r.next)if(r.type===1&&boxKind(r,n)===t)return!1;return!0}function isLastRow(e,t){let n=e.parent;for(;n!==null&&n.type===1&&computedDisplay(n)!==`table`&&computedDisplay(n)!==`inline-table`;)n=n.parent;if(n===null||n.type!==1)return isLastOfKind(e,4,t);let r=null;for(let e=n.first;e!==null;e=nextInTree(e,n))e.type===1&&boxKind(e,t)===4&&(r=e);return r===e}function descendantText(e){let t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}function getInnerText(e){if(!isBeingRendered(e))return descendantText(e);if(isReplaced$1(e))return``;let t=new Builder(hasAuthorStyles(e.doc));if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===X.select)collectOptions(e,t);else for(let n=e.first;n!==null;n=n.next)collect$1(n,t);return t.result()}function renderedTextFragment(e,t){let n=t.doc,r=n.createDocumentFragment(),i=e.split(/\r\n|\r|\n/);for(let e=0;e<i.length;e++)e>0&&r.appendChild(n.createElement(`br`)),i[e]!==``&&r.appendChild(n.createTextNode(i[e]));return r}const Ru=`role ariaAtomic=aria-atomic ariaAutoComplete=aria-autocomplete ariaBrailleLabel=aria-braillelabel ariaBrailleRoleDescription=aria-brailleroledescription ariaBusy=aria-busy ariaChecked=aria-checked ariaColCount=aria-colcount ariaColIndex=aria-colindex ariaColIndexText=aria-colindextext ariaColSpan=aria-colspan ariaCurrent=aria-current ariaDescription=aria-description ariaDisabled=aria-disabled ariaExpanded=aria-expanded ariaHasPopup=aria-haspopup ariaHidden=aria-hidden ariaInvalid=aria-invalid ariaKeyShortcuts=aria-keyshortcuts ariaLabel=aria-label ariaLevel=aria-level ariaLive=aria-live ariaModal=aria-modal ariaMultiLine=aria-multiline ariaMultiSelectable=aria-multiselectable ariaOrientation=aria-orientation ariaPlaceholder=aria-placeholder ariaPosInSet=aria-posinset ariaPressed=aria-pressed ariaReadOnly=aria-readonly ariaRelevant=aria-relevant ariaRequired=aria-required ariaRoleDescription=aria-roledescription ariaRowCount=aria-rowcount ariaRowIndex=aria-rowindex ariaRowIndexText=aria-rowindextext ariaRowSpan=aria-rowspan ariaSelected=aria-selected ariaSetSize=aria-setsize ariaSort=aria-sort ariaValueMax=aria-valuemax ariaValueMin=aria-valuemin ariaValueNow=aria-valuenow ariaValueText=aria-valuetext`,zu=[[`ariaActiveDescendantElement`,`aria-activedescendant`]],Bu=[[`ariaControlsElements`,`aria-controls`],[`ariaDescribedByElements`,`aria-describedby`],[`ariaDetailsElements`,`aria-details`],[`ariaErrorMessageElements`,`aria-errormessage`],[`ariaFlowToElements`,`aria-flowto`],[`ariaLabelledByElements`,`aria-labelledby`],[`ariaOwnsElements`,`aria-owns`]],Vu=/* @__PURE__ */ new WeakMap,Hu=/* @__PURE__ */ new WeakMap;function findRecord(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e];if(r.localName===t&&(r.rare===null||r.rare.ns===null))return r}return null}function liveExplicit(e,t){let n=Vu.get(e);if(n===void 0)return null;let r=n.get(t);return r===void 0?null:findRecord(e,t)===r.record&&r.record.value===``?r:(n.delete(t),null)}function setExplicit(e,t,n){setAttribute(e,t,``);let r=Vu.get(e);r===void 0&&Vu.set(e,r=/* @__PURE__ */ new Map),r.set(t,{record:findRecord(e,t),elements:n,cached:null})}function clearExplicit(e,t){Vu.get(e)?.delete(t),removeAttribute(e,t)}function shadowIncludingParent(e){return e.parent===null?isShadowRootImpl(e)?e.node[j]?.[M]??null:null:e.parent}function isValidReference(e,t){let n=t;for(;n.parent!==null;)n=n.parent;if(n===t)return!1;for(let t=shadowIncludingParent(e);t!==null;t=shadowIncludingParent(t))if(t===n)return!0;return!1}function firstById(e,t){if(t===``)return null;let n=e;for(;n.parent!==null;)n=n.parent;if(n.type===9)return n.node._idLookup(t);if(n.type===1&&n.id===t)return n;for(let e=nextElementInTree(n,n);e!==null;e=nextElementInTree(e,n))if(e.id===t)return e;return null}function attrAssociatedElement(e,t){let n=liveExplicit(e,t);if(n!==null){let t=n.elements[0]?.deref()??null;return t!==null&&isValidReference(e,t)?t:null}let r=findRecord(e,t)?.value;return r===void 0?null:firstById(e,r)}function attrAssociatedElements(e,t){let n=liveExplicit(e,t),r=[];if(n!==null){for(let t of n.elements){let n=t.deref();n!==void 0&&isValidReference(e,n)&&r.push(n)}return r}let i=findRecord(e,t)?.value;if(i===void 0)return null;for(let t of splitOnAsciiWhitespace(i)){let n=firstById(e,t);n!==null&&r.push(n)}return r}function hasExplicitAttrElements(e,t){return liveExplicit(e,t)!==null}function sameContents(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n].node)return!1;return!0}function toElement(e,t){if(!(e instanceof Fo))throw TypeError(`Failed to set the '${t}' property on 'Element': Failed to convert value to 'Element'.`);return e[M]}for(let[e,t]of zu)defineAccessor(Fo,e,function(){return attrAssociatedElement(this[M],t)?.node??null},function(n){n==null?clearExplicit(this[M],t):setExplicit(this[M],t,[new WeakRef(toElement(n,e))])});for(let[e,t]of Bu)defineAccessor(Fo,e,function(){let e=this[M],n=attrAssociatedElements(e,t);if(n===null)return null;let r=liveExplicit(e,t),i=r===null?Hu.get(e)?.get(t):r.cached;if(i!=null&&sameContents(i,n))return i;let a=Object.freeze(n.map(e=>e.node));if(r!==null)r.cached=a;else{let n=Hu.get(e);n===void 0&&Hu.set(e,n=/* @__PURE__ */ new Map),n.set(t,a)}return i=a,i},function(n){let r=this[M];if(n==null){clearExplicit(r,t);return}if(typeof n!=`object`||typeof n[Symbol.iterator]!=`function`)throw TypeError(`Failed to set the '${e}' property on 'Element': The provided value cannot be converted to a sequence.`);let i=[];for(let t of n)i.push(new WeakRef(toElement(t,e)));setExplicit(r,t,i)});nullableStr(Fo,Ru);const Uu=/* @__PURE__ */ new WeakSet;var HTMLElement=class extends Fo{constructor(e,t,n,r){if(e!==void 0){super(e,t,n,r),this[M].flags&128&&(this[M].flags|=4);return}let i=htmlElementConstructorSteps(new.target);if(i.upgrade!==null)return i.upgrade;super(i.doc,i.localName,ie,null),initNewCustomElement(this,i.def,i.active)}_connectedSteps(){let e=this[M];(e.flags&128||isValueOf(this)!==null)&&ceConnected(this),e.flags&16384&&faceStateMaybeChanged(e)}_disconnectedSteps(){let e=this[M];(isPopoverShowing(e)||isInTopLayer(e))&&topLayerRemovingSteps(e),definitionOf(this)!==void 0&&ceDisconnected(this),clearParserAssociation(e),e.flags&16384&&faceStateMaybeChanged(e)}_adoptingSteps(e){ceAdopted(this,e,this[M].doc)}_movingSteps(e,t){definitionOf(this)!==void 0&&ceMoved(this)}_shadowDisabled(){return shadowDisabled(this)}_parserAssociateForm(e){parserAssociateForm(this[M],e[M])}_attributeChangedSteps(e,t,n,r){e===`popover`&&r===null&&popoverAttributeChanged(this[M],t,n),definitionOf(this)!==void 0&&ceAttributeChanged(this,e,t,n,r),this[M].flags&16384&&r===null&&(e===`form`||e===`disabled`)&&faceStateMaybeChanged(this[M])}get style(){return this[jr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get translate(){for(let e=this[M];e!==null&&e.type===1;e=e.parent){let t=contentAttr(e,`translate`);if(t===null)continue;let n=asciiLowercase$1(t);if(n===``||n===`yes`)return!0;if(n===`no`)return!1}return!0}set translate(e){setAttribute(this[M],`translate`,e?`yes`:`no`)}get hidden(){return contentAttr(this[M],`hidden`)!==null}set hidden(e){typeof e==`string`&&asciiLowercase$1(e)===`until-found`?setAttribute(this[M],`hidden`,`until-found`):e===!1||e===``||e==null||e===0||Number.isNaN(e)?removeAttribute(this[M],`hidden`):setAttribute(this[M],`hidden`,``)}get accessKeyLabel(){let e=contentAttr(this[M],`accesskey`);if(e===null)return``;let t=e.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g,``);return t===``||t.length>2||t.length===2&&t.codePointAt(0)<=65535?``:`Alt+Shift+`+t.toUpperCase()}get draggable(){let e=contentAttr(this[M],`draggable`);if(e!==null){let t=asciiLowercase$1(e);if(t===`true`)return!0;if(t===`false`)return!1}let t=this[M];return t.tag===X.img||t.tag===X.a&&contentAttr(t,`href`)!==null}set draggable(e){setAttribute(this[M],`draggable`,e?`true`:`false`)}get spellcheck(){for(let e=this[M];e!==null&&e.type===1;e=e.parent){let t=contentAttr(e,`spellcheck`);if(t===null)continue;let n=asciiLowercase$1(t);if(n===``||n===`true`)return!0;if(n===`false`)return!1}return!0}set spellcheck(e){setAttribute(this[M],`spellcheck`,e?`true`:`false`)}get autocorrect(){return usedAutocorrection(this[M])}set autocorrect(e){setAttribute(this[M],`autocorrect`,e?`on`:`off`)}get contentEditable(){let e=this[M];if(!(e.flags&131072))return`inherit`;let t=contentAttr(e,`contenteditable`);if(t===null)return`inherit`;let n=asciiLowercase$1(t);return n===``||n===`true`?`true`:n===`false`?`false`:n===`plaintext-only`?`plaintext-only`:`inherit`}set contentEditable(e){let t=asciiLowercase$1(String(e));if(t===`inherit`)removeAttribute(this[M],`contenteditable`);else if(t===`true`||t===`false`||t===`plaintext-only`)setAttribute(this[M],`contenteditable`,t);else throw new DOMException(`Failed to set the 'contentEditable' property on 'HTMLElement': The value provided ('${e}') is not one of 'true', 'false', 'plaintext-only', or 'inherit'.`,`SyntaxError`)}get isContentEditable(){return isEditable(this[M])}get innerText(){return getInnerText(this[M])}set innerText(e){let t=e===null?``:String(e);this._replaceAll(t===``?null:renderedTextFragment(t,this[M]))}get outerText(){return getInnerText(this[M])}set outerText(e){let t=this.parentNode;if(t===null)throw new DOMException(`The element has no parent.`,`NoModificationAllowedError`);let n=this.previousSibling,r=this.nextSibling,i=renderedTextFragment(e===null?``:String(e),this[M]);i.hasChildNodes()||i.appendChild(this[M].doc.createTextNode(``)),t.replaceChild(i,this),r!==null&&r.nodeType===3&&mergeWithPrevious(r),n!==null&&n.nodeType===3&&n.nextSibling!==null&&mergeWithPrevious(n.nextSibling)}click(){if(!isActuallyDisabled(this[M])&&!Uu.has(this)){Uu.add(this);try{fireSyntheticClick(this)}finally{Uu.delete(this)}}}showPopover(e){let t=this[M];t.flags|=12,showPopover(t,!0,popoverSource(e))}hidePopover(){hidePopover(this[M],!0,!0,!0,null)}togglePopover(e){let t=null,n=null;typeof e==`boolean`?t=e:typeof e==`object`&&e?(e.force!==void 0&&(t=!!e.force),n=popoverSource(e)):e!=null&&(t=!!e);let r=this[M];r.flags|=12;let i=isPopoverShowing(r);return i&&t!==!0?hidePopover(r,!0,!0,!0,null):t===null||t?showPopover(r,!0,n):checkPopoverValidity(r,i,null),isPopoverShowing(r)}attachInternals(){if(isValueOf(this)!==null)throw new DOMException(`Unable to attach ElementInternals to a customized built-in element.`,`NotSupportedError`);let e=definitionOf(this);if(e===void 0)throw new DOMException(`Unable to attach ElementInternals to non-custom elements.`,`NotSupportedError`);if(e.disableInternals)throw new DOMException(`ElementInternals is disabled by disabledFeature static field.`,`NotSupportedError`);if(Wu.has(this))throw new DOMException(`ElementInternals for the specified element was already attached.`,`NotSupportedError`);let t=new ElementInternals(this);return Wu.set(this,t),t}get offsetParent(){return null}get offsetTop(){return 0}get offsetLeft(){return 0}get offsetWidth(){return 0}get offsetHeight(){return 0}};function inheritsAutocapitalizeAndAutocorrect(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.tag;return t===X.button||t===X.fieldset||t===X.input||t===X.output||t===X.select||t===X.textarea}function autocapitalizeState(e){let t=contentAttr(e,`autocapitalize`);if(t===null)return``;switch(asciiLowercase$1(t)){case``:return``;case`off`:case`none`:return`none`;case`on`:case`sentences`:return`sentences`;case`words`:return`words`;case`characters`:return`characters`}return`sentences`}function ownAutocapitalizationHint(e){let t=autocapitalizeState(e);if(t!==``)return t;if(inheritsAutocapitalizeAndAutocorrect(e)){let t=formOwner(e);if(t!==null)return ownAutocapitalizationHint(t)}return``}function autocorrectState(e){let t=contentAttr(e,`autocorrect`);return t===null?-1:asciiLowercase$1(t)===`off`?0:1}function usedAutocorrection(e){if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===X.input){let t=inputType(e);if(t===4||t===5||t===6)return!1}let t=autocorrectState(e);if(t!==-1)return t===1;if(inheritsAutocapitalizeAndAutocorrect(e)){let t=formOwner(e);if(t!==null)return autocorrectState(t)!==0}return!0}function computedWritingSuggestions(e){for(let t=e;t!==null&&t.type===1;t=t.parent){let e=contentAttr(t,`writingsuggestions`);if(e!==null)return asciiLowercase$1(e)!==`false`}return!0}function mergeWithPrevious(e){let t=e.previousSibling;t!==null&&t.nodeType===3&&(t.data+=e.data,e.remove())}str(HTMLElement,`title lang accessKey=accesskey`),bool(HTMLElement,`inert`),deferCompatMember(HTMLElement.prototype,`HTMLElement`,`inert`),enumerated(HTMLElement,`dir`,{keywords:[`ltr`,`rtl`,`auto`]}),defineAccessor(HTMLElement,`autocapitalize`,function(){return ownAutocapitalizationHint(this[M])},function(e){setAttribute(this[M],`autocapitalize`,String(e))}),defineAccessor(HTMLElement,`writingSuggestions`,function(){return computedWritingSuggestions(this[M])?`true`:`false`},function(e){setAttribute(this[M],`writingsuggestions`,String(e))}),enumerated(HTMLElement,`enterKeyHint=enterkeyhint`,{keywords:[`enter`,`done`,`go`,`next`,`previous`,`search`,`send`]}),enumerated(HTMLElement,`inputMode=inputmode`,{keywords:[`none`,`text`,`tel`,`url`,`email`,`numeric`,`decimal`,`search`]}),enumerated(HTMLElement,`popover`,{keywords:[`auto`,`manual`,`hint`],missing:null,invalid:`manual`,empty:`auto`});const Wu=/* @__PURE__ */ new WeakMap;function customStatesOf(e){return Wu.get(e)?.[Ar]??null}var ElementInternals=class{[Fr];[Ar];[Xr];constructor(e){if(!(e instanceof HTMLElement)||Wu.has(e))throw TypeError(`Illegal constructor`);this[Fr]=e,this[Ar]=null,this[Xr]=null}get shadowRoot(){let e=this[Fr][W];return e==null||!e[He]?null:e}get states(){return this[Ar]??=new CustomStateSet}get form(){return internalsForm(this[Fr][M])}get labels(){return internalsLabels(this[Fr][M])}get willValidate(){return internalsWillValidate(this[Fr][M])}get validity(){return internalsValidity(this[Fr][M])}get validationMessage(){return internalsValidationMessage(this[Fr][M])}setFormValue(e,t){internalsSetFormValue(this[Fr][M],e,t),this[Xr]=e}setValidity(e,t,n){internalsSetValidity(this[Fr][M],e,t,n)}checkValidity(){return internalsCheckValidity(this[Fr][M])}reportValidity(){return internalsCheckValidity(this[Fr][M],`reportValidity`)}};const Gu=/* @__PURE__ */ new WeakMap;for(let e of Ru.split(` `)){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t),r=t===-1?e:e.slice(t+1);Object.defineProperty(ElementInternals.prototype,n,{get(){return Gu.get(this)?.get(r)??null},set(e){let t=Gu.get(this);e==null?t?.delete(r):(t===void 0&&Gu.set(this,t=/* @__PURE__ */ new Map),t.set(r,String(e)))},configurable:!0,enumerable:!0})}const Ku=/* @__PURE__ */ new WeakMap;for(let[e,t]of[[`ariaActiveDescendantElement`,!1],[`ariaControlsElements`,!0],[`ariaDescribedByElements`,!0],[`ariaDetailsElements`,!0],[`ariaErrorMessageElements`,!0],[`ariaFlowToElements`,!0],[`ariaLabelledByElements`,!0],[`ariaOwnsElements`,!0]]){let toElement=t=>{if(!(t instanceof Fo))throw TypeError(`Failed to set the '${e}' property on 'ElementInternals': Failed to convert value to 'Element'.`);return t};Object.defineProperty(ElementInternals.prototype,e,{get(){let n=Ku.get(this)?.get(e);if(n===void 0)return null;if(!t)return n.refs[0]?.deref()??null;let r=[];for(let e of n.refs){let t=e.deref();t!==void 0&&r.push(t)}let i=n.cached;return i!==null&&i.length===r.length&&r.every((e,t)=>i[t]===e)?i:n.cached=Object.freeze(r)},set(n){let r=Ku.get(this);if(n==null){r?.delete(e);return}let i;if(!t)i=[new WeakRef(toElement(n))];else{if(typeof n!=`object`||typeof n[Symbol.iterator]!=`function`)throw TypeError(`Failed to set the '${e}' property on 'ElementInternals': The provided value cannot be converted to a sequence.`);i=[];for(let e of n)i.push(new WeakRef(toElement(e)))}r===void 0&&Ku.set(this,r=/* @__PURE__ */ new Map),r.set(e,{refs:i,cached:null})},configurable:!0,enumerable:!0})}var CustomStateSet=class extends Set{};const qu=Symbol(`nonce`);function installHTMLOrSVGElement(e){installEventHandlers(e.prototype,`element`),defineAccessor(e,`nonce`,function(){let e=this[qu],t=contentAttr(this[M],`nonce`);return e!==void 0&&e[1]===t?e[0]:t??``},function(e){Object.defineProperty(this,qu,{value:[String(e),contentAttr(this[M],`nonce`)],writable:!0,configurable:!0})}),bool(e,`autofocus`),defineAccessor(e,`tabIndex`,function(){let e=tabIndexValue(this[M]);return Number.isNaN(e)?defaultTabIndex(this[M]):e},function(e){setAttribute(this[M],`tabindex`,String(Number(e)|0))}),Object.defineProperty(e.prototype,"focus",{value:function focus(e){focusElement(this[M],e)},writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"blur",{value:function blur(){blurElement(this[M])},writable:!0,configurable:!0,enumerable:!0})}installHTMLOrSVGElement(HTMLElement);for(let e of[Z,ShadowRoot])Object.hasOwn(e.prototype,`activeElement`)||defineAccessor(e,`activeElement`,function(){return activeElement(this[M])});Object.hasOwn(Z.prototype,`hasFocus`)||Object.defineProperty(Z.prototype,"hasFocus",{value:function hasFocus(){return documentHasFocus(this)},writable:!0,configurable:!0,enumerable:!0});function popoverSource(e){if(typeof e!=`object`||!e)return null;let t=e.source;if(t===void 0)return null;if(!(t instanceof HTMLElement))throw TypeError(`Failed to read the 'source' property from the options: The provided value is not of type 'HTMLElement'.`);return t[M]}const Ju=class HTMLCollection$1 extends ka{static{__name(this,`HTMLCollection`)}constructor(e,t){super(e,!1,null),Object.defineProperty(this,Ut,{value:t})}_collect(e){this[Ut](this._s.root,e)}};function fnCollection(e,t){return new Ju(e,t)}function sameObject(e,t,n){let r=e[t];return r===void 0&&(r=n(),Object.defineProperty(e,t,{value:r})),r}var HTMLHtmlElement=class extends HTMLElement{};str(HTMLHtmlElement,`version`);var HTMLHeadElement=class extends HTMLElement{},HTMLBaseElement=class extends HTMLElement{get href(){let e=this[M],t=contentAttr(e,`href`)??``,n=URL.parse(t,e.doc.URL);return n===null?t:n.href}set href(e){setAttribute(this[M],`href`,String(e))}};str(HTMLBaseElement,`target`);var HTMLMetaElement=class extends HTMLElement{};str(HTMLMetaElement,`name httpEquiv=http-equiv content media scheme`);var HTMLBodyElement=class extends HTMLElement{};installEventHandlers(HTMLBodyElement.prototype,`body`),strNullEmpty(HTMLBodyElement,`text link vLink=vlink aLink=alink bgColor=bgcolor`),str(HTMLBodyElement,`background`);var HTMLHeadingElement=class extends HTMLElement{};str(HTMLHeadingElement,`align`);var HTMLParagraphElement=class extends HTMLElement{};str(HTMLParagraphElement,`align`);var HTMLHRElement=class extends HTMLElement{};str(HTMLHRElement,`align color size width`),bool(HTMLHRElement,`noShade=noshade`);var HTMLPreElement=class extends HTMLElement{};long(HTMLPreElement,`width`);var HTMLQuoteElement=class extends HTMLElement{};url(HTMLQuoteElement,`cite`);var HTMLOListElement=class extends HTMLElement{};bool(HTMLOListElement,`reversed compact`),long(HTMLOListElement,`start`,1),str(HTMLOListElement,`type`);var HTMLUListElement=class extends HTMLElement{};bool(HTMLUListElement,`compact`),str(HTMLUListElement,`type`);var HTMLMenuElement=class extends HTMLElement{};bool(HTMLMenuElement,`compact`);var HTMLLIElement=class extends HTMLElement{};long(HTMLLIElement,`value`),str(HTMLLIElement,`type`);var HTMLDListElement=class extends HTMLElement{};bool(HTMLDListElement,`compact`);var HTMLDivElement=class extends HTMLElement{};str(HTMLDivElement,`align`);var HTMLDataElement=class extends HTMLElement{};str(HTMLDataElement,`value`);var HTMLTimeElement=class extends HTMLElement{};str(HTMLTimeElement,`dateTime=datetime`);var HTMLSpanElement=class extends HTMLElement{},HTMLBRElement=class extends HTMLElement{};str(HTMLBRElement,`clear`);var HTMLModElement=class extends HTMLElement{};url(HTMLModElement,`cite`),str(HTMLModElement,`dateTime=datetime`);var HTMLPictureElement=class extends HTMLElement{},HTMLSourceElement=class extends HTMLElement{};url(HTMLSourceElement,`src`),str(HTMLSourceElement,`type srcset sizes media`),ulong(HTMLSourceElement,`width height`);var HTMLImageElement=class extends HTMLElement{get complete(){let e=this[M];if(contentAttr(e,`srcset`)!==null)return!1;let t=contentAttr(e,`src`);return t===null||t===``}get naturalWidth(){return 0}get naturalHeight(){return 0}get currentSrc(){return this.src}get x(){return 0}get y(){return 0}get width(){return dimension(this[M],`width`)}set width(e){setAttribute(this[M],`width`,String(clampUlong(e)))}get height(){return dimension(this[M],`height`)}set height(e){setAttribute(this[M],`height`,String(clampUlong(e)))}decode(){return Promise.resolve()}};str(HTMLImageElement,`alt srcset sizes useMap=usemap name align`),strNullEmpty(HTMLImageElement,`border`),url(HTMLImageElement,`src longDesc=longdesc lowsrc`),enumerated(HTMLImageElement,`crossOrigin=crossorigin`,hs),bool(HTMLImageElement,`isMap=ismap`),ulong(HTMLImageElement,`hspace vspace`),enumerated(HTMLImageElement,`referrerPolicy=referrerpolicy`,gs),enumerated(HTMLImageElement,`decoding`,{keywords:[`sync`,`async`,`auto`],missing:`auto`,invalid:`auto`}),enumerated(HTMLImageElement,`loading`,_s),enumerated(HTMLImageElement,`fetchPriority=fetchpriority`,vs);function clampUlong(e){let t=Number(e)>>>0;return t>2147483647?0:t}function dimension(e,t){let n=contentAttr(e,t);if(n===null)return 0;let r=Number.parseInt(n,10);return Number.isFinite(r)&&r>=0?r:0}const Yu=function Image(e,t){if(new.target===void 0)throw TypeError(`Failed to construct 'Image': Please use the 'new' operator.`);let n=currentDocument().createElementNS(ie,`img`);return e!==void 0&&setAttribute(n[M],`width`,String(Number(e)>>>0)),t!==void 0&&setAttribute(n[M],`height`,String(Number(t)>>>0)),n};Yu.prototype=HTMLImageElement.prototype;var HTMLIFrameElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=4}_connectedSteps(){super._connectedSteps(),frameConnected(this)}_disconnectedSteps(){super._disconnectedSteps(),frameDisconnected(this)}get contentDocument(){return frameContentWindow(this)?.document??null}get contentWindow(){return frameContentWindow(this)}getSVGDocument(){return null}};url(HTMLIFrameElement,`src longDesc=longdesc`),str(HTMLIFrameElement,`srcdoc name allow width height align scrolling frameBorder=frameborder`),strNullEmpty(HTMLIFrameElement,`marginHeight=marginheight marginWidth=marginwidth`),tokenList(HTMLIFrameElement,`sandbox`,`sandbox`,[`allow-downloads`,`allow-forms`,`allow-modals`,`allow-orientation-lock`,`allow-pointer-lock`,`allow-popups`,`allow-popups-to-escape-sandbox`,`allow-presentation`,`allow-same-origin`,`allow-scripts`,`allow-top-navigation`,`allow-top-navigation-by-user-activation`,`allow-top-navigation-to-custom-protocols`]),bool(HTMLIFrameElement,`allowFullscreen=allowfullscreen`),enumerated(HTMLIFrameElement,`referrerPolicy=referrerpolicy`,gs),enumerated(HTMLIFrameElement,`loading`,_s);var HTMLEmbedElement=class extends HTMLElement{getSVGDocument(){return null}};url(HTMLEmbedElement,`src`),str(HTMLEmbedElement,`type width height align name`);var HTMLObjectElement=class extends HTMLElement{[T]=``;[Yr]=null;get contentDocument(){return null}get contentWindow(){return null}getSVGDocument(){return null}get form(){let e=formOwner(this[M]);return e===null?null:e.node}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLObjectElement),url(HTMLObjectElement,`data codeBase=codebase`),str(HTMLObjectElement,`type name useMap=usemap width height align archive code standby codeType=codetype`),strNullEmpty(HTMLObjectElement,`border`),bool(HTMLObjectElement,`declare`),ulong(HTMLObjectElement,`hspace vspace`);var HTMLParamElement=class extends HTMLElement{};str(HTMLParamElement,`name value type valueType=valuetype`);var HTMLTrackElement=class extends HTMLElement{static NONE=0;static LOADING=1;static LOADED=2;static ERROR=3;get readyState(){return 0}get track(){return null}};enumerated(HTMLTrackElement,`kind`,{keywords:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],missing:`subtitles`,invalid:`metadata`}),url(HTMLTrackElement,`src`),str(HTMLTrackElement,`srclang label`),bool(HTMLTrackElement,`default`);var HTMLMapElement=class extends HTMLElement{get areas(){return sameObject(this,Xu,()=>fnCollection(this[M],(e,t)=>{for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))n.tag===X.area&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}};const Xu=Symbol(`areas`);str(HTMLMapElement,`name`);var HTMLCanvasElement=class extends HTMLElement{getContext(e,t){return null}toDataURL(e,t){return`data:,`}toBlob(e){queueElementTask(this,()=>e(null))}transferControlToOffscreen(){throw new DOMException(`OffscreenCanvas is not supported.`,`NotSupportedError`)}captureStream(){throw new DOMException(`captureStream is not supported.`,`NotSupportedError`)}};ulong(HTMLCanvasElement,`width`,300),ulong(HTMLCanvasElement,`height`,150);function childOfType(e,t){for(let n=e.first;n!==null;n=n.next)if(n.type===1&&n.tag===t&&n.ns===`http://www.w3.org/1999/xhtml`)return n;return null}function hierarchyError(e){return new DOMException(e,`HierarchyRequestError`)}function indexError(e){return new DOMException(`The index provided (${e}) is outside the valid range.`,`IndexSizeError`)}const Zu=Symbol(`rows`),Qu=Symbol(`tBodies`),$u=Symbol(`cells`);function fillTableRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===X.thead&&n.ns===`http://www.w3.org/1999/xhtml`&&pushRows(n,t);for(let n=e.first;n!==null;n=n.next)n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&(n.tag===X.tr?t.push(n.node):n.tag===X.tbody&&pushRows(n,t));for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===X.tfoot&&n.ns===`http://www.w3.org/1999/xhtml`&&pushRows(n,t)}function pushRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===X.tr&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}var HTMLTableElement=class extends HTMLElement{get caption(){let e=childOfType(this[M],X.caption);return e===null?null:e.node}set caption(e){let t=childOfType(this[M],X.caption);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this.firstChild)}createCaption(){let e=childOfType(this[M],X.caption);if(e!==null)return e.node;let t=this[M].doc.createElement(`caption`);return this.insertBefore(t,this.firstChild),t}deleteCaption(){let e=childOfType(this[M],X.caption);e!==null&&this.removeChild(e.node)}get tHead(){let e=childOfType(this[M],X.thead);return e===null?null:e.node}set tHead(e){if(e!==null&&e[M].tag!==X.thead)throw hierarchyError(`Not a thead element.`);let t=childOfType(this[M],X.thead);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this._afterCaptionAndColgroups())}createTHead(){let e=childOfType(this[M],X.thead);if(e!==null)return e.node;let t=this[M].doc.createElement(`thead`);return this.insertBefore(t,this._afterCaptionAndColgroups()),t}deleteTHead(){let e=childOfType(this[M],X.thead);e!==null&&this.removeChild(e.node)}get tFoot(){let e=childOfType(this[M],X.tfoot);return e===null?null:e.node}set tFoot(e){if(e!==null&&e[M].tag!==X.tfoot)throw hierarchyError(`Not a tfoot element.`);let t=childOfType(this[M],X.tfoot);t!==null&&this.removeChild(t.node),e!==null&&this.appendChild(e)}createTFoot(){let e=childOfType(this[M],X.tfoot);return e===null?this.appendChild(this[M].doc.createElement(`tfoot`)):e.node}deleteTFoot(){let e=childOfType(this[M],X.tfoot);e!==null&&this.removeChild(e.node)}get tBodies(){return sameObject(this,Qu,()=>fnCollection(this[M],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===X.tbody&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}createTBody(){let e=this[M].doc.createElement(`tbody`),t=null;for(let e=this[M].first;e!==null;e=e.next)e.type===1&&e.tag===X.tbody&&e.ns===`http://www.w3.org/1999/xhtml`&&(t=e);return this.insertBefore(e,t===null||t.next===null?null:t.next.node),e}get rows(){return sameObject(this,Zu,()=>fnCollection(this[M],fillTableRows))}insertRow(e=-1){e=Number(e)|0;let t=this.rows,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc,i=r.createElement(`tr`);if(n===0&&childOfType(this[M],X.tbody)===null)this.appendChild(r.createElement(`tbody`)).appendChild(i);else if(n===0){let e=null;for(let t=this[M].first;t!==null;t=t.next)t.type===1&&t.tag===X.tbody&&t.ns===`http://www.w3.org/1999/xhtml`&&(e=t.node);e.appendChild(i)}else if(e===-1||e===n)t.item(n-1).parentNode.appendChild(i);else{let n=t.item(e);n.parentNode.insertBefore(i,n)}return i}deleteRow(e){e=Number(e)|0;let t=this.rows,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}_afterCaptionAndColgroups(){for(let e=this[M].first;e!==null;e=e.next)if(e.type===1&&(e.tag!==X.caption&&e.tag!==X.colgroup||e.ns!==`http://www.w3.org/1999/xhtml`))return e.node;return null}};str(HTMLTableElement,`align border frame rules summary width`),strNullEmpty(HTMLTableElement,`bgColor=bgcolor cellPadding=cellpadding cellSpacing=cellspacing`);var HTMLTableCaptionElement=class extends HTMLElement{};str(HTMLTableCaptionElement,`align`);var HTMLTableColElement=class extends HTMLElement{};clampedUlong(HTMLTableColElement,`span`,`span`,1,1,1e3),str(HTMLTableColElement,`align ch=char chOff=charoff vAlign=valign width`);var HTMLTableSectionElement=class extends HTMLElement{get rows(){return sameObject(this,Zu,()=>fnCollection(this[M],pushRows))}insertRow(e=-1){e=Number(e)|0;let t=this.rows,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc.createElement(`tr`);return e===-1||e===n?this.appendChild(r):this.insertBefore(r,t.item(e)),r}deleteRow(e){e=Number(e)|0;let t=this.rows,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}};str(HTMLTableSectionElement,`align ch=char chOff=charoff vAlign=valign`);var HTMLTableRowElement=class extends HTMLElement{get rowIndex(){let e=this[M].parent;if(e===null)return-1;let t=null;if(e.tag===X.table&&e.ns===`http://www.w3.org/1999/xhtml`?t=e:(e.tag===X.thead||e.tag===X.tbody||e.tag===X.tfoot)&&e.ns===`http://www.w3.org/1999/xhtml`&&e.parent!==null&&e.parent.tag===X.table&&(t=e.parent),t===null)return-1;let n=[];return fillTableRows(t,n),n.indexOf(this)}get sectionRowIndex(){let e=this[M].parent;if(e===null)return-1;let t=[];return e.tag===X.table?fillTableRows(e,t):pushRows(e,t),t.indexOf(this)}get cells(){return sameObject(this,$u,()=>fnCollection(this[M],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&(n.tag===X.td||n.tag===X.th)&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}insertCell(e=-1){e=Number(e)|0;let t=this.cells,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc.createElement(`td`);return e===-1||e===n?this.appendChild(r):this.insertBefore(r,t.item(e)),r}deleteCell(e){e=Number(e)|0;let t=this.cells,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}};str(HTMLTableRowElement,`align ch=char chOff=charoff vAlign=valign`),strNullEmpty(HTMLTableRowElement,`bgColor=bgcolor`);var HTMLTableCellElement=class extends HTMLElement{get cellIndex(){let e=this[M].parent;if(e===null||e.tag!==X.tr)return-1;let t=0;for(let n=e.first;n!==null;n=n.next){if(n===this[M])return t;n.type===1&&(n.tag===X.td||n.tag===X.th)&&n.ns===`http://www.w3.org/1999/xhtml`&&t++}return-1}};clampedUlong(HTMLTableCellElement,`colSpan`,`colspan`,1,1,1e3),clampedUlong(HTMLTableCellElement,`rowSpan`,`rowspan`,1,0,65534),str(HTMLTableCellElement,`headers abbr axis align ch=char chOff=charoff vAlign=valign width height`),strNullEmpty(HTMLTableCellElement,`bgColor=bgcolor`),enumerated(HTMLTableCellElement,`scope`,{keywords:[`row`,`col`,`rowgroup`,`colgroup`]}),bool(HTMLTableCellElement,`noWrap=nowrap`);var HTMLDirectoryElement=class extends HTMLElement{};bool(HTMLDirectoryElement,`compact`);var HTMLFontElement=class extends HTMLElement{};strNullEmpty(HTMLFontElement,`color`),str(HTMLFontElement,`face size`);var HTMLFrameSetElement=class extends HTMLElement{};installEventHandlers(HTMLFrameSetElement.prototype,`body`),str(HTMLFrameSetElement,`cols rows`);var HTMLFrameElement=class extends HTMLElement{get contentDocument(){return null}get contentWindow(){return null}};str(HTMLFrameElement,`name scrolling frameBorder=frameborder`),strNullEmpty(HTMLFrameElement,`marginHeight=marginheight marginWidth=marginwidth`),url(HTMLFrameElement,`src longDesc=longdesc`),bool(HTMLFrameElement,`noResize=noresize`);var HTMLMarqueeElement=class extends HTMLElement{start(){}stop(){}};str(HTMLMarqueeElement,`behavior bgColor=bgcolor direction height width`),ulong(HTMLMarqueeElement,`hspace vspace`),long(HTMLMarqueeElement,`loop`,-1),ulong(HTMLMarqueeElement,`scrollAmount=scrollamount`,6),ulong(HTMLMarqueeElement,`scrollDelay=scrolldelay`,85),bool(HTMLMarqueeElement,`trueSpeed=truespeed`);var HTMLUnknownElement=class extends HTMLElement{};function linkURL(e){let t=contentAttr(e,`href`);return t===null?null:URL.parse(t,e.doc.baseURI)}function updateHref(e,t){setAttribute(e,`href`,t.href)}const ed=[`noreferrer`,`noopener`,`opener`];function installHyperlinkUtils(e){let t=e.prototype,define=(e,n,r)=>{Object.defineProperty(t,e,{get(){let e=this[M];return n(linkURL(e),e)},set:r?function(e){let t=this[M],n=linkURL(t);n!==null&&r(n,String(e))&&updateHref(t,n)}:void 0,configurable:!0,enumerable:!0})};Object.defineProperty(t,"href",{get(){let e=this[M],t=contentAttr(e,`href`);if(t===null)return``;let n=URL.parse(t,e.doc.baseURI);return n===null?t:n.href},set(e){setAttribute(this[M],`href`,String(e))},configurable:!0,enumerable:!0}),Object.defineProperty(t,"toString",{value:function toString(){return this.href},writable:!0,configurable:!0,enumerable:!0}),define(`origin`,e=>e===null?``:e.origin),define(`protocol`,e=>e===null?`:`:e.protocol,(e,t)=>(e.protocol=t+`:`,!0)),define(`username`,e=>e===null?``:e.username,(e,t)=>e.host===``||e.protocol===`file:`?!1:(e.username=t,!0)),define(`password`,e=>e===null?``:e.password,(e,t)=>e.host===``||e.protocol===`file:`?!1:(e.password=t,!0)),define(`host`,e=>e===null?``:e.host,(e,t)=>(e.host=t,!0)),define(`hostname`,e=>e===null?``:e.hostname,(e,t)=>(e.hostname=t,!0)),define(`port`,e=>e===null?``:e.port,(e,t)=>(e.port=t,!0)),define(`pathname`,e=>e===null?``:e.pathname,(e,t)=>(e.pathname=t,!0)),define(`search`,e=>e===null?``:e.search,(e,t)=>(e.search=t,!0)),define(`hash`,e=>e===null?``:e.hash,(e,t)=>(e.hash=t,!0))}function followHyperlink(e){let t=e[M],n=linkURL(t);if(n===null)return;let r=t.doc[J];if(r===null||r.location===void 0)return;let i=contentAttr(t,`target`);if(i!==null&&i!==``&&i.toLowerCase()!==`_self`||contentAttr(t,`download`)!==null)return;let a=URL.parse(t.doc.URL);if(a===null)return;let o=new URL(n.href);if(o.hash=``,a.hash=``,o.href===a.href&&n.href.indexOf(`#`)!==-1)try{r.location.hash=n.hash}catch{}}function reportFollowedHyperlink(e){if(!notImplementedActive()||e.name!==`a`&&!(e.flags&1))return;let t=e.doc[J];if(t===null)return;let n=contentAttr(e,`target`);if(n===null){let t=querySelector(e.doc[M],`base[target]`);n=t===null?``:contentAttr(t,`target`)??``}let r=n.toLowerCase(),i=null;if(r===``||r===`_self`)i=t;else if(r===`_parent`)i=t[Bn]??t;else if(r===`_top`)for(i=t;i[Bn]!==null;)i=i[Bn];if(i===null)return;let a=linkURL(e);if(a===null||a.protocol===`javascript:`)return;let o=i;t._task(()=>{let e=new URL(o[K].href),t=new URL(a.href);e.hash=``,t.hash=``,e.href!==t.href&&reportNotImplemented(o,Vl)},0)}var HTMLAnchorElement=class extends HTMLElement{get text(){let e=this[M],t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}set text(e){this.textContent=e}get _hasActivationBehavior(){return contentAttr(this[M],`href`)!==null}_activationBehavior(e){contentAttr(this[M],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[M]))}};installHyperlinkUtils(HTMLAnchorElement),str(HTMLAnchorElement,`target download ping rel hreflang type coords charset name rev shape`),tokenList(HTMLAnchorElement,`relList`,`rel`,ed),enumerated(HTMLAnchorElement,`referrerPolicy=referrerpolicy`,gs);var HTMLAreaElement=class extends HTMLElement{get _hasActivationBehavior(){return contentAttr(this[M],`href`)!==null}_activationBehavior(e){contentAttr(this[M],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[M]))}};installHyperlinkUtils(HTMLAreaElement),str(HTMLAreaElement,`alt coords shape target download ping rel hreflang type`),tokenList(HTMLAreaElement,`relList`,`rel`,ed),enumerated(HTMLAreaElement,`referrerPolicy=referrerpolicy`,gs),bool(HTMLAreaElement,`noHref=nohref`);const td={load:stubbedMethod(`HTMLMediaElement`,`load`),play:stubbedMethod(`HTMLMediaElement`,`play`),pause:stubbedMethod(`HTMLMediaElement`,`pause`),addTextTrack:stubbedMethod(`HTMLMediaElement`,`addTextTrack`)},windowOf=e=>e[M].doc[J];var MediaState=class{paused=!0;currentTime=0;volume=1;muted=null;playbackRate=1;defaultPlaybackRate=1;ended=!1;seeking=!1;preservesPitch=!0;srcObject=null};const nd=Symbol(`media`);function state$1(e){let t=e[nd];return t===void 0&&(t=new MediaState,Object.defineProperty(e,nd,{value:t})),t}__name(state$1,`state`);var TimeRanges=class{get length(){return 0}start(e){throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (0).`,`IndexSizeError`)}end(e){throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (0).`,`IndexSizeError`)}},MediaError=class{static MEDIA_ERR_ABORTED=1;static MEDIA_ERR_NETWORK=2;static MEDIA_ERR_DECODE=3;static MEDIA_ERR_SRC_NOT_SUPPORTED=4},HTMLMediaElement=class extends HTMLElement{static NETWORK_EMPTY=0;static NETWORK_IDLE=1;static NETWORK_LOADING=2;static NETWORK_NO_SOURCE=3;static HAVE_NOTHING=0;static HAVE_METADATA=1;static HAVE_CURRENT_DATA=2;static HAVE_FUTURE_DATA=3;static HAVE_ENOUGH_DATA=4;get error(){return null}get currentSrc(){return this.src}get srcObject(){return state$1(this).srcObject}set srcObject(e){state$1(this).srcObject=e}get networkState(){return 0}get buffered(){return new TimeRanges}get readyState(){return 0}get seeking(){return state$1(this).seeking}get currentTime(){return state$1(this).currentTime}set currentTime(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`The provided double value is non-finite.`);state$1(this).currentTime=t}fastSeek(e){this.currentTime=e}get duration(){return NaN}getStartDate(){return/* @__PURE__ */ new Date(NaN)}get paused(){return state$1(this).paused}get defaultPlaybackRate(){return state$1(this).defaultPlaybackRate}set defaultPlaybackRate(e){state$1(this).defaultPlaybackRate=Number(e),fireEvent(this,`ratechange`)}get playbackRate(){return state$1(this).playbackRate}set playbackRate(e){state$1(this).playbackRate=Number(e),fireEvent(this,`ratechange`)}get preservesPitch(){return state$1(this).preservesPitch}set preservesPitch(e){state$1(this).preservesPitch=!!e}get played(){return new TimeRanges}get seekable(){return new TimeRanges}get ended(){return state$1(this).ended}get volume(){return state$1(this).volume}set volume(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`The provided double value is non-finite.`);if(t<0||t>1)throw new DOMException(`The volume provided (${t}) is outside the range [0, 1].`,`IndexSizeError`);let n=state$1(this);n.volume!==t&&(n.volume=t,fireEvent(this,`volumechange`))}get muted(){return state$1(this).muted??contentAttr(this[M],`muted`)!==null}set muted(e){let t=state$1(this),n=!!e;this.muted===n?t.muted=n:(t.muted=n,fireEvent(this,`volumechange`))}canPlayType(e){return``}load(){reportNotImplemented(windowOf(this),td.load);let e=state$1(this),t=!e.paused;e.currentTime=0,e.ended=!1,t&&(e.paused=!0,queueElementTask(this,()=>fireEvent(this,`pause`))),queueElementTask(this,()=>fireEvent(this,`emptied`))}play(){reportNotImplemented(windowOf(this),td.play);let e=state$1(this);return e.paused&&(e.paused=!1,e.ended=!1,queueElementTask(this,()=>{fireEvent(this,`play`),fireEvent(this,`playing`)})),Promise.resolve()}pause(){reportNotImplemented(windowOf(this),td.pause);let e=state$1(this);e.paused||(e.paused=!0,queueElementTask(this,()=>{fireEvent(this,`timeupdate`),fireEvent(this,`pause`)}))}get textTracks(){return[]}get audioTracks(){return[]}get videoTracks(){return[]}addTextTrack(){throw reportNotImplemented(windowOf(this),td.addTextTrack),new DOMException(`Text tracks are not supported.`,`NotSupportedError`)}setMediaKeys(){return Promise.resolve()}get mediaKeys(){return null}setSinkId(){return Promise.resolve()}get sinkId(){return``}};url(HTMLMediaElement,`src`),enumerated(HTMLMediaElement,`crossOrigin=crossorigin`,hs),enumerated(HTMLMediaElement,`preload`,{keywords:[`none`,`metadata`,`auto`],missing:`metadata`,invalid:`metadata`,empty:`auto`}),enumerated(HTMLMediaElement,`loading`,_s),bool(HTMLMediaElement,`autoplay loop controls defaultMuted=muted disableRemotePlayback=disableremoteplayback`);var HTMLAudioElement=class extends HTMLMediaElement{},HTMLVideoElement=class extends HTMLMediaElement{get videoWidth(){return 0}get videoHeight(){return 0}getVideoPlaybackQuality(){return{creationTime:performance.now(),droppedVideoFrames:0,totalVideoFrames:0}}requestPictureInPicture(){return Promise.reject(new DOMException(`Picture-in-Picture is not supported.`,`NotSupportedError`))}requestVideoFrameCallback(e){return 0}cancelVideoFrameCallback(e){}};ulong(HTMLVideoElement,`width height`),url(HTMLVideoElement,`poster`),bool(HTMLVideoElement,`playsInline=playsinline disablePictureInPicture=disablepictureinpicture`);const rd=function Audio(e){if(new.target===void 0)throw TypeError(`Failed to construct 'Audio': Please use the 'new' operator.`);let t=currentDocument().createElementNS(ie,`audio`);return setAttribute(t[M],`preload`,`auto`),e!==void 0&&setAttribute(t[M],`src`,String(e)),t};rd.prototype=HTMLAudioElement.prototype;const id=/* @__PURE__ */ new WeakMap;function queueDetailsToggle(e,t,n){let r=id.get(e);r!==void 0&&(t=r.oldState,r.cancelled=!0);let i={oldState:t,cancelled:!1};id.set(e,i),queueElementTask(e,()=>{i.cancelled||(id.delete(e),fireToggleEvent(e.node,`toggle`,t,n,!1))})}function nameGroupOthers(e,t,n){let r=treeRoot(e);for(let i=r.first;i!==null;i=nextInTree(i,r))i!==e&&i.type===1&&i.tag===X.details&&i.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(i,`name`)===t&&n.push(i);return n}var HTMLDetailsElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;let i=this[M];if(e===`name`)ensureClosingGiven(i);else if(e===`open`){if(t===null&&n!==null){queueDetailsToggle(i,`closed`,`open`);let e=contentAttr(i,`name`);if(e!==null&&e!==``)for(let t of nameGroupOthers(i,e,[]))contentAttr(t,`open`)!==null&&removeAttribute(t,`open`)}else t!==null&&n===null&&queueDetailsToggle(i,`open`,`closed`)}}_connectedSteps(){super._connectedSteps(),ensureClosingGiven(this[M])}};function ensureClosingGiven(e){if(contentAttr(e,`open`)===null)return;let t=contentAttr(e,`name`);if(t!==null&&t!==``){for(let n of nameGroupOthers(e,t,[]))if(contentAttr(n,`open`)!==null){removeAttribute(e,`open`);return}}}bool(HTMLDetailsElement,`open`),str(HTMLDetailsElement,`name`);const ad=HTMLElement,od=class HTMLElement extends ad{get _hasActivationBehavior(){return isSummaryForParentDetails(this[M])}_activationBehavior(e){let t=this[M];if(!isSummaryForParentDetails(t))return;let n=e?.target?.[M];if(n!==void 0&&inInteractiveContent(n,t))return;let r=t.parent;outsideCEReactions(()=>{contentAttr(r,`open`)===null?setAttribute(r,`open`,``):removeAttribute(r,`open`)})}};function inInteractiveContent(e,t){for(let n=e;n!==null&&n!==t;n=n.parent)if(n.type===1){if(n.ns===`http://www.w3.org/2000/svg`){if(n.name===`a`&&(contentAttr(n,`href`)!==null||n.attrs?.some(e=>e.localName===`href`)))return!0}else if(n.ns===`http://www.w3.org/1999/xhtml`)switch(n.tag){case X.a:if(contentAttr(n,`href`)!==null)return!0;break;case X.audio:case X.video:if(contentAttr(n,`controls`)!==null)return!0;break;case X.img:if(contentAttr(n,`usemap`)!==null)return!0;break;case X.input:if(contentAttr(n,`type`)?.toLowerCase()!==`hidden`)return!0;break;case X.button:case X.details:case X.embed:case X.iframe:case X.label:case X.select:case X.textarea:return!0}}return!1}const sd=/* @__PURE__ */ new WeakMap;function dialogRecord(e){let t=sd.get(e);return t===void 0&&(t={returnValue:``,toggleTracker:null,closeWatcher:null,requestCloseReturnValue:null,requestCloseSource:null,enableCloseWatcherForRequestClose:!1},sd.set(e,t)),t}function nodeOf(e){return e===null?null:e.node}function queueDialogToggle(e,t,n,r){let i=dialogRecord(e);i.toggleTracker!==null&&(t=i.toggleTracker.oldState,i.toggleTracker.cancelled=!0,i.toggleTracker=null);let a={oldState:t,cancelled:!1};i.toggleTracker=a,queueElementTask(e,()=>{a.cancelled||(fireToggleEvent(e.node,`toggle`,t,n,!1,nodeOf(r)),i.toggleTracker===a&&(i.toggleTracker=null))})}function computedClosedBy(e){let t=contentAttr(e,`closedby`)?.toLowerCase();return t===`any`||t===`closerequest`||t===`none`?t:matchesModal(e)?`closerequest`:`none`}var HTMLDialogElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}get returnValue(){return sd.get(this[M])?.returnValue??``}set returnValue(e){dialogRecord(this[M]).returnValue=String(e)}get closedBy(){return computedClosedBy(this[M])}set closedBy(e){setAttribute(this[M],`closedby`,String(e))}show(){let e=this[M];if(contentAttr(e,`open`)!==null){if(!matchesModal(e))return;throw new DOMException(`The dialog is already open as a modal dialog.`,`InvalidStateError`)}if(!fireToggleEvent(this,`beforetoggle`,`closed`,`open`,!0)||contentAttr(e,`open`)!==null)return;queueDialogToggle(e,`closed`,`open`,null),setAttribute(e,`open`,``),setPreviouslyFocused(e,e.doc[A]);let t=e.doc;hidePopoversUntil(t,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}showModal(){showModalDialog(this[M],null)}close(e){closeDialog(this[M],e===void 0?null:String(e),null)}requestClose(e){requestCloseDialog(this[M],e===void 0?null:String(e),null)}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null||e!==`open`)return;let i=this[M];n===null&&t!==null&&dialogCleanupSteps(i),isFullyActive(i.doc)&&i.flags&1&&n!==null&&t===null&&dialogSetupSteps(i)}_connectedSteps(){super._connectedSteps();let e=this[M];isFullyActive(e.doc)&&contentAttr(e,`open`)!==null&&e.flags&1&&dialogSetupSteps(e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[M];contentAttr(e,`open`)!==null&&dialogCleanupSteps(e),removeFromTopLayer(e),setModal(e,!1)}};bool(HTMLDialogElement,`open`);function showModalDialog(e,t){let n=e.node;if(contentAttr(e,`open`)!==null){if(matchesModal(e))return;throw new DOMException(`The dialog is already open as a non-modal dialog.`,`InvalidStateError`)}if(!isFullyActive(e.doc))throw new DOMException(`The dialog's document is not fully active.`,`InvalidStateError`);if(!(e.flags&1))throw new DOMException(`The dialog is not connected.`,`InvalidStateError`);if(isPopoverShowing(e))throw new DOMException(`The dialog is already open as a popover.`,`InvalidStateError`);if(!fireToggleEvent(n,`beforetoggle`,`closed`,`open`,!0,nodeOf(t))||contentAttr(e,`open`)!==null||!(e.flags&1)||isPopoverShowing(e))return;queueDialogToggle(e,`closed`,`open`,t),setAttribute(e,`open`,``),setModal(e,!0);let r=e.doc,i=r[A];isInTopLayer(e)||addToTopLayer(e),i!==null&&isInert(i)&&blurElement(i),setPreviouslyFocused(e,i),hidePopoversUntil(r,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}function closeDialog(e,t,n){let r=e.node;if(contentAttr(e,`open`)===null||(fireToggleEvent(r,`beforetoggle`,`open`,`closed`,!1,nodeOf(n)),contentAttr(e,`open`)===null))return;queueDialogToggle(e,`open`,`closed`,n),removeAttribute(e,`open`);let i=matchesModal(e);i&&removeFromTopLayer(e),setModal(e,!1);let a=dialogRecord(e);t!==null&&(a.returnValue=t),a.requestCloseReturnValue=null,a.requestCloseSource=null;let o=getPreviouslyFocused(e);if(o!==null){setPreviouslyFocused(e,null);let t=e.doc[A];(t!==null&&isShadowIncludingInclusiveAncestor(e,t)||i)&&focusElement(o,{preventScroll:!0})}queueElementTask(r,()=>fireEvent(r,`close`))}function requestCloseDialog(e,t,n){if(contentAttr(e,`open`)===null||!(e.flags&1)||!isFullyActive(e.doc))return;let r=dialogRecord(e);if(r.closeWatcher!==null){r.enableCloseWatcherForRequestClose=!0,r.requestCloseReturnValue=t,r.requestCloseSource=n;try{requestCloseWatcher(r.closeWatcher,!1)}finally{r.enableCloseWatcherForRequestClose=!1}}}function dialogSetupSteps(e){let t=openDialogsList(e.doc);if(t.includes(e))return;t.push(e);let n=dialogRecord(e);n.closeWatcher===null&&(n.closeWatcher=establishCloseWatcher(e.doc,t=>fireEvent(e.node,`cancel`,!1,t),()=>closeDialog(e,n.requestCloseReturnValue,n.requestCloseSource),()=>n.enableCloseWatcherForRequestClose||computedClosedBy(e)!==`none`))}function dialogCleanupSteps(e){let t=openDialogsList(e.doc),n=t.indexOf(e);n!==-1&&t.splice(n,1);let r=sd.get(e);r!==void 0&&r.closeWatcher!==null&&(destroyCloseWatcher(r.closeWatcher),r.closeWatcher=null)}function dialogFocusingSteps(e){let t=null;contentAttr(e,`autofocus`)!==null&&(t=e),t===null&&(t=focusDelegate(e)),t===null&&(t=e),focusElement(t)}function submitFormToDialog(e,t){let n=t===e?null:contentAttr(t,`formmethod`);if(n===null&&(n=contentAttr(e,`method`)),n?.toLowerCase()!==`dialog`)return!1;let r=e.parent;for(;r!==null&&(r.type!==1||r.tag!==X.dialog||r.ns!==`http://www.w3.org/1999/xhtml`);)r=r.parent;if(r===null)return!0;let i;if(t===e)i=``;else if(t.tag===X.input&&contentAttr(t,`type`)?.toLowerCase()===`image`){let e=ql.get(t);i=e===void 0?`0,0`:`${e.x},${e.y}`}else i=contentAttr(t,`value`);return closeDialog(r,i,null),!0}function dialogCommandSteps(e,t,n){if(isPopoverShowing(e))return;let r=contentAttr(e,`open`)!==null,i=contentAttr(t,`value`);if(n===`close`&&r)closeDialog(e,i,t);else if(n===`request-close`&&r)requestCloseDialog(e,i,t);else if(n===`show-modal`&&!r)try{showModalDialog(e,t)}catch{}}function nearestClickedDialog(e){for(let t=e;t!==null;t=flatParent(t))if(t.tag===X.dialog&&t.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(t,`open`)!==null)return t;return null}function lightDismissOpenDialogs(e,t,n){let r=openDialogsList(e);if(r.length===0)return;let i=nearestClickedDialog(t);if(n===`pointerdown`){dialogPointerdownTarget(e,i);return}let a=i===dialogPointerdownTarget(e);if(dialogPointerdownTarget(e,null),!a)return;let o=r[r.length-1];if(i===o||computedClosedBy(o)!==`any`)return;let s=sd.get(o);s?.closeWatcher&&requestCloseWatcher(s.closeWatcher,!1)}function isShadowIncludingInclusiveAncestor(e,t){for(let n=t;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else n=null}return!1}setTopLayerDialogHooks(dialogFocusingSteps,lightDismissOpenDialogs),setDialogCommandSteps(dialogCommandSteps),setDialogSubmission(submitFormToDialog);const cd=/* @__PURE__ */ new WeakMap;function templateContentsOwner(e){let t=cd.get(e);if(t!==void 0)return t;let n=e[N]?Z._createHTML(null):new Z;return e[N]||(n[ft]=e[ft]),cd.set(n,n),cd.set(e,n),n}const ld=Symbol(`content`);var HTMLTemplateElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=xe}get content(){let e=this[ld];return e===void 0&&(e=new DocumentFragment(templateContentsOwner(this[M].doc)),e[j]=this,Object.defineProperty(this,ld,{value:e,writable:!0})),e}_cloningSteps(e,t){if(super._cloningSteps(e,t),!t)return;let n=this[ld];if(n===void 0||n[M].first===null)return;let r=e.content,i=r[M].doc;for(let e=n[M].first;e!==null;e=e.next)appendDetached(cloneNode(e,i,!0),r[M])}_adoptingSteps(e){super._adoptingSteps(e);let t=this[ld];t!==void 0&&templateContentsOwner(this[M].doc).adoptNode(t)}};enumerated(HTMLTemplateElement,`shadowRootMode=shadowrootmode`,{keywords:[`open`,`closed`]}),enumerated(HTMLTemplateElement,`shadowRootSlotAssignment=shadowrootslotassignment`,{keywords:[`named`,`manual`],missing:`named`,invalid:`named`}),bool(HTMLTemplateElement,`shadowRootDelegatesFocus=shadowrootdelegatesfocus shadowRootClonable=shadowrootclonable shadowRootSerializable=shadowrootserializable`);var HTMLSlotElement=class extends HTMLElement{assignedNodes(e){return assignedNodes(this[M],!!e?.flatten).map(e=>e.node)}assignedElements(e){return assignedElements(this[M],!!e?.flatten).map(e=>e.node)}assign(...e){let t=[];for(let n of e){let e=n?.[M];if(e===void 0||e.type!==1&&e.type!==3)throw TypeError(`Failed to execute 'assign' on 'HTMLSlotElement': parameter is not of type '(Element or Text)'.`);t.push(e)}assignManually(this[M],t)}};str(HTMLSlotElement,`name`);const ud={createSheet:null,removeSheet:null,createLinkSheet:null},dd=Symbol(`sheet`);function getSheet(e){return e[dd]??null}function setSheet(e,t){Object.defineProperty(e,dd,{value:t,writable:!0,configurable:!0})}function childTextContent(e){let t=``;for(let n=e.first;n!==null;n=n.next)(n.type===3||n.type===4)&&(t+=n.data);return t}function removeAssociatedSheet(e){let t=getSheet(e);t!==null&&(setSheet(e,null),ud.removeSheet?.(e[M],t))}function updateStyleBlock(e){let t=e[M];if(removeAssociatedSheet(e),!(t.flags&1))return;let n=contentAttr(t,`type`);if(n!==null&&n!==``&&n.toLowerCase()!==`text/css`)return;let r=ud.createSheet;r===null?t.doc[Mr]++:setSheet(e,r(t,childTextContent(t),contentAttr(t,`media`)??``))}var HTMLStyleElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=28}_connectedSteps(){super._connectedSteps(),updateStyleBlock(this)}_disconnectedSteps(){super._disconnectedSteps(),updateStyleBlock(this)}_childrenChangedSteps(){updateStyleBlock(this)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`type`||e===`media`)&&updateStyleBlock(this)}get sheet(){return getSheet(this)}get disabled(){let e=getSheet(this);return e!==null&&e.disabled===!0}set disabled(e){let t=getSheet(this);t!==null&&(t.disabled=!!e)}};str(HTMLStyleElement,`media type`),tokenList(HTMLStyleElement,`blocking`,`blocking`,[`render`]);function isStylesheetLink(e){let t=contentAttr(e,`rel`);return t!==null&&/(?:^|[\t\n\f\r ])stylesheet(?:$|[\t\n\f\r ])/i.test(t)&&!/(?:^|[\t\n\f\r ])alternate(?:$|[\t\n\f\r ])/i.test(t)}function updateLinkSheet(e){let t=e[M];if(removeAssociatedSheet(e),!(t.flags&1)||!isStylesheetLink(t)||contentAttr(t,`disabled`)!==null)return;let n=ud.createLinkSheet;if(n===null)return;let r=contentAttr(t,`href`);if(r===null||r===``)return;let i=n(t,e.href,contentAttr(t,`media`)??``);i!==null&&setSheet(e,i)}var HTMLLinkElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}_connectedSteps(){super._connectedSteps(),updateLinkSheet(this)}_disconnectedSteps(){super._disconnectedSteps(),removeAssociatedSheet(this)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`rel`||e===`href`||e===`media`||e===`disabled`||e===`type`)&&updateLinkSheet(this)}get sheet(){return getSheet(this)}};url(HTMLLinkElement,`href`),enumerated(HTMLLinkElement,`crossOrigin=crossorigin`,hs),str(HTMLLinkElement,`rel media integrity hreflang type imageSrcset=imagesrcset imageSizes=imagesizes charset rev target`),enumerated(HTMLLinkElement,`as`,{keywords:[`fetch`,`audio`,`audioworklet`,`document`,`embed`,`font`,`frame`,`iframe`,`image`,`json`,`manifest`,`object`,`paintworklet`,`report`,`script`,`serviceworker`,`sharedworker`,`style`,`track`,`video`,`webidentity`,`worker`,`xslt`]}),tokenList(HTMLLinkElement,`relList`,`rel`,[`alternate`,`dns-prefetch`,`expect`,`icon`,`manifest`,`modulepreload`,`next`,`pingback`,`preconnect`,`prefetch`,`preload`,`search`,`stylesheet`]),tokenList(HTMLLinkElement,`sizes`,`sizes`),tokenList(HTMLLinkElement,`blocking`,`blocking`,[`render`]),enumerated(HTMLLinkElement,`referrerPolicy=referrerpolicy`,gs),enumerated(HTMLLinkElement,`fetchPriority=fetchpriority`,vs),bool(HTMLLinkElement,`disabled`);const fd=Symbol(`nonBlocking`);var HTMLScriptElement=class extends HTMLElement{static supports(e){let t=String(e);return t===`classic`||t===`module`||t===`importmap`||t===`speculationrules`}get text(){return childTextContent(this[M])}set text(e){this.textContent=String(e)}get async(){return(this[fd]??!0)||contentAttr(this[M],`async`)!==null}set async(e){Object.defineProperty(this,fd,{value:!1,writable:!0,configurable:!0}),e?this.setAttribute(`async`,``):this.removeAttribute(`async`)}};url(HTMLScriptElement,`src`),str(HTMLScriptElement,`type charset event htmlFor=for integrity`),bool(HTMLScriptElement,`noModule=nomodule defer`),enumerated(HTMLScriptElement,`crossOrigin=crossorigin`,hs),enumerated(HTMLScriptElement,`referrerPolicy=referrerpolicy`,gs),enumerated(HTMLScriptElement,`fetchPriority=fetchpriority`,vs),tokenList(HTMLScriptElement,`blocking`,`blocking`,[`render`]);var HTMLTitleElement=class extends HTMLElement{get text(){return childTextContent(this[M])}set text(e){this.textContent=String(e)}};function stripAndCollapse(e){return e.replace(/[\t\n\f\r ]+/g,` `).replace(/^ | $/g,``)}function titleElement(e){let t=e[M];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.tag===X.title&&e.ns===`http://www.w3.org/1999/xhtml`)return e;return null}function svgTitle(e){for(let t=e.first;t!==null;t=t.next)if(t.type===1&&t.ns===`http://www.w3.org/2000/svg`&&t.name===`title`)return t;return null}function getDocumentTitle(e){let t=firstElementChild(e[M]),n;if(t!==null&&t.ns===`http://www.w3.org/2000/svg`&&t.name===`svg`){let e=svgTitle(t);n=e===null?``:childTextContent(e)}else{let t=titleElement(e);n=t===null?``:childTextContent(t)}return stripAndCollapse(n)}function setDocumentTitle(e,t){let n=firstElementChild(e[M]);if(n===null)return;if(n.ns===`http://www.w3.org/2000/svg`&&n.name===`svg`){let r=svgTitle(n);r===null&&(r=e.createElementNS(ae,`title`)[M],n.node.insertBefore(r.node,n.first===null?null:n.first.node)),r.node.textContent=t;return}if(n.ns!==`http://www.w3.org/1999/xhtml`)return;let r=titleElement(e);if(r===null){let t=e.head;if(t===null)return;r=t.appendChild(e.createElement(`title`))[M]}r.node.textContent=t}Object.hasOwn(Z.prototype,`title`)||Object.defineProperty(Z.prototype,"title",{get(){return getDocumentTitle(this)},set(e){setDocumentTitle(this,String(e))},configurable:!0,enumerable:!0}),Object.hasOwn(Z.prototype,`dir`)||Object.defineProperty(Z.prototype,"dir",{get(){let e=firstElementChild(this[M]);if(e===null||e.tag!==X.html||e.ns!==`http://www.w3.org/1999/xhtml`)return``;let t=contentAttr(e,`dir`);if(t===null)return``;let n=t.toLowerCase();return n===`ltr`||n===`rtl`||n===`auto`?n:``},set(e){let t=firstElementChild(this[M]);t!==null&&t.tag===X.html&&t.ns===`http://www.w3.org/1999/xhtml`&&t.node.setAttribute(`dir`,String(e))},configurable:!0,enumerable:!0});for(let[e,t]of[[`fgColor`,`text`],[`linkColor`,`link`],[`vlinkColor`,`vlink`],[`alinkColor`,`alink`],[`bgColor`,`bgcolor`]])Object.hasOwn(Z.prototype,e)||Object.defineProperty(Z.prototype,e,{get(){let e=this.body;return e===null||e[M].tag!==X.body?``:contentAttr(e[M],t)??``},set(e){let n=this.body;n!==null&&n[M].tag===X.body&&n.setAttribute(t,e===null?``:String(e))},configurable:!0,enumerable:!0});var SVGAnimatedString=class{[O];[Be];constructor(e,t){this[O]=e,this[Be]=t}get baseVal(){let e=this[O][M];return this[Be]===`href`?contentAttr(e,`href`)??xlinkHref(e)??``:contentAttr(e,this[Be])??``}set baseVal(e){setAttribute(this[O][M],this[Be],String(e))}get animVal(){return this.baseVal}};function xlinkHref(e){let t=e.attrs;if(t===null)return null;for(let e=0;e<t.length;e++)if(t[e].localName===`href`&&t[e].ns===`http://www.w3.org/1999/xlink`)return t[e].value;return null}const pd=Symbol(`className`),md=Symbol(`href`);var SVGElement=class extends Fo{get style(){return this[jr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get className(){let e=this[pd];return e===void 0&&(e=new SVGAnimatedString(this,`class`),Object.defineProperty(this,pd,{value:e})),e}set className(e){}get ownerSVGElement(){for(let e=this[M].parent;e!==null&&e.type===1;e=e.parent)if(e.ns===`http://www.w3.org/2000/svg`&&e.name===`svg`)return e.node;return null}get viewportElement(){return this.ownerSVGElement}};installHTMLOrSVGElement(SVGElement);function installURIReference(e){Object.defineProperty(e.prototype,"href",{get(){let e=this[md];return e===void 0&&(e=new SVGAnimatedString(this,`href`),Object.defineProperty(this,md,{value:e})),e},configurable:!0,enumerable:!0})}function zeroRect(){return{x:0,y:0,width:0,height:0}}function identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}var SVGGraphicsElement=class extends SVGElement{getBBox(){return zeroRect()}getCTM(){return identityMatrix()}getScreenCTM(){return identityMatrix()}},SVGGeometryElement=class extends SVGGraphicsElement{isPointInFill(){return!1}isPointInStroke(){return!1}getTotalLength(){return 0}getPointAtLength(){return{x:0,y:0}}},SVGSVGElement=class extends SVGGraphicsElement{createSVGNumber(){return{value:0}}createSVGLength(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGAngle(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGPoint(){return{x:0,y:0}}createSVGMatrix(){return identityMatrix()}createSVGRect(){return zeroRect()}createSVGTransform(){return{type:0,matrix:identityMatrix(),angle:0}}getIntersectionList(){return[]}getEnclosureList(){return[]}checkIntersection(){return!1}checkEnclosure(){return!1}deselectAll(){}suspendRedraw(){return 0}unsuspendRedraw(){}unsuspendRedrawAll(){}forceRedraw(){}pauseAnimations(){}unpauseAnimations(){}animationsPaused(){return!1}getCurrentTime(){return 0}setCurrentTime(){}getElementById(e){let t=this[M];for(let n=t.first;n!==null;n=nextEl(n,t))if(n.type===1&&n.id===String(e))return n.node;return null}};function nextEl(e,t){if(e.first!==null)return e.first;for(let n=e;n!==null&&n!==t;n=n.parent)if(n.next!==null)return n.next;return null}var SVGGElement=class extends SVGGraphicsElement{},SVGDefsElement=class extends SVGGraphicsElement{},SVGDescElement=class extends SVGElement{},SVGMetadataElement=class extends SVGElement{},SVGTitleElement=class extends SVGElement{},SVGSymbolElement=class extends SVGGraphicsElement{},SVGUseElement=class extends SVGGraphicsElement{};installURIReference(SVGUseElement);var SVGSwitchElement=class extends SVGGraphicsElement{},SVGImageElement=class extends SVGGraphicsElement{};installURIReference(SVGImageElement);var SVGForeignObjectElement=class extends SVGGraphicsElement{},SVGAElement=class extends SVGGraphicsElement{};installURIReference(SVGAElement);var SVGPathElement=class extends SVGGeometryElement{},SVGRectElement=class extends SVGGeometryElement{},SVGCircleElement=class extends SVGGeometryElement{},SVGEllipseElement=class extends SVGGeometryElement{},SVGLineElement=class extends SVGGeometryElement{},SVGPolylineElement=class extends SVGGeometryElement{},SVGPolygonElement=class extends SVGGeometryElement{},SVGTextContentElement=class extends SVGGraphicsElement{getNumberOfChars(){return(this.textContent??``).length}getComputedTextLength(){return 0}getSubStringLength(){return 0}},SVGTextPositioningElement=class extends SVGTextContentElement{},SVGTextElement=class extends SVGTextPositioningElement{},SVGTSpanElement=class extends SVGTextPositioningElement{},SVGTextPathElement=class extends SVGTextContentElement{};installURIReference(SVGTextPathElement);var SVGMarkerElement=class extends SVGElement{},SVGClipPathElement=class extends SVGElement{},SVGMaskElement=class extends SVGElement{},SVGPatternElement=class extends SVGElement{};installURIReference(SVGPatternElement);var SVGGradientElement=class extends SVGElement{};installURIReference(SVGGradientElement);var SVGLinearGradientElement=class extends SVGGradientElement{},SVGRadialGradientElement=class extends SVGGradientElement{},SVGStopElement=class extends SVGElement{},SVGStyleElement=class extends SVGElement{},SVGScriptElement=class extends SVGElement{};installURIReference(SVGScriptElement);var SVGViewElement=class extends SVGElement{},SVGFilterElement=class extends SVGElement{};const hd=/* @__PURE__ */ new Map([[`svg`,SVGSVGElement],[`g`,SVGGElement],[`defs`,SVGDefsElement],[`desc`,SVGDescElement],[`metadata`,SVGMetadataElement],[`title`,SVGTitleElement],[`symbol`,SVGSymbolElement],[`use`,SVGUseElement],[`switch`,SVGSwitchElement],[`image`,SVGImageElement],[`foreignObject`,SVGForeignObjectElement],[`a`,SVGAElement],[`path`,SVGPathElement],[`rect`,SVGRectElement],[`circle`,SVGCircleElement],[`ellipse`,SVGEllipseElement],[`line`,SVGLineElement],[`polyline`,SVGPolylineElement],[`polygon`,SVGPolygonElement],[`text`,SVGTextElement],[`tspan`,SVGTSpanElement],[`textPath`,SVGTextPathElement],[`marker`,SVGMarkerElement],[`clipPath`,SVGClipPathElement],[`mask`,SVGMaskElement],[`pattern`,SVGPatternElement],[`linearGradient`,SVGLinearGradientElement],[`radialGradient`,SVGRadialGradientElement],[`stop`,SVGStopElement],[`style`,SVGStyleElement],[`script`,SVGScriptElement],[`view`,SVGViewElement],[`filter`,SVGFilterElement]]);var MathMLElement=class extends Fo{get style(){return this[jr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}};installHTMLOrSVGElement(MathMLElement);const gd=/* @__PURE__ */ new Map([[`off`,0],[`on`,1],[`webauthn`,4]]);for(let e of/* @__PURE__ */ `name.honorific-prefix.given-name.additional-name.family-name.honorific-suffix.nickname.organization-title.username.new-password.current-password.one-time-code.organization.street-address.address-line1.address-line2.address-line3.address-level4.address-level3.address-level2.address-level1.country.country-name.postal-code.cc-name.cc-given-name.cc-additional-name.cc-family-name.cc-number.cc-exp.cc-exp-month.cc-exp-year.cc-csc.cc-type.transaction-currency.transaction-amount.language.bday.bday-day.bday-month.bday-year.sex.url.photo`.split(`.`))gd.set(e,2);for(let e of[`tel`,`tel-country-code`,`tel-national`,`tel-area-code`,`tel-local`,`tel-local-prefix`,`tel-local-suffix`,`tel-extension`,`email`,`impp`])gd.set(e,3);const _d=[1,1,3,4,5];function idlExposedAutofillValue(e){let t=attr(e,`autocomplete`);if(t===null)return``;let n=splitOnAsciiWhitespace(t);if(n.length===0)return``;let r=n.length-1,i=asciiLowercase$1(n[r]),a=gd.get(i);if(a===void 0||n.length>_d[a])return``;if(a===0||a===1)return e.tag===X.input&&inputType(e)===0?``:i;let o=i;if(a===4){if(r===0)return o;r--;let e=asciiLowercase$1(n[r]);if(a=gd.get(e),a!==2&&a!==3||r>_d[a]-1)return``;o=e+` `+o}if(r===0)return o;r--;let s=asciiLowercase$1(n[r]);if(a===3&&(s===`home`||s===`work`||s===`mobile`||s===`fax`||s===`pager`)){if(o=s+` `+o,r===0)return o;r--,s=asciiLowercase$1(n[r])}if(s===`shipping`||s===`billing`){if(o=s+` `+o,r===0)return o;r--,s=asciiLowercase$1(n[r])}return r!==0||!s.startsWith(`section-`)?``:s+` `+o}function installAutocomplete(e){Object.defineProperty(e.prototype,"autocomplete",{get(){return idlExposedAutofillValue(this[M])},set(e){setAttribute(this[M],`autocomplete`,String(e))},enumerable:!0,configurable:!0})}const vd=/^-?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?$/;function parseFloatStrict(e){if(!vd.test(e))return NaN;let t=Number(e);return Number.isFinite(t)?t:NaN}function parseFloatLenient(e){let t=/^[\t\n\f\r ]*([-+]?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][-+]?\d+)?)/.exec(e);if(t===null)return NaN;let n=Number(t[1]);return Number.isFinite(n)?n===0?0:n:NaN}function serializeFloat(e){return String(e===0?0:e)}function isLeapYear(e){return e%400==0||e%4==0&&e%100!=0}const yd=[31,28,31,30,31,30,31,31,30,31,30,31];function daysInMonth(e,t){return e===2&&isLeapYear(t)?29:yd[e-1]}function utcMs(e,t=1,n=1,r=0,i=0,a=0,o=0){if(e>99||e<0)return Date.UTC(e,t-1,n,r,i,a,o);let s=/* @__PURE__ */ new Date(0);return s.setUTCFullYear(e,t-1,n),s.setUTCHours(r,i,a,o),s.getTime()}const bd=/^(\d{4,})-(\d{2})$/,xd=/^(\d{4,})-(\d{2})-(\d{2})$/,Sd=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/,Cd=/^(\d{4,})-W(\d{2})$/;function isValidDateString(e){let t=xd.exec(e);if(t===null)return!1;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return n>0&&r>=1&&r<=12&&i>=1&&i<=daysInMonth(r,n)}function isValidMonthString(e){let t=bd.exec(e);if(t===null)return!1;let n=Number(t[2]);return Number(t[1])>0&&n>=1&&n<=12}function isValidWeekString(e){let t=Cd.exec(e);if(t===null)return!1;let n=Number(t[1]),r=Number(t[2]);return n>0&&r>=1&&r<=lastWeekNumber(n)}function normalizeLocalDateTime(e){let t=e.indexOf(`T`);if(t===-1&&(t=e.indexOf(` `)),t===-1)return``;let n=e.slice(0,t);if(!isValidDateString(n))return``;let r=parseTime(e.slice(t+1));return Number.isNaN(r)?``:n+`T`+serializeTime(r)}function parseMonth(e){let t=bd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]);return n<=0||r<1||r>12?NaN:(n-1970)*12+(r-1)}function parseDate(e){let t=xd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return n<=0||r<1||r>12||i<1||i>daysInMonth(r,n)?NaN:utcMs(n,r,i)}function parseTime(e){let t=Sd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]),i=t[3]===void 0?0:Number(t[3]),a=t[4]===void 0?0:Number(t[4].padEnd(3,`0`));return n>23||r>59||i>59?NaN:((n*60+r)*60+i)*1e3+a}function parseLocalDateTime(e){let t=e.indexOf(`T`);if(t===-1&&(t=e.indexOf(` `)),t===-1)return NaN;let n=parseDate(e.slice(0,t));if(Number.isNaN(n))return NaN;let r=parseTime(e.slice(t+1));return Number.isNaN(r)?NaN:n+r}function lastWeekNumber(e){let t=new Date(utcMs(e)).getUTCDay();return t===4||isLeapYear(e)&&t===3?53:52}function parseWeek(e){let t=Cd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]);if(n<=0||r<1||r>lastWeekNumber(n))return NaN;let i=utcMs(n),a=(new Date(i).getUTCDay()+6)%7;return(a<=3?i-a*864e5:i+(7-a)*864e5)+(r-1)*7*864e5}function pad(e,t){return String(e).padStart(t,`0`)}function serializeDate(e){let t=new Date(e);return`${pad(t.getUTCFullYear(),4)}-${pad(t.getUTCMonth()+1,2)}-${pad(t.getUTCDate(),2)}`}function serializeMonth(e){let t=1970+Math.floor(e/12),n=(e%12+12)%12;return`${pad(t,4)}-${pad(n+1,2)}`}function serializeTime(e){let t=(e%864e5+864e5)%864e5,n=Math.floor(t/36e5),r=Math.floor(t/6e4)%60,i=Math.floor(t/1e3)%60,a=Math.round(t%1e3),o=`${pad(n,2)}:${pad(r,2)}`;return(i!==0||a!==0)&&(o+=`:`+pad(i,2),a!==0&&(o+=`.`+pad(a,3).replace(/0+$/,``))),o}function serializeLocalDateTime(e){let t=Math.floor(e/864e5)*864e5;return serializeDate(t)+`T`+serializeTime(e-t)}function serializeWeek(e){let t=(new Date(e).getUTCDay()+6)%7,n=new Date(e+(3-t)*864e5),r=n.getUTCFullYear(),i=utcMs(r),a=Math.floor((n.getTime()-i)/864e5/7)+1;return`${pad(r,4)}-W${pad(a,2)}`}function isValidSimpleColor(e){return/^#[0-9a-fA-F]{6}$/.test(e)}const wd=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function isValidEmail(e){return wd.test(e)}function isValidAbsoluteURL(e){return URL.canParse(e)}const Td=Symbol(`FileList`);var FileList=class{constructor(e,t){if(e!==Td)throw TypeError(`Illegal constructor`);let n=t??[];for(let e=0;e<n.length;e++)Object.defineProperty(this,e,{value:n[e],enumerable:!0,configurable:!1,writable:!1});Object.defineProperty(this,"length",{value:n.length,enumerable:!1,configurable:!1,writable:!1})}item(e){let t=Number(e)>>>0;return t<this.length?this[t]:null}*[Symbol.iterator](){for(let e=0;e<this.length;e++)yield this[e]}get[Symbol.toStringTag](){return`FileList`}};function createFileList(e){return new FileList(Td,e)}function toFileList(e){if(e instanceof FileList)return e;if(typeof e==`object`&&e&&typeof e.length==`number`){let t=e,n=[];for(let e=0;e<t.length;e++)n.push(t[e]);return createFileList(n)}throw TypeError(`Failed to set the 'files' property on 'HTMLInputElement': The provided value is not of type 'FileList'.`)}function sanitizeValue(e,t,n){switch(e){case 1:case 2:case 3:case 6:return stripNewlines(t);case 4:return trimASCII(stripNewlines(t));case 5:{if(attr(n,`multiple`)===null||t.indexOf(`,`)===-1)return trimASCII(stripNewlines(t));let e=t.split(`,`);for(let t=0;t<e.length;t++)e[t]=trimASCII(stripNewlines(e[t]));return e.join(`,`)}case 12:return Number.isNaN(parseFloatStrict(t))?``:t;case 13:return sanitizeRange(t,n);case 7:return isValidDateString(t)?t:``;case 8:return isValidMonthString(t)?t:``;case 9:return isValidWeekString(t)?t:``;case 10:return Number.isNaN(parseTime(t))?``:t;case 11:return normalizeLocalDateTime(t);case 14:return isValidSimpleColor(t)?t.toLowerCase():`#000000`}return t}function sanitizeRange(e,t){let n=rangeMin(t),r=rangeMax(t);r<n&&(r=n);let i=parseFloatStrict(e),a=Number.isNaN(i)?n+(r-n)/2:i;a<n&&(a=n),a>r&&(a=r);let o=allowedStep(13,t);if(!Number.isNaN(o)){let e=stepBase(13,t),n=(a-e)/o,i=Math.round(n);if(!isIntegral(n)){let t=roundForStep(e+i*o,o,e);t>r&&(t=roundForStep(e+Math.floor((r-e)/o)*o,o,e)),a=t}}return a===i?e:serializeFloat(a)}function rangeMin(e){let t=attr(e,`min`),n=t===null?NaN:parseFloatLenient(t);return Number.isNaN(n)?0:n}function rangeMax(e){let t=attr(e,`max`),n=t===null?NaN:parseFloatLenient(t);return Number.isNaN(n)?100:n}function stringToNumber(e,t){switch(e){case 12:case 13:return parseFloatStrict(t);case 7:return parseDate(t);case 8:return parseMonth(t);case 9:return parseWeek(t);case 10:return parseTime(t);case 11:return parseLocalDateTime(t)}return NaN}function numberToString(e,t){switch(e){case 12:case 13:return serializeFloat(t);case 7:return serializeDate(t);case 8:return serializeMonth(t);case 9:return serializeWeek(t);case 10:return serializeTime(t);case 11:return serializeLocalDateTime(t)}return``}function attrToNumber(e,t){return t===null?NaN:e===12||e===13?parseFloatLenient(t):stringToNumber(e,t)}function defaultStep(e){return e===10||e===11?60:1}function stepScale(e){switch(e){case 7:return 864e5;case 9:return 6048e5;case 10:case 11:return 1e3}return 1}function allowedStep(e,t){let n=attr(t,`step`);if(n!==null){if(n.toLowerCase()===`any`)return NaN;let t=parseFloatLenient(n);if(!Number.isNaN(t)&&t>0)return(e===7||e===8||e===9)&&(t=Math.max(1,Math.round(t))),t*stepScale(e)}return defaultStep(e)*stepScale(e)}function stepBase(e,t){let n=attrToNumber(e,attr(t,`min`));return!Number.isNaN(n)||(n=attrToNumber(e,attr(t,`value`)),!Number.isNaN(n))?n:e===9?-2592e5:0}function minimum(e,t){return e===13?rangeMin(t):attrToNumber(e,attr(t,`min`))}function maximum(e,t){if(e===13){let e=rangeMin(t),n=rangeMax(t);return n<e?e:n}return attrToNumber(e,attr(t,`max`))}function isStepAligned(e,t,n){let r=(e-t)/n;if(Math.abs(r)<1e6)return isIntegral(r);let i=toDecimal(e),a=toDecimal(t),o=toDecimal(n);if(i===null||a===null||o===null)return isIntegral(r);let s=Math.min(i.exp,a.exp,o.exp),scale=e=>e.digits*10n**BigInt(e.exp-s),c=scale(o);return c===0n||(scale(i)-scale(a))%c===0n}function toDecimal(e){if(!Number.isFinite(e))return null;let t=/^(-?)(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(e));if(t===null)return null;let n=t[3]??``,r=(t[4]===void 0?0:Number(t[4]))-n.length;if(r<-400||r>400)return null;let i=BigInt(t[2]+n);return{digits:t[1]===`-`?-i:i,exp:r}}function isIntegral(e){return Math.abs(e-Math.round(e))<1e-9*Math.max(1,Math.abs(e))}function decimals(e){let t=String(e),n=t.indexOf(`e-`);if(n!==-1)return Number(t.slice(n+2))+(t.indexOf(`.`)===-1?0:n-t.indexOf(`.`)-1);let r=t.indexOf(`.`);return r===-1?0:t.length-r-1}function roundForStep(e,t,n){let r=Math.min(15,Math.max(decimals(t),decimals(n))),i=Number(e.toFixed(r));return i===0?0:i}var HTMLInputElement=class extends HTMLElement{[Xr];[E];[Qe];[$e];[jt];[pn];[Ht];[vr];[gr];[hr];[T];[Yr];[F];[qr];[Ue];[Hr];[Wn];[Kn];[Gn];[Un];[Jr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12,this[Xr]=``,this[E]=!1,this[Qe]=!1,this[$e]=!1,this[jt]=!1,this[pn]=!1,this[Ht]=null,this[vr]=0,this[gr]=0,this[hr]=`none`,this[T]=``,this[Yr]=null,this[F]=null,this[qr]=!1,this[Ue]=!1,this[Hr]=null,this[Wn]=!1,this[Kn]=!1,this[Gn]=null,this[Un]=!1,this[Jr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}get type(){return bs[inputType(this[M])]}set type(e){setAttribute(this[M],`type`,String(e))}_currentValue(e){return this[E]?this[Xr]:sanitizeValue(e,attr(this[M],`value`)??``,this[M])}get value(){let e=this[M],t=inputType(e);switch(valueMode(t)){case 0:return this._currentValue(t);case 1:return attr(e,`value`)??``;case 2:return attr(e,`value`)??`on`}let n=this[Ht];return n===null||n.length===0?``:`C:\\fakepath\\`+n.item(0).name}set value(e){let t=e===null?``:String(e),n=this[M],r=inputType(n);switch(valueMode(r)){case 0:this._setValueFromAPI(r,t);return;case 1:case 2:setAttribute(n,`value`,t);return}if(t!==``)throw new DOMException(`Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.`,`InvalidStateError`);this[Ht]=null}_setValueFromAPI(e,t){let n=this._currentValue(e);if(this[M].doc[q]++,this[Xr]=sanitizeValue(e,t,this[M]),this[E]=!0,this[qr]=!1,this[Ue]=!1,this[Hr]=null,this[Xr]!==n){let e=this[Xr].length;this[vr]=e,this[gr]=e,this[hr]=`none`}}_checkedness(){return this[$e]?this[Qe]:attr(this[M],`checked`)!==null}_setCheckedness(e,t){this[M].doc[q]++,this[Qe]=e,this[$e]=!0,t&&(this[jt]=!0),e&&inputType(this[M])===16&&uncheckOtherRadios(this[M])}get checked(){return this._checkedness()}set checked(e){this._setCheckedness(!!e,!0)}get indeterminate(){return this[pn]}set indeterminate(e){this[M].doc[q]++,this[pn]=!!e}get files(){return inputType(this[M])===17?this[Ht]??=createFileList([]):null}set files(e){inputType(this[M])===17&&e!=null&&(this[Ht]=toFileList(e))}get valueAsNumber(){let e=inputType(this[M]);return isNumericType(e)?stringToNumber(e,this._currentValue(e)):NaN}set valueAsNumber(e){let t=Number(e);if(!Number.isFinite(t)&&!Number.isNaN(t))throw TypeError(`Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is infinite.`);let n=inputType(this[M]);if(!isNumericType(n))throw new DOMException(`Failed to set the 'valueAsNumber' property on 'HTMLInputElement': This input element does not support Number values.`,`InvalidStateError`);this._setValueFromAPI(n,Number.isNaN(t)?``:numberToString(n,t))}get valueAsDate(){let e=inputType(this[M]);if(e!==7&&e!==8&&e!==9&&e!==10)return null;let t=stringToNumber(e,this._currentValue(e));return Number.isNaN(t)?null:e===8?new Date(utcMs(1970+Math.floor(t/12),(t%12+12)%12+1)):new Date(t)}set valueAsDate(e){let t=inputType(this[M]);if(t!==7&&t!==8&&t!==9&&t!==10)throw new DOMException(`Failed to set the 'valueAsDate' property on 'HTMLInputElement': This input element does not support Date values.`,`InvalidStateError`);if(e===null){this._setValueFromAPI(t,``);return}let n;try{n=Date.prototype.getTime.call(e)}catch{throw TypeError(`Failed to set the 'valueAsDate' property on 'HTMLInputElement': The provided value is not a Date.`)}if(Number.isNaN(n)){this._setValueFromAPI(t,``);return}let r=n;if(t===8){let e=new Date(n);r=(e.getUTCFullYear()-1970)*12+e.getUTCMonth()}this._setValueFromAPI(t,numberToString(t,r))}stepUp(e=1){this._stepUpOrDown(Number(e)|0,!0)}stepDown(e=1){this._stepUpOrDown(Number(e)|0,!1)}_stepUpOrDown(e,t){let n=this[M],r=inputType(n),i=t?`stepUp`:`stepDown`;if(!isNumericType(r))throw new DOMException(`Failed to execute '${i}' on 'HTMLInputElement': This form element is not steppable.`,`InvalidStateError`);let a=allowedStep(r,n);if(Number.isNaN(a))throw new DOMException(`Failed to execute '${i}' on 'HTMLInputElement': This form element does not have an allowed value step.`,`InvalidStateError`);let o=minimum(r,n),s=maximum(r,n);if(!Number.isNaN(o)&&!Number.isNaN(s)&&o>s)return;let c=stepBase(r,n);if(!Number.isNaN(o)&&!Number.isNaN(s)&&c+Math.ceil((o-c)/a-1e-9)*a>s+1e-9)return;let l=stringToNumber(r,this._currentValue(r)),u=!Number.isNaN(l);u||(l=0);let d=l,m=(l-c)/a;isIntegral(m)?l+=(t?e:-e)*a:l=c+(t?Math.ceil(m):Math.floor(m))*a,l=roundForStep(l,a,c),!Number.isNaN(o)&&l<o?l=roundForStep(c+Math.ceil((o-c)/a-1e-9)*a,a,c):!Number.isNaN(s)&&l>s&&(l=roundForStep(c+Math.floor((s-c)/a+1e-9)*a,a,c)),!(u&&(t&&l<d||!t&&l>d))&&this._setValueFromAPI(r,numberToString(r,l))}_selectionLength(){return this.value.length}_assertSelectable(e){if(!supportsSelectionType(inputType(this[M])))throw new DOMException(`Failed to ${e.endsWith(`)`)?`execute`:`set`} '${e.replace(`()`,``)}' on 'HTMLInputElement': The input element's type ('${this.type}') does not support selection.`,`InvalidStateError`)}get selectionStart(){return supportsSelectionType(inputType(this[M]))?Math.min(this[vr],this._selectionLength()):null}set selectionStart(e){this._assertSelectable(`selectionStart`);let t=toUnsignedLong(e),n=Math.max(t,this.selectionEnd);setSelection(this,t,n,this[hr])}get selectionEnd(){return supportsSelectionType(inputType(this[M]))?Math.min(this[gr],this._selectionLength()):null}set selectionEnd(e){this._assertSelectable(`selectionEnd`),setSelection(this,this.selectionStart,toUnsignedLong(e),this[hr])}get selectionDirection(){return supportsSelectionType(inputType(this[M]))?this[hr]:null}set selectionDirection(e){this._assertSelectable(`selectionDirection`),setSelection(this,this.selectionStart,this.selectionEnd,String(e))}setSelectionRange(e,t,n){this._assertSelectable(`setSelectionRange()`),setSelection(this,toUnsignedLong(e),toUnsignedLong(t),n===void 0?`none`:String(n))}select(){selectApplies(inputType(this[M]))&&setSelection(this,0,this._selectionLength(),`none`)}setRangeText(e,t,n,r){if(arguments.length===0)throw TypeError(`Failed to execute 'setRangeText' on 'HTMLInputElement': 1 argument required, but only 0 present.`);this._assertSelectable(`setRangeText()`);let i=rangeText(this.value,this[vr],this[gr],String(e),t,n,r,arguments.length),a=inputType(this[M]);this[M].doc[q]++,this[Xr]=sanitizeValue(a,i.value,this[M]),this[E]=!0,this[Hr]=null,setSelection(this,i.start,i.end,`none`)}get height(){return dimensionAttr(this[M],`height`)}set height(e){let t=toUnsignedLong(e);setAttribute(this[M],`height`,String(t<=2147483647?t:0))}get width(){return dimensionAttr(this[M],`width`)}set width(e){let t=toUnsignedLong(e);setAttribute(this[M],`width`,String(t<=2147483647?t:0))}get formAction(){return reflectActionURL(this[M],`formaction`)}set formAction(e){setAttribute(this[M],`formaction`,String(e))}get list(){let e=this[M];if(!listApplies(inputType(e)))return null;let t=attr(e,`list`);if(t===null)return null;let n=elementByIdInTree(e,t);return n!==null&&n.tag===X.datalist?n.node:null}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return inputType(this[M])===0?null:this[F]??=new LabelsNodeList(this[M])}showPicker(){if(!this._isMutable())throw new DOMException(`Failed to execute 'showPicker' on 'HTMLInputElement': HTMLInputElement::showPicker() cannot be used on immutable controls.`,`InvalidStateError`)}_isMutable(){let e=this[M];return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&attr(e,`readonly`)!==null)}_barredFromValidation(){let e=this[M],t=inputType(e);return t===0||t===20||t===21||readonlyApplies(t)&&attr(e,`readonly`)!==null?!0:isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[M],t=inputType(e),n=this[T]===``?0:512,r=valueMode(t);if(requiredApplies(t)&&attr(e,`required`)!==null?t===15?this._checkedness()||(n|=1):t===16?radioGroupMissing(e)&&(n|=1):t===17?(this[Ht]===null||this[Ht].length===0)&&(n|=1):r===0&&this._isMutable()&&this._currentValue(t)===``&&(n|=1):t===16&&radioGroupMissing(e)&&(n|=1),r!==0)return n;let i=this._currentValue(t);if(this[Ue]&&(n|=256),i===``)return n;if(t===5){if(attr(e,`multiple`)!==null){let e=i.split(`,`);for(let t=0;t<e.length;t++)if(!isValidEmail(e[t])){n|=2;break}}else isValidEmail(i)||(n|=2)}else t===4&&!isValidAbsoluteURL(i)&&(n|=2);if(lengthApplies(t)){let r=attr(e,`pattern`);if(r!==null){let a=compilePattern(r);if(a!==null){if(t===5&&attr(e,`multiple`)!==null){let e=i.split(`,`);for(let t=0;t<e.length;t++)if(!a.test(e[t])){n|=4;break}}else a.test(i)||(n|=4)}}if(this[qr]){let t=readNonNegativeLong(e,`maxlength`,-1);t!==-1&&i.length>t&&(n|=8);let r=readNonNegativeLong(e,`minlength`,-1);r!==-1&&i.length<r&&(n|=16)}}if(isNumericType(t)){let r=stringToNumber(t,i);if(!Number.isNaN(r)){let i=minimum(t,e),a=maximum(t,e);t===10&&!Number.isNaN(i)&&!Number.isNaN(a)&&i>a?r<i&&r>a&&(n|=96):(!Number.isNaN(i)&&r<i&&(n|=32),!Number.isNaN(a)&&r>a&&(n|=64));let o=allowedStep(t,e);!Number.isNaN(o)&&!isStepAligned(r,stepBase(t,e),o)&&(n|=128)}}return n}_validationMessage(e){let t=this[M],n=inputType(t);if(e&1)return n===15?`Please check this box if you want to proceed.`:n===16?`Please select one of these options.`:n===17?`Please select a file.`:Os;if(e&256)return n===12?`Please enter a number.`:ks;let r=this._currentValue(n);if(e&2)return n===5?msgEmail(r):`Please enter a URL.`;if(e&4)return`Please match the requested format.`;if(e&8)return msgTooLong(this.maxLength,r.length);if(e&16)return msgTooShort(this.minLength,r.length);let i=n!==12&&n!==13;if(e&32)return msgUnderflow(numberToString(n,minimum(n,t)),i);if(e&64)return msgOverflow(numberToString(n,maximum(n,t)),i);if(e&128){let e=stringToNumber(n,r),i=allowedStep(n,t),a=stepBase(n,t),o=roundForStep(a+Math.floor((e-a)/i)*i,i,a),s=roundForStep(o+i,i,a),c=minimum(n,t),l=maximum(n,t);return msgStep(!Number.isNaN(c)&&o<c?null:numberToString(n,o),!Number.isNaN(l)&&s>l?null:numberToString(n,s))}return this[T]}_reset(){this[Jr]=!1,this[E]=!1,this[jt]=!1,this[qr]=!1,this[Ue]=!1,this[Hr]=null,this[Xr]=``,this[Ht]=null,this._setCheckedness(attr(this[M],`checked`)!==null,!1)}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r===null)switch(e){case`type`:{let e=inputTypeFromAttr(t),r=inputTypeFromAttr(n);e!==r&&this._typeChange(e,r);break}case`checked`:this[jt]||this._setCheckedness(n!==null,!1);break;case`name`:case`form`:inputType(this[M])===16&&this._checkedness()&&uncheckOtherRadios(this[M]);break;case`multiple`:this[E]&&inputType(this[M])===5&&(this[Xr]=sanitizeValue(5,this[Xr],this[M]))}}_typeChange(e,t){let n=this[M],r=valueMode(e),i=valueMode(t);if(r===0&&(i===1||i===2)){let t=this[E]?this[Xr]:sanitizeValue(e,attr(n,`value`)??``,n);this[E]=!1,t!==``&&setAttribute(n,`value`,t)}else(r!==0&&i===0||r!==3&&i===3)&&(this[E]=!1,this[Xr]=``);r===3&&i!==3&&(this[Ht]=null),t===16&&this._checkedness()&&uncheckOtherRadios(n),i===0&&this[E]&&(this[Xr]=sanitizeValue(t,this[Xr],n)),this[Hr]=null,this[Ue]=!1,!supportsSelectionType(e)&&supportsSelectionType(t)&&(this[vr]=0,this[gr]=0,this[hr]=`none`)}_connectedSteps(){super._connectedSteps(),inputType(this[M])===16&&this._checkedness()&&uncheckOtherRadios(this[M])}_cloningSteps(e){let t=e;t[Xr]=this[Xr],t[E]=this[E],t[Qe]=this._checkedness(),t[$e]=!0,t[jt]=this[jt],t[pn]=this[pn]}get _hasActivationBehavior(){switch(inputType(this[M])){case 15:case 16:case 18:case 19:case 20:case 21:case 17:case 14:return!0}return!1}_legacyPreActivationBehavior(){let e=this[M],t=inputType(e);this[Un]=!1,t===15?(this[Un]=!0,this[Wn]=this._checkedness(),this[Kn]=this[pn],this._setCheckedness(!this[Wn],!0),this[pn]=!1):t===16&&(this[Un]=!0,this[Wn]=this._checkedness(),this[Gn]=checkedRadioInGroup(e),this._setCheckedness(!0,!0))}_legacyCanceledActivationBehavior(){if(!this[Un])return;this[Un]=!1;let e=this[M],t=inputType(e);if(e.doc[q]++,t===15)this[Qe]=this[Wn],this[$e]=!0,this[pn]=this[Kn];else if(t===16){let t=this[Gn];this[Gn]=null,t!==null&&t!==e&&inSameRadioGroup(e,t)?t.node._setCheckedness(!0,!1):t!==e&&(this[Qe]=!1,this[$e]=!0)}}_activationBehavior(e){let t=this[M],n=inputType(t);if(n===15||n===16){if(!(t.flags&1)||n===16&&this[Wn])return;fireEvent$1(this,`input`,!0,!1,!0),fireEvent$1(this,`change`,!0,!1)}else if(this._isMutable()){if(n===18||n===19){if(n===19){let n=e;n!==null&&typeof n.offsetX==`number`&&typeof n.offsetY==`number`?ql.set(t,{x:n.offsetX,y:n.offsetY}):ql.delete(t)}let r=formOwner(t);r!==null&&submitForm(r,t,!1)}else if(n===20){let e=formOwner(t);e!==null&&t.flags&1&&resetForm(e)}popoverTargetAttributeActivation(t,e?.target?.[M]??null)}}};installConstraintValidation(HTMLInputElement),str(HTMLInputElement,`accept alt dirName=dirname formTarget=formtarget max min name pattern placeholder step useMap=usemap align defaultValue=value`),bool(HTMLInputElement,`disabled formNoValidate=formnovalidate multiple readOnly=readonly required defaultChecked=checked`),url(HTMLInputElement,`src`),ulong(HTMLInputElement,`size`,20,!0),nonNegativeLong(HTMLInputElement,`maxLength=maxlength minLength=minlength`,-1),enumerated(HTMLInputElement,`formEnctype=formenctype`,Wl),enumerated(HTMLInputElement,`formMethod=formmethod`,Gl);function dimensionAttr(e,t){return inputType(e)===19?readNonNegativeLong(e,t,0):0}function selectApplies(e){return e>=1&&e<=12||e===14||e===17}const Ed=/* @__PURE__ */ new Map;function compilePattern(e){let t=Ed.get(e);if(t!==void 0)return t;try{new RegExp(e,`v`),t=RegExp(`^(?:`+e+`)$`,`v`)}catch{t=null}return Ed.size>256&&Ed.clear(),Ed.set(e,t),t}function setSelection(e,t,n,r){let i=e._selectionLength();n>i&&(n=i),t>n&&(t=n);let a=r===`forward`||r===`backward`?r:`none`,o=t!==Math.min(e[vr],i)||n!==Math.min(e[gr],i)||a!==e[hr];if(e[vr]=t,e[gr]=n,e[hr]=a,o){let t=e;queueElementTask(t,()=>fireEvent$1(t,`select`,!0,!1))}}function rangeText(e,t,n,r,i,a,o,s){let c=e.length;t=Math.min(t,c),n=Math.min(n,c);let l,u;if(s<2?(l=t,u=n):(l=toUnsignedLong(i),u=toUnsignedLong(a)),l>u)throw new DOMException(`Failed to execute 'setRangeText': The provided start value (${l}) is larger than the provided end value (${u}).`,`IndexSizeError`);l>c&&(l=c),u>c&&(u=c);let d=o===void 0?`preserve`:String(o);if(d!==`select`&&d!==`start`&&d!==`end`&&d!==`preserve`)throw TypeError(`Failed to execute 'setRangeText': The provided value '${d}' is not a valid enum value of type SelectionMode.`);let m=e.slice(0,l)+r+e.slice(u),h=l+r.length,_=t,v=n;switch(d){case`select`:_=l,v=h;break;case`start`:_=v=l;break;case`end`:_=v=h;break;default:{let e=r.length-(u-l);_>u?_+=e:_>l&&(_=l),v>u?v+=e:v>l&&(v=h)}}return{value:m,start:_,end:v}}function inSameRadioGroup(e,t){if(t.tag!==X.input||inputType(t)!==16)return!1;let n=attr(e,`name`);return n===null||n===``||attr(t,`name`)!==n||treeRoot(e)!==treeRoot(t)?!1:formOwner(e)===formOwner(t)}function forEachInRadioGroup(e,t){let n=attr(e,`name`);if(n===null||n===``)return;let r=formOwner(e),i=treeRoot(r??e);for(let a=i.type===1?i:nextElementInTree(i,i);a!==null;a=nextElementInTree(a,i))if(a!==e&&a.tag===X.input&&attr(a,`name`)===n&&inputType(a)===16&&formOwner(a)===r&&t(a))return}function uncheckOtherRadios(e){forEachInRadioGroup(e,e=>{let t=e.node;return t[$e]&&!t[Qe]||(e.doc[q]++,t[Qe]=!1,t[$e]=!0),!1})}function checkedRadioInGroup(e){if(e.node._checkedness())return e;let t=null;return forEachInRadioGroup(e,e=>e.node._checkedness()?(t=e,!0):!1),t}function radioGroupMissing(e){if(e.node._checkedness())return!1;let t=attr(e,`name`);if(t===null||t===``)return!1;let n=attr(e,`required`)!==null,r=!1;return forEachInRadioGroup(e,e=>e.node._checkedness()?(r=!0,!0):(attr(e,`required`)!==null&&(n=!0),!1)),n&&!r}function radioGroupHasNoChecked(e){return checkedRadioInGroup(e)===null}installAutocomplete(HTMLInputElement);var HTMLTextAreaElement=class extends HTMLElement{[$n];[E];[vr];[gr];[hr];[T];[Yr];[F];[qr];[Jr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=16,this[$n]=``,this[E]=!1,this[vr]=0,this[gr]=0,this[hr]=`none`,this[T]=``,this[Yr]=null,this[F]=null,this[qr]=!1,this[Jr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}get type(){return`textarea`}get defaultValue(){let e=``;for(let t=this[M].first;t!==null;t=t.next)(t.type===3||t.type===4)&&(e+=t.data);return e}set defaultValue(e){this.textContent=String(e)}_rawValueNow(){return this[E]?this[$n]:this.defaultValue}_apiValue(){return normalizeNewlines(this._rawValueNow())}get value(){return this._apiValue()}set value(e){let t=e===null?``:String(e),n=this._apiValue();this[M].doc[q]++,this[$n]=t,this[E]=!0,this[qr]=!1;let r=this._apiValue();r!==n&&(this[vr]=r.length,this[gr]=r.length,this[hr]=`none`)}get textLength(){return this._apiValue().length}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}_selectionLength(){return this._apiValue().length}get selectionStart(){return Math.min(this[vr],this._selectionLength())}set selectionStart(e){let t=toUnsignedLong(e);setSelection(this,t,Math.max(t,this.selectionEnd),this[hr])}get selectionEnd(){return Math.min(this[gr],this._selectionLength())}set selectionEnd(e){setSelection(this,this.selectionStart,toUnsignedLong(e),this[hr])}get selectionDirection(){return this[hr]}set selectionDirection(e){setSelection(this,this.selectionStart,this.selectionEnd,String(e))}setSelectionRange(e,t,n){setSelection(this,toUnsignedLong(e),toUnsignedLong(t),n===void 0?`none`:String(n))}select(){setSelection(this,0,this._selectionLength(),`none`)}setRangeText(e,t,n,r){if(arguments.length===0)throw TypeError(`Failed to execute 'setRangeText' on 'HTMLTextAreaElement': 1 argument required, but only 0 present.`);let i=rangeText(this._apiValue(),this[vr],this[gr],String(e),t,n,r,arguments.length);this[M].doc[q]++,this[$n]=i.value,this[E]=!0,setSelection(this,i.start,i.end,`none`)}_isMutable(){return!isActuallyDisabled(this[M])&&contentAttr(this[M],`readonly`)===null}_barredFromValidation(){let e=this[M];return contentAttr(e,`readonly`)!==null||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[M],t=this[T]===``?0:512,n=this._apiValue();if(contentAttr(e,`required`)!==null&&this._isMutable()&&n===``&&(t|=1),this[qr]&&n!==``){let r=readNonNegativeLong(e,`maxlength`,-1);r!==-1&&n.length>r&&(t|=8);let i=readNonNegativeLong(e,`minlength`,-1);i!==-1&&n.length<i&&(t|=16)}return t}_validationMessage(e){if(e&1)return Os;let t=this._apiValue().length;return e&8?msgTooLong(this.maxLength,t):e&16?msgTooShort(this.minLength,t):this[T]}_reset(){this[Jr]=!1,this[E]=!1,this[qr]=!1,this[$n]=``}_childrenChangedSteps(){if(this[E])return;let e=this._selectionLength();this[vr]>e&&(this[vr]=e),this[gr]>e&&(this[gr]=e)}_cloningSteps(e){let t=e;t[$n]=this[$n],t[E]=this[E]}};installConstraintValidation(HTMLTextAreaElement),str(HTMLTextAreaElement,`dirName=dirname name placeholder wrap`),bool(HTMLTextAreaElement,`disabled readOnly=readonly required`),nonNegativeLong(HTMLTextAreaElement,`maxLength=maxlength minLength=minlength`,-1),positiveWithFallback(HTMLTextAreaElement,`cols`,`cols`,20),positiveWithFallback(HTMLTextAreaElement,`rows`,`rows`,2),installAutocomplete(HTMLTextAreaElement);function opt(e){return e.node}var SelectedOptionsCollection=class extends ka{_collect(e){let t=listOfOptions(this._s.root,[]);for(let n=0;n<t.length;n++)opt(t[n])._selectednessNow()&&e.push(t[n].node)}};Object.defineProperty(SelectedOptionsCollection.prototype,"constructor",{value:ka,writable:!0,configurable:!0});var HTMLSelectElement=class extends HTMLElement{[T];[Yr];[F];[z];[yr];[Tr];[Wr];[Jr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=28,this[T]=``,this[Yr]=null,this[F]=null,this[z]=null,this[yr]=null,this[Tr]=!1,this[Wr]=!1,this[Jr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}_ensureSettled(){this[Tr]||this._selectednessSettingAlgorithm()}_cloningSteps(e){e[Tr]=this[Tr]}_connectedSteps(){super._connectedSteps(),this._ensureSettled()}get type(){return contentAttr(this[M],`multiple`)===null?`select-one`:`select-multiple`}_displaySize(){let e=contentAttr(this[M],`size`);if(e!==null){let t=parseNonNegativeInteger(e);if(!Number.isNaN(t))return t}return contentAttr(this[M],`multiple`)===null?1:4}_isSingle(){return contentAttr(this[M],`multiple`)===null}get options(){return this[z]??=new HTMLOptionsCollection(this[M])}get length(){return listOfOptions(this[M],[]).length}set length(e){this.options.length=e}item(e){return this.options.item(e)}namedItem(e){return this.options.namedItem(e)}add(e,t=null){this.options.add(e,t)}remove(e){arguments.length===0?super.remove():this.options.remove(e)}get selectedOptions(){return this[yr]??=new SelectedOptionsCollection(this[M],!1,null)}get selectedIndex(){let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++)if(opt(e[t])._selectednessNow())return t;return-1}set selectedIndex(e){let t=Number(e)|0,n=listOfOptions(this[M],[]);for(let e=0;e<n.length;e++)opt(n[e])._setSelectedness(!1);if(t>=0&&t<n.length){let e=opt(n[t]);e._setSelectedness(!0),e[At]=!0}this._updateSelectedContent()}get value(){let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);if(n._selectednessNow())return n.value}return``}set value(e){let t=String(e),n=listOfOptions(this[M],[]),r=!1;for(let e=0;e<n.length;e++){let i=opt(n[e]);!r&&i.value===t?(i._setSelectedness(!0),i[At]=!0,r=!0):i._setSelectedness(!1)}this._updateSelectedContent()}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}showPicker(){if(isActuallyDisabled(this[M]))throw new DOMException(`Failed to execute 'showPicker' on 'HTMLSelectElement': HTMLSelectElement::showPicker() cannot be used on immutable controls.`,`InvalidStateError`)}_deselectOthers(e){if(!this._isSingle())return;let t=listOfOptions(this[M],[]);for(let n=0;n<t.length;n++)t[n]!==e&&opt(t[n])._setSelectedness(!1)}_selectednessSettingAlgorithm(){this[Tr]=!0,this._runSelectedness(),this._updateSelectedContent()}_runSelectedness(){if(!this._isSingle()||this._displaySize()!==1)return;let e=listOfOptions(this[M],[]),t=0;for(let n=0;n<e.length;n++)opt(e[n])._selectednessNow()&&t++;if(t===0){for(let t=0;t<e.length;t++)if(!isActuallyDisabled(e[t])){opt(e[t])._setSelectedness(!0);return}}else if(t>1){let t=-1;for(let n=0;n<e.length;n++)opt(e[n])._selectednessNow()&&(t=n);for(let n=0;n<e.length;n++)n!==t&&opt(e[n])._setSelectedness(!1)}}_enabledSelectedContent(){let e=this[M];if(contentAttr(e,`multiple`)!==null)return null;for(let t=e.first;t!==null;)if(t.type!==1||t.tag===X.option||t.tag!==X.selectedcontent)t=t.tag===X.option?nextSkippingChildren(t,e):nextInTree(t,e);else{for(let n=t.parent;n!==null&&n!==e;n=n.parent)if(n.tag===X.select)return null;return t}return null}_updateSelectedContent(){if(this[Wr])return;let e=this._enabledSelectedContent();if(e!==null){this[Wr]=!0;try{let t=listOfOptions(this[M],[]),n=null;for(let e=0;e<t.length;e++)if(opt(t[e])._selectednessNow()){n=t[e];break}let r=e.node;if(n===null){r.replaceChildren();return}let i=this[M].doc.createDocumentFragment();for(let e=n.first;e!==null;e=e.next)i.appendChild(e.node.cloneNode(!0));r.replaceChildren(i)}finally{this[Wr]=!1}}}_reset(){this[Jr]=!1,this[Tr]=!0;let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);n[At]=!1,n._setSelectedness(contentAttr(e[t],`selected`)!==null)}this._selectednessSettingAlgorithm()}_childrenChangedSteps(){this._selectednessSettingAlgorithm()}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`multiple`||e===`size`)&&this._selectednessSettingAlgorithm()}_barredFromValidation(){return isActuallyDisabled(this[M])||hasDatalistAncestor(this[M])}_placeholderLabelOption(){let e=this[M];if(contentAttr(e,`required`)===null||!this._isSingle()||this._displaySize()!==1)return null;let t=listOfOptions(e,[]);if(t.length===0)return null;let n=t[0];return n.parent===e&&opt(n).value===``?n:null}_validityFlags(){let e=this[T]===``?0:512;if(contentAttr(this[M],`required`)!==null){let t=listOfOptions(this[M],[]),n=null,r=0;for(let e=0;e<t.length;e++)opt(t[e])._selectednessNow()&&(r===0&&(n=t[e]),r++);(r===0||r===1&&n===this._placeholderLabelOption())&&(e|=1)}return e}_validationMessage(e){return e&1?`Please select an item in the list.`:this[T]}};installConstraintValidation(HTMLSelectElement),str(HTMLSelectElement,`name`),addOptionIndexHost(HTMLSelectElement.prototype,e=>e.options),bool(HTMLSelectElement,`disabled multiple required`),ulong(HTMLSelectElement,`size`,0),installAutocomplete(HTMLSelectElement);function optionSelect(e){let t=!1;for(let n=e.parent;n!==null;n=n.parent){if(n.type!==1||n.ns!==`http://www.w3.org/1999/xhtml`)continue;let e=n.tag;if(e===X.select)return n;if(e===X.datalist||e===X.hr||e===X.option)return null;if(e===X.optgroup){if(t)return null;t=!0}}return null}var HTMLOptionElement=class extends HTMLElement{[br];[_r];[At];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=8,this[br]=!1,this[_r]=!1,this[At]=!1}_selectednessNow(){if(this[_r])return this[br];let e=optionSelect(this[M]);if(e!==null){let t=e.node;if(!t[Tr]&&(t._selectednessSettingAlgorithm(),this[_r]))return this[br]}return contentAttr(this[M],`selected`)!==null}_setSelectedness(e){this[_r]&&this[br]===e||(this[M].doc[q]++,this[br]=e,this[_r]=!0)}get selected(){return this._selectednessNow()}set selected(e){this._setSelectedness(!!e),this[At]=!0;let t=optionSelect(this[M]);if(t!==null){let n=t.node;e&&n._deselectOthers(this[M]),n._selectednessSettingAlgorithm()}}get text(){let e=this[M],t=``;for(let n=e.first;n!==null;)n.tag===X.script||n.ns===`http://www.w3.org/2000/svg`&&n.name===`script`?n=nextSkippingChildren(n,e):((n.type===3||n.type===4)&&(t+=n.data),n=nextInTree(n,e));return stripAndCollapseWS(t)}set text(e){this.textContent=String(e)}get value(){return contentAttr(this[M],`value`)??this.text}set value(e){this.setAttribute(`value`,String(e))}get label(){let e=contentAttr(this[M],`label`);return e===null?this.text:e}set label(e){this.setAttribute(`label`,String(e))}get index(){let e=optionSelect(this[M]);if(e===null)return 0;let t=listOfOptions(e,[]).indexOf(this[M]);return t===-1?0:t}get form(){let e=optionSelect(this[M]);return e===null?null:e.node.form}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;if(e===`disabled`){t===null!=(n===null)&&resetOwnerSelect(this[M]);return}if(e!==`selected`||this[At])return;this._setSelectedness(n!==null);let i=optionSelect(this[M]);if(i!==null){let e=i.node;n!==null&&e._deselectOthers(this[M]),e._selectednessSettingAlgorithm()}}_cloningSteps(e){let t=e;t[br]=this._selectednessNow(),t[_r]=!0,t[At]=this[At]}};bool(HTMLOptionElement,`defaultSelected=selected disabled`);const Dd=function Option(e,t,n,r){if(new.target===void 0)throw TypeError(`Failed to construct 'Option': Please use the 'new' operator, this DOM object constructor cannot be called as a function.`);let i=currentDocument(),a=i.createElement(`option`);return e!==void 0&&e!==``&&a.appendChild(i.createTextNode(String(e))),t!==void 0&&a.setAttribute(`value`,String(t)),n&&a.setAttribute(`selected`,``),a._setSelectedness(!!r),a};Dd.prototype=HTMLOptionElement.prototype;function resetOwnerSelect(e){let t=optionSelect(e);t!==null&&t.node[Tr]&&t.node._selectednessSettingAlgorithm()}var HTMLOptGroupElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=24}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&e===`disabled`&&t===null!=(n===null)&&resetOwnerSelect(this[M])}_childrenChangedSteps(){let e=this[M].parent;e!==null&&e.tag===X.select&&e.node._selectednessSettingAlgorithm()}};bool(HTMLOptGroupElement,`disabled`),str(HTMLOptGroupElement,`label`);var HTMLButtonElement=class extends HTMLElement{[T];[Yr];[F];constructor(e,t,n,r){super(e,t,n,r),this[T]=``,this[Yr]=null,this[F]=null}get type(){return buttonType(this[M])}set type(e){this.setAttribute(`type`,String(e))}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}get formAction(){return reflectActionURL(this[M],`formaction`)}set formAction(e){this.setAttribute(`formaction`,String(e))}_barredFromValidation(){let e=this[M];return buttonType(e)!==`submit`||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[M];if(isActuallyDisabled(t))return;let n=formOwner(t);if(n!==null&&t.flags&1)switch(buttonType(t)){case`submit`:submitForm(n,t,!1);return;case`reset`:resetForm(n);return}buttonInvokerActivation(t,e?.target?.[M]??null)}};installConstraintValidation(HTMLButtonElement),str(HTMLButtonElement,`formTarget=formtarget name value`),bool(HTMLButtonElement,`disabled formNoValidate=formnovalidate`),enumerated(HTMLButtonElement,`formEnctype=formenctype`,Wl),enumerated(HTMLButtonElement,`formMethod=formmethod`,Gl);function isInteractiveContent(e){switch(e.tag){case X.a:return contentAttr(e,`href`)!==null;case X.audio:case X.video:return contentAttr(e,`controls`)!==null;case X.img:return contentAttr(e,`usemap`)!==null;case X.input:return inputType(e)!==0;case X.button:case X.details:case X.embed:case X.iframe:case X.label:case X.select:case X.textarea:return!0}return!1}var HTMLLabelElement=class extends HTMLElement{get control(){let e=labeledControl(this[M]);return e===null?null:e.node}get form(){let e=labeledControl(this[M]);if(e===null||e.tag===X.meter||e.tag===X.progress)return null;let t=formOwner(e);return t===null?null:t.node}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[M],n=labeledControl(t);if(n===null)return;let r=e===null?null:e.target?.[M]??null;if(r!==null&&r!==t){for(let e=r;e!==null&&e!==t;e=e.parent)if(e===n||e.type===1&&isInteractiveContent(e))return}isActuallyDisabled(n)||syntheticClick(n.node)}};str(HTMLLabelElement,`htmlFor=for`);var HTMLFieldSetElement=class extends HTMLElement{[T];[Yr];[Rt];constructor(e,t,n,r){super(e,t,n,r),this[T]=``,this[Yr]=null,this[Rt]=null}get type(){return`fieldset`}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get elements(){return this[Rt]??=ka._descendants(this[M],isListed)}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLFieldSetElement),bool(HTMLFieldSetElement,`disabled`),str(HTMLFieldSetElement,`name`);var HTMLLegendElement=class extends HTMLElement{get form(){let e=this[M].parent;if(e===null||e.tag!==X.fieldset)return null;let t=formOwner(e);return t===null?null:t.node}};str(HTMLLegendElement,`align`);var HTMLOutputElement=class extends HTMLElement{[Dt];[T];[Yr];[F];constructor(e,t,n,r){super(e,t,n,r),this[Dt]=null,this[T]=``,this[Yr]=null,this[F]=null}get type(){return`output`}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}get defaultValue(){return this[Dt]??descendantTextContent(this[M])}set defaultValue(e){this[Dt]===null?this.textContent=String(e):this[Dt]=String(e)}get value(){return descendantTextContent(this[M])}set value(e){this[Dt]=this.defaultValue,this.textContent=String(e)}_reset(){this.textContent=this.defaultValue,this[Dt]=null}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLOutputElement),str(HTMLOutputElement,`name`),tokenList(HTMLOutputElement,`htmlFor`,`for`);function attrFloat(e,t){let n=contentAttr(e[M],t);return n===null?NaN:parseFloatingPoint(n)}function setFloat(e,t,n){let r=Number(n);if(!Number.isFinite(r))throw TypeError(`Failed to set the '${t}' property: The provided double value is non-finite.`);e.setAttribute(t,serializeFloat(r))}var HTMLProgressElement=class extends HTMLElement{[F];constructor(e,t,n,r){super(e,t,n,r),this[F]=null}get max(){let e=attrFloat(this,`max`);return Number.isNaN(e)||e<=0?1:e}set max(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to set the 'max' property on 'HTMLProgressElement': The provided double value is non-finite.`);t>0&&this.setAttribute(`max`,serializeFloat(t))}get value(){let e=attrFloat(this,`value`);return Number.isNaN(e)||e<0?0:Math.min(e,this.max)}set value(e){setFloat(this,`value`,e)}get position(){return contentAttr(this[M],`value`)===null?-1:this.value/this.max}get labels(){return this[F]??=new LabelsNodeList(this[M])}},HTMLMeterElement=class extends HTMLElement{[F];constructor(e,t,n,r){super(e,t,n,r),this[F]=null}get min(){let e=attrFloat(this,`min`);return Number.isNaN(e)?0:e}set min(e){setFloat(this,`min`,e)}get max(){let e=this.min,t=attrFloat(this,`max`);return Math.max(Number.isNaN(t)?1:t,e)}set max(e){setFloat(this,`max`,e)}get value(){let e=this.min,t=this.max,n=attrFloat(this,`value`),r=Number.isNaN(n)?0:n;return r<e?e:r>t?t:r}set value(e){setFloat(this,`value`,e)}get low(){let e=this.min,t=this.max,n=attrFloat(this,`low`),r=Number.isNaN(n)?e:n;return r<e?e:r>t?t:r}set low(e){setFloat(this,`low`,e)}get high(){let e=this.low,t=this.max,n=attrFloat(this,`high`),r=Number.isNaN(n)?t:n;return r<e?e:r>t?t:r}set high(e){setFloat(this,`high`,e)}get optimum(){let e=this.min,t=this.max,n=attrFloat(this,`optimum`),r=Number.isNaN(n)?e+(t-e)/2:n;return r<e?e:r>t?t:r}set optimum(e){setFloat(this,`optimum`,e)}get labels(){return this[F]??=new LabelsNodeList(this[M])}};function isOption(e){return e.tag===X.option}var HTMLDataListElement=class extends HTMLElement{[z];constructor(e,t,n,r){super(e,t,n,r),this[z]=null}get options(){return this[z]??=ka._descendants(this[M],isOption)}};const Od=stubbedMethod(`HTMLFormElement`,`submit`),kd={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:`application/x-www-form-urlencoded`,invalid:`application/x-www-form-urlencoded`},Ad={keywords:[`get`,`post`,`dialog`],missing:`get`,invalid:`get`},jd={keywords:[`on`,`off`],missing:`on`,invalid:`on`};var HTMLFormElement=class extends HTMLElement{[Rt];[pt];[gt];[mt];[Gt];[On];[dt];[ze];[Vn];constructor(e,t,n,r){super(e,t,n,r),this[Rt]=null,this[pt]=[],this[gt]=-1,this[mt]=null,this[Gt]=!1,this[On]=!1,this[dt]=!1,this[Vn]=null,this[ze]=0;let i=new Proxy(this,Nd);return this[M].node=i,i}_disconnectedSteps(){super._disconnectedSteps(),this[ze]++}_namedProperty(e){let t=this[M],n=[],r=this._controls();for(let t=0;t<r.length;t++){let i=r[t];(i.id===e||contentAttr(i,`name`)===e)&&n.push(i)}if(n.length===0){let r=treeRoot(t);for(let i=nextElementInTree(r,r);i!==null;i=nextElementInTree(i,r))i.tag===X.img&&(i.id===e||contentAttr(i,`name`)===e)&&formOwner(i)===t&&n.push(i)}if(n.length===0){let n=this[Vn]?.get(e);if(n===void 0)return;if(formOwner(n)!==t){this[Vn].delete(e);return}return n.node}if(n.length>1){let n=Md.get(t);n===void 0&&Md.set(t,n=/* @__PURE__ */ new Map);let r=n.get(e);return r===void 0&&n.set(e,r=new RadioNodeList(t,e)),r}return(this[Vn]??=/* @__PURE__ */ new Map).set(e,n[0]),n[0].node}_controls(){let e=this[M].doc;if(this[gt]===e[q]&&this[mt]===e)return this[pt];let t=formControls(this[M],[],!1);return this[pt]=t,this[gt]=e[q],this[mt]=e,t.length!==0&&holdSnapshot(e,this,this[M]),t}_dropSnapshot(){this[pt]=[],this[gt]=-1,this[mt]=null}get elements(){return this[Rt]??=createFormControlsCollection(this[M])}get length(){return this._controls().length}get action(){return reflectActionURL(this[M],`action`)}set action(e){this.setAttribute(`action`,String(e))}get encoding(){return this.enctype}set encoding(e){this.enctype=e}submit(){reportNotImplemented(this[M].doc[J],Od),submitForm(this[M],this[M],!0)}requestSubmit(e=null){let t=this[M];if(e!=null){let n=e[M];if(n===void 0||!isSubmitButton(n))throw TypeError(`Failed to execute 'requestSubmit' on 'HTMLFormElement': The specified element is not a submit button.`);if(e.form!==this)throw new DOMException(`Failed to execute 'requestSubmit' on 'HTMLFormElement': The specified element is not owned by this form element.`,`NotFoundError`);t=n}submitForm(this[M],t,!1)}reset(){resetForm(this[M]),flushFaceReactions()}checkValidity(){return formCheckValidity(this[M])}reportValidity(){return formCheckValidity(this[M])}};str(HTMLFormElement,`acceptCharset=accept-charset name rel target`),bool(HTMLFormElement,`noValidate=novalidate`),enumerated(HTMLFormElement,`enctype`,kd),enumerated(HTMLFormElement,`method`,Ad),enumerated(HTMLFormElement,`autocomplete`,jd),tokenList(HTMLFormElement,`relList`,`rel`,[`noopener`,`noreferrer`,`opener`]);const Md=/* @__PURE__ */ new WeakMap;function supportedNames(e){let t=[],n=e._controls();for(let e=0;e<n.length;e++){let r=n[e];r.id!==``&&!t.includes(r.id)&&t.push(r.id);let i=contentAttr(r,`name`);i!==null&&i!==``&&!t.includes(i)&&t.push(i)}let r=e[Vn];if(r!==null)for(let n of r.keys())!t.includes(n)&&e._namedProperty(n)!==void 0&&t.push(n);return t}function isIndexedOrNamed(e,t){if(Object.hasOwn(e,t))return!1;let n=arrayIndex(t);return n===-1?!(t in e)&&e._namedProperty(t)!==void 0:n<e._controls().length}function arrayIndex(e){let t=e.charCodeAt(0);if(t<48||t>57)return-1;let n=Number(e);return Number.isInteger(n)&&String(n)===e?n:-1}const Nd={get(e,t,n){if(typeof t==`symbol`)return e[t];if(!(t in e)){let n=arrayIndex(t);return n===-1?e._namedProperty(t):e._controls()[n]?.node}return Reflect.get(e,t,n)},has(e,t){if(typeof t==`string`&&!(t in e)){let n=arrayIndex(t);return n===-1?e._namedProperty(t)!==void 0:n<e._controls().length}return Reflect.has(e,t)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!Object.hasOwn(e,t)&&!(t in e)){let n=arrayIndex(t),r=n===-1?e._namedProperty(t):e._controls()[n]?.node;if(r!==void 0)return{value:r,writable:!1,enumerable:n!==-1,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n,r){return typeof t==`string`&&!(t in e)&&isIndexedOrNamed(e,t)?!1:Reflect.set(e,t,n,r)},defineProperty(e,t,n){return typeof t==`string`&&isIndexedOrNamed(e,t)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&isIndexedOrNamed(e,t)?!1:Reflect.deleteProperty(e,t)},ownKeys(e){let t=[],n=e._controls().length;for(let e=0;e<n;e++)t.push(String(e));for(let n of supportedNames(e))Object.hasOwn(e,n)||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t}},Pd=/* @__PURE__ */ new Map;function recordHostOriginal(e,t){Pd.has(e)||Pd.set(e,t)}const Fd=/* @__PURE__ */ new WeakSet;let Id=null;function hostFormData(){let e=Pd.get(`FormData`);if(e!==void 0)return e;let t=globalThis.FormData;return t===FormData$1?void 0:t}function nodeFormData(){if(Id!==null)return Id;let e=hostFormData();if(e===void 0)throw TypeError(`FormData is not available in this Node.js runtime.`);return Id=e,Object.setPrototypeOf(FormData$1.prototype,Id.prototype),Object.setPrototypeOf(FormData$1,Id),Id}var FormData$1=class{static{__name(this,`FormData`)}constructor(e,t=null){let n=Reflect.construct(nodeFormData(),[],new.target);if(e===void 0)return n;let r=e?.[M];if(r===void 0||r.tag!==X.form)throw TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`);let i=null;if(t!=null){let e=t[M];if(e===void 0||!isSubmitButton(e))throw TypeError(`Failed to construct 'FormData': The specified element is not a submit button.`);if(formOwner(e)!==r)throw new DOMException(`Failed to construct 'FormData': The specified element is not owned by this form element.`,`NotFoundError`);i=e}if(constructEntryList(r,i,t=>{for(let e=0;e<t.length;e++){let[r,i]=t[e];typeof i==`string`?n.append(r,i):n.append(r,i,i.name)}dispatchTrusted$1(e,new FormDataEvent(`formdata`,{bubbles:!0,cancelable:!1,formData:n}))})===null)throw new DOMException(`Failed to construct 'FormData': The form is already constructing its entry list.`,`InvalidStateError`);return n}};for(let e of[`append`,`delete`,`get`,`getAll`,`has`,`set`,`entries`,`keys`,`values`,`forEach`])Object.defineProperty(FormData$1.prototype,e,{value:{[e](...t){return nodeFormData().prototype[e].apply(this,t)}}[e],writable:!0,configurable:!0});Object.defineProperty(FormData$1.prototype,Symbol.iterator,{value:function entries(){return nodeFormData().prototype.entries.call(this)},writable:!0,configurable:!0}),Object.defineProperty(FormData$1.prototype,Symbol.toStringTag,{value:`FormData`,configurable:!0});const Ld=/* @__PURE__ */ new Map([[`input`,HTMLInputElement],[`textarea`,HTMLTextAreaElement],[`select`,HTMLSelectElement],[`option`,HTMLOptionElement],[`optgroup`,HTMLOptGroupElement],[`button`,HTMLButtonElement],[`label`,HTMLLabelElement],[`fieldset`,HTMLFieldSetElement],[`legend`,HTMLLegendElement],[`output`,HTMLOutputElement],[`progress`,HTMLProgressElement],[`meter`,HTMLMeterElement],[`datalist`,HTMLDataListElement],[`form`,HTMLFormElement]]),Rd=/* @__PURE__ */ new Map([[`a`,HTMLAnchorElement],[`area`,HTMLAreaElement],[`audio`,HTMLAudioElement],[`base`,HTMLBaseElement],[`blockquote`,HTMLQuoteElement],[`q`,HTMLQuoteElement],[`body`,HTMLBodyElement],[`br`,HTMLBRElement],[`canvas`,HTMLCanvasElement],[`caption`,HTMLTableCaptionElement],[`col`,HTMLTableColElement],[`colgroup`,HTMLTableColElement],[`data`,HTMLDataElement],[`del`,HTMLModElement],[`ins`,HTMLModElement],[`details`,HTMLDetailsElement],[`dialog`,HTMLDialogElement],[`div`,HTMLDivElement],[`dl`,HTMLDListElement],[`embed`,HTMLEmbedElement],[`h1`,HTMLHeadingElement],[`h2`,HTMLHeadingElement],[`h3`,HTMLHeadingElement],[`h4`,HTMLHeadingElement],[`h5`,HTMLHeadingElement],[`h6`,HTMLHeadingElement],[`head`,HTMLHeadElement],[`hr`,HTMLHRElement],[`html`,HTMLHtmlElement],[`iframe`,HTMLIFrameElement],[`img`,HTMLImageElement],[`li`,HTMLLIElement],[`link`,HTMLLinkElement],[`map`,HTMLMapElement],[`menu`,HTMLMenuElement],[`meta`,HTMLMetaElement],[`object`,HTMLObjectElement],[`ol`,HTMLOListElement],[`p`,HTMLParagraphElement],[`param`,HTMLParamElement],[`picture`,HTMLPictureElement],[`pre`,HTMLPreElement],[`listing`,HTMLPreElement],[`xmp`,HTMLPreElement],[`script`,HTMLScriptElement],[`slot`,HTMLSlotElement],[`source`,HTMLSourceElement],[`span`,HTMLSpanElement],[`style`,HTMLStyleElement],[`table`,HTMLTableElement],[`tbody`,HTMLTableSectionElement],[`thead`,HTMLTableSectionElement],[`tfoot`,HTMLTableSectionElement],[`td`,HTMLTableCellElement],[`th`,HTMLTableCellElement],[`template`,HTMLTemplateElement],[`time`,HTMLTimeElement],[`title`,HTMLTitleElement],[`tr`,HTMLTableRowElement],[`track`,HTMLTrackElement],[`ul`,HTMLUListElement],[`video`,HTMLVideoElement],[`dir`,HTMLDirectoryElement],[`font`,HTMLFontElement],[`frame`,HTMLFrameElement],[`frameset`,HTMLFrameSetElement],[`marquee`,HTMLMarqueeElement],[`summary`,od]]);for(let e of/* @__PURE__ */ `abbr.address.article.aside.b.bdi.bdo.cite.code.dd.dfn.dt.em.figcaption.figure.footer.header.hgroup.i.kbd.main.mark.nav.noscript.rp.rt.ruby.s.samp.search.section.small.strong.sub.sup.u.var.wbr.acronym.basefont.big.center.nobr.noembed.noframes.plaintext.rb.rtc.strike.tt.selectedcontent`.split(`.`))Rd.set(e,HTMLElement);for(let[e,t]of Ld)Rd.set(e,t);installPopoverInvoker(Rd.get(`button`)),installPopoverInvoker(Rd.get(`input`)),installCommandInvoker(Rd.get(`button`));function elementClassFor(e,t){if(t===`http://www.w3.org/1999/xhtml`){let t=Rd.get(e);return t===void 0?e.includes(`-`)&&isValidCustomElementName(e)?HTMLElement:HTMLUnknownElement:t}return t===`http://www.w3.org/2000/svg`?hd.get(e)??SVGElement:t===`http://www.w3.org/1998/Math/MathML`?MathMLElement:Fo}setElementClassLookup(elementClassFor);let zd=null;function isBuiltinInterface(e){if(zd===null){zd=/* @__PURE__ */ new Set([HTMLElement,HTMLUnknownElement,HTMLMediaElement]);for(let e of Rd.values())zd.add(e)}return zd.has(e)}function localNamesForInterface(e){let t=[];for(let[n,r]of Rd)r===e&&t.push(n);return t}gl.createCustomElementRegistry=e=>customElementRegistryFor(e);function setClassString(e){let t=e.prototype;Object.hasOwn(t,Symbol.toStringTag)||Object.defineProperty(t,Symbol.toStringTag,{value:e.name,configurable:!0})}for(let e of[HTMLElement,HTMLUnknownElement,HTMLMediaElement,SVGElement,MathMLElement,...Rd.values(),...hd.values()])(e.name!==`HTMLElement`||e===HTMLElement)&&setClassString(e);for(let e of[SVGGraphicsElement,SVGGeometryElement,SVGTextContentElement,SVGTextPositioningElement,SVGGradientElement])setClassString(e);const Bd=[`window`,`self`,`frames`,`parent`,`top`],Vd=/* @__PURE__ */ `addEventListener.removeEventListener.dispatchEvent.getComputedStyle.matchMedia.requestAnimationFrame.cancelAnimationFrame.requestIdleCallback.cancelIdleCallback.getSelection.scroll.scrollTo.scrollBy.resizeTo.resizeBy.moveTo.moveBy.alert.confirm.prompt.print.open.close.stop.focus.blur.postMessage.reportError.captureEvents.releaseEvents`.split(`.`),Hd=new Set(Pu);let Ud=null;function windowAttributes(){if(Ud!==null)return Ud;let e=windowInterfaces(),t=/* @__PURE__ */ new Set([...Bd,...Vd,`document`,`constructor`]),n=[];for(let r=Window.prototype;r!==null&&r!==Object.prototype;r=Object.getPrototypeOf(r))for(let i of Object.getOwnPropertyNames(r))t.has(i)||Hd.has(i)||i in e||i.startsWith(`_`)||Object.getOwnPropertyDescriptor(r,i).get!==void 0&&(t.add(i),n.push(i));return n.push(`name`,`status`,`opener`),Ud=n}function hasSetter(e,t){for(let n=e;n!==null;n=Object.getPrototypeOf(n)){let e=Object.getOwnPropertyDescriptor(n,t);if(e!==void 0)return e.set!==void 0||e.writable===!0}return!1}function installGlobals(e,t=globalThis){let n=/* @__PURE__ */ new Map,r=currentWindowOrNull(),define=(e,r)=>{let i=Object.getOwnPropertyDescriptor(t,e);(i===void 0||i.configurable)&&(n.has(e)||n.set(e,i),i!==void 0&&`value`in i&&t===globalThis&&recordHostOriginal(e,i.value),Object.defineProperty(t,e,r))};for(let e of Bd)define(e,{value:t,writable:!0,enumerable:!0,configurable:!0});define(`document`,{value:e.document,writable:!0,enumerable:!0,configurable:!0});let i=e[z].compat,a=hiddenGlobals(i),o=windowInterfaces();for(let e in o)a.has(e)||define(e,{value:o[e],writable:!0,enumerable:!1,configurable:!0});let s=optInInterfaces();for(let e in s)a.has(e)||define(e,{value:s[e],writable:!0,enumerable:!1,configurable:!0});let c=installCompatMembers(i,o),l=e;for(let t of Vd){if(a.has(t))continue;let n=l[t].bind(e);Fd.add(n),define(t,{value:n,writable:!0,enumerable:!0,configurable:!0})}let u=windowAttributes(),d=Object.hasOwn(e,`visualViewport`)?[...u,`visualViewport`]:u;for(let n of d)(!a.has(n)||Object.hasOwn(e,n))&&define(n,{get(){return e[n]},set:hasSetter(e,n)?t=>{e[n]=t}:e=>{Object.defineProperty(t,n,{value:e,writable:!0,enumerable:!0,configurable:!0})},enumerable:!0,configurable:!0});let m=e.document;Object.defineProperty(m,"defaultView",{get:()=>t,enumerable:!0,configurable:!0}),setCurrentWindow(e);let h=e[j];e[j]=t;let _=e[en];e[en]=t;let v=ju.get(t);ju.set(t,e);let ee=!0;return function uninstall(){if(ee){ee=!1,delete m.defaultView;for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),c(),e[j]=h,e[en]=_,ju.get(t)===e&&(v===void 0?ju.delete(t):ju.set(t,v)),currentWindowOrNull()===e&&setCurrentWindow(r)}}}var XhrState=class{window;state;send;sync;method;url;headers;timeout;withCredentials;upload;uploadComplete;uploadListener;uploadTotal;responseType;overrideMime;error;status;statusText;responseURL;responseHeaders;chunks;received;bytesCache;textCache;object;generation;request;timer;startedAt;closeTask;constructor(e,t){this.window=e,this.state=0,this.send=!1,this.sync=!1,this.method=`GET`,this.url=null,this.headers=/* @__PURE__ */ new Map,this.timeout=0,this.withCredentials=!1,this.upload=t,this.uploadComplete=!1,this.uploadListener=!1,this.uploadTotal=0,this.responseType=``,this.overrideMime=null,this.error=!0,this.status=0,this.statusText=``,this.responseURL=``,this.responseHeaders=[],this.chunks=[],this.received=0,this.bytesCache=null,this.textCache=null,this.object=void 0,this.generation=0,this.request=null,this.timer=null,this.startedAt=0,this.closeTask=null}},Wd=class XMLHttpRequestEventTarget extends EventTarget{constructor(){if(new.target===XMLHttpRequestEventTarget)throw TypeError(`Illegal constructor`);super()}};const Gd=Symbol(`upload`);var XMLHttpRequestUpload=class extends Wd{constructor(e){if(e!==Gd)throw TypeError(`Illegal constructor`);super()}};function defineHandlers(e,t){for(let n of t)Object.defineProperty(e,`on${n}`,{get(){return getEventHandler(this,n)},set(e){setEventHandler(this,n,e)},enumerable:!0,configurable:!0})}defineHandlers(Wd.prototype,[`loadstart`,`progress`,`abort`,`error`,`load`,`timeout`,`loadend`]);function fireProgress(e,t,n,r,i=r>0){fireAnEvent(t,e,eventInterface(`ProgressEvent`),{loaded:n,total:r,lengthComputable:i})}function fireReadyStateChange(e){fireAnEvent(`readystatechange`,e,Event)}const state=e=>{let t=e?.[ii];if(t===void 0)throw TypeError(`Illegal invocation`);return t},invalidState=(e,t)=>new DOMException(`Failed to ${e} 'XMLHttpRequest': ${t}`,`InvalidStateError`);var XMLHttpRequest=class extends Wd{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;[ii];constructor(){super(),this[ii]=new XhrState(currentWindowOrNull(),new XMLHttpRequestUpload(Gd))}get readyState(){return state(this).state}open(e,t,n,r,i){let a=state(this);if(arguments.length<2)throw TypeError(`Failed to execute 'open' on 'XMLHttpRequest': 2 arguments required, but only ${arguments.length} present.`);if(a.window!==null&&a.window[ot])throw invalidState(`execute 'open' on`,`The document is not fully active.`);if(e=String(e),!Kd.test(e))throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': '${e}' is not a valid HTTP method.`,`SyntaxError`);let o=e.toUpperCase();if(o===`CONNECT`||o===`TRACE`||o===`TRACK`)throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': '${e}' HTTP method is unsupported.`,`SecurityError`);qd.has(o)&&(e=o);let s=URL.parse(String(t),a.window?.document.baseURI??void 0);if(s===null)throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': Invalid URL`,`SyntaxError`);let c=arguments.length<3||!!n;if(s.host!==``&&(r!=null&&(s.username=String(r)),i!=null&&(s.password=String(i))),!c&&(a.timeout!==0||a.responseType!==``))throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document must not set a timeout or responseType.`,`InvalidAccessError`);terminate(a),a.send=!1,a.uploadListener=!1,a.method=e,a.url=s,a.sync=!c,a.headers.clear(),setNetworkError(a),a.state!==1&&(a.state=1,fireReadyStateChange(this))}setRequestHeader(e,t){let n=state(this);if(arguments.length<2)throw TypeError(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 2 arguments required, but only ${arguments.length} present.`);if(n.state!==1||n.send)throw invalidState(`execute 'setRequestHeader' on`,`The object's state must be OPENED.`);if(e=String(e),t=String(t).replace(/^[\t\n\r ]+|[\t\n\r ]+$/g,``),!Kd.test(e))throw new DOMException(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${e}' is not a valid HTTP header field name.`,`SyntaxError`);if(/[\0\r\n]/.test(t))throw new DOMException(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${t}' is not a valid HTTP header field value.`,`SyntaxError`);let r=e.toLowerCase();if(Yd.has(r)||r.startsWith(`proxy-`)||r.startsWith(`sec-`))return;let i=n.headers.get(r);n.headers.set(r,i===void 0?[e,t]:[i[0],`${i[1]}, ${t}`])}get timeout(){return state(this).timeout}set timeout(e){let t=state(this);if(t.sync&&t.state!==0)throw new DOMException(`Failed to set the 'timeout' property on 'XMLHttpRequest': Timeouts cannot be set for synchronous requests made from a document.`,`InvalidAccessError`);t.timeout=Number(e)>>>0,t.send&&t.request!==null&&scheduleTimeout(this,t)}get withCredentials(){return state(this).withCredentials}set withCredentials(e){let t=state(this);if(t.state!==0&&t.state!==1||t.send)throw invalidState(`set the 'withCredentials' property on`,`The value may only be set if the object's state is UNSENT or OPENED.`);t.withCredentials=!!e}get upload(){return state(this).upload}send(e){let t=state(this);if(t.state!==1||t.send)throw invalidState(`execute 'send' on`,`The object's state must be OPENED.`);if(t.window!==null&&t.window[ot])throw invalidState(`execute 'send' on`,`The document is not fully active.`);if(t.sync)throw new DOMException(`Failed to execute 'send' on 'XMLHttpRequest': Synchronous XMLHttpRequest is not supported by @ctrl/dom (docs/deviations.md).`,`NotSupportedError`);let n=null;if(e!=null&&t.method!==`GET`&&t.method!==`HEAD`){n=extractBody(e);let r=t.headers.get(`content-type`);r===void 0?n.type!==null&&t.headers.set(`content-type`,[`Content-Type`,n.type]):(typeof e==`string`||e instanceof Z)&&(r[1]=r[1].replace(/;\s*charset=("[^"]*"|[^;]*)/i,e=>/utf-8/i.test(e)?e:`;charset=UTF-8`))}t.uploadListener=(t.upload[Tn]?.size??0)>0,t.uploadTotal=n?.length??0,t.uploadComplete=t.uploadTotal===0,t.send=!0,fireProgress(this,`loadstart`,0,0),!t.uploadComplete&&t.uploadListener&&fireProgress(t.upload,`loadstart`,0,t.uploadTotal),t.state===1&&t.send&&start(this,t,n)}abort(){let e=state(this);terminate(e),(e.state===1&&e.send||e.state===2||e.state===3)&&requestErrorSteps(this,e,`abort`),e.state===4&&(e.state=0,setNetworkError(e))}get responseURL(){return state(this).responseURL}get status(){return state(this).status}get statusText(){return state(this).statusText}getResponseHeader(e){let t=state(this),n=String(e).toLowerCase();if(n===`set-cookie`||n===`set-cookie2`)return null;let r=null;for(let[e,i]of t.responseHeaders)e===n&&(r=r===null?i:`${r}, ${i}`);return r}getAllResponseHeaders(){let e=state(this),t=/* @__PURE__ */ new Map;for(let[n,r]of e.responseHeaders){if(n===`set-cookie`||n===`set-cookie2`)continue;let e=t.get(n);t.set(n,e===void 0?r:`${e}, ${r}`)}let n=[...t.keys()].sort((e,t)=>{let n=e.toUpperCase(),r=t.toUpperCase();return n<r?-1:+(n>r)}),r=``;for(let e of n)r+=`${e}: ${t.get(e)}\r\n`;return r}overrideMimeType(e){let t=state(this);if(t.state===3||t.state===4)throw invalidState(`execute 'overrideMimeType' on`,`MimeType cannot be overridden when the state is LOADING or DONE.`);t.overrideMime=parseMime(String(e))===null?`application/octet-stream`:String(e)}get responseType(){return state(this).responseType}set responseType(e){let t=state(this);if(e=String(e),Jd.has(e)){if(t.state===3||t.state===4)throw invalidState(`set the 'responseType' property on`,`The response type cannot be set if the object's state is LOADING or DONE.`);if(t.sync&&t.state!==0)throw new DOMException(`Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be changed for synchronous requests made from a document.`,`InvalidAccessError`);t.responseType=e}}get response(){let e=state(this),t=e.responseType;if(t===``||t===`text`)return e.state===3||e.state===4?text(e):``;if(e.state!==4)return null;if(e.object!==void 0)return e.object;let n=null;return e.error||(t===`arraybuffer`?n=new Uint8Array(bytes(e)).buffer:t===`blob`?n=new Blob([bytes(e)],{type:finalMime(e)?.serialized??``}):t===`document`?n=documentResponse(e):t===`json`&&(n=jsonResponse(e))),e.object=n,n}get responseText(){let e=state(this);if(e.responseType!==``&&e.responseType!==`text`)throw invalidState(`read the 'responseText' property from`,`The value is only accessible if the object's 'responseType' is '' or 'text' (was '${e.responseType}').`);return e.state===3||e.state===4?text(e):``}get responseXML(){let e=state(this);if(e.responseType!==``&&e.responseType!==`document`)throw invalidState(`read the 'responseXML' property from`,`The value is only accessible if the object's 'responseType' is '' or 'document' (was '${e.responseType}').`);return e.state!==4||e.error?null:(e.object===void 0&&(e.object=documentResponse(e)),e.object)}};defineHandlers(XMLHttpRequest.prototype,[`readystatechange`]);for(let[e,t]of[[`UNSENT`,0],[`OPENED`,1],[`HEADERS_RECEIVED`,2],[`LOADING`,3],[`DONE`,4]])Object.defineProperty(XMLHttpRequest.prototype,e,{value:t,enumerable:!0});const Kd=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,qd=/* @__PURE__ */ new Set([`DELETE`,`GET`,`HEAD`,`OPTIONS`,`POST`,`PUT`]),Jd=/* @__PURE__ */ new Set([``,`arraybuffer`,`blob`,`document`,`json`,`text`]),Yd=/* @__PURE__ */ new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`set-cookie`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]),Xd=[`content-encoding`,`content-language`,`content-location`,`content-type`];function terminate(e){e.generation++,e.request!==null&&(e.request.destroy(),e.request=null),e.timer!==null&&(e.window?._cancelTask(e.timer),e.timer=null),e.closeTask!==null&&(e.window?._releaseCloseable(e.closeTask),e.closeTask=null)}function setNetworkError(e){e.error=!0,e.status=0,e.statusText=``,e.responseURL=``,e.responseHeaders=[],e.chunks=[],e.received=0,e.bytesCache=null,e.textCache=null,e.object=void 0}function requestErrorSteps(e,t,n){t.state=4,t.send=!1,setNetworkError(t),fireReadyStateChange(e),t.uploadComplete||(t.uploadComplete=!0,t.uploadListener&&(fireProgress(t.upload,n,0,0),fireProgress(t.upload,`loadend`,0,0))),fireProgress(e,n,0,0),fireProgress(e,`loadend`,0,0)}function scheduleTimeout(e,t){if(t.timer!==null&&(t.window?._cancelTask(t.timer),t.timer=null),t.timeout===0||t.window===null)return;let n=t.generation,r=Math.max(0,t.timeout-(Date.now()-t.startedAt));t.timer=t.window._task(()=>{t.timer=null,t.generation===n&&(terminate(t),requestErrorSteps(e,t,`timeout`))},r)}function start(e,t,n){let r=t.generation;t.startedAt=Date.now(),t.closeTask=t.window?._closeable(()=>terminate(t))??null,scheduleTimeout(e,t);let go=n=>{t.generation===r&&dispatchRequest(e,t,r,t.url,t.method,n,new Map(t.headers),0)};n===null?go(null):n.bytes instanceof Uint8Array?go(n.bytes):n.bytes.then(go,()=>t.generation===r&&networkError(e,t))}function networkError(e,t){terminate(t),requestErrorSteps(e,t,`error`)}function sameOrigin(e,t){return e.origin!==`null`&&e.origin===URL.parse(t)?.origin}function dispatchRequest(e,t,n,r,i,a,o,s){if(r.protocol===`data:`)return void queueMicrotask(()=>t.generation===n&&respondFromData(e,t,n,r));if(r.protocol===`blob:`)return void respondFromBlob(e,t,n,r);if(r.protocol!==`http:`&&r.protocol!==`https:`)return void queueMicrotask(()=>t.generation===n&&networkError(e,t));let c=t.window,l=c?.document.URL??`about:blank`,u=sameOrigin(r,l)||t.withCredentials,d={};for(let[e,t]of o.values())d[e]=t;let has=e=>o.has(e);has(`user-agent`)||(d[`User-Agent`]=c?.navigator.userAgent??``),has(`accept`)||(d.Accept=`*/*`),has(`accept-language`)||(d[`Accept-Language`]=`en`),d[`Accept-Encoding`]=`gzip, deflate`;let m=URL.parse(l);if(m!==null&&(m.protocol===`http:`||m.protocol===`https:`)&&(m.hash=``,m.username=``,m.password=``,d.Referer=m.origin===r.origin?m.href:`${m.origin}/`,m.origin!==r.origin&&(d.Origin=m.origin)),u&&c!==null){let e=c._cookieStore.get(r);e!==``&&(d.Cookie=e)}let h=new URL(r);(h.username!==``||h.password!==``)&&(has(`authorization`)||(d.Authorization=`Basic ${Buffer.from(`${decodeURIComponent(h.username)}:${decodeURIComponent(h.password)}`).toString(`base64`)}`),h.username=``,h.password=``),h.hash=``,a!==null&&(d[`Content-Length`]=String(a.byteLength));let _=process.getBuiltinModule(h.protocol===`https:`?`node:https`:`node:http`),v;try{v=_.request(h,{method:i,headers:d})}catch{queueMicrotask(()=>t.generation===n&&networkError(e,t));return}t.request=v,v.on(`error`,()=>{t.generation===n&&networkError(e,t)}),v.on(`response`,l=>{if(t.generation!==n){l.resume();return}let d=l.statusCode??0,m=l.headers[`set-cookie`];if(u&&c!==null&&m!==void 0)for(let e of m)c._cookieStore.set(e,r);let h=l.headers.location;if((d===301||d===302||d===303||d===307||d===308)&&h!==void 0){l.resume();let c=URL.parse(h,r);if(c===null||s>=20)return networkError(e,t);let u=i,m=a,_=new Map(o);if((d===301||d===302)&&i===`POST`||d===303&&i!==`GET`&&i!==`HEAD`){u=`GET`,m=null;for(let e of Xd)_.delete(e)}c.origin!==r.origin&&_.delete(`authorization`),dispatchRequest(e,t,n,c,u,m,_,s+1);return}let _=[];for(let e=0;e<l.rawHeaders.length;e+=2)_.push([l.rawHeaders[e].toLowerCase(),l.rawHeaders[e+1]]);let v=String(l.headers[`content-encoding`]??``).trim().toLowerCase(),ee=process.getBuiltinModule(`node:zlib`),y=v===`gzip`||v===`x-gzip`?ee.createGunzip():v===`deflate`?ee.createInflate():v===`br`?ee.createBrotliDecompress():null,te=Number(l.headers[`content-length`]??0)||0;processResponse(e,t,n,r,d,l.statusMessage??``,_,y===null?l:l.pipe(y),y===null?te:0)}),a===null?v.end():v.end(a)}function processResponse(e,t,n,r,i,a,o,s,c){if(!t.uploadComplete&&(t.uploadComplete=!0,t.uploadListener&&(fireProgress(t.upload,`progress`,t.uploadTotal,t.uploadTotal),fireProgress(t.upload,`load`,t.uploadTotal,t.uploadTotal),fireProgress(t.upload,`loadend`,t.uploadTotal,t.uploadTotal),t.generation!==n)))return;let l=new URL(r);if(l.hash=``,t.error=!1,t.status=i,t.statusText=a,t.responseURL=l.href,t.responseHeaders=o,t.state=2,fireReadyStateChange(e),t.generation!==n)return;let u=-1,end=()=>{t.generation===n&&(terminate(t),u!==t.received&&fireProgress(e,`progress`,t.received,c,c>0),t.send=!1,t.state=4,fireReadyStateChange(e),fireProgress(e,`load`,t.received,c,c>0),fireProgress(e,`loadend`,t.received,c,c>0))};if(s===null)return end();s.on(`data`,r=>{t.generation===n&&(t.chunks.push(r),t.received+=r.length,t.bytesCache=null,t.textCache=null,t.state===2&&(t.state=3),fireReadyStateChange(e),t.generation===n&&(u=t.received,fireProgress(e,`progress`,t.received,c,c>0)))}),s.on(`end`,end),s.on(`error`,()=>{t.generation===n&&networkError(e,t)})}function respondFromData(e,t,n,r){let i=r.href.slice(5),a=i.indexOf(`,`);if(a===-1)return networkError(e,t);let o=i.slice(0,a).trim(),s,c=decodeURIComponentBytes(i.slice(a+1).replace(/#.*$/,``)),l=/;\s*base64\s*$/i;if(l.test(o)){o=o.replace(l,``);let n=c.toString(`latin1`).replace(/[\t\n\f\r ]/g,``);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(n)||n.replace(/=+$/,``).length%4==1)return networkError(e,t);s=Buffer.from(n,`base64`)}else s=c;o.startsWith(`;`)&&(o=`text/plain${o}`),processResponse(e,t,n,r,200,`OK`,[[`content-type`,parseMime(o)?.serialized??`text/plain;charset=US-ASCII`]],bufferStream(s),s.length)}function respondFromBlob(e,t,n,r){let i=process.getBuiltinModule(`node:buffer`).resolveObjectURL(r.href);if(i===void 0||t.method!==`GET`)return void queueMicrotask(()=>t.generation===n&&networkError(e,t));i.arrayBuffer().then(a=>{if(t.generation!==n)return;let o=[[`content-length`,String(i.size)]];i.type!==``&&o.push([`content-type`,i.type]),processResponse(e,t,n,r,200,`OK`,o,bufferStream(Buffer.from(a)),i.size)},()=>t.generation===n&&networkError(e,t))}function bufferStream(e){if(e.length===0)return null;let t={},n={on(e,r){return t[e]=r,n}};return queueMicrotask(()=>{t.data?.(e),t.end?.()}),n}function decodeURIComponentBytes(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===37&&/^[0-9A-Fa-f]{2}$/.test(e.slice(n+1,n+3)))t.push(Number.parseInt(e.slice(n+1,n+3),16)),n+=2;else if(r<128)t.push(r);else for(let r of Buffer.from(e[n]))t.push(r)}return Buffer.from(t)}const tag=e=>Object.prototype.toString.call(e);function extractBody(e){if(e instanceof Z){let t=e[M],n=e[N],r=Buffer.from(n?serializeChildren(t):serializeXML(t,!1));return{bytes:r,type:n?`text/html;charset=UTF-8`:`application/xml;charset=UTF-8`,length:r.length}}if(e instanceof Blob)return{bytes:e.arrayBuffer().then(e=>new Uint8Array(e)),type:e.type===``?null:e.type,length:e.size};if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice();return{bytes:t,type:null,length:t.length}}if(tag(e)===`[object ArrayBuffer]`||tag(e)===`[object SharedArrayBuffer]`){let t=new Uint8Array(e.slice(0));return{bytes:t,type:null,length:t.length}}if(tag(e)===`[object FormData]`)return multipart(e);if(tag(e)===`[object URLSearchParams]`){let t=Buffer.from(String(e));return{bytes:t,type:`application/x-www-form-urlencoded;charset=UTF-8`,length:t.length}}let t=Buffer.from(String(e).toWellFormed());return{bytes:t,type:`text/plain;charset=UTF-8`,length:t.length}}function multipart(e){let t=`----ctrl-dom-${crypto.randomUUID().replaceAll(`-`,``)}`,escape=e=>e.replaceAll(`
43
+ `.repeat(this.breaks)),this.breaks=0)}trimTrailingSpace(){let e=this.parts,t=e.length-1;if(t>=0&&this.trimmable&&e[t].endsWith(` `)){let n=e[t].slice(0,-1);n===``?e.pop():e[t]=n}this.trimmable=!1}result(){return this.trimTrailingSpace(),this.parts.join(``)}};function isTableInternal(e){let t=computedDisplay(e);return t===`table`||t===`inline-table`||t===`table-row`||t===`table-row-group`||t===`table-header-group`||t===`table-footer-group`}function isWhitespaceOnly(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==12&&n!==13)return!1}return!0}function textRendered(e,t){if(e.ns===`http://www.w3.org/2000/svg`&&!svgRendersText(e))return!1;if(t){let t=computedVisibility(e);if(t===`hidden`||t===`collapse`)return!1}return!0}function collect$1(e,t){if(e.type===3||e.type===4){let n=e.parent;if(n===null||n.type!==1){t.text(e.data,0);return}if(!textRendered(n,t.styled)||isTableInternal(n)&&isWhitespaceOnly(e.data))return;t.text(t.styled?transform(e.data,n):e.data,whiteSpaceMode(n,t.styled));return}if(e.type!==1)return;let n=boxKind(e,t.styled);if(n===0)return;let r=e.ns===ie;if(r&&e.tag===Y.br){t.raw(`
44
+ `);return}if(r&&e.tag===Y.select){collectOptions(e,t);return}if(isReplaced$1(e)){n===2?t.lineBreak(1):t.atomicEnd(t.atomicStart());return}if(r&&e.tag===Y.details&&contentAttr(e,`open`)===null){t.lineBreak(1);for(let n=e.first;n!==null;n=n.next)if(n.type===1&&n.tag===Y.summary){collect$1(n,t);break}t.lineBreak(1);return}let i=r&&e.tag===Y.p;if(n===5){i&&t.lineBreak(2);let n=t.atomicStart();for(let n=e.first;n!==null;n=n.next)collect$1(n,t);t.atomicEnd(n),i&&t.lineBreak(2)}else{i?t.lineBreak(2):n===2&&t.lineBreak(1);for(let n=e.first;n!==null;n=n.next)collect$1(n,t);n===3?isLastOfKind(e,3,t.styled)||t.raw(` `):n===4&&(isLastRow(e,t.styled)||t.raw(`
45
+ `)),i?t.lineBreak(2):n===2&&t.lineBreak(1)}}__name(collect$1,`collect`);function collectOptions(e,t){for(let n=e.first;n!==null;)n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Y.option?(collect$1(n,t),n=nextSkippingChildren(n,e)):(n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Y.optgroup&&t.lineBreak(1),n=nextInTree(n,e))}function isLastOfKind(e,t,n){for(let r=e.next;r!==null;r=r.next)if(r.type===1&&boxKind(r,n)===t)return!1;return!0}function isLastRow(e,t){let n=e.parent;for(;n!==null&&n.type===1&&computedDisplay(n)!==`table`&&computedDisplay(n)!==`inline-table`;)n=n.parent;if(n===null||n.type!==1)return isLastOfKind(e,4,t);let r=null;for(let e=n.first;e!==null;e=nextInTree(e,n))e.type===1&&boxKind(e,t)===4&&(r=e);return r===e}function descendantText(e){let t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}function getInnerText(e){if(!isBeingRendered(e))return descendantText(e);if(isReplaced$1(e))return``;let t=new Builder(hasAuthorStyles(e.doc));if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===Y.select)collectOptions(e,t);else for(let n=e.first;n!==null;n=n.next)collect$1(n,t);return t.result()}function renderedTextFragment(e,t){let n=t.doc,r=n.createDocumentFragment(),i=e.split(/\r\n|\r|\n/);for(let e=0;e<i.length;e++)e>0&&r.appendChild(n.createElement(`br`)),i[e]!==``&&r.appendChild(n.createTextNode(i[e]));return r}const zu=`role ariaAtomic=aria-atomic ariaAutoComplete=aria-autocomplete ariaBrailleLabel=aria-braillelabel ariaBrailleRoleDescription=aria-brailleroledescription ariaBusy=aria-busy ariaChecked=aria-checked ariaColCount=aria-colcount ariaColIndex=aria-colindex ariaColIndexText=aria-colindextext ariaColSpan=aria-colspan ariaCurrent=aria-current ariaDescription=aria-description ariaDisabled=aria-disabled ariaExpanded=aria-expanded ariaHasPopup=aria-haspopup ariaHidden=aria-hidden ariaInvalid=aria-invalid ariaKeyShortcuts=aria-keyshortcuts ariaLabel=aria-label ariaLevel=aria-level ariaLive=aria-live ariaModal=aria-modal ariaMultiLine=aria-multiline ariaMultiSelectable=aria-multiselectable ariaOrientation=aria-orientation ariaPlaceholder=aria-placeholder ariaPosInSet=aria-posinset ariaPressed=aria-pressed ariaReadOnly=aria-readonly ariaRelevant=aria-relevant ariaRequired=aria-required ariaRoleDescription=aria-roledescription ariaRowCount=aria-rowcount ariaRowIndex=aria-rowindex ariaRowIndexText=aria-rowindextext ariaRowSpan=aria-rowspan ariaSelected=aria-selected ariaSetSize=aria-setsize ariaSort=aria-sort ariaValueMax=aria-valuemax ariaValueMin=aria-valuemin ariaValueNow=aria-valuenow ariaValueText=aria-valuetext`,Bu=[[`ariaActiveDescendantElement`,`aria-activedescendant`]],Vu=[[`ariaControlsElements`,`aria-controls`],[`ariaDescribedByElements`,`aria-describedby`],[`ariaDetailsElements`,`aria-details`],[`ariaErrorMessageElements`,`aria-errormessage`],[`ariaFlowToElements`,`aria-flowto`],[`ariaLabelledByElements`,`aria-labelledby`],[`ariaOwnsElements`,`aria-owns`]],Hu=/* @__PURE__ */ new WeakMap,Uu=/* @__PURE__ */ new WeakMap;function findRecord(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e];if(r.localName===t&&(r.rare===null||r.rare.ns===null))return r}return null}function liveExplicit(e,t){let n=Hu.get(e);if(n===void 0)return null;let r=n.get(t);return r===void 0?null:findRecord(e,t)===r.record&&r.record.value===``?r:(n.delete(t),null)}function setExplicit(e,t,n){setAttribute(e,t,``);let r=Hu.get(e);r===void 0&&Hu.set(e,r=/* @__PURE__ */ new Map),r.set(t,{record:findRecord(e,t),elements:n,cached:null})}function clearExplicit(e,t){Hu.get(e)?.delete(t),removeAttribute(e,t)}function shadowIncludingParent(e){return e.parent===null?isShadowRootImpl(e)?e.node[j]?.[M]??null:null:e.parent}function isValidReference(e,t){let n=t;for(;n.parent!==null;)n=n.parent;if(n===t)return!1;for(let t=shadowIncludingParent(e);t!==null;t=shadowIncludingParent(t))if(t===n)return!0;return!1}function firstById(e,t){if(t===``)return null;let n=e;for(;n.parent!==null;)n=n.parent;if(n.type===9)return n.node._idLookup(t);if(n.type===1&&n.id===t)return n;for(let e=nextElementInTree(n,n);e!==null;e=nextElementInTree(e,n))if(e.id===t)return e;return null}function attrAssociatedElement(e,t){let n=liveExplicit(e,t);if(n!==null){let t=n.elements[0]?.deref()??null;return t!==null&&isValidReference(e,t)?t:null}let r=findRecord(e,t)?.value;return r===void 0?null:firstById(e,r)}function attrAssociatedElements(e,t){let n=liveExplicit(e,t),r=[];if(n!==null){for(let t of n.elements){let n=t.deref();n!==void 0&&isValidReference(e,n)&&r.push(n)}return r}let i=findRecord(e,t)?.value;if(i===void 0)return null;for(let t of splitOnAsciiWhitespace(i)){let n=firstById(e,t);n!==null&&r.push(n)}return r}function hasExplicitAttrElements(e,t){return liveExplicit(e,t)!==null}function sameContents(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n].node)return!1;return!0}function toElement(e,t){if(!(e instanceof Io))throw TypeError(`Failed to set the '${t}' property on 'Element': Failed to convert value to 'Element'.`);return e[M]}for(let[e,t]of Bu)defineAccessor(Io,e,function(){return attrAssociatedElement(this[M],t)?.node??null},function(n){n==null?clearExplicit(this[M],t):setExplicit(this[M],t,[new WeakRef(toElement(n,e))])});for(let[e,t]of Vu)defineAccessor(Io,e,function(){let e=this[M],n=attrAssociatedElements(e,t);if(n===null)return null;let r=liveExplicit(e,t),i=r===null?Uu.get(e)?.get(t):r.cached;if(i!=null&&sameContents(i,n))return i;let a=Object.freeze(n.map(e=>e.node));if(r!==null)r.cached=a;else{let n=Uu.get(e);n===void 0&&Uu.set(e,n=/* @__PURE__ */ new Map),n.set(t,a)}return i=a,i},function(n){let r=this[M];if(n==null){clearExplicit(r,t);return}if(typeof n!=`object`||typeof n[Symbol.iterator]!=`function`)throw TypeError(`Failed to set the '${e}' property on 'Element': The provided value cannot be converted to a sequence.`);let i=[];for(let t of n)i.push(new WeakRef(toElement(t,e)));setExplicit(r,t,i)});nullableStr(Io,zu);const Wu=/* @__PURE__ */ new WeakSet;var HTMLElement=class extends Io{constructor(e,t,n,r){if(e!==void 0){super(e,t,n,r),this[M].flags&128&&(this[M].flags|=4);return}let i=htmlElementConstructorSteps(new.target);if(i.upgrade!==null)return i.upgrade;super(i.doc,i.localName,ie,null),initNewCustomElement(this,i.def,i.active)}_connectedSteps(){let e=this[M];(e.flags&128||isValueOf(this)!==null)&&ceConnected(this),e.flags&16384&&faceStateMaybeChanged(e)}_disconnectedSteps(){let e=this[M];(isPopoverShowing(e)||isInTopLayer(e))&&topLayerRemovingSteps(e),definitionOf(this)!==void 0&&ceDisconnected(this),clearParserAssociation(e),e.flags&16384&&faceStateMaybeChanged(e)}_adoptingSteps(e){ceAdopted(this,e,this[M].doc)}_movingSteps(e,t){definitionOf(this)!==void 0&&ceMoved(this)}_shadowDisabled(){return shadowDisabled(this)}_parserAssociateForm(e){parserAssociateForm(this[M],e[M])}_attributeChangedSteps(e,t,n,r){e===`popover`&&r===null&&popoverAttributeChanged(this[M],t,n),definitionOf(this)!==void 0&&ceAttributeChanged(this,e,t,n,r),this[M].flags&16384&&r===null&&(e===`form`||e===`disabled`)&&faceStateMaybeChanged(this[M])}get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get translate(){for(let e=this[M];e!==null&&e.type===1;e=e.parent){let t=contentAttr(e,`translate`);if(t===null)continue;let n=asciiLowercase$1(t);if(n===``||n===`yes`)return!0;if(n===`no`)return!1}return!0}set translate(e){setAttribute(this[M],`translate`,e?`yes`:`no`)}get hidden(){return contentAttr(this[M],`hidden`)!==null}set hidden(e){typeof e==`string`&&asciiLowercase$1(e)===`until-found`?setAttribute(this[M],`hidden`,`until-found`):e===!1||e===``||e==null||e===0||Number.isNaN(e)?removeAttribute(this[M],`hidden`):setAttribute(this[M],`hidden`,``)}get accessKeyLabel(){let e=contentAttr(this[M],`accesskey`);if(e===null)return``;let t=e.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g,``);return t===``||t.length>2||t.length===2&&t.codePointAt(0)<=65535?``:`Alt+Shift+`+t.toUpperCase()}get draggable(){let e=contentAttr(this[M],`draggable`);if(e!==null){let t=asciiLowercase$1(e);if(t===`true`)return!0;if(t===`false`)return!1}let t=this[M];return t.tag===Y.img||t.tag===Y.a&&contentAttr(t,`href`)!==null}set draggable(e){setAttribute(this[M],`draggable`,e?`true`:`false`)}get spellcheck(){for(let e=this[M];e!==null&&e.type===1;e=e.parent){let t=contentAttr(e,`spellcheck`);if(t===null)continue;let n=asciiLowercase$1(t);if(n===``||n===`true`)return!0;if(n===`false`)return!1}return!0}set spellcheck(e){setAttribute(this[M],`spellcheck`,e?`true`:`false`)}get autocorrect(){return usedAutocorrection(this[M])}set autocorrect(e){setAttribute(this[M],`autocorrect`,e?`on`:`off`)}get contentEditable(){let e=this[M];if(!(e.flags&131072))return`inherit`;let t=contentAttr(e,`contenteditable`);if(t===null)return`inherit`;let n=asciiLowercase$1(t);return n===``||n===`true`?`true`:n===`false`?`false`:n===`plaintext-only`?`plaintext-only`:`inherit`}set contentEditable(e){let t=asciiLowercase$1(String(e));if(t===`inherit`)removeAttribute(this[M],`contenteditable`);else if(t===`true`||t===`false`||t===`plaintext-only`)setAttribute(this[M],`contenteditable`,t);else throw new DOMException(`Failed to set the 'contentEditable' property on 'HTMLElement': The value provided ('${e}') is not one of 'true', 'false', 'plaintext-only', or 'inherit'.`,`SyntaxError`)}get isContentEditable(){return isEditable(this[M])}get innerText(){return getInnerText(this[M])}set innerText(e){let t=e===null?``:String(e);this._replaceAll(t===``?null:renderedTextFragment(t,this[M]))}get outerText(){return getInnerText(this[M])}set outerText(e){let t=this.parentNode;if(t===null)throw new DOMException(`The element has no parent.`,`NoModificationAllowedError`);let n=this.previousSibling,r=this.nextSibling,i=renderedTextFragment(e===null?``:String(e),this[M]);i.hasChildNodes()||i.appendChild(this[M].doc.createTextNode(``)),t.replaceChild(i,this),r!==null&&r.nodeType===3&&mergeWithPrevious(r),n!==null&&n.nodeType===3&&n.nextSibling!==null&&mergeWithPrevious(n.nextSibling)}click(){if(!isActuallyDisabled(this[M])&&!Wu.has(this)){Wu.add(this);try{fireSyntheticClick(this)}finally{Wu.delete(this)}}}showPopover(e){let t=this[M];t.flags|=12,showPopover(t,!0,popoverSource(e))}hidePopover(){hidePopover(this[M],!0,!0,!0,null)}togglePopover(e){let t=null,n=null;typeof e==`boolean`?t=e:typeof e==`object`&&e?(e.force!==void 0&&(t=!!e.force),n=popoverSource(e)):e!=null&&(t=!!e);let r=this[M];r.flags|=12;let i=isPopoverShowing(r);return i&&t!==!0?hidePopover(r,!0,!0,!0,null):t===null||t?showPopover(r,!0,n):checkPopoverValidity(r,i,null),isPopoverShowing(r)}attachInternals(){if(isValueOf(this)!==null)throw new DOMException(`Unable to attach ElementInternals to a customized built-in element.`,`NotSupportedError`);let e=definitionOf(this);if(e===void 0)throw new DOMException(`Unable to attach ElementInternals to non-custom elements.`,`NotSupportedError`);if(e.disableInternals)throw new DOMException(`ElementInternals is disabled by disabledFeature static field.`,`NotSupportedError`);if(Gu.has(this))throw new DOMException(`ElementInternals for the specified element was already attached.`,`NotSupportedError`);let t=new ElementInternals(this);return Gu.set(this,t),t}get offsetParent(){return null}get offsetTop(){return 0}get offsetLeft(){return 0}get offsetWidth(){return 0}get offsetHeight(){return 0}};function inheritsAutocapitalizeAndAutocorrect(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.tag;return t===Y.button||t===Y.fieldset||t===Y.input||t===Y.output||t===Y.select||t===Y.textarea}function autocapitalizeState(e){let t=contentAttr(e,`autocapitalize`);if(t===null)return``;switch(asciiLowercase$1(t)){case``:return``;case`off`:case`none`:return`none`;case`on`:case`sentences`:return`sentences`;case`words`:return`words`;case`characters`:return`characters`}return`sentences`}function ownAutocapitalizationHint(e){let t=autocapitalizeState(e);if(t!==``)return t;if(inheritsAutocapitalizeAndAutocorrect(e)){let t=formOwner(e);if(t!==null)return ownAutocapitalizationHint(t)}return``}function autocorrectState(e){let t=contentAttr(e,`autocorrect`);return t===null?-1:asciiLowercase$1(t)===`off`?0:1}function usedAutocorrection(e){if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===Y.input){let t=inputType(e);if(t===4||t===5||t===6)return!1}let t=autocorrectState(e);if(t!==-1)return t===1;if(inheritsAutocapitalizeAndAutocorrect(e)){let t=formOwner(e);if(t!==null)return autocorrectState(t)!==0}return!0}function computedWritingSuggestions(e){for(let t=e;t!==null&&t.type===1;t=t.parent){let e=contentAttr(t,`writingsuggestions`);if(e!==null)return asciiLowercase$1(e)!==`false`}return!0}function mergeWithPrevious(e){let t=e.previousSibling;t!==null&&t.nodeType===3&&(t.data+=e.data,e.remove())}str(HTMLElement,`title lang accessKey=accesskey`),bool(HTMLElement,`inert`),deferCompatMember(HTMLElement.prototype,`HTMLElement`,`inert`),enumerated(HTMLElement,`dir`,{keywords:[`ltr`,`rtl`,`auto`]}),defineAccessor(HTMLElement,`autocapitalize`,function(){return ownAutocapitalizationHint(this[M])},function(e){setAttribute(this[M],`autocapitalize`,String(e))}),defineAccessor(HTMLElement,`writingSuggestions`,function(){return computedWritingSuggestions(this[M])?`true`:`false`},function(e){setAttribute(this[M],`writingsuggestions`,String(e))}),enumerated(HTMLElement,`enterKeyHint=enterkeyhint`,{keywords:[`enter`,`done`,`go`,`next`,`previous`,`search`,`send`]}),enumerated(HTMLElement,`inputMode=inputmode`,{keywords:[`none`,`text`,`tel`,`url`,`email`,`numeric`,`decimal`,`search`]}),enumerated(HTMLElement,`popover`,{keywords:[`auto`,`manual`,`hint`],missing:null,invalid:`manual`,empty:`auto`});const Gu=/* @__PURE__ */ new WeakMap;function customStatesOf(e){return Gu.get(e)?.[Mr]??null}var ElementInternals=class{[Lr];[Mr];[Qr];constructor(e){if(!(e instanceof HTMLElement)||Gu.has(e))throw TypeError(`Illegal constructor`);this[Lr]=e,this[Mr]=null,this[Qr]=null}get shadowRoot(){let e=this[Lr][U];return e==null||!e[He]?null:e}get states(){return this[Mr]??=new CustomStateSet}get form(){return internalsForm(this[Lr][M])}get labels(){return internalsLabels(this[Lr][M])}get willValidate(){return internalsWillValidate(this[Lr][M])}get validity(){return internalsValidity(this[Lr][M])}get validationMessage(){return internalsValidationMessage(this[Lr][M])}setFormValue(e,t){internalsSetFormValue(this[Lr][M],e,t),this[Qr]=e}setValidity(e,t,n){internalsSetValidity(this[Lr][M],e,t,n)}checkValidity(){return internalsCheckValidity(this[Lr][M])}reportValidity(){return internalsCheckValidity(this[Lr][M],`reportValidity`)}};const Ku=/* @__PURE__ */ new WeakMap;for(let e of zu.split(` `)){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t),r=t===-1?e:e.slice(t+1);Object.defineProperty(ElementInternals.prototype,n,{get(){return Ku.get(this)?.get(r)??null},set(e){let t=Ku.get(this);e==null?t?.delete(r):(t===void 0&&Ku.set(this,t=/* @__PURE__ */ new Map),t.set(r,String(e)))},configurable:!0,enumerable:!0})}const qu=/* @__PURE__ */ new WeakMap;for(let[e,t]of[[`ariaActiveDescendantElement`,!1],[`ariaControlsElements`,!0],[`ariaDescribedByElements`,!0],[`ariaDetailsElements`,!0],[`ariaErrorMessageElements`,!0],[`ariaFlowToElements`,!0],[`ariaLabelledByElements`,!0],[`ariaOwnsElements`,!0]]){let toElement=t=>{if(!(t instanceof Io))throw TypeError(`Failed to set the '${e}' property on 'ElementInternals': Failed to convert value to 'Element'.`);return t};Object.defineProperty(ElementInternals.prototype,e,{get(){let n=qu.get(this)?.get(e);if(n===void 0)return null;if(!t)return n.refs[0]?.deref()??null;let r=[];for(let e of n.refs){let t=e.deref();t!==void 0&&r.push(t)}let i=n.cached;return i!==null&&i.length===r.length&&r.every((e,t)=>i[t]===e)?i:n.cached=Object.freeze(r)},set(n){let r=qu.get(this);if(n==null){r?.delete(e);return}let i;if(!t)i=[new WeakRef(toElement(n))];else{if(typeof n!=`object`||typeof n[Symbol.iterator]!=`function`)throw TypeError(`Failed to set the '${e}' property on 'ElementInternals': The provided value cannot be converted to a sequence.`);i=[];for(let e of n)i.push(new WeakRef(toElement(e)))}r===void 0&&qu.set(this,r=/* @__PURE__ */ new Map),r.set(e,{refs:i,cached:null})},configurable:!0,enumerable:!0})}var CustomStateSet=class extends Set{};const Ju=Symbol(`nonce`);function installHTMLOrSVGElement(e){installEventHandlers(e.prototype,`element`),defineAccessor(e,`nonce`,function(){let e=this[Ju],t=contentAttr(this[M],`nonce`);return e!==void 0&&e[1]===t?e[0]:t??``},function(e){Object.defineProperty(this,Ju,{value:[String(e),contentAttr(this[M],`nonce`)],writable:!0,configurable:!0})}),bool(e,`autofocus`),defineAccessor(e,`tabIndex`,function(){let e=tabIndexValue(this[M]);return Number.isNaN(e)?defaultTabIndex(this[M]):e},function(e){setAttribute(this[M],`tabindex`,String(Number(e)|0))}),Object.defineProperty(e.prototype,"focus",{value:function focus(e){focusElement(this[M],e)},writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"blur",{value:function blur(){blurElement(this[M])},writable:!0,configurable:!0,enumerable:!0})}installHTMLOrSVGElement(HTMLElement);for(let e of[Z,ShadowRoot])Object.hasOwn(e.prototype,`activeElement`)||defineAccessor(e,`activeElement`,function(){return activeElement(this[M])});Object.hasOwn(Z.prototype,`hasFocus`)||Object.defineProperty(Z.prototype,"hasFocus",{value:function hasFocus(){return documentHasFocus(this)},writable:!0,configurable:!0,enumerable:!0});function popoverSource(e){if(typeof e!=`object`||!e)return null;let t=e.source;if(t===void 0)return null;if(!(t instanceof HTMLElement))throw TypeError(`Failed to read the 'source' property from the options: The provided value is not of type 'HTMLElement'.`);return t[M]}const Yu=class HTMLCollection$1 extends Aa{static{__name(this,`HTMLCollection`)}constructor(e,t){super(e,!1,null),Object.defineProperty(this,Ut,{value:t})}_collect(e){this[Ut](this._s.root,e)}};function fnCollection(e,t){return new Yu(e,t)}function sameObject(e,t,n){let r=e[t];return r===void 0&&(r=n(),Object.defineProperty(e,t,{value:r})),r}var HTMLHtmlElement=class extends HTMLElement{};str(HTMLHtmlElement,`version`);var HTMLHeadElement=class extends HTMLElement{},HTMLBaseElement=class extends HTMLElement{get href(){let e=this[M],t=contentAttr(e,`href`)??``,n=URL.parse(t,e.doc.URL);return n===null?t:n.href}set href(e){setAttribute(this[M],`href`,String(e))}};str(HTMLBaseElement,`target`);var HTMLMetaElement=class extends HTMLElement{};str(HTMLMetaElement,`name httpEquiv=http-equiv content media scheme`);var HTMLBodyElement=class extends HTMLElement{};installEventHandlers(HTMLBodyElement.prototype,`body`),strNullEmpty(HTMLBodyElement,`text link vLink=vlink aLink=alink bgColor=bgcolor`),str(HTMLBodyElement,`background`);var HTMLHeadingElement=class extends HTMLElement{};str(HTMLHeadingElement,`align`);var HTMLParagraphElement=class extends HTMLElement{};str(HTMLParagraphElement,`align`);var HTMLHRElement=class extends HTMLElement{};str(HTMLHRElement,`align color size width`),bool(HTMLHRElement,`noShade=noshade`);var HTMLPreElement=class extends HTMLElement{};long(HTMLPreElement,`width`);var HTMLQuoteElement=class extends HTMLElement{};url(HTMLQuoteElement,`cite`);var HTMLOListElement=class extends HTMLElement{};bool(HTMLOListElement,`reversed compact`),long(HTMLOListElement,`start`,1),str(HTMLOListElement,`type`);var HTMLUListElement=class extends HTMLElement{};bool(HTMLUListElement,`compact`),str(HTMLUListElement,`type`);var HTMLMenuElement=class extends HTMLElement{};bool(HTMLMenuElement,`compact`);var HTMLLIElement=class extends HTMLElement{};long(HTMLLIElement,`value`),str(HTMLLIElement,`type`);var HTMLDListElement=class extends HTMLElement{};bool(HTMLDListElement,`compact`);var HTMLDivElement=class extends HTMLElement{};str(HTMLDivElement,`align`);var HTMLDataElement=class extends HTMLElement{};str(HTMLDataElement,`value`);var HTMLTimeElement=class extends HTMLElement{};str(HTMLTimeElement,`dateTime=datetime`);var HTMLSpanElement=class extends HTMLElement{},HTMLBRElement=class extends HTMLElement{};str(HTMLBRElement,`clear`);var HTMLModElement=class extends HTMLElement{};url(HTMLModElement,`cite`),str(HTMLModElement,`dateTime=datetime`);var HTMLPictureElement=class extends HTMLElement{},HTMLSourceElement=class extends HTMLElement{};url(HTMLSourceElement,`src`),str(HTMLSourceElement,`type srcset sizes media`),ulong(HTMLSourceElement,`width height`);var HTMLImageElement=class extends HTMLElement{get complete(){let e=this[M];if(contentAttr(e,`srcset`)!==null)return!1;let t=contentAttr(e,`src`);return t===null||t===``}get naturalWidth(){return 0}get naturalHeight(){return 0}get currentSrc(){return this.src}get x(){return 0}get y(){return 0}get width(){return dimension(this[M],`width`)}set width(e){setAttribute(this[M],`width`,String(clampUlong(e)))}get height(){return dimension(this[M],`height`)}set height(e){setAttribute(this[M],`height`,String(clampUlong(e)))}decode(){return Promise.resolve()}};str(HTMLImageElement,`alt srcset sizes useMap=usemap name align`),strNullEmpty(HTMLImageElement,`border`),url(HTMLImageElement,`src longDesc=longdesc lowsrc`),enumerated(HTMLImageElement,`crossOrigin=crossorigin`,gs),bool(HTMLImageElement,`isMap=ismap`),ulong(HTMLImageElement,`hspace vspace`),enumerated(HTMLImageElement,`referrerPolicy=referrerpolicy`,_s),enumerated(HTMLImageElement,`decoding`,{keywords:[`sync`,`async`,`auto`],missing:`auto`,invalid:`auto`}),enumerated(HTMLImageElement,`loading`,vs),enumerated(HTMLImageElement,`fetchPriority=fetchpriority`,ys);function clampUlong(e){let t=Number(e)>>>0;return t>2147483647?0:t}function dimension(e,t){let n=contentAttr(e,t);if(n===null)return 0;let r=Number.parseInt(n,10);return Number.isFinite(r)&&r>=0?r:0}const Xu=function Image(e,t){if(new.target===void 0)throw TypeError(`Failed to construct 'Image': Please use the 'new' operator.`);let n=currentDocument().createElementNS(ie,`img`);return e!==void 0&&setAttribute(n[M],`width`,String(Number(e)>>>0)),t!==void 0&&setAttribute(n[M],`height`,String(Number(t)>>>0)),n};Xu.prototype=HTMLImageElement.prototype;var HTMLIFrameElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=4}_connectedSteps(){super._connectedSteps(),frameConnected(this)}_disconnectedSteps(){super._disconnectedSteps(),frameDisconnected(this)}get contentDocument(){return frameContentWindow(this)?.document??null}get contentWindow(){return frameContentWindow(this)}getSVGDocument(){return null}};url(HTMLIFrameElement,`src longDesc=longdesc`),str(HTMLIFrameElement,`srcdoc name allow width height align scrolling frameBorder=frameborder`),strNullEmpty(HTMLIFrameElement,`marginHeight=marginheight marginWidth=marginwidth`),tokenList(HTMLIFrameElement,`sandbox`,`sandbox`,[`allow-downloads`,`allow-forms`,`allow-modals`,`allow-orientation-lock`,`allow-pointer-lock`,`allow-popups`,`allow-popups-to-escape-sandbox`,`allow-presentation`,`allow-same-origin`,`allow-scripts`,`allow-top-navigation`,`allow-top-navigation-by-user-activation`,`allow-top-navigation-to-custom-protocols`]),bool(HTMLIFrameElement,`allowFullscreen=allowfullscreen`),enumerated(HTMLIFrameElement,`referrerPolicy=referrerpolicy`,_s),enumerated(HTMLIFrameElement,`loading`,vs);var HTMLEmbedElement=class extends HTMLElement{getSVGDocument(){return null}};url(HTMLEmbedElement,`src`),str(HTMLEmbedElement,`type width height align name`);var HTMLObjectElement=class extends HTMLElement{[T]=``;[Zr]=null;get contentDocument(){return null}get contentWindow(){return null}getSVGDocument(){return null}get form(){let e=formOwner(this[M]);return e===null?null:e.node}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLObjectElement),url(HTMLObjectElement,`data codeBase=codebase`),str(HTMLObjectElement,`type name useMap=usemap width height align archive code standby codeType=codetype`),strNullEmpty(HTMLObjectElement,`border`),bool(HTMLObjectElement,`declare`),ulong(HTMLObjectElement,`hspace vspace`);var HTMLParamElement=class extends HTMLElement{};str(HTMLParamElement,`name value type valueType=valuetype`);var HTMLTrackElement=class extends HTMLElement{static NONE=0;static LOADING=1;static LOADED=2;static ERROR=3;get readyState(){return 0}get track(){return null}};enumerated(HTMLTrackElement,`kind`,{keywords:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],missing:`subtitles`,invalid:`metadata`}),url(HTMLTrackElement,`src`),str(HTMLTrackElement,`srclang label`),bool(HTMLTrackElement,`default`);var HTMLMapElement=class extends HTMLElement{get areas(){return sameObject(this,Zu,()=>fnCollection(this[M],(e,t)=>{for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))n.tag===Y.area&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}};const Zu=Symbol(`areas`);str(HTMLMapElement,`name`);var HTMLCanvasElement=class extends HTMLElement{getContext(e,t){return null}toDataURL(e,t){return`data:,`}toBlob(e){queueElementTask(this,()=>e(null))}transferControlToOffscreen(){throw new DOMException(`OffscreenCanvas is not supported.`,`NotSupportedError`)}captureStream(){throw new DOMException(`captureStream is not supported.`,`NotSupportedError`)}};ulong(HTMLCanvasElement,`width`,300),ulong(HTMLCanvasElement,`height`,150);function childOfType(e,t){for(let n=e.first;n!==null;n=n.next)if(n.type===1&&n.tag===t&&n.ns===`http://www.w3.org/1999/xhtml`)return n;return null}function hierarchyError(e){return new DOMException(e,`HierarchyRequestError`)}function indexError(e){return new DOMException(`The index provided (${e}) is outside the valid range.`,`IndexSizeError`)}const Qu=Symbol(`rows`),$u=Symbol(`tBodies`),ed=Symbol(`cells`);function fillTableRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Y.thead&&n.ns===`http://www.w3.org/1999/xhtml`&&pushRows(n,t);for(let n=e.first;n!==null;n=n.next)n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&(n.tag===Y.tr?t.push(n.node):n.tag===Y.tbody&&pushRows(n,t));for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Y.tfoot&&n.ns===`http://www.w3.org/1999/xhtml`&&pushRows(n,t)}function pushRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Y.tr&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}var HTMLTableElement=class extends HTMLElement{get caption(){let e=childOfType(this[M],Y.caption);return e===null?null:e.node}set caption(e){let t=childOfType(this[M],Y.caption);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this.firstChild)}createCaption(){let e=childOfType(this[M],Y.caption);if(e!==null)return e.node;let t=this[M].doc.createElement(`caption`);return this.insertBefore(t,this.firstChild),t}deleteCaption(){let e=childOfType(this[M],Y.caption);e!==null&&this.removeChild(e.node)}get tHead(){let e=childOfType(this[M],Y.thead);return e===null?null:e.node}set tHead(e){if(e!==null&&e[M].tag!==Y.thead)throw hierarchyError(`Not a thead element.`);let t=childOfType(this[M],Y.thead);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this._afterCaptionAndColgroups())}createTHead(){let e=childOfType(this[M],Y.thead);if(e!==null)return e.node;let t=this[M].doc.createElement(`thead`);return this.insertBefore(t,this._afterCaptionAndColgroups()),t}deleteTHead(){let e=childOfType(this[M],Y.thead);e!==null&&this.removeChild(e.node)}get tFoot(){let e=childOfType(this[M],Y.tfoot);return e===null?null:e.node}set tFoot(e){if(e!==null&&e[M].tag!==Y.tfoot)throw hierarchyError(`Not a tfoot element.`);let t=childOfType(this[M],Y.tfoot);t!==null&&this.removeChild(t.node),e!==null&&this.appendChild(e)}createTFoot(){let e=childOfType(this[M],Y.tfoot);return e===null?this.appendChild(this[M].doc.createElement(`tfoot`)):e.node}deleteTFoot(){let e=childOfType(this[M],Y.tfoot);e!==null&&this.removeChild(e.node)}get tBodies(){return sameObject(this,$u,()=>fnCollection(this[M],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Y.tbody&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}createTBody(){let e=this[M].doc.createElement(`tbody`),t=null;for(let e=this[M].first;e!==null;e=e.next)e.type===1&&e.tag===Y.tbody&&e.ns===`http://www.w3.org/1999/xhtml`&&(t=e);return this.insertBefore(e,t===null||t.next===null?null:t.next.node),e}get rows(){return sameObject(this,Qu,()=>fnCollection(this[M],fillTableRows))}insertRow(e=-1){e=Number(e)|0;let t=this.rows,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc,i=r.createElement(`tr`);if(n===0&&childOfType(this[M],Y.tbody)===null)this.appendChild(r.createElement(`tbody`)).appendChild(i);else if(n===0){let e=null;for(let t=this[M].first;t!==null;t=t.next)t.type===1&&t.tag===Y.tbody&&t.ns===`http://www.w3.org/1999/xhtml`&&(e=t.node);e.appendChild(i)}else if(e===-1||e===n)t.item(n-1).parentNode.appendChild(i);else{let n=t.item(e);n.parentNode.insertBefore(i,n)}return i}deleteRow(e){e=Number(e)|0;let t=this.rows,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}_afterCaptionAndColgroups(){for(let e=this[M].first;e!==null;e=e.next)if(e.type===1&&(e.tag!==Y.caption&&e.tag!==Y.colgroup||e.ns!==`http://www.w3.org/1999/xhtml`))return e.node;return null}};str(HTMLTableElement,`align border frame rules summary width`),strNullEmpty(HTMLTableElement,`bgColor=bgcolor cellPadding=cellpadding cellSpacing=cellspacing`);var HTMLTableCaptionElement=class extends HTMLElement{};str(HTMLTableCaptionElement,`align`);var HTMLTableColElement=class extends HTMLElement{};clampedUlong(HTMLTableColElement,`span`,`span`,1,1,1e3),str(HTMLTableColElement,`align ch=char chOff=charoff vAlign=valign width`);var HTMLTableSectionElement=class extends HTMLElement{get rows(){return sameObject(this,Qu,()=>fnCollection(this[M],pushRows))}insertRow(e=-1){e=Number(e)|0;let t=this.rows,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc.createElement(`tr`);return e===-1||e===n?this.appendChild(r):this.insertBefore(r,t.item(e)),r}deleteRow(e){e=Number(e)|0;let t=this.rows,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}};str(HTMLTableSectionElement,`align ch=char chOff=charoff vAlign=valign`);var HTMLTableRowElement=class extends HTMLElement{get rowIndex(){let e=this[M].parent;if(e===null)return-1;let t=null;if(e.tag===Y.table&&e.ns===`http://www.w3.org/1999/xhtml`?t=e:(e.tag===Y.thead||e.tag===Y.tbody||e.tag===Y.tfoot)&&e.ns===`http://www.w3.org/1999/xhtml`&&e.parent!==null&&e.parent.tag===Y.table&&(t=e.parent),t===null)return-1;let n=[];return fillTableRows(t,n),n.indexOf(this)}get sectionRowIndex(){let e=this[M].parent;if(e===null)return-1;let t=[];return e.tag===Y.table?fillTableRows(e,t):pushRows(e,t),t.indexOf(this)}get cells(){return sameObject(this,ed,()=>fnCollection(this[M],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&(n.tag===Y.td||n.tag===Y.th)&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}insertCell(e=-1){e=Number(e)|0;let t=this.cells,n=t.length;if(e<-1||e>n)throw indexError(e);let r=this[M].doc.createElement(`td`);return e===-1||e===n?this.appendChild(r):this.insertBefore(r,t.item(e)),r}deleteCell(e){e=Number(e)|0;let t=this.cells,n=t.length;if(e===-1){if(n===0)return;e=n-1}if(e<0||e>=n)throw indexError(e);t.item(e).remove()}};str(HTMLTableRowElement,`align ch=char chOff=charoff vAlign=valign`),strNullEmpty(HTMLTableRowElement,`bgColor=bgcolor`);var HTMLTableCellElement=class extends HTMLElement{get cellIndex(){let e=this[M].parent;if(e===null||e.tag!==Y.tr)return-1;let t=0;for(let n=e.first;n!==null;n=n.next){if(n===this[M])return t;n.type===1&&(n.tag===Y.td||n.tag===Y.th)&&n.ns===`http://www.w3.org/1999/xhtml`&&t++}return-1}};clampedUlong(HTMLTableCellElement,`colSpan`,`colspan`,1,1,1e3),clampedUlong(HTMLTableCellElement,`rowSpan`,`rowspan`,1,0,65534),str(HTMLTableCellElement,`headers abbr axis align ch=char chOff=charoff vAlign=valign width height`),strNullEmpty(HTMLTableCellElement,`bgColor=bgcolor`),enumerated(HTMLTableCellElement,`scope`,{keywords:[`row`,`col`,`rowgroup`,`colgroup`]}),bool(HTMLTableCellElement,`noWrap=nowrap`);var HTMLDirectoryElement=class extends HTMLElement{};bool(HTMLDirectoryElement,`compact`);var HTMLFontElement=class extends HTMLElement{};strNullEmpty(HTMLFontElement,`color`),str(HTMLFontElement,`face size`);var HTMLFrameSetElement=class extends HTMLElement{};installEventHandlers(HTMLFrameSetElement.prototype,`body`),str(HTMLFrameSetElement,`cols rows`);var HTMLFrameElement=class extends HTMLElement{get contentDocument(){return null}get contentWindow(){return null}};str(HTMLFrameElement,`name scrolling frameBorder=frameborder`),strNullEmpty(HTMLFrameElement,`marginHeight=marginheight marginWidth=marginwidth`),url(HTMLFrameElement,`src longDesc=longdesc`),bool(HTMLFrameElement,`noResize=noresize`);var HTMLMarqueeElement=class extends HTMLElement{start(){}stop(){}};str(HTMLMarqueeElement,`behavior bgColor=bgcolor direction height width`),ulong(HTMLMarqueeElement,`hspace vspace`),long(HTMLMarqueeElement,`loop`,-1),ulong(HTMLMarqueeElement,`scrollAmount=scrollamount`,6),ulong(HTMLMarqueeElement,`scrollDelay=scrolldelay`,85),bool(HTMLMarqueeElement,`trueSpeed=truespeed`);var HTMLUnknownElement=class extends HTMLElement{};function linkURL(e){let t=contentAttr(e,`href`);return t===null?null:URL.parse(t,e.doc.baseURI)}function updateHref(e,t){setAttribute(e,`href`,t.href)}const td=[`noreferrer`,`noopener`,`opener`];function installHyperlinkUtils(e){let t=e.prototype,define=(e,n,r)=>{Object.defineProperty(t,e,{get(){let e=this[M];return n(linkURL(e),e)},set:r?function(e){let t=this[M],n=linkURL(t);n!==null&&r(n,String(e))&&updateHref(t,n)}:void 0,configurable:!0,enumerable:!0})};Object.defineProperty(t,"href",{get(){let e=this[M],t=contentAttr(e,`href`);if(t===null)return``;let n=URL.parse(t,e.doc.baseURI);return n===null?t:n.href},set(e){setAttribute(this[M],`href`,String(e))},configurable:!0,enumerable:!0}),Object.defineProperty(t,"toString",{value:function toString(){return this.href},writable:!0,configurable:!0,enumerable:!0}),define(`origin`,e=>e===null?``:e.origin),define(`protocol`,e=>e===null?`:`:e.protocol,(e,t)=>(e.protocol=t+`:`,!0)),define(`username`,e=>e===null?``:e.username,(e,t)=>e.host===``||e.protocol===`file:`?!1:(e.username=t,!0)),define(`password`,e=>e===null?``:e.password,(e,t)=>e.host===``||e.protocol===`file:`?!1:(e.password=t,!0)),define(`host`,e=>e===null?``:e.host,(e,t)=>(e.host=t,!0)),define(`hostname`,e=>e===null?``:e.hostname,(e,t)=>(e.hostname=t,!0)),define(`port`,e=>e===null?``:e.port,(e,t)=>(e.port=t,!0)),define(`pathname`,e=>e===null?``:e.pathname,(e,t)=>(e.pathname=t,!0)),define(`search`,e=>e===null?``:e.search,(e,t)=>(e.search=t,!0)),define(`hash`,e=>e===null?``:e.hash,(e,t)=>(e.hash=t,!0))}function followHyperlink(e){let t=e[M],n=linkURL(t);if(n===null)return;let r=t.doc[q];if(r===null||r.location===void 0)return;let i=contentAttr(t,`target`);if(i!==null&&i!==``&&i.toLowerCase()!==`_self`||contentAttr(t,`download`)!==null)return;let a=URL.parse(t.doc.URL);if(a===null)return;let o=new URL(n.href);if(o.hash=``,a.hash=``,o.href===a.href&&n.href.indexOf(`#`)!==-1)try{r.location.hash=n.hash}catch{}}function reportFollowedHyperlink(e){if(!notImplementedActive()||e.name!==`a`&&!(e.flags&1))return;let t=e.doc[q];if(t===null)return;let n=contentAttr(e,`target`);if(n===null){let t=querySelector(e.doc[M],`base[target]`);n=t===null?``:contentAttr(t,`target`)??``}let r=n.toLowerCase(),i=null;if(r===``||r===`_self`)i=t;else if(r===`_parent`)i=t[Hn]??t;else if(r===`_top`)for(i=t;i[Hn]!==null;)i=i[Hn];if(i===null)return;let a=linkURL(e);if(a===null||a.protocol===`javascript:`)return;let o=i;t._task(()=>{let e=new URL(o[G].href),t=new URL(a.href);e.hash=``,t.hash=``,e.href!==t.href&&reportNotImplemented(o,Hl)},0)}var HTMLAnchorElement=class extends HTMLElement{get text(){let e=this[M],t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}set text(e){this.textContent=e}get _hasActivationBehavior(){return contentAttr(this[M],`href`)!==null}_activationBehavior(e){contentAttr(this[M],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[M]))}};installHyperlinkUtils(HTMLAnchorElement),str(HTMLAnchorElement,`target download ping rel hreflang type coords charset name rev shape`),tokenList(HTMLAnchorElement,`relList`,`rel`,td),enumerated(HTMLAnchorElement,`referrerPolicy=referrerpolicy`,_s);var HTMLAreaElement=class extends HTMLElement{get _hasActivationBehavior(){return contentAttr(this[M],`href`)!==null}_activationBehavior(e){contentAttr(this[M],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[M]))}};installHyperlinkUtils(HTMLAreaElement),str(HTMLAreaElement,`alt coords shape target download ping rel hreflang type`),tokenList(HTMLAreaElement,`relList`,`rel`,td),enumerated(HTMLAreaElement,`referrerPolicy=referrerpolicy`,_s),bool(HTMLAreaElement,`noHref=nohref`);const nd={load:stubbedMethod(`HTMLMediaElement`,`load`),play:stubbedMethod(`HTMLMediaElement`,`play`),pause:stubbedMethod(`HTMLMediaElement`,`pause`),addTextTrack:stubbedMethod(`HTMLMediaElement`,`addTextTrack`)},windowOf=e=>e[M].doc[q];var MediaState=class{paused=!0;currentTime=0;volume=1;muted=null;playbackRate=1;defaultPlaybackRate=1;ended=!1;seeking=!1;preservesPitch=!0;srcObject=null};const rd=Symbol(`media`);function state$1(e){let t=e[rd];return t===void 0&&(t=new MediaState,Object.defineProperty(e,rd,{value:t})),t}__name(state$1,`state`);var TimeRanges=class{get length(){return 0}start(e){throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (0).`,`IndexSizeError`)}end(e){throw new DOMException(`The index provided (${e}) is greater than or equal to the maximum bound (0).`,`IndexSizeError`)}},MediaError=class{static MEDIA_ERR_ABORTED=1;static MEDIA_ERR_NETWORK=2;static MEDIA_ERR_DECODE=3;static MEDIA_ERR_SRC_NOT_SUPPORTED=4},HTMLMediaElement=class extends HTMLElement{static NETWORK_EMPTY=0;static NETWORK_IDLE=1;static NETWORK_LOADING=2;static NETWORK_NO_SOURCE=3;static HAVE_NOTHING=0;static HAVE_METADATA=1;static HAVE_CURRENT_DATA=2;static HAVE_FUTURE_DATA=3;static HAVE_ENOUGH_DATA=4;get error(){return null}get currentSrc(){return this.src}get srcObject(){return state$1(this).srcObject}set srcObject(e){state$1(this).srcObject=e}get networkState(){return 0}get buffered(){return new TimeRanges}get readyState(){return 0}get seeking(){return state$1(this).seeking}get currentTime(){return state$1(this).currentTime}set currentTime(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`The provided double value is non-finite.`);state$1(this).currentTime=t}fastSeek(e){this.currentTime=e}get duration(){return NaN}getStartDate(){return/* @__PURE__ */ new Date(NaN)}get paused(){return state$1(this).paused}get defaultPlaybackRate(){return state$1(this).defaultPlaybackRate}set defaultPlaybackRate(e){state$1(this).defaultPlaybackRate=Number(e),fireEvent(this,`ratechange`)}get playbackRate(){return state$1(this).playbackRate}set playbackRate(e){state$1(this).playbackRate=Number(e),fireEvent(this,`ratechange`)}get preservesPitch(){return state$1(this).preservesPitch}set preservesPitch(e){state$1(this).preservesPitch=!!e}get played(){return new TimeRanges}get seekable(){return new TimeRanges}get ended(){return state$1(this).ended}get volume(){return state$1(this).volume}set volume(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`The provided double value is non-finite.`);if(t<0||t>1)throw new DOMException(`The volume provided (${t}) is outside the range [0, 1].`,`IndexSizeError`);let n=state$1(this);n.volume!==t&&(n.volume=t,fireEvent(this,`volumechange`))}get muted(){return state$1(this).muted??contentAttr(this[M],`muted`)!==null}set muted(e){let t=state$1(this),n=!!e;this.muted===n?t.muted=n:(t.muted=n,fireEvent(this,`volumechange`))}canPlayType(e){return``}load(){reportNotImplemented(windowOf(this),nd.load);let e=state$1(this),t=!e.paused;e.currentTime=0,e.ended=!1,t&&(e.paused=!0,queueElementTask(this,()=>fireEvent(this,`pause`))),queueElementTask(this,()=>fireEvent(this,`emptied`))}play(){reportNotImplemented(windowOf(this),nd.play);let e=state$1(this);return e.paused&&(e.paused=!1,e.ended=!1,queueElementTask(this,()=>{fireEvent(this,`play`),fireEvent(this,`playing`)})),Promise.resolve()}pause(){reportNotImplemented(windowOf(this),nd.pause);let e=state$1(this);e.paused||(e.paused=!0,queueElementTask(this,()=>{fireEvent(this,`timeupdate`),fireEvent(this,`pause`)}))}get textTracks(){return[]}get audioTracks(){return[]}get videoTracks(){return[]}addTextTrack(){throw reportNotImplemented(windowOf(this),nd.addTextTrack),new DOMException(`Text tracks are not supported.`,`NotSupportedError`)}setMediaKeys(){return Promise.resolve()}get mediaKeys(){return null}setSinkId(){return Promise.resolve()}get sinkId(){return``}};url(HTMLMediaElement,`src`),enumerated(HTMLMediaElement,`crossOrigin=crossorigin`,gs),enumerated(HTMLMediaElement,`preload`,{keywords:[`none`,`metadata`,`auto`],missing:`metadata`,invalid:`metadata`,empty:`auto`}),enumerated(HTMLMediaElement,`loading`,vs),bool(HTMLMediaElement,`autoplay loop controls defaultMuted=muted disableRemotePlayback=disableremoteplayback`);var HTMLAudioElement=class extends HTMLMediaElement{},HTMLVideoElement=class extends HTMLMediaElement{get videoWidth(){return 0}get videoHeight(){return 0}getVideoPlaybackQuality(){return{creationTime:performance.now(),droppedVideoFrames:0,totalVideoFrames:0}}requestPictureInPicture(){return Promise.reject(new DOMException(`Picture-in-Picture is not supported.`,`NotSupportedError`))}requestVideoFrameCallback(e){return 0}cancelVideoFrameCallback(e){}};ulong(HTMLVideoElement,`width height`),url(HTMLVideoElement,`poster`),bool(HTMLVideoElement,`playsInline=playsinline disablePictureInPicture=disablepictureinpicture`);const id=function Audio(e){if(new.target===void 0)throw TypeError(`Failed to construct 'Audio': Please use the 'new' operator.`);let t=currentDocument().createElementNS(ie,`audio`);return setAttribute(t[M],`preload`,`auto`),e!==void 0&&setAttribute(t[M],`src`,String(e)),t};id.prototype=HTMLAudioElement.prototype;const ad=/* @__PURE__ */ new WeakMap;function queueDetailsToggle(e,t,n){let r=ad.get(e);r!==void 0&&(t=r.oldState,r.cancelled=!0);let i={oldState:t,cancelled:!1};ad.set(e,i),queueElementTask(e,()=>{i.cancelled||(ad.delete(e),fireToggleEvent(e.node,`toggle`,t,n,!1))})}function nameGroupOthers(e,t,n){let r=treeRoot(e);for(let i=r.first;i!==null;i=nextInTree(i,r))i!==e&&i.type===1&&i.tag===Y.details&&i.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(i,`name`)===t&&n.push(i);return n}var HTMLDetailsElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;let i=this[M];if(e===`name`)ensureClosingGiven(i);else if(e===`open`){if(t===null&&n!==null){queueDetailsToggle(i,`closed`,`open`);let e=contentAttr(i,`name`);if(e!==null&&e!==``)for(let t of nameGroupOthers(i,e,[]))contentAttr(t,`open`)!==null&&removeAttribute(t,`open`)}else t!==null&&n===null&&queueDetailsToggle(i,`open`,`closed`)}}_connectedSteps(){super._connectedSteps(),ensureClosingGiven(this[M])}};function ensureClosingGiven(e){if(contentAttr(e,`open`)===null)return;let t=contentAttr(e,`name`);if(t!==null&&t!==``){for(let n of nameGroupOthers(e,t,[]))if(contentAttr(n,`open`)!==null){removeAttribute(e,`open`);return}}}bool(HTMLDetailsElement,`open`),str(HTMLDetailsElement,`name`);const od=HTMLElement,sd=class HTMLElement extends od{get _hasActivationBehavior(){return isSummaryForParentDetails(this[M])}_activationBehavior(e){let t=this[M];if(!isSummaryForParentDetails(t))return;let n=e?.target?.[M];if(n!==void 0&&inInteractiveContent(n,t))return;let r=t.parent;outsideCEReactions(()=>{contentAttr(r,`open`)===null?setAttribute(r,`open`,``):removeAttribute(r,`open`)})}};function inInteractiveContent(e,t){for(let n=e;n!==null&&n!==t;n=n.parent)if(n.type===1){if(n.ns===`http://www.w3.org/2000/svg`){if(n.name===`a`&&(contentAttr(n,`href`)!==null||n.attrs?.some(e=>e.localName===`href`)))return!0}else if(n.ns===`http://www.w3.org/1999/xhtml`)switch(n.tag){case Y.a:if(contentAttr(n,`href`)!==null)return!0;break;case Y.audio:case Y.video:if(contentAttr(n,`controls`)!==null)return!0;break;case Y.img:if(contentAttr(n,`usemap`)!==null)return!0;break;case Y.input:if(contentAttr(n,`type`)?.toLowerCase()!==`hidden`)return!0;break;case Y.button:case Y.details:case Y.embed:case Y.iframe:case Y.label:case Y.select:case Y.textarea:return!0}}return!1}const cd=/* @__PURE__ */ new WeakMap;function dialogRecord(e){let t=cd.get(e);return t===void 0&&(t={returnValue:``,toggleTracker:null,closeWatcher:null,requestCloseReturnValue:null,requestCloseSource:null,enableCloseWatcherForRequestClose:!1},cd.set(e,t)),t}function nodeOf(e){return e===null?null:e.node}function queueDialogToggle(e,t,n,r){let i=dialogRecord(e);i.toggleTracker!==null&&(t=i.toggleTracker.oldState,i.toggleTracker.cancelled=!0,i.toggleTracker=null);let a={oldState:t,cancelled:!1};i.toggleTracker=a,queueElementTask(e,()=>{a.cancelled||(fireToggleEvent(e.node,`toggle`,t,n,!1,nodeOf(r)),i.toggleTracker===a&&(i.toggleTracker=null))})}function computedClosedBy(e){let t=contentAttr(e,`closedby`)?.toLowerCase();return t===`any`||t===`closerequest`||t===`none`?t:matchesModal(e)?`closerequest`:`none`}var HTMLDialogElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}get returnValue(){return cd.get(this[M])?.returnValue??``}set returnValue(e){dialogRecord(this[M]).returnValue=String(e)}get closedBy(){return computedClosedBy(this[M])}set closedBy(e){setAttribute(this[M],`closedby`,String(e))}show(){let e=this[M];if(contentAttr(e,`open`)!==null){if(!matchesModal(e))return;throw new DOMException(`The dialog is already open as a modal dialog.`,`InvalidStateError`)}if(!fireToggleEvent(this,`beforetoggle`,`closed`,`open`,!0)||contentAttr(e,`open`)!==null)return;queueDialogToggle(e,`closed`,`open`,null),setAttribute(e,`open`,``),setPreviouslyFocused(e,e.doc[A]);let t=e.doc;hidePopoversUntil(t,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}showModal(){showModalDialog(this[M],null)}close(e){closeDialog(this[M],e===void 0?null:String(e),null)}requestClose(e){requestCloseDialog(this[M],e===void 0?null:String(e),null)}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null||e!==`open`)return;let i=this[M];n===null&&t!==null&&dialogCleanupSteps(i),isFullyActive(i.doc)&&i.flags&1&&n!==null&&t===null&&dialogSetupSteps(i)}_connectedSteps(){super._connectedSteps();let e=this[M];isFullyActive(e.doc)&&contentAttr(e,`open`)!==null&&e.flags&1&&dialogSetupSteps(e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[M];contentAttr(e,`open`)!==null&&dialogCleanupSteps(e),removeFromTopLayer(e),setModal(e,!1)}};bool(HTMLDialogElement,`open`);function showModalDialog(e,t){let n=e.node;if(contentAttr(e,`open`)!==null){if(matchesModal(e))return;throw new DOMException(`The dialog is already open as a non-modal dialog.`,`InvalidStateError`)}if(!isFullyActive(e.doc))throw new DOMException(`The dialog's document is not fully active.`,`InvalidStateError`);if(!(e.flags&1))throw new DOMException(`The dialog is not connected.`,`InvalidStateError`);if(isPopoverShowing(e))throw new DOMException(`The dialog is already open as a popover.`,`InvalidStateError`);if(!fireToggleEvent(n,`beforetoggle`,`closed`,`open`,!0,nodeOf(t))||contentAttr(e,`open`)!==null||!(e.flags&1)||isPopoverShowing(e))return;queueDialogToggle(e,`closed`,`open`,t),setAttribute(e,`open`,``),setModal(e,!0);let r=e.doc,i=r[A];isInTopLayer(e)||addToTopLayer(e),i!==null&&isInert(i)&&blurElement(i),setPreviouslyFocused(e,i),hidePopoversUntil(r,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}function closeDialog(e,t,n){let r=e.node;if(contentAttr(e,`open`)===null||(fireToggleEvent(r,`beforetoggle`,`open`,`closed`,!1,nodeOf(n)),contentAttr(e,`open`)===null))return;queueDialogToggle(e,`open`,`closed`,n),removeAttribute(e,`open`);let i=matchesModal(e);i&&removeFromTopLayer(e),setModal(e,!1);let a=dialogRecord(e);t!==null&&(a.returnValue=t),a.requestCloseReturnValue=null,a.requestCloseSource=null;let o=getPreviouslyFocused(e);if(o!==null){setPreviouslyFocused(e,null);let t=e.doc[A];(t!==null&&isShadowIncludingInclusiveAncestor(e,t)||i)&&focusElement(o,{preventScroll:!0})}queueElementTask(r,()=>fireEvent(r,`close`))}function requestCloseDialog(e,t,n){if(contentAttr(e,`open`)===null||!(e.flags&1)||!isFullyActive(e.doc))return;let r=dialogRecord(e);if(r.closeWatcher!==null){r.enableCloseWatcherForRequestClose=!0,r.requestCloseReturnValue=t,r.requestCloseSource=n;try{requestCloseWatcher(r.closeWatcher,!1)}finally{r.enableCloseWatcherForRequestClose=!1}}}function dialogSetupSteps(e){let t=openDialogsList(e.doc);if(t.includes(e))return;t.push(e);let n=dialogRecord(e);n.closeWatcher===null&&(n.closeWatcher=establishCloseWatcher(e.doc,t=>fireEvent(e.node,`cancel`,!1,t),()=>closeDialog(e,n.requestCloseReturnValue,n.requestCloseSource),()=>n.enableCloseWatcherForRequestClose||computedClosedBy(e)!==`none`))}function dialogCleanupSteps(e){let t=openDialogsList(e.doc),n=t.indexOf(e);n!==-1&&t.splice(n,1);let r=cd.get(e);r!==void 0&&r.closeWatcher!==null&&(destroyCloseWatcher(r.closeWatcher),r.closeWatcher=null)}function dialogFocusingSteps(e){let t=null;contentAttr(e,`autofocus`)!==null&&(t=e),t===null&&(t=focusDelegate(e)),t===null&&(t=e),focusElement(t)}function submitFormToDialog(e,t){let n=t===e?null:contentAttr(t,`formmethod`);if(n===null&&(n=contentAttr(e,`method`)),n?.toLowerCase()!==`dialog`)return!1;let r=e.parent;for(;r!==null&&(r.type!==1||r.tag!==Y.dialog||r.ns!==`http://www.w3.org/1999/xhtml`);)r=r.parent;if(r===null)return!0;let i;if(t===e)i=``;else if(t.tag===Y.input&&contentAttr(t,`type`)?.toLowerCase()===`image`){let e=Jl.get(t);i=e===void 0?`0,0`:`${e.x},${e.y}`}else i=contentAttr(t,`value`);return closeDialog(r,i,null),!0}function dialogCommandSteps(e,t,n){if(isPopoverShowing(e))return;let r=contentAttr(e,`open`)!==null,i=contentAttr(t,`value`);if(n===`close`&&r)closeDialog(e,i,t);else if(n===`request-close`&&r)requestCloseDialog(e,i,t);else if(n===`show-modal`&&!r)try{showModalDialog(e,t)}catch{}}function nearestClickedDialog(e){for(let t=e;t!==null;t=flatParent(t))if(t.tag===Y.dialog&&t.ns===`http://www.w3.org/1999/xhtml`&&contentAttr(t,`open`)!==null)return t;return null}function lightDismissOpenDialogs(e,t,n){let r=openDialogsList(e);if(r.length===0)return;let i=nearestClickedDialog(t);if(n===`pointerdown`){dialogPointerdownTarget(e,i);return}let a=i===dialogPointerdownTarget(e);if(dialogPointerdownTarget(e,null),!a)return;let o=r[r.length-1];if(i===o||computedClosedBy(o)!==`any`)return;let s=cd.get(o);s?.closeWatcher&&requestCloseWatcher(s.closeWatcher,!1)}function isShadowIncludingInclusiveAncestor(e,t){for(let n=t;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[j];n=e===null?null:e[M]}else n=null}return!1}setTopLayerDialogHooks(dialogFocusingSteps,lightDismissOpenDialogs),setDialogCommandSteps(dialogCommandSteps),setDialogSubmission(submitFormToDialog);const ld=/* @__PURE__ */ new WeakMap;function templateContentsOwner(e){let t=ld.get(e);if(t!==void 0)return t;let n=e[N]?Z._createHTML(null):new Z;return e[N]||(n[ft]=e[ft]),ld.set(n,n),ld.set(e,n),n}const ud=Symbol(`content`);var HTMLTemplateElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=xe}get content(){let e=this[ud];return e===void 0&&(e=new DocumentFragment(templateContentsOwner(this[M].doc)),e[j]=this,Object.defineProperty(this,ud,{value:e,writable:!0})),e}_cloningSteps(e,t){if(super._cloningSteps(e,t),!t)return;let n=this[ud];if(n===void 0||n[M].first===null)return;let r=e.content,i=r[M].doc;for(let e=n[M].first;e!==null;e=e.next)appendDetached(cloneNode(e,i,!0),r[M])}_adoptingSteps(e){super._adoptingSteps(e);let t=this[ud];t!==void 0&&templateContentsOwner(this[M].doc).adoptNode(t)}};enumerated(HTMLTemplateElement,`shadowRootMode=shadowrootmode`,{keywords:[`open`,`closed`]}),enumerated(HTMLTemplateElement,`shadowRootSlotAssignment=shadowrootslotassignment`,{keywords:[`named`,`manual`],missing:`named`,invalid:`named`}),bool(HTMLTemplateElement,`shadowRootDelegatesFocus=shadowrootdelegatesfocus shadowRootClonable=shadowrootclonable shadowRootSerializable=shadowrootserializable`);var HTMLSlotElement=class extends HTMLElement{assignedNodes(e){return assignedNodes(this[M],!!e?.flatten).map(e=>e.node)}assignedElements(e){return assignedElements(this[M],!!e?.flatten).map(e=>e.node)}assign(...e){let t=[];for(let n of e){let e=n?.[M];if(e===void 0||e.type!==1&&e.type!==3)throw TypeError(`Failed to execute 'assign' on 'HTMLSlotElement': parameter is not of type '(Element or Text)'.`);t.push(e)}assignManually(this[M],t)}};str(HTMLSlotElement,`name`);const dd={createSheet:null,removeSheet:null,createLinkSheet:null},fd=Symbol(`sheet`);function getSheet(e){return e[fd]??null}function setSheet(e,t){Object.defineProperty(e,fd,{value:t,writable:!0,configurable:!0})}function childTextContent(e){let t=``;for(let n=e.first;n!==null;n=n.next)(n.type===3||n.type===4)&&(t+=n.data);return t}function removeAssociatedSheet(e){let t=getSheet(e);t!==null&&(setSheet(e,null),dd.removeSheet?.(e[M],t))}function updateStyleBlock(e){let t=e[M];if(removeAssociatedSheet(e),!(t.flags&1))return;let n=contentAttr(t,`type`);if(n!==null&&n!==``&&n.toLowerCase()!==`text/css`)return;let r=dd.createSheet;r===null?t.doc[Pr]++:setSheet(e,r(t,childTextContent(t),contentAttr(t,`media`)??``))}var HTMLStyleElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=28}_connectedSteps(){super._connectedSteps(),updateStyleBlock(this)}_disconnectedSteps(){super._disconnectedSteps(),updateStyleBlock(this)}_childrenChangedSteps(){updateStyleBlock(this)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`type`||e===`media`)&&updateStyleBlock(this)}get sheet(){return getSheet(this)}get disabled(){let e=getSheet(this);return e!==null&&e.disabled===!0}set disabled(e){let t=getSheet(this);t!==null&&(t.disabled=!!e)}};str(HTMLStyleElement,`media type`),tokenList(HTMLStyleElement,`blocking`,`blocking`,[`render`]);function isStylesheetLink(e){let t=contentAttr(e,`rel`);return t!==null&&/(?:^|[\t\n\f\r ])stylesheet(?:$|[\t\n\f\r ])/i.test(t)&&!/(?:^|[\t\n\f\r ])alternate(?:$|[\t\n\f\r ])/i.test(t)}function updateLinkSheet(e){let t=e[M];if(removeAssociatedSheet(e),!(t.flags&1)||!isStylesheetLink(t)||contentAttr(t,`disabled`)!==null)return;let n=dd.createLinkSheet;if(n===null)return;let r=contentAttr(t,`href`);if(r===null||r===``)return;let i=n(t,e.href,contentAttr(t,`media`)??``);i!==null&&setSheet(e,i)}var HTMLLinkElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}_connectedSteps(){super._connectedSteps(),updateLinkSheet(this)}_disconnectedSteps(){super._disconnectedSteps(),removeAssociatedSheet(this)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`rel`||e===`href`||e===`media`||e===`disabled`||e===`type`)&&updateLinkSheet(this)}get sheet(){return getSheet(this)}};url(HTMLLinkElement,`href`),enumerated(HTMLLinkElement,`crossOrigin=crossorigin`,gs),str(HTMLLinkElement,`rel media integrity hreflang type imageSrcset=imagesrcset imageSizes=imagesizes charset rev target`),enumerated(HTMLLinkElement,`as`,{keywords:[`fetch`,`audio`,`audioworklet`,`document`,`embed`,`font`,`frame`,`iframe`,`image`,`json`,`manifest`,`object`,`paintworklet`,`report`,`script`,`serviceworker`,`sharedworker`,`style`,`track`,`video`,`webidentity`,`worker`,`xslt`]}),tokenList(HTMLLinkElement,`relList`,`rel`,[`alternate`,`dns-prefetch`,`expect`,`icon`,`manifest`,`modulepreload`,`next`,`pingback`,`preconnect`,`prefetch`,`preload`,`search`,`stylesheet`]),tokenList(HTMLLinkElement,`sizes`,`sizes`),tokenList(HTMLLinkElement,`blocking`,`blocking`,[`render`]),enumerated(HTMLLinkElement,`referrerPolicy=referrerpolicy`,_s),enumerated(HTMLLinkElement,`fetchPriority=fetchpriority`,ys),bool(HTMLLinkElement,`disabled`);const pd=Symbol(`nonBlocking`);var HTMLScriptElement=class extends HTMLElement{static supports(e){let t=String(e);return t===`classic`||t===`module`||t===`importmap`||t===`speculationrules`}get text(){return childTextContent(this[M])}set text(e){this.textContent=String(e)}get async(){return(this[pd]??!0)||contentAttr(this[M],`async`)!==null}set async(e){Object.defineProperty(this,pd,{value:!1,writable:!0,configurable:!0}),e?this.setAttribute(`async`,``):this.removeAttribute(`async`)}};url(HTMLScriptElement,`src`),str(HTMLScriptElement,`type charset event htmlFor=for integrity`),bool(HTMLScriptElement,`noModule=nomodule defer`),enumerated(HTMLScriptElement,`crossOrigin=crossorigin`,gs),enumerated(HTMLScriptElement,`referrerPolicy=referrerpolicy`,_s),enumerated(HTMLScriptElement,`fetchPriority=fetchpriority`,ys),tokenList(HTMLScriptElement,`blocking`,`blocking`,[`render`]);var HTMLTitleElement=class extends HTMLElement{get text(){return childTextContent(this[M])}set text(e){this.textContent=String(e)}};function stripAndCollapse(e){return e.replace(/[\t\n\f\r ]+/g,` `).replace(/^ | $/g,``)}function titleElement(e){let t=e[M];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.tag===Y.title&&e.ns===`http://www.w3.org/1999/xhtml`)return e;return null}function svgTitle(e){for(let t=e.first;t!==null;t=t.next)if(t.type===1&&t.ns===`http://www.w3.org/2000/svg`&&t.name===`title`)return t;return null}function getDocumentTitle(e){let t=firstElementChild(e[M]),n;if(t!==null&&t.ns===`http://www.w3.org/2000/svg`&&t.name===`svg`){let e=svgTitle(t);n=e===null?``:childTextContent(e)}else{let t=titleElement(e);n=t===null?``:childTextContent(t)}return stripAndCollapse(n)}function setDocumentTitle(e,t){let n=firstElementChild(e[M]);if(n===null)return;if(n.ns===`http://www.w3.org/2000/svg`&&n.name===`svg`){let r=svgTitle(n);r===null&&(r=e.createElementNS(ae,`title`)[M],n.node.insertBefore(r.node,n.first===null?null:n.first.node)),r.node.textContent=t;return}if(n.ns!==`http://www.w3.org/1999/xhtml`)return;let r=titleElement(e);if(r===null){let t=e.head;if(t===null)return;r=t.appendChild(e.createElement(`title`))[M]}r.node.textContent=t}Object.hasOwn(Z.prototype,`title`)||Object.defineProperty(Z.prototype,"title",{get(){return getDocumentTitle(this)},set(e){setDocumentTitle(this,String(e))},configurable:!0,enumerable:!0}),Object.hasOwn(Z.prototype,`dir`)||Object.defineProperty(Z.prototype,"dir",{get(){let e=firstElementChild(this[M]);if(e===null||e.tag!==Y.html||e.ns!==`http://www.w3.org/1999/xhtml`)return``;let t=contentAttr(e,`dir`);if(t===null)return``;let n=t.toLowerCase();return n===`ltr`||n===`rtl`||n===`auto`?n:``},set(e){let t=firstElementChild(this[M]);t!==null&&t.tag===Y.html&&t.ns===`http://www.w3.org/1999/xhtml`&&t.node.setAttribute(`dir`,String(e))},configurable:!0,enumerable:!0});for(let[e,t]of[[`fgColor`,`text`],[`linkColor`,`link`],[`vlinkColor`,`vlink`],[`alinkColor`,`alink`],[`bgColor`,`bgcolor`]])Object.hasOwn(Z.prototype,e)||Object.defineProperty(Z.prototype,e,{get(){let e=this.body;return e===null||e[M].tag!==Y.body?``:contentAttr(e[M],t)??``},set(e){let n=this.body;n!==null&&n[M].tag===Y.body&&n.setAttribute(t,e===null?``:String(e))},configurable:!0,enumerable:!0});var SVGAnimatedString=class{[O];[Be];constructor(e,t){this[O]=e,this[Be]=t}get baseVal(){let e=this[O][M];return this[Be]===`href`?contentAttr(e,`href`)??xlinkHref(e)??``:contentAttr(e,this[Be])??``}set baseVal(e){setAttribute(this[O][M],this[Be],String(e))}get animVal(){return this.baseVal}};function xlinkHref(e){let t=e.attrs;if(t===null)return null;for(let e=0;e<t.length;e++)if(t[e].localName===`href`&&t[e].ns===`http://www.w3.org/1999/xlink`)return t[e].value;return null}const md=Symbol(`className`),hd=Symbol(`href`);var SVGElement=class extends Io{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get className(){let e=this[md];return e===void 0&&(e=new SVGAnimatedString(this,`class`),Object.defineProperty(this,md,{value:e})),e}set className(e){}get ownerSVGElement(){for(let e=this[M].parent;e!==null&&e.type===1;e=e.parent)if(e.ns===`http://www.w3.org/2000/svg`&&e.name===`svg`)return e.node;return null}get viewportElement(){return this.ownerSVGElement}};installHTMLOrSVGElement(SVGElement);function installURIReference(e){Object.defineProperty(e.prototype,"href",{get(){let e=this[hd];return e===void 0&&(e=new SVGAnimatedString(this,`href`),Object.defineProperty(this,hd,{value:e})),e},configurable:!0,enumerable:!0})}function zeroRect(){return{x:0,y:0,width:0,height:0}}function identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}var SVGGraphicsElement=class extends SVGElement{getBBox(){return zeroRect()}getCTM(){return identityMatrix()}getScreenCTM(){return identityMatrix()}},SVGGeometryElement=class extends SVGGraphicsElement{isPointInFill(){return!1}isPointInStroke(){return!1}getTotalLength(){return 0}getPointAtLength(){return{x:0,y:0}}},SVGSVGElement=class extends SVGGraphicsElement{createSVGNumber(){return{value:0}}createSVGLength(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGAngle(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGPoint(){return{x:0,y:0}}createSVGMatrix(){return identityMatrix()}createSVGRect(){return zeroRect()}createSVGTransform(){return{type:0,matrix:identityMatrix(),angle:0}}getIntersectionList(){return[]}getEnclosureList(){return[]}checkIntersection(){return!1}checkEnclosure(){return!1}deselectAll(){}suspendRedraw(){return 0}unsuspendRedraw(){}unsuspendRedrawAll(){}forceRedraw(){}pauseAnimations(){}unpauseAnimations(){}animationsPaused(){return!1}getCurrentTime(){return 0}setCurrentTime(){}getElementById(e){let t=this[M];for(let n=t.first;n!==null;n=nextEl(n,t))if(n.type===1&&n.id===String(e))return n.node;return null}};function nextEl(e,t){if(e.first!==null)return e.first;for(let n=e;n!==null&&n!==t;n=n.parent)if(n.next!==null)return n.next;return null}var SVGGElement=class extends SVGGraphicsElement{},SVGDefsElement=class extends SVGGraphicsElement{},SVGDescElement=class extends SVGElement{},SVGMetadataElement=class extends SVGElement{},SVGTitleElement=class extends SVGElement{},SVGSymbolElement=class extends SVGGraphicsElement{},SVGUseElement=class extends SVGGraphicsElement{};installURIReference(SVGUseElement);var SVGSwitchElement=class extends SVGGraphicsElement{},SVGImageElement=class extends SVGGraphicsElement{};installURIReference(SVGImageElement);var SVGForeignObjectElement=class extends SVGGraphicsElement{},SVGAElement=class extends SVGGraphicsElement{};installURIReference(SVGAElement);var SVGPathElement=class extends SVGGeometryElement{},SVGRectElement=class extends SVGGeometryElement{},SVGCircleElement=class extends SVGGeometryElement{},SVGEllipseElement=class extends SVGGeometryElement{},SVGLineElement=class extends SVGGeometryElement{},SVGPolylineElement=class extends SVGGeometryElement{},SVGPolygonElement=class extends SVGGeometryElement{},SVGTextContentElement=class extends SVGGraphicsElement{getNumberOfChars(){return(this.textContent??``).length}getComputedTextLength(){return 0}getSubStringLength(){return 0}},SVGTextPositioningElement=class extends SVGTextContentElement{},SVGTextElement=class extends SVGTextPositioningElement{},SVGTSpanElement=class extends SVGTextPositioningElement{},SVGTextPathElement=class extends SVGTextContentElement{};installURIReference(SVGTextPathElement);var SVGMarkerElement=class extends SVGElement{},SVGClipPathElement=class extends SVGElement{},SVGMaskElement=class extends SVGElement{},SVGPatternElement=class extends SVGElement{};installURIReference(SVGPatternElement);var SVGGradientElement=class extends SVGElement{};installURIReference(SVGGradientElement);var SVGLinearGradientElement=class extends SVGGradientElement{},SVGRadialGradientElement=class extends SVGGradientElement{},SVGStopElement=class extends SVGElement{},SVGStyleElement=class extends SVGElement{},SVGScriptElement=class extends SVGElement{};installURIReference(SVGScriptElement);var SVGViewElement=class extends SVGElement{},SVGFilterElement=class extends SVGElement{};const gd=/* @__PURE__ */ new Map([[`svg`,SVGSVGElement],[`g`,SVGGElement],[`defs`,SVGDefsElement],[`desc`,SVGDescElement],[`metadata`,SVGMetadataElement],[`title`,SVGTitleElement],[`symbol`,SVGSymbolElement],[`use`,SVGUseElement],[`switch`,SVGSwitchElement],[`image`,SVGImageElement],[`foreignObject`,SVGForeignObjectElement],[`a`,SVGAElement],[`path`,SVGPathElement],[`rect`,SVGRectElement],[`circle`,SVGCircleElement],[`ellipse`,SVGEllipseElement],[`line`,SVGLineElement],[`polyline`,SVGPolylineElement],[`polygon`,SVGPolygonElement],[`text`,SVGTextElement],[`tspan`,SVGTSpanElement],[`textPath`,SVGTextPathElement],[`marker`,SVGMarkerElement],[`clipPath`,SVGClipPathElement],[`mask`,SVGMaskElement],[`pattern`,SVGPatternElement],[`linearGradient`,SVGLinearGradientElement],[`radialGradient`,SVGRadialGradientElement],[`stop`,SVGStopElement],[`style`,SVGStyleElement],[`script`,SVGScriptElement],[`view`,SVGViewElement],[`filter`,SVGFilterElement]]);var MathMLElement=class extends Io{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}};installHTMLOrSVGElement(MathMLElement);const _d=/* @__PURE__ */ new Map([[`off`,0],[`on`,1],[`webauthn`,4]]);for(let e of/* @__PURE__ */ `name.honorific-prefix.given-name.additional-name.family-name.honorific-suffix.nickname.organization-title.username.new-password.current-password.one-time-code.organization.street-address.address-line1.address-line2.address-line3.address-level4.address-level3.address-level2.address-level1.country.country-name.postal-code.cc-name.cc-given-name.cc-additional-name.cc-family-name.cc-number.cc-exp.cc-exp-month.cc-exp-year.cc-csc.cc-type.transaction-currency.transaction-amount.language.bday.bday-day.bday-month.bday-year.sex.url.photo`.split(`.`))_d.set(e,2);for(let e of[`tel`,`tel-country-code`,`tel-national`,`tel-area-code`,`tel-local`,`tel-local-prefix`,`tel-local-suffix`,`tel-extension`,`email`,`impp`])_d.set(e,3);const vd=[1,1,3,4,5];function idlExposedAutofillValue(e){let t=attr(e,`autocomplete`);if(t===null)return``;let n=splitOnAsciiWhitespace(t);if(n.length===0)return``;let r=n.length-1,i=asciiLowercase$1(n[r]),a=_d.get(i);if(a===void 0||n.length>vd[a])return``;if(a===0||a===1)return e.tag===Y.input&&inputType(e)===0?``:i;let o=i;if(a===4){if(r===0)return o;r--;let e=asciiLowercase$1(n[r]);if(a=_d.get(e),a!==2&&a!==3||r>vd[a]-1)return``;o=e+` `+o}if(r===0)return o;r--;let s=asciiLowercase$1(n[r]);if(a===3&&(s===`home`||s===`work`||s===`mobile`||s===`fax`||s===`pager`)){if(o=s+` `+o,r===0)return o;r--,s=asciiLowercase$1(n[r])}if(s===`shipping`||s===`billing`){if(o=s+` `+o,r===0)return o;r--,s=asciiLowercase$1(n[r])}return r!==0||!s.startsWith(`section-`)?``:s+` `+o}function installAutocomplete(e){Object.defineProperty(e.prototype,"autocomplete",{get(){return idlExposedAutofillValue(this[M])},set(e){setAttribute(this[M],`autocomplete`,String(e))},enumerable:!0,configurable:!0})}const yd=/^-?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?$/;function parseFloatStrict(e){if(!yd.test(e))return NaN;let t=Number(e);return Number.isFinite(t)?t:NaN}function parseFloatLenient(e){let t=/^[\t\n\f\r ]*([-+]?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][-+]?\d+)?)/.exec(e);if(t===null)return NaN;let n=Number(t[1]);return Number.isFinite(n)?n===0?0:n:NaN}function serializeFloat(e){return String(e===0?0:e)}function isLeapYear(e){return e%400==0||e%4==0&&e%100!=0}const bd=[31,28,31,30,31,30,31,31,30,31,30,31];function daysInMonth(e,t){return e===2&&isLeapYear(t)?29:bd[e-1]}function utcMs(e,t=1,n=1,r=0,i=0,a=0,o=0){if(e>99||e<0)return Date.UTC(e,t-1,n,r,i,a,o);let s=/* @__PURE__ */ new Date(0);return s.setUTCFullYear(e,t-1,n),s.setUTCHours(r,i,a,o),s.getTime()}const xd=/^(\d{4,})-(\d{2})$/,Sd=/^(\d{4,})-(\d{2})-(\d{2})$/,Cd=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/,wd=/^(\d{4,})-W(\d{2})$/;function isValidDateString(e){let t=Sd.exec(e);if(t===null)return!1;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return n>0&&r>=1&&r<=12&&i>=1&&i<=daysInMonth(r,n)}function isValidMonthString(e){let t=xd.exec(e);if(t===null)return!1;let n=Number(t[2]);return Number(t[1])>0&&n>=1&&n<=12}function isValidWeekString(e){let t=wd.exec(e);if(t===null)return!1;let n=Number(t[1]),r=Number(t[2]);return n>0&&r>=1&&r<=lastWeekNumber(n)}function normalizeLocalDateTime(e){let t=e.indexOf(`T`);if(t===-1&&(t=e.indexOf(` `)),t===-1)return``;let n=e.slice(0,t);if(!isValidDateString(n))return``;let r=parseTime(e.slice(t+1));return Number.isNaN(r)?``:n+`T`+serializeTime(r)}function parseMonth(e){let t=xd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]);return n<=0||r<1||r>12?NaN:(n-1970)*12+(r-1)}function parseDate(e){let t=Sd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return n<=0||r<1||r>12||i<1||i>daysInMonth(r,n)?NaN:utcMs(n,r,i)}function parseTime(e){let t=Cd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]),i=t[3]===void 0?0:Number(t[3]),a=t[4]===void 0?0:Number(t[4].padEnd(3,`0`));return n>23||r>59||i>59?NaN:((n*60+r)*60+i)*1e3+a}function parseLocalDateTime(e){let t=e.indexOf(`T`);if(t===-1&&(t=e.indexOf(` `)),t===-1)return NaN;let n=parseDate(e.slice(0,t));if(Number.isNaN(n))return NaN;let r=parseTime(e.slice(t+1));return Number.isNaN(r)?NaN:n+r}function lastWeekNumber(e){let t=new Date(utcMs(e)).getUTCDay();return t===4||isLeapYear(e)&&t===3?53:52}function parseWeek(e){let t=wd.exec(e);if(t===null)return NaN;let n=Number(t[1]),r=Number(t[2]);if(n<=0||r<1||r>lastWeekNumber(n))return NaN;let i=utcMs(n),a=(new Date(i).getUTCDay()+6)%7;return(a<=3?i-a*864e5:i+(7-a)*864e5)+(r-1)*7*864e5}function pad(e,t){return String(e).padStart(t,`0`)}function serializeDate(e){let t=new Date(e);return`${pad(t.getUTCFullYear(),4)}-${pad(t.getUTCMonth()+1,2)}-${pad(t.getUTCDate(),2)}`}function serializeMonth(e){let t=1970+Math.floor(e/12),n=(e%12+12)%12;return`${pad(t,4)}-${pad(n+1,2)}`}function serializeTime(e){let t=(e%864e5+864e5)%864e5,n=Math.floor(t/36e5),r=Math.floor(t/6e4)%60,i=Math.floor(t/1e3)%60,a=Math.round(t%1e3),o=`${pad(n,2)}:${pad(r,2)}`;return(i!==0||a!==0)&&(o+=`:`+pad(i,2),a!==0&&(o+=`.`+pad(a,3).replace(/0+$/,``))),o}function serializeLocalDateTime(e){let t=Math.floor(e/864e5)*864e5;return serializeDate(t)+`T`+serializeTime(e-t)}function serializeWeek(e){let t=(new Date(e).getUTCDay()+6)%7,n=new Date(e+(3-t)*864e5),r=n.getUTCFullYear(),i=utcMs(r),a=Math.floor((n.getTime()-i)/864e5/7)+1;return`${pad(r,4)}-W${pad(a,2)}`}function isValidSimpleColor(e){return/^#[0-9a-fA-F]{6}$/.test(e)}const Td=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function isValidEmail(e){return Td.test(e)}function isValidAbsoluteURL(e){return URL.canParse(e)}const Ed=Symbol(`FileList`);var FileList=class{constructor(e,t){if(e!==Ed)throw TypeError(`Illegal constructor`);let n=t??[];for(let e=0;e<n.length;e++)Object.defineProperty(this,e,{value:n[e],enumerable:!0,configurable:!1,writable:!1});Object.defineProperty(this,"length",{value:n.length,enumerable:!1,configurable:!1,writable:!1})}item(e){let t=Number(e)>>>0;return t<this.length?this[t]:null}*[Symbol.iterator](){for(let e=0;e<this.length;e++)yield this[e]}get[Symbol.toStringTag](){return`FileList`}};function createFileList(e){return new FileList(Ed,e)}function toFileList(e){if(e instanceof FileList)return e;if(typeof e==`object`&&e&&typeof e.length==`number`){let t=e,n=[];for(let e=0;e<t.length;e++)n.push(t[e]);return createFileList(n)}throw TypeError(`Failed to set the 'files' property on 'HTMLInputElement': The provided value is not of type 'FileList'.`)}function sanitizeValue(e,t,n){switch(e){case 1:case 2:case 3:case 6:return stripNewlines(t);case 4:return trimASCII(stripNewlines(t));case 5:{if(attr(n,`multiple`)===null||t.indexOf(`,`)===-1)return trimASCII(stripNewlines(t));let e=t.split(`,`);for(let t=0;t<e.length;t++)e[t]=trimASCII(stripNewlines(e[t]));return e.join(`,`)}case 12:return Number.isNaN(parseFloatStrict(t))?``:t;case 13:return sanitizeRange(t,n);case 7:return isValidDateString(t)?t:``;case 8:return isValidMonthString(t)?t:``;case 9:return isValidWeekString(t)?t:``;case 10:return Number.isNaN(parseTime(t))?``:t;case 11:return normalizeLocalDateTime(t);case 14:return isValidSimpleColor(t)?t.toLowerCase():`#000000`}return t}function sanitizeRange(e,t){let n=rangeMin(t),r=rangeMax(t);r<n&&(r=n);let i=parseFloatStrict(e),a=Number.isNaN(i)?n+(r-n)/2:i;a<n&&(a=n),a>r&&(a=r);let o=allowedStep(13,t);if(!Number.isNaN(o)){let e=stepBase(13,t),n=(a-e)/o,i=Math.round(n);if(!isIntegral(n)){let t=roundForStep(e+i*o,o,e);t>r&&(t=roundForStep(e+Math.floor((r-e)/o)*o,o,e)),a=t}}return a===i?e:serializeFloat(a)}function rangeMin(e){let t=attr(e,`min`),n=t===null?NaN:parseFloatLenient(t);return Number.isNaN(n)?0:n}function rangeMax(e){let t=attr(e,`max`),n=t===null?NaN:parseFloatLenient(t);return Number.isNaN(n)?100:n}function stringToNumber(e,t){switch(e){case 12:case 13:return parseFloatStrict(t);case 7:return parseDate(t);case 8:return parseMonth(t);case 9:return parseWeek(t);case 10:return parseTime(t);case 11:return parseLocalDateTime(t)}return NaN}function numberToString(e,t){switch(e){case 12:case 13:return serializeFloat(t);case 7:return serializeDate(t);case 8:return serializeMonth(t);case 9:return serializeWeek(t);case 10:return serializeTime(t);case 11:return serializeLocalDateTime(t)}return``}function attrToNumber(e,t){return t===null?NaN:e===12||e===13?parseFloatLenient(t):stringToNumber(e,t)}function defaultStep(e){return e===10||e===11?60:1}function stepScale(e){switch(e){case 7:return 864e5;case 9:return 6048e5;case 10:case 11:return 1e3}return 1}function allowedStep(e,t){let n=attr(t,`step`);if(n!==null){if(n.toLowerCase()===`any`)return NaN;let t=parseFloatLenient(n);if(!Number.isNaN(t)&&t>0)return(e===7||e===8||e===9)&&(t=Math.max(1,Math.round(t))),t*stepScale(e)}return defaultStep(e)*stepScale(e)}function stepBase(e,t){let n=attrToNumber(e,attr(t,`min`));return!Number.isNaN(n)||(n=attrToNumber(e,attr(t,`value`)),!Number.isNaN(n))?n:e===9?-2592e5:0}function minimum(e,t){return e===13?rangeMin(t):attrToNumber(e,attr(t,`min`))}function maximum(e,t){if(e===13){let e=rangeMin(t),n=rangeMax(t);return n<e?e:n}return attrToNumber(e,attr(t,`max`))}function isStepAligned(e,t,n){let r=(e-t)/n;if(Math.abs(r)<1e6)return isIntegral(r);let i=toDecimal(e),a=toDecimal(t),o=toDecimal(n);if(i===null||a===null||o===null)return isIntegral(r);let s=Math.min(i.exp,a.exp,o.exp),scale=e=>e.digits*10n**BigInt(e.exp-s),c=scale(o);return c===0n||(scale(i)-scale(a))%c===0n}function toDecimal(e){if(!Number.isFinite(e))return null;let t=/^(-?)(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(e));if(t===null)return null;let n=t[3]??``,r=(t[4]===void 0?0:Number(t[4]))-n.length;if(r<-400||r>400)return null;let i=BigInt(t[2]+n);return{digits:t[1]===`-`?-i:i,exp:r}}function isIntegral(e){return Math.abs(e-Math.round(e))<1e-9*Math.max(1,Math.abs(e))}function decimals(e){let t=String(e),n=t.indexOf(`e-`);if(n!==-1)return Number(t.slice(n+2))+(t.indexOf(`.`)===-1?0:n-t.indexOf(`.`)-1);let r=t.indexOf(`.`);return r===-1?0:t.length-r-1}function roundForStep(e,t,n){let r=Math.min(15,Math.max(decimals(t),decimals(n))),i=Number(e.toFixed(r));return i===0?0:i}var HTMLInputElement=class extends HTMLElement{[Qr];[E];[Qe];[$e];[jt];[mn];[Ht];[br];[vr];[_r];[T];[Zr];[F];[Yr];[Ue];[Wr];[Kn];[Jn];[qn];[Gn];[Xr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12,this[Qr]=``,this[E]=!1,this[Qe]=!1,this[$e]=!1,this[jt]=!1,this[mn]=!1,this[Ht]=null,this[br]=0,this[vr]=0,this[_r]=`none`,this[T]=``,this[Zr]=null,this[F]=null,this[Yr]=!1,this[Ue]=!1,this[Wr]=null,this[Kn]=!1,this[Jn]=!1,this[qn]=null,this[Gn]=!1,this[Xr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}get type(){return xs[inputType(this[M])]}set type(e){setAttribute(this[M],`type`,String(e))}_currentValue(e){return this[E]?this[Qr]:sanitizeValue(e,attr(this[M],`value`)??``,this[M])}get value(){let e=this[M],t=inputType(e);switch(valueMode(t)){case 0:return this._currentValue(t);case 1:return attr(e,`value`)??``;case 2:return attr(e,`value`)??`on`}let n=this[Ht];return n===null||n.length===0?``:`C:\\fakepath\\`+n.item(0).name}set value(e){let t=e===null?``:String(e),n=this[M],r=inputType(n);switch(valueMode(r)){case 0:this._setValueFromAPI(r,t);return;case 1:case 2:setAttribute(n,`value`,t);return}if(t!==``)throw new DOMException(`Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.`,`InvalidStateError`);this[Ht]=null}_setValueFromAPI(e,t){let n=this._currentValue(e);if(this[M].doc[K]++,this[Qr]=sanitizeValue(e,t,this[M]),this[E]=!0,this[Yr]=!1,this[Ue]=!1,this[Wr]=null,this[Qr]!==n){let e=this[Qr].length;this[br]=e,this[vr]=e,this[_r]=`none`}}_checkedness(){return this[$e]?this[Qe]:attr(this[M],`checked`)!==null}_setCheckedness(e,t){this[M].doc[K]++,this[Qe]=e,this[$e]=!0,t&&(this[jt]=!0),e&&inputType(this[M])===16&&uncheckOtherRadios(this[M])}get checked(){return this._checkedness()}set checked(e){this._setCheckedness(!!e,!0)}get indeterminate(){return this[mn]}set indeterminate(e){this[M].doc[K]++,this[mn]=!!e}get files(){return inputType(this[M])===17?this[Ht]??=createFileList([]):null}set files(e){inputType(this[M])===17&&e!=null&&(this[Ht]=toFileList(e))}get valueAsNumber(){let e=inputType(this[M]);return isNumericType(e)?stringToNumber(e,this._currentValue(e)):NaN}set valueAsNumber(e){let t=Number(e);if(!Number.isFinite(t)&&!Number.isNaN(t))throw TypeError(`Failed to set the 'valueAsNumber' property on 'HTMLInputElement': The value provided is infinite.`);let n=inputType(this[M]);if(!isNumericType(n))throw new DOMException(`Failed to set the 'valueAsNumber' property on 'HTMLInputElement': This input element does not support Number values.`,`InvalidStateError`);this._setValueFromAPI(n,Number.isNaN(t)?``:numberToString(n,t))}get valueAsDate(){let e=inputType(this[M]);if(e!==7&&e!==8&&e!==9&&e!==10)return null;let t=stringToNumber(e,this._currentValue(e));return Number.isNaN(t)?null:e===8?new Date(utcMs(1970+Math.floor(t/12),(t%12+12)%12+1)):new Date(t)}set valueAsDate(e){let t=inputType(this[M]);if(t!==7&&t!==8&&t!==9&&t!==10)throw new DOMException(`Failed to set the 'valueAsDate' property on 'HTMLInputElement': This input element does not support Date values.`,`InvalidStateError`);if(e===null){this._setValueFromAPI(t,``);return}let n;try{n=Date.prototype.getTime.call(e)}catch{throw TypeError(`Failed to set the 'valueAsDate' property on 'HTMLInputElement': The provided value is not a Date.`)}if(Number.isNaN(n)){this._setValueFromAPI(t,``);return}let r=n;if(t===8){let e=new Date(n);r=(e.getUTCFullYear()-1970)*12+e.getUTCMonth()}this._setValueFromAPI(t,numberToString(t,r))}stepUp(e=1){this._stepUpOrDown(Number(e)|0,!0)}stepDown(e=1){this._stepUpOrDown(Number(e)|0,!1)}_stepUpOrDown(e,t){let n=this[M],r=inputType(n),i=t?`stepUp`:`stepDown`;if(!isNumericType(r))throw new DOMException(`Failed to execute '${i}' on 'HTMLInputElement': This form element is not steppable.`,`InvalidStateError`);let a=allowedStep(r,n);if(Number.isNaN(a))throw new DOMException(`Failed to execute '${i}' on 'HTMLInputElement': This form element does not have an allowed value step.`,`InvalidStateError`);let o=minimum(r,n),s=maximum(r,n);if(!Number.isNaN(o)&&!Number.isNaN(s)&&o>s)return;let c=stepBase(r,n);if(!Number.isNaN(o)&&!Number.isNaN(s)&&c+Math.ceil((o-c)/a-1e-9)*a>s+1e-9)return;let l=stringToNumber(r,this._currentValue(r)),u=!Number.isNaN(l);u||(l=0);let d=l,m=(l-c)/a;isIntegral(m)?l+=(t?e:-e)*a:l=c+(t?Math.ceil(m):Math.floor(m))*a,l=roundForStep(l,a,c),!Number.isNaN(o)&&l<o?l=roundForStep(c+Math.ceil((o-c)/a-1e-9)*a,a,c):!Number.isNaN(s)&&l>s&&(l=roundForStep(c+Math.floor((s-c)/a+1e-9)*a,a,c)),!(u&&(t&&l<d||!t&&l>d))&&this._setValueFromAPI(r,numberToString(r,l))}_selectionLength(){return this.value.length}_assertSelectable(e){if(!supportsSelectionType(inputType(this[M])))throw new DOMException(`Failed to ${e.endsWith(`)`)?`execute`:`set`} '${e.replace(`()`,``)}' on 'HTMLInputElement': The input element's type ('${this.type}') does not support selection.`,`InvalidStateError`)}get selectionStart(){return supportsSelectionType(inputType(this[M]))?Math.min(this[br],this._selectionLength()):null}set selectionStart(e){this._assertSelectable(`selectionStart`);let t=toUnsignedLong(e),n=Math.max(t,this.selectionEnd);setSelection(this,t,n,this[_r])}get selectionEnd(){return supportsSelectionType(inputType(this[M]))?Math.min(this[vr],this._selectionLength()):null}set selectionEnd(e){this._assertSelectable(`selectionEnd`),setSelection(this,this.selectionStart,toUnsignedLong(e),this[_r])}get selectionDirection(){return supportsSelectionType(inputType(this[M]))?this[_r]:null}set selectionDirection(e){this._assertSelectable(`selectionDirection`),setSelection(this,this.selectionStart,this.selectionEnd,String(e))}setSelectionRange(e,t,n){this._assertSelectable(`setSelectionRange()`),setSelection(this,toUnsignedLong(e),toUnsignedLong(t),n===void 0?`none`:String(n))}select(){selectApplies(inputType(this[M]))&&setSelection(this,0,this._selectionLength(),`none`)}setRangeText(e,t,n,r){if(arguments.length===0)throw TypeError(`Failed to execute 'setRangeText' on 'HTMLInputElement': 1 argument required, but only 0 present.`);this._assertSelectable(`setRangeText()`);let i=rangeText(this.value,this[br],this[vr],String(e),t,n,r,arguments.length),a=inputType(this[M]);this[M].doc[K]++,this[Qr]=sanitizeValue(a,i.value,this[M]),this[E]=!0,this[Wr]=null,setSelection(this,i.start,i.end,`none`)}get height(){return dimensionAttr(this[M],`height`)}set height(e){let t=toUnsignedLong(e);setAttribute(this[M],`height`,String(t<=2147483647?t:0))}get width(){return dimensionAttr(this[M],`width`)}set width(e){let t=toUnsignedLong(e);setAttribute(this[M],`width`,String(t<=2147483647?t:0))}get formAction(){return reflectActionURL(this[M],`formaction`)}set formAction(e){setAttribute(this[M],`formaction`,String(e))}get list(){let e=this[M];if(!listApplies(inputType(e)))return null;let t=attr(e,`list`);if(t===null)return null;let n=elementByIdInTree(e,t);return n!==null&&n.tag===Y.datalist?n.node:null}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return inputType(this[M])===0?null:this[F]??=new LabelsNodeList(this[M])}showPicker(){if(!this._isMutable())throw new DOMException(`Failed to execute 'showPicker' on 'HTMLInputElement': HTMLInputElement::showPicker() cannot be used on immutable controls.`,`InvalidStateError`)}_isMutable(){let e=this[M];return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&attr(e,`readonly`)!==null)}_barredFromValidation(){let e=this[M],t=inputType(e);return t===0||t===20||t===21||readonlyApplies(t)&&attr(e,`readonly`)!==null?!0:isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[M],t=inputType(e),n=this[T]===``?0:512,r=valueMode(t);if(requiredApplies(t)&&attr(e,`required`)!==null?t===15?this._checkedness()||(n|=1):t===16?radioGroupMissing(e)&&(n|=1):t===17?(this[Ht]===null||this[Ht].length===0)&&(n|=1):r===0&&this._isMutable()&&this._currentValue(t)===``&&(n|=1):t===16&&radioGroupMissing(e)&&(n|=1),r!==0)return n;let i=this._currentValue(t);if(this[Ue]&&(n|=256),i===``)return n;if(t===5){if(attr(e,`multiple`)!==null){let e=i.split(`,`);for(let t=0;t<e.length;t++)if(!isValidEmail(e[t])){n|=2;break}}else isValidEmail(i)||(n|=2)}else t===4&&!isValidAbsoluteURL(i)&&(n|=2);if(lengthApplies(t)){let r=attr(e,`pattern`);if(r!==null){let a=compilePattern(r);if(a!==null){if(t===5&&attr(e,`multiple`)!==null){let e=i.split(`,`);for(let t=0;t<e.length;t++)if(!a.test(e[t])){n|=4;break}}else a.test(i)||(n|=4)}}if(this[Yr]){let t=readNonNegativeLong(e,`maxlength`,-1);t!==-1&&i.length>t&&(n|=8);let r=readNonNegativeLong(e,`minlength`,-1);r!==-1&&i.length<r&&(n|=16)}}if(isNumericType(t)){let r=stringToNumber(t,i);if(!Number.isNaN(r)){let i=minimum(t,e),a=maximum(t,e);t===10&&!Number.isNaN(i)&&!Number.isNaN(a)&&i>a?r<i&&r>a&&(n|=96):(!Number.isNaN(i)&&r<i&&(n|=32),!Number.isNaN(a)&&r>a&&(n|=64));let o=allowedStep(t,e);!Number.isNaN(o)&&!isStepAligned(r,stepBase(t,e),o)&&(n|=128)}}return n}_validationMessage(e){let t=this[M],n=inputType(t);if(e&1)return n===15?`Please check this box if you want to proceed.`:n===16?`Please select one of these options.`:n===17?`Please select a file.`:ks;if(e&256)return n===12?`Please enter a number.`:As;let r=this._currentValue(n);if(e&2)return n===5?msgEmail(r):`Please enter a URL.`;if(e&4)return`Please match the requested format.`;if(e&8)return msgTooLong(this.maxLength,r.length);if(e&16)return msgTooShort(this.minLength,r.length);let i=n!==12&&n!==13;if(e&32)return msgUnderflow(numberToString(n,minimum(n,t)),i);if(e&64)return msgOverflow(numberToString(n,maximum(n,t)),i);if(e&128){let e=stringToNumber(n,r),i=allowedStep(n,t),a=stepBase(n,t),o=roundForStep(a+Math.floor((e-a)/i)*i,i,a),s=roundForStep(o+i,i,a),c=minimum(n,t),l=maximum(n,t);return msgStep(!Number.isNaN(c)&&o<c?null:numberToString(n,o),!Number.isNaN(l)&&s>l?null:numberToString(n,s))}return this[T]}_reset(){this[Xr]=!1,this[E]=!1,this[jt]=!1,this[Yr]=!1,this[Ue]=!1,this[Wr]=null,this[Qr]=``,this[Ht]=null,this._setCheckedness(attr(this[M],`checked`)!==null,!1)}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r===null)switch(e){case`type`:{let e=inputTypeFromAttr(t),r=inputTypeFromAttr(n);e!==r&&this._typeChange(e,r);break}case`checked`:this[jt]||this._setCheckedness(n!==null,!1);break;case`name`:case`form`:inputType(this[M])===16&&this._checkedness()&&uncheckOtherRadios(this[M]);break;case`multiple`:this[E]&&inputType(this[M])===5&&(this[Qr]=sanitizeValue(5,this[Qr],this[M]))}}_typeChange(e,t){let n=this[M],r=valueMode(e),i=valueMode(t);if(r===0&&(i===1||i===2)){let t=this[E]?this[Qr]:sanitizeValue(e,attr(n,`value`)??``,n);this[E]=!1,t!==``&&setAttribute(n,`value`,t)}else(r!==0&&i===0||r!==3&&i===3)&&(this[E]=!1,this[Qr]=``);r===3&&i!==3&&(this[Ht]=null),t===16&&this._checkedness()&&uncheckOtherRadios(n),i===0&&this[E]&&(this[Qr]=sanitizeValue(t,this[Qr],n)),this[Wr]=null,this[Ue]=!1,!supportsSelectionType(e)&&supportsSelectionType(t)&&(this[br]=0,this[vr]=0,this[_r]=`none`)}_connectedSteps(){super._connectedSteps(),inputType(this[M])===16&&this._checkedness()&&uncheckOtherRadios(this[M])}_cloningSteps(e){let t=e;t[Qr]=this[Qr],t[E]=this[E],t[Qe]=this._checkedness(),t[$e]=!0,t[jt]=this[jt],t[mn]=this[mn]}get _hasActivationBehavior(){switch(inputType(this[M])){case 15:case 16:case 18:case 19:case 20:case 21:case 17:case 14:return!0}return!1}_legacyPreActivationBehavior(){let e=this[M],t=inputType(e);this[Gn]=!1,t===15?(this[Gn]=!0,this[Kn]=this._checkedness(),this[Jn]=this[mn],this._setCheckedness(!this[Kn],!0),this[mn]=!1):t===16&&(this[Gn]=!0,this[Kn]=this._checkedness(),this[qn]=checkedRadioInGroup(e),this._setCheckedness(!0,!0))}_legacyCanceledActivationBehavior(){if(!this[Gn])return;this[Gn]=!1;let e=this[M],t=inputType(e);if(e.doc[K]++,t===15)this[Qe]=this[Kn],this[$e]=!0,this[mn]=this[Jn];else if(t===16){let t=this[qn];this[qn]=null,t!==null&&t!==e&&inSameRadioGroup(e,t)?t.node._setCheckedness(!0,!1):t!==e&&(this[Qe]=!1,this[$e]=!0)}}_activationBehavior(e){let t=this[M],n=inputType(t);if(n===15||n===16){if(!(t.flags&1)||n===16&&this[Kn])return;fireEvent$1(this,`input`,!0,!1,!0),fireEvent$1(this,`change`,!0,!1)}else if(this._isMutable()){if(n===18||n===19){if(n===19){let n=e;n!==null&&typeof n.offsetX==`number`&&typeof n.offsetY==`number`?Jl.set(t,{x:n.offsetX,y:n.offsetY}):Jl.delete(t)}let r=formOwner(t);r!==null&&submitForm(r,t,!1)}else if(n===20){let e=formOwner(t);e!==null&&t.flags&1&&resetForm(e)}popoverTargetAttributeActivation(t,e?.target?.[M]??null)}}};installConstraintValidation(HTMLInputElement),str(HTMLInputElement,`accept alt dirName=dirname formTarget=formtarget max min name pattern placeholder step useMap=usemap align defaultValue=value`),bool(HTMLInputElement,`disabled formNoValidate=formnovalidate multiple readOnly=readonly required defaultChecked=checked`),url(HTMLInputElement,`src`),ulong(HTMLInputElement,`size`,20,!0),nonNegativeLong(HTMLInputElement,`maxLength=maxlength minLength=minlength`,-1),enumerated(HTMLInputElement,`formEnctype=formenctype`,Gl),enumerated(HTMLInputElement,`formMethod=formmethod`,Kl);function dimensionAttr(e,t){return inputType(e)===19?readNonNegativeLong(e,t,0):0}function selectApplies(e){return e>=1&&e<=12||e===14||e===17}const Dd=/* @__PURE__ */ new Map;function compilePattern(e){let t=Dd.get(e);if(t!==void 0)return t;try{new RegExp(e,`v`),t=RegExp(`^(?:`+e+`)$`,`v`)}catch{t=null}return Dd.size>256&&Dd.clear(),Dd.set(e,t),t}function setSelection(e,t,n,r){let i=e._selectionLength();n>i&&(n=i),t>n&&(t=n);let a=r===`forward`||r===`backward`?r:`none`,o=t!==Math.min(e[br],i)||n!==Math.min(e[vr],i)||a!==e[_r];if(e[br]=t,e[vr]=n,e[_r]=a,o){let t=e;queueElementTask(t,()=>fireEvent$1(t,`select`,!0,!1))}}function rangeText(e,t,n,r,i,a,o,s){let c=e.length;t=Math.min(t,c),n=Math.min(n,c);let l,u;if(s<2?(l=t,u=n):(l=toUnsignedLong(i),u=toUnsignedLong(a)),l>u)throw new DOMException(`Failed to execute 'setRangeText': The provided start value (${l}) is larger than the provided end value (${u}).`,`IndexSizeError`);l>c&&(l=c),u>c&&(u=c);let d=o===void 0?`preserve`:String(o);if(d!==`select`&&d!==`start`&&d!==`end`&&d!==`preserve`)throw TypeError(`Failed to execute 'setRangeText': The provided value '${d}' is not a valid enum value of type SelectionMode.`);let m=e.slice(0,l)+r+e.slice(u),h=l+r.length,_=t,v=n;switch(d){case`select`:_=l,v=h;break;case`start`:_=v=l;break;case`end`:_=v=h;break;default:{let e=r.length-(u-l);_>u?_+=e:_>l&&(_=l),v>u?v+=e:v>l&&(v=h)}}return{value:m,start:_,end:v}}function inSameRadioGroup(e,t){if(t.tag!==Y.input||inputType(t)!==16)return!1;let n=attr(e,`name`);return n===null||n===``||attr(t,`name`)!==n||treeRoot(e)!==treeRoot(t)?!1:formOwner(e)===formOwner(t)}function forEachInRadioGroup(e,t){let n=attr(e,`name`);if(n===null||n===``)return;let r=formOwner(e),i=r===null?treeRoot(e):formOwnerScope(r,!0);for(let a=i.type===1?i:nextElementInTree(i,i);a!==null;a=nextElementInTree(a,i))if(a!==e&&a.tag===Y.input&&attr(a,`name`)===n&&inputType(a)===16&&formOwner(a)===r&&t(a))return}function uncheckOtherRadios(e){forEachInRadioGroup(e,e=>{let t=e.node;return t[$e]&&!t[Qe]||(e.doc[K]++,t[Qe]=!1,t[$e]=!0),!1})}function checkedRadioInGroup(e){if(e.node._checkedness())return e;let t=null;return forEachInRadioGroup(e,e=>e.node._checkedness()?(t=e,!0):!1),t}function radioGroupMissing(e){if(e.node._checkedness())return!1;let t=attr(e,`name`);if(t===null||t===``)return!1;let n=attr(e,`required`)!==null,r=!1;return forEachInRadioGroup(e,e=>e.node._checkedness()?(r=!0,!0):(attr(e,`required`)!==null&&(n=!0),!1)),n&&!r}function radioGroupHasNoChecked(e){return checkedRadioInGroup(e)===null}installAutocomplete(HTMLInputElement);var HTMLTextAreaElement=class extends HTMLElement{[tr];[E];[br];[vr];[_r];[T];[Zr];[F];[Yr];[Xr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=16,this[tr]=``,this[E]=!1,this[br]=0,this[vr]=0,this[_r]=`none`,this[T]=``,this[Zr]=null,this[F]=null,this[Yr]=!1,this[Xr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}get type(){return`textarea`}get defaultValue(){let e=``;for(let t=this[M].first;t!==null;t=t.next)(t.type===3||t.type===4)&&(e+=t.data);return e}set defaultValue(e){this.textContent=String(e)}_rawValueNow(){return this[E]?this[tr]:this.defaultValue}_apiValue(){return normalizeNewlines(this._rawValueNow())}get value(){return this._apiValue()}set value(e){let t=e===null?``:String(e),n=this._apiValue();this[M].doc[K]++,this[tr]=t,this[E]=!0,this[Yr]=!1;let r=this._apiValue();r!==n&&(this[br]=r.length,this[vr]=r.length,this[_r]=`none`)}get textLength(){return this._apiValue().length}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}_selectionLength(){return this._apiValue().length}get selectionStart(){return Math.min(this[br],this._selectionLength())}set selectionStart(e){let t=toUnsignedLong(e);setSelection(this,t,Math.max(t,this.selectionEnd),this[_r])}get selectionEnd(){return Math.min(this[vr],this._selectionLength())}set selectionEnd(e){setSelection(this,this.selectionStart,toUnsignedLong(e),this[_r])}get selectionDirection(){return this[_r]}set selectionDirection(e){setSelection(this,this.selectionStart,this.selectionEnd,String(e))}setSelectionRange(e,t,n){setSelection(this,toUnsignedLong(e),toUnsignedLong(t),n===void 0?`none`:String(n))}select(){setSelection(this,0,this._selectionLength(),`none`)}setRangeText(e,t,n,r){if(arguments.length===0)throw TypeError(`Failed to execute 'setRangeText' on 'HTMLTextAreaElement': 1 argument required, but only 0 present.`);let i=rangeText(this._apiValue(),this[br],this[vr],String(e),t,n,r,arguments.length);this[M].doc[K]++,this[tr]=i.value,this[E]=!0,setSelection(this,i.start,i.end,`none`)}_isMutable(){return!isActuallyDisabled(this[M])&&contentAttr(this[M],`readonly`)===null}_barredFromValidation(){let e=this[M];return contentAttr(e,`readonly`)!==null||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[M],t=this[T]===``?0:512,n=this._apiValue();if(contentAttr(e,`required`)!==null&&this._isMutable()&&n===``&&(t|=1),this[Yr]&&n!==``){let r=readNonNegativeLong(e,`maxlength`,-1);r!==-1&&n.length>r&&(t|=8);let i=readNonNegativeLong(e,`minlength`,-1);i!==-1&&n.length<i&&(t|=16)}return t}_validationMessage(e){if(e&1)return ks;let t=this._apiValue().length;return e&8?msgTooLong(this.maxLength,t):e&16?msgTooShort(this.minLength,t):this[T]}_reset(){this[Xr]=!1,this[E]=!1,this[Yr]=!1,this[tr]=``}_childrenChangedSteps(){if(this[E])return;let e=this._selectionLength();this[br]>e&&(this[br]=e),this[vr]>e&&(this[vr]=e)}_cloningSteps(e){let t=e;t[tr]=this[tr],t[E]=this[E]}};installConstraintValidation(HTMLTextAreaElement),str(HTMLTextAreaElement,`dirName=dirname name placeholder wrap`),bool(HTMLTextAreaElement,`disabled readOnly=readonly required`),nonNegativeLong(HTMLTextAreaElement,`maxLength=maxlength minLength=minlength`,-1),positiveWithFallback(HTMLTextAreaElement,`cols`,`cols`,20),positiveWithFallback(HTMLTextAreaElement,`rows`,`rows`,2),installAutocomplete(HTMLTextAreaElement);function opt(e){return e.node}var SelectedOptionsCollection=class extends Aa{_collect(e){let t=listOfOptions(this._s.root,[]);for(let n=0;n<t.length;n++)opt(t[n])._selectednessNow()&&e.push(t[n].node)}};Object.defineProperty(SelectedOptionsCollection.prototype,"constructor",{value:Aa,writable:!0,configurable:!0});var HTMLSelectElement=class extends HTMLElement{[T];[Zr];[F];[R];[xr];[Dr];[Kr];[Xr];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=28,this[T]=``,this[Zr]=null,this[F]=null,this[R]=null,this[xr]=null,this[Dr]=!1,this[Kr]=!1,this[Xr]=!1}_getTheParent(e){return noteChangeDispatch(this,e),super._getTheParent(e)}_ensureSettled(){this[Dr]||this._selectednessSettingAlgorithm()}_cloningSteps(e){e[Dr]=this[Dr]}_connectedSteps(){super._connectedSteps(),this._ensureSettled()}get type(){return contentAttr(this[M],`multiple`)===null?`select-one`:`select-multiple`}_displaySize(){let e=contentAttr(this[M],`size`);if(e!==null){let t=parseNonNegativeInteger(e);if(!Number.isNaN(t))return t}return contentAttr(this[M],`multiple`)===null?1:4}_isSingle(){return contentAttr(this[M],`multiple`)===null}get options(){return this[R]??=new HTMLOptionsCollection(this[M])}get length(){return listOfOptions(this[M],[]).length}set length(e){this.options.length=e}item(e){return this.options.item(e)}namedItem(e){return this.options.namedItem(e)}add(e,t=null){this.options.add(e,t)}remove(e){arguments.length===0?super.remove():this.options.remove(e)}get selectedOptions(){return this[xr]??=new SelectedOptionsCollection(this[M],!1,null)}get selectedIndex(){let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++)if(opt(e[t])._selectednessNow())return t;return-1}set selectedIndex(e){let t=Number(e)|0,n=listOfOptions(this[M],[]);for(let e=0;e<n.length;e++)opt(n[e])._setSelectedness(!1);if(t>=0&&t<n.length){let e=opt(n[t]);e._setSelectedness(!0),e[At]=!0}this._updateSelectedContent()}get value(){let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);if(n._selectednessNow())return n.value}return``}set value(e){let t=String(e),n=listOfOptions(this[M],[]),r=!1;for(let e=0;e<n.length;e++){let i=opt(n[e]);!r&&i.value===t?(i._setSelectedness(!0),i[At]=!0,r=!0):i._setSelectedness(!1)}this._updateSelectedContent()}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}showPicker(){if(isActuallyDisabled(this[M]))throw new DOMException(`Failed to execute 'showPicker' on 'HTMLSelectElement': HTMLSelectElement::showPicker() cannot be used on immutable controls.`,`InvalidStateError`)}_deselectOthers(e){if(!this._isSingle())return;let t=listOfOptions(this[M],[]);for(let n=0;n<t.length;n++)t[n]!==e&&opt(t[n])._setSelectedness(!1)}_selectednessSettingAlgorithm(){this[Dr]=!0,this._runSelectedness(),this._updateSelectedContent()}_runSelectedness(){if(!this._isSingle()||this._displaySize()!==1)return;let e=listOfOptions(this[M],[]),t=0;for(let n=0;n<e.length;n++)opt(e[n])._selectednessNow()&&t++;if(t===0){for(let t=0;t<e.length;t++)if(!isActuallyDisabled(e[t])){opt(e[t])._setSelectedness(!0);return}}else if(t>1){let t=-1;for(let n=0;n<e.length;n++)opt(e[n])._selectednessNow()&&(t=n);for(let n=0;n<e.length;n++)n!==t&&opt(e[n])._setSelectedness(!1)}}_enabledSelectedContent(){let e=this[M];if(contentAttr(e,`multiple`)!==null)return null;for(let t=e.first;t!==null;)if(t.type!==1||t.tag===Y.option||t.tag!==Y.selectedcontent)t=t.tag===Y.option?nextSkippingChildren(t,e):nextInTree(t,e);else{for(let n=t.parent;n!==null&&n!==e;n=n.parent)if(n.tag===Y.select)return null;return t}return null}_updateSelectedContent(){if(this[Kr])return;let e=this._enabledSelectedContent();if(e!==null){this[Kr]=!0;try{let t=listOfOptions(this[M],[]),n=null;for(let e=0;e<t.length;e++)if(opt(t[e])._selectednessNow()){n=t[e];break}let r=e.node;if(n===null){r.replaceChildren();return}let i=this[M].doc.createDocumentFragment();for(let e=n.first;e!==null;e=e.next)i.appendChild(e.node.cloneNode(!0));r.replaceChildren(i)}finally{this[Kr]=!1}}}_reset(){this[Xr]=!1,this[Dr]=!0;let e=listOfOptions(this[M],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);n[At]=!1,n._setSelectedness(contentAttr(e[t],`selected`)!==null)}this._selectednessSettingAlgorithm()}_childrenChangedSteps(){this._selectednessSettingAlgorithm()}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&(e===`multiple`||e===`size`)&&this._selectednessSettingAlgorithm()}_barredFromValidation(){return isActuallyDisabled(this[M])||hasDatalistAncestor(this[M])}_placeholderLabelOption(){let e=this[M];if(contentAttr(e,`required`)===null||!this._isSingle()||this._displaySize()!==1)return null;let t=listOfOptions(e,[]);if(t.length===0)return null;let n=t[0];return n.parent===e&&opt(n).value===``?n:null}_validityFlags(){let e=this[T]===``?0:512;if(contentAttr(this[M],`required`)!==null){let t=listOfOptions(this[M],[]),n=null,r=0;for(let e=0;e<t.length;e++)opt(t[e])._selectednessNow()&&(r===0&&(n=t[e]),r++);(r===0||r===1&&n===this._placeholderLabelOption())&&(e|=1)}return e}_validationMessage(e){return e&1?`Please select an item in the list.`:this[T]}};installConstraintValidation(HTMLSelectElement),str(HTMLSelectElement,`name`),addOptionIndexHost(HTMLSelectElement.prototype,e=>e.options),bool(HTMLSelectElement,`disabled multiple required`),ulong(HTMLSelectElement,`size`,0),installAutocomplete(HTMLSelectElement);function optionSelect(e){let t=!1;for(let n=e.parent;n!==null;n=n.parent){if(n.type!==1||n.ns!==`http://www.w3.org/1999/xhtml`)continue;let e=n.tag;if(e===Y.select)return n;if(e===Y.datalist||e===Y.hr||e===Y.option)return null;if(e===Y.optgroup){if(t)return null;t=!0}}return null}var HTMLOptionElement=class extends HTMLElement{[Sr];[yr];[At];constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=8,this[Sr]=!1,this[yr]=!1,this[At]=!1}_selectednessNow(){if(this[yr])return this[Sr];let e=optionSelect(this[M]);if(e!==null){let t=e.node;if(!t[Dr]&&(t._selectednessSettingAlgorithm(),this[yr]))return this[Sr]}return contentAttr(this[M],`selected`)!==null}_setSelectedness(e){this[yr]&&this[Sr]===e||(this[M].doc[K]++,this[Sr]=e,this[yr]=!0)}get selected(){return this._selectednessNow()}set selected(e){this._setSelectedness(!!e),this[At]=!0;let t=optionSelect(this[M]);if(t!==null){let n=t.node;e&&n._deselectOthers(this[M]),n._selectednessSettingAlgorithm()}}get text(){let e=this[M],t=``;for(let n=e.first;n!==null;)n.tag===Y.script||n.ns===`http://www.w3.org/2000/svg`&&n.name===`script`?n=nextSkippingChildren(n,e):((n.type===3||n.type===4)&&(t+=n.data),n=nextInTree(n,e));return stripAndCollapseWS(t)}set text(e){this.textContent=String(e)}get value(){return contentAttr(this[M],`value`)??this.text}set value(e){this.setAttribute(`value`,String(e))}get label(){let e=contentAttr(this[M],`label`);return e===null?this.text:e}set label(e){this.setAttribute(`label`,String(e))}get index(){let e=optionSelect(this[M]);if(e===null)return 0;let t=listOfOptions(e,[]).indexOf(this[M]);return t===-1?0:t}get form(){let e=optionSelect(this[M]);return e===null?null:e.node.form}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;if(e===`disabled`){t===null!=(n===null)&&resetOwnerSelect(this[M]);return}if(e!==`selected`||this[At])return;this._setSelectedness(n!==null);let i=optionSelect(this[M]);if(i!==null){let e=i.node;n!==null&&e._deselectOthers(this[M]),e._selectednessSettingAlgorithm()}}_cloningSteps(e){let t=e;t[Sr]=this._selectednessNow(),t[yr]=!0,t[At]=this[At]}};bool(HTMLOptionElement,`defaultSelected=selected disabled`);const Od=function Option(e,t,n,r){if(new.target===void 0)throw TypeError(`Failed to construct 'Option': Please use the 'new' operator, this DOM object constructor cannot be called as a function.`);let i=currentDocument(),a=i.createElement(`option`);return e!==void 0&&e!==``&&a.appendChild(i.createTextNode(String(e))),t!==void 0&&a.setAttribute(`value`,String(t)),n&&a.setAttribute(`selected`,``),a._setSelectedness(!!r),a};Od.prototype=HTMLOptionElement.prototype;function resetOwnerSelect(e){let t=optionSelect(e);t!==null&&t.node[Dr]&&t.node._selectednessSettingAlgorithm()}var HTMLOptGroupElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=24}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&e===`disabled`&&t===null!=(n===null)&&resetOwnerSelect(this[M])}_childrenChangedSteps(){let e=this[M].parent;e!==null&&e.tag===Y.select&&e.node._selectednessSettingAlgorithm()}};bool(HTMLOptGroupElement,`disabled`),str(HTMLOptGroupElement,`label`);var HTMLButtonElement=class extends HTMLElement{[T];[Zr];[F];constructor(e,t,n,r){super(e,t,n,r),this[T]=``,this[Zr]=null,this[F]=null}get type(){return buttonType(this[M])}set type(e){this.setAttribute(`type`,String(e))}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}get formAction(){return reflectActionURL(this[M],`formaction`)}set formAction(e){this.setAttribute(`formaction`,String(e))}_barredFromValidation(){let e=this[M];return buttonType(e)!==`submit`||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[M];if(isActuallyDisabled(t))return;let n=formOwner(t);if(n!==null&&t.flags&1)switch(buttonType(t)){case`submit`:submitForm(n,t,!1);return;case`reset`:resetForm(n);return}buttonInvokerActivation(t,e?.target?.[M]??null)}};installConstraintValidation(HTMLButtonElement),str(HTMLButtonElement,`formTarget=formtarget name value`),bool(HTMLButtonElement,`disabled formNoValidate=formnovalidate`),enumerated(HTMLButtonElement,`formEnctype=formenctype`,Gl),enumerated(HTMLButtonElement,`formMethod=formmethod`,Kl);function isInteractiveContent(e){switch(e.tag){case Y.a:return contentAttr(e,`href`)!==null;case Y.audio:case Y.video:return contentAttr(e,`controls`)!==null;case Y.img:return contentAttr(e,`usemap`)!==null;case Y.input:return inputType(e)!==0;case Y.button:case Y.details:case Y.embed:case Y.iframe:case Y.label:case Y.select:case Y.textarea:return!0}return!1}var HTMLLabelElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[M].flags|=12}_connectedSteps(){super._connectedSteps();let e=attr(this[M],`for`);e!==null&&addForLabel(this[M],e)}_disconnectedSteps(){super._disconnectedSteps();let e=attr(this[M],`for`);e!==null&&removeForLabel(this[M],e)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),e===`for`&&r===null&&this[M].flags&1&&t!==n&&(t!==null&&removeForLabel(this[M],t),n!==null&&addForLabel(this[M],n))}get control(){let e=labeledControl(this[M]);return e===null?null:e.node}get form(){let e=labeledControl(this[M]);if(e===null||e.tag===Y.meter||e.tag===Y.progress)return null;let t=formOwner(e);return t===null?null:t.node}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[M],n=labeledControl(t);if(n===null)return;let r=e===null?null:e.target?.[M]??null;if(r!==null&&r!==t){for(let e=r;e!==null&&e!==t;e=e.parent)if(e===n||e.type===1&&isInteractiveContent(e))return}isActuallyDisabled(n)||syntheticClick(n.node)}};str(HTMLLabelElement,`htmlFor=for`);var HTMLFieldSetElement=class extends HTMLElement{[T];[Zr];[Rt];constructor(e,t,n,r){super(e,t,n,r),this[T]=``,this[Zr]=null,this[Rt]=null}get type(){return`fieldset`}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get elements(){return this[Rt]??=Aa._descendants(this[M],isListed)}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLFieldSetElement),bool(HTMLFieldSetElement,`disabled`),str(HTMLFieldSetElement,`name`);var HTMLLegendElement=class extends HTMLElement{get form(){let e=this[M].parent;if(e===null||e.tag!==Y.fieldset)return null;let t=formOwner(e);return t===null?null:t.node}};str(HTMLLegendElement,`align`);var HTMLOutputElement=class extends HTMLElement{[Dt];[T];[Zr];[F];constructor(e,t,n,r){super(e,t,n,r),this[Dt]=null,this[T]=``,this[Zr]=null,this[F]=null}get type(){return`output`}get form(){let e=formOwner(this[M]);return e===null?null:e.node}get labels(){return this[F]??=new LabelsNodeList(this[M])}get defaultValue(){return this[Dt]??descendantTextContent(this[M])}set defaultValue(e){this[Dt]===null?this.textContent=String(e):this[Dt]=String(e)}get value(){return descendantTextContent(this[M])}set value(e){this[Dt]=this.defaultValue,this.textContent=String(e)}_reset(){this.textContent=this.defaultValue,this[Dt]=null}_barredFromValidation(){return!0}_validityFlags(){return this[T]===``?0:512}_validationMessage(e){return this[T]}};installConstraintValidation(HTMLOutputElement),str(HTMLOutputElement,`name`),tokenList(HTMLOutputElement,`htmlFor`,`for`);function attrFloat(e,t){let n=contentAttr(e[M],t);return n===null?NaN:parseFloatingPoint(n)}function setFloat(e,t,n){let r=Number(n);if(!Number.isFinite(r))throw TypeError(`Failed to set the '${t}' property: The provided double value is non-finite.`);e.setAttribute(t,serializeFloat(r))}var HTMLProgressElement=class extends HTMLElement{[F];constructor(e,t,n,r){super(e,t,n,r),this[F]=null}get max(){let e=attrFloat(this,`max`);return Number.isNaN(e)||e<=0?1:e}set max(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to set the 'max' property on 'HTMLProgressElement': The provided double value is non-finite.`);t>0&&this.setAttribute(`max`,serializeFloat(t))}get value(){let e=attrFloat(this,`value`);return Number.isNaN(e)||e<0?0:Math.min(e,this.max)}set value(e){setFloat(this,`value`,e)}get position(){return contentAttr(this[M],`value`)===null?-1:this.value/this.max}get labels(){return this[F]??=new LabelsNodeList(this[M])}},HTMLMeterElement=class extends HTMLElement{[F];constructor(e,t,n,r){super(e,t,n,r),this[F]=null}get min(){let e=attrFloat(this,`min`);return Number.isNaN(e)?0:e}set min(e){setFloat(this,`min`,e)}get max(){let e=this.min,t=attrFloat(this,`max`);return Math.max(Number.isNaN(t)?1:t,e)}set max(e){setFloat(this,`max`,e)}get value(){let e=this.min,t=this.max,n=attrFloat(this,`value`),r=Number.isNaN(n)?0:n;return r<e?e:r>t?t:r}set value(e){setFloat(this,`value`,e)}get low(){let e=this.min,t=this.max,n=attrFloat(this,`low`),r=Number.isNaN(n)?e:n;return r<e?e:r>t?t:r}set low(e){setFloat(this,`low`,e)}get high(){let e=this.low,t=this.max,n=attrFloat(this,`high`),r=Number.isNaN(n)?t:n;return r<e?e:r>t?t:r}set high(e){setFloat(this,`high`,e)}get optimum(){let e=this.min,t=this.max,n=attrFloat(this,`optimum`),r=Number.isNaN(n)?e+(t-e)/2:n;return r<e?e:r>t?t:r}set optimum(e){setFloat(this,`optimum`,e)}get labels(){return this[F]??=new LabelsNodeList(this[M])}};function isOption(e){return e.tag===Y.option}var HTMLDataListElement=class extends HTMLElement{[R];constructor(e,t,n,r){super(e,t,n,r),this[R]=null}get options(){return this[R]??=Aa._descendants(this[M],isOption)}};const kd=stubbedMethod(`HTMLFormElement`,`submit`),Ad={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:`application/x-www-form-urlencoded`,invalid:`application/x-www-form-urlencoded`},jd={keywords:[`get`,`post`,`dialog`],missing:`get`,invalid:`get`},Md={keywords:[`on`,`off`],missing:`on`,invalid:`on`};var HTMLFormElement=class extends HTMLElement{[Rt];[pt];[gt];[mt];[Gt];[kn];[dt];[ze];[Un];constructor(e,t,n,r){super(e,t,n,r),this[Rt]=null,this[pt]=[],this[gt]=-1,this[mt]=null,this[Gt]=!1,this[kn]=!1,this[dt]=!1,this[Un]=null,this[ze]=0;let i=new Proxy(this,Pd);return this[M].node=i,i}_disconnectedSteps(){super._disconnectedSteps(),this[ze]++}_namedProperty(e){let t=this[M],n=[],r=this._controls();for(let t=0;t<r.length;t++){let i=r[t];(i.id===e||contentAttr(i,`name`)===e)&&n.push(i)}if(n.length===0){let r=formOwnerScope(t,!1);for(let i=nextElementInTree(r,r);i!==null;i=nextElementInTree(i,r))i.tag===Y.img&&(i.id===e||contentAttr(i,`name`)===e)&&formOwner(i)===t&&n.push(i)}if(n.length===0){let n=this[Un]?.get(e);if(n===void 0)return;if(formOwner(n)!==t){this[Un].delete(e);return}return n.node}if(n.length>1){let n=Nd.get(t);n===void 0&&Nd.set(t,n=/* @__PURE__ */ new Map);let r=n.get(e);return r===void 0&&n.set(e,r=new RadioNodeList(t,e)),r}return(this[Un]??=/* @__PURE__ */ new Map).set(e,n[0]),n[0].node}_controls(){let e=this[M].doc;if(this[gt]===e[K]&&this[mt]===e)return this[pt];let t=formControls(this[M],[],!1);return this[pt]=t,this[gt]=e[K],this[mt]=e,t.length!==0&&holdSnapshot(e,this,this[M]),t}_dropSnapshot(){this[pt]=[],this[gt]=-1,this[mt]=null}get elements(){return this[Rt]??=createFormControlsCollection(this[M])}get length(){return this._controls().length}get action(){return reflectActionURL(this[M],`action`)}set action(e){this.setAttribute(`action`,String(e))}get encoding(){return this.enctype}set encoding(e){this.enctype=e}submit(){reportNotImplemented(this[M].doc[q],kd),submitForm(this[M],this[M],!0)}requestSubmit(e=null){let t=this[M];if(e!=null){let n=e[M];if(n===void 0||!isSubmitButton(n))throw TypeError(`Failed to execute 'requestSubmit' on 'HTMLFormElement': The specified element is not a submit button.`);if(e.form!==this)throw new DOMException(`Failed to execute 'requestSubmit' on 'HTMLFormElement': The specified element is not owned by this form element.`,`NotFoundError`);t=n}submitForm(this[M],t,!1)}reset(){resetForm(this[M]),flushFaceReactions()}checkValidity(){return formCheckValidity(this[M])}reportValidity(){return formCheckValidity(this[M])}};str(HTMLFormElement,`acceptCharset=accept-charset name rel target`),bool(HTMLFormElement,`noValidate=novalidate`),enumerated(HTMLFormElement,`enctype`,Ad),enumerated(HTMLFormElement,`method`,jd),enumerated(HTMLFormElement,`autocomplete`,Md),tokenList(HTMLFormElement,`relList`,`rel`,[`noopener`,`noreferrer`,`opener`]);const Nd=/* @__PURE__ */ new WeakMap;function supportedNames(e){let t=[],n=e._controls();for(let e=0;e<n.length;e++){let r=n[e];r.id!==``&&!t.includes(r.id)&&t.push(r.id);let i=contentAttr(r,`name`);i!==null&&i!==``&&!t.includes(i)&&t.push(i)}let r=e[Un];if(r!==null)for(let n of r.keys())!t.includes(n)&&e._namedProperty(n)!==void 0&&t.push(n);return t}function isIndexedOrNamed(e,t){if(Object.hasOwn(e,t))return!1;let n=arrayIndex(t);return n===-1?!(t in e)&&e._namedProperty(t)!==void 0:n<e._controls().length}function arrayIndex(e){let t=e.charCodeAt(0);if(t<48||t>57)return-1;let n=Number(e);return Number.isInteger(n)&&String(n)===e?n:-1}const Pd={get(e,t,n){if(typeof t==`symbol`)return e[t];if(!(t in e)){let n=arrayIndex(t);return n===-1?e._namedProperty(t):e._controls()[n]?.node}return Reflect.get(e,t,n)},has(e,t){if(typeof t==`string`&&!(t in e)){let n=arrayIndex(t);return n===-1?e._namedProperty(t)!==void 0:n<e._controls().length}return Reflect.has(e,t)},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!Object.hasOwn(e,t)&&!(t in e)){let n=arrayIndex(t),r=n===-1?e._namedProperty(t):e._controls()[n]?.node;if(r!==void 0)return{value:r,writable:!1,enumerable:n!==-1,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n,r){return typeof t==`string`&&!(t in e)&&isIndexedOrNamed(e,t)?!1:Reflect.set(e,t,n,r)},defineProperty(e,t,n){return typeof t==`string`&&isIndexedOrNamed(e,t)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&isIndexedOrNamed(e,t)?!1:Reflect.deleteProperty(e,t)},ownKeys(e){let t=[],n=e._controls().length;for(let e=0;e<n;e++)t.push(String(e));for(let n of supportedNames(e))Object.hasOwn(e,n)||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t}},Fd=/* @__PURE__ */ new Map;function recordHostOriginal(e,t){Fd.has(e)||Fd.set(e,t)}const Id=/* @__PURE__ */ new WeakSet;let Ld=null;function hostFormData(){let e=Fd.get(`FormData`);if(e!==void 0)return e;let t=globalThis.FormData;return t===FormData$1?void 0:t}function nodeFormData(){if(Ld!==null)return Ld;let e=hostFormData();if(e===void 0)throw TypeError(`FormData is not available in this Node.js runtime.`);return Ld=e,Object.setPrototypeOf(FormData$1.prototype,Ld.prototype),Object.setPrototypeOf(FormData$1,Ld),Ld}var FormData$1=class{static{__name(this,`FormData`)}constructor(e,t=null){let n=Reflect.construct(nodeFormData(),[],new.target);if(e===void 0)return n;let r=e?.[M];if(r===void 0||r.tag!==Y.form)throw TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`);let i=null;if(t!=null){let e=t[M];if(e===void 0||!isSubmitButton(e))throw TypeError(`Failed to construct 'FormData': The specified element is not a submit button.`);if(formOwner(e)!==r)throw new DOMException(`Failed to construct 'FormData': The specified element is not owned by this form element.`,`NotFoundError`);i=e}if(constructEntryList(r,i,t=>{for(let e=0;e<t.length;e++){let[r,i]=t[e];typeof i==`string`?n.append(r,i):n.append(r,i,i.name)}dispatchTrusted$1(e,new FormDataEvent(`formdata`,{bubbles:!0,cancelable:!1,formData:n}))})===null)throw new DOMException(`Failed to construct 'FormData': The form is already constructing its entry list.`,`InvalidStateError`);return n}};for(let e of[`append`,`delete`,`get`,`getAll`,`has`,`set`,`entries`,`keys`,`values`,`forEach`])Object.defineProperty(FormData$1.prototype,e,{value:{[e](...t){return nodeFormData().prototype[e].apply(this,t)}}[e],writable:!0,configurable:!0});Object.defineProperty(FormData$1.prototype,Symbol.iterator,{value:function entries(){return nodeFormData().prototype.entries.call(this)},writable:!0,configurable:!0}),Object.defineProperty(FormData$1.prototype,Symbol.toStringTag,{value:`FormData`,configurable:!0});const Rd=/* @__PURE__ */ new Map([[`input`,HTMLInputElement],[`textarea`,HTMLTextAreaElement],[`select`,HTMLSelectElement],[`option`,HTMLOptionElement],[`optgroup`,HTMLOptGroupElement],[`button`,HTMLButtonElement],[`label`,HTMLLabelElement],[`fieldset`,HTMLFieldSetElement],[`legend`,HTMLLegendElement],[`output`,HTMLOutputElement],[`progress`,HTMLProgressElement],[`meter`,HTMLMeterElement],[`datalist`,HTMLDataListElement],[`form`,HTMLFormElement]]),zd=/* @__PURE__ */ new Map([[`a`,HTMLAnchorElement],[`area`,HTMLAreaElement],[`audio`,HTMLAudioElement],[`base`,HTMLBaseElement],[`blockquote`,HTMLQuoteElement],[`q`,HTMLQuoteElement],[`body`,HTMLBodyElement],[`br`,HTMLBRElement],[`canvas`,HTMLCanvasElement],[`caption`,HTMLTableCaptionElement],[`col`,HTMLTableColElement],[`colgroup`,HTMLTableColElement],[`data`,HTMLDataElement],[`del`,HTMLModElement],[`ins`,HTMLModElement],[`details`,HTMLDetailsElement],[`dialog`,HTMLDialogElement],[`div`,HTMLDivElement],[`dl`,HTMLDListElement],[`embed`,HTMLEmbedElement],[`h1`,HTMLHeadingElement],[`h2`,HTMLHeadingElement],[`h3`,HTMLHeadingElement],[`h4`,HTMLHeadingElement],[`h5`,HTMLHeadingElement],[`h6`,HTMLHeadingElement],[`head`,HTMLHeadElement],[`hr`,HTMLHRElement],[`html`,HTMLHtmlElement],[`iframe`,HTMLIFrameElement],[`img`,HTMLImageElement],[`li`,HTMLLIElement],[`link`,HTMLLinkElement],[`map`,HTMLMapElement],[`menu`,HTMLMenuElement],[`meta`,HTMLMetaElement],[`object`,HTMLObjectElement],[`ol`,HTMLOListElement],[`p`,HTMLParagraphElement],[`param`,HTMLParamElement],[`picture`,HTMLPictureElement],[`pre`,HTMLPreElement],[`listing`,HTMLPreElement],[`xmp`,HTMLPreElement],[`script`,HTMLScriptElement],[`slot`,HTMLSlotElement],[`source`,HTMLSourceElement],[`span`,HTMLSpanElement],[`style`,HTMLStyleElement],[`table`,HTMLTableElement],[`tbody`,HTMLTableSectionElement],[`thead`,HTMLTableSectionElement],[`tfoot`,HTMLTableSectionElement],[`td`,HTMLTableCellElement],[`th`,HTMLTableCellElement],[`template`,HTMLTemplateElement],[`time`,HTMLTimeElement],[`title`,HTMLTitleElement],[`tr`,HTMLTableRowElement],[`track`,HTMLTrackElement],[`ul`,HTMLUListElement],[`video`,HTMLVideoElement],[`dir`,HTMLDirectoryElement],[`font`,HTMLFontElement],[`frame`,HTMLFrameElement],[`frameset`,HTMLFrameSetElement],[`marquee`,HTMLMarqueeElement],[`summary`,sd]]);for(let e of/* @__PURE__ */ `abbr.address.article.aside.b.bdi.bdo.cite.code.dd.dfn.dt.em.figcaption.figure.footer.header.hgroup.i.kbd.main.mark.nav.noscript.rp.rt.ruby.s.samp.search.section.small.strong.sub.sup.u.var.wbr.acronym.basefont.big.center.nobr.noembed.noframes.plaintext.rb.rtc.strike.tt.selectedcontent`.split(`.`))zd.set(e,HTMLElement);for(let[e,t]of Rd)zd.set(e,t);installPopoverInvoker(zd.get(`button`)),installPopoverInvoker(zd.get(`input`)),installCommandInvoker(zd.get(`button`));function elementClassFor(e,t){if(t===`http://www.w3.org/1999/xhtml`){let t=zd.get(e);return t===void 0?e.includes(`-`)&&isValidCustomElementName(e)?HTMLElement:HTMLUnknownElement:t}return t===`http://www.w3.org/2000/svg`?gd.get(e)??SVGElement:t===`http://www.w3.org/1998/Math/MathML`?MathMLElement:Io}setElementClassLookup(elementClassFor);let Bd=null;function isBuiltinInterface(e){if(Bd===null){Bd=/* @__PURE__ */ new Set([HTMLElement,HTMLUnknownElement,HTMLMediaElement]);for(let e of zd.values())Bd.add(e)}return Bd.has(e)}function localNamesForInterface(e){let t=[];for(let[n,r]of zd)r===e&&t.push(n);return t}_l.createCustomElementRegistry=e=>customElementRegistryFor(e);function setClassString(e){let t=e.prototype;Object.hasOwn(t,Symbol.toStringTag)||Object.defineProperty(t,Symbol.toStringTag,{value:e.name,configurable:!0})}for(let e of[HTMLElement,HTMLUnknownElement,HTMLMediaElement,SVGElement,MathMLElement,...zd.values(),...gd.values()])(e.name!==`HTMLElement`||e===HTMLElement)&&setClassString(e);for(let e of[SVGGraphicsElement,SVGGeometryElement,SVGTextContentElement,SVGTextPositioningElement,SVGGradientElement])setClassString(e);const Vd=[`window`,`self`,`frames`,`parent`,`top`],Hd=/* @__PURE__ */ `addEventListener.removeEventListener.dispatchEvent.getComputedStyle.matchMedia.requestAnimationFrame.cancelAnimationFrame.requestIdleCallback.cancelIdleCallback.getSelection.scroll.scrollTo.scrollBy.resizeTo.resizeBy.moveTo.moveBy.alert.confirm.prompt.print.open.close.stop.focus.blur.postMessage.reportError.captureEvents.releaseEvents`.split(`.`),Ud=new Set(Fu);let Wd=null;function windowAttributes(){if(Wd!==null)return Wd;let e=windowInterfaces(),t=/* @__PURE__ */ new Set([...Vd,...Hd,`document`,`constructor`]),n=[];for(let r=Window.prototype;r!==null&&r!==Object.prototype;r=Object.getPrototypeOf(r))for(let i of Object.getOwnPropertyNames(r))t.has(i)||Ud.has(i)||i in e||i.startsWith(`_`)||Object.getOwnPropertyDescriptor(r,i).get!==void 0&&(t.add(i),n.push(i));return n.push(`name`,`status`,`opener`),Wd=n}function hasSetter(e,t){for(let n=e;n!==null;n=Object.getPrototypeOf(n)){let e=Object.getOwnPropertyDescriptor(n,t);if(e!==void 0)return e.set!==void 0||e.writable===!0}return!1}function installGlobals(e,t=globalThis){let n=/* @__PURE__ */ new Map,r=currentWindowOrNull(),define=(e,r)=>{let i=Object.getOwnPropertyDescriptor(t,e);(i===void 0||i.configurable)&&(n.has(e)||n.set(e,i),i!==void 0&&`value`in i&&t===globalThis&&recordHostOriginal(e,i.value),Object.defineProperty(t,e,r))};for(let e of Vd)define(e,{value:t,writable:!0,enumerable:!0,configurable:!0});define(`document`,{value:e.document,writable:!0,enumerable:!0,configurable:!0});let i=e[R].compat,a=hiddenGlobals(i),o=windowInterfaces();for(let e in o)a.has(e)||define(e,{value:o[e],writable:!0,enumerable:!1,configurable:!0});let s=optInInterfaces();for(let e in s)a.has(e)||define(e,{value:s[e],writable:!0,enumerable:!1,configurable:!0});let c=installCompatMembers(i,o),l=e;for(let t of Hd){if(a.has(t))continue;let n=l[t].bind(e);Id.add(n),define(t,{value:n,writable:!0,enumerable:!0,configurable:!0})}let u=windowAttributes(),d=Object.hasOwn(e,`visualViewport`)?[...u,`visualViewport`]:u;for(let n of d)(!a.has(n)||Object.hasOwn(e,n))&&define(n,{get(){return e[n]},set:hasSetter(e,n)?t=>{e[n]=t}:e=>{Object.defineProperty(t,n,{value:e,writable:!0,enumerable:!0,configurable:!0})},enumerable:!0,configurable:!0});let m=e.document;Object.defineProperty(m,"defaultView",{get:()=>t,enumerable:!0,configurable:!0}),setCurrentWindow(e);let h=e[j];e[j]=t;let _=e[tn];e[tn]=t;let v=Mu.get(t);Mu.set(t,e);let ee=!0;return function uninstall(){if(ee){ee=!1,delete m.defaultView;for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),c(),e[j]=h,e[tn]=_,Mu.get(t)===e&&(v===void 0?Mu.delete(t):Mu.set(t,v)),currentWindowOrNull()===e&&setCurrentWindow(r)}}}var XhrState=class{window;state;send;sync;method;url;headers;timeout;withCredentials;upload;uploadComplete;uploadListener;uploadTotal;responseType;overrideMime;error;status;statusText;responseURL;responseHeaders;chunks;received;bytesCache;textCache;object;generation;request;timer;startedAt;closeTask;constructor(e,t){this.window=e,this.state=0,this.send=!1,this.sync=!1,this.method=`GET`,this.url=null,this.headers=/* @__PURE__ */ new Map,this.timeout=0,this.withCredentials=!1,this.upload=t,this.uploadComplete=!1,this.uploadListener=!1,this.uploadTotal=0,this.responseType=``,this.overrideMime=null,this.error=!0,this.status=0,this.statusText=``,this.responseURL=``,this.responseHeaders=[],this.chunks=[],this.received=0,this.bytesCache=null,this.textCache=null,this.object=void 0,this.generation=0,this.request=null,this.timer=null,this.startedAt=0,this.closeTask=null}},Gd=class XMLHttpRequestEventTarget extends EventTarget{constructor(){if(new.target===XMLHttpRequestEventTarget)throw TypeError(`Illegal constructor`);super()}};const Kd=Symbol(`upload`);var XMLHttpRequestUpload=class extends Gd{constructor(e){if(e!==Kd)throw TypeError(`Illegal constructor`);super()}};function defineHandlers(e,t){for(let n of t)Object.defineProperty(e,`on${n}`,{get(){return getEventHandler(this,n)},set(e){setEventHandler(this,n,e)},enumerable:!0,configurable:!0})}defineHandlers(Gd.prototype,[`loadstart`,`progress`,`abort`,`error`,`load`,`timeout`,`loadend`]);function fireProgress(e,t,n,r,i=r>0){fireAnEvent(t,e,eventInterface(`ProgressEvent`),{loaded:n,total:r,lengthComputable:i})}function fireReadyStateChange(e){fireAnEvent(`readystatechange`,e,Event)}const state=e=>{let t=e?.[oi];if(t===void 0)throw TypeError(`Illegal invocation`);return t},invalidState=(e,t)=>new DOMException(`Failed to ${e} 'XMLHttpRequest': ${t}`,`InvalidStateError`);var XMLHttpRequest=class extends Gd{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;[oi];constructor(){super(),this[oi]=new XhrState(currentWindowOrNull(),new XMLHttpRequestUpload(Kd))}get readyState(){return state(this).state}open(e,t,n,r,i){let a=state(this);if(arguments.length<2)throw TypeError(`Failed to execute 'open' on 'XMLHttpRequest': 2 arguments required, but only ${arguments.length} present.`);if(a.window!==null&&a.window[ot])throw invalidState(`execute 'open' on`,`The document is not fully active.`);if(e=String(e),!qd.test(e))throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': '${e}' is not a valid HTTP method.`,`SyntaxError`);let o=e.toUpperCase();if(o===`CONNECT`||o===`TRACE`||o===`TRACK`)throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': '${e}' HTTP method is unsupported.`,`SecurityError`);Jd.has(o)&&(e=o);let s=URL.parse(String(t),a.window?.document.baseURI??void 0);if(s===null)throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': Invalid URL`,`SyntaxError`);let c=arguments.length<3||!!n;if(s.host!==``&&(r!=null&&(s.username=String(r)),i!=null&&(s.password=String(i))),!c&&(a.timeout!==0||a.responseType!==``))throw new DOMException(`Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document must not set a timeout or responseType.`,`InvalidAccessError`);terminate(a),a.send=!1,a.uploadListener=!1,a.method=e,a.url=s,a.sync=!c,a.headers.clear(),setNetworkError(a),a.state!==1&&(a.state=1,fireReadyStateChange(this))}setRequestHeader(e,t){let n=state(this);if(arguments.length<2)throw TypeError(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 2 arguments required, but only ${arguments.length} present.`);if(n.state!==1||n.send)throw invalidState(`execute 'setRequestHeader' on`,`The object's state must be OPENED.`);if(e=String(e),t=String(t).replace(/^[\t\n\r ]+|[\t\n\r ]+$/g,``),!qd.test(e))throw new DOMException(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${e}' is not a valid HTTP header field name.`,`SyntaxError`);if(/[\0\r\n]/.test(t))throw new DOMException(`Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '${t}' is not a valid HTTP header field value.`,`SyntaxError`);let r=e.toLowerCase();if(Xd.has(r)||r.startsWith(`proxy-`)||r.startsWith(`sec-`))return;let i=n.headers.get(r);n.headers.set(r,i===void 0?[e,t]:[i[0],`${i[1]}, ${t}`])}get timeout(){return state(this).timeout}set timeout(e){let t=state(this);if(t.sync&&t.state!==0)throw new DOMException(`Failed to set the 'timeout' property on 'XMLHttpRequest': Timeouts cannot be set for synchronous requests made from a document.`,`InvalidAccessError`);t.timeout=Number(e)>>>0,t.send&&t.request!==null&&scheduleTimeout(this,t)}get withCredentials(){return state(this).withCredentials}set withCredentials(e){let t=state(this);if(t.state!==0&&t.state!==1||t.send)throw invalidState(`set the 'withCredentials' property on`,`The value may only be set if the object's state is UNSENT or OPENED.`);t.withCredentials=!!e}get upload(){return state(this).upload}send(e){let t=state(this);if(t.state!==1||t.send)throw invalidState(`execute 'send' on`,`The object's state must be OPENED.`);if(t.window!==null&&t.window[ot])throw invalidState(`execute 'send' on`,`The document is not fully active.`);if(t.sync)throw new DOMException(`Failed to execute 'send' on 'XMLHttpRequest': Synchronous XMLHttpRequest is not supported by @ctrl/dom (docs/deviations.md).`,`NotSupportedError`);let n=null;if(e!=null&&t.method!==`GET`&&t.method!==`HEAD`){n=extractBody(e);let r=t.headers.get(`content-type`);r===void 0?n.type!==null&&t.headers.set(`content-type`,[`Content-Type`,n.type]):(typeof e==`string`||e instanceof Z)&&(r[1]=r[1].replace(/;\s*charset=("[^"]*"|[^;]*)/i,e=>/utf-8/i.test(e)?e:`;charset=UTF-8`))}t.uploadListener=(t.upload[En]?.size??0)>0,t.uploadTotal=n?.length??0,t.uploadComplete=t.uploadTotal===0,t.send=!0,fireProgress(this,`loadstart`,0,0),!t.uploadComplete&&t.uploadListener&&fireProgress(t.upload,`loadstart`,0,t.uploadTotal),t.state===1&&t.send&&start(this,t,n)}abort(){let e=state(this);terminate(e),(e.state===1&&e.send||e.state===2||e.state===3)&&requestErrorSteps(this,e,`abort`),e.state===4&&(e.state=0,setNetworkError(e))}get responseURL(){return state(this).responseURL}get status(){return state(this).status}get statusText(){return state(this).statusText}getResponseHeader(e){let t=state(this),n=String(e).toLowerCase();if(n===`set-cookie`||n===`set-cookie2`)return null;let r=null;for(let[e,i]of t.responseHeaders)e===n&&(r=r===null?i:`${r}, ${i}`);return r}getAllResponseHeaders(){let e=state(this),t=/* @__PURE__ */ new Map;for(let[n,r]of e.responseHeaders){if(n===`set-cookie`||n===`set-cookie2`)continue;let e=t.get(n);t.set(n,e===void 0?r:`${e}, ${r}`)}let n=[...t.keys()].sort((e,t)=>{let n=e.toUpperCase(),r=t.toUpperCase();return n<r?-1:+(n>r)}),r=``;for(let e of n)r+=`${e}: ${t.get(e)}\r\n`;return r}overrideMimeType(e){let t=state(this);if(t.state===3||t.state===4)throw invalidState(`execute 'overrideMimeType' on`,`MimeType cannot be overridden when the state is LOADING or DONE.`);t.overrideMime=parseMime(String(e))===null?`application/octet-stream`:String(e)}get responseType(){return state(this).responseType}set responseType(e){let t=state(this);if(e=String(e),Yd.has(e)){if(t.state===3||t.state===4)throw invalidState(`set the 'responseType' property on`,`The response type cannot be set if the object's state is LOADING or DONE.`);if(t.sync&&t.state!==0)throw new DOMException(`Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be changed for synchronous requests made from a document.`,`InvalidAccessError`);t.responseType=e}}get response(){let e=state(this),t=e.responseType;if(t===``||t===`text`)return e.state===3||e.state===4?text(e):``;if(e.state!==4)return null;if(e.object!==void 0)return e.object;let n=null;return e.error||(t===`arraybuffer`?n=new Uint8Array(bytes(e)).buffer:t===`blob`?n=new Blob([bytes(e)],{type:finalMime(e)?.serialized??``}):t===`document`?n=documentResponse(e):t===`json`&&(n=jsonResponse(e))),e.object=n,n}get responseText(){let e=state(this);if(e.responseType!==``&&e.responseType!==`text`)throw invalidState(`read the 'responseText' property from`,`The value is only accessible if the object's 'responseType' is '' or 'text' (was '${e.responseType}').`);return e.state===3||e.state===4?text(e):``}get responseXML(){let e=state(this);if(e.responseType!==``&&e.responseType!==`document`)throw invalidState(`read the 'responseXML' property from`,`The value is only accessible if the object's 'responseType' is '' or 'document' (was '${e.responseType}').`);return e.state!==4||e.error?null:(e.object===void 0&&(e.object=documentResponse(e)),e.object)}};defineHandlers(XMLHttpRequest.prototype,[`readystatechange`]);for(let[e,t]of[[`UNSENT`,0],[`OPENED`,1],[`HEADERS_RECEIVED`,2],[`LOADING`,3],[`DONE`,4]])Object.defineProperty(XMLHttpRequest.prototype,e,{value:t,enumerable:!0});const qd=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Jd=/* @__PURE__ */ new Set([`DELETE`,`GET`,`HEAD`,`OPTIONS`,`POST`,`PUT`]),Yd=/* @__PURE__ */ new Set([``,`arraybuffer`,`blob`,`document`,`json`,`text`]),Xd=/* @__PURE__ */ new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`set-cookie`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]),Zd=[`content-encoding`,`content-language`,`content-location`,`content-type`];function terminate(e){e.generation++,e.request!==null&&(e.request.destroy(),e.request=null),e.timer!==null&&(e.window?._cancelTask(e.timer),e.timer=null),e.closeTask!==null&&(e.window?._releaseCloseable(e.closeTask),e.closeTask=null)}function setNetworkError(e){e.error=!0,e.status=0,e.statusText=``,e.responseURL=``,e.responseHeaders=[],e.chunks=[],e.received=0,e.bytesCache=null,e.textCache=null,e.object=void 0}function requestErrorSteps(e,t,n){t.state=4,t.send=!1,setNetworkError(t),fireReadyStateChange(e),t.uploadComplete||(t.uploadComplete=!0,t.uploadListener&&(fireProgress(t.upload,n,0,0),fireProgress(t.upload,`loadend`,0,0))),fireProgress(e,n,0,0),fireProgress(e,`loadend`,0,0)}function scheduleTimeout(e,t){if(t.timer!==null&&(t.window?._cancelTask(t.timer),t.timer=null),t.timeout===0||t.window===null)return;let n=t.generation,r=Math.max(0,t.timeout-(Date.now()-t.startedAt));t.timer=t.window._task(()=>{t.timer=null,t.generation===n&&(terminate(t),requestErrorSteps(e,t,`timeout`))},r)}function start(e,t,n){let r=t.generation;t.startedAt=Date.now(),t.closeTask=t.window?._closeable(()=>terminate(t))??null,scheduleTimeout(e,t);let go=n=>{t.generation===r&&dispatchRequest(e,t,r,t.url,t.method,n,new Map(t.headers),0)};n===null?go(null):n.bytes instanceof Uint8Array?go(n.bytes):n.bytes.then(go,()=>t.generation===r&&networkError(e,t))}function networkError(e,t){terminate(t),requestErrorSteps(e,t,`error`)}function sameOrigin(e,t){return e.origin!==`null`&&e.origin===URL.parse(t)?.origin}function dispatchRequest(e,t,n,r,i,a,o,s){if(r.protocol===`data:`)return void queueMicrotask(()=>t.generation===n&&respondFromData(e,t,n,r));if(r.protocol===`blob:`)return void respondFromBlob(e,t,n,r);if(r.protocol!==`http:`&&r.protocol!==`https:`)return void queueMicrotask(()=>t.generation===n&&networkError(e,t));let c=t.window,l=c?.document.URL??`about:blank`,u=sameOrigin(r,l)||t.withCredentials,d={};for(let[e,t]of o.values())d[e]=t;let has=e=>o.has(e);has(`user-agent`)||(d[`User-Agent`]=c?.navigator.userAgent??``),has(`accept`)||(d.Accept=`*/*`),has(`accept-language`)||(d[`Accept-Language`]=`en`),d[`Accept-Encoding`]=`gzip, deflate`;let m=URL.parse(l);if(m!==null&&(m.protocol===`http:`||m.protocol===`https:`)&&(m.hash=``,m.username=``,m.password=``,d.Referer=m.origin===r.origin?m.href:`${m.origin}/`,m.origin!==r.origin&&(d.Origin=m.origin)),u&&c!==null){let e=c._cookieStore.get(r);e!==``&&(d.Cookie=e)}let h=new URL(r);(h.username!==``||h.password!==``)&&(has(`authorization`)||(d.Authorization=`Basic ${Buffer.from(`${decodeURIComponent(h.username)}:${decodeURIComponent(h.password)}`).toString(`base64`)}`),h.username=``,h.password=``),h.hash=``,a!==null&&(d[`Content-Length`]=String(a.byteLength));let _=process.getBuiltinModule(h.protocol===`https:`?`node:https`:`node:http`),v;try{v=_.request(h,{method:i,headers:d})}catch{queueMicrotask(()=>t.generation===n&&networkError(e,t));return}t.request=v,v.on(`error`,()=>{t.generation===n&&networkError(e,t)}),v.on(`response`,l=>{if(t.generation!==n){l.resume();return}let d=l.statusCode??0,m=l.headers[`set-cookie`];if(u&&c!==null&&m!==void 0)for(let e of m)c._cookieStore.set(e,r);let h=l.headers.location;if((d===301||d===302||d===303||d===307||d===308)&&h!==void 0){l.resume();let c=URL.parse(h,r);if(c===null||s>=20)return networkError(e,t);let u=i,m=a,_=new Map(o);if((d===301||d===302)&&i===`POST`||d===303&&i!==`GET`&&i!==`HEAD`){u=`GET`,m=null;for(let e of Zd)_.delete(e)}c.origin!==r.origin&&_.delete(`authorization`),dispatchRequest(e,t,n,c,u,m,_,s+1);return}let _=[];for(let e=0;e<l.rawHeaders.length;e+=2)_.push([l.rawHeaders[e].toLowerCase(),l.rawHeaders[e+1]]);let v=String(l.headers[`content-encoding`]??``).trim().toLowerCase(),ee=process.getBuiltinModule(`node:zlib`),y=v===`gzip`||v===`x-gzip`?ee.createGunzip():v===`deflate`?ee.createInflate():v===`br`?ee.createBrotliDecompress():null,te=Number(l.headers[`content-length`]??0)||0;processResponse(e,t,n,r,d,l.statusMessage??``,_,y===null?l:l.pipe(y),y===null?te:0)}),a===null?v.end():v.end(a)}function processResponse(e,t,n,r,i,a,o,s,c){if(!t.uploadComplete&&(t.uploadComplete=!0,t.uploadListener&&(fireProgress(t.upload,`progress`,t.uploadTotal,t.uploadTotal),fireProgress(t.upload,`load`,t.uploadTotal,t.uploadTotal),fireProgress(t.upload,`loadend`,t.uploadTotal,t.uploadTotal),t.generation!==n)))return;let l=new URL(r);if(l.hash=``,t.error=!1,t.status=i,t.statusText=a,t.responseURL=l.href,t.responseHeaders=o,t.state=2,fireReadyStateChange(e),t.generation!==n)return;let u=-1,end=()=>{t.generation===n&&(terminate(t),u!==t.received&&fireProgress(e,`progress`,t.received,c,c>0),t.send=!1,t.state=4,fireReadyStateChange(e),fireProgress(e,`load`,t.received,c,c>0),fireProgress(e,`loadend`,t.received,c,c>0))};if(s===null)return end();s.on(`data`,r=>{t.generation===n&&(t.chunks.push(r),t.received+=r.length,t.bytesCache=null,t.textCache=null,t.state===2&&(t.state=3),fireReadyStateChange(e),t.generation===n&&(u=t.received,fireProgress(e,`progress`,t.received,c,c>0)))}),s.on(`end`,end),s.on(`error`,()=>{t.generation===n&&networkError(e,t)})}function respondFromData(e,t,n,r){let i=r.href.slice(5),a=i.indexOf(`,`);if(a===-1)return networkError(e,t);let o=i.slice(0,a).trim(),s,c=decodeURIComponentBytes(i.slice(a+1).replace(/#.*$/,``)),l=/;\s*base64\s*$/i;if(l.test(o)){o=o.replace(l,``);let n=c.toString(`latin1`).replace(/[\t\n\f\r ]/g,``);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(n)||n.replace(/=+$/,``).length%4==1)return networkError(e,t);s=Buffer.from(n,`base64`)}else s=c;o.startsWith(`;`)&&(o=`text/plain${o}`),processResponse(e,t,n,r,200,`OK`,[[`content-type`,parseMime(o)?.serialized??`text/plain;charset=US-ASCII`]],bufferStream(s),s.length)}function respondFromBlob(e,t,n,r){let i=process.getBuiltinModule(`node:buffer`).resolveObjectURL(r.href);if(i===void 0||t.method!==`GET`)return void queueMicrotask(()=>t.generation===n&&networkError(e,t));i.arrayBuffer().then(a=>{if(t.generation!==n)return;let o=[[`content-length`,String(i.size)]];i.type!==``&&o.push([`content-type`,i.type]),processResponse(e,t,n,r,200,`OK`,o,bufferStream(Buffer.from(a)),i.size)},()=>t.generation===n&&networkError(e,t))}function bufferStream(e){if(e.length===0)return null;let t={},n={on(e,r){return t[e]=r,n}};return queueMicrotask(()=>{t.data?.(e),t.end?.()}),n}function decodeURIComponentBytes(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===37&&/^[0-9A-Fa-f]{2}$/.test(e.slice(n+1,n+3)))t.push(Number.parseInt(e.slice(n+1,n+3),16)),n+=2;else if(r<128)t.push(r);else for(let r of Buffer.from(e[n]))t.push(r)}return Buffer.from(t)}const tag=e=>Object.prototype.toString.call(e);function extractBody(e){if(e instanceof Z){let t=e[M],n=e[N],r=Buffer.from(n?serializeChildren(t):serializeXML(t,!1));return{bytes:r,type:n?`text/html;charset=UTF-8`:`application/xml;charset=UTF-8`,length:r.length}}if(e instanceof Blob)return{bytes:e.arrayBuffer().then(e=>new Uint8Array(e)),type:e.type===``?null:e.type,length:e.size};if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice();return{bytes:t,type:null,length:t.length}}if(tag(e)===`[object ArrayBuffer]`||tag(e)===`[object SharedArrayBuffer]`){let t=new Uint8Array(e.slice(0));return{bytes:t,type:null,length:t.length}}if(tag(e)===`[object FormData]`)return multipart(e);if(tag(e)===`[object URLSearchParams]`){let t=Buffer.from(String(e));return{bytes:t,type:`application/x-www-form-urlencoded;charset=UTF-8`,length:t.length}}let t=Buffer.from(String(e).toWellFormed());return{bytes:t,type:`text/plain;charset=UTF-8`,length:t.length}}function multipart(e){let t=`----ctrl-dom-${crypto.randomUUID().replaceAll(`-`,``)}`,escape=e=>e.replaceAll(`
46
46
  `,`%0A`).replaceAll(`\r`,`%0D`).replaceAll(`"`,`%22`),n=[],r=0,i=!1;for(let[a,o]of e){let e=escape(a.toWellFormed().replace(/\r(?!\n)|(?<!\r)\n/g,`\r
47
47
  `));if(typeof o==`string`){let i=o.toWellFormed().replace(/\r(?!\n)|(?<!\r)\n/g,`\r
48
48
  `),a=Buffer.from(`--${t}\r\nContent-Disposition: form-data; name="${e}"\r\n\r\n${i}\r\n`);n.push(a),r+=a.length}else{let a=o,s=Buffer.from(`--${t}\r\nContent-Disposition: form-data; name="${e}"; filename="${escape(a.name??`blob`)}"\r\nContent-Type: ${a.type||`application/octet-stream`}\r\n\r\n`);n.push(s,a.arrayBuffer().then(e=>new Uint8Array(e)),Buffer.from(`\r
49
- `)),r+=s.length+a.size+2,i=!0}}let a=Buffer.from(`--${t}--\r\n`);n.push(a),r+=a.length;let o=`multipart/form-data; boundary=${t}`;return i?{bytes:Promise.all(n).then(e=>Buffer.concat(e)),type:o,length:r}:{bytes:Buffer.concat(n),type:o,length:r}}function parseMime(e){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim().toLowerCase(),r=n.indexOf(`/`);if(r<=0||r===n.length-1||!Kd.test(n.slice(0,r))||!Kd.test(n.slice(r+1)))return null;let i=null;if(t!==-1){let n=/(?:^|;)\s*charset\s*=\s*("([^"]*)"|[^;]*)/i.exec(e.slice(t));n!==null&&(i=(n[2]??n[1]).trim()||null)}return{essence:n,charset:i,serialized:e.trim()}}function finalMime(e){if(e.overrideMime!==null)return parseMime(e.overrideMime);let t=null;for(let[n,r]of e.responseHeaders)n===`content-type`&&(t=r);return(t===null?null:parseMime(t))??parseMime(`text/xml`)}function bytes(e){return e.bytesCache??=e.chunks.length===1?e.chunks[0]:Buffer.concat(e.chunks)}function decode(e,t){e[0]===239&&e[1]===187&&e[2]===191?t=`utf-8`:e[0]===254&&e[1]===255?t=`utf-16be`:e[0]===255&&e[1]===254&&(t=`utf-16le`);try{return new TextDecoder(t??`utf-8`).decode(e)}catch{return new TextDecoder(`utf-8`).decode(e)}}function text(e){if(e.error)return``;if(e.textCache!==null)return e.textCache;let t=decode(bytes(e),finalMime(e)?.charset??null);return e.state===4&&(e.textCache=t),t}function jsonResponse(e){let t=bytes(e);if(t.length===0)return null;try{return JSON.parse(decode(t,`utf-8`))}catch{return null}}const isXMLMime=e=>e===`text/xml`||e===`application/xml`||e.endsWith(`+xml`);function documentResponse(e){if(e.error)return null;let t=finalMime(e);if(t===null)return null;let n=t.essence===`text/html`;if(!n&&!isXMLMime(t.essence)||n&&e.responseType===``)return null;let r=decode(bytes(e),t.charset);if(n){let t=Z._createHTML(null,e.responseURL);return parseDocument(r,t),t}let i=new Z;i[ft]=t.essence,i[K]=e.responseURL,parseXML(r,i,t.essence);let a=i.documentElement;return a!==null&&a.localName===`parsererror`&&a.namespaceURI===`http://www.mozilla.org/newlayout/xml/parsererror.xml`?null:i}var FileReader=class extends EventTarget{static EMPTY=0;static LOADING=1;static DONE=2;[tr];[sr];[Bt];[$t];constructor(){super(),this[tr]=0,this[sr]=null,this[Bt]=null,this[$t]=0}get readyState(){return this[tr]}get result(){return this[sr]}get error(){return this[Bt]}readAsArrayBuffer(e){this._read(e,`ArrayBuffer`)}readAsBinaryString(e){this._read(e,`BinaryString`)}readAsText(e,t){this._read(e,`Text`,t)}readAsDataURL(e){this._read(e,`DataURL`)}abort(){this[tr]===0||this[tr]===2?this[sr]=null:(this[$t]++,this[tr]=2,this[sr]=null,this._fire(`abort`),this[tr]!==1&&this._fire(`loadend`))}_read(e,t,n){if(!(e instanceof Blob))throw TypeError(`Failed to execute 'readAs${t}' on 'FileReader': parameter 1 is not of type 'Blob'.`);if(this[tr]===1)throw new DOMException(`Failed to execute 'readAs`+t+`' on 'FileReader': The object is already busy reading Blobs.`,`InvalidStateError`);this[tr]=1,this[sr]=null,this[Bt]=null;let r=++this[$t];queueMicrotask(()=>{r===this[$t]&&this._fire(`loadstart`)}),e.arrayBuffer().then(i=>{if(r!==this[$t])return;let a=i.byteLength;this._fire(`progress`,a,a),r===this[$t]&&(this[tr]=2,this[sr]=packageData(i,t,e.type,n),this._fire(`load`,a,a),this[tr]!==1&&this._fire(`loadend`,a,a))},e=>{r===this[$t]&&(this[tr]=2,this[Bt]=e instanceof DOMException?e:new DOMException(String(e),`NotReadableError`),this._fire(`error`),this[tr]!==1&&this._fire(`loadend`))})}_fire(e,t=0,n=0){let r=eventInterface(`ProgressEvent`);this.dispatchEvent(new r(e,{lengthComputable:n>0,loaded:t,total:n}))}};for(let e of[`loadstart`,`progress`,`load`,`abort`,`error`,`loadend`])Object.defineProperty(FileReader.prototype,`on${e}`,{get(){return getEventHandler(this,e)},set(t){setEventHandler(this,e,t)},enumerable:!0,configurable:!0});for(let[e,t]of[[`EMPTY`,0],[`LOADING`,1],[`DONE`,2]])Object.defineProperty(FileReader.prototype,e,{value:t,enumerable:!0});function packageData(e,t,n,r){switch(t){case`ArrayBuffer`:return e;case`BinaryString`:{let t=new Uint8Array(e),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return n}case`Text`:{let t=`utf-8`;if(r!==void 0)try{t=new TextDecoder(r).encoding}catch{}return new TextDecoder(t).decode(e)}case`DataURL`:return`data:${n||`application/octet-stream`};base64,${Buffer.from(e).toString(`base64`)}`}}const Zd={observe:null,unobserve:null,disconnect:null};var ResizeObserver=class{[Ze];[Ir];constructor(e){if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': parameter 1 is not of type 'ResizeObserverCallback'.`);this[Ze]=e,this[Ir]=/* @__PURE__ */ new Set}observe(e,t){if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.`);this[Ir].add(e),Zd.observe?.(this,e,t?.box===void 0?`content-box`:String(t.box))}unobserve(e){this[Ir].delete(e),Zd.unobserve?.(this,e)}disconnect(){this[Ir].clear(),Zd.disconnect?.(this)}get[Symbol.toStringTag](){return`ResizeObserver`}},IntersectionObserver=class{[Ze];[Ir];root;rootMargin;scrollMargin;thresholds;constructor(e,t={}){if(typeof e!=`function`)throw TypeError(`Failed to construct 'IntersectionObserver': parameter 1 is not of type 'IntersectionObserverCallback'.`);this[Ze]=e,this[Ir]=/* @__PURE__ */ new Set,this.root=t.root??null,this.rootMargin=normalizeMargin(t.rootMargin??`0px`),this.scrollMargin=normalizeMargin(t.scrollMargin??`0px`);let n=t.threshold??0,r=(Array.isArray(n)?n:[n]).map(Number);for(let e of r)if(!(e>=0&&e<=1))throw RangeError(`Failed to construct 'IntersectionObserver': Threshold values must be numbers between 0 and 1`);this.thresholds=Object.freeze(r.sort((e,t)=>e-t))}observe(e){this[Ir].add(e)}unobserve(e){this[Ir].delete(e)}disconnect(){this[Ir].clear()}takeRecords(){return[]}get[Symbol.toStringTag](){return`IntersectionObserver`}};function normalizeMargin(e){let t=String(e).trim().split(/\s+/).filter(Boolean);t.length===0&&t.push(`0px`);for(let e of t)if(!/^-?(\d+|\d*\.\d+)(px|%)$/.test(e)&&e!==`0`)throw new DOMException(`Failed to construct 'IntersectionObserver': rootMargin must be specified in pixels or percent.`,`SyntaxError`);let[n,r=n,i=n,a=r]=t.map(e=>e===`0`?`0px`:e);return`${n} ${r} ${i} ${a}`}const Qd=/* @__PURE__ */ new Set([`none`,`copy`,`link`,`move`]),$d=/* @__PURE__ */ new Set([`none`,`copy`,`copyLink`,`copyMove`,`link`,`linkMove`,`move`,`all`,`uninitialized`]);function asciiLowercase(e){return e.replace(/[A-Z]/g,e=>e.toLowerCase())}let ef=!1;var DataTransferItem=class{[Sn];[Br];[Ct];[Vt];constructor(){if(!ef)throw TypeError(`Illegal constructor`);this[Sn]=``,this[Br]=``,this[Ct]=``,this[Vt]=null}get kind(){return this[Sn]}get type(){return this[Br]}getAsString(e){if(e==null||this[Sn]!==`string`)return;let t=this[Ct];queueMicrotask(()=>e(t))}getAsFile(){return this[Sn]===`file`?this[Vt]:null}webkitGetAsEntry(){return null}};Object.defineProperty(DataTransferItem.prototype,Symbol.toStringTag,{value:`DataTransferItem`,configurable:!0});function makeItem(e,t,n,r){ef=!0;try{let i=new DataTransferItem;return i[Sn]=e,i[Br]=t,i[Ct]=n,i[Vt]=r,hideInternals(i),i}finally{ef=!1}}var DataTransferItemList=class{[P];[B];constructor(){if(!ef)throw TypeError(`Illegal constructor`);this[P]=[],this[B]=null}get length(){return this[P].length}add(e,t){let n;if(typeof e==`string`||t!==void 0){if(arguments.length<2)throw TypeError(`Failed to execute 'add' on 'DataTransferItemList': parameter 1 is not of type 'File'.`);let r=asciiLowercase(String(t));for(let e of this[P])if(e[Sn]===`string`&&e[Br]===r)throw new DOMException(`Failed to execute 'add' on 'DataTransferItemList': An item already exists for type '${r}'.`,`NotSupportedError`);n=makeItem(`string`,r,String(e),null)}else{if(typeof File>`u`||!(e instanceof File))throw TypeError(`Failed to execute 'add' on 'DataTransferItemList': parameter 1 is not of type 'File'.`);n=makeItem(`file`,asciiLowercase(e.type),``,e)}return this[P].push(n),this._changed(),n}remove(e){let t=e>>>0;if(t>=this[P].length)return;let[n]=this[P].splice(t,1);n[Sn]=``,this._changed()}clear(){for(let e of this[P])e[Sn]=``;this[P].length=0,this._changed()}[Symbol.iterator](){return this[P][Symbol.iterator]()}_changed(){let e=this[P];for(let t=0;t<e.length;t++)Object.defineProperty(this,t,{value:e[t],enumerable:!0,configurable:!0,writable:!1});for(let t=e.length;Object.prototype.hasOwnProperty.call(this,t);t++)delete this[t];this[B]!==null&&(this[B][Vr]=null,this[B][Ht]=null)}};Object.defineProperty(DataTransferItemList.prototype,Symbol.toStringTag,{value:`DataTransferItemList`,configurable:!0});function makeList(e){ef=!0;try{let t=new DataTransferItemList;return t[B]=e,hideInternals(t),t}finally{ef=!1}}function normalizeFormat(e){let t=asciiLowercase(String(e));return t===`text`?{type:`text/plain`,url:!1}:t===`url`?{type:`text/uri-list`,url:!0}:{type:t,url:!1}}var DataTransfer=class{[It];[Lt];[P];[Vr];[Ht];constructor(){this[It]=`none`,this[Lt]=`uninitialized`,this[P]=makeList(this),this[Vr]=null,this[Ht]=null,hideInternals(this)}get dropEffect(){return this[It]}set dropEffect(e){let t=String(e);Qd.has(t)&&(this[It]=t)}get effectAllowed(){return this[Lt]}set effectAllowed(e){let t=String(e);$d.has(t)&&(this[Lt]=t)}get items(){return this[P]}setDragImage(e,t,n){}get types(){if(this[Vr]!==null)return this[Vr];let e=[],t=!1;for(let n of this[P][P])n[Sn]===`string`?e.push(n[Br]):n[Sn]===`file`&&(t=!0);return t&&e.push(`Files`),this[Vr]=Object.freeze(e)}getData(e){let{type:t,url:n}=normalizeFormat(e);for(let e of this[P][P])if(e[Sn]===`string`&&e[Br]===t){if(!n)return e[Ct];for(let t of e[Ct].split(/\r?\n/))if(t!==``&&!t.startsWith(`#`))return t;return``}return``}setData(e,t){let{type:n}=normalizeFormat(e),r=this[P][P];for(let e=0;e<r.length;e++)if(r[e][Sn]===`string`&&r[e][Br]===n){r[e][Sn]=``,r.splice(e,1);break}r.push(makeItem(`string`,n,String(t),null)),this[P]._changed()}clearData(e){let t=this[P][P],n=e===void 0?null:normalizeFormat(e).type;for(let e=t.length-1;e>=0;e--)t[e][Sn]===`string`&&(n===null||t[e][Br]===n)&&(t[e][Sn]=``,t.splice(e,1));this[P]._changed()}get files(){if(this[Ht]!==null)return this[Ht];let e=[];for(let t of this[P][P])t[Sn]===`file`&&t[Vt]!==null&&e.push(t[Vt]);return this[Ht]=createFileList(e)}};Object.defineProperty(DataTransfer.prototype,Symbol.toStringTag,{value:`DataTransfer`,configurable:!0}),exposeMembers(DataTransfer,DataTransferItemList,DataTransferItem);let tf=0;var MutationObserver=class{[cn];[Ze];[ir];[Fn];[tn];constructor(e){if(typeof e!=`function`)throw TypeError(`Failed to construct 'MutationObserver': parameter 1 is not of type 'Function'.`);this[cn]=tf++,this[Ze]=e,this[ir]=[],this[Fn]=[],this[tn]=!1}observe(e,t={}){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.`);let n=t.attributes,r=t.characterData;if((t.attributeOldValue!==void 0||t.attributeFilter!==void 0)&&n===void 0&&(n=!0),t.characterDataOldValue!==void 0&&r===void 0&&(r=!0),!t.childList&&!n&&!r)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object must set at least one of 'attributes', 'characterData', or 'childList' to true.`);if(t.attributeOldValue&&!n)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeOldValue' to true when 'attributes' is true or not present.`);if(t.attributeFilter!==void 0&&!n)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeFilter' when 'attributes' is true or not present.`);if(t.characterDataOldValue&&!r)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'characterDataOldValue' to true when 'characterData' is true or not present.`);let i=new NormalizedOptions(t,!!n,!!r),a=e[M],o=registeredObserverList(a);if(o!==null)for(let e=0;e<o.length;e++){let t=o[e];if(t.observer===this&&t.source===null){for(let e of this[Fn])removeRegistrations(e,e=>e.source===t);t.options.subtree!==i.subtree&&setSubtreeObservers(Vi+(i.subtree?1:-1)),t.options=i;return}}this[Fn].length===0&&setActiveObservers(Bi+1),i.subtree&&setSubtreeObservers(Vi+1),addRegistration(a,new RegisteredObserver(this,i,null)),this[Fn].push(a)}disconnect(){let e=this[Fn];if(e.length!==0){let t=0;for(let n=0;n<e.length;n++){let r=registeredObserverList(e[n]);if(r!==null)for(let e of r)e.observer===this&&e.source===null&&e.options.subtree&&t++;removeRegistrations(e[n],e=>e.observer===this)}t!==0&&setSubtreeObservers(Vi-t),this[Fn]=[],setActiveObservers(Bi-1)}this[tn]=!1,this[ir]=[],dropPending(this)}takeRecords(){let e=this[ir];return this[ir]=[],e}};Object.defineProperty(MutationObserver.prototype,Symbol.toStringTag,{value:`MutationObserver`,configurable:!0});function isDisabled(e){return isActuallyDisabled(e)}function isEnabled(e){switch(e.tag){case X.button:case X.input:case X.select:case X.textarea:case X.optgroup:case X.option:case X.fieldset:return!isActuallyDisabled(e)}return!1}function isMutable(e){switch(e.tag){case X.input:return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&contentAttr(e,`readonly`)!==null);case X.textarea:return!isActuallyDisabled(e)&&contentAttr(e,`readonly`)===null;case X.select:case X.button:return!isActuallyDisabled(e)}return!1}function isReadWrite(e){return e.tag===X.input?readonlyApplies(inputType(e))&&isMutable(e):e.tag===X.textarea?isMutable(e):isEditable(e)}function isReadOnly(e){return!isReadWrite(e)}function hasReadonlyAttribute(e){return e.tag===X.input?readonlyApplies(inputType(e))&&contentAttr(e,`readonly`)!==null:e.tag===X.textarea&&contentAttr(e,`readonly`)!==null}function isRequired(e){switch(e.tag){case X.input:return requiredApplies(inputType(e))&&contentAttr(e,`required`)!==null;case X.select:case X.textarea:return contentAttr(e,`required`)!==null}return!1}function isOptional(e){return(e.tag===X.input||e.tag===X.select||e.tag===X.textarea)&&!isRequired(e)}function validatable(e){if(isFACE(e))return validatableOf(e);switch(e.tag){case X.input:case X.select:case X.textarea:case X.button:case X.output:case X.fieldset:return e.node}return null}function candidateState(e){let t=validatable(e);return t===null||t._barredFromValidation()?0:t._validityFlags()===0?1:2}function hasInvalidControl(e){if(e.tag===X.form){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++)if(candidateState(t[e])===2)return!0;return!1}for(let t=nextElementInTree(e,e);t!==null;t=nextElementInTree(t,e))if(candidateState(t)===2)return!0;return!1}function isValid(e){return e.tag===X.form||e.tag===X.fieldset?!hasInvalidControl(e):candidateState(e)===1}function isInvalid(e){return e.tag===X.form||e.tag===X.fieldset?hasInvalidControl(e):candidateState(e)===2}function isUserValid(e){return hasUserValidity(e)&&candidateState(e)===1}function isUserInvalid(e){return hasUserValidity(e)&&candidateState(e)===2}function hasRangeLimitations(e){if(e.tag!==X.input)return!1;let t=inputType(e);return isNumericType(t)?t===13||contentAttr(e,`min`)!==null||contentAttr(e,`max`)!==null:!1}function isInRange(e){if(!hasRangeLimitations(e))return!1;let t=e.node;return!t._barredFromValidation()&&!(t._validityFlags()&96)}function isOutOfRange(e){if(!hasRangeLimitations(e))return!1;let t=e.node;return!t._barredFromValidation()&&!!(t._validityFlags()&96)}function isChecked(e){if(e.tag===X.input){let t=inputType(e);return(t===15||t===16)&&e.node._checkedness()}return e.tag===X.option&&e.node._selectednessNow()}function isIndeterminate(e){if(e.tag===X.input){let t=inputType(e);return t===15?e.node[pn]:t===16&&radioGroupHasNoChecked(e)}return e.tag===X.progress&&contentAttr(e,`value`)===null}function isDefault(e){switch(e.tag){case X.input:{let t=inputType(e);return t===15||t===16?contentAttr(e,`checked`)!==null:isDefaultButton(e)}case X.button:return isDefaultButton(e);case X.option:return contentAttr(e,`selected`)!==null}return!1}function isDefaultButton(e){let t=e.node.form;return t!==null&&defaultButton(t[M])===e}function isPlaceholderShown(e){return e.tag===X.input?!placeholderApplies(inputType(e))||contentAttr(e,`placeholder`)===null?!1:e.node.value===``:e.tag===X.textarea&&contentAttr(e,`placeholder`)!==null&&e.node.value===``}function isAutofilled(e){return!1}function isTextControl(e){if(e.tag===X.textarea)return!0;if(e.tag!==X.input)return!1;let t=inputType(e);return t!==0&&t<=12}function controlValue(e){switch(e.tag){case X.input:case X.textarea:case X.select:case X.option:case X.button:case X.output:return e.node.value}return``}function inputChecked(e){return e.tag===X.input&&e.node._checkedness()}function inputIndeterminate(e){return e.tag===X.input&&e.node[pn]}function optionSelected(e){return e.tag===X.option&&e.node._selectednessNow()}Object.assign(fa,{focus:matchesFocus,"focus-within":matchesFocusWithin,"focus-visible":matchesFocusVisible,defined:isDefined,checked:isChecked,indeterminate:isIndeterminate,default:isDefault,disabled:isDisabled,enabled:isEnabled,required:isRequired,optional:isOptional,"read-only":isReadOnly,"read-write":isReadWrite,"placeholder-shown":isPlaceholderShown,valid:isValid,invalid:isInvalid,"user-valid":isUserValid,"user-invalid":isUserInvalid,"in-range":isInRange,"out-of-range":isOutOfRange,autofill:isAutofilled,"-webkit-autofill":isAutofilled,"popover-open":matchesPopoverOpen,modal:matchesModal}),da.of=e=>customStatesOf(e.node),clearSelectorCaches();var Box=class{x;y;vx;vy;w;h;mt;mr;mb;ml;bt;br;bb;bl;pt;pr;pb;pl;idx;end;gen;flags;constructor(){this.x=0,this.y=0,this.vx=0,this.vy=0,this.w=0,this.h=0,this.mt=0,this.mr=0,this.mb=0,this.ml=0,this.bt=0,this.br=0,this.bb=0,this.bl=0,this.pt=0,this.pr=0,this.pb=0,this.pl=0,this.idx=0,this.end=0,this.gen=0,this.flags=0}},LayoutState=class{version;styleVersion;vw;vh;gen;boxes;styles;list;constructor(){this.version=-1,this.styleVersion=-1,this.vw=-1,this.vh=-1,this.gen=0,this.boxes=/* @__PURE__ */ new WeakMap,this.styles=/* @__PURE__ */ new WeakMap,this.list=[]}};const nf=/* @__PURE__ */ new WeakMap;let rf=null;function setRelayoutListener(e){rf=e}function layoutOn(e){if(!Ou)return!1;let t=e[J];return t!==null&&t[z].layout===`lite`}function ensure(e){let t=nf.get(e);t===void 0&&nf.set(e,t=new LayoutState);let n=currentStyleVersion(e),r=e[J],i=r[yn],a=r[vn];return t.version===e[q]&&t.styleVersion===n&&t.vw===i&&t.vh===a||(run(t,e,i,a),t.version=e[q],t.styleVersion=n,t.vw=i,t.vh=a,rf?.(e)),t}function boxOf(e){if(!Ou||!(e.flags&1))return null;let t=e.doc;if(!layoutOn(t))return null;let n=ensure(t),r=n.boxes.get(e);return r!==void 0&&r.gen===n.gen?r:null}let af=new LayoutState,of=!1,sf=16,cf=1024,lf=768,uf=0;var PendingAbs=class{el;sx;sy;fs;lh;fixed;constructor(e,t,n,r,i,a){this.el=e,this.sx=t,this.sy=n,this.fs=r,this.lh=i,this.fixed=a}};const df=[],ff=[];function run(e,t,n,r){e.gen++,e.list.length=0,af=e,cf=n,lf=r,of=hasAuthorStyles(t),df.length=0,ff.length=0;let i=null;for(let e=t[M].first;e!==null;e=e.next)e.type===1&&(i=e);if(i!==null){sf=16,sf=fontSize(i,16);try{let e=computedDisplay(i);for(e!==`none`&&e!==`contents`&&layoutBox(i,0,0,n,r,16,`normal`,NaN,NaN,!1,8),flushPending(0,0,0,n,r,!0);ff.length!==0;){let e=ff.splice(0);for(let t=0;t<e.length;t++)layoutAbs(e[t],0,0,n,r)}}finally{mf=null,Cf=0,df.length=0,ff.length=0}}}function plain(e){return!of&&!(e.flags&64)}var Style=class{gen;position;transform;borderBox;scroller;mt;mr;mb;ml;bt;br;bb;bl;pt;pr;pb;pl;width;height;minW;maxW;minH;maxH;top;right;bottom;left;flexDir;grow;shrink;basis;alignSelf;alignItems;justify;rowGap;colGap;fs;lh;constructor(){this.gen=-1,this.position=`static`,this.transform=`none`,this.borderBox=!1,this.scroller=!1,this.mt=this.mr=this.mb=this.ml=`0px`,this.bt=this.br=this.bb=this.bl=`0px`,this.pt=this.pr=this.pb=this.pl=`0px`,this.width=this.height=this.minW=this.minH=`auto`,this.maxW=this.maxH=`none`,this.top=this.right=this.bottom=this.left=`auto`,this.flexDir=`row`,this.grow=0,this.shrink=1,this.basis=`auto`,this.alignSelf=`auto`,this.alignItems=`normal`,this.justify=`normal`,this.rowGap=this.colGap=`normal`,this.fs=NaN,this.lh=``}};const pf=new Style;function sty(e){if(plain(e)&&!hasUAFontSize(e))return pf;let t=af.styles.get(e);return t===void 0&&af.styles.set(e,t=new Style),t.gen!==af.gen&&fillStyle(e,t),t}let mf=null;function g(e,t){let n=mf.decls;return n===null||!n.has(e)?t:computedValueOf(mf,e)}function gBorder(e,t){let n=mf.decls;return n===null||!n.has(e)&&!n.has(t)?`0px`:computedValueOf(mf,e)}function fillStyle(e,t){t.gen=af.gen,mf=styleRecord(e),t.position=g(`position`,`static`),t.transform=g(`transform`,`none`),t.borderBox=g(`box-sizing`,`content-box`)===`border-box`;let n=g(`overflow-x`,`visible`),r=g(`overflow-y`,`visible`);t.scroller=n!==`visible`&&n!==`clip`&&n!==``||r!==`visible`&&r!==`clip`&&r!==``,t.mt=g(`margin-top`,`0px`),t.mr=g(`margin-right`,`0px`),t.mb=g(`margin-bottom`,`0px`),t.ml=g(`margin-left`,`0px`),t.bt=gBorder(`border-top-width`,`border-top-style`),t.br=gBorder(`border-right-width`,`border-right-style`),t.bb=gBorder(`border-bottom-width`,`border-bottom-style`),t.bl=gBorder(`border-left-width`,`border-left-style`),t.pt=g(`padding-top`,`0px`),t.pr=g(`padding-right`,`0px`),t.pb=g(`padding-bottom`,`0px`),t.pl=g(`padding-left`,`0px`),t.width=g(`width`,`auto`),t.height=g(`height`,`auto`),t.minW=g(`min-width`,`auto`),t.maxW=g(`max-width`,`none`),t.minH=g(`min-height`,`auto`),t.maxH=g(`max-height`,`none`),t.top=g(`top`,`auto`),t.right=g(`right`,`auto`),t.bottom=g(`bottom`,`auto`),t.left=g(`left`,`auto`),t.flexDir=g(`flex-direction`,`row`),t.grow=Number(g(`flex-grow`,`0`))||0;let i=Number(g(`flex-shrink`,`1`));t.shrink=Number.isFinite(i)?i:1,t.basis=g(`flex-basis`,`auto`),t.alignSelf=g(`align-self`,`auto`),t.alignItems=g(`align-items`,`normal`),t.justify=g(`justify-content`,`normal`),t.rowGap=g(`row-gap`,`normal`),t.colGap=g(`column-gap`,`normal`);let a=parseFloat(computedValueOf(mf,`font-size`));t.fs=Number.isFinite(a)?a:NaN,t.lh=computedValueOf(mf,`line-height`)}function hasUAFontSize(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case X.h1:case X.h2:case X.h3:case X.h5:case X.h6:case X.small:case X.big:case X.sub:case X.sup:return!0}return!1}function fontSize(e,t){let n=sty(e).fs;return Number.isNaN(n)?t:n}function lineHeightPx(e,t){if(e===`normal`||e===``)return t*6/5;let n=Number(e);if(Number.isFinite(n))return n*t;let r=length(e,t,t);return Number.isNaN(r)?t*1.2:r}function lineHeightOf(e,t){let n=sty(e).lh;return n===``?t:n}function length(e,t,n){let r=e.length;if(r===0)return NaN;if(r>2&&e.charCodeAt(r-1)===120&&e.charCodeAt(r-2)===112){let t=Number(e.slice(0,-2));if(Number.isFinite(t))return t}if(e===`0`)return 0;if(e===`auto`||e===`none`||e===`normal`)return NaN;hf=e,Q=0,gf=t,_f=n;let i=parseSum();return skipWs(),Q===e.length?i:NaN}let hf=``,Q=0,gf=NaN,_f=16;function skipWs(){for(;Q<hf.length&&hf.charCodeAt(Q)<=32;)Q++}function parseSum(){let e=parseProduct();for(;;){skipWs();let t=hf[Q];if(t!==`+`&&t!==`-`)return e;Q++;let n=parseProduct();e=t===`+`?e+n:e-n}}function parseProduct(){let e=parseValue();for(;;){skipWs();let t=hf[Q];if(t!==`*`&&t!==`/`)return e;Q++;let n=parseValue();e=t===`*`?e*n:e/n}}const vf=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/iy,yf=/[a-z]+|%/iy;function parseValue(){skipWs();let e=hf;if(e[Q]===`(`){Q++;let t=parseSum();return skipWs(),e[Q]===`)`?(Q++,t):NaN}let t=e.slice(Q,Q+6).toLowerCase();for(let n of bf)if(t.startsWith(n)){Q+=n.length;let t=[parseSum()];for(skipWs();e[Q]===`,`;)Q++,t.push(parseSum()),skipWs();return e[Q]===`)`?(Q++,n===`calc(`?t.length===1?t[0]:NaN:n===`min(`?Math.min(...t):n===`max(`?Math.max(...t):t.length===3?Math.max(t[0],Math.min(t[1],t[2])):NaN):NaN}vf.lastIndex=Q;let n=vf.exec(e);if(n===null)return NaN;Q+=n[0].length;let r=Number(n[0]);yf.lastIndex=Q;let i=yf.exec(e);return i===null?r:(Q+=i[0].length,unitPx(r,i[0].toLowerCase()))}const bf=[`calc(`,`min(`,`max(`,`clamp(`];function unitPx(e,t){switch(t){case`px`:return e;case`%`:return e*gf/100;case`em`:return e*_f;case`rem`:return e*sf;case`ex`:case`ch`:return e*_f*.5;case`lh`:return e*_f*1.2;case`vw`:case`svw`:case`lvw`:case`dvw`:return e*cf/100;case`vh`:case`svh`:case`lvh`:case`dvh`:return e*lf/100;case`vmin`:return e*Math.min(cf,lf)/100;case`vmax`:return e*Math.max(cf,lf)/100;case`in`:return e*96;case`cm`:return e*96/2.54;case`mm`:return e*96/25.4;case`q`:return e*96/101.6;case`pt`:return e*96/72;case`pc`:return e*16}return NaN}function lenOr0(e,t,n){let r=length(e,t,n);return Number.isNaN(r)?0:r}function edges(e,t,n,r){let i=sty(e);i===pf?(t.mt=t.mr=t.mb=t.ml=0,t.bt=t.br=t.bb=t.bl=0,t.pt=t.pr=t.pb=t.pl=0):(t.mt=lenOr0(i.mt,n,r),t.mr=lenOr0(i.mr,n,r),t.mb=lenOr0(i.mb,n,r),t.ml=lenOr0(i.ml,n,r),t.bt=lenOr0(i.bt,n,r),t.br=lenOr0(i.br,n,r),t.bb=lenOr0(i.bb,n,r),t.bl=lenOr0(i.bl,n,r),t.pt=Math.max(0,lenOr0(i.pt,n,r)),t.pr=Math.max(0,lenOr0(i.pr,n,r)),t.pb=Math.max(0,lenOr0(i.pb,n,r)),t.pl=Math.max(0,lenOr0(i.pl,n,r)))}function borderBox(e){return sty(e).borderBox}function toContent(e,t,n){return Math.max(0,borderBox(t)?e-n:e)}function clampSize(e,t,n,r,i,a,o){if(n===`auto`&&r===`none`)return t;let s=length(r,i,a);Number.isNaN(s)||(t=Math.min(t,toContent(s,e,o)));let c=length(n,i,a);return Number.isNaN(c)||(t=Math.max(t,toContent(c,e,o))),t}function isReplaced(e){if(e.ns===`http://www.w3.org/2000/svg`)return e.name===`svg`;if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case X.img:case X.canvas:case X.video:case X.iframe:case X.embed:case X.object:case X.audio:case X.input:case X.textarea:case X.select:return!0}return!1}function intAttr(e,t,n){let r=attr(e,t);if(r===null)return n;let i=parseFloat(r);return Number.isFinite(i)&&i>=0?i:n}let xf=0;function intrinsicW(e,t,n){if(e.ns===`http://www.w3.org/2000/svg`)return xf=intAttr(e,`height`,150),intAttr(e,`width`,300);switch(e.tag){case X.img:return xf=intAttr(e,`height`,0),intAttr(e,`width`,0);case X.audio:return xf=54,300;case X.input:{let r=asciiLowercase$1(attr(e,`type`)??`text`);return r===`checkbox`||r===`radio`?(xf=13,13):(xf=n,r===`submit`||r===`reset`||r===`button`?textWidth(attr(e,`value`)??(r===`submit`?`Submit`:r===`reset`?`Reset`:``),t):intAttr(e,`size`,20)*t*.5)}case X.textarea:return xf=intAttr(e,`rows`,2)*n,intAttr(e,`cols`,20)*t*.5;case X.select:{xf=(attr(e,`multiple`)!==null||intAttr(e,`size`,1)>1?intAttr(e,`size`,4):1)*n;let r=0;for(let n=e.first;n!==null;n=n.next)n.type===1&&(r=Math.max(r,textWidth(textContent(n),t)));return r+20}}return xf=intAttr(e,`height`,150),intAttr(e,`width`,300)}function textContent(e){let t=``;for(let n=e.first;n!==null;n=n.next)n.type===3||n.type===4?t+=n.data:n.type===1&&(t+=textContent(n));return t}function textWidth(e,t){let n=0,r=!0;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);i===32||i===9||i===10||i===13||i===12?r||=(n++,!0):(n++,r=!1)}return r&&n>0&&n--,n*t*.5}function isBlank(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==13&&n!==12)return!1}return!0}function kindOf(e,t){switch(t){case`none`:return 0;case`inline`:return isReplaced(e)?3:hasBlockChild(e)?1:2;case`inline-block`:case`inline-flex`:case`inline-grid`:case`inline-table`:case`inline flow-root`:case`inline flex`:case`inline grid`:return 3}return isReplaced(e)&&t!==`block`?3:1}function hasBlockChild(e){for(let t=e.first;t!==null;t=t.next){if(t.type!==1)continue;let e=computedDisplay(t);if(e===`contents`?hasBlockChild(t):e!==`none`&&e!==`inline`&&kindOf(t,e)===1)return!0}return!1}function isFlex(e){return e===`flex`||e===`inline-flex`||e===`inline flex`||e===`block flex`}const Sf=[];let Cf=0;function collect(e,t){let n=e;if(e.flags&512){let t=e.node[W];t!=null&&(n=t[M])}for(let e=n.first;e!==null;e=e.next)collectNode(e,t)}function collectNode(e,t){if(e.type===3||e.type===4)t.push(e);else if(e.type===1){if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===X.slot&&e.parent!==null&&isInShadowTree(e)){if(computedDisplay(e)!==`contents`){t.push(e);return}let n=findFlattenedSlottables(e);for(let e=0;e<n.length;e++)collectNode(n[e],t);return}computedDisplay(e)===`contents`?collect(e,t):t.push(e)}}function isInShadowTree(e){let t=e;for(;t.parent!==null;)t=t.parent;return!!(t.flags&32)}function children(e){let t=Sf[Cf]??(Sf[Cf]=[]);return Cf++,t.length=0,collect(e,t),t}function releaseChildren(e){e.length=0,Cf--}function newBox(e,t){let n=af.boxes.get(e);return n===void 0&&af.boxes.set(e,n=new Box),n.gen=af.gen,n.idx=af.list.length,n.end=n.idx+1,n.flags=t,af.list.push(n),n}function shift(e,t,n,r){if(t===0&&n===0)return;let i=af.list;for(let a=e.idx;a<e.end;a++){let e=i[a];e.vx+=t,e.vy+=n,r||(e.x+=t,e.y+=n)}}function translation(e,t,n,r){wf=0,Tf=0;let i=/(translate3d|translatex|translatey|translate|matrix)\(([^)]*)\)/gi;for(let a=i.exec(e);a!==null;a=i.exec(e)){let e=a[1].toLowerCase(),i=a[2].split(`,`).map(e=>e.trim());e===`matrix`?i.length===6&&(wf+=Number(i[4])||0,Tf+=Number(i[5])||0):e===`translatex`?wf+=lenOr0(i[0],t,r):e===`translatey`?Tf+=lenOr0(i[0],n,r):(wf+=lenOr0(i[0],t,r),i.length>1&&(Tf+=lenOr0(i[1],n,r)))}}let wf=0,Tf=0;function layoutBox(e,t,n,r,i,a,o,s,c,l,u){let d=newBox(e,u),m=computedDisplay(e),h=fontSize(e,a),_=lineHeightOf(e,o),v=lineHeightPx(_,h),ee=plain(e)?`static`:sty(e).position,y=plain(e)?`none`:sty(e).transform;edges(e,d,r,h);let te=d.pl+d.pr+d.bl+d.br,ne=d.pt+d.pb+d.bt+d.bb,re=isReplaced(e),b,x=plain(e)?NaN:length(sty(e).width,r,h),ie=!1;if(Number.isNaN(s)?Number.isNaN(x)?re?b=replacedWidth(e,h,v,i):l?(b=Math.min(maxContent(e,a)-te,r-d.ml-d.mr-te),ie=!0):(b=r-d.ml-d.mr-te,ie=!0):b=toContent(x,e,te):b=Math.max(0,s-te),Number.isNaN(s)&&(b=clampSize(e,Math.max(0,b),sty(e).minW,sty(e).maxW,r,h,te)),!ie&&Number.isNaN(s)&&!l&&!plain(e)){let t=sty(e).ml===`auto`,n=sty(e).mr===`auto`,i=r-b-te-d.ml-d.mr;t&&n?d.ml+=Math.max(0,i/2):t&&(d.ml+=Math.max(0,i))}d.x=d.vx=t+d.ml,d.y=d.vy=n+d.mt,d.w=b+te;let ae=plain(e)?NaN:length(sty(e).height,i,h),oe=NaN;Number.isNaN(c)?Number.isNaN(ae)?re&&(oe=replacedHeight(e,h,v,b)):oe=clampSize(e,toContent(ae,e,ne),sty(e).minH,sty(e).maxH,i,h,ne):oe=Math.max(0,c-ne);let se=ee!==`static`||y!==`none`||!!(u&8),S=df.length,ce=d.x+d.bl+d.pl,le=d.y+d.bt+d.pt,ue=0;re||(ue=isFlex(m)?layoutFlex(e,ce,le,b,oe,h,_,v,!1):m===`table-row`?layoutFlex(e,ce,le,b,oe,h,_,v,!0):flow(e,ce,le,b,oe,h,_,v));let de=Number.isNaN(oe)?clampSize(e,ue,sty(e).minH,sty(e).maxH,i,h,ne):oe;if(Number.isNaN(de)&&(de=0),d.h=de+ne,sty(e).scroller&&(d.flags|=1),u&8&&(d.flags|=1),se&&!(u&8)&&flushPending(S,d.x+d.bl,d.y+d.bt,d.w-d.bl-d.br,d.h-d.bt-d.bb,!1),d.end=af.list.length,ee===`relative`){let t=length(sty(e).left,r,h),n=length(sty(e).top,i,h);shift(d,Number.isNaN(t)?-lenOr0(sty(e).right,r,h):t,Number.isNaN(n)?-lenOr0(sty(e).bottom,i,h):n,!1)}return y!==`none`&&(translation(y,d.w,d.h,h),shift(d,wf,Tf,!0)),uf=d.w+d.ml+d.mr,d.h+d.mt+d.mb}function replacedWidth(e,t,n,r){let i=intrinsicW(e,t,n),a=xf;if(i>0&&a>0&&!plain(e)){let n=length(sty(e).height,r,t);if(!Number.isNaN(n)&&(e.tag===X.img||e.tag===X.canvas||e.tag===X.video||e.ns===`http://www.w3.org/2000/svg`))return n*i/a}return i}function replacedHeight(e,t,n,r){let i=intrinsicW(e,t,n),a=xf;return i>0&&a>0&&r!==i&&(e.tag===X.img||e.tag===X.canvas||e.tag===X.video||e.ns===`http://www.w3.org/2000/svg`)?r*a/i:a}function deferAbs(e,t,n,r,i,a){df.push(new PendingAbs(e,n,r,i,a,t===`fixed`))}function flushPending(e,t,n,r,i,a){if(df.length<=e)return;let o=df.splice(e);for(let e=0;e<o.length;e++){let s=o[e];s.fixed&&!a?ff.push(s):s.fixed?layoutAbs(s,0,0,cf,lf):layoutAbs(s,t,n,r,i)}}function layoutAbs(e,t,n,r,i){let a=e.el,o=fontSize(a,e.fs);edges(a,$,r,o);let s=$.pl+$.pr+$.bl+$.br,c=$.pt+$.pb+$.bt+$.bb,l=$.ml+$.mr,u=$.mt+$.mb,d=length(sty(a).left,r,o),m=length(sty(a).right,r,o),h=length(sty(a).top,i,o),_=length(sty(a).bottom,i,o),v=length(sty(a).width,r,o),ee=length(sty(a).height,i,o),y=NaN;Number.isNaN(v)&&!isReplaced(a)&&(y=!Number.isNaN(d)&&!Number.isNaN(m)?Math.max(s,r-d-m-l):Math.max(s,Math.min(maxContent(a,e.fs),r-(Number.isNaN(d)?0:d)-l)));let te=NaN;Number.isNaN(ee)&&!Number.isNaN(h)&&!Number.isNaN(_)&&(te=Math.max(c,i-h-_-u));let ne=Number.isNaN(d)?e.sx:t+d,re=Number.isNaN(h)?e.sy:n+h,b=e.fixed?18:0;layoutBox(a,ne,re,r,i,e.fs,e.lh,y,te,!1,b);let x=af.boxes.get(a),ie=0,ae=0;if(Number.isNaN(d)&&!Number.isNaN(m)&&(ie=t+r-m-x.mr-x.w-x.x),Number.isNaN(h)&&!Number.isNaN(_)&&(ae=n+i-_-x.mb-x.h-x.y),shift(x,ie,ae,!1),e.fixed)for(let e=x.idx;e<x.end;e++)af.list[e].flags|=2}const $=new Box;function flow(e,t,n,r,i,a,o,s){let c=children(e),l=0,u=!1,d=t,m=0;for(let e=0;e<c.length;e++){let h=c[e];if(h.type!==1){if(isBlank(h.data))continue;u||(u=!0,d=t,m=s),d+=textWidth(h.data,a);continue}let _=kindOf(h,computedDisplay(h));if(_===0)continue;let v=plain(h)?`static`:sty(h).position;if(v===`absolute`||v===`fixed`)deferAbs(h,v,u?d:t,n+l,a,o);else if(h.ns===`http://www.w3.org/1999/xhtml`&&h.tag===X.br){u||(m=s);let e=newBox(h,4);e.x=e.vx=d,e.y=e.vy=n+l,e.w=0,e.h=m,e.mt=e.mr=e.mb=e.ml=e.bt=e.br=e.bb=e.bl=e.pt=e.pr=e.pb=e.pl=0,l+=m,u=!1,m=0}else if(_===1)u&&(l+=m,u=!1,m=0),l+=layoutBox(h,t,n+l,r,i,a,o,NaN,NaN,!1,0);else if(u||(u=!0,d=t,m=s),_===3){let e=layoutBox(h,d,n+l,r,i,a,o,NaN,NaN,!0,0);d+=uf,e>m&&(m=e)}else{let e=layoutInline(h,d,n+l,r,a,o);d+=uf,e>m&&(m=e)}}return u&&(l+=m),releaseChildren(c),l}function layoutInline(e,t,n,r,i,a){let o=newBox(e,4),s=fontSize(e,i),c=lineHeightOf(e,a),l=lineHeightPx(c,s);edges(e,o,r,s),o.x=o.vx=t+o.ml,o.y=o.vy=n;let u=l,d=o.x+o.bl+o.pl,m=children(e);for(let e=0;e<m.length;e++){let t=m[e];if(t.type!==1){d+=textWidth(t.data,s);continue}let i=kindOf(t,computedDisplay(t));if(i===0)continue;let a=plain(t)?`static`:sty(t).position;if(a===`absolute`||a===`fixed`){deferAbs(t,a,d,n,s,c);continue}let o=i===2?layoutInline(t,d,n,r,s,c):layoutBox(t,d,n,r,NaN,s,c,NaN,NaN,!0,0);d+=uf,o>u&&(u=o)}if(releaseChildren(m),o.w=d+o.pr+o.br-o.x,o.h=u+o.pt+o.pb+o.bt+o.bb,o.end=af.list.length,(plain(e)?`static`:sty(e).position)===`relative`){let t=length(sty(e).left,r,s),n=length(sty(e).top,NaN,s);shift(o,Number.isNaN(t)?0:t,Number.isNaN(n)?0:n,!1)}return uf=o.w+o.ml+o.mr,u}var FlexItem=class{el;text;grow;shrink;main;m0;m1;cross;autoCross;align;constructor(){this.el=null,this.text=``,this.grow=0,this.shrink=1,this.main=0,this.m0=0,this.m1=0,this.cross=0,this.autoCross=!0,this.align=`stretch`}};function layoutFlex(e,t,n,r,i,a,o,s,c){let l=c||plain(e)?`row`:sty(e).flexDir,u=l===`column`||l===`column-reverse`,d=l===`row-reverse`||l===`column-reverse`,m=c||plain(e)?`normal`:u?sty(e).rowGap:sty(e).colGap,h=Math.max(0,lenOr0(m,u?i:r,a)),_=c||plain(e)?`normal`:sty(e).alignItems,v=c||plain(e)?`normal`:sty(e).justify,ee=children(e),y=[];for(let e=0;e<ee.length;e++){let l=ee[e];if(l.type!==1){if(isBlank(l.data))continue;let e=new FlexItem;e.text=l.data,e.main=u?s:textWidth(l.data,a),e.cross=u?textWidth(l.data,a):s,e.shrink=0,y.push(e);continue}if(computedDisplay(l)===`none`)continue;let d=plain(l)?`static`:sty(l).position;if(d===`absolute`||d===`fixed`){deferAbs(l,d,t,n,a,o);continue}let m=new FlexItem;m.el=l;let h=fontSize(l,a);edges(l,$,r,h);let v=$.pl+$.pr+$.bl+$.br,te=$.pt+$.pb+$.bt+$.bb;m.m0=u?$.mt:$.ml,m.m1=u?$.mb:$.mr;let ne=plain(l);if(c)m.grow=1,m.shrink=1,m.main=0;else{m.grow=ne?0:sty(l).grow,m.shrink=sty(l).shrink;let e=ne?`auto`:sty(l).basis,t=u?i:r,n=u?te:v,a=e===`auto`||e===`content`?NaN:length(e,t,h);if(!Number.isNaN(a))a=toContent(a,l,n)+n;else{let e=ne?NaN:length(u?sty(l).height:sty(l).width,t,h);Number.isNaN(e)||(a=toContent(e,l,n)+n)}m.main=a}let re=ne?`auto`:sty(l).alignSelf;m.align=re===`auto`||re===`normal`?_===`normal`?`stretch`:_:re,m.autoCross=(ne?`auto`:u?sty(l).width:sty(l).height)===`auto`&&!isReplaced(l),y.push(m)}releaseChildren(ee);let te=af.list.length,ne=df.length,re=u?r:i,b=u?n:t;for(let e=0;e<y.length;e++){let s=y[e];if(s.el===null){b+=s.main+h;continue}let c=u&&s.autoCross&&s.align===`stretch`?r-crossMargins(s.el,r,a,!0):NaN;if(u){let e=layoutBox(s.el,t,b,r,i,a,o,c,s.main,Number.isNaN(c),0),n=af.boxes.get(s.el);Number.isNaN(s.main)&&(s.main=n.h),s.cross=uf,b+=e+h}else{let e=s.autoCross&&s.align===`stretch`&&!Number.isNaN(i)?i-crossMargins(s.el,r,a,!1):NaN;layoutBox(s.el,b,n,r,i,a,o,s.main,e,Number.isNaN(s.main),0);let t=af.boxes.get(s.el);Number.isNaN(s.main)&&(s.main=t.w),s.cross=t.h+t.mt+t.mb,b+=uf+h}}let x=u?i:r,ie=h*Math.max(0,y.length-1),ae=0,oe=0;for(let e=0;e<y.length;e++){let t=y[e];ie+=t.main+t.m0+t.m1,ae+=t.grow,oe+=t.shrink*t.main}let se=!1,S=Number.isNaN(x)?0:x-ie;if(S>0&&ae>0){for(let e=0;e<y.length;e++){let t=y[e];t.grow>0&&(t.main+=S*t.grow/ae,se=!0)}S=0}else if(S<0&&oe>0){for(let e=0;e<y.length;e++){let t=y[e];t.shrink>0&&t.main>0&&(t.main=Math.max(0,t.main+S*t.shrink*t.main/oe),se=!0)}S=0}let ce=re;if(Number.isNaN(ce)){ce=0;for(let e=0;e<y.length;e++)y[e].cross>ce&&(ce=y[e].cross)}if(!u&&Number.isNaN(i))for(let e=0;e<y.length;e++){let t=y[e];t.el!==null&&t.autoCross&&t.align===`stretch`&&t.cross<ce&&(se=!0)}let le=0,ue=h;if(S>0&&y.length>0){switch(v){case`center`:le=S/2;break;case`flex-end`:case`end`:le=S;break;case`space-between`:ue+=y.length>1?S/(y.length-1):0;break;case`space-around`:le=S/y.length/2,ue+=S/y.length;break;case`space-evenly`:le=S/(y.length+1),ue+=S/(y.length+1)}d&&(v===`normal`||v===`flex-start`||v===`start`)&&(le=S)}se&&(af.list.length=te,df.length=ne),b=(u?n:t)+le;let de=0,fe=d?y.slice().reverse():y;for(let e=0;e<fe.length;e++){let s=fe[e];if(s.el===null){b+=s.main+ue,de+=s.main+ue;continue}let c=af.boxes.get(s.el);if(u){let e=s.autoCross&&s.align===`stretch`?r-crossMargins(s.el,r,a,!0):NaN;se?layoutBox(s.el,t,b,r,i,a,o,e,s.main,Number.isNaN(e),0):shift(c,0,b+c.mt-c.y,!1),shift(c,crossOffset(s.align,r,c.w+c.ml+c.mr),0,!1),b+=c.h+c.mt+c.mb+ue,de+=c.h+c.mt+c.mb+ue}else{let e=s.autoCross&&s.align===`stretch`?ce-crossMargins(s.el,r,a,!1):NaN;se?layoutBox(s.el,b,n,s.main,i,a,o,s.main,e,!1,0):shift(c,b+c.ml-c.x,0,!1),shift(c,0,crossOffset(s.align,ce,c.h+c.mt+c.mb),!1),b+=c.w+c.ml+c.mr+ue}}return u?Number.isNaN(i)?Math.max(0,de-ue):i:ce}function crossMargins(e,t,n,r){return edges(e,$,t,fontSize(e,n)),r?$.ml+$.mr:$.mt+$.mb}function crossOffset(e,t,n){if(Number.isNaN(t))return 0;switch(e){case`center`:return(t-n)/2;case`flex-end`:case`end`:case`self-end`:return t-n}return 0}function maxContent(e,t){let n=fontSize(e,t);edges(e,$,NaN,n);let r=$.pl+$.pr+$.bl+$.br;if(isReplaced(e))return intrinsicW(e,n,lineHeightPx(lineHeightOf(e,`normal`),n))+r;if(!plain(e)){let t=length(sty(e).width,NaN,n);if(!Number.isNaN(t))return toContent(t,e,r)+r}let i=isFlex(computedDisplay(e))&&(plain(e)||!sty(e).flexDir.startsWith(`column`)),a=i&&!plain(e)?Math.max(0,lenOr0(sty(e).colGap,NaN,n)):0,o=children(e),s=0,c=0,l=0;for(let e=0;e<o.length;e++){let t=o[e];if(t.type!==1){c+=textWidth(t.data,n);continue}let r=kindOf(t,computedDisplay(t));if(r===0)continue;if(!plain(t)){let e=sty(t).position;if(e===`absolute`||e===`fixed`)continue}if(t.ns===`http://www.w3.org/1999/xhtml`&&t.tag===X.br){s=Math.max(s,c),c=0;continue}let u=maxContent(t,n);edges(t,$,NaN,fontSize(t,n));let d=u+$.ml+$.mr;i?(c+=d+(l>0?a:0),l++):r===1?(s=Math.max(s,c,d),c=0):c+=d}return releaseChildren(o),Math.max(s,c)+r}function viewport(e){return e.doc[J]}function scrollExtent(e,t,n){let r=nf.get(e.doc).list,i=t.vx+t.bl,a=t.vy+t.bt,o=0;for(let e=t.idx+1;e<t.end;e++){let s=r[e];if(s.flags&16&&!(t.flags&8)){e=s.end-1;continue}let c=n?s.vy+s.h+s.mb-a:s.vx+s.w+s.mr-i;c>o&&(o=c),s.flags&1&&(e=s.end-1)}return Math.round((o+(n?t.pb:t.pr))*64)/64}function clientWidthOf(e,t){return e.flags&4?0:e.flags&8?viewport(t)[yn]:e.w-e.bl-e.br}function clientHeightOf(e,t){return e.flags&4?0:e.flags&8?viewport(t)[vn]:e.h-e.bt-e.bb}function knownBox(e){let t=nf.get(e.doc);if(t===void 0)return null;let n=t.boxes.get(e);return n!==void 0&&n.gen===t.gen?n:null}function checkVisibility(e,t){if(!(e.flags&1))return!1;for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return!1;if(computedValue(e,`display`)===`contents`)return!1;for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t))if(computedValue(t,`content-visibility`)===`hidden`)return!1;let n=t??{};if(n.checkOpacity||n.opacityProperty)for(let t=e;t!==null;t=inheritanceParent(t)){let e=computedValue(t,`opacity`);if(e!==``&&parseFloat(e)===0)return!1}return!n.checkVisibilityCSS&&!n.visibilityProperty||computedVisibility(e)===`visible`}var ScrollOffsets=class{top;left;constructor(){this.top=0,this.left=0}};const Ef=/* @__PURE__ */ new WeakMap;function clamp(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:0}function slot(e){let t=Ef.get(e);return t===void 0&&Ef.set(e,t=new ScrollOffsets),t}function getScrollTop(e){return Ou&&layoutOn(e.doc)?layoutScroll(e,!0):Ef.get(e)?.top??0}function getScrollLeft(e){return Ou&&layoutOn(e.doc)?layoutScroll(e,!1):Ef.get(e)?.left??0}function setScrollTop(e,t){Ou&&layoutOn(e.doc)?setLayoutScroll(e,!0,t):slot(e).top=clamp(t)}function setScrollLeft(e,t){Ou&&layoutOn(e.doc)?setLayoutScroll(e,!1,t):slot(e).left=clamp(t)}function scrollElement(e,t,n,r,i){let a,o;if(i>=2)a=Number(n),o=Number(r);else if(typeof n==`object`&&n){let e=n;e.left!==void 0&&(a=Number(e.left)),e.top!==void 0&&(o=Number(e.top))}else if(i===0||n===void 0)return;if(Ou&&layoutOn(e.doc)){let n=boxOf(e);if(n===null)return;let r=layoutScroll(e,!0),i=layoutScroll(e,!1),s=slot(e);s.top=r,s.left=i,a!==void 0&&!Number.isNaN(a)&&(s.left=Math.min(clamp(t?i+a:a),maxScroll(e,n,!1))),o!==void 0&&!Number.isNaN(o)&&(s.top=Math.min(clamp(t?r+o:o),maxScroll(e,n,!0))),(s.top!==r||s.left!==i)&&fireAnEvent(`scroll`,e.node);return}let s=slot(e);a!==void 0&&!Number.isNaN(a)&&(s.left=clamp(t?s.left+a:a)),o!==void 0&&!Number.isNaN(o)&&(s.top=clamp(t?s.top+o:o))}function isBody(e){if(e.tag!==X.body||e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.parent;return t!==null&&t.tag===X.html&&t.parent!==null&&t.parent.type===9}function offsetParent(e){if(!(e.flags&1))return null;let t=e.parent;if(t===null||t.type===9||isBody(e))return null;for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return null;let n=computedPosition(e);if(n===`fixed`)return null;let r=n===`static`;for(let t=inheritanceParent(e);t!==null&&t.type===1;t=inheritanceParent(t))if(computedPosition(t)!==`static`||isBody(t)||r&&t.ns===`http://www.w3.org/1999/xhtml`&&(t.tag===X.td||t.tag===X.th||t.tag===X.table))return t;return null}function scrollSize(e,t,n){if(t.flags&4)return 0;let r=n?clientHeightOf(t,e):clientWidthOf(t,e);return Math.max(r,scrollExtent(e,t,n))}function maxScroll(e,t,n){return Math.max(0,scrollSize(e,t,n)-(n?clientHeightOf(t,e):clientWidthOf(t,e)))}function layoutScroll(e,t){let n=Ef.get(e);if(n===void 0)return 0;let r=t?n.top:n.left;if(r===0)return 0;let i=boxOf(e);return i===null?0:Math.min(r,maxScroll(e,i,t))}function setLayoutScroll(e,t,n){let r=boxOf(e);if(r===null)return;let i=Number(n);Number.isFinite(i)||(i=0),i=Math.min(Math.max(0,i),maxScroll(e,r,t));let a=layoutScroll(e,t),o=slot(e);t?o.top=i:o.left=i,i!==a&&fireAnEvent(`scroll`,e.node)}let Df=0,Of=0;function rectOrigin(e,t){let n=t.vx,r=t.vy;if(!(t.flags&16))for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t)){let e=knownBox(t);if(e!==null&&((e.flags&9)==1&&(n-=layoutScroll(t,!1),r-=layoutScroll(t,!0)),e.flags&16))break}if(!(t.flags&2)){let t=viewport(e);n-=t[pr],r-=t[mr]}Df=n,Of=r}function boundingClientRect(e){if(!Ou)return new Mo;let t=boxOf(e);return t===null?new Mo:(rectOrigin(e,t),new Mo(Df,Of,t.w,t.h))}function clientRects(e){if(!Ou)return new DOMRectList;let t=boxOf(e);return t===null?new DOMRectList:(rectOrigin(e,t),new DOMRectList([new Mo(Df,Of,t.w,t.h)]))}const kf={ClientTop:0,ClientLeft:1,ClientWidth:2,ClientHeight:3,ScrollWidth:4,ScrollHeight:5};function elementMetric(e,t){if(!Ou)return 0;let n=boxOf(e);if(n===null)return 0;switch(t){case kf.ClientTop:return n.flags&4?0:Math.round(n.bt);case kf.ClientLeft:return n.flags&4?0:Math.round(n.bl);case kf.ClientWidth:return Math.round(clientWidthOf(n,e));case kf.ClientHeight:return Math.round(clientHeightOf(n,e));case kf.ScrollWidth:return Math.round(scrollSize(e,n,!1));case kf.ScrollHeight:return Math.round(scrollSize(e,n,!0))}return 0}const Af={Top:0,Left:1,Width:2,Height:3};function offsetMetric(e,t){if(!Ou)return 0;let n=boxOf(e);if(n===null)return 0;if(t===Af.Width)return Math.round(n.w);if(t===Af.Height)return Math.round(n.h);let r=offsetParent(e),i=r===null||isBody(r)?null:boxOf(r);return t===Af.Top?Math.round(i===null?n.y:n.y-i.y-i.bt):Math.round(i===null?n.x:n.x-i.x-i.bl)}function scrollElementIntoView(e,t){if(!Ou||boxOf(e)===null)return;let n=`start`,r=`nearest`;if(t===!1)n=`end`;else if(typeof t==`object`&&t){let e=t;e.block!==void 0&&(n=String(e.block)),e.inline!==void 0&&(r=String(e.inline))}for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t)){let i=boxOf(t);if(i===null||(i.flags&9)!=1)continue;let a=boxOf(e);rectOrigin(e,a);let o=Df,s=Of;rectOrigin(t,i);let c=alignDelta(n,s-Of-i.bt,a.h,clientHeightOf(i,t)),l=alignDelta(r,o-Df-i.bl,a.w,clientWidthOf(i,t));c!==0&&setLayoutScroll(t,!0,layoutScroll(t,!0)+c),l!==0&&setLayoutScroll(t,!1,layoutScroll(t,!1)+l)}}function alignDelta(e,t,n,r){switch(e){case`start`:return t;case`end`:return t+n-r;case`center`:return t+n/2-r/2}let i=t+n;return t<0&&i>r?0:t<0&&n<=r||i>r&&n>r?t:i>r&&n<=r||t<0&&n>r?i-r:0}function installHTMLElementView(e){let t=e.prototype;Object.defineProperty(t,"offsetParent",{get(){let e=offsetParent(this[M]);return e===null?null:e.node},enumerable:!0,configurable:!0});let n=[[`offsetTop`,function offsetTop(){return Ou?offsetMetric(this[M],Af.Top):0}],[`offsetLeft`,function offsetLeft(){return Ou?offsetMetric(this[M],Af.Left):0}],[`offsetWidth`,function offsetWidth(){return Ou?offsetMetric(this[M],Af.Width):0}],[`offsetHeight`,function offsetHeight(){return Ou?offsetMetric(this[M],Af.Height):0}]];for(let[e,r]of n)Object.defineProperty(r,"name",{value:`get ${e}`}),Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0})}function installElementView(e){let t=e.prototype,def=(e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!0,...n})};def(`checkVisibility`,{writable:!0,value:function checkVisibilityMethod(e){return checkVisibility(this[M],e)}}),def(`getBoundingClientRect`,{writable:!0,value:function getBoundingClientRect(){return boundingClientRect(this[M])}}),def(`getClientRects`,{writable:!0,value:function getClientRects(){return clientRects(this[M])}}),def(`scrollIntoView`,{writable:!0,value:function scrollIntoView(e){Ou&&scrollElementIntoView(this[M],e)}});let n=[[`clientTop`,kf.ClientTop],[`clientLeft`,kf.ClientLeft],[`clientWidth`,kf.ClientWidth],[`clientHeight`,kf.ClientHeight],[`scrollWidth`,kf.ScrollWidth],[`scrollHeight`,kf.ScrollHeight]];for(let[e,t]of n){let get=function(){return Ou?elementMetric(this[M],t):0};Object.defineProperty(get,"name",{value:`get ${e}`}),def(e,{get})}def(`scrollTop`,{get(){return getScrollTop(this[M])},set(e){setScrollTop(this[M],e)}}),def(`scrollLeft`,{get(){return getScrollLeft(this[M])},set(e){setScrollLeft(this[M],e)}});for(let[e,t]of[[`scroll`,!1],[`scrollTo`,!1],[`scrollBy`,!0]])def(e,{writable:!0,value:function(e,n){scrollElement(this[M],t,e,n,arguments.length)}})}var ResizeObserverSize=class{inlineSize;blockSize;constructor(e,t){this.inlineSize=e,this.blockSize=t}get[Symbol.toStringTag](){return`ResizeObserverSize`}},ResizeObserverEntry=class{target;contentRect;borderBoxSize;contentBoxSize;devicePixelContentBoxSize;constructor(e,t,n,r,i,a){this.target=e,this.contentRect=new DOMRectReadOnly(i,a,n.inlineSize,n.blockSize),this.borderBoxSize=Object.freeze([t]),this.contentBoxSize=Object.freeze([n]),this.devicePixelContentBoxSize=Object.freeze([r])}get[Symbol.toStringTag](){return`ResizeObserverEntry`}},Observation=class{target;box;lastInline;lastBlock;constructor(e,t){this.target=e,this.box=t,this.lastInline=-1,this.lastBlock=-1}};const jf=/* @__PURE__ */ new WeakMap,Mf=/* @__PURE__ */ new WeakMap,Nf=/* @__PURE__ */ new Set;let Pf=!1,Ff=0;const If=globalThis.queueMicrotask.bind(globalThis);function schedule(e){Nf.add(e),!Pf&&(Pf=!0,If(runChecks))}function observe(e,t,n){if(!Ou)return;let r=t[M];if(r===void 0)return;let i=r.doc;if(!layoutOn(i))return;let a=jf.get(e);a===void 0&&jf.set(e,a=/* @__PURE__ */ new Map),a.delete(t),a.set(t,new Observation(t,n));let o=Mf.get(i);o===void 0&&Mf.set(i,o=/* @__PURE__ */ new Set),o.add(e),Ff=0,schedule(i)}function unobserve(e,t){jf.get(e)?.delete(t)}function disconnect(e){jf.get(e)?.clear()}let Lf=0,Rf=0;function boxSize(e,t){let n=boxOf(e[M]);if(n===null)Lf=Rf=0;else if(t===`border-box`)Lf=n.w,Rf=n.h;else if(Lf=Math.max(0,n.w-n.bl-n.br-n.pl-n.pr),Rf=Math.max(0,n.h-n.bt-n.bb-n.pt-n.pb),t===`device-pixel-content-box`){let t=e[M].doc[J][kt];Lf=Math.round(Lf*t),Rf=Math.round(Rf*t)}}function entryFor(e){let t=e.target;boxSize(t,`border-box`);let n=new ResizeObserverSize(Lf,Rf);boxSize(t,`content-box`);let r=new ResizeObserverSize(Lf,Rf);boxSize(t,`device-pixel-content-box`);let i=new ResizeObserverSize(Lf,Rf),a=boxOf(t[M]);return new ResizeObserverEntry(t,n,r,i,a===null?0:a.pl,a===null?0:a.pt)}function runChecks(){Pf=!1;let e=[...Nf];Nf.clear();let t=!1;for(let n of e){let e=Mf.get(n);if(e!==void 0)for(let n of Array.from(e)){let r=jf.get(n);if(r===void 0||r.size===0){e.delete(n);continue}let i=[];for(let e of r.values())boxSize(e.target,e.box),(Lf!==e.lastInline||Rf!==e.lastBlock)&&(e.lastInline=Lf,e.lastBlock=Rf,i.push(entryFor(e)));if(i.length!==0){t=!0;try{n[Ze].call(n,i,n)}catch(e){reportException$1(e,i[0].target)}}}}t?Ff++:Ff=0}Zd.observe=observe,Zd.unobserve=unobserve,Zd.disconnect=disconnect,setRelayoutListener(e=>{Ff<32&&Mf.has(e)&&schedule(e)});function escape(e){if(arguments.length===0)throw TypeError(`Failed to execute 'escape' on 'CSS': 1 argument required, but only 0 present.`);let t=String(e),n=t.length,r=t.charCodeAt(0),i=0;for(;i<n;i++){let e=t.charCodeAt(i);if(e>=48&&e<=57&&(i===0||i===1&&r===45)||e===45&&n===1||!(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122))break}if(i===n)return t;let a=t.slice(0,i);for(let e=i;e<n;e++){let i=t.charCodeAt(e);a+=i===0?`�`:i>=1&&i<=31||i===127||e===0&&i>=48&&i<=57||e===1&&i>=48&&i<=57&&r===45?`\\`+i.toString(16)+` `:e===0&&i===45&&n===1?`\\-`:i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?t[e]:`\\`+t[e]}return a}function supports(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'supports' on 'CSS': 1 argument required, but only 0 present.`);return arguments.length>=2?supportsDeclaration(String(e),String(t)):evaluateSupportsCondition(String(e))}const zf=/* @__PURE__ */ new Set;function registerProperty(e){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw TypeError(`Failed to execute 'registerProperty' on 'CSS': required member name is undefined.`);if(!e.name.startsWith(`--`))throw new DOMException(`Failed to execute 'registerProperty' on 'CSS': Custom property names must start with '--'.`,`SyntaxError`);if(zf.has(e.name))throw new DOMException(`Failed to execute 'registerProperty' on 'CSS': The name provided has already been registered.`,`InvalidModificationError`);zf.add(e.name)}const Bf={escape,supports,registerProperty};Object.defineProperty(Bf,Symbol.toStringTag,{value:`CSS`,writable:!1,enumerable:!1,configurable:!0}),ud.createSheet=createOwnerSheet,ud.removeSheet=removeOwnerSheet,ud.createLinkSheet=createLinkSheet,gl.getComputedStyle=(e,t)=>getComputedStyle(e,t),gl.evaluateMediaQuery=(e,t)=>matchMediaText(e,t),gl.setComputedColorMode=setComputedColorMode,installElementView(Fo),installHTMLElementView(HTMLElement),Object.hasOwn(Z.prototype,`scrollingElement`)||Object.defineProperty(Z.prototype,"scrollingElement",{get(){return this.compatMode===`BackCompat`?this.body:this.documentElement},enumerable:!0,configurable:!0});for(let e of[Z,ShadowRoot]){let t=e.prototype;Object.hasOwn(t,`styleSheets`)||Object.defineProperty(t,"styleSheets",{get(){return styleSheetsOf(this[M])},enumerable:!0,configurable:!0}),Object.hasOwn(t,`adoptedStyleSheets`)||Object.defineProperty(t,"adoptedStyleSheets",{get(){return adoptedStyleSheetsOf(this[M])},set(e){setAdoptedStyleSheets(this[M],e)},enumerable:!0,configurable:!0})}registerDomNamespace(/* @__PURE__ */ __exportAll({AbstractRange:()=>AbstractRange,AnimationEvent:()=>AnimationEvent,Attr:()=>Attr,Audio:()=>rd,BeforeUnloadEvent:()=>BeforeUnloadEvent,CDATASection:()=>CDATASection,CSS:()=>Bf,CSSConditionRule:()=>CSSConditionRule,CSSContainerRule:()=>CSSContainerRule,CSSFontFaceRule:()=>CSSFontFaceRule,CSSGroupingRule:()=>CSSGroupingRule,CSSImportRule:()=>CSSImportRule,CSSKeyframeRule:()=>CSSKeyframeRule,CSSKeyframesRule:()=>CSSKeyframesRule,CSSLayerBlockRule:()=>CSSLayerBlockRule,CSSLayerStatementRule:()=>CSSLayerStatementRule,CSSMediaRule:()=>CSSMediaRule,CSSNamespaceRule:()=>CSSNamespaceRule,CSSNestedDeclarations:()=>CSSNestedDeclarations,CSSPageRule:()=>CSSPageRule,CSSPropertyRule:()=>CSSPropertyRule,CSSRule:()=>ml,CSSRuleList:()=>CSSRuleList,CSSScopeRule:()=>CSSScopeRule,CSSStartingStyleRule:()=>CSSStartingStyleRule,CSSStyleDeclaration:()=>CSSStyleDeclaration,CSSStyleRule:()=>hl,CSSStyleSheet:()=>pl,CSSSupportsRule:()=>CSSSupportsRule,CharacterData:()=>CharacterData,Clipboard:()=>Clipboard,ClipboardEvent:()=>ClipboardEvent,ClipboardItem:()=>ClipboardItem,CloseEvent:()=>CloseEvent,CommandEvent:()=>CommandEvent,Comment:()=>Comment,CompositionEvent:()=>CompositionEvent,CustomElementRegistry:()=>CustomElementRegistry,CustomEvent:()=>CustomEvent,CustomStateSet:()=>CustomStateSet,DOMImplementation:()=>DOMImplementation,DOMMatrix:()=>Po,DOMMatrixReadOnly:()=>DOMMatrixReadOnly,DOMParser:()=>DOMParser,DOMPoint:()=>jo,DOMPointReadOnly:()=>DOMPointReadOnly,DOMRect:()=>Mo,DOMRectList:()=>DOMRectList,DOMRectReadOnly:()=>DOMRectReadOnly,DOMStringMap:()=>DOMStringMap,DOMTokenList:()=>So,DataTransfer:()=>DataTransfer,DataTransferItem:()=>DataTransferItem,DataTransferItemList:()=>DataTransferItemList,Document:()=>Z,DocumentFragment:()=>DocumentFragment,DocumentType:()=>DocumentType,DragEvent:()=>DragEvent,Element:()=>Fo,ElementInternals:()=>ElementInternals,ErrorEvent:()=>ErrorEvent,Event:()=>Event,EventTarget:()=>EventTarget,FileList:()=>FileList,FileReader:()=>FileReader,FocusEvent:()=>FocusEvent,FormData:()=>FormData$1,FormDataEvent:()=>FormDataEvent,HTMLAnchorElement:()=>HTMLAnchorElement,HTMLAreaElement:()=>HTMLAreaElement,HTMLAudioElement:()=>HTMLAudioElement,HTMLBRElement:()=>HTMLBRElement,HTMLBaseElement:()=>HTMLBaseElement,HTMLBodyElement:()=>HTMLBodyElement,HTMLButtonElement:()=>HTMLButtonElement,HTMLCanvasElement:()=>HTMLCanvasElement,HTMLCollection:()=>ka,HTMLDListElement:()=>HTMLDListElement,HTMLDataElement:()=>HTMLDataElement,HTMLDataListElement:()=>HTMLDataListElement,HTMLDetailsElement:()=>HTMLDetailsElement,HTMLDialogElement:()=>HTMLDialogElement,HTMLDirectoryElement:()=>HTMLDirectoryElement,HTMLDivElement:()=>HTMLDivElement,HTMLDocument:()=>Z,HTMLElement:()=>HTMLElement,HTMLEmbedElement:()=>HTMLEmbedElement,HTMLFieldSetElement:()=>HTMLFieldSetElement,HTMLFontElement:()=>HTMLFontElement,HTMLFormControlsCollection:()=>HTMLFormControlsCollection,HTMLFormElement:()=>HTMLFormElement,HTMLFrameElement:()=>HTMLFrameElement,HTMLFrameSetElement:()=>HTMLFrameSetElement,HTMLHRElement:()=>HTMLHRElement,HTMLHeadElement:()=>HTMLHeadElement,HTMLHeadingElement:()=>HTMLHeadingElement,HTMLHtmlElement:()=>HTMLHtmlElement,HTMLIFrameElement:()=>HTMLIFrameElement,HTMLImageElement:()=>HTMLImageElement,HTMLInputElement:()=>HTMLInputElement,HTMLLIElement:()=>HTMLLIElement,HTMLLabelElement:()=>HTMLLabelElement,HTMLLegendElement:()=>HTMLLegendElement,HTMLLinkElement:()=>HTMLLinkElement,HTMLMapElement:()=>HTMLMapElement,HTMLMarqueeElement:()=>HTMLMarqueeElement,HTMLMediaElement:()=>HTMLMediaElement,HTMLMenuElement:()=>HTMLMenuElement,HTMLMetaElement:()=>HTMLMetaElement,HTMLMeterElement:()=>HTMLMeterElement,HTMLModElement:()=>HTMLModElement,HTMLOListElement:()=>HTMLOListElement,HTMLObjectElement:()=>HTMLObjectElement,HTMLOptGroupElement:()=>HTMLOptGroupElement,HTMLOptionElement:()=>HTMLOptionElement,HTMLOptionsCollection:()=>HTMLOptionsCollection,HTMLOutputElement:()=>HTMLOutputElement,HTMLParagraphElement:()=>HTMLParagraphElement,HTMLParamElement:()=>HTMLParamElement,HTMLPictureElement:()=>HTMLPictureElement,HTMLPreElement:()=>HTMLPreElement,HTMLProgressElement:()=>HTMLProgressElement,HTMLQuoteElement:()=>HTMLQuoteElement,HTMLScriptElement:()=>HTMLScriptElement,HTMLSelectElement:()=>HTMLSelectElement,HTMLSlotElement:()=>HTMLSlotElement,HTMLSourceElement:()=>HTMLSourceElement,HTMLSpanElement:()=>HTMLSpanElement,HTMLStyleElement:()=>HTMLStyleElement,HTMLTableCaptionElement:()=>HTMLTableCaptionElement,HTMLTableCellElement:()=>HTMLTableCellElement,HTMLTableColElement:()=>HTMLTableColElement,HTMLTableElement:()=>HTMLTableElement,HTMLTableRowElement:()=>HTMLTableRowElement,HTMLTableSectionElement:()=>HTMLTableSectionElement,HTMLTemplateElement:()=>HTMLTemplateElement,HTMLTextAreaElement:()=>HTMLTextAreaElement,HTMLTimeElement:()=>HTMLTimeElement,HTMLTitleElement:()=>HTMLTitleElement,HTMLTrackElement:()=>HTMLTrackElement,HTMLUListElement:()=>HTMLUListElement,HTMLUnknownElement:()=>HTMLUnknownElement,HTMLVideoElement:()=>HTMLVideoElement,HashChangeEvent:()=>HashChangeEvent,History:()=>History,Image:()=>Yu,InputEvent:()=>InputEvent,IntersectionObserver:()=>IntersectionObserver,KeyboardEvent:()=>KeyboardEvent,Location:()=>Location,MathMLElement:()=>MathMLElement,MediaError:()=>MediaError,MediaList:()=>MediaList,MediaQueryList:()=>MediaQueryList,MediaQueryListEvent:()=>MediaQueryListEvent,MessageEvent:()=>MessageEvent,MouseEvent:()=>MouseEvent,MutationObserver:()=>MutationObserver,MutationRecord:()=>zi,NamedNodeMap:()=>Oo,Navigator:()=>Navigator,Node:()=>Node,NodeFilter:()=>cu,NodeIterator:()=>NodeIterator,NodeList:()=>Ii,Option:()=>Dd,PageTransitionEvent:()=>PageTransitionEvent,PointerEvent:()=>PointerEvent,PopStateEvent:()=>PopStateEvent,ProcessingInstruction:()=>ProcessingInstruction,ProgressEvent:()=>ProgressEvent,PromiseRejectionEvent:()=>PromiseRejectionEvent,RadioNodeList:()=>RadioNodeList,Range:()=>su,ResizeObserver:()=>ResizeObserver,SVGAElement:()=>SVGAElement,SVGAnimatedString:()=>SVGAnimatedString,SVGCircleElement:()=>SVGCircleElement,SVGClipPathElement:()=>SVGClipPathElement,SVGDefsElement:()=>SVGDefsElement,SVGDescElement:()=>SVGDescElement,SVGElement:()=>SVGElement,SVGEllipseElement:()=>SVGEllipseElement,SVGFilterElement:()=>SVGFilterElement,SVGForeignObjectElement:()=>SVGForeignObjectElement,SVGGElement:()=>SVGGElement,SVGGeometryElement:()=>SVGGeometryElement,SVGGradientElement:()=>SVGGradientElement,SVGGraphicsElement:()=>SVGGraphicsElement,SVGImageElement:()=>SVGImageElement,SVGLineElement:()=>SVGLineElement,SVGLinearGradientElement:()=>SVGLinearGradientElement,SVGMarkerElement:()=>SVGMarkerElement,SVGMaskElement:()=>SVGMaskElement,SVGMetadataElement:()=>SVGMetadataElement,SVGPathElement:()=>SVGPathElement,SVGPatternElement:()=>SVGPatternElement,SVGPolygonElement:()=>SVGPolygonElement,SVGPolylineElement:()=>SVGPolylineElement,SVGRadialGradientElement:()=>SVGRadialGradientElement,SVGRectElement:()=>SVGRectElement,SVGSVGElement:()=>SVGSVGElement,SVGScriptElement:()=>SVGScriptElement,SVGStopElement:()=>SVGStopElement,SVGStyleElement:()=>SVGStyleElement,SVGSwitchElement:()=>SVGSwitchElement,SVGSymbolElement:()=>SVGSymbolElement,SVGTSpanElement:()=>SVGTSpanElement,SVGTextContentElement:()=>SVGTextContentElement,SVGTextElement:()=>SVGTextElement,SVGTextPathElement:()=>SVGTextPathElement,SVGTextPositioningElement:()=>SVGTextPositioningElement,SVGTitleElement:()=>SVGTitleElement,SVGUseElement:()=>SVGUseElement,SVGViewElement:()=>SVGViewElement,Screen:()=>Screen,Selection:()=>Selection,ShadowRoot:()=>ShadowRoot,StaticRange:()=>StaticRange,Storage:()=>Storage,StorageEvent:()=>StorageEvent,StyleSheet:()=>StyleSheet,StyleSheetList:()=>StyleSheetList,SubmitEvent:()=>SubmitEvent,Text:()=>Text,TextEvent:()=>TextEvent,TimeRanges:()=>TimeRanges,ToggleEvent:()=>ToggleEvent,Touch:()=>Touch,TouchEvent:()=>TouchEvent,TouchList:()=>vi,TransitionEvent:()=>TransitionEvent,TreeWalker:()=>TreeWalker,UIEvent:()=>UIEvent,ValidityState:()=>ValidityState,VisualViewport:()=>VisualViewport,WheelEvent:()=>WheelEvent,Window:()=>Window,XMLDocument:()=>XMLDocument,XMLHttpRequest:()=>XMLHttpRequest,XMLHttpRequestEventTarget:()=>Wd,XMLHttpRequestUpload:()=>XMLHttpRequestUpload,XMLSerializer:()=>XMLSerializer,createWindow:()=>createWindow,currentDocument:()=>currentDocument,currentWindow:()=>currentWindow,currentWindowOrNull:()=>currentWindowOrNull,getComputedStyle:()=>getComputedStyle,installGlobals:()=>installGlobals,setCurrentWindow:()=>setCurrentWindow}));export{sanitizeValue as $,CDATASection as $a,D as $c,skipZeroDelayWait as $d,isFACE as $i,kn as $l,attrAssociatedElements as $n,treeRoot as $o,createLinkSheet as $r,Be as $s,HTMLMediaElement as $t,Sr as $u,FileReader as A,getElementsByTagNameNS as Aa,gt as Ac,Xr as Ad,he as Af,pl as Ai,dn as Al,HTMLObjectElement as An,isAsciiWhitespace as Ao,defaultButton as Ar,ClipboardEvent as As,SVGScriptElement as At,tr as Au,HTMLOutputElement as B,isValidNamespacePrefix as Ba,Tt as Bc,ii as Bd,ae as Bf,fireAnEvent as Bi,bn as Bl,HTMLTableColElement as Bn,derivedCache as Bo,computedVisibility as Br,TouchEvent as Bs,SVGTitleElement as Bt,ur as Bu,optionSelected as C,getEventHandler as Ca,ct as Cc,Wr as Cd,le as Cf,CSSPageRule as Ci,rn as Cl,HTMLLIElement as Cn,tagName as Co,AbstractRange as Cr,PopStateEvent as Cs,SVGPathElement as Ct,Jn as Cu,DataTransferItemList as D,attachShadowRoot as Da,ft as Dc,qr as Dd,we as Df,CSSScopeRule as Di,cn as Dl,HTMLMetaElement as Dn,classTokens as Do,nodeLength as Dr,SubmitEvent as Ds,SVGRadialGradientElement as Dt,Qn as Du,DataTransferItem as E,Fo as Ea,dt as Ec,Kr as Ed,ge as Ef,CSSRuleList as Ei,sn as El,HTMLMenuElement as En,attr as Eo,compareBoundaryPoints as Er,StorageEvent as Es,SVGPolylineElement as Et,Zn as Eu,FormData$1 as F,Mo as Fa,xt as Fc,ei as Fd,Te as Ff,matchMediaText as Fi,hn as Fl,HTMLQuoteElement as Fn,notifyMutationObservers as Fo,styleElementRemoved as Fr,KeyboardEvent as Fs,SVGTSpanElement as Ft,or as Fu,HTMLButtonElement as G,DOMStringMap as Ga,kt as Gc,canSkipZeroDelayWait as Gd,__name as Gf,compatExposes as Gi,F as Gl,HTMLTrackElement as Gn,isInclusiveAncestor as Go,isVisibilityHidden as Gr,removeAllEventListeners as Gs,HTMLStyleElement as Gt,mr as Gu,HTMLFieldSetElement as H,Oo as Ha,Dt as Hc,oi as Hd,se as Hf,rl as Hi,P as Hl,HTMLTableRowElement as Hn,childAt as Ho,hasAuthorStyles as Hr,UIEvent as Hs,SVGViewElement as Ht,dr as Hu,Fd as I,DOMRectList as Ia,T as Ic,ti as Id,ie as If,parseMediaQueryList as Ii,gn as Il,HTMLSourceElement as In,zi as Io,styleElementUpdated as Ir,MouseEvent as Is,SVGTextContentElement as It,sr as Iu,Dd as J,serializeChildren as Ja,E as Jc,clockStats as Jd,resolveCompat as Ji,Tn as Jl,Yu as Jn,nextElementSibling as Jo,pseudoContent as Jr,setTrusted as Js,HTMLTemplateElement as Jt,_r as Ju,HTMLOptGroupElement as K,So as Ka,At as Kc,clockNow as Kd,deferredCompatMembers as Ki,Cn as Kl,HTMLUListElement as Kn,lastElementChild as Ko,pointerEvents as Kr,Event as Ks,HTMLTitleElement as Kt,hr as Ku,HTMLFormElement as L,DOMRectReadOnly as La,St as Lc,J as Ld,oe as Lf,NodeCache as Li,_n as Ll,HTMLSpanElement as Ln,Ii as Lo,getComputedStyle as Lr,PointerEvent as Ls,SVGTextElement as Lt,cr as Lu,Wd as M,DOMMatrixReadOnly as Ma,vt as Mc,Zr as Md,De as Mf,MediaList as Mi,fn as Ml,HTMLParamElement as Mn,removeAttribute as Mo,isSubmitButton as Mr,DragEvent as Ms,SVGStyleElement as Mt,rr as Mu,XMLHttpRequestUpload as N,jo as Na,yt as Nc,Qr as Nd,be as Nf,StyleSheet as Ni,pn as Nl,HTMLPictureElement as Nn,setAttribute as No,setNotImplementedHandler as Nr,FocusEvent as Ns,SVGSwitchElement as Nt,ir as Nu,IntersectionObserver as O,getElementsByClassName as Oa,pt as Oc,Jr as Od,Se as Of,CSSStartingStyleRule as Oi,ln as Ol,HTMLModElement as On,getAttribute as Oo,CommandEvent as Or,ToggleEvent as Os,SVGRectElement as Ot,$n as Ou,installGlobals as P,DOMPointReadOnly as Pa,bt as Pc,$r as Pd,me as Pf,StyleSheetList as Pi,mn as Pl,HTMLPreElement as Pn,splitOnAsciiWhitespace as Po,isEditable as Pr,InputEvent as Ps,SVGSymbolElement as Pt,ar as Pu,HTMLInputElement as Q,DocumentFragment as Qa,It as Qc,skipIdleTime as Qd,faceState as Qi,I as Ql,attrAssociatedElement as Qn,previousInTree as Qo,adoptedStyleSheetsOf as Qr,ze as Qs,HTMLAudioElement as Qt,xr as Qu,HTMLDataListElement as R,isValidDoctypeName as Ra,Ct as Rc,ni as Rd,ee as Rf,nodeCache as Ri,vn as Rl,HTMLTableCaptionElement as Rn,ensureIndexGetters as Ro,computedDisplay as Rr,TextEvent as Rs,SVGTextPathElement as Rt,H as Ru,isValid as S,Vo as Sa,st as Sc,Ur as Sd,_e as Sf,CSSNestedDeclarations as Si,nn as Sl,HTMLImageElement as Sn,tagId as So,TreeWalker as Sr,PageTransitionEvent as Ss,SVGMetadataElement as St,qn as Su,DataTransfer as T,setEventHandler as Ta,ut as Tc,K as Td,Ee as Tf,ml as Ti,j as Tl,HTMLMarqueeElement as Tn,asciiLowercase$1 as To,StaticRange as Tr,PromiseRejectionEvent as Ts,SVGPolygonElement as Tt,Xn as Tu,HTMLLegendElement as U,attrNode as Ua,Ot as Uc,VirtualClock as Ud,ce as Uf,Yc as Ui,xn as Ul,HTMLTableSectionElement as Un,firstElementChild as Uo,isDisplayNone as Ur,WheelEvent as Us,HTMLLinkElement as Ut,fr as Uu,HTMLProgressElement as V,validateAndExtract as Va,Et as Vc,ai as Vd,s as Vf,fireSyntheticPointerEvent as Vi,N as Vl,HTMLTableElement as Vn,peekDerivedCache as Vo,currentStyleVersion as Vr,vi as Vs,SVGUseElement as Vt,U as Vu,HTMLLabelElement as W,Attr as Wa,Pt as Wc,VirtualTimeout as Wd,S as Wf,Xc as Wi,Sn as Wl,HTMLTimeElement as Wn,indexOf as Wo,isDisplayNoneInclusive as Wr,hasListeners as Ws,HTMLScriptElement as Wt,pr as Wu,HTMLSelectElement as X,parseFragment as Xa,Nt as Xc,installClock as Xd,DeclBlock as Xi,Dn as Xl,ElementInternals as Xn,nextSkippingChildren as Xo,styledDisplay as Xr,Le as Xs,HTMLDialogElement as Xt,yr as Xu,optionSelect as Y,serializeNode as Ya,Mt as Yc,foreignImmediatesPending as Yd,CSSStyleDeclaration as Yi,En as Yl,CustomStateSet as Yn,nextInTree as Yo,setComputedColorMode as Yr,Ie as Ys,HTMLDetailsElement as Yt,vr as Yu,HTMLTextAreaElement as Z,DocumentType as Za,Ft as Zc,isClockTimer as Zd,parseDeclBlock as Zi,On as Zl,HTMLElement as Zn,previousElementSibling as Zo,uaDisplay as Zr,Re as Zs,rd as Zt,br as Zu,isPlaceholderShown as _,isTextualType as _a,rt as _c,Rr as _d,xe as _f,CSSKeyframesRule as _i,Zt as _l,HTMLHRElement as _n,assignedNodes as _o,XMLDocument as _r,CustomEvent as _s,SVGImageElement as _t,Hn as _u,inputIndeterminate as a,formOwner as aa,Ke as ac,Dr as ad,v as af,unregisterOwnerSheet as ai,Bt as al,HTMLBRElement as an,ensureCollectionIndexGetters as ao,Storage as ar,nodeGetTheParent as as,SVGCircleElement as at,Nn as au,isRequired as b,CustomElementRegistry as ba,ot as bc,Vr as bd,ye as bf,CSSMediaRule as bi,en as bl,HTMLHtmlElement as bn,findSlot as bo,cu as br,HashChangeEvent as bs,SVGMarkerElement as bt,Gn as bu,isDefault as c,isListed as ca,Je as cc,G as cd,re as cf,mediaEnvironment as ci,Ut as cl,HTMLCanvasElement as cn,matches as co,Clipboard as cr,reportException$1 as cs,SVGDescElement as ct,In as cu,isInRange as d,labeledControl as da,Ze as dc,Mr as dd,x as df,CSSConditionRule as di,A as dl,HTMLDirectoryElement as dn,Node as do,History as dr,currentWindow as ds,SVGFilterElement as dt,Ln as du,ValidityState as ea,Ve as ec,Cr as ed,virtualDate as ef,createOwnerSheet as ei,Lt as el,HTMLVideoElement as en,CharacterData as eo,hasExplicitAttrElements as er,AttrRecord as es,FileList as et,L as eu,isIndeterminate as f,labelsFor as fa,Qe as fc,Nr as fd,te as ff,CSSContainerRule as fi,Kt as fl,HTMLDivElement as fn,inspectNode as fo,Location as fr,currentWindowOrNull as fs,SVGForeignObjectElement as ft,Rn as fu,isOutOfRange as g,isNumericType as ga,nt as gc,Lr as gd,l as gf,CSSKeyframeRule as gi,Xt as gl,HTMLFrameSetElement as gn,assignedElements as go,Z as gr,CloseEvent as gs,SVGGraphicsElement as gt,Vn as gu,isOptional as h,inputTypeFromAttr as ha,tt as hc,Ir as hd,u as hf,CSSImportRule as hi,Yt as hl,HTMLFrameElement as hn,assignManually as ho,DOMImplementation as hr,BeforeUnloadEvent as hs,SVGGradientElement as ht,Bn as hu,inputChecked as i,listOfOptions as ia,Ge as ic,Er as id,m as if,styleSheetsOf as ii,k as il,HTMLAreaElement as in,ka as io,trackGlobalTimers as ir,getCurrentEvent as is,SVGAnimatedString as it,Mn as iu,XMLHttpRequest as j,Po as ja,_t as jc,q as jd,ue as jf,CSSSupportsRule as ji,M as jl,HTMLParagraphElement as jn,prefixFlag as jo,implicitSubmission as jr,CompositionEvent as js,SVGStopElement as jt,nr as ju,ResizeObserver as k,getElementsByTagName as ka,mt as kc,Yr as kd,ve as kf,hl as ki,un as kl,HTMLOListElement as kn,hasAttr as ko,constructEntryList as kr,TransitionEvent as ks,SVGSVGElement as kt,er as ku,isDisabled as l,isResettable as la,Ye as lc,Ar as ld,y as lf,MediaQueryListEvent as li,Wt as ll,HTMLDListElement as ln,querySelector as lo,ClipboardItem as lr,setUncaughtExceptionHandler as ls,SVGElement as lt,z as lu,isMutable as m,inputType as ma,et as mc,Fr as md,a as mf,CSSGroupingRule as mi,Jt as ml,HTMLFontElement as mn,splitText as mo,XMLSerializer as mr,AnimationEvent as ms,SVGGeometryElement as mt,zn as mu,controlValue as n,HTMLOptionsCollection as na,Ue as nc,Tr as nd,o as nf,removeOwnerSheet as ni,Rt as nl,TimeRanges as nn,ProcessingInstruction as no,createWindow as nr,EventTarget as ns,MathMLElement as nt,jn as nu,isAutofilled as o,isActuallyDisabled as oa,qe as oc,Or as od,h as of,MediaQueryList as oi,Vt as ol,HTMLBaseElement as on,withNamedProperties as oo,Screen as or,retarget as os,SVGClipPathElement as ot,Pn as ou,isInvalid as p,bs as pa,$e as pc,Pr as pd,_ as pf,CSSFontFaceRule as pi,qt as pl,HTMLEmbedElement as pn,replaceData as po,DOMParser as pr,setCurrentWindow as ps,SVGGElement as pt,V as pu,HTMLOptionElement as q,ShadowRoot as qa,jt as qc,clockSkipped as qd,hiddenGlobals as qi,wn as ql,HTMLUnknownElement as qn,nextElementInTree as qo,pointerEventsNone as qr,EventState as qs,HTMLSlotElement as qt,gr as qu,hasReadonlyAttribute as r,RadioNodeList as ra,We as rc,W as rd,c as rf,setAdoptedStyleSheets as ri,zt as rl,HTMLAnchorElement as rn,Text as ro,windowInterfaces as rr,dispatch as rs,SVGAElement as rt,R as ru,isChecked as s,isLabelable as sa,w as sc,kr as sd,b as sf,evaluateMediaQueryList as si,Ht as sl,HTMLBodyElement as sn,closest as so,VisualViewport as sr,setAssignedSlotLookup as ss,SVGDefsElement as st,Fn as su,Bf as t,HTMLFormControlsCollection as ta,He as tc,wr as td,virtualPerformance as tf,registerOwnerSheet as ti,O as tl,MediaError as tn,Comment as to,Window as tr,NodeImpl as ts,createFileList as tt,An as tu,isEnabled as u,isSubmittable as ua,Xe as uc,jr as ud,ne as uf,gl as ui,Gt as ul,HTMLDataElement as un,querySelectorAll as uo,Navigator as ur,currentDocument as us,SVGEllipseElement as ut,B as uu,isReadOnly as v,supportsSelectionType as va,it as vc,zr as vd,Ce as vf,CSSLayerBlockRule as vi,Qt as vl,HTMLHeadElement as vn,assignedSlot as vo,createEvent as vr,ErrorEvent as vs,SVGLineElement as vt,Un as vu,MutationObserver as w,installEventHandlers as wa,lt as wc,Gr as wd,de as wf,CSSPropertyRule as wi,an as wl,HTMLMapElement as wn,ariaAttr as wo,su as wr,ProgressEvent as ws,SVGPatternElement as wt,Yn as wu,isTextControl as x,Bo as xa,ht as xc,Hr as xd,pe as xf,CSSNamespaceRule as xi,tn as xl,HTMLIFrameElement as xn,X as xo,NodeIterator as xr,MessageEvent as xs,SVGMaskElement as xt,Kn as xu,isReadWrite as y,valueMode as ya,at as yc,Br as yd,fe as yf,CSSLayerStatementRule as yi,$t as yl,HTMLHeadingElement as yn,findFlattenedSlottables as yo,Selection as yr,FormDataEvent as ys,SVGLinearGradientElement as yt,Wn as yu,HTMLMeterElement as z,isValidElementLocalName as za,wt as zc,ri as zd,d as zf,dispatchTrusted as zi,yn as zl,HTMLTableCellElement as zn,indexGetterTable as zo,computedValue as zr,Touch as zs,SVGTextPositioningElement as zt,lr as zu};
49
+ `)),r+=s.length+a.size+2,i=!0}}let a=Buffer.from(`--${t}--\r\n`);n.push(a),r+=a.length;let o=`multipart/form-data; boundary=${t}`;return i?{bytes:Promise.all(n).then(e=>Buffer.concat(e)),type:o,length:r}:{bytes:Buffer.concat(n),type:o,length:r}}function parseMime(e){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim().toLowerCase(),r=n.indexOf(`/`);if(r<=0||r===n.length-1||!qd.test(n.slice(0,r))||!qd.test(n.slice(r+1)))return null;let i=null;if(t!==-1){let n=/(?:^|;)\s*charset\s*=\s*("([^"]*)"|[^;]*)/i.exec(e.slice(t));n!==null&&(i=(n[2]??n[1]).trim()||null)}return{essence:n,charset:i,serialized:e.trim()}}function finalMime(e){if(e.overrideMime!==null)return parseMime(e.overrideMime);let t=null;for(let[n,r]of e.responseHeaders)n===`content-type`&&(t=r);return(t===null?null:parseMime(t))??parseMime(`text/xml`)}function bytes(e){return e.bytesCache??=e.chunks.length===1?e.chunks[0]:Buffer.concat(e.chunks)}function decode(e,t){e[0]===239&&e[1]===187&&e[2]===191?t=`utf-8`:e[0]===254&&e[1]===255?t=`utf-16be`:e[0]===255&&e[1]===254&&(t=`utf-16le`);try{return new TextDecoder(t??`utf-8`).decode(e)}catch{return new TextDecoder(`utf-8`).decode(e)}}function text(e){if(e.error)return``;if(e.textCache!==null)return e.textCache;let t=decode(bytes(e),finalMime(e)?.charset??null);return e.state===4&&(e.textCache=t),t}function jsonResponse(e){let t=bytes(e);if(t.length===0)return null;try{return JSON.parse(decode(t,`utf-8`))}catch{return null}}const isXMLMime=e=>e===`text/xml`||e===`application/xml`||e.endsWith(`+xml`);function documentResponse(e){if(e.error)return null;let t=finalMime(e);if(t===null)return null;let n=t.essence===`text/html`;if(!n&&!isXMLMime(t.essence)||n&&e.responseType===``)return null;let r=decode(bytes(e),t.charset);if(n){let t=Z._createHTML(null,e.responseURL);return parseDocument(r,t),t}let i=new Z;i[ft]=t.essence,i[G]=e.responseURL,parseXML(r,i,t.essence);let a=i.documentElement;return a!==null&&a.localName===`parsererror`&&a.namespaceURI===`http://www.mozilla.org/newlayout/xml/parsererror.xml`?null:i}var FileReader=class extends EventTarget{static EMPTY=0;static LOADING=1;static DONE=2;[rr];[lr];[Bt];[en];constructor(){super(),this[rr]=0,this[lr]=null,this[Bt]=null,this[en]=0}get readyState(){return this[rr]}get result(){return this[lr]}get error(){return this[Bt]}readAsArrayBuffer(e){this._read(e,`ArrayBuffer`)}readAsBinaryString(e){this._read(e,`BinaryString`)}readAsText(e,t){this._read(e,`Text`,t)}readAsDataURL(e){this._read(e,`DataURL`)}abort(){this[rr]===0||this[rr]===2?this[lr]=null:(this[en]++,this[rr]=2,this[lr]=null,this._fire(`abort`),this[rr]!==1&&this._fire(`loadend`))}_read(e,t,n){if(!(e instanceof Blob))throw TypeError(`Failed to execute 'readAs${t}' on 'FileReader': parameter 1 is not of type 'Blob'.`);if(this[rr]===1)throw new DOMException(`Failed to execute 'readAs`+t+`' on 'FileReader': The object is already busy reading Blobs.`,`InvalidStateError`);this[rr]=1,this[lr]=null,this[Bt]=null;let r=++this[en];queueMicrotask(()=>{r===this[en]&&this._fire(`loadstart`)}),e.arrayBuffer().then(i=>{if(r!==this[en])return;let a=i.byteLength;this._fire(`progress`,a,a),r===this[en]&&(this[rr]=2,this[lr]=packageData(i,t,e.type,n),this._fire(`load`,a,a),this[rr]!==1&&this._fire(`loadend`,a,a))},e=>{r===this[en]&&(this[rr]=2,this[Bt]=e instanceof DOMException?e:new DOMException(String(e),`NotReadableError`),this._fire(`error`),this[rr]!==1&&this._fire(`loadend`))})}_fire(e,t=0,n=0){let r=eventInterface(`ProgressEvent`);this.dispatchEvent(new r(e,{lengthComputable:n>0,loaded:t,total:n}))}};for(let e of[`loadstart`,`progress`,`load`,`abort`,`error`,`loadend`])Object.defineProperty(FileReader.prototype,`on${e}`,{get(){return getEventHandler(this,e)},set(t){setEventHandler(this,e,t)},enumerable:!0,configurable:!0});for(let[e,t]of[[`EMPTY`,0],[`LOADING`,1],[`DONE`,2]])Object.defineProperty(FileReader.prototype,e,{value:t,enumerable:!0});function packageData(e,t,n,r){switch(t){case`ArrayBuffer`:return e;case`BinaryString`:{let t=new Uint8Array(e),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return n}case`Text`:{let t=`utf-8`;if(r!==void 0)try{t=new TextDecoder(r).encoding}catch{}return new TextDecoder(t).decode(e)}case`DataURL`:return`data:${n||`application/octet-stream`};base64,${Buffer.from(e).toString(`base64`)}`}}const Qd={observe:null,unobserve:null,disconnect:null};var ResizeObserver=class{[Ze];[Rr];constructor(e){if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': parameter 1 is not of type 'ResizeObserverCallback'.`);this[Ze]=e,this[Rr]=/* @__PURE__ */ new Set}observe(e,t){if(typeof e!=`object`||!e)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.`);this[Rr].add(e),Qd.observe?.(this,e,t?.box===void 0?`content-box`:String(t.box))}unobserve(e){this[Rr].delete(e),Qd.unobserve?.(this,e)}disconnect(){this[Rr].clear(),Qd.disconnect?.(this)}get[Symbol.toStringTag](){return`ResizeObserver`}},IntersectionObserver=class{[Ze];[Rr];root;rootMargin;scrollMargin;thresholds;constructor(e,t={}){if(typeof e!=`function`)throw TypeError(`Failed to construct 'IntersectionObserver': parameter 1 is not of type 'IntersectionObserverCallback'.`);this[Ze]=e,this[Rr]=/* @__PURE__ */ new Set,this.root=t.root??null,this.rootMargin=normalizeMargin(t.rootMargin??`0px`),this.scrollMargin=normalizeMargin(t.scrollMargin??`0px`);let n=t.threshold??0,r=(Array.isArray(n)?n:[n]).map(Number);for(let e of r)if(!(e>=0&&e<=1))throw RangeError(`Failed to construct 'IntersectionObserver': Threshold values must be numbers between 0 and 1`);this.thresholds=Object.freeze(r.sort((e,t)=>e-t))}observe(e){this[Rr].add(e)}unobserve(e){this[Rr].delete(e)}disconnect(){this[Rr].clear()}takeRecords(){return[]}get[Symbol.toStringTag](){return`IntersectionObserver`}};function normalizeMargin(e){let t=String(e).trim().split(/\s+/).filter(Boolean);t.length===0&&t.push(`0px`);for(let e of t)if(!/^-?(\d+|\d*\.\d+)(px|%)$/.test(e)&&e!==`0`)throw new DOMException(`Failed to construct 'IntersectionObserver': rootMargin must be specified in pixels or percent.`,`SyntaxError`);let[n,r=n,i=n,a=r]=t.map(e=>e===`0`?`0px`:e);return`${n} ${r} ${i} ${a}`}const $d=/* @__PURE__ */ new Set([`none`,`copy`,`link`,`move`]),ef=/* @__PURE__ */ new Set([`none`,`copy`,`copyLink`,`copyMove`,`link`,`linkMove`,`move`,`all`,`uninitialized`]);function asciiLowercase(e){return e.replace(/[A-Z]/g,e=>e.toLowerCase())}let tf=!1;var DataTransferItem=class{[Cn];[Hr];[Ct];[Vt];constructor(){if(!tf)throw TypeError(`Illegal constructor`);this[Cn]=``,this[Hr]=``,this[Ct]=``,this[Vt]=null}get kind(){return this[Cn]}get type(){return this[Hr]}getAsString(e){if(e==null||this[Cn]!==`string`)return;let t=this[Ct];queueMicrotask(()=>e(t))}getAsFile(){return this[Cn]===`file`?this[Vt]:null}webkitGetAsEntry(){return null}};Object.defineProperty(DataTransferItem.prototype,Symbol.toStringTag,{value:`DataTransferItem`,configurable:!0});function makeItem(e,t,n,r){tf=!0;try{let i=new DataTransferItem;return i[Cn]=e,i[Hr]=t,i[Ct]=n,i[Vt]=r,hideInternals(i),i}finally{tf=!1}}var DataTransferItemList=class{[P];[z];constructor(){if(!tf)throw TypeError(`Illegal constructor`);this[P]=[],this[z]=null}get length(){return this[P].length}add(e,t){let n;if(typeof e==`string`||t!==void 0){if(arguments.length<2)throw TypeError(`Failed to execute 'add' on 'DataTransferItemList': parameter 1 is not of type 'File'.`);let r=asciiLowercase(String(t));for(let e of this[P])if(e[Cn]===`string`&&e[Hr]===r)throw new DOMException(`Failed to execute 'add' on 'DataTransferItemList': An item already exists for type '${r}'.`,`NotSupportedError`);n=makeItem(`string`,r,String(e),null)}else{if(typeof File>`u`||!(e instanceof File))throw TypeError(`Failed to execute 'add' on 'DataTransferItemList': parameter 1 is not of type 'File'.`);n=makeItem(`file`,asciiLowercase(e.type),``,e)}return this[P].push(n),this._changed(),n}remove(e){let t=e>>>0;if(t>=this[P].length)return;let[n]=this[P].splice(t,1);n[Cn]=``,this._changed()}clear(){for(let e of this[P])e[Cn]=``;this[P].length=0,this._changed()}[Symbol.iterator](){return this[P][Symbol.iterator]()}_changed(){let e=this[P];for(let t=0;t<e.length;t++)Object.defineProperty(this,t,{value:e[t],enumerable:!0,configurable:!0,writable:!1});for(let t=e.length;Object.prototype.hasOwnProperty.call(this,t);t++)delete this[t];this[z]!==null&&(this[z][Ur]=null,this[z][Ht]=null)}};Object.defineProperty(DataTransferItemList.prototype,Symbol.toStringTag,{value:`DataTransferItemList`,configurable:!0});function makeList(e){tf=!0;try{let t=new DataTransferItemList;return t[z]=e,hideInternals(t),t}finally{tf=!1}}function normalizeFormat(e){let t=asciiLowercase(String(e));return t===`text`?{type:`text/plain`,url:!1}:t===`url`?{type:`text/uri-list`,url:!0}:{type:t,url:!1}}var DataTransfer=class{[It];[Lt];[P];[Ur];[Ht];constructor(){this[It]=`none`,this[Lt]=`uninitialized`,this[P]=makeList(this),this[Ur]=null,this[Ht]=null,hideInternals(this)}get dropEffect(){return this[It]}set dropEffect(e){let t=String(e);$d.has(t)&&(this[It]=t)}get effectAllowed(){return this[Lt]}set effectAllowed(e){let t=String(e);ef.has(t)&&(this[Lt]=t)}get items(){return this[P]}setDragImage(e,t,n){}get types(){if(this[Ur]!==null)return this[Ur];let e=[],t=!1;for(let n of this[P][P])n[Cn]===`string`?e.push(n[Hr]):n[Cn]===`file`&&(t=!0);return t&&e.push(`Files`),this[Ur]=Object.freeze(e)}getData(e){let{type:t,url:n}=normalizeFormat(e);for(let e of this[P][P])if(e[Cn]===`string`&&e[Hr]===t){if(!n)return e[Ct];for(let t of e[Ct].split(/\r?\n/))if(t!==``&&!t.startsWith(`#`))return t;return``}return``}setData(e,t){let{type:n}=normalizeFormat(e),r=this[P][P];for(let e=0;e<r.length;e++)if(r[e][Cn]===`string`&&r[e][Hr]===n){r[e][Cn]=``,r.splice(e,1);break}r.push(makeItem(`string`,n,String(t),null)),this[P]._changed()}clearData(e){let t=this[P][P],n=e===void 0?null:normalizeFormat(e).type;for(let e=t.length-1;e>=0;e--)t[e][Cn]===`string`&&(n===null||t[e][Hr]===n)&&(t[e][Cn]=``,t.splice(e,1));this[P]._changed()}get files(){if(this[Ht]!==null)return this[Ht];let e=[];for(let t of this[P][P])t[Cn]===`file`&&t[Vt]!==null&&e.push(t[Vt]);return this[Ht]=createFileList(e)}};Object.defineProperty(DataTransfer.prototype,Symbol.toStringTag,{value:`DataTransfer`,configurable:!0}),exposeMembers(DataTransfer,DataTransferItemList,DataTransferItem);let nf=0;var MutationObserver=class{[ln];[Ze];[or];[Ln];[nn];constructor(e){if(typeof e!=`function`)throw TypeError(`Failed to construct 'MutationObserver': parameter 1 is not of type 'Function'.`);this[ln]=nf++,this[Ze]=e,this[or]=[],this[Ln]=[],this[nn]=!1}observe(e,t={}){if(typeof e!=`object`||!e||!(M in e))throw TypeError(`Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.`);let n=t.attributes,r=t.characterData;if((t.attributeOldValue!==void 0||t.attributeFilter!==void 0)&&n===void 0&&(n=!0),t.characterDataOldValue!==void 0&&r===void 0&&(r=!0),!t.childList&&!n&&!r)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object must set at least one of 'attributes', 'characterData', or 'childList' to true.`);if(t.attributeOldValue&&!n)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeOldValue' to true when 'attributes' is true or not present.`);if(t.attributeFilter!==void 0&&!n)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeFilter' when 'attributes' is true or not present.`);if(t.characterDataOldValue&&!r)throw TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'characterDataOldValue' to true when 'characterData' is true or not present.`);let i=new NormalizedOptions(t,!!n,!!r),a=e[M],o=registeredObserverList(a);if(o!==null)for(let e=0;e<o.length;e++){let t=o[e];if(t.observer===this&&t.source===null){for(let e of this[Ln])removeRegistrations(e,e=>e.source===t);t.options.subtree!==i.subtree&&setSubtreeObservers(Ui+(i.subtree?1:-1)),t.options=i;return}}this[Ln].length===0&&setActiveObservers(Hi+1),i.subtree&&setSubtreeObservers(Ui+1),addRegistration(a,new RegisteredObserver(this,i,null)),this[Ln].push(a)}disconnect(){let e=this[Ln];if(e.length!==0){let t=0;for(let n=0;n<e.length;n++){let r=registeredObserverList(e[n]);if(r!==null)for(let e of r)e.observer===this&&e.source===null&&e.options.subtree&&t++;removeRegistrations(e[n],e=>e.observer===this)}t!==0&&setSubtreeObservers(Ui-t),this[Ln]=[],setActiveObservers(Hi-1)}this[nn]=!1,this[or]=[],dropPending(this)}takeRecords(){let e=this[or];return this[or]=[],e}};Object.defineProperty(MutationObserver.prototype,Symbol.toStringTag,{value:`MutationObserver`,configurable:!0});function isDisabled(e){return isActuallyDisabled(e)}function isEnabled(e){switch(e.tag){case Y.button:case Y.input:case Y.select:case Y.textarea:case Y.optgroup:case Y.option:case Y.fieldset:return!isActuallyDisabled(e)}return!1}function isMutable(e){switch(e.tag){case Y.input:return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&contentAttr(e,`readonly`)!==null);case Y.textarea:return!isActuallyDisabled(e)&&contentAttr(e,`readonly`)===null;case Y.select:case Y.button:return!isActuallyDisabled(e)}return!1}function isReadWrite(e){return e.tag===Y.input?readonlyApplies(inputType(e))&&isMutable(e):e.tag===Y.textarea?isMutable(e):isEditable(e)}function isReadOnly(e){return!isReadWrite(e)}function hasReadonlyAttribute(e){return e.tag===Y.input?readonlyApplies(inputType(e))&&contentAttr(e,`readonly`)!==null:e.tag===Y.textarea&&contentAttr(e,`readonly`)!==null}function isRequired(e){switch(e.tag){case Y.input:return requiredApplies(inputType(e))&&contentAttr(e,`required`)!==null;case Y.select:case Y.textarea:return contentAttr(e,`required`)!==null}return!1}function isOptional(e){return(e.tag===Y.input||e.tag===Y.select||e.tag===Y.textarea)&&!isRequired(e)}function validatable(e){if(isFACE(e))return validatableOf(e);switch(e.tag){case Y.input:case Y.select:case Y.textarea:case Y.button:case Y.output:case Y.fieldset:return e.node}return null}function candidateState(e){let t=validatable(e);return t===null||t._barredFromValidation()?0:t._validityFlags()===0?1:2}function hasInvalidControl(e){if(e.tag===Y.form){let t=formControls(e,[],!0);for(let e=0;e<t.length;e++)if(candidateState(t[e])===2)return!0;return!1}for(let t=nextElementInTree(e,e);t!==null;t=nextElementInTree(t,e))if(candidateState(t)===2)return!0;return!1}function isValid(e){return e.tag===Y.form||e.tag===Y.fieldset?!hasInvalidControl(e):candidateState(e)===1}function isInvalid(e){return e.tag===Y.form||e.tag===Y.fieldset?hasInvalidControl(e):candidateState(e)===2}function isUserValid(e){return hasUserValidity(e)&&candidateState(e)===1}function isUserInvalid(e){return hasUserValidity(e)&&candidateState(e)===2}function hasRangeLimitations(e){if(e.tag!==Y.input)return!1;let t=inputType(e);return isNumericType(t)?t===13||contentAttr(e,`min`)!==null||contentAttr(e,`max`)!==null:!1}function isInRange(e){if(!hasRangeLimitations(e))return!1;let t=e.node;return!t._barredFromValidation()&&!(t._validityFlags()&96)}function isOutOfRange(e){if(!hasRangeLimitations(e))return!1;let t=e.node;return!t._barredFromValidation()&&!!(t._validityFlags()&96)}function isChecked(e){if(e.tag===Y.input){let t=inputType(e);return(t===15||t===16)&&e.node._checkedness()}return e.tag===Y.option&&e.node._selectednessNow()}function isIndeterminate(e){if(e.tag===Y.input){let t=inputType(e);return t===15?e.node[mn]:t===16&&radioGroupHasNoChecked(e)}return e.tag===Y.progress&&contentAttr(e,`value`)===null}function isDefault(e){switch(e.tag){case Y.input:{let t=inputType(e);return t===15||t===16?contentAttr(e,`checked`)!==null:isDefaultButton(e)}case Y.button:return isDefaultButton(e);case Y.option:return contentAttr(e,`selected`)!==null}return!1}function isDefaultButton(e){let t=e.node.form;return t!==null&&defaultButton(t[M])===e}function isPlaceholderShown(e){return e.tag===Y.input?!placeholderApplies(inputType(e))||contentAttr(e,`placeholder`)===null?!1:e.node.value===``:e.tag===Y.textarea&&contentAttr(e,`placeholder`)!==null&&e.node.value===``}function isAutofilled(e){return!1}function isTextControl(e){if(e.tag===Y.textarea)return!0;if(e.tag!==Y.input)return!1;let t=inputType(e);return t!==0&&t<=12}function controlValue(e){switch(e.tag){case Y.input:case Y.textarea:case Y.select:case Y.option:case Y.button:case Y.output:return e.node.value}return``}function inputChecked(e){return e.tag===Y.input&&e.node._checkedness()}function inputIndeterminate(e){return e.tag===Y.input&&e.node[mn]}function optionSelected(e){return e.tag===Y.option&&e.node._selectednessNow()}Object.assign(ma,{focus:matchesFocus,"focus-within":matchesFocusWithin,"focus-visible":matchesFocusVisible,defined:isDefined,checked:isChecked,indeterminate:isIndeterminate,default:isDefault,disabled:isDisabled,enabled:isEnabled,required:isRequired,optional:isOptional,"read-only":isReadOnly,"read-write":isReadWrite,"placeholder-shown":isPlaceholderShown,valid:isValid,invalid:isInvalid,"user-valid":isUserValid,"user-invalid":isUserInvalid,"in-range":isInRange,"out-of-range":isOutOfRange,autofill:isAutofilled,"-webkit-autofill":isAutofilled,"popover-open":matchesPopoverOpen,modal:matchesModal}),pa.of=e=>customStatesOf(e.node),clearSelectorCaches();var Box=class{x;y;vx;vy;w;h;mt;mr;mb;ml;bt;br;bb;bl;pt;pr;pb;pl;idx;end;gen;flags;constructor(){this.x=0,this.y=0,this.vx=0,this.vy=0,this.w=0,this.h=0,this.mt=0,this.mr=0,this.mb=0,this.ml=0,this.bt=0,this.br=0,this.bb=0,this.bl=0,this.pt=0,this.pr=0,this.pb=0,this.pl=0,this.idx=0,this.end=0,this.gen=0,this.flags=0}},LayoutState=class{version;styleVersion;vw;vh;gen;boxes;styles;list;constructor(){this.version=-1,this.styleVersion=-1,this.vw=-1,this.vh=-1,this.gen=0,this.boxes=/* @__PURE__ */ new WeakMap,this.styles=/* @__PURE__ */ new WeakMap,this.list=[]}};const rf=/* @__PURE__ */ new WeakMap;let af=null;function setRelayoutListener(e){af=e}function layoutOn(e){if(!ku)return!1;let t=e[q];return t!==null&&t[R].layout===`lite`}function ensure(e){let t=rf.get(e);t===void 0&&rf.set(e,t=new LayoutState);let n=currentStyleVersion(e),r=e[q],i=r[bn],a=r[yn];return t.version===e[K]&&t.styleVersion===n&&t.vw===i&&t.vh===a||(run(t,e,i,a),t.version=e[K],t.styleVersion=n,t.vw=i,t.vh=a,af?.(e)),t}function boxOf(e){if(!ku||!(e.flags&1))return null;let t=e.doc;if(!layoutOn(t))return null;let n=ensure(t),r=n.boxes.get(e);return r!==void 0&&r.gen===n.gen?r:null}let of=new LayoutState,sf=!1,cf=16,lf=1024,uf=768,df=0;var PendingAbs=class{el;sx;sy;fs;lh;fixed;constructor(e,t,n,r,i,a){this.el=e,this.sx=t,this.sy=n,this.fs=r,this.lh=i,this.fixed=a}};const ff=[],pf=[];function run(e,t,n,r){e.gen++,e.list.length=0,of=e,lf=n,uf=r,sf=hasAuthorStyles(t),ff.length=0,pf.length=0;let i=null;for(let e=t[M].first;e!==null;e=e.next)e.type===1&&(i=e);if(i!==null){cf=16,cf=fontSize(i,16);try{let e=computedDisplay(i);for(e!==`none`&&e!==`contents`&&layoutBox(i,0,0,n,r,16,`normal`,NaN,NaN,!1,8),flushPending(0,0,0,n,r,!0);pf.length!==0;){let e=pf.splice(0);for(let t=0;t<e.length;t++)layoutAbs(e[t],0,0,n,r)}}finally{hf=null,wf=0,ff.length=0,pf.length=0}}}function plain(e){return!sf&&!(e.flags&64)}var Style=class{gen;position;transform;borderBox;scroller;mt;mr;mb;ml;bt;br;bb;bl;pt;pr;pb;pl;width;height;minW;maxW;minH;maxH;top;right;bottom;left;flexDir;grow;shrink;basis;alignSelf;alignItems;justify;rowGap;colGap;fs;lh;constructor(){this.gen=-1,this.position=`static`,this.transform=`none`,this.borderBox=!1,this.scroller=!1,this.mt=this.mr=this.mb=this.ml=`0px`,this.bt=this.br=this.bb=this.bl=`0px`,this.pt=this.pr=this.pb=this.pl=`0px`,this.width=this.height=this.minW=this.minH=`auto`,this.maxW=this.maxH=`none`,this.top=this.right=this.bottom=this.left=`auto`,this.flexDir=`row`,this.grow=0,this.shrink=1,this.basis=`auto`,this.alignSelf=`auto`,this.alignItems=`normal`,this.justify=`normal`,this.rowGap=this.colGap=`normal`,this.fs=NaN,this.lh=``}};const mf=new Style;function sty(e){if(plain(e)&&!hasUAFontSize(e))return mf;let t=of.styles.get(e);return t===void 0&&of.styles.set(e,t=new Style),t.gen!==of.gen&&fillStyle(e,t),t}let hf=null;function g(e,t){let n=hf.decls;return n===null||!n.has(e)?t:computedValueOf(hf,e)}function gBorder(e,t){let n=hf.decls;return n===null||!n.has(e)&&!n.has(t)?`0px`:computedValueOf(hf,e)}function fillStyle(e,t){t.gen=of.gen,hf=styleRecord(e),t.position=g(`position`,`static`),t.transform=g(`transform`,`none`),t.borderBox=g(`box-sizing`,`content-box`)===`border-box`;let n=g(`overflow-x`,`visible`),r=g(`overflow-y`,`visible`);t.scroller=n!==`visible`&&n!==`clip`&&n!==``||r!==`visible`&&r!==`clip`&&r!==``,t.mt=g(`margin-top`,`0px`),t.mr=g(`margin-right`,`0px`),t.mb=g(`margin-bottom`,`0px`),t.ml=g(`margin-left`,`0px`),t.bt=gBorder(`border-top-width`,`border-top-style`),t.br=gBorder(`border-right-width`,`border-right-style`),t.bb=gBorder(`border-bottom-width`,`border-bottom-style`),t.bl=gBorder(`border-left-width`,`border-left-style`),t.pt=g(`padding-top`,`0px`),t.pr=g(`padding-right`,`0px`),t.pb=g(`padding-bottom`,`0px`),t.pl=g(`padding-left`,`0px`),t.width=g(`width`,`auto`),t.height=g(`height`,`auto`),t.minW=g(`min-width`,`auto`),t.maxW=g(`max-width`,`none`),t.minH=g(`min-height`,`auto`),t.maxH=g(`max-height`,`none`),t.top=g(`top`,`auto`),t.right=g(`right`,`auto`),t.bottom=g(`bottom`,`auto`),t.left=g(`left`,`auto`),t.flexDir=g(`flex-direction`,`row`),t.grow=Number(g(`flex-grow`,`0`))||0;let i=Number(g(`flex-shrink`,`1`));t.shrink=Number.isFinite(i)?i:1,t.basis=g(`flex-basis`,`auto`),t.alignSelf=g(`align-self`,`auto`),t.alignItems=g(`align-items`,`normal`),t.justify=g(`justify-content`,`normal`),t.rowGap=g(`row-gap`,`normal`),t.colGap=g(`column-gap`,`normal`);let a=parseFloat(computedValueOf(hf,`font-size`));t.fs=Number.isFinite(a)?a:NaN,t.lh=computedValueOf(hf,`line-height`)}function hasUAFontSize(e){if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case Y.h1:case Y.h2:case Y.h3:case Y.h5:case Y.h6:case Y.small:case Y.big:case Y.sub:case Y.sup:return!0}return!1}function fontSize(e,t){let n=sty(e).fs;return Number.isNaN(n)?t:n}function lineHeightPx(e,t){if(e===`normal`||e===``)return t*6/5;let n=Number(e);if(Number.isFinite(n))return n*t;let r=length(e,t,t);return Number.isNaN(r)?t*1.2:r}function lineHeightOf(e,t){let n=sty(e).lh;return n===``?t:n}function length(e,t,n){let r=e.length;if(r===0)return NaN;if(r>2&&e.charCodeAt(r-1)===120&&e.charCodeAt(r-2)===112){let t=Number(e.slice(0,-2));if(Number.isFinite(t))return t}if(e===`0`)return 0;if(e===`auto`||e===`none`||e===`normal`)return NaN;gf=e,Q=0,_f=t,vf=n;let i=parseSum();return skipWs(),Q===e.length?i:NaN}let gf=``,Q=0,_f=NaN,vf=16;function skipWs(){for(;Q<gf.length&&gf.charCodeAt(Q)<=32;)Q++}function parseSum(){let e=parseProduct();for(;;){skipWs();let t=gf[Q];if(t!==`+`&&t!==`-`)return e;Q++;let n=parseProduct();e=t===`+`?e+n:e-n}}function parseProduct(){let e=parseValue();for(;;){skipWs();let t=gf[Q];if(t!==`*`&&t!==`/`)return e;Q++;let n=parseValue();e=t===`*`?e*n:e/n}}const yf=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/iy,bf=/[a-z]+|%/iy;function parseValue(){skipWs();let e=gf;if(e[Q]===`(`){Q++;let t=parseSum();return skipWs(),e[Q]===`)`?(Q++,t):NaN}let t=e.slice(Q,Q+6).toLowerCase();for(let n of xf)if(t.startsWith(n)){Q+=n.length;let t=[parseSum()];for(skipWs();e[Q]===`,`;)Q++,t.push(parseSum()),skipWs();return e[Q]===`)`?(Q++,n===`calc(`?t.length===1?t[0]:NaN:n===`min(`?Math.min(...t):n===`max(`?Math.max(...t):t.length===3?Math.max(t[0],Math.min(t[1],t[2])):NaN):NaN}yf.lastIndex=Q;let n=yf.exec(e);if(n===null)return NaN;Q+=n[0].length;let r=Number(n[0]);bf.lastIndex=Q;let i=bf.exec(e);return i===null?r:(Q+=i[0].length,unitPx(r,i[0].toLowerCase()))}const xf=[`calc(`,`min(`,`max(`,`clamp(`];function unitPx(e,t){switch(t){case`px`:return e;case`%`:return e*_f/100;case`em`:return e*vf;case`rem`:return e*cf;case`ex`:case`ch`:return e*vf*.5;case`lh`:return e*vf*1.2;case`vw`:case`svw`:case`lvw`:case`dvw`:return e*lf/100;case`vh`:case`svh`:case`lvh`:case`dvh`:return e*uf/100;case`vmin`:return e*Math.min(lf,uf)/100;case`vmax`:return e*Math.max(lf,uf)/100;case`in`:return e*96;case`cm`:return e*96/2.54;case`mm`:return e*96/25.4;case`q`:return e*96/101.6;case`pt`:return e*96/72;case`pc`:return e*16}return NaN}function lenOr0(e,t,n){let r=length(e,t,n);return Number.isNaN(r)?0:r}function edges(e,t,n,r){let i=sty(e);i===mf?(t.mt=t.mr=t.mb=t.ml=0,t.bt=t.br=t.bb=t.bl=0,t.pt=t.pr=t.pb=t.pl=0):(t.mt=lenOr0(i.mt,n,r),t.mr=lenOr0(i.mr,n,r),t.mb=lenOr0(i.mb,n,r),t.ml=lenOr0(i.ml,n,r),t.bt=lenOr0(i.bt,n,r),t.br=lenOr0(i.br,n,r),t.bb=lenOr0(i.bb,n,r),t.bl=lenOr0(i.bl,n,r),t.pt=Math.max(0,lenOr0(i.pt,n,r)),t.pr=Math.max(0,lenOr0(i.pr,n,r)),t.pb=Math.max(0,lenOr0(i.pb,n,r)),t.pl=Math.max(0,lenOr0(i.pl,n,r)))}function borderBox(e){return sty(e).borderBox}function toContent(e,t,n){return Math.max(0,borderBox(t)?e-n:e)}function clampSize(e,t,n,r,i,a,o){if(n===`auto`&&r===`none`)return t;let s=length(r,i,a);Number.isNaN(s)||(t=Math.min(t,toContent(s,e,o)));let c=length(n,i,a);return Number.isNaN(c)||(t=Math.max(t,toContent(c,e,o))),t}function isReplaced(e){if(e.ns===`http://www.w3.org/2000/svg`)return e.name===`svg`;if(e.ns!==`http://www.w3.org/1999/xhtml`)return!1;switch(e.tag){case Y.img:case Y.canvas:case Y.video:case Y.iframe:case Y.embed:case Y.object:case Y.audio:case Y.input:case Y.textarea:case Y.select:return!0}return!1}function intAttr(e,t,n){let r=attr(e,t);if(r===null)return n;let i=parseFloat(r);return Number.isFinite(i)&&i>=0?i:n}let Sf=0;function intrinsicW(e,t,n){if(e.ns===`http://www.w3.org/2000/svg`)return Sf=intAttr(e,`height`,150),intAttr(e,`width`,300);switch(e.tag){case Y.img:return Sf=intAttr(e,`height`,0),intAttr(e,`width`,0);case Y.audio:return Sf=54,300;case Y.input:{let r=asciiLowercase$1(attr(e,`type`)??`text`);return r===`checkbox`||r===`radio`?(Sf=13,13):(Sf=n,r===`submit`||r===`reset`||r===`button`?textWidth(attr(e,`value`)??(r===`submit`?`Submit`:r===`reset`?`Reset`:``),t):intAttr(e,`size`,20)*t*.5)}case Y.textarea:return Sf=intAttr(e,`rows`,2)*n,intAttr(e,`cols`,20)*t*.5;case Y.select:{Sf=(attr(e,`multiple`)!==null||intAttr(e,`size`,1)>1?intAttr(e,`size`,4):1)*n;let r=0;for(let n=e.first;n!==null;n=n.next)n.type===1&&(r=Math.max(r,textWidth(textContent(n),t)));return r+20}}return Sf=intAttr(e,`height`,150),intAttr(e,`width`,300)}function textContent(e){let t=``;for(let n=e.first;n!==null;n=n.next)n.type===3||n.type===4?t+=n.data:n.type===1&&(t+=textContent(n));return t}function textWidth(e,t){let n=0,r=!0;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);i===32||i===9||i===10||i===13||i===12?r||=(n++,!0):(n++,r=!1)}return r&&n>0&&n--,n*t*.5}function isBlank(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==10&&n!==13&&n!==12)return!1}return!0}function kindOf(e,t){switch(t){case`none`:return 0;case`inline`:return isReplaced(e)?3:hasBlockChild(e)?1:2;case`inline-block`:case`inline-flex`:case`inline-grid`:case`inline-table`:case`inline flow-root`:case`inline flex`:case`inline grid`:return 3}return isReplaced(e)&&t!==`block`?3:1}function hasBlockChild(e){for(let t=e.first;t!==null;t=t.next){if(t.type!==1)continue;let e=computedDisplay(t);if(e===`contents`?hasBlockChild(t):e!==`none`&&e!==`inline`&&kindOf(t,e)===1)return!0}return!1}function isFlex(e){return e===`flex`||e===`inline-flex`||e===`inline flex`||e===`block flex`}const Cf=[];let wf=0;function collect(e,t){let n=e;if(e.flags&512){let t=e.node[U];t!=null&&(n=t[M])}for(let e=n.first;e!==null;e=e.next)collectNode(e,t)}function collectNode(e,t){if(e.type===3||e.type===4)t.push(e);else if(e.type===1){if(e.ns===`http://www.w3.org/1999/xhtml`&&e.tag===Y.slot&&e.parent!==null&&isInShadowTree(e)){if(computedDisplay(e)!==`contents`){t.push(e);return}let n=findFlattenedSlottables(e);for(let e=0;e<n.length;e++)collectNode(n[e],t);return}computedDisplay(e)===`contents`?collect(e,t):t.push(e)}}function isInShadowTree(e){let t=e;for(;t.parent!==null;)t=t.parent;return!!(t.flags&32)}function children(e){let t=Cf[wf]??(Cf[wf]=[]);return wf++,t.length=0,collect(e,t),t}function releaseChildren(e){e.length=0,wf--}function newBox(e,t){let n=of.boxes.get(e);return n===void 0&&of.boxes.set(e,n=new Box),n.gen=of.gen,n.idx=of.list.length,n.end=n.idx+1,n.flags=t,of.list.push(n),n}function shift(e,t,n,r){if(t===0&&n===0)return;let i=of.list;for(let a=e.idx;a<e.end;a++){let e=i[a];e.vx+=t,e.vy+=n,r||(e.x+=t,e.y+=n)}}function translation(e,t,n,r){Tf=0,Ef=0;let i=/(translate3d|translatex|translatey|translate|matrix)\(([^)]*)\)/gi;for(let a=i.exec(e);a!==null;a=i.exec(e)){let e=a[1].toLowerCase(),i=a[2].split(`,`).map(e=>e.trim());e===`matrix`?i.length===6&&(Tf+=Number(i[4])||0,Ef+=Number(i[5])||0):e===`translatex`?Tf+=lenOr0(i[0],t,r):e===`translatey`?Ef+=lenOr0(i[0],n,r):(Tf+=lenOr0(i[0],t,r),i.length>1&&(Ef+=lenOr0(i[1],n,r)))}}let Tf=0,Ef=0;function layoutBox(e,t,n,r,i,a,o,s,c,l,u){let d=newBox(e,u),m=computedDisplay(e),h=fontSize(e,a),_=lineHeightOf(e,o),v=lineHeightPx(_,h),ee=plain(e)?`static`:sty(e).position,y=plain(e)?`none`:sty(e).transform;edges(e,d,r,h);let te=d.pl+d.pr+d.bl+d.br,ne=d.pt+d.pb+d.bt+d.bb,re=isReplaced(e),b,x=plain(e)?NaN:length(sty(e).width,r,h),ie=!1;if(Number.isNaN(s)?Number.isNaN(x)?re?b=replacedWidth(e,h,v,i):l?(b=Math.min(maxContent(e,a)-te,r-d.ml-d.mr-te),ie=!0):(b=r-d.ml-d.mr-te,ie=!0):b=toContent(x,e,te):b=Math.max(0,s-te),Number.isNaN(s)&&(b=clampSize(e,Math.max(0,b),sty(e).minW,sty(e).maxW,r,h,te)),!ie&&Number.isNaN(s)&&!l&&!plain(e)){let t=sty(e).ml===`auto`,n=sty(e).mr===`auto`,i=r-b-te-d.ml-d.mr;t&&n?d.ml+=Math.max(0,i/2):t&&(d.ml+=Math.max(0,i))}d.x=d.vx=t+d.ml,d.y=d.vy=n+d.mt,d.w=b+te;let ae=plain(e)?NaN:length(sty(e).height,i,h),oe=NaN;Number.isNaN(c)?Number.isNaN(ae)?re&&(oe=replacedHeight(e,h,v,b)):oe=clampSize(e,toContent(ae,e,ne),sty(e).minH,sty(e).maxH,i,h,ne):oe=Math.max(0,c-ne);let se=ee!==`static`||y!==`none`||!!(u&8),S=ff.length,ce=d.x+d.bl+d.pl,le=d.y+d.bt+d.pt,ue=0;re||(ue=isFlex(m)?layoutFlex(e,ce,le,b,oe,h,_,v,!1):m===`table-row`?layoutFlex(e,ce,le,b,oe,h,_,v,!0):flow(e,ce,le,b,oe,h,_,v));let de=Number.isNaN(oe)?clampSize(e,ue,sty(e).minH,sty(e).maxH,i,h,ne):oe;if(Number.isNaN(de)&&(de=0),d.h=de+ne,sty(e).scroller&&(d.flags|=1),u&8&&(d.flags|=1),se&&!(u&8)&&flushPending(S,d.x+d.bl,d.y+d.bt,d.w-d.bl-d.br,d.h-d.bt-d.bb,!1),d.end=of.list.length,ee===`relative`){let t=length(sty(e).left,r,h),n=length(sty(e).top,i,h);shift(d,Number.isNaN(t)?-lenOr0(sty(e).right,r,h):t,Number.isNaN(n)?-lenOr0(sty(e).bottom,i,h):n,!1)}return y!==`none`&&(translation(y,d.w,d.h,h),shift(d,Tf,Ef,!0)),df=d.w+d.ml+d.mr,d.h+d.mt+d.mb}function replacedWidth(e,t,n,r){let i=intrinsicW(e,t,n),a=Sf;if(i>0&&a>0&&!plain(e)){let n=length(sty(e).height,r,t);if(!Number.isNaN(n)&&(e.tag===Y.img||e.tag===Y.canvas||e.tag===Y.video||e.ns===`http://www.w3.org/2000/svg`))return n*i/a}return i}function replacedHeight(e,t,n,r){let i=intrinsicW(e,t,n),a=Sf;return i>0&&a>0&&r!==i&&(e.tag===Y.img||e.tag===Y.canvas||e.tag===Y.video||e.ns===`http://www.w3.org/2000/svg`)?r*a/i:a}function deferAbs(e,t,n,r,i,a){ff.push(new PendingAbs(e,n,r,i,a,t===`fixed`))}function flushPending(e,t,n,r,i,a){if(ff.length<=e)return;let o=ff.splice(e);for(let e=0;e<o.length;e++){let s=o[e];s.fixed&&!a?pf.push(s):s.fixed?layoutAbs(s,0,0,lf,uf):layoutAbs(s,t,n,r,i)}}function layoutAbs(e,t,n,r,i){let a=e.el,o=fontSize(a,e.fs);edges(a,$,r,o);let s=$.pl+$.pr+$.bl+$.br,c=$.pt+$.pb+$.bt+$.bb,l=$.ml+$.mr,u=$.mt+$.mb,d=length(sty(a).left,r,o),m=length(sty(a).right,r,o),h=length(sty(a).top,i,o),_=length(sty(a).bottom,i,o),v=length(sty(a).width,r,o),ee=length(sty(a).height,i,o),y=NaN;Number.isNaN(v)&&!isReplaced(a)&&(y=!Number.isNaN(d)&&!Number.isNaN(m)?Math.max(s,r-d-m-l):Math.max(s,Math.min(maxContent(a,e.fs),r-(Number.isNaN(d)?0:d)-l)));let te=NaN;Number.isNaN(ee)&&!Number.isNaN(h)&&!Number.isNaN(_)&&(te=Math.max(c,i-h-_-u));let ne=Number.isNaN(d)?e.sx:t+d,re=Number.isNaN(h)?e.sy:n+h,b=e.fixed?18:0;layoutBox(a,ne,re,r,i,e.fs,e.lh,y,te,!1,b);let x=of.boxes.get(a),ie=0,ae=0;if(Number.isNaN(d)&&!Number.isNaN(m)&&(ie=t+r-m-x.mr-x.w-x.x),Number.isNaN(h)&&!Number.isNaN(_)&&(ae=n+i-_-x.mb-x.h-x.y),shift(x,ie,ae,!1),e.fixed)for(let e=x.idx;e<x.end;e++)of.list[e].flags|=2}const $=new Box;function flow(e,t,n,r,i,a,o,s){let c=children(e),l=0,u=!1,d=t,m=0;for(let e=0;e<c.length;e++){let h=c[e];if(h.type!==1){if(isBlank(h.data))continue;u||(u=!0,d=t,m=s),d+=textWidth(h.data,a);continue}let _=kindOf(h,computedDisplay(h));if(_===0)continue;let v=plain(h)?`static`:sty(h).position;if(v===`absolute`||v===`fixed`)deferAbs(h,v,u?d:t,n+l,a,o);else if(h.ns===`http://www.w3.org/1999/xhtml`&&h.tag===Y.br){u||(m=s);let e=newBox(h,4);e.x=e.vx=d,e.y=e.vy=n+l,e.w=0,e.h=m,e.mt=e.mr=e.mb=e.ml=e.bt=e.br=e.bb=e.bl=e.pt=e.pr=e.pb=e.pl=0,l+=m,u=!1,m=0}else if(_===1)u&&(l+=m,u=!1,m=0),l+=layoutBox(h,t,n+l,r,i,a,o,NaN,NaN,!1,0);else if(u||(u=!0,d=t,m=s),_===3){let e=layoutBox(h,d,n+l,r,i,a,o,NaN,NaN,!0,0);d+=df,e>m&&(m=e)}else{let e=layoutInline(h,d,n+l,r,a,o);d+=df,e>m&&(m=e)}}return u&&(l+=m),releaseChildren(c),l}function layoutInline(e,t,n,r,i,a){let o=newBox(e,4),s=fontSize(e,i),c=lineHeightOf(e,a),l=lineHeightPx(c,s);edges(e,o,r,s),o.x=o.vx=t+o.ml,o.y=o.vy=n;let u=l,d=o.x+o.bl+o.pl,m=children(e);for(let e=0;e<m.length;e++){let t=m[e];if(t.type!==1){d+=textWidth(t.data,s);continue}let i=kindOf(t,computedDisplay(t));if(i===0)continue;let a=plain(t)?`static`:sty(t).position;if(a===`absolute`||a===`fixed`){deferAbs(t,a,d,n,s,c);continue}let o=i===2?layoutInline(t,d,n,r,s,c):layoutBox(t,d,n,r,NaN,s,c,NaN,NaN,!0,0);d+=df,o>u&&(u=o)}if(releaseChildren(m),o.w=d+o.pr+o.br-o.x,o.h=u+o.pt+o.pb+o.bt+o.bb,o.end=of.list.length,(plain(e)?`static`:sty(e).position)===`relative`){let t=length(sty(e).left,r,s),n=length(sty(e).top,NaN,s);shift(o,Number.isNaN(t)?0:t,Number.isNaN(n)?0:n,!1)}return df=o.w+o.ml+o.mr,u}var FlexItem=class{el;text;grow;shrink;main;m0;m1;cross;autoCross;align;constructor(){this.el=null,this.text=``,this.grow=0,this.shrink=1,this.main=0,this.m0=0,this.m1=0,this.cross=0,this.autoCross=!0,this.align=`stretch`}};function layoutFlex(e,t,n,r,i,a,o,s,c){let l=c||plain(e)?`row`:sty(e).flexDir,u=l===`column`||l===`column-reverse`,d=l===`row-reverse`||l===`column-reverse`,m=c||plain(e)?`normal`:u?sty(e).rowGap:sty(e).colGap,h=Math.max(0,lenOr0(m,u?i:r,a)),_=c||plain(e)?`normal`:sty(e).alignItems,v=c||plain(e)?`normal`:sty(e).justify,ee=children(e),y=[];for(let e=0;e<ee.length;e++){let l=ee[e];if(l.type!==1){if(isBlank(l.data))continue;let e=new FlexItem;e.text=l.data,e.main=u?s:textWidth(l.data,a),e.cross=u?textWidth(l.data,a):s,e.shrink=0,y.push(e);continue}if(computedDisplay(l)===`none`)continue;let d=plain(l)?`static`:sty(l).position;if(d===`absolute`||d===`fixed`){deferAbs(l,d,t,n,a,o);continue}let m=new FlexItem;m.el=l;let h=fontSize(l,a);edges(l,$,r,h);let v=$.pl+$.pr+$.bl+$.br,te=$.pt+$.pb+$.bt+$.bb;m.m0=u?$.mt:$.ml,m.m1=u?$.mb:$.mr;let ne=plain(l);if(c)m.grow=1,m.shrink=1,m.main=0;else{m.grow=ne?0:sty(l).grow,m.shrink=sty(l).shrink;let e=ne?`auto`:sty(l).basis,t=u?i:r,n=u?te:v,a=e===`auto`||e===`content`?NaN:length(e,t,h);if(!Number.isNaN(a))a=toContent(a,l,n)+n;else{let e=ne?NaN:length(u?sty(l).height:sty(l).width,t,h);Number.isNaN(e)||(a=toContent(e,l,n)+n)}m.main=a}let re=ne?`auto`:sty(l).alignSelf;m.align=re===`auto`||re===`normal`?_===`normal`?`stretch`:_:re,m.autoCross=(ne?`auto`:u?sty(l).width:sty(l).height)===`auto`&&!isReplaced(l),y.push(m)}releaseChildren(ee);let te=of.list.length,ne=ff.length,re=u?r:i,b=u?n:t;for(let e=0;e<y.length;e++){let s=y[e];if(s.el===null){b+=s.main+h;continue}let c=u&&s.autoCross&&s.align===`stretch`?r-crossMargins(s.el,r,a,!0):NaN;if(u){let e=layoutBox(s.el,t,b,r,i,a,o,c,s.main,Number.isNaN(c),0),n=of.boxes.get(s.el);Number.isNaN(s.main)&&(s.main=n.h),s.cross=df,b+=e+h}else{let e=s.autoCross&&s.align===`stretch`&&!Number.isNaN(i)?i-crossMargins(s.el,r,a,!1):NaN;layoutBox(s.el,b,n,r,i,a,o,s.main,e,Number.isNaN(s.main),0);let t=of.boxes.get(s.el);Number.isNaN(s.main)&&(s.main=t.w),s.cross=t.h+t.mt+t.mb,b+=df+h}}let x=u?i:r,ie=h*Math.max(0,y.length-1),ae=0,oe=0;for(let e=0;e<y.length;e++){let t=y[e];ie+=t.main+t.m0+t.m1,ae+=t.grow,oe+=t.shrink*t.main}let se=!1,S=Number.isNaN(x)?0:x-ie;if(S>0&&ae>0){for(let e=0;e<y.length;e++){let t=y[e];t.grow>0&&(t.main+=S*t.grow/ae,se=!0)}S=0}else if(S<0&&oe>0){for(let e=0;e<y.length;e++){let t=y[e];t.shrink>0&&t.main>0&&(t.main=Math.max(0,t.main+S*t.shrink*t.main/oe),se=!0)}S=0}let ce=re;if(Number.isNaN(ce)){ce=0;for(let e=0;e<y.length;e++)y[e].cross>ce&&(ce=y[e].cross)}if(!u&&Number.isNaN(i))for(let e=0;e<y.length;e++){let t=y[e];t.el!==null&&t.autoCross&&t.align===`stretch`&&t.cross<ce&&(se=!0)}let le=0,ue=h;if(S>0&&y.length>0){switch(v){case`center`:le=S/2;break;case`flex-end`:case`end`:le=S;break;case`space-between`:ue+=y.length>1?S/(y.length-1):0;break;case`space-around`:le=S/y.length/2,ue+=S/y.length;break;case`space-evenly`:le=S/(y.length+1),ue+=S/(y.length+1)}d&&(v===`normal`||v===`flex-start`||v===`start`)&&(le=S)}se&&(of.list.length=te,ff.length=ne),b=(u?n:t)+le;let de=0,fe=d?y.slice().reverse():y;for(let e=0;e<fe.length;e++){let s=fe[e];if(s.el===null){b+=s.main+ue,de+=s.main+ue;continue}let c=of.boxes.get(s.el);if(u){let e=s.autoCross&&s.align===`stretch`?r-crossMargins(s.el,r,a,!0):NaN;se?layoutBox(s.el,t,b,r,i,a,o,e,s.main,Number.isNaN(e),0):shift(c,0,b+c.mt-c.y,!1),shift(c,crossOffset(s.align,r,c.w+c.ml+c.mr),0,!1),b+=c.h+c.mt+c.mb+ue,de+=c.h+c.mt+c.mb+ue}else{let e=s.autoCross&&s.align===`stretch`?ce-crossMargins(s.el,r,a,!1):NaN;se?layoutBox(s.el,b,n,s.main,i,a,o,s.main,e,!1,0):shift(c,b+c.ml-c.x,0,!1),shift(c,0,crossOffset(s.align,ce,c.h+c.mt+c.mb),!1),b+=c.w+c.ml+c.mr+ue}}return u?Number.isNaN(i)?Math.max(0,de-ue):i:ce}function crossMargins(e,t,n,r){return edges(e,$,t,fontSize(e,n)),r?$.ml+$.mr:$.mt+$.mb}function crossOffset(e,t,n){if(Number.isNaN(t))return 0;switch(e){case`center`:return(t-n)/2;case`flex-end`:case`end`:case`self-end`:return t-n}return 0}function maxContent(e,t){let n=fontSize(e,t);edges(e,$,NaN,n);let r=$.pl+$.pr+$.bl+$.br;if(isReplaced(e))return intrinsicW(e,n,lineHeightPx(lineHeightOf(e,`normal`),n))+r;if(!plain(e)){let t=length(sty(e).width,NaN,n);if(!Number.isNaN(t))return toContent(t,e,r)+r}let i=isFlex(computedDisplay(e))&&(plain(e)||!sty(e).flexDir.startsWith(`column`)),a=i&&!plain(e)?Math.max(0,lenOr0(sty(e).colGap,NaN,n)):0,o=children(e),s=0,c=0,l=0;for(let e=0;e<o.length;e++){let t=o[e];if(t.type!==1){c+=textWidth(t.data,n);continue}let r=kindOf(t,computedDisplay(t));if(r===0)continue;if(!plain(t)){let e=sty(t).position;if(e===`absolute`||e===`fixed`)continue}if(t.ns===`http://www.w3.org/1999/xhtml`&&t.tag===Y.br){s=Math.max(s,c),c=0;continue}let u=maxContent(t,n);edges(t,$,NaN,fontSize(t,n));let d=u+$.ml+$.mr;i?(c+=d+(l>0?a:0),l++):r===1?(s=Math.max(s,c,d),c=0):c+=d}return releaseChildren(o),Math.max(s,c)+r}function viewport(e){return e.doc[q]}function scrollExtent(e,t,n){let r=rf.get(e.doc).list,i=t.vx+t.bl,a=t.vy+t.bt,o=0;for(let e=t.idx+1;e<t.end;e++){let s=r[e];if(s.flags&16&&!(t.flags&8)){e=s.end-1;continue}let c=n?s.vy+s.h+s.mb-a:s.vx+s.w+s.mr-i;c>o&&(o=c),s.flags&1&&(e=s.end-1)}return Math.round((o+(n?t.pb:t.pr))*64)/64}function clientWidthOf(e,t){return e.flags&4?0:e.flags&8?viewport(t)[bn]:e.w-e.bl-e.br}function clientHeightOf(e,t){return e.flags&4?0:e.flags&8?viewport(t)[yn]:e.h-e.bt-e.bb}function knownBox(e){let t=rf.get(e.doc);if(t===void 0)return null;let n=t.boxes.get(e);return n!==void 0&&n.gen===t.gen?n:null}function checkVisibility(e,t){if(!(e.flags&1))return!1;for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return!1;if(computedValue(e,`display`)===`contents`)return!1;for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t))if(computedValue(t,`content-visibility`)===`hidden`)return!1;let n=t??{};if(n.checkOpacity||n.opacityProperty)for(let t=e;t!==null;t=inheritanceParent(t)){let e=computedValue(t,`opacity`);if(e!==``&&parseFloat(e)===0)return!1}return!n.checkVisibilityCSS&&!n.visibilityProperty||computedVisibility(e)===`visible`}var ScrollOffsets=class{top;left;constructor(){this.top=0,this.left=0}};const Df=/* @__PURE__ */ new WeakMap;function clamp(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:0}function slot(e){let t=Df.get(e);return t===void 0&&Df.set(e,t=new ScrollOffsets),t}function getScrollTop(e){return ku&&layoutOn(e.doc)?layoutScroll(e,!0):Df.get(e)?.top??0}function getScrollLeft(e){return ku&&layoutOn(e.doc)?layoutScroll(e,!1):Df.get(e)?.left??0}function setScrollTop(e,t){ku&&layoutOn(e.doc)?setLayoutScroll(e,!0,t):slot(e).top=clamp(t)}function setScrollLeft(e,t){ku&&layoutOn(e.doc)?setLayoutScroll(e,!1,t):slot(e).left=clamp(t)}function scrollElement(e,t,n,r,i){let a,o;if(i>=2)a=Number(n),o=Number(r);else if(typeof n==`object`&&n){let e=n;e.left!==void 0&&(a=Number(e.left)),e.top!==void 0&&(o=Number(e.top))}else if(i===0||n===void 0)return;if(ku&&layoutOn(e.doc)){let n=boxOf(e);if(n===null)return;let r=layoutScroll(e,!0),i=layoutScroll(e,!1),s=slot(e);s.top=r,s.left=i,a!==void 0&&!Number.isNaN(a)&&(s.left=Math.min(clamp(t?i+a:a),maxScroll(e,n,!1))),o!==void 0&&!Number.isNaN(o)&&(s.top=Math.min(clamp(t?r+o:o),maxScroll(e,n,!0))),(s.top!==r||s.left!==i)&&fireAnEvent(`scroll`,e.node);return}let s=slot(e);a!==void 0&&!Number.isNaN(a)&&(s.left=clamp(t?s.left+a:a)),o!==void 0&&!Number.isNaN(o)&&(s.top=clamp(t?s.top+o:o))}function isBody(e){if(e.tag!==Y.body||e.ns!==`http://www.w3.org/1999/xhtml`)return!1;let t=e.parent;return t!==null&&t.tag===Y.html&&t.parent!==null&&t.parent.type===9}function offsetParent(e){if(!(e.flags&1))return null;let t=e.parent;if(t===null||t.type===9||isBody(e))return null;for(let t=e;t!==null;t=inheritanceParent(t))if(isDisplayNone(t))return null;let n=computedPosition(e);if(n===`fixed`)return null;let r=n===`static`;for(let t=inheritanceParent(e);t!==null&&t.type===1;t=inheritanceParent(t))if(computedPosition(t)!==`static`||isBody(t)||r&&t.ns===`http://www.w3.org/1999/xhtml`&&(t.tag===Y.td||t.tag===Y.th||t.tag===Y.table))return t;return null}function scrollSize(e,t,n){if(t.flags&4)return 0;let r=n?clientHeightOf(t,e):clientWidthOf(t,e);return Math.max(r,scrollExtent(e,t,n))}function maxScroll(e,t,n){return Math.max(0,scrollSize(e,t,n)-(n?clientHeightOf(t,e):clientWidthOf(t,e)))}function layoutScroll(e,t){let n=Df.get(e);if(n===void 0)return 0;let r=t?n.top:n.left;if(r===0)return 0;let i=boxOf(e);return i===null?0:Math.min(r,maxScroll(e,i,t))}function setLayoutScroll(e,t,n){let r=boxOf(e);if(r===null)return;let i=Number(n);Number.isFinite(i)||(i=0),i=Math.min(Math.max(0,i),maxScroll(e,r,t));let a=layoutScroll(e,t),o=slot(e);t?o.top=i:o.left=i,i!==a&&fireAnEvent(`scroll`,e.node)}let Of=0,kf=0;function rectOrigin(e,t){let n=t.vx,r=t.vy;if(!(t.flags&16))for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t)){let e=knownBox(t);if(e!==null&&((e.flags&9)==1&&(n-=layoutScroll(t,!1),r-=layoutScroll(t,!0)),e.flags&16))break}if(!(t.flags&2)){let t=viewport(e);n-=t[hr],r-=t[gr]}Of=n,kf=r}function boundingClientRect(e){if(!ku)return new No;let t=boxOf(e);return t===null?new No:(rectOrigin(e,t),new No(Of,kf,t.w,t.h))}function clientRects(e){if(!ku)return new DOMRectList;let t=boxOf(e);return t===null?new DOMRectList:(rectOrigin(e,t),new DOMRectList([new No(Of,kf,t.w,t.h)]))}const Af={ClientTop:0,ClientLeft:1,ClientWidth:2,ClientHeight:3,ScrollWidth:4,ScrollHeight:5};function elementMetric(e,t){if(!ku)return 0;let n=boxOf(e);if(n===null)return 0;switch(t){case Af.ClientTop:return n.flags&4?0:Math.round(n.bt);case Af.ClientLeft:return n.flags&4?0:Math.round(n.bl);case Af.ClientWidth:return Math.round(clientWidthOf(n,e));case Af.ClientHeight:return Math.round(clientHeightOf(n,e));case Af.ScrollWidth:return Math.round(scrollSize(e,n,!1));case Af.ScrollHeight:return Math.round(scrollSize(e,n,!0))}return 0}const jf={Top:0,Left:1,Width:2,Height:3};function offsetMetric(e,t){if(!ku)return 0;let n=boxOf(e);if(n===null)return 0;if(t===jf.Width)return Math.round(n.w);if(t===jf.Height)return Math.round(n.h);let r=offsetParent(e),i=r===null||isBody(r)?null:boxOf(r);return t===jf.Top?Math.round(i===null?n.y:n.y-i.y-i.bt):Math.round(i===null?n.x:n.x-i.x-i.bl)}function scrollElementIntoView(e,t){if(!ku||boxOf(e)===null)return;let n=`start`,r=`nearest`;if(t===!1)n=`end`;else if(typeof t==`object`&&t){let e=t;e.block!==void 0&&(n=String(e.block)),e.inline!==void 0&&(r=String(e.inline))}for(let t=inheritanceParent(e);t!==null;t=inheritanceParent(t)){let i=boxOf(t);if(i===null||(i.flags&9)!=1)continue;let a=boxOf(e);rectOrigin(e,a);let o=Of,s=kf;rectOrigin(t,i);let c=alignDelta(n,s-kf-i.bt,a.h,clientHeightOf(i,t)),l=alignDelta(r,o-Of-i.bl,a.w,clientWidthOf(i,t));c!==0&&setLayoutScroll(t,!0,layoutScroll(t,!0)+c),l!==0&&setLayoutScroll(t,!1,layoutScroll(t,!1)+l)}}function alignDelta(e,t,n,r){switch(e){case`start`:return t;case`end`:return t+n-r;case`center`:return t+n/2-r/2}let i=t+n;return t<0&&i>r?0:t<0&&n<=r||i>r&&n>r?t:i>r&&n<=r||t<0&&n>r?i-r:0}function installHTMLElementView(e){let t=e.prototype;Object.defineProperty(t,"offsetParent",{get(){let e=offsetParent(this[M]);return e===null?null:e.node},enumerable:!0,configurable:!0});let n=[[`offsetTop`,function offsetTop(){return ku?offsetMetric(this[M],jf.Top):0}],[`offsetLeft`,function offsetLeft(){return ku?offsetMetric(this[M],jf.Left):0}],[`offsetWidth`,function offsetWidth(){return ku?offsetMetric(this[M],jf.Width):0}],[`offsetHeight`,function offsetHeight(){return ku?offsetMetric(this[M],jf.Height):0}]];for(let[e,r]of n)Object.defineProperty(r,"name",{value:`get ${e}`}),Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0})}function installElementView(e){let t=e.prototype,def=(e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!0,...n})};def(`checkVisibility`,{writable:!0,value:function checkVisibilityMethod(e){return checkVisibility(this[M],e)}}),def(`getBoundingClientRect`,{writable:!0,value:function getBoundingClientRect(){return boundingClientRect(this[M])}}),def(`getClientRects`,{writable:!0,value:function getClientRects(){return clientRects(this[M])}}),def(`scrollIntoView`,{writable:!0,value:function scrollIntoView(e){ku&&scrollElementIntoView(this[M],e)}});let n=[[`clientTop`,Af.ClientTop],[`clientLeft`,Af.ClientLeft],[`clientWidth`,Af.ClientWidth],[`clientHeight`,Af.ClientHeight],[`scrollWidth`,Af.ScrollWidth],[`scrollHeight`,Af.ScrollHeight]];for(let[e,t]of n){let get=function(){return ku?elementMetric(this[M],t):0};Object.defineProperty(get,"name",{value:`get ${e}`}),def(e,{get})}def(`scrollTop`,{get(){return getScrollTop(this[M])},set(e){setScrollTop(this[M],e)}}),def(`scrollLeft`,{get(){return getScrollLeft(this[M])},set(e){setScrollLeft(this[M],e)}});for(let[e,t]of[[`scroll`,!1],[`scrollTo`,!1],[`scrollBy`,!0]])def(e,{writable:!0,value:function(e,n){scrollElement(this[M],t,e,n,arguments.length)}})}var ResizeObserverSize=class{inlineSize;blockSize;constructor(e,t){this.inlineSize=e,this.blockSize=t}get[Symbol.toStringTag](){return`ResizeObserverSize`}},ResizeObserverEntry=class{target;contentRect;borderBoxSize;contentBoxSize;devicePixelContentBoxSize;constructor(e,t,n,r,i,a){this.target=e,this.contentRect=new DOMRectReadOnly(i,a,n.inlineSize,n.blockSize),this.borderBoxSize=Object.freeze([t]),this.contentBoxSize=Object.freeze([n]),this.devicePixelContentBoxSize=Object.freeze([r])}get[Symbol.toStringTag](){return`ResizeObserverEntry`}},Observation=class{target;box;lastInline;lastBlock;constructor(e,t){this.target=e,this.box=t,this.lastInline=-1,this.lastBlock=-1}};const Mf=/* @__PURE__ */ new WeakMap,Nf=/* @__PURE__ */ new WeakMap,Pf=/* @__PURE__ */ new Set;let Ff=!1,If=0;const Lf=globalThis.queueMicrotask.bind(globalThis);function schedule(e){Pf.add(e),!Ff&&(Ff=!0,Lf(runChecks))}function observe(e,t,n){if(!ku)return;let r=t[M];if(r===void 0)return;let i=r.doc;if(!layoutOn(i))return;let a=Mf.get(e);a===void 0&&Mf.set(e,a=/* @__PURE__ */ new Map),a.delete(t),a.set(t,new Observation(t,n));let o=Nf.get(i);o===void 0&&Nf.set(i,o=/* @__PURE__ */ new Set),o.add(e),If=0,schedule(i)}function unobserve(e,t){Mf.get(e)?.delete(t)}function disconnect(e){Mf.get(e)?.clear()}let Rf=0,zf=0;function boxSize(e,t){let n=boxOf(e[M]);if(n===null)Rf=zf=0;else if(t===`border-box`)Rf=n.w,zf=n.h;else if(Rf=Math.max(0,n.w-n.bl-n.br-n.pl-n.pr),zf=Math.max(0,n.h-n.bt-n.bb-n.pt-n.pb),t===`device-pixel-content-box`){let t=e[M].doc[q][kt];Rf=Math.round(Rf*t),zf=Math.round(zf*t)}}function entryFor(e){let t=e.target;boxSize(t,`border-box`);let n=new ResizeObserverSize(Rf,zf);boxSize(t,`content-box`);let r=new ResizeObserverSize(Rf,zf);boxSize(t,`device-pixel-content-box`);let i=new ResizeObserverSize(Rf,zf),a=boxOf(t[M]);return new ResizeObserverEntry(t,n,r,i,a===null?0:a.pl,a===null?0:a.pt)}function runChecks(){Ff=!1;let e=[...Pf];Pf.clear();let t=!1;for(let n of e){let e=Nf.get(n);if(e!==void 0)for(let n of Array.from(e)){let r=Mf.get(n);if(r===void 0||r.size===0){e.delete(n);continue}let i=[];for(let e of r.values())boxSize(e.target,e.box),(Rf!==e.lastInline||zf!==e.lastBlock)&&(e.lastInline=Rf,e.lastBlock=zf,i.push(entryFor(e)));if(i.length!==0){t=!0;try{n[Ze].call(n,i,n)}catch(e){reportException$1(e,i[0].target)}}}}t?If++:If=0}Qd.observe=observe,Qd.unobserve=unobserve,Qd.disconnect=disconnect,setRelayoutListener(e=>{If<32&&Nf.has(e)&&schedule(e)});function escape(e){if(arguments.length===0)throw TypeError(`Failed to execute 'escape' on 'CSS': 1 argument required, but only 0 present.`);let t=String(e),n=t.length,r=t.charCodeAt(0),i=0;for(;i<n;i++){let e=t.charCodeAt(i);if(e>=48&&e<=57&&(i===0||i===1&&r===45)||e===45&&n===1||!(e>=128||e===45||e===95||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122))break}if(i===n)return t;let a=t.slice(0,i);for(let e=i;e<n;e++){let i=t.charCodeAt(e);a+=i===0?`�`:i>=1&&i<=31||i===127||e===0&&i>=48&&i<=57||e===1&&i>=48&&i<=57&&r===45?`\\`+i.toString(16)+` `:e===0&&i===45&&n===1?`\\-`:i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?t[e]:`\\`+t[e]}return a}function supports(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'supports' on 'CSS': 1 argument required, but only 0 present.`);return arguments.length>=2?supportsDeclaration(String(e),String(t)):evaluateSupportsCondition(String(e))}const Bf=/* @__PURE__ */ new Set;function registerProperty(e){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw TypeError(`Failed to execute 'registerProperty' on 'CSS': required member name is undefined.`);if(!e.name.startsWith(`--`))throw new DOMException(`Failed to execute 'registerProperty' on 'CSS': Custom property names must start with '--'.`,`SyntaxError`);if(Bf.has(e.name))throw new DOMException(`Failed to execute 'registerProperty' on 'CSS': The name provided has already been registered.`,`InvalidModificationError`);Bf.add(e.name)}const Vf={escape,supports,registerProperty};Object.defineProperty(Vf,Symbol.toStringTag,{value:`CSS`,writable:!1,enumerable:!1,configurable:!0}),dd.createSheet=createOwnerSheet,dd.removeSheet=removeOwnerSheet,dd.createLinkSheet=createLinkSheet,_l.getComputedStyle=(e,t)=>getComputedStyle(e,t),_l.evaluateMediaQuery=(e,t)=>matchMediaText(e,t),_l.setComputedColorMode=setComputedColorMode,installElementView(Io),installHTMLElementView(HTMLElement),Object.hasOwn(Z.prototype,`scrollingElement`)||Object.defineProperty(Z.prototype,"scrollingElement",{get(){return this.compatMode===`BackCompat`?this.body:this.documentElement},enumerable:!0,configurable:!0});for(let e of[Z,ShadowRoot]){let t=e.prototype;Object.hasOwn(t,`styleSheets`)||Object.defineProperty(t,"styleSheets",{get(){return styleSheetsOf(this[M])},enumerable:!0,configurable:!0}),Object.hasOwn(t,`adoptedStyleSheets`)||Object.defineProperty(t,"adoptedStyleSheets",{get(){return adoptedStyleSheetsOf(this[M])},set(e){setAdoptedStyleSheets(this[M],e)},enumerable:!0,configurable:!0})}registerDomNamespace(/* @__PURE__ */ __exportAll({AbstractRange:()=>AbstractRange,AnimationEvent:()=>AnimationEvent,Attr:()=>Attr,Audio:()=>id,BeforeUnloadEvent:()=>BeforeUnloadEvent,CDATASection:()=>CDATASection,CSS:()=>Vf,CSSConditionRule:()=>CSSConditionRule,CSSContainerRule:()=>CSSContainerRule,CSSFontFaceRule:()=>CSSFontFaceRule,CSSGroupingRule:()=>CSSGroupingRule,CSSImportRule:()=>CSSImportRule,CSSKeyframeRule:()=>CSSKeyframeRule,CSSKeyframesRule:()=>CSSKeyframesRule,CSSLayerBlockRule:()=>CSSLayerBlockRule,CSSLayerStatementRule:()=>CSSLayerStatementRule,CSSMediaRule:()=>CSSMediaRule,CSSNamespaceRule:()=>CSSNamespaceRule,CSSNestedDeclarations:()=>CSSNestedDeclarations,CSSPageRule:()=>CSSPageRule,CSSPropertyRule:()=>CSSPropertyRule,CSSRule:()=>hl,CSSRuleList:()=>CSSRuleList,CSSScopeRule:()=>CSSScopeRule,CSSStartingStyleRule:()=>CSSStartingStyleRule,CSSStyleDeclaration:()=>CSSStyleDeclaration,CSSStyleRule:()=>gl,CSSStyleSheet:()=>ml,CSSSupportsRule:()=>CSSSupportsRule,CharacterData:()=>CharacterData,Clipboard:()=>Clipboard,ClipboardEvent:()=>ClipboardEvent,ClipboardItem:()=>ClipboardItem,CloseEvent:()=>CloseEvent,CommandEvent:()=>CommandEvent,Comment:()=>Comment,CompositionEvent:()=>CompositionEvent,CustomElementRegistry:()=>CustomElementRegistry,CustomEvent:()=>CustomEvent,CustomStateSet:()=>CustomStateSet,DOMImplementation:()=>DOMImplementation,DOMMatrix:()=>Fo,DOMMatrixReadOnly:()=>DOMMatrixReadOnly,DOMParser:()=>DOMParser,DOMPoint:()=>Mo,DOMPointReadOnly:()=>DOMPointReadOnly,DOMRect:()=>No,DOMRectList:()=>DOMRectList,DOMRectReadOnly:()=>DOMRectReadOnly,DOMStringMap:()=>DOMStringMap,DOMTokenList:()=>Co,DataTransfer:()=>DataTransfer,DataTransferItem:()=>DataTransferItem,DataTransferItemList:()=>DataTransferItemList,Document:()=>Z,DocumentFragment:()=>DocumentFragment,DocumentType:()=>DocumentType,DragEvent:()=>DragEvent,Element:()=>Io,ElementInternals:()=>ElementInternals,ErrorEvent:()=>ErrorEvent,Event:()=>Event,EventTarget:()=>EventTarget,FileList:()=>FileList,FileReader:()=>FileReader,FocusEvent:()=>FocusEvent,FormData:()=>FormData$1,FormDataEvent:()=>FormDataEvent,HTMLAnchorElement:()=>HTMLAnchorElement,HTMLAreaElement:()=>HTMLAreaElement,HTMLAudioElement:()=>HTMLAudioElement,HTMLBRElement:()=>HTMLBRElement,HTMLBaseElement:()=>HTMLBaseElement,HTMLBodyElement:()=>HTMLBodyElement,HTMLButtonElement:()=>HTMLButtonElement,HTMLCanvasElement:()=>HTMLCanvasElement,HTMLCollection:()=>Aa,HTMLDListElement:()=>HTMLDListElement,HTMLDataElement:()=>HTMLDataElement,HTMLDataListElement:()=>HTMLDataListElement,HTMLDetailsElement:()=>HTMLDetailsElement,HTMLDialogElement:()=>HTMLDialogElement,HTMLDirectoryElement:()=>HTMLDirectoryElement,HTMLDivElement:()=>HTMLDivElement,HTMLDocument:()=>Z,HTMLElement:()=>HTMLElement,HTMLEmbedElement:()=>HTMLEmbedElement,HTMLFieldSetElement:()=>HTMLFieldSetElement,HTMLFontElement:()=>HTMLFontElement,HTMLFormControlsCollection:()=>HTMLFormControlsCollection,HTMLFormElement:()=>HTMLFormElement,HTMLFrameElement:()=>HTMLFrameElement,HTMLFrameSetElement:()=>HTMLFrameSetElement,HTMLHRElement:()=>HTMLHRElement,HTMLHeadElement:()=>HTMLHeadElement,HTMLHeadingElement:()=>HTMLHeadingElement,HTMLHtmlElement:()=>HTMLHtmlElement,HTMLIFrameElement:()=>HTMLIFrameElement,HTMLImageElement:()=>HTMLImageElement,HTMLInputElement:()=>HTMLInputElement,HTMLLIElement:()=>HTMLLIElement,HTMLLabelElement:()=>HTMLLabelElement,HTMLLegendElement:()=>HTMLLegendElement,HTMLLinkElement:()=>HTMLLinkElement,HTMLMapElement:()=>HTMLMapElement,HTMLMarqueeElement:()=>HTMLMarqueeElement,HTMLMediaElement:()=>HTMLMediaElement,HTMLMenuElement:()=>HTMLMenuElement,HTMLMetaElement:()=>HTMLMetaElement,HTMLMeterElement:()=>HTMLMeterElement,HTMLModElement:()=>HTMLModElement,HTMLOListElement:()=>HTMLOListElement,HTMLObjectElement:()=>HTMLObjectElement,HTMLOptGroupElement:()=>HTMLOptGroupElement,HTMLOptionElement:()=>HTMLOptionElement,HTMLOptionsCollection:()=>HTMLOptionsCollection,HTMLOutputElement:()=>HTMLOutputElement,HTMLParagraphElement:()=>HTMLParagraphElement,HTMLParamElement:()=>HTMLParamElement,HTMLPictureElement:()=>HTMLPictureElement,HTMLPreElement:()=>HTMLPreElement,HTMLProgressElement:()=>HTMLProgressElement,HTMLQuoteElement:()=>HTMLQuoteElement,HTMLScriptElement:()=>HTMLScriptElement,HTMLSelectElement:()=>HTMLSelectElement,HTMLSlotElement:()=>HTMLSlotElement,HTMLSourceElement:()=>HTMLSourceElement,HTMLSpanElement:()=>HTMLSpanElement,HTMLStyleElement:()=>HTMLStyleElement,HTMLTableCaptionElement:()=>HTMLTableCaptionElement,HTMLTableCellElement:()=>HTMLTableCellElement,HTMLTableColElement:()=>HTMLTableColElement,HTMLTableElement:()=>HTMLTableElement,HTMLTableRowElement:()=>HTMLTableRowElement,HTMLTableSectionElement:()=>HTMLTableSectionElement,HTMLTemplateElement:()=>HTMLTemplateElement,HTMLTextAreaElement:()=>HTMLTextAreaElement,HTMLTimeElement:()=>HTMLTimeElement,HTMLTitleElement:()=>HTMLTitleElement,HTMLTrackElement:()=>HTMLTrackElement,HTMLUListElement:()=>HTMLUListElement,HTMLUnknownElement:()=>HTMLUnknownElement,HTMLVideoElement:()=>HTMLVideoElement,HashChangeEvent:()=>HashChangeEvent,History:()=>History,Image:()=>Xu,InputEvent:()=>InputEvent,IntersectionObserver:()=>IntersectionObserver,KeyboardEvent:()=>KeyboardEvent,Location:()=>Location,MathMLElement:()=>MathMLElement,MediaError:()=>MediaError,MediaList:()=>MediaList,MediaQueryList:()=>MediaQueryList,MediaQueryListEvent:()=>MediaQueryListEvent,MessageEvent:()=>MessageEvent,MouseEvent:()=>MouseEvent,MutationObserver:()=>MutationObserver,MutationRecord:()=>Vi,NamedNodeMap:()=>ko,Navigator:()=>Navigator,Node:()=>Node,NodeFilter:()=>lu,NodeIterator:()=>NodeIterator,NodeList:()=>Ri,Option:()=>Od,PageTransitionEvent:()=>PageTransitionEvent,PointerEvent:()=>PointerEvent,PopStateEvent:()=>PopStateEvent,ProcessingInstruction:()=>ProcessingInstruction,ProgressEvent:()=>ProgressEvent,PromiseRejectionEvent:()=>PromiseRejectionEvent,RadioNodeList:()=>RadioNodeList,Range:()=>cu,ResizeObserver:()=>ResizeObserver,SVGAElement:()=>SVGAElement,SVGAnimatedString:()=>SVGAnimatedString,SVGCircleElement:()=>SVGCircleElement,SVGClipPathElement:()=>SVGClipPathElement,SVGDefsElement:()=>SVGDefsElement,SVGDescElement:()=>SVGDescElement,SVGElement:()=>SVGElement,SVGEllipseElement:()=>SVGEllipseElement,SVGFilterElement:()=>SVGFilterElement,SVGForeignObjectElement:()=>SVGForeignObjectElement,SVGGElement:()=>SVGGElement,SVGGeometryElement:()=>SVGGeometryElement,SVGGradientElement:()=>SVGGradientElement,SVGGraphicsElement:()=>SVGGraphicsElement,SVGImageElement:()=>SVGImageElement,SVGLineElement:()=>SVGLineElement,SVGLinearGradientElement:()=>SVGLinearGradientElement,SVGMarkerElement:()=>SVGMarkerElement,SVGMaskElement:()=>SVGMaskElement,SVGMetadataElement:()=>SVGMetadataElement,SVGPathElement:()=>SVGPathElement,SVGPatternElement:()=>SVGPatternElement,SVGPolygonElement:()=>SVGPolygonElement,SVGPolylineElement:()=>SVGPolylineElement,SVGRadialGradientElement:()=>SVGRadialGradientElement,SVGRectElement:()=>SVGRectElement,SVGSVGElement:()=>SVGSVGElement,SVGScriptElement:()=>SVGScriptElement,SVGStopElement:()=>SVGStopElement,SVGStyleElement:()=>SVGStyleElement,SVGSwitchElement:()=>SVGSwitchElement,SVGSymbolElement:()=>SVGSymbolElement,SVGTSpanElement:()=>SVGTSpanElement,SVGTextContentElement:()=>SVGTextContentElement,SVGTextElement:()=>SVGTextElement,SVGTextPathElement:()=>SVGTextPathElement,SVGTextPositioningElement:()=>SVGTextPositioningElement,SVGTitleElement:()=>SVGTitleElement,SVGUseElement:()=>SVGUseElement,SVGViewElement:()=>SVGViewElement,Screen:()=>Screen,Selection:()=>Selection,ShadowRoot:()=>ShadowRoot,StaticRange:()=>StaticRange,Storage:()=>Storage,StorageEvent:()=>StorageEvent,StyleSheet:()=>StyleSheet,StyleSheetList:()=>StyleSheetList,SubmitEvent:()=>SubmitEvent,Text:()=>Text,TextEvent:()=>TextEvent,TimeRanges:()=>TimeRanges,ToggleEvent:()=>ToggleEvent,Touch:()=>Touch,TouchEvent:()=>TouchEvent,TouchList:()=>bi,TransitionEvent:()=>TransitionEvent,TreeWalker:()=>TreeWalker,UIEvent:()=>UIEvent,ValidityState:()=>ValidityState,VisualViewport:()=>VisualViewport,WheelEvent:()=>WheelEvent,Window:()=>Window,XMLDocument:()=>XMLDocument,XMLHttpRequest:()=>XMLHttpRequest,XMLHttpRequestEventTarget:()=>Gd,XMLHttpRequestUpload:()=>XMLHttpRequestUpload,XMLSerializer:()=>XMLSerializer,createWindow:()=>createWindow,currentDocument:()=>currentDocument,currentWindow:()=>currentWindow,currentWindowOrNull:()=>currentWindowOrNull,getComputedStyle:()=>getComputedStyle,installGlobals:()=>installGlobals,setCurrentWindow:()=>setCurrentWindow}));export{sanitizeValue as $,CDATASection as $a,It as $c,isClockTimer as $d,isFACE as $i,kn as $l,attrAssociatedElements as $n,previousInTree as $o,createLinkSheet as $r,ze as $s,HTMLMediaElement as $t,Sr as $u,FileReader as A,getElementsByTagNameNS as Aa,mt as Ac,Xr as Ad,Se as Af,ml as Ai,un as Al,HTMLObjectElement as An,isAsciiWhitespace as Ao,defaultButton as Ar,TransitionEvent as As,SVGScriptElement as At,tr as Au,HTMLOutputElement as B,isValidNamespacePrefix as Ba,wt as Bc,ii as Bd,ee as Bf,fireAnEvent as Bi,yn as Bl,HTMLTableColElement as Bn,derivedCache as Bo,computedVisibility as Br,Touch as Bs,SVGTitleElement as Bt,V as Bu,optionSelected as C,getEventHandler as Ca,st as Cc,Wr as Cd,pe as Cf,CSSPageRule as Ci,nn as Cl,HTMLLIElement as Cn,tagName as Co,AbstractRange as Cr,PageTransitionEvent as Cs,SVGPathElement as Ct,Jn as Cu,DataTransferItemList as D,attachShadowRoot as Da,dt as Dc,G as Dd,Ee as Df,CSSScopeRule as Di,j as Dl,HTMLMetaElement as Dn,classTokens as Do,nodeLength as Dr,StorageEvent as Ds,SVGRadialGradientElement as Dt,Qn as Du,DataTransferItem as E,Io as Ea,ut as Ec,qr as Ed,de as Ef,CSSRuleList as Ei,sn as El,HTMLMenuElement as En,attr as Eo,compareBoundaryPoints as Er,PromiseRejectionEvent as Es,SVGPolylineElement as Et,Zn as Eu,FormData$1 as F,No as Fa,bt as Fc,ei as Fd,be as Ff,matchMediaText as Fi,mn as Fl,HTMLQuoteElement as Fn,notifyMutationObservers as Fo,styleElementRemoved as Fr,InputEvent as Fs,SVGTSpanElement as Ft,or as Fu,HTMLButtonElement as G,DOMStringMap as Ga,Pt as Gc,VirtualClock as Gd,ce as Gf,compatExposes as Gi,Sn as Gl,HTMLTrackElement as Gn,indexOf as Go,isVisibilityHidden as Gr,hasListeners as Gs,HTMLStyleElement as Gt,mr as Gu,HTMLFieldSetElement as H,ko as Ha,Et as Hc,oi as Hd,ae as Hf,il as Hi,xn as Hl,HTMLTableRowElement as Hn,childAt as Ho,hasAuthorStyles as Hr,bi as Hs,SVGViewElement as Ht,fr as Hu,Id as I,DOMRectList as Ia,xt as Ic,ti as Id,me as If,parseMediaQueryList as Ii,hn as Il,HTMLSourceElement as In,Vi as Io,styleElementUpdated as Ir,KeyboardEvent as Is,SVGTextContentElement as It,sr as Iu,Od as J,serializeChildren as Ja,jt as Jc,clockNow as Jd,resolveCompat as Ji,wn as Jl,Xu as Jn,nextElementInTree as Jo,pseudoContent as Jr,EventState as Js,HTMLTemplateElement as Jt,_r as Ju,HTMLOptGroupElement as K,Co as Ka,kt as Kc,VirtualTimeout as Kd,S as Kf,deferredCompatMembers as Ki,Cn as Kl,HTMLUListElement as Kn,isInclusiveAncestor as Ko,pointerEvents as Kr,removeAllEventListeners as Ks,HTMLTitleElement as Kt,hr as Ku,HTMLFormElement as L,DOMRectReadOnly as La,T as Lc,ni as Ld,Te as Lf,NodeCache as Li,gn as Ll,HTMLSpanElement as Ln,Ri as Lo,getComputedStyle as Lr,MouseEvent as Ls,SVGTextElement as Lt,cr as Lu,Gd as M,DOMMatrixReadOnly as Ma,_t as Mc,Qr as Md,he as Mf,MediaList as Mi,fn as Ml,HTMLParamElement as Mn,removeAttribute as Mo,isSubmitButton as Mr,CompositionEvent as Ms,SVGStyleElement as Mt,rr as Mu,XMLHttpRequestUpload as N,Mo as Na,vt as Nc,K as Nd,ue as Nf,StyleSheet as Ni,M as Nl,HTMLPictureElement as Nn,setAttribute as No,setNotImplementedHandler as Nr,DragEvent as Ns,SVGSwitchElement as Nt,ir as Nu,IntersectionObserver as O,getElementsByClassName as Oa,ft as Oc,Jr as Od,ge as Of,CSSStartingStyleRule as Oi,cn as Ol,HTMLModElement as On,getAttribute as Oo,CommandEvent as Or,SubmitEvent as Os,SVGRectElement as Ot,$n as Ou,installGlobals as P,DOMPointReadOnly as Pa,yt as Pc,$r as Pd,De as Pf,StyleSheetList as Pi,pn as Pl,HTMLPreElement as Pn,splitOnAsciiWhitespace as Po,isEditable as Pr,FocusEvent as Ps,SVGSymbolElement as Pt,ar as Pu,HTMLInputElement as Q,DocumentFragment as Qa,Ft as Qc,installClock as Qd,faceState as Qi,On as Ql,attrAssociatedElement as Qn,previousElementSibling as Qo,adoptedStyleSheetsOf as Qr,Re as Qs,HTMLAudioElement as Qt,xr as Qu,HTMLDataListElement as R,isValidDoctypeName as Ra,St as Rc,ri as Rd,ie as Rf,nodeCache as Ri,_n as Rl,HTMLTableCaptionElement as Rn,ensureIndexGetters as Ro,computedDisplay as Rr,PointerEvent as Rs,SVGTextPathElement as Rt,lr as Ru,isValid as S,Ho as Sa,ht as Sc,Ur as Sd,ye as Sf,CSSNestedDeclarations as Si,tn as Sl,HTMLImageElement as Sn,tagId as So,TreeWalker as Sr,MessageEvent as Ss,SVGMetadataElement as St,qn as Su,DataTransfer as T,setEventHandler as Ta,lt as Tc,Kr as Td,le as Tf,hl as Ti,an as Tl,HTMLMarqueeElement as Tn,asciiLowercase$1 as To,StaticRange as Tr,ProgressEvent as Ts,SVGPolygonElement as Tt,Xn as Tu,HTMLLegendElement as U,attrNode as Ua,Dt as Uc,si as Ud,s as Uf,Xc as Ui,N as Ul,HTMLTableSectionElement as Un,compareTreeOrder as Uo,isDisplayNone as Ur,UIEvent as Us,HTMLLinkElement as Ut,H as Uu,HTMLProgressElement as V,validateAndExtract as Va,Tt as Vc,ai as Vd,d as Vf,fireSyntheticPointerEvent as Vi,bn as Vl,HTMLTableElement as Vn,peekDerivedCache as Vo,currentStyleVersion as Vr,TouchEvent as Vs,SVGUseElement as Vt,dr as Vu,HTMLLabelElement as W,Attr as Wa,Ot as Wc,ci as Wd,se as Wf,Zc as Wi,P as Wl,HTMLTimeElement as Wn,firstElementChild as Wo,isDisplayNoneInclusive as Wr,WheelEvent as Ws,HTMLScriptElement as Wt,pr as Wu,HTMLSelectElement as X,parseFragment as Xa,Mt as Xc,clockStats as Xd,DeclBlock as Xi,En as Xl,ElementInternals as Xn,nextInTree as Xo,styledDisplay as Xr,Ie as Xs,HTMLDialogElement as Xt,yr as Xu,optionSelect as Y,serializeNode as Ya,E as Yc,clockSkipped as Yd,CSSStyleDeclaration as Yi,Tn as Yl,CustomStateSet as Yn,nextElementSibling as Yo,setComputedColorMode as Yr,setTrusted as Ys,HTMLDetailsElement as Yt,vr as Yu,HTMLTextAreaElement as Z,DocumentType as Za,Nt as Zc,foreignImmediatesPending as Zd,parseDeclBlock as Zi,Dn as Zl,HTMLElement as Zn,nextSkippingChildren as Zo,uaDisplay as Zr,Le as Zs,id as Zt,br as Zu,isPlaceholderShown as _,isTextualType as _a,nt as _c,Rr as _d,u as _f,CSSKeyframesRule as _i,Xt as _l,HTMLHRElement as _n,assignedNodes as _o,XMLDocument as _r,CloseEvent as _s,SVGImageElement as _t,Hn as _u,inputIndeterminate as a,formOwner as aa,Ge as ac,U as ad,c as af,unregisterOwnerSheet as ai,k as al,HTMLBRElement as an,ensureCollectionIndexGetters as ao,Storage as ar,getCurrentEvent as as,SVGCircleElement as at,Nn as au,isRequired as b,CustomElementRegistry as ba,at as bc,Vr as bd,Ce as bf,CSSMediaRule as bi,$t as bl,HTMLHtmlElement as bn,findSlot as bo,lu as br,FormDataEvent as bs,SVGMarkerElement as bt,Gn as bu,isDefault as c,isListed as ca,w as cc,Ar as cd,h as cf,mediaEnvironment as ci,Ht as cl,HTMLCanvasElement as cn,matches as co,Clipboard as cr,setAssignedSlotLookup as cs,SVGDescElement as ct,In as cu,isInRange as d,labeledControl as da,Xe as dc,Mr as dd,y as df,CSSConditionRule as di,Gt as dl,HTMLDirectoryElement as dn,Node as do,History as dr,currentDocument as ds,SVGFilterElement as dt,R as du,ValidityState as ea,Be as ec,Cr as ed,skipIdleTime as ef,createOwnerSheet as ei,D as el,HTMLVideoElement as en,CharacterData as eo,hasExplicitAttrElements as er,treeRoot as es,FileList as et,I as eu,isIndeterminate as f,labelsFor as fa,Ze as fc,Nr as fd,ne as ff,CSSContainerRule as fi,A as fl,HTMLDivElement as fn,inspectNode as fo,Location as fr,currentWindow as fs,SVGForeignObjectElement as ft,z as fu,isOutOfRange as g,isNumericType as ga,tt as gc,Lr as gd,a as gf,CSSKeyframeRule as gi,Yt as gl,HTMLFrameSetElement as gn,assignedElements as go,Z as gr,BeforeUnloadEvent as gs,SVGGraphicsElement as gt,Vn as gu,isOptional as h,inputTypeFromAttr as ha,et as hc,Ir as hd,_ as hf,CSSImportRule as hi,Jt as hl,HTMLFrameElement as hn,assignManually as ho,DOMImplementation as hr,AnimationEvent as hs,SVGGradientElement as ht,B as hu,inputChecked as i,listOfOptions as ia,We as ic,Dr as id,o as if,styleSheetsOf as ii,zt as il,HTMLAreaElement as in,Aa as io,trackGlobalTimers as ir,dispatch as is,SVGAnimatedString as it,Mn as iu,XMLHttpRequest as j,Fo as ja,gt as jc,Zr as jd,ve as jf,CSSSupportsRule as ji,dn as jl,HTMLParagraphElement as jn,prefixFlag as jo,implicitSubmission as jr,ClipboardEvent as js,SVGStopElement as jt,nr as ju,ResizeObserver as k,getElementsByTagName as ka,pt as kc,Yr as kd,we as kf,gl as ki,ln as kl,HTMLOListElement as kn,hasAttr as ko,constructEntryList as kr,ToggleEvent as ks,SVGSVGElement as kt,er as ku,isDisabled as l,isResettable as la,Je as lc,jr as ld,b as lf,MediaQueryListEvent as li,Ut as ll,HTMLDListElement as ln,querySelector as lo,ClipboardItem as lr,reportException$1 as ls,SVGElement as lt,Ln as lu,isMutable as m,inputType as ma,$e as mc,Fr as md,te as mf,CSSGroupingRule as mi,Kt as ml,HTMLFontElement as mn,splitText as mo,XMLSerializer as mr,setCurrentWindow as ms,SVGGeometryElement as mt,Bn as mu,controlValue as n,HTMLOptionsCollection as na,He as nc,Tr as nd,virtualDate as nf,removeOwnerSheet as ni,O as nl,TimeRanges as nn,ProcessingInstruction as no,createWindow as nr,NodeImpl as ns,MathMLElement as nt,L as nu,isAutofilled as o,isActuallyDisabled as oa,Ke as oc,Or as od,m as of,MediaQueryList as oi,Bt as ol,HTMLBaseElement as on,withNamedProperties as oo,Screen as or,nodeGetTheParent as os,SVGClipPathElement as ot,Pn as ou,isInvalid as p,xs as pa,Qe as pc,Pr as pd,x as pf,CSSFontFaceRule as pi,qt as pl,HTMLEmbedElement as pn,replaceData as po,DOMParser as pr,currentWindowOrNull as ps,SVGGElement as pt,zn as pu,HTMLOptionElement as q,ShadowRoot as qa,At as qc,canSkipZeroDelayWait as qd,__name as qf,hiddenGlobals as qi,F as ql,HTMLUnknownElement as qn,lastElementChild as qo,pointerEventsNone as qr,Event as qs,HTMLSlotElement as qt,gr as qu,hasReadonlyAttribute as r,RadioNodeList as ra,Ue as rc,Er as rd,virtualPerformance as rf,setAdoptedStyleSheets as ri,Rt as rl,HTMLAnchorElement as rn,Text as ro,windowInterfaces as rr,EventTarget as rs,SVGAElement as rt,jn as ru,isChecked as s,isLabelable as sa,qe as sc,kr as sd,v as sf,evaluateMediaQueryList as si,Vt as sl,HTMLBodyElement as sn,closest as so,VisualViewport as sr,retarget as ss,SVGDefsElement as st,Fn as su,Vf as t,HTMLFormControlsCollection as ta,Ve as tc,wr as td,skipZeroDelayWait as tf,registerOwnerSheet as ti,Lt as tl,MediaError as tn,Comment as to,Window as tr,AttrRecord as ts,createFileList as tt,An as tu,isEnabled as u,isSubmittable as ua,Ye as uc,W as ud,re as uf,_l as ui,Wt as ul,HTMLDataElement as un,querySelectorAll as uo,Navigator as ur,setUncaughtExceptionHandler as us,SVGEllipseElement as ut,Rn as uu,isReadOnly as v,supportsSelectionType as va,rt as vc,zr as vd,l as vf,CSSLayerBlockRule as vi,Zt as vl,HTMLHeadElement as vn,assignedSlot as vo,createEvent as vr,CustomEvent as vs,SVGLineElement as vt,Un as vu,MutationObserver as w,installEventHandlers as wa,ct as wc,Gr as wd,_e as wf,CSSPropertyRule as wi,rn as wl,HTMLMapElement as wn,ariaAttr as wo,cu as wr,PopStateEvent as ws,SVGPatternElement as wt,Yn as wu,isTextControl as x,Vo as xa,ot as xc,Hr as xd,fe as xf,CSSNamespaceRule as xi,en as xl,HTMLIFrameElement as xn,Y as xo,NodeIterator as xr,HashChangeEvent as xs,SVGMaskElement as xt,Kn as xu,isReadWrite as y,valueMode as ya,it as yc,Br as yd,xe as yf,CSSLayerStatementRule as yi,Qt as yl,HTMLHeadingElement as yn,findFlattenedSlottables as yo,Selection as yr,ErrorEvent as ys,SVGLinearGradientElement as yt,Wn as yu,HTMLMeterElement as z,isValidElementLocalName as za,Ct as zc,q as zd,oe as zf,dispatchTrusted as zi,vn as zl,HTMLTableCellElement as zn,indexGetterTable as zo,computedValue as zr,TextEvent as zs,SVGTextPositioningElement as zt,ur as zu};