@ctrl/dom 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{AsyncResource as e}from"node:async_hooks";import{clearTimeout as t,setTimeout as n}from"node:timers";import{addAbortListener as r}from"node:events";import{availableParallelism as i}from"node:os";var a=Object.defineProperty,__name=(e,t)=>a(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)a(n,r,{get:e[r],enumerable:!0});return t||a(n,Symbol.toStringTag,{value:`Module`}),n};const o=1,s=2,c=3,l=4,u=5,d=6,m=7,h=8,_=9,v=10,y=11,b=12,x=1,S=2,C=4,w=8,T=16,ee=32,E=`http://www.w3.org/1999/xhtml`,D=`http://www.w3.org/2000/svg`,te=`http://www.w3.org/1998/Math/MathML`,O=`http://www.w3.org/1999/xlink`,k=`http://www.w3.org/XML/1998/namespace`,ne=`http://www.w3.org/2000/xmlns/`,A=1,re=2,ie=4,ae=8,oe=16,se=32,ce=64,le=128,ue=256,de=512,fe=1024,pe=2048,me=4096,he=16384,ge=32768,_e=65536,ve=8192,ye=1<<17,be=1<<18,xe=1<<19,Se=1<<22,Ce=1<<20,we=1<<21,Te=3145728,Ee=1<<23,De=1<<24;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 defineInterfaceShape(e,t={}){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),setLength(e,Object.hasOwn(t,`constructor`)?t.constructor:0);for(let n of[e.prototype,e])for(let e of Object.getOwnPropertyNames(n)){if(e===`constructor`||e===`prototype`||e===`length`||e===`name`)continue;let r=Object.getOwnPropertyDescriptor(n,e);typeof r.value==`function`&&setLength(r.value,Object.hasOwn(t,e)?t[e]:0)}}function defineConstants(e,t){for(let n of Object.keys(t)){let r={value:t[n],writable:!1,enumerable:!0,configurable:!1};Object.defineProperty(e,n,r),Object.defineProperty(e.prototype,n,r)}}function setLength(e,t){e.length!==t&&Object.defineProperty(e,"length",{value:t,configurable:!0})}function hideInternals(e){for(let t of Reflect.ownKeys(e))(typeof t==`symbol`||t.charCodeAt(0)===95)&&Oe.call(e,t)&&Object.defineProperty(e,t,{enumerable:!1})}const Oe=Object.prototype.propertyIsEnumerable;function defineHidden(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,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 ke=globalThis.setTimeout,Ae=globalThis.clearTimeout,je=globalThis.setImmediate,Me=globalThis.queueMicrotask,Ne=process.nextTick,Pe=globalThis.performance,Fe=Pe.now.bind(Pe),Ie=process.getActiveResourcesInfo.bind(process),Le=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()-Fe(),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 Fe()+this.skipped}epochNow(){return Math.floor(this.epochOffset+Fe()+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&&(Ae(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=Fe()+t;let n=ke(()=>this.fireReal(e),t);n.unref?.(),e.real=n}toVirtualTrack(e){Ae(e.real),e.real=null,e.due=this.now()+Math.max(0,e.realDue-Fe()),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)Ae(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()}}}clearAll(){for(let e of this.byId.values())e.real!==null&&Ae(e.real),e.real=null,e.cleared=!0,e.index=-1;this.hostTimer!==null&&Ae(this.hostTimer),this.hostTimer=null,this.hostDue=1/0,this.heap.length=0,this.byId.clear(),this.refCount=0}dispose(){this.disposed=!0,this.clearAll(),j===this&&(j=null)}armHost(){if(this.disposed||this.continuation)return;let e=this.heap[0];e===void 0?(this.hostTimer!==null&&Ae(this.hostTimer),this.hostTimer=null,this.hostDue=1/0):(this.hostTimer!==null&&this.hostDue===e.due||(this.hostTimer!==null&&Ae(this.hostTimer),this.hostDue=e.due,this.hostTimer=ke(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=()=>{ze=Fe(),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,je(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,je(this.driverTurn))}get ownImmediates(){return+!!this.driverImmediate+ +!!this.continuation}driverTurn=()=>{if(ze=Fe(),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,ke(()=>{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&&Ae(this.hostTimer),this.hostTimer=null,this.hostDue=1/0;try{this.fireNext()}finally{this.kickDriver()}};busy(e=0){let t=Ie(),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 Ie()){if(n===`Timeout`||n===`Immediate`)continue;let r=e.indexOf(n);r===-1?(e.push(n),t.push(1)):t[r]++}}let j=null;function clockNow(){return j===null?Fe():j.now()}function queueUserAgentTask(e){j===null?n(e,0):j.schedule(e,0,[],!1)}const Re={setTimeout(e,t){return j===null?n(e,t):j.schedule(e,t,[],!1)},clearTimeout(e){j!==null&&j.clear(e)||t(e)}};function clockSkipping(){return j!==null}function skipIdleTime(e){return j===null||j.skipIdle(e)}function canSkipZeroDelayWait(e){let t=j;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)&&j.skipIdle(1)}function isClockTimer(e){return j!==null&&typeof e==`function`&&e[Le]===j}function foreignImmediatesPending(){let e=Ie(),t=0;for(let n=0;n<e.length;n++)e[n]===`Immediate`&&t++;return t>(j===null?0:j.ownImmediates)}let ze=0;function loopTurn(e){let t=j;t===null?realTurn(e):Me(()=>Ne(settleTurn,t,e))}function settleTurn(e,t){if(j===e&&Fe()-ze<=1&&e.busy(e.ownImmediates)===null){let n=e.heap[0];if(n===void 0||n.due>e.now()){t();return}}realTurn(t)}function realTurn(e){je(()=>{ze=Fe(),e()})}function clockSkipped(){return j===null?0:j.skipped}function clearActiveClockTimers(){j?.clearAll()}function clockStats(){return j===null?null:{skippedMs:j.skipped,pendingTimers:j.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)||Ae(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,Le,{value:e}),Object.defineProperty(i.setInterval,Le,{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??Pe)),j=e),{clock:e,uninstall(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),j===e&&(j=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 Be=Symbol.for(`ctrl-dom._proto__`),Ve=Symbol.for(`ctrl-dom.aboutBase`),He=Symbol.for(`ctrl-dom.active`),Ue=Symbol.for(`ctrl-dom.assocGen`),We=Symbol.for(`ctrl-dom.attr`),Ge=Symbol.for(`ctrl-dom.attributes`),Ke=Symbol.for(`ctrl-dom.availableToElementInternals`),qe=Symbol.for(`ctrl-dom.baseFor`),Je=Symbol.for(`ctrl-dom.baseOverride`),Ye=Symbol.for(`ctrl-dom.baseURL`),Xe=Symbol.for(`ctrl-dom.baseVersion`),Ze=Symbol.for(`ctrl-dom.benign`),M=Symbol.for(`ctrl-dom.block`),Qe=Symbol.for(`ctrl-dom.blockParsed`),$e=Symbol.for(`ctrl-dom.blockText`),et=Symbol.for(`ctrl-dom.byCtor`),tt=Symbol.for(`ctrl-dom.byName`),nt=Symbol.for(`ctrl-dom.cache`),rt=Symbol.for(`ctrl-dom.callback`),it=Symbol.for(`ctrl-dom.childNodes`),at=Symbol.for(`ctrl-dom.childWindows`),ot=Symbol.for(`ctrl-dom.children`),st=Symbol.for(`ctrl-dom.classList`),ct=Symbol.for(`ctrl-dom.clipboard`),lt=Symbol.for(`ctrl-dom.clonable`),ut=Symbol.for(`ctrl-dom.closed`),dt=Symbol.for(`ctrl-dom.compiled`),ft=Symbol.for(`ctrl-dom.compiledFor`),pt=Symbol.for(`ctrl-dom.condition`),mt=Symbol.for(`ctrl-dom.constructed`),ht=Symbol.for(`ctrl-dom.constructingEntryList`),gt=Symbol.for(`ctrl-dom.contentType`),_t=Symbol.for(`ctrl-dom.controlsCache`),vt=Symbol.for(`ctrl-dom.controlsDoc`),yt=Symbol.for(`ctrl-dom.coll`),bt=Symbol.for(`ctrl-dom.controlsVersion`),xt=Symbol.for(`ctrl-dom.cookieJar`),St=Symbol.for(`ctrl-dom.cookies`),Ct=Symbol.for(`ctrl-dom.css`),wt=Symbol.for(`ctrl-dom.current`),Tt=Symbol.for(`ctrl-dom.customElements`),Et=Symbol.for(`ctrl-dom.customValidity`),Dt=Symbol.for(`ctrl-dom.cx`),Ot=Symbol.for(`ctrl-dom.data`),kt=Symbol.for(`ctrl-dom.dataset`),At=Symbol.for(`ctrl-dom.declarative`),jt=Symbol.for(`ctrl-dom.defaultNamespace`),Mt=Symbol.for(`ctrl-dom.defaultValueOverride`),Nt=Symbol.for(`ctrl-dom.delegatesFocus`),Pt=Symbol.for(`ctrl-dom.devicePixelRatio`),Ft=Symbol.for(`ctrl-dom.dirtiness`),N=Symbol.for(`ctrl-dom.control`),It=Symbol.for(`ctrl-dom.disabled`),Lt=Symbol.for(`ctrl-dom.disallowModification`),Rt=Symbol.for(`ctrl-dom.derived`),zt=Symbol.for(`ctrl-dom.doc`),Bt=Symbol.for(`ctrl-dom.dropEffect`),P=Symbol.for(`ctrl-dom.ec`),Vt=Symbol.for(`ctrl-dom.effectAllowed`),F=Symbol.for(`ctrl-dom.el`),Ht=Symbol.for(`ctrl-dom.elements`),Ut=Symbol.for(`ctrl-dom.entries`),I=Symbol.for(`ctrl-dom.eo`),Wt=Symbol.for(`ctrl-dom.error`),Gt=Symbol.for(`ctrl-dom.externalFormNames`),Kt=Symbol.for(`ctrl-dom.file`),qt=Symbol.for(`ctrl-dom.files`),Jt=Symbol.for(`ctrl-dom.fill`),Yt=Symbol.for(`ctrl-dom.filter`),Xt=Symbol.for(`ctrl-dom.firingSubmissionEvents`),L=Symbol.for(`ctrl-dom.focused`),Zt=Symbol.for(`ctrl-dom.form`),Qt=Symbol.for(`ctrl-dom.formControlsVersion`),$t=Symbol.for(`ctrl-dom.formAttrSeen`),en=Symbol.for(`ctrl-dom.forLabels`),tn=Symbol.for(`ctrl-dom.forms`),nn=Symbol.for(`ctrl-dom.frameCallbacks`),rn=Symbol.for(`ctrl-dom.frameElement`),an=Symbol.for(`ctrl-dom.frameId`),sn=Symbol.for(`ctrl-dom.frameTask`),cn=Symbol.for(`ctrl-dom.frameTime`),ln=Symbol.for(`ctrl-dom.generation`),un=Symbol.for(`ctrl-dom.globalObject`),dn=Symbol.for(`ctrl-dom.hasTransients`),fn=Symbol.for(`ctrl-dom.height`),pn=Symbol.for(`ctrl-dom.history`),mn=Symbol.for(`ctrl-dom.home`),R=Symbol.for(`ctrl-dom.host`),hn=Symbol.for(`ctrl-dom.href`),gn=Symbol.for(`ctrl-dom.id`),_n=Symbol.for(`ctrl-dom.idleCallbacks`),vn=Symbol.for(`ctrl-dom.idleId`),yn=Symbol.for(`ctrl-dom.ids`),z=Symbol.for(`ctrl-dom.impl`),bn=Symbol.for(`ctrl-dom.implementation`),xn=Symbol.for(`ctrl-dom.index`),Sn=Symbol.for(`ctrl-dom.indexed`),Cn=Symbol.for(`ctrl-dom.inflight`),wn=Symbol.for(`ctrl-dom.info`),Tn=Symbol.for(`ctrl-dom.innerHeight`),En=Symbol.for(`ctrl-dom.innerWidth`),Dn=Symbol.for(`ctrl-dom.isHTML`),B=Symbol.for(`ctrl-dom.items`),On=Symbol.for(`ctrl-dom.keyText`),kn=Symbol.for(`ctrl-dom.kind`),An=Symbol.for(`ctrl-dom.labels`),jn=Symbol.for(`ctrl-dom.layerName`),Mn=Symbol.for(`ctrl-dom.list`),Nn=Symbol.for(`ctrl-dom.listeners`),Pn=Symbol.for(`ctrl-dom.localStorage`),Fn=Symbol.for(`ctrl-dom.location`),In=Symbol.for(`ctrl-dom.lockedForReset`),Ln=Symbol.for(`ctrl-dom.matches`),V=Symbol.for(`ctrl-dom.media`),Rn=Symbol.for(`ctrl-dom.mediaQueryLists`),zn=Symbol.for(`ctrl-dom.mode`),Bn=Symbol.for(`ctrl-dom.name`),Vn=Symbol.for(`ctrl-dom.names`),Hn=Symbol.for(`ctrl-dom.namespaces`),Un=Symbol.for(`ctrl-dom.navigator`),Wn=Symbol.for(`ctrl-dom.nodes`),Gn=Symbol.for(`ctrl-dom.onchange`),H=Symbol.for(`ctrl-dom.options`),Kn=Symbol.for(`ctrl-dom.owner`),qn=Symbol.for(`ctrl-dom.ownerNode`),Jn=Symbol.for(`ctrl-dom.ownerRule`),Yn=Symbol.for(`ctrl-dom.parent`),Xn=Symbol.for(`ctrl-dom.parentRule`),Zn=Symbol.for(`ctrl-dom.parentWindow`),Qn=Symbol.for(`ctrl-dom.pastNames`),$n=Symbol.for(`ctrl-dom.pointerBeforeReference`),er=Symbol.for(`ctrl-dom.prefix`),tr=Symbol.for(`ctrl-dom.prelude`),nr=Symbol.for(`ctrl-dom.presentationStyle`),rr=Symbol.for(`ctrl-dom.pseudo`),ir=Symbol.for(`ctrl-dom.queries`),ar=Symbol.for(`ctrl-dom.radios`),or=Symbol.for(`ctrl-dom.ranges`),sr=Symbol.for(`ctrl-dom.readonly`),cr=Symbol.for(`ctrl-dom.readyState`),lr=Symbol.for(`ctrl-dom.rebuildVersion`),ur=Symbol.for(`ctrl-dom.record`),dr=Symbol.for(`ctrl-dom.records`),fr=Symbol.for(`ctrl-dom.reference`),pr=Symbol.for(`ctrl-dom.result`),mr=Symbol.for(`ctrl-dom.root`),U=Symbol.for(`ctrl-dom.rules`),hr=Symbol.for(`ctrl-dom.running`),gr=Symbol.for(`ctrl-dom.runningFrame`),W=Symbol.for(`ctrl-dom.sc`),_r=Symbol.for(`ctrl-dom.screen`),vr=Symbol.for(`ctrl-dom.scrollRestoration`),yr=Symbol.for(`ctrl-dom.scrollX`),br=Symbol.for(`ctrl-dom.scrollY`),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`),G=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`),K=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.treeVersion`),Ur=Symbol.for(`ctrl-dom.type`),Wr=Symbol.for(`ctrl-dom.types`),Gr=Symbol.for(`ctrl-dom.updating`),Kr=Symbol.for(`ctrl-dom.updatingSelectedContent`),qr=Symbol.for(`ctrl-dom.uri`),q=Symbol.for(`ctrl-dom.url`),Jr=Symbol.for(`ctrl-dom.userActivation`),Yr=Symbol.for(`ctrl-dom.userValidity`),Xr=Symbol.for(`ctrl-dom.validity`),Zr=Symbol.for(`ctrl-dom.value`),J=Symbol.for(`ctrl-dom.version`),Qr=Symbol.for(`ctrl-dom.visualViewport`),$r=Symbol.for(`ctrl-dom.w`),ei=Symbol.for(`ctrl-dom.whatToShow`),ti=Symbol.for(`ctrl-dom.whenDefined`),ni=Symbol.for(`ctrl-dom.width`),Y=Symbol.for(`ctrl-dom.window`),ri=Symbol.for(`ctrl-dom.writeBuffer`),ii=Symbol.for(`ctrl-dom.x`),ai=Symbol.for(`ctrl-dom.xhr`),oi=Symbol.for(`ctrl-dom.y`),si=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=X[e];return X[e+4]&16?exposedWindow(t):t}function exposedWindow(e){return e[un]??e}const X=[],ci={top:0};let li=!1;function withInternalConstruct(e){let t=li;li=!0;try{return e()}finally{li=t}}function setInternalConstruct(e){let t=li;return li=e,t}function isInternalConstruct(){return li}var Event=class{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;#e;isTrusted=!1;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)}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=X[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=X[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=X[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.`);this._s.flags&64||initializeEvent(this,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._s,a=(i.flags|32)&-904;n&&(a|=256),r&&(a|=512),i.flags=a,e.isTrusted=!1,i.target=null,i.type=t}function setTrusted(e,t=!0){t?e._s.flags|=128:e._s.flags&=-129,e.isTrusted=t}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);let ui=0;function listenerSeqLimit(){return ui}var Listener=class{callback;flags;next;seq;id;constructor(e,t,n){this.callback=t,this.flags=n,this.next=null,this.seq=ui++,this.id=e}},SignalListener=class extends Listener{target;signal;ref;constructor(e,t,n,r,i){super(e,t,n|16),this.target=r,this.signal=i,this.ref=new AbortRef(this)}},AbortRef=class extends WeakRef{signal;previous=null;next;constructor(e){super(e);let t=e.signal;this.next=di.get(t)??null,this.next===null?this.signal=new WeakRef(t):(this.signal=this.next.signal,this.next.previous=this),di.set(t,this),fi.register(e,this,this)}};const di=/* @__PURE__ */ new WeakMap,fi=new FinalizationRegistry(e=>{let t=e.signal.deref();t!==void 0&&dropAbortStep(t,e)});function dropAbortStep(e,t){t.previous===null?t.next===null?(di.delete(e),e.removeEventListener(`abort`,runAbortSteps)):di.set(e,t.next):t.previous.next=t.next,t.next!==null&&(t.next.previous=t.previous),t.previous=t.next=null}function runAbortSteps(){if(!this.aborted){r(this,runAbortSteps);return}let e=di.get(this)??null;if(e!==null){for(;e.next!==null;)e=e.next;for(;e!==null;){let t=e.previous,n=e.deref();n!==void 0&&removeListener(n.target,n),e=t}}}function listenerAborted(e){return!!(e.flags&16)&&e.signal.aborted}const pi=/* @__PURE__ */ new Map;function idForType(e){let t=pi.get(e);return t===void 0&&(t=pi.size,pi.set(e,t)),t}function typeIdOf(e){let t=pi.get(e);return t===void 0?-1:t}function firstListener(e,t){if(!Array.isArray(e))return e.id===t?e:void 0;let n=e.length;if(n<=4){for(let r=0;r<n;r++)if(e[r].id===t)return e[r]}else return t>>>0<n?e[t]:void 0}function setFirstListener(e,t,n,r){if(!Array.isArray(t)){t.id===n?e[Nn]=r:r!==void 0&&(e[Nn]=[t,r]);return}let i=t.length;if(i>4)t[n]=r;else{for(let a=0;a<i;a++)if(t[a].id===n){r===void 0?i===2?e[Nn]=t[1-a]:t.splice(a,1):t[a]=r;return}if(r!==void 0){if(i<4){let n=Array(i+1);for(let e=0;e<i;e++)n[e]=t[e];n[i]=r,e[Nn]=n}else{let i=[];for(let e of t)i[e.id]=e;i[n]=r,e[Nn]=i}}}}function eachHead(e,t){if(!Array.isArray(e))return t(e);for(let n of e)n!==void 0&&t(n)}function flattenCapture(e){return typeof e==`boolean`?e:e==null?!1:typeof e!=`object`&&typeof e!=`function`?!!e:!!e.capture}function defaultPassiveValue(e,t){if(e!==`touchstart`&&e!==`touchmove`&&e!==`wheel`&&e!==`mousewheel`)return!1;let n=t,r=n[z];if(r===void 0){let e=n.document;return e!=null&&e[Y]===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){if(r===null||typeof r!=`object`&&typeof r!=`function`){if(n==null)return;checkCallback(n,`addEventListener`),addFlattened(e,t,n,!!r,!1,null,null);return}let i=!!r.capture,a=!!r.once,o=r.passive,s=r.signal;if(s!==void 0){if(typeof s!=`object`||!s||typeof s.aborted!=`boolean`||typeof s.addEventListener!=`function`)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': member signal is not of type 'AbortSignal'.`);if(s.aborted)return}n!=null&&(checkCallback(n,`addEventListener`),addFlattened(e,t,n,i,a,o===void 0?null:!!o,s??null))}function addFlattened(e,t,n,i,a,o,s){let c=+!!i,l=idForType(t),u=e[Nn],d=u==null?void 0:firstListener(u,l);if(d!==void 0)for(;;){if(d.callback===n&&(d.flags&1)===c)return listenerAborted(d)?(removeListener(e,d),addFlattened(e,t,n,i,a,o,s)):void 0;let r=d.next;if(r===null)break;d=r}let m=c|(a?2:0)|((o===null?defaultPassiveValue(t,e):o)?4:0),h=s===null?new Listener(l,n,m):new SignalListener(l,n,m,e,s);d===void 0?u==null?e[Nn]=h:setFirstListener(e,u,l,h):d.next=h,s!==null&&h.ref.next===null&&r(s,runAbortSteps)}function removeEventListener(e,t,n,r){let i=+!!flattenCapture(r);if(n==null)return;checkCallback(n,`removeEventListener`);let a=e[Nn];if(a==null)return;let o=typeIdOf(t),s=null;for(let t=firstListener(a,o)??null;t!==null;s=t,t=t.next)if(t.callback===n&&(t.flags&1)===i){unlink$1(e,a,o,s,t);return}}function removeListener(e,t){if(t.flags&8)return;let n=e[Nn];if(n!=null){let r=t.id,i=null;for(let a=firstListener(n,r)??null;a!==null;i=a,a=a.next)if(a===t){unlink$1(e,n,r,i,a);return}}t.flags|=8}function unlink$1(e,t,n,r,i){markRemoved(i),r===null?setFirstListener(e,t,n,i.next??void 0):r.next=i.next}__name(unlink$1,`unlink`);function markRemoved(e){if(e.flags|=8,e.flags&16){let t=e;fi.unregister(t.ref),dropAbortStep(t.signal,t.ref)}}function removeAllEventListeners(e){let t=e[Nn];t!=null&&(e[Nn]=null,eachHead(t,e=>{for(let t=e;t!==null;t=t.next)markRemoved(t)}))}function hasListeners(e,t){let n=e[Nn];return n!=null&&firstListener(n,typeIdOf(t))!==void 0}function reusableElement(e,t){let n=e[z];return n===void 0||n.parent!==null||n.first!==null||n.attrs!==null||n.flags&2048||e[G]!=null?!1:listenerCount(e)===t}function listenerCount(e){let t=e[Nn];if(t==null)return 0;let n=0;return eachHead(t,e=>{for(let t=e;t!==null;t=t.next)n++}),n}function hasAnyListener(e){let t=e[Nn];if(t==null)return!1;let n=!1;return eachHead(t,()=>{n=!0}),n}const mi=/* @__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(`.`),hi=/* @__PURE__ */ new Map;for(let e=1;e<mi.length;e++)hi.set(mi[e],e);function tagId(e){return hi.get(e)??0}function tagName(e){return mi[e]??``}const Z=Object.fromEntries(mi.map((e,t)=>[e,t])),gi=/* @__PURE__ */ new Uint8Array(256);for(let e of[Z.a,Z.area,Z.button,Z.input,Z.label,Z.summary])gi[e]=1;function mayHaveActivationBehavior(e){return gi[e]===1}const ifaceName=e=>typeof e==`string`?e:e.name;function requireArgs$1(e,t,n){if(e<t)throw TypeError(`Failed to construct '${ifaceName(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[Y]===e}function viewMember(e,t){if(e==null)return null;if(!isWindow(e))throw TypeError(`Failed to construct '${ifaceName(t)}': member view is not of type Window.`);return e}function targetMember(e){return e??null}const _i=Object.freeze({}),vi=/* @__PURE__ */ __name((e,t)=>e===void 0?t:toDOMString(e),`str`),yi=/* @__PURE__ */ __name((e,t=0)=>e===void 0?t:toLong(e),`long`),bi=/* @__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 '${ifaceName(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 '${ifaceName(n)}': member ${t}`)},xi=[[`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.altKey&&(t|=4),e.ctrlKey&&(t|=1),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),e.shiftKey&&(t|=2),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=xi.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),super(e,t);let n=t??_i;this.#t=yi(n.detail),this.#e=viewMember(n.view,new.target),this.#n=bi(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,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),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),super(e,t);let n=t??_i,r=new.target;this.#i=modifiers(n);let i=n.button;this.#a=i===void 0?0:toShort(i);let a=n.buttons;this.#o=a===void 0?0:toUnsignedShort(a),this.#n=double(n.clientX,`clientX`,r),this.#r=double(n.clientY,`clientY`,r),this.#s=double(n.movementX,`movementX`,r),this.#c=double(n.movementY,`movementY`,r);let o=this._s;o.relatedTarget=targetMember(n.relatedTarget),this.#e=double(n.screenX,`screenX`,r),this.#t=double(n.screenY,`screenY`,r),o.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 Si=180/Math.PI,Ci=Object.freeze([]);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*Si),Math.round(r*Si)]}function tilt2spherical(e,t){let n=e/Si,r=t/Si,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),super(e,t);let n=t??_i,r=new.target,i=n.altitudeAngle,a=double(i,`altitudeAngle`,r,Math.PI/2),o=n.azimuthAngle,s=double(o,`azimuthAngle`,r,0),c=n.coalescedEvents;this.#p=c==null?Ci:Array.from(c),this.#n=double(n.height,`height`,r,1),this.#d=!!n.isPrimary,this.#f=yi(n.persistentDeviceId),this.#e=yi(n.pointerId),this.#u=vi(n.pointerType,``);let l=n.predictedEvents;this.#m=l==null?Ci:Array.from(l),this.#r=float(n.pressure,`pressure`,r),this.#i=float(n.tangentialPressure,`tangentialPressure`,r);let u=n.tiltX,d=yi(u),m=n.tiltY,h=yi(m);this.#s=yi(n.twist),this.#t=double(n.width,`width`,r,1);let _=u!==void 0||m!==void 0,v=i!==void 0||o!==void 0;_&&!v?[a,s]=tilt2spherical(d,h):v&&!_&&([d,h]=spherical2tilt(a,s)),this.#a=d,this.#o=h,this.#c=a,this.#l=s}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),super(e,t);let n=t??_i,r=new.target;this.#r=bi(n.deltaMode),this.#e=double(n.deltaX,`deltaX`,r),this.#t=double(n.deltaY,`deltaY`,r),this.#n=double(n.deltaZ,`deltaZ`,r)}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),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),super(e,t);let n=t??_i;this.#r=modifiers(n),this.#o=bi(n.charCode),this.#t=vi(n.code,``),this.#a=!!n.isComposing,this.#e=vi(n.key,``),this.#s=bi(n.keyCode),this.#n=bi(n.location),this.#i=!!n.repeat}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),super(e,t);let n=t??_i,r=n.data;this.#e=r==null?null:toDOMString(r),this.#r=n.dataTransfer??null,this.#n=vi(n.inputType,``),this.#t=!!n.isComposing}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),super(e,t),this.#e=vi((t??_i).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.#f=double(t.altitudeAngle,`altitudeAngle`,n),this.#p=double(t.azimuthAngle,`azimuthAngle`,n),this.#n=double(t.clientX,`clientX`,n),this.#r=double(t.clientY,`clientY`,n),this.#d=float(t.force,`force`,n),this.#e=toLong(t.identifier),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.#i=double(t.screenX,`screenX`,n),this.#a=double(t.screenY,`screenY`,n),this.#t=t.target,this.#m=vi(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 wi=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(wi);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),super(e,t);let n=t??_i;this.#r=modifiers(n),this.#n=wi._create(touchSequence(n.changedTouches,`changedTouches`)),this.#t=wi._create(touchSequence(n.targetTouches,`targetTouches`)),this.#e=wi._create(touchSequence(n.touches,`touches`)),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),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,wi,TouchEvent,ClipboardEvent);const get=(e,t)=>e?.[t],Ti=/* @__PURE__ */ __name((e,t,n=``)=>{let r=get(e,t);return r===void 0?n:toDOMString(r)},`str`),Ei=/* @__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:typeof r==`number`&&Number.isFinite(r)?r:toDouble(r,`Failed to construct '${n.name}': 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),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,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),super(e,t);let n=t;this.#e=Ti(n,`message`),this.#t=Ti(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);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),super(e,t);let n=t,r=get(n,`data`);this.#e=r===void 0?null:r,this.#t=Ti(n,`origin`),this.#n=Ti(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,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),super(e,t),this.#e=!!get(t,`lengthComputable`),this.#t=dbl(t,`loaded`,new.target),this.#n=dbl(t,`total`,new.target)}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),super(e,t),this.#e=Ti(t,`animationName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=Ti(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),super(e,t),this.#e=Ti(t,`propertyName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=Ti(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),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),super(e,t),this.#e=Ti(t,`oldURL`),this.#t=Ti(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),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),super(e,t),this.#e=Ei(t,`key`),this.#t=Ei(t,`oldValue`),this.#n=Ei(t,`newValue`),this.#r=Ti(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,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),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);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),super(e,t),this.#e=Ti(t,`oldState`),this.#t=Ti(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),super(e,t),this.#e=!!get(t,`wasClean`);let n=get(t,`code`);this.#t=n===void 0?0:toUnsignedShort(n),this.#n=Ti(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 Di=null;function setCurrentWindow(e){Di=e}function currentWindow(){if(Di===null)throw TypeError(`No active @ctrl/dom window. Create one with createWindow().`);return Di}function currentDocument(){return currentWindow().document}function currentWindowOrNull(){return Di}function defaultUncaughtExceptionHandler(e){let t=typeof e==`object`&&e?e.stack:void 0;console.error(typeof t==`string`?t:`Uncaught ${String(e)}`)}let Oi=defaultUncaughtExceptionHandler;function setUncaughtExceptionHandler(e){Oi=e??defaultUncaughtExceptionHandler}const ki=/* @__PURE__ */ new WeakSet;function windowFor(e){if(e!==null){let t=e;if(t[z]!==void 0)return t[z].doc[Y];let n=t.document;if(n!=null&&n[Y]===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||ki.has(n)){Oi(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),ki.add(n);let s=!1;try{s=!dispatch(o,n)}finally{ki.delete(n)}s||Oi(e,o)}__name(reportException$1,`reportException`);function noteChangeDispatch(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:e.node[Yr]=!0}}function hasUserValidity(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:return e.node[Yr]===!0}return!1}function setUserValidity(e,t){switch(e.tag){case Z.input:case Z.textarea:case Z.select:(t||hasUserValidity(e))&&(e.node[Yr]=t)}}let Ai;function getCurrentEvent(){return Ai}let ji=null;function setPostDispatchHook(e){ji=e}let Mi=null;function setAssignedSlotLookup(e){Mi=e}const Ni=[];function listenerHead(e,t){let n=e[Nn];return n==null?void 0:firstListener(n,t)}function assignedSlot$1(e){if(Mi===null)return null;let t=e.parent;return t===null||!(t.flags&512)||e.type!==1&&e.type!==3?null:Mi(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 nodeParentOf(e,t,n){let r=e.parent;if(r!==null&&r.flags&512){let t=assignedSlot$1(e);if(t!==null)return t}if(e.flags&32){let r=n._s;if(!(r.flags&16)&&r.pathLength>0){let t=X[r.pathStart][z];if(t!==void 0&&treeRoot$1(t)===e)return null}return t[R]}return r?.node??null}function nodeGetTheParent(e,t){return nodeParentOf(e[z],e,t)}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[R];n=e===null||e[z]===void 0?null:e[z]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$4,`isShadowIncludingInclusiveAncestor`);function inShadowTree(e){if(e===null)return!1;let t=e[z];return t!==void 0&&!!(treeRoot$1(t).flags&32)}function retarget(e,t){for(;;){if(e===null)return null;let n=e[z];if(n===void 0)return e;let r=treeRoot$1(n);if(!(r.flags&32))return e;let i=t[z];if(i!==void 0&&isShadowIncludingInclusiveAncestor$4(r,i))return e;e=r.node[R]}}function retargetList(e,t){let n=[];for(let r=0;r<e.length;r++)n.push(retarget(e[r],t));return n}function isWindowInstance(e){return e[un]!==void 0}function hasActivationBehavior(e,t){return t!==void 0&&mayHaveActivationBehavior(t.tag)&&e._hasActivationBehavior===!0}function appendToEventPath(e,t,n,r,i,a){let o=ci.top,s=0;a!==null&&a.flags&32&&(s|=1,e[z]===a&&e.mode===`closed`&&(s|=2)),i&&(s|=4),X[o]=e,t===null?X[o+1]=X[o+1-5]:(s|=8,X[o+1]=t),X[o+2]=n,X[o+3]=r,X[o+4]=s,ci.top=o+5}function appendLight(e){let t=ci.top;X.length<t+5&&growPath(t+5),X[t]=e,X[t+1]=X[t+1-5],X[t+4]=0,ci.top=t+5}function growPath(e){for(;X.length<e;)X.push(null)}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,c=r.relatedTarget,l=inShadowTree(c),u=l?retarget(c,t):c,d=!1,m=ci.top,h=!1;try{if(t!==u||t===c){let n=r.flags&2048?e._touchTargetList():null;h=c===null&&n===null,r.pathStart=m,r.pathLength=0;let i=t[z],_=i===void 0?null:treeRoot$1(i),v=_,y=v!==null&&!!(v.flags&32),b=i===void 0&&isWindowInstance(t);appendToEventPath(t,b?exposedWindow(t):a,u,n===null?null:retargetList(n,t),!1,_),b&&(X[m+4]=X[m+4]|16),r.pathLength=1;let x=m,S=!!(r.flags&1024)&&r.type===`click`,C=!!(r.flags&256);S&&hasActivationBehavior(t,i)&&(o=t);let w=i!==void 0&&isAssigned(i),T=!1;i!==void 0&&r.type===`change`&¬eChangeDispatch(i);let ee=t,E=i;for(;;){let r,i,a;if(E===void 0||E.type===9)r=ee._getTheParent(e),i=r===null?void 0:r[z],a=!1;else{let t=E.parent;t!==null&&!(t.flags&512)?(r=t.node,i=t,a=!0):(r=nodeParentOf(E,ee,e),i=r===null?void 0:r[z],a=i!==void 0&&i===t)}if(r===null)break;let s=i===void 0?null:a?_:treeRoot$1(i);w&&(w=!1,s!==null&&s.flags&32&&s.node.mode===`closed`&&(T=!0)),i!==void 0&&isAssigned(i)&&(w=!0),u=l?retarget(c,r):c;let d=n===null?null:retargetList(n,r);if(i===void 0||v!==null&&(!y||isShadowIncludingInclusiveAncestor$4(v,i)))S&&C&&o===null&&hasActivationBehavior(r,i)&&(o=r),h&&(s===null||!(s.flags&32))?appendLight(r):appendToEventPath(r,null,u,d,T,s),i===void 0&&isWindowInstance(r)&&(X[ci.top-5+4]=X[ci.top-5+4]|16);else if(r===u)break;else t=r,v=s,y=v!==null&&!!(v.flags&32),S&&o===null&&hasActivationBehavior(t,i)&&(o=t),x=ci.top,appendToEventPath(r,t,u,d,T,s);ee=r,E=i,_=s,T=!1}let D=ci.top;r.pathLength=(D-m)/5;{let e=x;if(inShadowTree(X[e+1])||inShadowTree(X[e+2]))d=!0;else{let t=X[e+3];if(t!==null)for(let e=0;e<t.length;e++)inShadowTree(t[e])&&(d=!0)}}o!==null&&(s=o._legacyPreActivationBehavior?.());let te=typeIdOf(r.type),O=r.flags&128?legacyType(r.type):null;if(te===-1&&O!==null&&typeIdOf(O)!==-1&&(te=idForType(r.type)),te!==-1){let t=listenerSeqLimit(),n=!1;for(let t=D-5;t>=m;t-=5){let i=listenerHead(X[t],te);if(Ni[t]=i,(i!==void 0||O!==null)&&(r.eventPhase=X[t+4]&8?2:1,invoke$1(e,r,t,i,1,O),r.flags&1)){n=!0;break}}if(!n)for(let n=m;n<D;n+=5){let i=X[n+4];if(!(i&8)&&!C)continue;let a=listenerSeqLimit()===t?Ni[n]:listenerHead(X[n],te);if((a!==void 0||O!==null)&&(r.eventPhase=i&8?2:3,invoke$1(e,r,n,a,3,O),r.flags&1))break}}let k=C?D-5:x;r.target=X[k+1],r.relatedTarget=X[k+2],r.touchTargets=X[k+3]}}finally{for(let e=m,t=ci.top;e<t;e+=5)X[e]=null,X[e+1]=null,Ni[e]=void 0,h||(X[e+2]=null,X[e+3]=null);ci.top=m,r.eventPhase=0,r.currentTarget=null,r.pathStart=-1,r.pathLength=0,r.flags&=-76}if(d&&(r.target=null,r.relatedTarget=null,r.touchTargets=null),o!==null){let t=o;r.flags&4?t._legacyCanceledActivationBehavior?.(s):t._activationBehavior?.(e,s)}return ji!==null&&ji(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,i,a){let o=X[n];if(t.target=X[n+1],t.relatedTarget=X[n+2],t.touchTargets=X[n+3],t.flags&1)return;let s=X[n+4],c=s&16?exposedWindow(o):o;t.currentTarget=c;let l=!!(s&1);if(!(r!==void 0&&innerInvoke(e,t,o,c,r,i,l))&&a!==null){let n=listenerHead(o,typeIdOf(a));if(n===void 0)return;let r=t.type;t.type=a;try{innerInvoke(e,t,o,c,n,i,l)}finally{t.type=r}}}__name(invoke$1,`invoke`);function innerInvoke(e,t,n,r,i,a,o){let s=!1,c=listenerSeqLimit();for(let l=i;l!==null&&l.seq<c;l=l.next){let i=l.flags;if(i&8||listenerAborted(l)||(s=!0,i&1?a!==1:a===1))continue;i&2&&removeListener(n,l);let c=Ai;o||(Ai=e),i&4&&(t.flags|=8);let u=l.callback;try{if(typeof u==`function`)u.call(r,e);else{let t=u.handleEvent;if(typeof t!=`function`)throw TypeError(`The provided callback is not a function and has no callable 'handleEvent' property.`);t.call(u,e)}}catch(e){reportException$1(e,n)}if(t.flags&=-9,Ai=c,t.flags&2)break}return s}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 setTrusted(e,!1),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}let Pi=null;function setElementClassLookup(e){Pi=e}function createElementImpl(e,t,n,r){return new(Pi(t,n))(e,t,n,r)[z]}let Fi=!1,Ii=null;function setCEReactionsPending(e){Fi=e}function setCEReactionsFlush(e){Ii=e}function flushCEReactions(){Ii!==null&&Ii()}let Li=null;function setCustomElementCreate(e){Li=e}function createElementImplSync(e,t,n,r,i){if(Li!==null){let a=Li(e,t,n,r,i);if(a!==null)return a}return createElementImpl(e,t,n,r)}let Ri=!1;function setCEActive(){Ri=!0}let zi=null,Bi=null;function setCustomElementCloneHooks(e,t){zi=e,Bi=t}function createCloneElementImpl(e,t){return zi(e,t)}function ceParserCreated(e){Bi(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 Vi=Array.prototype.forEach,Hi={forEach(e,t){if(this===null||this===void 0)return Vi.call(this,e,t);let n=Object(this),r=Math.min(Math.max(Math.trunc(Number(n.length))||0,0),2**53-1);if(typeof e!=`function`)Vi.call(n,e,t);else for(let i=0;i<r;i++)i in n&&e.call(t,n[i],i,n)}}.forEach,Ui=/* @__PURE__ */ new Map;function lazyItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}var Wi=class NodeList{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=0;let n=new.target!==NodeList;this.#n=n,n&&!Ui.has(new.target.prototype)&&Ui.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=Ui.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 Gi={values(){return Wi._values(this)}}.values;Object.defineProperties(Wi.prototype,{forEach:{value:Hi,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:Gi,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Gi,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NodeList`,configurable:!0}});const Ki=[];var qi=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??Ki,this.#o=o??Ki,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??=Wi._staticFromImpls(this.#a)}get removedNodes(){return this.#c??=Wi._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(qi.prototype,Symbol.toStringTag,{value:`MutationRecord`,configurable:!0});let Ji=0;function setActiveObservers(e){Ji=e}let Yi=0;function setSubtreeObservers(e){Yi=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 Xi=/* @__PURE__ */ new WeakMap;function registeredObserverList(e){return e.flags&2048?Xi.get(e)??null:null}function addRegistration(e,t){let n=registeredObserverList(e);n===null&&(n=[],Xi.set(e,n),e.flags|=pe),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&&(Xi.delete(e),e.flags&=-2049)}let Zi=[],Qi=[],$i=!1;function queueMutationRecord(e,t,n,r,i,a,o,s,c){let l=null,u=null,d=Yi!==0;for(let a=t;a!==null;a=d?a.parent:null){if(!(a.flags&2048))continue;let o=Xi.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 qi(m,t,n,r,u[e],a,o,s,c),h=i[dr];h.length===0&&!Zi.includes(i)&&Zi.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(Yi!==0)for(let n=e;n!==null;n=n.parent){if(!(n.flags&2048))continue;let e=Xi.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[Wn].push(t),i[dn]=!0,Zi.includes(i)||Zi.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){Qi.includes(e)||Qi.push(e),queueMutationObserverMicrotask()}function queueMutationObserverMicrotask(){$i||($i=!0,queueMicrotask(notifyMutationObservers))}function notifyMutationObservers(){$i=!1;let e=Zi;Zi=[],e.length>1&&e.sort((e,t)=>e[gn]-t[gn]);let t=Qi;Qi=[];for(let t=0;t<e.length;t++){let n=e[t],r=n[dr];if(n[dr]=[],removeTransientRegistrations(n),r.length!==0)try{n[rt].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[dn])return;e[dn]=!1;let t=[],n=e[Wn];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[Wn]=t}function dropPending(e){let t=Zi.indexOf(e);t!==-1&&Zi.splice(t,1)}let ea=0,ta=0,na=[];function homeOf(e){return e.doc}function file(e,t){let n=e[or];n===null?n=e[or]={refs:[],sweepAt:64}:n.refs.length>=n.sweepAt&&(compact(e,n),n.sweepAt=Math.max(64,n.refs.length*2)),n.refs.push(t),ea++}function markBoundary(e){e.flags&1048576||(e.flags|=Ce,e.parent!==null&&markRangeAncestors(e.parent))}function markRangeAncestors(e){for(let t=e;t!==null&&!(t.flags&2097152);t=t.parent)t.flags|=we}function registerLiveRange(e){markBoundary(e[W]),markBoundary(e[P]);let t=homeOf(e[W]);e[mn]=t,file(t,new WeakRef(e))}function refileRange(e){markBoundary(e[W]),markBoundary(e[P]);let t=homeOf(e[W]);e[mn]!==t&&e[mn]!==null&&(e[mn]=t,file(t,new WeakRef(e)))}let ra=64;function registerNodeIterator(e){if(na.length>=ra){let e=0;for(let t=0;t<na.length;t++)na[t].deref()!==void 0&&(na[e++]=na[t]);na.length=e,ra=Math.max(64,e*2)}na.push(new WeakRef(e)),ta=na.length}function compact(e,t,n){let r=t.refs,i=0;for(let t=0;t<r.length;t++){let a=r[t].deref();a!==void 0&&a[mn]===e&&(r[i++]=r[t],n?.(a))}ea-=r.length-i,r.length=i}function updateLiveRanges(e,t){let n=homeOf(e),r=n[or];if(r===null)return;compact(n,r,t);let i=r.refs.length;i===0?n[or]=null:r.sweepAt>64&&i*4<r.sweepAt&&(r.sweepAt=Math.max(64,i*2))}function rangesAdopt(e,t){let n=t,r=homeOf(e),i=n[or];if(i===null||n===r)return;let a=i.refs,o=0;for(let t=0;t<a.length;t++){let i=a[t].deref();i===void 0||i[mn]!==n?ea--:isInclusiveAncestor(e,i[W])||isInclusiveAncestor(e,i[P])?(i[mn]=r,ea--,file(r,a[t])):a[o++]=a[t]}a.length=o,o===0&&(n[or]=null)}function rangesAfterInsert(e,t,n){updateLiveRanges(e,r=>{r[W]===e&&r[K]>t&&(r[K]+=n),r[P]===e&&r[I]>t&&(r[I]+=n)})}function rangesBeforeRemove(e,t,n){updateLiveRanges(t,r=>{isInclusiveAncestor(e,r[W])&&(r[W]=t,r[K]=n,markBoundary(t)),isInclusiveAncestor(e,r[P])&&(r[P]=t,r[I]=n,markBoundary(t)),r[W]===t&&r[K]>n&&r[K]--,r[P]===t&&r[I]>n&&r[I]--})}function rangesReplaceData(e,t,n,r){let i=t+n;updateLiveRanges(e,a=>{a[W]===e&&a[K]>t&&a[K]<=i&&(a[K]=t),a[P]===e&&a[I]>t&&a[I]<=i&&(a[I]=t),a[W]===e&&a[K]>i&&(a[K]+=r-n),a[P]===e&&a[I]>i&&(a[I]+=r-n)})}function rangesSplitText(e,t,n,r){let i=indexOf(e);updateLiveRanges(e,a=>{a[W]===e&&a[K]>n&&(a[W]=t,a[K]-=n,markBoundary(t)),a[P]===e&&a[I]>n&&(a[P]=t,a[I]-=n,markBoundary(t)),a[W]===r&&a[K]===i+1&&a[K]++,a[P]===r&&a[I]===i+1&&a[I]++})}function rangesNormalizeMerge(e,t,n){let r=t.parent,i=indexOf(t);updateLiveRanges(e,a=>{markBoundary(e),a[W]===t&&(a[K]+=n,a[W]=e),a[P]===t&&(a[I]+=n,a[P]=e),a[W]===r&&a[K]===i&&(a[W]=e,a[K]=n),a[P]===r&&a[I]===i&&(a[P]=e,a[I]=n)})}function iteratorsBeforeRemove(e){let t=0,n=e.doc;for(let r=0;r<na.length;r++){let i=na[r].deref();i!==void 0&&(na[t++]=na[r],i[mr].doc===n&&(preRemovingSteps(i,i,e),i[Cn]!==null&&preRemovingSteps(i,i[Cn],e)))}na.length=t,ta=t}function preRemovingSteps(e,t,n){if(!isInclusiveAncestor(n,t[fr])||isInclusiveAncestor(n,e[mr]))return;if(t[$n]){let r=nextSkippingChildren(n,e[mr]);if(r!==null){t[fr]=r;return}t[$n]=!1}let r=n.prev;if(r===null)t[fr]=n.parent;else{let e=r;for(;e.last!==null;)e=e.last;t[fr]=e}}const ia=/* @__PURE__ */ new WeakMap;function noteInlineStyle(e,t){ia.set(e,(ia.get(e)??0)+t)}function inlineStyleCount(e){return ia.get(e)??0}const aa=/* @__PURE__ */ new Set;let oa=!1;function ariaOrData(e){if(e.length<6||e.charCodeAt(4)!==45)return!1;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97}let sa=!1;function noteStyleRecordCached(){sa=!0}function noteSelectorAttribute(e){ariaOrData(e)&&(aa.add(e),oa=!0)}function styleBlindAttribute(e){return ariaOrData(e)&&(!oa||!aa.has(e))}const ca=[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`],la=/* @__PURE__ */ new Map;for(let e=0;e<ca.length;e++)la.set(ca[e],e);function inputTypeFromAttr(e){if(e===null)return 1;let t=la.get(e);return t===void 0?la.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===Z.input||t===Z.button||t===Z.select||t===Z.textarea||t===Z.fieldset||t===Z.output||t===Z.object}function isSubmittable(e){let t=e.tag;return!!(e.flags&16384)||t===Z.input||t===Z.button||t===Z.select||t===Z.textarea}function isResettable(e){let t=e.tag;return!!(e.flags&16384)||t===Z.input||t===Z.select||t===Z.textarea||t===Z.output}function isLabelable(e){switch(e.tag){case Z.button:case Z.meter:case Z.output:case Z.progress:case Z.select:case Z.textarea:return!0;case Z.input:return inputType(e)!==0}return!!(e.flags&he)}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(e.flags&16777216&&e.tag!==Z.form){let t=ua.get(e),n=t.deref();if(n!==void 0&&ua.get(n)===t&&(e.tag===Z.img||attr(e,`form`)===null)&&treeRoot(e)===treeRoot(n))return n;clearParserAssociation(e)}if(e.tag!==Z.img){let t=attr(e,`form`);if(t!==null&&e.flags&1){let n=elementByIdInTree(e,t);return n!==null&&n.tag===Z.form?n:null}}for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Z.form)return t;return null}const ua=/* @__PURE__ */ new WeakMap;function parserAssociateForm(e,t){if(t.tag!==Z.form)return;let n=ua.get(t);n===void 0&&ua.set(t,n=new WeakRef(t)),ua.set(e,n),e.doc[Qt]++,e.flags|=16777220,t.flags|=16777220}function clearParserAssociation(e){e.flags&16777216&&(e.flags&=-16777217,ua.delete(e))}function formOwnerScope(e,t){return!(e.flags&16777216)&&(!t||e.id===``||!e.doc[$t])?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!==Z.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===Z.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===Z.fieldset&&attr(n,`disabled`)!==null){if(t.tag===Z.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 Z.button:case Z.input:case Z.select:case Z.textarea:case Z.fieldset:return attr(e,`disabled`)!==null||inDisabledFieldset(e);case Z.optgroup:return attr(e,`disabled`)!==null;case Z.option:{if(attr(e,`disabled`)!==null)return!0;let t=e.parent;return t!==null&&t.tag===Z.optgroup&&attr(t,`disabled`)!==null}}return!1}function hasDatalistAncestor(e){for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Z.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 radioIndexAdd(e,t,n){let r=e.get(t);r===void 0?e.set(t,(/* @__PURE__ */ new Set()).add(n)):r.add(n)}function radioIndexRemove(e,t,n){let r=e.get(t);r.size===1?e.delete(t):r.delete(n)}function labelsFor(e){let t=[];if(e.id!==``&&!(e.flags&1)){let n=treeRoot(e);for(let r=n.type===1?n:nextElementInTree(n,n);r!==null;r=nextElementInTree(r,n))r.tag===Z.label&&labeledControl(r)===e&&t.push(r);return t}for(let n=e.parent;n!==null;n=n.parent)n.tag===Z.label&&attr(n,`for`)===null&&labeledControl(n)===e&&t.unshift(n);let n=e.id===``?void 0:e.doc[en]?.get(e.id);if(n===void 0)return t;if(Array.isArray(n))for(let r of n)labeledControl(r)===e&&t.push(r);else labeledControl(n)===e&&t.push(n);return t.length>1&&t.sort(compareTreeOrder),t}var PastName=class extends WeakRef{history;names;constructor(e,t,n){super(n),this.history=e,this.names=t}};const da=/* @__PURE__ */ new WeakMap;function markNamedAncestors(e){for(let t=e;t!==null&&!(t.flags&8388608);t=t.parent)t.flags|=Ee}function rememberName(e,t,n){let r=e[Qn]??=/* @__PURE__ */ new Map,i=r.get(t);if(i!==void 0){let e=i.deref();if(e===n)return;e!==void 0&&(typeof i.names==`string`?releaseBinding(e,i):(i.names.splice(i.names.indexOf(t),1),i.names.length===1&&(i.names=i.names[0])))}let a=da.get(n);a===void 0?(a=new PastName(r,t,n),da.set(n,a),markNamedAncestors(n),watchExternalName(n,a,e[z])):typeof a.names==`string`?a.names=[a.names,t]:a.names.push(t),r.set(t,a)}var ExternalWatch=class extends WeakRef{registry;key;constructor(e,t,n){super(e),this.registry=t,this.key=n}},ExternalNames=class{groups=/* @__PURE__ */ new Map;collected=new FinalizationRegistry(e=>this.remove(e));add(e,t){let n=this.groups.get(t);n===void 0&&this.groups.set(t,n=/* @__PURE__ */ new Set);let r=new ExternalWatch(e,this,t);return n.add(r),this.collected.register(e,r,r),r}remove(e){let t=this.groups.get(e.key);t?.delete(e)&&t.size===0&&this.groups.delete(e.key),this.collected.unregister(e)}check(e){let t=this.groups.get(e);if(t!==void 0)for(let e of t){let t=e.deref();t!==void 0&&checkNamedOwner(t)}}};function releaseBinding(e,t){da.delete(e),t.external?.registry.remove(t.external)}function watchExternalName(e,t,n){let r;e.flags&524288&&e.tag!==Z.img&&(r=attr(e,`form`)??void 0),r===void 0&&e.flags&16777216&&!isInclusiveAncestor(n,e)&&(r=null);let i=t.external;if(i!==void 0){if(i.key===r&&i.registry===e.doc[Gt])return;i.registry.remove(i),t.external=void 0}r!==void 0&&(t.external=(e.doc[Gt]??=new ExternalNames).add(e,r))}function checkNamedOwner(e){let t=da.get(e);if(t===void 0)return;let n=formOwner(e);if(n!==null&&n.node[Qn]===t.history)watchExternalName(e,t,n);else{if(typeof t.names==`string`)t.history.delete(t.names);else for(let e of t.names)t.history.delete(e);releaseBinding(e,t)}}function checkNamesInSubtree(e){for(let t=e;t!==null;)t.flags&8388608?(checkNamedOwner(t),t=nextInTree(t,e)):t=nextSkippingChildren(t,e)}function checkExternalSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.id!==``&&t.check(n.id),n.tag===Z.form&&t.check(null),n.flags&8388608&&n.flags&17301504&&checkNamedOwner(n),n.flags&512&&checkExternalSubtree(n.node[G][z],t)}function addToElementIndex(e,t,n){let r=e.get(t);r===void 0?e.set(t,n):Array.isArray(r)?r.push(n):e.set(t,[r,n])}function removeFromElementIndex(e,t,n){let r=e.get(t);if(r===n)e.delete(t);else if(Array.isArray(r)){let i=r.indexOf(n);i!==-1&&r.splice(i,1),r.length===1&&e.set(t,r[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 4:if(e===`form`)return xe;if(e===`role`)return Se;break;case 5:if(e===`inert`)return be;break;case 8:if(e===`tabindex`)return ve;break;case 15:if(e===`contenteditable`)return ye}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?ge:0:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97?_e: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 fa=/* @__PURE__ */ new Map;function setAttribute(e,t,n){let r=fa.get(t);if(r===void 0){if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);r=asciiLowercase$1(t),fa.size===1024&&fa.clear(),fa.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,n===524288&&(e.doc[$t]=!0));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.length,i=prefixFlag(t.localName);if(r===1)e.attrs=null,i!==0&&(e.flags&=~i);else{let a=Array(r-1),o=!1;for(let e=0,s=0;e<r;e++){let r=n[e];r!==t&&(a[s++]=r,i!==0&&!o&&prefixFlag(r.localName)===i&&(o=!0))}e.attrs=a,i!==0&&!o&&(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 findAttributeByLocalName(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){let e=r.rare;if(e===null||e.ns===null)return r}}return null}function setAttributeValue(e,t,n){let r=findAttributeByLocalName(e,t);r===null?appendAttribute(e,new AttrRecord(t,n,null,null)):changeAttribute(e,r,n)}function removeAttributeByLocalName(e,t){let n=findAttributeByLocalName(e,t);n!==null&&removeAttributeRecord(e,n)}function handleAttributeChanges(e,t,n,r){let i=t.rare,a=i===null?null:i.ns;Ji!==0&&queueAttributeMutationRecord(e,t.localName,a,n),a===null&&(coreAttributeSteps(e,t.localName,r),(t.localName===`form`||t.localName===`id`&&e.doc[$t])&&n!==r&&(e.doc[Qt]++,t.localName===`form`?(e.flags&16777216&&isListed(e)&&clearParserAssociation(e),e.flags&8388608&&checkNamedOwner(e)):e.doc[Gt]!==void 0&&(n&&e.doc[Gt].check(n),r&&e.doc[Gt].check(r))),ma!==0&&slotsAttributeChanged(e,t.localName,n,r)),e.flags&8&&e.node._attributeChangedSteps(t.localName,n,r,a);let o=e.doc;o[J]++,sa&&a===null&&styleBlindAttribute(t.localName)&&o[Ze]++,Fi&&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&¬eInlineStyle(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 pa=[];function classTokens(e){let t=e.classes;if(t!==null)return t;let n=attr(e,`class`);return t=n===null||n===``?pa: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++;if(i===0&&r===n)return[e];t.push(e.slice(i,r))}return t}function isAsciiWhitespace(e){return e===32||e===9||e===10||e===12||e===13}let ma=0;function _shadowRootAttached(){ma++}const ha=/* @__PURE__ */ new WeakMap,ga=/* @__PURE__ */ new WeakMap,_a=/* @__PURE__ */ new WeakMap,va=/* @__PURE__ */ new WeakMap,ya=[];function isSlot(e){return e.type===1&&e.tag===Z.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[G]??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[z];if(r.slotAssignment===`manual`){for(let t=i.first;t!==null;t=nextInTree(t,i))if(isSlot(t)&&(_a.get(t)??ya).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[R][z];if(r.slotAssignment===`manual`){let n=_a.get(e);if(n!==void 0)for(let e of n)e.parent===i&&t.push(e);return t}let a=null;for(let n=i.first;n!==null;n=n.next)isSlottable(n)&&(a??=firstSlotsByName(r[z]),a.get(slottableName(n))===e&&t.push(n));return t}function firstSlotsByName(e){let t=/* @__PURE__ */ new Map;for(let n=e.first;n!==null;n=nextInTree(n,e)){if(!isSlot(n))continue;let e=slotName(n);t.has(e)||t.set(e,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=ha.get(e)??ya,r=n.length===t.length;if(r){for(let e=0;e<n.length;e++)if(n[e]!==t[e]){r=!1;break}}if(!r&&(signalSlotChange(e),n.length!==0)){let r=new Set(t);for(let t of n)ga.get(t)===e&&!r.has(t)&&ga.delete(t)}t.length===0?ha.delete(e):ha.set(e,t);for(let n of t)ga.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 assignAppended(e,t){if(t.slotAssignment===`manual`||ga.has(e))return!1;let n=findSlot(e,!1);if(n===null)return!0;let r=ha.get(n);return r===void 0?ha.set(n,[e]):r.push(e),ga.set(e,n),signalSlotChange(n),!0}function unassignRemoved(e,t){let n=ha.get(t);n.length===1?ha.delete(t):n.splice(n.indexOf(e),1),ga.delete(e),signalSlotChange(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)&&(ha.get(e)??ya).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)continue;let a=shadowOf(e);if(a!==null&&isSlottable(r)&&(r.next!==null||!assignAppended(r,a))&&assignASlot(r),isEmptyShadowSlot(e)&&signalSlotChange(e),hasSlotDescendant(r)){let e=treeRoot(r);e.flags&32&&assignSlottablesForTree(e)}}}function slotsAfterRemove(e,t){let n=ga.get(e);if(n!==void 0&&(shadowOf(t)?.slotAssignment===`manual`?assignSlottables(n):unassignRemoved(e,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=ga.get(e);t!==void 0&&assignSlottables(t),assignASlot(e)}}function assignedSlot(e){return ga.get(e)??null}function assignedNodes(e,t){return t?findFlattenedSlottables(e):(ha.get(e)??ya).slice()}function assignedElements(e,t){return assignedNodes(e,t).filter(e=>e.type===1)}function assignManually(e,t){let n=_a.get(e)??ya;for(let e of n)va.delete(e);let r=[],i=null;for(let n of t){let t=va.get(n);if(t!==void 0&&t!==e){let e=_a.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),va.set(n,e)}_a.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(ma===0)return null;let t=e.parent;return t===null||!(t.flags&512)?null:ga.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[R];n=e?e[z]: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,e.flags&8388608&&markNamedAncestors(t),e.flags&3145728&&markRangeAncestors(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[it];n===null?Wi._appended(r,e.node):Wi._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[it];r===null?Wi._popped(e):Wi._rebuild(e)}}function suspendChildList(e){let t=e.flags&256;return e.flags&=-257,t}function resumeChildList(e,t){t!==0&&(e.flags|=256,Wi._rebuild(e.node[it]))}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),Ji!==0&&queueTreeMutationRecord(e,[],o,null,null)}ea!==0&&n!==null&&t.flags&1048576&&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)}ma!==0&&slotsAfterInsert(t,o===null?e:null,o),!r&&Ji!==0&&queueTreeMutationRecord(t,o===null?[e]:o,[],s,n),childrenChanged(t),c[J]++,c[Hr]++;let u=c[Gt];if(u?.groups.size){if(o===null)checkExternalSubtree(e,u);else for(let e of o)checkExternalSubtree(e,u)}Fi&&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)}let ba=null;function connectingRoot(){return ba}function connectSubtree(e,t){let n=ba;ba=e;try{connectNodes(e,t)}finally{ba=n}}function connectNodes(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[G][z],t))}function connectDetachedChildren(e){let t=e.node;for(let n=e.first;n!==null;n=n.next)connectSubtree(n,t);t[J]++,t[Hr]++,t[Gt]?.groups.size&&checkExternalSubtree(e,t[Gt])}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[L]===n&&(t[L]=null),n.flags&4&&n.node._disconnectedSteps(),n.flags&512&&disconnectSubtree(n.node[G][z],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;ea!==0&&(e.flags&3145728||n.flags&1048576)&&rangesBeforeRemove(e,n,indexOf(e)),ta!==0&&iteratorsBeforeRemove(e);let i=e.prev,a=e.next;unlink(e),ma!==0&&slotsAfterRemove(e,n);let o=!!(e.flags&1);o&&disconnectSubtree(e,r),e.flags&8388608&&checkNamesInSubtree(e),Ji!==0&&(addTransientObservers(n,e),t||queueTreeMutationRecord(n,[],[e],i,a)),childrenChanged(n),r[J]++,r[Hr]++,r[Gt]?.groups.size&&checkExternalSubtree(e,r[Gt]),r[Rt]=null,Fi&&o&&flushCEReactions()}function shadowIncludingRoot(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[R];if(e===null)break;t=treeRoot(e[z])}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;ea!==0&&(e.flags&3145728||i.flags&1048576)&&rangesBeforeRemove(e,i,indexOf(e)),ta!==0&&iteratorsBeforeRemove(e);let o=e.prev,s=e.next;unlink(e),ma!==0&&slotsAfterRemove(e,i),Ji!==0&&addTransientObservers(i,e),ea!==0&&n!==null&&t.flags&1048576&&rangesAfterInsert(t,indexOf(n),1);let c=n===null?t.last:n.prev;link(e,t,n),ma!==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);e.flags&8388608&&checkNamesInSubtree(e),Ji!==0&&(queueTreeMutationRecord(i,[],[e],o,s),queueTreeMutationRecord(t,[e],[],c,n)),childrenChanged(i),t!==i&&childrenChanged(t),a[J]++,a[Hr]++,a[Gt]?.groups.size&&checkExternalSubtree(e,a[Gt]),Fi&&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),Ji!==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),Ji!==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){n[Rt]=null,t[J]<=n[J]&&(t[J]=n[J]+1);let r=t[Dn];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,n.flags&524288&&(t[$t]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[G][z],t)}n[Gt]?.groups.size&&checkExternalSubtree(e,n[Gt]),ea!==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[G][z],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[Dn]?n.flags|=2:n.flags&=-3,n.flags&524288&&(t[$t]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[G][z],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 Fi&&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[G];if(n[lt]){let e=r.node.attachShadow({mode:n[zn],clonable:!0,serializable:n[Tr],delegatesFocus:n[Nt],slotAssignment:n[jr]});e[At]=n[At];for(let r=n[z].first;r!==null;r=r.next)appendDetached(cloneTree(r,t,!0),e[z])}}return r}function cloneOne(e,t,n){switch(e.type){case 1:{let r=Ri?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&5218368,e.flags&524288&&(r.doc[$t]=!0)}return e.node._cloningSteps(r.node,n),r}case 3:return t.createTextNode(e.data)[z];case 4:return new e.node.constructor(e.data,t)[z];case 8:return t.createComment(e.data)[z];case 7:return t.createProcessingInstruction(e.name,e.data)[z];case 11:return t.createDocumentFragment()[z];case 10:{let n=e.node;return t.implementation.createDocumentType(n.name,n.publicId,n.systemId)[z]}case 9:return e.node._cloneDocument()[z];case 2:{let n=t.createAttributeNS(e.ns,e.prefix===null?e.name:e.prefix+`:`+e.name);return n.value=e.data,n[z]}}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),Ji!==0&&queueCharacterDataMutationRecord(e,i),e.data=t===0&&n===a?r:i.slice(0,t)+r+i.slice(t+n),ea!==0&&e.flags&1048576&&rangesReplaceData(e,t,n,r.length);let o=e.parent;o!==null&&o.flags&16&&o.node._childrenChangedSteps();let s=e.doc;s[J]++,i.length!==0&&e.data.length!==0&&s[Ze]++}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)[z],o=e.parent;return o!==null&&(insert(a,o,e.next,!1),ea!==0&&(e.flags|o.flags)&1048576&&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;[z];constructor(e,t){if(t===void 0)throw TypeError(`Illegal constructor`);super(),this[z]=new NodeImpl(this,e,t??this)}get nodeType(){return this[z].type}get nodeName(){let e=this[z];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[z].doc.baseURI}get isConnected(){return!!(this[z].flags&1)}get ownerDocument(){let e=this[z];return e.type===9?null:e.doc}getRootNode(e){let t=treeRoot(this[z]);if(e?.composed)for(;t.flags&32;){let e=t.node[R];t=treeRoot(e[z])}return t.node}get parentNode(){let e=this[z].parent;return e===null?null:e.node}get parentElement(){let e=this[z].parent;return e!==null&&e.type===1?e.node:null}hasChildNodes(){return this[z].first!==null}get childNodes(){return this[it]??=Wi._live(this[z])}get firstChild(){let e=this[z].first;return e===null?null:e.node}get lastChild(){let e=this[z].last;return e===null?null:e.node}get previousSibling(){let e=this[z].prev;return e===null?null:e.node}get nextSibling(){let e=this[z].next;return e===null?null:e.node}get nodeValue(){let e=this[z];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[z];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[z];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[z],n=e==null?``:String(e);switch(t.type){case 1:case 11:replaceAll(n===``?null:t.doc.createTextNode(n)[z],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[z],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;)ea!==0&&(a.flags|a.parent.flags)&1048576&&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[z].flags&32)throw new DOMException(`Shadow roots cannot be cloned.`,`NotSupportedError`);return cloneNode(this[z],this[z].doc,e).node}isEqualNode(e){return e!==null&&isEqualNode(this[z],e[z])}isSameNode(e){return this===e}compareDocumentPosition(e){if(this===e)return 0;let t=e[z],n=this[z],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?.[z]===r)return 34;if(e.attr?.[z]===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[z];for(let n=e[z];n!==null;n=n.parent)if(n===t)return!0;return!1}lookupPrefix(e){if(e==null||e===``)return null;let t=namespaceContextElement(this[z]);return t===null?null:locatePrefix(t,String(e))}lookupNamespaceURI(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],t)}isDefaultNamespace(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],null)===t}insertBefore(e,t){return preInsert(e[z],this[z],t===null?null:t[z]),e}appendChild(e){return preInsert(e[z],this[z],null),e}replaceChild(e,t){return replace(t[z],e[z],this[z]),t}removeChild(e){return preRemove(e[z],this[z]),e}_getTheParent(e){return nodeGetTheParent(this,e)}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return inspectNode(this[z],e,t,n)}_replaceAll(e){replaceAll(e===null?null:e[z],this[z])}};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 k;if(t===`xmlns`)return ne;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[z]}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 xa=/* @__PURE__ */ new WeakMap;let Sa=0;function stableOrder(e,t){let n=xa.get(e);n===void 0&&xa.set(e,n=Sa++);let r=xa.get(t);return r===void 0&&xa.set(t,r=Sa++),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[ur];return t===null?e[z].data:t.value}function setAttrValue(e,t){let n=e[ur],r=e[Kn];n===null||r===null?e[z].data=t:changeAttribute(r[z],n,t)}const Ca=/* @__PURE__ */ new Map;function htmlUppercasedQualifiedName(e){if(e.prefix===null){if(!(e.flags&2))return e.name;let t=Ca.get(e.name);return t===void 0&&(Ca.size>=1024&&Ca.clear(),Ca.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()}function derivedCache(e,t,n){let r=e[Rt];r===null&&(e[Rt]=r=/* @__PURE__ */ new WeakMap);let i=r.get(t);return i===void 0&&r.set(t,i=n()),i}function peekDerivedCache(e,t){let n=e[Rt];return n===null?void 0:n.get(t)}function cachedSnapshot(e,t,n){let r=e[Rt]?.get(t);return r?.version===n?r.items:void 0}function storeSnapshot(e,t,n,r){(e[Rt]??=/* @__PURE__ */ new WeakMap).set(t,{version:n,items:r})}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 wa={hovered:null,active:null};function shadowHost(e){let t=wrapperProp(e,R);return t==null?null:t[z]}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=wa.hovered;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function active(e){let t=wa.active;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function anyLink(e){return e.tag===Z.a||e.tag===Z.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[q],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[z];for(let e=o.first;e!==null;e=nextInTree(e,o))if(e.type===1&&e.tag===Z.a&&attr(e,`name`)===r)return e;return null}function target(e){return e.doc[q].indexOf(`#`)!==-1&&targetElement(e)===e}function targetWithin(e){if(e.doc[q].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===Z.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===Z.details||e.tag===Z.dialog)&&attr(e,`open`)!==null}function isMedia(e){return e.tag===Z.audio||e.tag===Z.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=Ta.of(e);return n!==null&&n.has(t)}const Ta={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===Z.textarea||e.tag===Z.input&&usesValueForDirectionality(inputTypeName(e))){let t=textDirection(controlValue$1(e));return t===0?1:t}if(e.tag===Z.input)return 0;for(let t=e.first;t!==null;){if(t.type===1){if(t.tag===Z.bdi||t.tag===Z.script||t.tag===Z.style||t.tag===Z.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===Z.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===Z.input||t.tag===Z.textarea)return 1}}else if(t.tag===Z.bdi){let e=autoDirectionality(t);return e===0?1:e}else if(t.tag===Z.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 Ea={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 Da=[];function elementTagHash(e){if(e.tag!==0&&e.flags&2){let t=Da[e.tag];return t===void 0?Da[e.tag]=tagHash(e.name):t}return tagHash(asciiLowercase$1(e.name))}let Oa=/* @__PURE__ */ new Int32Array,ka=0;const Aa=[];function buildAncestorFilter(e){(++ka===2147483647||Oa.length===0)&&(Oa.length===0?Oa=/* @__PURE__ */ new Int32Array(4096):Oa.fill(0),ka=1);let t=ka,n=0;for(let r=e.parent;r!==null&&r.type===1;r=r.parent){let e=elementTagHash(r);if(Oa[e]=t,Aa[n++]=e,r.id!==``){let e=idHash(r.id);Oa[e]=t,Aa[n++]=e}if(r.attrs!==null){let e=classTokens(r);for(let r=0;r<e.length;r++){let i=classHash(e[r]);Oa[i]=t,Aa[n++]=i}}}return Aa.length=n,Aa}function mayMatchAncestors(e,t,n,r){let i=ka;return e<0?!0:Oa[e]===i?t<0?!0:Oa[t]===i?n<0?!0:Oa[n]===i?r<0||Oa[r]===i:!1:!1:!1}const ja=/* @__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(`.`)),Ma=/* @__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=Na,this.memoEl=null,this.memoIdx=0,this.memoVersion=-1,this.memoParent=null,this.memoCount=0,this.memoCountVersion=-1,this.volatileTest=!1}};const Na=[];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 Pa=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+=Pa;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+=Pa+listSpecificity(r.list);break;default:t+=Pa}}}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:ja.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=Ea[e.name];if(n===void 0)return fail(t,`unsupported pseudo-class :`+e.name),new Test(0);let r=new Test(6);return Ma.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 Fa=!1,Ia=null;function logDep(e,t,n){let r=Ia??=new StateDeps;r.tests.push(e),r.els.push(t),r.results.push(n)}function beginStateDeps(){let e=Fa?Ia:!1;return Fa=!0,Ia=null,e}function endStateDeps(e){let t=Ia;if(e===!1)Fa=!1,Ia=null;else if(Ia=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=Fa;Fa=!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 Fa=t,n}let La=null,Ra=null,za=null;function setScope(e){let t=La;return La=e,t}function setHostContext(e){let t=za;return za=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===La;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=za;za=r;let a=matchCompound(e.comps[t],r)&&(e.leading===0||relatesToAnchor(e.leading,r));return za=i,a}function relatesToAnchor(e,t){let n=Ra;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(za!==null&&t===za)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=za;za=t;let r=featurelessComplex(e,t)===1;return za=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[G];r===1&&!matchHas(a.list,e?e[z]: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[zn]===`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 Fa&&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===La;case 17:return matchesLang(t,e.args);case 18:{let n=directionality(t)===e.a;return Fa&&logDep(e,t,n),n}case 19:{let n=customState(t,e.name);return Fa&&logDep(e,t,n),n}case 20:return za!==null&&t===za;case 21:{if(za===null||t!==za)return!1;let n=za;za=null;let r=matchList(e.list,t);return za=n,r}case 22:{if(za===null||t!==za)return!1;let n=za;za=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 za=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[J],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=Ra;Ra=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 Ra=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 attributeNamesIn(e,t){for(let n=0;n<=e.last;n++){let r=e.comps[n];for(let e=0;e<r.length;e++){let n=r[e];n.op===5&&(t(n.name),n.lower!==n.name&&t(n.lower));let i=n.list;if(i!==null)for(let e=0;e<i.items.length;e++)attributeNamesIn(i.items[e],t)}}}function subjectType(e){if(e.items.length!==1)return null;let t=e.items[0].comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2&&!n.nsCheck)return n}return null}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;subject;indexedId;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):``,this.subject=this.fast===0?subjectType(n):null;let r=this.fastT;this.indexedId=this.fast===2?r.name:this.fast===5&&r.attrOp===1&&r.name===`id`?r.value:``}};const Ba=/* @__PURE__ */ new Map;function clearSelectorCaches(){Ba.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=Ba.get(e);if(r===void 0&&(r=compileQuery(e),Ba.size>=2048&&Ba.clear(),Ba.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[zn]===`quirks`}function run$1(e,t,n,r){if(t.indexedId!==``&&(t.fast!==2||!isQuirks(e))){let i=indexedDescendantById(e,t.indexedId);if(i!==void 0){if(i!==null){if(n)return i;r.push(i)}return null}}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.name;if(!isQuirks(e)){for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.id===i){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{if(t.subject!==null&&a.type===9){let e=elementsOfType(a,t.subject);for(let t=0;t<e.length;t++){let a=e[t];if(matchList(i,a)){if(n)return a;r.push(a)}}return null}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 indexedDescendantById(e,t){if(!(e.flags&1))return;let n=e.doc[yn].get(t);if(n===void 0)return e.type===9?null:void 0;if(!Array.isArray(n)){for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;return e.type===9?null:void 0}}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[yn].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 Va=[];var ResultEntry=class{version;doc;all;first;constructor(e,t){this.version=e,this.doc=t,this.all=null,this.first=void 0}},TypeList=class{version;elements;constructor(e,t){this.version=e,this.elements=t}};const Ha={},newTypes=()=>/* @__PURE__ */ new Map;function elementsOfType(e,t){let n=e.doc,r=derivedCache(n,Ha,newTypes),i=t.lower===t.name?t.name:`${t.lower}\n${t.name}`,a=n[Hr],o=r.get(i);if(o!==void 0&&o.version===a)return o.elements;let s=t.lower,c=t.name,l=[];for(let t=e.first;t!==null;t=next(t,e))t.type===1&&(t.flags&2?t.name===s:t.name===c)&&l.push(t);return r.set(i,new TypeList(a,l)),l}const Ua={},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,Ua,newResults):peekDerivedCache(r,Ua);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[J],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,Va);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,Va);return cachedEntry(e,n,!0).first=i,i}function querySelectorAll(e,t){return Wi._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;structural;constructor(e,t,n,r){this.root=e,this.childrenOnly=t,this.filter=n,this.structural=r}},Wa=class HTMLCollection{constructor(e,t=!1,n=null,r=!1){Object.defineProperty(this,yt,{value:new CollectionState(e,t,n,r)}),Ka===null&&(Ka=indexGetterTable(HTMLCollection.prototype,tableItem,256))}get _s(){return this[yt]}get _rootImpl(){return this[yt].root}static _childrenOf(e){return new HTMLCollection(e,!0,null,!0)}static _descendants(e,t,n){return new HTMLCollection(e,!1,n,t)}_collect(e){let t=this[yt],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[yt],t=e.root.doc,n=e.structural?t[Hr]:t[J],r=cachedSnapshot(t,e,n);if(r!==void 0)return r;let i=[];return this._collect(i),storeSnapshot(t,e,n,i),i.length>Ka.count&&ensureIndexGetters(Ka,i.length),i}get length(){let e=this._snapshot().length;return e>Ka.count&&ensureIndexGetters(Ka,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][z];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][z];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 Ga={values(){let e=iterableTarget(this);return new CollectionIterator(e,e instanceof Wa)}}.values;Object.defineProperties(Wa.prototype,{[Symbol.iterator]:{value:Ga,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`HTMLCollection`,configurable:!0}});let Ka=null;function tableItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}function ensureCollectionIndexGetters(e){Ka!==null&&ensureIndexGetters(Ka,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,qa)}const qa={get(e,t){let n=t===`length`?e.length:e[t];return n!==void 0||typeof t==`symbol`||t in e?n:isArrayIndex$1(t)?e.item(Number(t))??void 0:e.namedItem(t)??void 0},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)[z];let n=t.createDocumentFragment();for(let r of e)n.appendChild(toNode(r,t));return n[z]}function toNode(e,t){return typeof e==`object`&&e&&z in e?e:t.createTextNode(String(e))}function nodeArg(e,t,n,r){if(typeof e==`object`&&e&&z in e)return e[z];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 Ja={get children(){let e=this;return e[ot]??=Wa._childrenOf(e[z])},get firstElementChild(){return wrap(firstElementChild(this[z]))},get lastElementChild(){return wrap(lastElementChild(this[z]))},get childElementCount(){let e=0;for(let t=this[z].first;t!==null;t=t.next)t.type===1&&e++;return e},prepend(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,t.first)},append(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,null)},replaceChildren(...e){let t=this[z],n=convertNodesIntoNode(e,t.doc);ensureReplaceAllValidity(n,t),replaceAll(n,t)},moveBefore(e,t){arguments.length<2&&argumentsRequired(`moveBefore`,parentNodeInterface(this[z]),2,arguments.length);let n=nodeArg(e,`moveBefore`,1,this[z]),r=t===null?null:nodeArg(t,`moveBefore`,2,this[z]);r===n&&(r=n.next),move(n,this[z],r)},querySelector(e){return arguments.length===0&&argumentsRequired(`querySelector`,parentNodeInterface(this[z]),1,0),wrap(querySelector(this[z],String(e)))},querySelectorAll(e){return arguments.length===0&&argumentsRequired(`querySelectorAll`,parentNodeInterface(this[z]),1,0),querySelectorAll(this[z],String(e))}},Ya={before(...e){let t=this[z],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[z],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[z],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[z];e.parent!==null&&remove(e,!1)}},Xa={get previousElementSibling(){return wrap(previousElementSibling(this[z]))},get nextElementSibling(){return wrap(nextElementSibling(this[z]))}},Za={getElementById(e){let t=this[z],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,Ja),addUnscopables(e,[`prepend`,`append`,`replaceChildren`])}function installChildNode(e){define(e,Ya),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,Xa)}function installNonElementParentNode(e){define(e,Za)}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[z]?.type===9?e:currentDocument()}var CharacterData=class extends Node{get data(){return this[z].data}set data(e){let t=this[z];replaceData(t,0,t.data.length,e===null?``:String(e))}get length(){return this[z].data.length}substringData(e,t){arguments.length<2&&arity$1(`substringData`,2,arguments.length);let n=this[z].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[z];replaceData(t,t.data.length,0,String(e))}insertData(e,t){arguments.length<2&&arity$1(`insertData`,2,arguments.length),replaceData(this[z],e>>>0,0,String(t))}deleteData(e,t){arguments.length<2&&arity$1(`deleteData`,2,arguments.length),replaceData(this[z],e>>>0,t>>>0,``)}replaceData(e,t,n){arguments.length<3&&arity$1(`replaceData`,3,arguments.length),replaceData(this[z],e>>>0,t>>>0,String(n))}};installChildNode(CharacterData),installNonDocumentTypeChildNode(CharacterData);var Text=class extends CharacterData{constructor(e=``,t){super(3,nodeDocumentFor(t)),this[z].data=String(e)}splitText(e){return splitText(this[z],Number(e)>>>0).node}get wholeText(){let e=this[z];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(ma===0)return null;let e=assignedSlot(this[z]);if(e===null)return null;let t=this[z].parent,n=t===null?null:t.node[G];return n!=null&&n.mode===`open`?e.node:null}},CDATASection=class extends Text{constructor(e=``,t=currentDocument()){super(e,t),this[z].type=4}},Comment=class extends CharacterData{constructor(e=``,t){super(8,nodeDocumentFor(t)),this[z].data=String(e)}},ProcessingInstruction=class extends CharacterData{constructor(e,t,n=currentDocument()){super(7,n),this[z].name=e,this[z].data=t}get target(){return this[z].name}},DocumentFragment=class extends Node{[R];constructor(e=currentDocument()){super(11,e),this[R]=null}};installParentNode(DocumentFragment),installNonElementParentNode(DocumentFragment);var DocumentType=class extends Node{[Ir];constructor(e,t,n,r){super(10,e);let i=this[z];i.name=t,i.data=n,this[Ir]=r}get name(){return this[z].name}get publicId(){return this[z].data}get systemId(){return this[Ir]}};installChildNode(DocumentType);const Qa=`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;`,$a=`1Æ1Æ1&1&1Á1Á1Ă1Â1Â1А2𝔄1À1À1Α1Ā1⩓1Ą2𝔸11Å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⋂111Į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Н11111≫1≪1
|
|
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||ki.has(n)){Oi(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),ki.add(n);let s=!1;try{s=!dispatch(o,n)}finally{ki.delete(n)}s||Oi(e,o)}__name(reportException$1,`reportException`);function noteChangeDispatch(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:e.node[Yr]=!0}}function hasUserValidity(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:return e.node[Yr]===!0}return!1}function setUserValidity(e,t){switch(e.tag){case Z.input:case Z.textarea:case Z.select:(t||hasUserValidity(e))&&(e.node[Yr]=t)}}let Ai;function getCurrentEvent(){return Ai}let ji=null;function setPostDispatchHook(e){ji=e}let Mi=null;function setAssignedSlotLookup(e){Mi=e}const Ni=[];function listenerHead(e,t){let n=e[Nn];return n==null?void 0:firstListener(n,t)}function assignedSlot$1(e){if(Mi===null)return null;let t=e.parent;return t===null||!(t.flags&512)||e.type!==1&&e.type!==3?null:Mi(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 nodeParentOf(e,t,n){let r=e.parent;if(r!==null&&r.flags&512){let t=assignedSlot$1(e);if(t!==null)return t}if(e.flags&32){let r=n._s;if(!(r.flags&16)&&r.pathLength>0){let t=X[r.pathStart][z];if(t!==void 0&&treeRoot$1(t)===e)return null}return t[R]}return r?.node??null}function nodeGetTheParent(e,t){return nodeParentOf(e[z],e,t)}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[R];n=e===null||e[z]===void 0?null:e[z]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$4,`isShadowIncludingInclusiveAncestor`);function inShadowTree(e){if(e===null)return!1;let t=e[z];return t!==void 0&&!!(treeRoot$1(t).flags&32)}function retarget(e,t){for(;;){if(e===null)return null;let n=e[z];if(n===void 0)return e;let r=treeRoot$1(n);if(!(r.flags&32))return e;let i=t[z];if(i!==void 0&&isShadowIncludingInclusiveAncestor$4(r,i))return e;e=r.node[R]}}function retargetList(e,t){let n=[];for(let r=0;r<e.length;r++)n.push(retarget(e[r],t));return n}function isWindowInstance(e){return e[un]!==void 0}function hasActivationBehavior(e,t){return t!==void 0&&mayHaveActivationBehavior(t.tag)&&e._hasActivationBehavior===!0}function appendToEventPath(e,t,n,r,i,a){let o=ci.top,s=0;a!==null&&a.flags&32&&(s|=1,e[z]===a&&e.mode===`closed`&&(s|=2)),i&&(s|=4),X[o]=e,t===null?X[o+1]=X[o+1-5]:(s|=8,X[o+1]=t),X[o+2]=n,X[o+3]=r,X[o+4]=s,ci.top=o+5}function appendLight(e){let t=ci.top;X.length<t+5&&growPath(t+5),X[t]=e,X[t+1]=X[t+1-5],X[t+4]=0,ci.top=t+5}function growPath(e){for(;X.length<e;)X.push(null)}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,c=r.relatedTarget,l=inShadowTree(c),u=l?retarget(c,t):c,d=!1,m=ci.top,h=!1;try{if(t!==u||t===c){let n=r.flags&2048?e._touchTargetList():null;h=c===null&&n===null,r.pathStart=m,r.pathLength=0;let i=t[z],_=i===void 0?null:treeRoot$1(i),v=_,y=v!==null&&!!(v.flags&32),b=i===void 0&&isWindowInstance(t);appendToEventPath(t,b?exposedWindow(t):a,u,n===null?null:retargetList(n,t),!1,_),b&&(X[m+4]=X[m+4]|16),r.pathLength=1;let x=m,S=!!(r.flags&1024)&&r.type===`click`,C=!!(r.flags&256);S&&hasActivationBehavior(t,i)&&(o=t);let w=i!==void 0&&isAssigned(i),T=!1;i!==void 0&&r.type===`change`&¬eChangeDispatch(i);let ee=t,E=i;for(;;){let r,i,a;if(E===void 0||E.type===9)r=ee._getTheParent(e),i=r===null?void 0:r[z],a=!1;else{let t=E.parent;t!==null&&!(t.flags&512)?(r=t.node,i=t,a=!0):(r=nodeParentOf(E,ee,e),i=r===null?void 0:r[z],a=i!==void 0&&i===t)}if(r===null)break;let s=i===void 0?null:a?_:treeRoot$1(i);w&&(w=!1,s!==null&&s.flags&32&&s.node.mode===`closed`&&(T=!0)),i!==void 0&&isAssigned(i)&&(w=!0),u=l?retarget(c,r):c;let d=n===null?null:retargetList(n,r);if(i===void 0||v!==null&&(!y||isShadowIncludingInclusiveAncestor$4(v,i)))S&&C&&o===null&&hasActivationBehavior(r,i)&&(o=r),h&&(s===null||!(s.flags&32))?appendLight(r):appendToEventPath(r,null,u,d,T,s),i===void 0&&isWindowInstance(r)&&(X[ci.top-5+4]=X[ci.top-5+4]|16);else if(r===u)break;else t=r,v=s,y=v!==null&&!!(v.flags&32),S&&o===null&&hasActivationBehavior(t,i)&&(o=t),x=ci.top,appendToEventPath(r,t,u,d,T,s);ee=r,E=i,_=s,T=!1}let D=ci.top;r.pathLength=(D-m)/5;{let e=x;if(inShadowTree(X[e+1])||inShadowTree(X[e+2]))d=!0;else{let t=X[e+3];if(t!==null)for(let e=0;e<t.length;e++)inShadowTree(t[e])&&(d=!0)}}o!==null&&(s=o._legacyPreActivationBehavior?.());let te=typeIdOf(r.type),O=r.flags&128?legacyType(r.type):null;if(te===-1&&O!==null&&typeIdOf(O)!==-1&&(te=idForType(r.type)),te!==-1){let t=listenerSeqLimit(),n=!1;for(let t=D-5;t>=m;t-=5){let i=listenerHead(X[t],te);if(Ni[t]=i,(i!==void 0||O!==null)&&(r.eventPhase=X[t+4]&8?2:1,invoke$1(e,r,t,i,1,O),r.flags&1)){n=!0;break}}if(!n)for(let n=m;n<D;n+=5){let i=X[n+4];if(!(i&8)&&!C)continue;let a=listenerSeqLimit()===t?Ni[n]:listenerHead(X[n],te);if((a!==void 0||O!==null)&&(r.eventPhase=i&8?2:3,invoke$1(e,r,n,a,3,O),r.flags&1))break}}let k=C?D-5:x;r.target=X[k+1],r.relatedTarget=X[k+2],r.touchTargets=X[k+3]}}finally{for(let e=m,t=ci.top;e<t;e+=5)X[e]=null,X[e+1]=null,Ni[e]=void 0,h||(X[e+2]=null,X[e+3]=null);ci.top=m,r.eventPhase=0,r.currentTarget=null,r.pathStart=-1,r.pathLength=0,r.flags&=-76}if(d&&(r.target=null,r.relatedTarget=null,r.touchTargets=null),o!==null){let t=o;r.flags&4?t._legacyCanceledActivationBehavior?.(s):t._activationBehavior?.(e,s)}return ji!==null&&ji(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,i,a){let o=X[n];if(t.target=X[n+1],t.relatedTarget=X[n+2],t.touchTargets=X[n+3],t.flags&1)return;let s=X[n+4],c=s&16?exposedWindow(o):o;t.currentTarget=c;let l=!!(s&1);if(!(r!==void 0&&innerInvoke(e,t,o,c,r,i,l))&&a!==null){let n=listenerHead(o,typeIdOf(a));if(n===void 0)return;let r=t.type;t.type=a;try{innerInvoke(e,t,o,c,n,i,l)}finally{t.type=r}}}__name(invoke$1,`invoke`);function innerInvoke(e,t,n,r,i,a,o){let s=!1,c=listenerSeqLimit();for(let l=i;l!==null&&l.seq<c;l=l.next){let i=l.flags;if(i&8||listenerAborted(l)||(s=!0,i&1?a!==1:a===1))continue;i&2&&removeListener(n,l);let c=Ai;o||(Ai=e),i&4&&(t.flags|=8);let u=l.callback;try{if(typeof u==`function`)u.call(r,e);else{let t=u.handleEvent;if(typeof t!=`function`)throw TypeError(`The provided callback is not a function and has no callable 'handleEvent' property.`);t.call(u,e)}}catch(e){reportException$1(e,n)}if(t.flags&=-9,Ai=c,t.flags&2)break}return s}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 setTrusted(e,!1),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}let Pi=null;function setElementClassLookup(e){Pi=e}function createElementImpl(e,t,n,r){return new(Pi(t,n))(e,t,n,r)[z]}let Fi=!1,Ii=null;function setCEReactionsPending(e){Fi=e}function setCEReactionsFlush(e){Ii=e}function flushCEReactions(){Ii!==null&&Ii()}let Li=null;function setCustomElementCreate(e){Li=e}function createElementImplSync(e,t,n,r,i){if(Li!==null){let a=Li(e,t,n,r,i);if(a!==null)return a}return createElementImpl(e,t,n,r)}let Ri=!1;function setCEActive(){Ri=!0}let zi=null,Bi=null;function setCustomElementCloneHooks(e,t){zi=e,Bi=t}function createCloneElementImpl(e,t){return zi(e,t)}function ceParserCreated(e){Bi(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 Vi=Array.prototype.forEach,Hi={forEach(e,t){if(this===null||this===void 0)return Vi.call(this,e,t);let n=Object(this),r=Math.min(Math.max(Math.trunc(Number(n.length))||0,0),2**53-1);if(typeof e!=`function`)Vi.call(n,e,t);else for(let i=0;i<r;i++)i in n&&e.call(t,n[i],i,n)}}.forEach,Ui=/* @__PURE__ */ new Map;function lazyItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}var Wi=class NodeList{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=0;let n=new.target!==NodeList;this.#n=n,n&&!Ui.has(new.target.prototype)&&Ui.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=Ui.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 Gi={values(){return Wi._values(this)}}.values;Object.defineProperties(Wi.prototype,{forEach:{value:Hi,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:Gi,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Gi,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NodeList`,configurable:!0}});const Ki=[];var qi=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??Ki,this.#o=o??Ki,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??=Wi._staticFromImpls(this.#a)}get removedNodes(){return this.#c??=Wi._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(qi.prototype,Symbol.toStringTag,{value:`MutationRecord`,configurable:!0});let Ji=0;function setActiveObservers(e){Ji=e}let Yi=0;function setSubtreeObservers(e){Yi=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 Xi=/* @__PURE__ */ new WeakMap;function registeredObserverList(e){return e.flags&2048?Xi.get(e)??null:null}function addRegistration(e,t){let n=registeredObserverList(e);n===null&&(n=[],Xi.set(e,n),e.flags|=pe),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&&(Xi.delete(e),e.flags&=-2049)}let Zi=[],Qi=[],$i=!1;function queueMutationRecord(e,t,n,r,i,a,o,s,c){let l=null,u=null,d=Yi!==0;for(let a=t;a!==null;a=d?a.parent:null){if(!(a.flags&2048))continue;let o=Xi.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 qi(m,t,n,r,u[e],a,o,s,c),h=i[dr];h.length===0&&!Zi.includes(i)&&Zi.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(Yi!==0)for(let n=e;n!==null;n=n.parent){if(!(n.flags&2048))continue;let e=Xi.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[Wn].push(t),i[dn]=!0,Zi.includes(i)||Zi.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){Qi.includes(e)||Qi.push(e),queueMutationObserverMicrotask()}function queueMutationObserverMicrotask(){$i||($i=!0,queueMicrotask(notifyMutationObservers))}function notifyMutationObservers(){$i=!1;let e=Zi;Zi=[],e.length>1&&e.sort((e,t)=>e[gn]-t[gn]);let t=Qi;Qi=[];for(let t=0;t<e.length;t++){let n=e[t],r=n[dr];if(n[dr]=[],removeTransientRegistrations(n),r.length!==0)try{n[rt].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[dn])return;e[dn]=!1;let t=[],n=e[Wn];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[Wn]=t}function dropPending(e){let t=Zi.indexOf(e);t!==-1&&Zi.splice(t,1)}let ea=0,ta=0,na=[];function homeOf(e){return e.doc}function file(e,t){let n=e[or];n===null?n=e[or]={refs:[],sweepAt:64}:n.refs.length>=n.sweepAt&&(compact(e,n),n.sweepAt=Math.max(64,n.refs.length*2)),n.refs.push(t),ea++}function markBoundary(e){e.flags&1048576||(e.flags|=Ce,e.parent!==null&&markRangeAncestors(e.parent))}function markRangeAncestors(e){for(let t=e;t!==null&&!(t.flags&2097152);t=t.parent)t.flags|=we}function registerLiveRange(e){markBoundary(e[W]),markBoundary(e[P]);let t=homeOf(e[W]);e[mn]=t,file(t,new WeakRef(e))}function refileRange(e){markBoundary(e[W]),markBoundary(e[P]);let t=homeOf(e[W]);e[mn]!==t&&e[mn]!==null&&(e[mn]=t,file(t,new WeakRef(e)))}let ra=64;function registerNodeIterator(e){if(na.length>=ra){let e=0;for(let t=0;t<na.length;t++)na[t].deref()!==void 0&&(na[e++]=na[t]);na.length=e,ra=Math.max(64,e*2)}na.push(new WeakRef(e)),ta=na.length}function compact(e,t,n){let r=t.refs,i=0;for(let t=0;t<r.length;t++){let a=r[t].deref();a!==void 0&&a[mn]===e&&(r[i++]=r[t],n?.(a))}ea-=r.length-i,r.length=i}function updateLiveRanges(e,t){let n=homeOf(e),r=n[or];if(r===null)return;compact(n,r,t);let i=r.refs.length;i===0?n[or]=null:r.sweepAt>64&&i*4<r.sweepAt&&(r.sweepAt=Math.max(64,i*2))}function rangesAdopt(e,t){let n=t,r=homeOf(e),i=n[or];if(i===null||n===r)return;let a=i.refs,o=0;for(let t=0;t<a.length;t++){let i=a[t].deref();i===void 0||i[mn]!==n?ea--:isInclusiveAncestor(e,i[W])||isInclusiveAncestor(e,i[P])?(i[mn]=r,ea--,file(r,a[t])):a[o++]=a[t]}a.length=o,o===0&&(n[or]=null)}function rangesAfterInsert(e,t,n){updateLiveRanges(e,r=>{r[W]===e&&r[K]>t&&(r[K]+=n),r[P]===e&&r[I]>t&&(r[I]+=n)})}function rangesBeforeRemove(e,t,n){updateLiveRanges(t,r=>{isInclusiveAncestor(e,r[W])&&(r[W]=t,r[K]=n,markBoundary(t)),isInclusiveAncestor(e,r[P])&&(r[P]=t,r[I]=n,markBoundary(t)),r[W]===t&&r[K]>n&&r[K]--,r[P]===t&&r[I]>n&&r[I]--})}function rangesReplaceData(e,t,n,r){let i=t+n;updateLiveRanges(e,a=>{a[W]===e&&a[K]>t&&a[K]<=i&&(a[K]=t),a[P]===e&&a[I]>t&&a[I]<=i&&(a[I]=t),a[W]===e&&a[K]>i&&(a[K]+=r-n),a[P]===e&&a[I]>i&&(a[I]+=r-n)})}function rangesSplitText(e,t,n,r){let i=indexOf(e);updateLiveRanges(e,a=>{a[W]===e&&a[K]>n&&(a[W]=t,a[K]-=n,markBoundary(t)),a[P]===e&&a[I]>n&&(a[P]=t,a[I]-=n,markBoundary(t)),a[W]===r&&a[K]===i+1&&a[K]++,a[P]===r&&a[I]===i+1&&a[I]++})}function rangesNormalizeMerge(e,t,n){let r=t.parent,i=indexOf(t);updateLiveRanges(e,a=>{markBoundary(e),a[W]===t&&(a[K]+=n,a[W]=e),a[P]===t&&(a[I]+=n,a[P]=e),a[W]===r&&a[K]===i&&(a[W]=e,a[K]=n),a[P]===r&&a[I]===i&&(a[P]=e,a[I]=n)})}function iteratorsBeforeRemove(e){let t=0,n=e.doc;for(let r=0;r<na.length;r++){let i=na[r].deref();i!==void 0&&(na[t++]=na[r],i[mr].doc===n&&(preRemovingSteps(i,i,e),i[Cn]!==null&&preRemovingSteps(i,i[Cn],e)))}na.length=t,ta=t}function preRemovingSteps(e,t,n){if(!isInclusiveAncestor(n,t[fr])||isInclusiveAncestor(n,e[mr]))return;if(t[$n]){let r=nextSkippingChildren(n,e[mr]);if(r!==null){t[fr]=r;return}t[$n]=!1}let r=n.prev;if(r===null)t[fr]=n.parent;else{let e=r;for(;e.last!==null;)e=e.last;t[fr]=e}}const ia=/* @__PURE__ */ new WeakMap;function noteInlineStyle(e,t){ia.set(e,(ia.get(e)??0)+t)}function inlineStyleCount(e){return ia.get(e)??0}const aa=/* @__PURE__ */ new Set;let oa=!1;function ariaOrData(e){if(e.length<6||e.charCodeAt(4)!==45)return!1;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97}let sa=!1;function noteStyleRecordCached(){sa=!0}function noteSelectorAttribute(e){ariaOrData(e)&&(aa.add(e),oa=!0)}function styleBlindAttribute(e){return ariaOrData(e)&&(!oa||!aa.has(e))}const ca=[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`],la=/* @__PURE__ */ new Map;for(let e=0;e<ca.length;e++)la.set(ca[e],e);function inputTypeFromAttr(e){if(e===null)return 1;let t=la.get(e);return t===void 0?la.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===Z.input||t===Z.button||t===Z.select||t===Z.textarea||t===Z.fieldset||t===Z.output||t===Z.object}function isSubmittable(e){let t=e.tag;return!!(e.flags&16384)||t===Z.input||t===Z.button||t===Z.select||t===Z.textarea}function isResettable(e){let t=e.tag;return!!(e.flags&16384)||t===Z.input||t===Z.select||t===Z.textarea||t===Z.output}function isLabelable(e){switch(e.tag){case Z.button:case Z.meter:case Z.output:case Z.progress:case Z.select:case Z.textarea:return!0;case Z.input:return inputType(e)!==0}return!!(e.flags&he)}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(e.flags&16777216&&e.tag!==Z.form){let t=ua.get(e),n=t.deref();if(n!==void 0&&ua.get(n)===t&&(e.tag===Z.img||attr(e,`form`)===null)&&treeRoot(e)===treeRoot(n))return n;clearParserAssociation(e)}if(e.tag!==Z.img){let t=attr(e,`form`);if(t!==null&&e.flags&1){let n=elementByIdInTree(e,t);return n!==null&&n.tag===Z.form?n:null}}for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Z.form)return t;return null}const ua=/* @__PURE__ */ new WeakMap;function parserAssociateForm(e,t){if(t.tag!==Z.form)return;let n=ua.get(t);n===void 0&&ua.set(t,n=new WeakRef(t)),ua.set(e,n),e.doc[Qt]++,e.flags|=16777220,t.flags|=16777220}function clearParserAssociation(e){e.flags&16777216&&(e.flags&=-16777217,ua.delete(e))}function formOwnerScope(e,t){return!(e.flags&16777216)&&(!t||e.id===``||!e.doc[$t])?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!==Z.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===Z.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===Z.fieldset&&attr(n,`disabled`)!==null){if(t.tag===Z.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 Z.button:case Z.input:case Z.select:case Z.textarea:case Z.fieldset:return attr(e,`disabled`)!==null||inDisabledFieldset(e);case Z.optgroup:return attr(e,`disabled`)!==null;case Z.option:{if(attr(e,`disabled`)!==null)return!0;let t=e.parent;return t!==null&&t.tag===Z.optgroup&&attr(t,`disabled`)!==null}}return!1}function hasDatalistAncestor(e){for(let t=e.parent;t!==null;t=t.parent)if(t.tag===Z.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 radioIndexAdd(e,t,n){let r=e.get(t);r===void 0?e.set(t,(/* @__PURE__ */ new Set()).add(n)):r.add(n)}function radioIndexRemove(e,t,n){let r=e.get(t);r.size===1?e.delete(t):r.delete(n)}function labelsFor(e){let t=[];if(e.id!==``&&!(e.flags&1)){let n=treeRoot(e);for(let r=n.type===1?n:nextElementInTree(n,n);r!==null;r=nextElementInTree(r,n))r.tag===Z.label&&labeledControl(r)===e&&t.push(r);return t}for(let n=e.parent;n!==null;n=n.parent)n.tag===Z.label&&attr(n,`for`)===null&&labeledControl(n)===e&&t.unshift(n);let n=e.id===``?void 0:e.doc[en]?.get(e.id);if(n===void 0)return t;if(Array.isArray(n))for(let r of n)labeledControl(r)===e&&t.push(r);else labeledControl(n)===e&&t.push(n);return t.length>1&&t.sort(compareTreeOrder),t}var PastName=class extends WeakRef{history;names;constructor(e,t,n){super(n),this.history=e,this.names=t}};const da=/* @__PURE__ */ new WeakMap;function markNamedAncestors(e){for(let t=e;t!==null&&!(t.flags&8388608);t=t.parent)t.flags|=Ee}function rememberName(e,t,n){let r=e[Qn]??=/* @__PURE__ */ new Map,i=da.get(n);if(i?.names===t&&i.history===r)return;let a=r.get(t);if(a!==void 0){if(a===i)return;let e=a.deref();e!==void 0&&(typeof a.names==`string`?releaseBinding(e,a):(a.names.splice(a.names.indexOf(t),1),a.names.length===1&&(a.names=a.names[0])))}i===void 0?(i=new PastName(r,t,n),da.set(n,i),markNamedAncestors(n),watchExternalName(n,i,e[z])):typeof i.names==`string`?i.names=[i.names,t]:i.names.push(t),r.set(t,i)}var ExternalWatch=class extends WeakRef{registry;key;constructor(e,t,n){super(e),this.registry=t,this.key=n}check(){let e=this.deref();e!==void 0&&checkNamedOwner(e)}},ExternalNames=class{groups=/* @__PURE__ */ new Map;collected=new FinalizationRegistry(e=>this.remove(e));add(e,t){let n=this.groups.get(t),r=new ExternalWatch(e,this,t);return n===void 0?this.groups.set(t,r):n instanceof Set?n.add(r):this.groups.set(t,/* @__PURE__ */ new Set([n,r])),this.collected.register(e,r,r),r}remove(e){let t=this.groups.get(e.key);(t===e||t instanceof Set&&t.delete(e)&&t.size===0)&&this.groups.delete(e.key),this.collected.unregister(e)}check(e){let t=this.groups.get(e);if(t instanceof Set)for(let e of t)e.check();else t?.check()}};function releaseBinding(e,t){da.delete(e),t.external?.registry.remove(t.external)}function watchExternalName(e,t,n){let r;e.flags&524288&&e.tag!==Z.img&&(r=attr(e,`form`)??void 0),r===void 0&&e.flags&16777216&&!isInclusiveAncestor(n,e)&&(r=null);let i=t.external;if(i!==void 0){if(i.key===r&&i.registry===e.doc[Gt])return;i.registry.remove(i),t.external=void 0}r!==void 0&&(t.external=(e.doc[Gt]??=new ExternalNames).add(e,r))}function checkNamedOwner(e){let t=da.get(e);if(t===void 0)return;let n=formOwner(e);if(n!==null&&n.node[Qn]===t.history)watchExternalName(e,t,n);else{if(typeof t.names==`string`)t.history.delete(t.names);else for(let e of t.names)t.history.delete(e);releaseBinding(e,t)}}function checkNamesInSubtree(e){for(let t=e;t!==null;)t.flags&8388608?(checkNamedOwner(t),t=nextInTree(t,e)):t=nextSkippingChildren(t,e)}function checkExternalSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.id!==``&&t.check(n.id),n.tag===Z.form&&t.check(null),n.flags&8388608&&n.flags&17301504&&checkNamedOwner(n),n.flags&512&&checkExternalSubtree(n.node[G][z],t)}function addToElementIndex(e,t,n){let r=e.get(t);r===void 0?e.set(t,n):Array.isArray(r)?r.push(n):e.set(t,[r,n])}function removeFromElementIndex(e,t,n){let r=e.get(t);if(r===n)e.delete(t);else if(Array.isArray(r)){let i=r.indexOf(n);i!==-1&&r.splice(i,1),r.length===1&&e.set(t,r[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 4:if(e===`form`)return xe;if(e===`role`)return Se;break;case 5:if(e===`inert`)return be;break;case 8:if(e===`tabindex`)return ve;break;case 15:if(e===`contenteditable`)return ye}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?ge:0:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97?_e: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 fa=/* @__PURE__ */ new Map;function setAttribute(e,t,n){let r=fa.get(t);if(r===void 0){if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);r=asciiLowercase$1(t),fa.size===1024&&fa.clear(),fa.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,n===524288&&(e.doc[$t]=!0));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.length,i=prefixFlag(t.localName);if(r===1)e.attrs=null,i!==0&&(e.flags&=~i);else{let a=Array(r-1),o=!1;for(let e=0,s=0;e<r;e++){let r=n[e];r!==t&&(a[s++]=r,i!==0&&!o&&prefixFlag(r.localName)===i&&(o=!0))}e.attrs=a,i!==0&&!o&&(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 findAttributeByLocalName(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){let e=r.rare;if(e===null||e.ns===null)return r}}return null}function setAttributeValue(e,t,n){let r=findAttributeByLocalName(e,t);r===null?appendAttribute(e,new AttrRecord(t,n,null,null)):changeAttribute(e,r,n)}function removeAttributeByLocalName(e,t){let n=findAttributeByLocalName(e,t);n!==null&&removeAttributeRecord(e,n)}function handleAttributeChanges(e,t,n,r){let i=t.rare,a=i===null?null:i.ns;Ji!==0&&queueAttributeMutationRecord(e,t.localName,a,n),a===null&&(coreAttributeSteps(e,t.localName,r),(t.localName===`form`||t.localName===`id`&&e.doc[$t])&&n!==r&&(e.doc[Qt]++,t.localName===`form`?(e.flags&16777216&&isListed(e)&&clearParserAssociation(e),e.flags&8388608&&checkNamedOwner(e)):e.doc[Gt]!==void 0&&(n&&e.doc[Gt].check(n),r&&e.doc[Gt].check(r))),ma!==0&&slotsAttributeChanged(e,t.localName,n,r)),e.flags&8&&e.node._attributeChangedSteps(t.localName,n,r,a);let o=e.doc;o[J]++,sa&&a===null&&styleBlindAttribute(t.localName)&&o[Ze]++,Fi&&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&¬eInlineStyle(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 pa=[];function classTokens(e){let t=e.classes;if(t!==null)return t;let n=attr(e,`class`);return t=n===null||n===``?pa: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++;if(i===0&&r===n)return[e];t.push(e.slice(i,r))}return t}function isAsciiWhitespace(e){return e===32||e===9||e===10||e===12||e===13}let ma=0;function _shadowRootAttached(){ma++}const ha=/* @__PURE__ */ new WeakMap,ga=/* @__PURE__ */ new WeakMap,_a=/* @__PURE__ */ new WeakMap,va=/* @__PURE__ */ new WeakMap,ya=[];function isSlot(e){return e.type===1&&e.tag===Z.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[G]??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[z];if(r.slotAssignment===`manual`){for(let t=i.first;t!==null;t=nextInTree(t,i))if(isSlot(t)&&(_a.get(t)??ya).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[R][z];if(r.slotAssignment===`manual`){let n=_a.get(e);if(n!==void 0)for(let e of n)e.parent===i&&t.push(e);return t}let a=null;for(let n=i.first;n!==null;n=n.next)isSlottable(n)&&(a??=firstSlotsByName(r[z]),a.get(slottableName(n))===e&&t.push(n));return t}function firstSlotsByName(e){let t=/* @__PURE__ */ new Map;for(let n=e.first;n!==null;n=nextInTree(n,e)){if(!isSlot(n))continue;let e=slotName(n);t.has(e)||t.set(e,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=ha.get(e)??ya,r=n.length===t.length;if(r){for(let e=0;e<n.length;e++)if(n[e]!==t[e]){r=!1;break}}if(!r&&(signalSlotChange(e),n.length!==0)){let r=new Set(t);for(let t of n)ga.get(t)===e&&!r.has(t)&&ga.delete(t)}t.length===0?ha.delete(e):ha.set(e,t);for(let n of t)ga.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 assignAppended(e,t){if(t.slotAssignment===`manual`||ga.has(e))return!1;let n=findSlot(e,!1);if(n===null)return!0;let r=ha.get(n);return r===void 0?ha.set(n,[e]):r.push(e),ga.set(e,n),signalSlotChange(n),!0}function unassignRemoved(e,t){let n=ha.get(t);n.length===1?ha.delete(t):n.splice(n.indexOf(e),1),ga.delete(e),signalSlotChange(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)&&(ha.get(e)??ya).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)continue;let a=shadowOf(e);if(a!==null&&isSlottable(r)&&(r.next!==null||!assignAppended(r,a))&&assignASlot(r),isEmptyShadowSlot(e)&&signalSlotChange(e),hasSlotDescendant(r)){let e=treeRoot(r);e.flags&32&&assignSlottablesForTree(e)}}}function slotsAfterRemove(e,t){let n=ga.get(e);if(n!==void 0&&(shadowOf(t)?.slotAssignment===`manual`?assignSlottables(n):unassignRemoved(e,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=ga.get(e);t!==void 0&&assignSlottables(t),assignASlot(e)}}function assignedSlot(e){return ga.get(e)??null}function assignedNodes(e,t){return t?findFlattenedSlottables(e):(ha.get(e)??ya).slice()}function assignedElements(e,t){return assignedNodes(e,t).filter(e=>e.type===1)}function assignManually(e,t){let n=_a.get(e)??ya;for(let e of n)va.delete(e);let r=[],i=null;for(let n of t){let t=va.get(n);if(t!==void 0&&t!==e){let e=_a.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),va.set(n,e)}_a.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(ma===0)return null;let t=e.parent;return t===null||!(t.flags&512)?null:ga.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[R];n=e?e[z]: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,e.flags&8388608&&markNamedAncestors(t),e.flags&3145728&&markRangeAncestors(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[it];n===null?Wi._appended(r,e.node):Wi._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[it];r===null?Wi._popped(e):Wi._rebuild(e)}}function suspendChildList(e){let t=e.flags&256;return e.flags&=-257,t}function resumeChildList(e,t){t!==0&&(e.flags|=256,Wi._rebuild(e.node[it]))}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),Ji!==0&&queueTreeMutationRecord(e,[],o,null,null)}ea!==0&&n!==null&&t.flags&1048576&&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)}ma!==0&&slotsAfterInsert(t,o===null?e:null,o),!r&&Ji!==0&&queueTreeMutationRecord(t,o===null?[e]:o,[],s,n),childrenChanged(t),c[J]++,c[Hr]++;let u=c[Gt];if(u?.groups.size){if(o===null)checkExternalSubtree(e,u);else for(let e of o)checkExternalSubtree(e,u)}Fi&&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)}let ba=null;function connectingRoot(){return ba}function connectSubtree(e,t){let n=ba;ba=e;try{connectNodes(e,t)}finally{ba=n}}function connectNodes(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[G][z],t))}function connectDetachedChildren(e){let t=e.node;for(let n=e.first;n!==null;n=n.next)connectSubtree(n,t);t[J]++,t[Hr]++,t[Gt]?.groups.size&&checkExternalSubtree(e,t[Gt])}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[L]===n&&(t[L]=null),n.flags&4&&n.node._disconnectedSteps(),n.flags&512&&disconnectSubtree(n.node[G][z],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;ea!==0&&(e.flags&3145728||n.flags&1048576)&&rangesBeforeRemove(e,n,indexOf(e)),ta!==0&&iteratorsBeforeRemove(e);let i=e.prev,a=e.next;unlink(e),ma!==0&&slotsAfterRemove(e,n);let o=!!(e.flags&1);o&&disconnectSubtree(e,r),e.flags&8388608&&checkNamesInSubtree(e),Ji!==0&&(addTransientObservers(n,e),t||queueTreeMutationRecord(n,[],[e],i,a)),childrenChanged(n),r[J]++,r[Hr]++,r[Gt]?.groups.size&&checkExternalSubtree(e,r[Gt]),r[Rt]=null,Fi&&o&&flushCEReactions()}function shadowIncludingRoot(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[R];if(e===null)break;t=treeRoot(e[z])}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;ea!==0&&(e.flags&3145728||i.flags&1048576)&&rangesBeforeRemove(e,i,indexOf(e)),ta!==0&&iteratorsBeforeRemove(e);let o=e.prev,s=e.next;unlink(e),ma!==0&&slotsAfterRemove(e,i),Ji!==0&&addTransientObservers(i,e),ea!==0&&n!==null&&t.flags&1048576&&rangesAfterInsert(t,indexOf(n),1);let c=n===null?t.last:n.prev;link(e,t,n),ma!==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);e.flags&8388608&&checkNamesInSubtree(e),Ji!==0&&(queueTreeMutationRecord(i,[],[e],o,s),queueTreeMutationRecord(t,[e],[],c,n)),childrenChanged(i),t!==i&&childrenChanged(t),a[J]++,a[Hr]++,a[Gt]?.groups.size&&checkExternalSubtree(e,a[Gt]),Fi&&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),Ji!==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),Ji!==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){n[Rt]=null,t[J]<=n[J]&&(t[J]=n[J]+1);let r=t[Dn];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,n.flags&524288&&(t[$t]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[G][z],t)}n[Gt]?.groups.size&&checkExternalSubtree(e,n[Gt]),ea!==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[G][z],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[Dn]?n.flags|=2:n.flags&=-3,n.flags&524288&&(t[$t]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[G][z],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 Fi&&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[G];if(n[lt]){let e=r.node.attachShadow({mode:n[zn],clonable:!0,serializable:n[Tr],delegatesFocus:n[Nt],slotAssignment:n[jr]});e[At]=n[At];for(let r=n[z].first;r!==null;r=r.next)appendDetached(cloneTree(r,t,!0),e[z])}}return r}function cloneOne(e,t,n){switch(e.type){case 1:{let r=Ri?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&5218368,e.flags&524288&&(r.doc[$t]=!0)}return e.node._cloningSteps(r.node,n),r}case 3:return t.createTextNode(e.data)[z];case 4:return new e.node.constructor(e.data,t)[z];case 8:return t.createComment(e.data)[z];case 7:return t.createProcessingInstruction(e.name,e.data)[z];case 11:return t.createDocumentFragment()[z];case 10:{let n=e.node;return t.implementation.createDocumentType(n.name,n.publicId,n.systemId)[z]}case 9:return e.node._cloneDocument()[z];case 2:{let n=t.createAttributeNS(e.ns,e.prefix===null?e.name:e.prefix+`:`+e.name);return n.value=e.data,n[z]}}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),Ji!==0&&queueCharacterDataMutationRecord(e,i),e.data=t===0&&n===a?r:i.slice(0,t)+r+i.slice(t+n),ea!==0&&e.flags&1048576&&rangesReplaceData(e,t,n,r.length);let o=e.parent;o!==null&&o.flags&16&&o.node._childrenChangedSteps();let s=e.doc;s[J]++,i.length!==0&&e.data.length!==0&&s[Ze]++}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)[z],o=e.parent;return o!==null&&(insert(a,o,e.next,!1),ea!==0&&(e.flags|o.flags)&1048576&&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;[z];constructor(e,t){if(t===void 0)throw TypeError(`Illegal constructor`);super(),this[z]=new NodeImpl(this,e,t??this)}get nodeType(){return this[z].type}get nodeName(){let e=this[z];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[z].doc.baseURI}get isConnected(){return!!(this[z].flags&1)}get ownerDocument(){let e=this[z];return e.type===9?null:e.doc}getRootNode(e){let t=treeRoot(this[z]);if(e?.composed)for(;t.flags&32;){let e=t.node[R];t=treeRoot(e[z])}return t.node}get parentNode(){let e=this[z].parent;return e===null?null:e.node}get parentElement(){let e=this[z].parent;return e!==null&&e.type===1?e.node:null}hasChildNodes(){return this[z].first!==null}get childNodes(){return this[it]??=Wi._live(this[z])}get firstChild(){let e=this[z].first;return e===null?null:e.node}get lastChild(){let e=this[z].last;return e===null?null:e.node}get previousSibling(){let e=this[z].prev;return e===null?null:e.node}get nextSibling(){let e=this[z].next;return e===null?null:e.node}get nodeValue(){let e=this[z];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[z];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[z];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[z],n=e==null?``:String(e);switch(t.type){case 1:case 11:replaceAll(n===``?null:t.doc.createTextNode(n)[z],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[z],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;)ea!==0&&(a.flags|a.parent.flags)&1048576&&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[z].flags&32)throw new DOMException(`Shadow roots cannot be cloned.`,`NotSupportedError`);return cloneNode(this[z],this[z].doc,e).node}isEqualNode(e){return e!==null&&isEqualNode(this[z],e[z])}isSameNode(e){return this===e}compareDocumentPosition(e){if(this===e)return 0;let t=e[z],n=this[z],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?.[z]===r)return 34;if(e.attr?.[z]===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[z];for(let n=e[z];n!==null;n=n.parent)if(n===t)return!0;return!1}lookupPrefix(e){if(e==null||e===``)return null;let t=namespaceContextElement(this[z]);return t===null?null:locatePrefix(t,String(e))}lookupNamespaceURI(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],t)}isDefaultNamespace(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],null)===t}insertBefore(e,t){return preInsert(e[z],this[z],t===null?null:t[z]),e}appendChild(e){return preInsert(e[z],this[z],null),e}replaceChild(e,t){return replace(t[z],e[z],this[z]),t}removeChild(e){return preRemove(e[z],this[z]),e}_getTheParent(e){return nodeGetTheParent(this,e)}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return inspectNode(this[z],e,t,n)}_replaceAll(e){replaceAll(e===null?null:e[z],this[z])}};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 k;if(t===`xmlns`)return ne;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[z]}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 xa=/* @__PURE__ */ new WeakMap;let Sa=0;function stableOrder(e,t){let n=xa.get(e);n===void 0&&xa.set(e,n=Sa++);let r=xa.get(t);return r===void 0&&xa.set(t,r=Sa++),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[ur];return t===null?e[z].data:t.value}function setAttrValue(e,t){let n=e[ur],r=e[Kn];n===null||r===null?e[z].data=t:changeAttribute(r[z],n,t)}const Ca=/* @__PURE__ */ new Map;function htmlUppercasedQualifiedName(e){if(e.prefix===null){if(!(e.flags&2))return e.name;let t=Ca.get(e.name);return t===void 0&&(Ca.size>=1024&&Ca.clear(),Ca.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()}function derivedCache(e,t,n){let r=e[Rt];r===null&&(e[Rt]=r=/* @__PURE__ */ new WeakMap);let i=r.get(t);return i===void 0&&r.set(t,i=n()),i}function peekDerivedCache(e,t){let n=e[Rt];return n===null?void 0:n.get(t)}function cachedSnapshot(e,t,n){let r=e[Rt]?.get(t);return r?.version===n?r.items:void 0}function storeSnapshot(e,t,n,r){(e[Rt]??=/* @__PURE__ */ new WeakMap).set(t,{version:n,items:r})}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 wa={hovered:null,active:null};function shadowHost(e){let t=wrapperProp(e,R);return t==null?null:t[z]}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=wa.hovered;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function active(e){let t=wa.active;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function anyLink(e){return e.tag===Z.a||e.tag===Z.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[q],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[z];for(let e=o.first;e!==null;e=nextInTree(e,o))if(e.type===1&&e.tag===Z.a&&attr(e,`name`)===r)return e;return null}function target(e){return e.doc[q].indexOf(`#`)!==-1&&targetElement(e)===e}function targetWithin(e){if(e.doc[q].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===Z.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===Z.details||e.tag===Z.dialog)&&attr(e,`open`)!==null}function isMedia(e){return e.tag===Z.audio||e.tag===Z.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=Ta.of(e);return n!==null&&n.has(t)}const Ta={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===Z.textarea||e.tag===Z.input&&usesValueForDirectionality(inputTypeName(e))){let t=textDirection(controlValue$1(e));return t===0?1:t}if(e.tag===Z.input)return 0;for(let t=e.first;t!==null;){if(t.type===1){if(t.tag===Z.bdi||t.tag===Z.script||t.tag===Z.style||t.tag===Z.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===Z.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===Z.input||t.tag===Z.textarea)return 1}}else if(t.tag===Z.bdi){let e=autoDirectionality(t);return e===0?1:e}else if(t.tag===Z.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 Ea={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 Da=[];function elementTagHash(e){if(e.tag!==0&&e.flags&2){let t=Da[e.tag];return t===void 0?Da[e.tag]=tagHash(e.name):t}return tagHash(asciiLowercase$1(e.name))}let Oa=/* @__PURE__ */ new Int32Array,ka=0;const Aa=[];function buildAncestorFilter(e){(++ka===2147483647||Oa.length===0)&&(Oa.length===0?Oa=/* @__PURE__ */ new Int32Array(4096):Oa.fill(0),ka=1);let t=ka,n=0;for(let r=e.parent;r!==null&&r.type===1;r=r.parent){let e=elementTagHash(r);if(Oa[e]=t,Aa[n++]=e,r.id!==``){let e=idHash(r.id);Oa[e]=t,Aa[n++]=e}if(r.attrs!==null){let e=classTokens(r);for(let r=0;r<e.length;r++){let i=classHash(e[r]);Oa[i]=t,Aa[n++]=i}}}return Aa.length=n,Aa}function mayMatchAncestors(e,t,n,r){let i=ka;return e<0?!0:Oa[e]===i?t<0?!0:Oa[t]===i?n<0?!0:Oa[n]===i?r<0||Oa[r]===i:!1:!1:!1}const ja=/* @__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(`.`)),Ma=/* @__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=Na,this.memoEl=null,this.memoIdx=0,this.memoVersion=-1,this.memoParent=null,this.memoCount=0,this.memoCountVersion=-1,this.volatileTest=!1}};const Na=[];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 Pa=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+=Pa;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+=Pa+listSpecificity(r.list);break;default:t+=Pa}}}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:ja.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=Ea[e.name];if(n===void 0)return fail(t,`unsupported pseudo-class :`+e.name),new Test(0);let r=new Test(6);return Ma.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 Fa=!1,Ia=null;function logDep(e,t,n){let r=Ia??=new StateDeps;r.tests.push(e),r.els.push(t),r.results.push(n)}function beginStateDeps(){let e=Fa?Ia:!1;return Fa=!0,Ia=null,e}function endStateDeps(e){let t=Ia;if(e===!1)Fa=!1,Ia=null;else if(Ia=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=Fa;Fa=!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 Fa=t,n}let La=null,Ra=null,za=null;function setScope(e){let t=La;return La=e,t}function setHostContext(e){let t=za;return za=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===La;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=za;za=r;let a=matchCompound(e.comps[t],r)&&(e.leading===0||relatesToAnchor(e.leading,r));return za=i,a}function relatesToAnchor(e,t){let n=Ra;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(za!==null&&t===za)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=za;za=t;let r=featurelessComplex(e,t)===1;return za=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[G];r===1&&!matchHas(a.list,e?e[z]: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[zn]===`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 Fa&&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===La;case 17:return matchesLang(t,e.args);case 18:{let n=directionality(t)===e.a;return Fa&&logDep(e,t,n),n}case 19:{let n=customState(t,e.name);return Fa&&logDep(e,t,n),n}case 20:return za!==null&&t===za;case 21:{if(za===null||t!==za)return!1;let n=za;za=null;let r=matchList(e.list,t);return za=n,r}case 22:{if(za===null||t!==za)return!1;let n=za;za=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 za=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[J],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=Ra;Ra=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 Ra=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 attributeNamesIn(e,t){for(let n=0;n<=e.last;n++){let r=e.comps[n];for(let e=0;e<r.length;e++){let n=r[e];n.op===5&&(t(n.name),n.lower!==n.name&&t(n.lower));let i=n.list;if(i!==null)for(let e=0;e<i.items.length;e++)attributeNamesIn(i.items[e],t)}}}function subjectType(e){if(e.items.length!==1)return null;let t=e.items[0].comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2&&!n.nsCheck)return n}return null}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;subject;indexedId;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):``,this.subject=this.fast===0?subjectType(n):null;let r=this.fastT;this.indexedId=this.fast===2?r.name:this.fast===5&&r.attrOp===1&&r.name===`id`?r.value:``}};const Ba=/* @__PURE__ */ new Map;function clearSelectorCaches(){Ba.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=Ba.get(e);if(r===void 0&&(r=compileQuery(e),Ba.size>=2048&&Ba.clear(),Ba.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[zn]===`quirks`}function run$1(e,t,n,r){if(t.indexedId!==``&&(t.fast!==2||!isQuirks(e))){let i=indexedDescendantById(e,t.indexedId);if(i!==void 0){if(i!==null){if(n)return i;r.push(i)}return null}}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.name;if(!isQuirks(e)){for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.id===i){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{if(t.subject!==null&&a.type===9){let e=elementsOfType(a,t.subject);for(let t=0;t<e.length;t++){let a=e[t];if(matchList(i,a)){if(n)return a;r.push(a)}}return null}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 indexedDescendantById(e,t){if(!(e.flags&1))return;let n=e.doc[yn].get(t);if(n===void 0)return e.type===9?null:void 0;if(!Array.isArray(n)){for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;return e.type===9?null:void 0}}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[yn].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 Va=[];var ResultEntry=class{version;doc;all;first;constructor(e,t){this.version=e,this.doc=t,this.all=null,this.first=void 0}},TypeList=class{version;elements;constructor(e,t){this.version=e,this.elements=t}};const Ha={},newTypes=()=>/* @__PURE__ */ new Map;function elementsOfType(e,t){let n=e.doc,r=derivedCache(n,Ha,newTypes),i=t.lower===t.name?t.name:`${t.lower}\n${t.name}`,a=n[Hr],o=r.get(i);if(o!==void 0&&o.version===a)return o.elements;let s=t.lower,c=t.name,l=[];for(let t=e.first;t!==null;t=next(t,e))t.type===1&&(t.flags&2?t.name===s:t.name===c)&&l.push(t);return r.set(i,new TypeList(a,l)),l}const Ua={},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,Ua,newResults):peekDerivedCache(r,Ua);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[J],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,Va);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,Va);return cachedEntry(e,n,!0).first=i,i}function querySelectorAll(e,t){return Wi._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;structural;constructor(e,t,n,r){this.root=e,this.childrenOnly=t,this.filter=n,this.structural=r}},Wa=class HTMLCollection{constructor(e,t=!1,n=null,r=!1){Object.defineProperty(this,yt,{value:new CollectionState(e,t,n,r)}),Ka===null&&(Ka=indexGetterTable(HTMLCollection.prototype,tableItem,256))}get _s(){return this[yt]}get _rootImpl(){return this[yt].root}static _childrenOf(e){return new HTMLCollection(e,!0,null,!0)}static _descendants(e,t,n){return new HTMLCollection(e,!1,n,t)}_collect(e){let t=this[yt],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[yt],t=e.root.doc,n=e.structural?t[Hr]:t[J],r=cachedSnapshot(t,e,n);if(r!==void 0)return r;let i=[];return this._collect(i),storeSnapshot(t,e,n,i),i.length>Ka.count&&ensureIndexGetters(Ka,i.length),i}get length(){let e=this._snapshot().length;return e>Ka.count&&ensureIndexGetters(Ka,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][z];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][z];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 Ga={values(){let e=iterableTarget(this);return new CollectionIterator(e,e instanceof Wa)}}.values;Object.defineProperties(Wa.prototype,{[Symbol.iterator]:{value:Ga,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`HTMLCollection`,configurable:!0}});let Ka=null;function tableItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}function ensureCollectionIndexGetters(e){Ka!==null&&ensureIndexGetters(Ka,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,qa)}const qa={get(e,t){let n=t===`length`?e.length:e[t];return n!==void 0||typeof t==`symbol`||t in e?n:isArrayIndex$1(t)?e.item(Number(t))??void 0:e.namedItem(t)??void 0},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)[z];let n=t.createDocumentFragment();for(let r of e)n.appendChild(toNode(r,t));return n[z]}function toNode(e,t){return typeof e==`object`&&e&&z in e?e:t.createTextNode(String(e))}function nodeArg(e,t,n,r){if(typeof e==`object`&&e&&z in e)return e[z];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 Ja={get children(){let e=this;return e[ot]??=Wa._childrenOf(e[z])},get firstElementChild(){return wrap(firstElementChild(this[z]))},get lastElementChild(){return wrap(lastElementChild(this[z]))},get childElementCount(){let e=0;for(let t=this[z].first;t!==null;t=t.next)t.type===1&&e++;return e},prepend(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,t.first)},append(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,null)},replaceChildren(...e){let t=this[z],n=convertNodesIntoNode(e,t.doc);ensureReplaceAllValidity(n,t),replaceAll(n,t)},moveBefore(e,t){arguments.length<2&&argumentsRequired(`moveBefore`,parentNodeInterface(this[z]),2,arguments.length);let n=nodeArg(e,`moveBefore`,1,this[z]),r=t===null?null:nodeArg(t,`moveBefore`,2,this[z]);r===n&&(r=n.next),move(n,this[z],r)},querySelector(e){return arguments.length===0&&argumentsRequired(`querySelector`,parentNodeInterface(this[z]),1,0),wrap(querySelector(this[z],String(e)))},querySelectorAll(e){return arguments.length===0&&argumentsRequired(`querySelectorAll`,parentNodeInterface(this[z]),1,0),querySelectorAll(this[z],String(e))}},Ya={before(...e){let t=this[z],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[z],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[z],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[z];e.parent!==null&&remove(e,!1)}},Xa={get previousElementSibling(){return wrap(previousElementSibling(this[z]))},get nextElementSibling(){return wrap(nextElementSibling(this[z]))}},Za={getElementById(e){let t=this[z],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,Ja),addUnscopables(e,[`prepend`,`append`,`replaceChildren`])}function installChildNode(e){define(e,Ya),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,Xa)}function installNonElementParentNode(e){define(e,Za)}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[z]?.type===9?e:currentDocument()}var CharacterData=class extends Node{get data(){return this[z].data}set data(e){let t=this[z];replaceData(t,0,t.data.length,e===null?``:String(e))}get length(){return this[z].data.length}substringData(e,t){arguments.length<2&&arity$1(`substringData`,2,arguments.length);let n=this[z].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[z];replaceData(t,t.data.length,0,String(e))}insertData(e,t){arguments.length<2&&arity$1(`insertData`,2,arguments.length),replaceData(this[z],e>>>0,0,String(t))}deleteData(e,t){arguments.length<2&&arity$1(`deleteData`,2,arguments.length),replaceData(this[z],e>>>0,t>>>0,``)}replaceData(e,t,n){arguments.length<3&&arity$1(`replaceData`,3,arguments.length),replaceData(this[z],e>>>0,t>>>0,String(n))}};installChildNode(CharacterData),installNonDocumentTypeChildNode(CharacterData);var Text=class extends CharacterData{constructor(e=``,t){super(3,nodeDocumentFor(t)),this[z].data=String(e)}splitText(e){return splitText(this[z],Number(e)>>>0).node}get wholeText(){let e=this[z];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(ma===0)return null;let e=assignedSlot(this[z]);if(e===null)return null;let t=this[z].parent,n=t===null?null:t.node[G];return n!=null&&n.mode===`open`?e.node:null}},CDATASection=class extends Text{constructor(e=``,t=currentDocument()){super(e,t),this[z].type=4}},Comment=class extends CharacterData{constructor(e=``,t){super(8,nodeDocumentFor(t)),this[z].data=String(e)}},ProcessingInstruction=class extends CharacterData{constructor(e,t,n=currentDocument()){super(7,n),this[z].name=e,this[z].data=t}get target(){return this[z].name}},DocumentFragment=class extends Node{[R];constructor(e=currentDocument()){super(11,e),this[R]=null}};installParentNode(DocumentFragment),installNonElementParentNode(DocumentFragment);var DocumentType=class extends Node{[Ir];constructor(e,t,n,r){super(10,e);let i=this[z];i.name=t,i.data=n,this[Ir]=r}get name(){return this[z].name}get publicId(){return this[z].data}get systemId(){return this[Ir]}};installChildNode(DocumentType);const Qa=`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;`,$a=`1Æ1Æ1&1&1Á1Á1Ă1Â1Â1А2𝔄1À1À1Α1Ā1⩓1Ą2𝔸11Å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⋂111Į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Н11111≫1≪1
|
|
3
3
|
2𝔑11\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Ż11Ζ1ℨ1ℤ2𝒵1á1á1ă1∾2∾̳1∿1â1â1´1´1а1æ1æ12𝔞1à1à1ℵ1ℵ1α1ā1⨿1&1&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í11î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∈11ĩ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⥭11⊿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⇌11⎱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∥111σ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𝓏11`;let eo=!1,to=/* @__PURE__ */ new Int32Array,no=/* @__PURE__ */ new Int32Array,ro=/* @__PURE__ */ new Uint8Array,io=/* @__PURE__ */ new Int32Array;const ao=/* @__PURE__ */ new Int32Array(128);let oo=/* @__PURE__ */ new Int32Array;const so=[];let co=0,lo=0;function newNode(e){let t=co++;return to[t]=-1,no[t]=-1,ro[t]=e,io[t]=-1,t}function build(){eo=!0;let e=18872;to=new Int32Array(e),no=new Int32Array(e),ro=new Uint8Array(e),io=new Int32Array(e),ao.fill(-1);let t=0;for(let e=0;e<2231;e++){let e=$a.charCodeAt(t)-48;so.push($a.slice(t+1,t+1+e)),t+=1+e}let n=0,r=0,i=18871;for(;n<i;){let e=Qa.charCodeAt(n),t=ao[e];for(t<0&&(t=newNode(e),ao[e]=t),n++;n<i;){let e=Qa.charCodeAt(n);if(e===44)break;let r=to[t],i=-1,a=-1;for(;r>=0;){if(ro[r]===e){i=r;break}a=r,r=no[r]}i<0&&(i=newNode(e),a<0?to[t]=i:no[a]=i),t=i,n++}io[t]=r++,n++}oo=(/* @__PURE__ */ new Int32Array(16384)).fill(-1);for(let e=0;e<128;e++){let t=ao[e];if(!(t<0))for(let n=to[t];n>=0;n=no[n])oo[e*128+ro[n]]=n}}function matchNamedReference(e,t){eo||build(),lo=0;let n=e.length;if(t>=n)return-1;let r=e.charCodeAt(t);if(r>=128)return-1;let i=ao[r];if(i<0)return-1;let a=-1,o=0,s=t+1;if(io[i]>=0&&(a=io[i],o=1),s<n){let t=e.charCodeAt(s),n=t<128?oo[r*128+t]:-1;if(n<0)return lo=o,a;i=n,s++,io[i]>=0&&(a=io[i],o=2)}for(;s<n;){let n=e.charCodeAt(s),r=to[i];for(;r>=0&&ro[r]!==n;)r=no[r];if(r<0)break;i=r,s++,io[i]>=0&&(a=io[i],o=s-t)}return lo=o,a}function matchedLength(){return lo}function entityValue(e){return so[e]}const uo=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(uo[e-128]):String.fromCodePoint(e)}const fo=/* @__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(`.`),po=/* @__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(`.`),mo=1023,ho=/* @__PURE__ */ new Int32Array(1024),_o=/* @__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])&mo;for(;e[r]!==0;)r=r+1&mo;e[r]=n}}fillTable(ho,fo),fillTable(_o,po);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
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&mo;if(!this.nameFix){for(;;){let e=ho[r];if(e===0)break;let i=fo[e];if(i.length===n&&this.src.startsWith(i,t)){this.name=i,this.tagId=e;return}r=r+1&mo}this.name=this.src.slice(t,e),this.tagId=0;return}let i=fixName(this.src.slice(t,e));for(;;){let e=ho[r];if(e===0)break;if(fo[e]===i){this.name=fo[e],this.tagId=e;return}r=r+1&mo}this.name=i,this.tagId=0}finishAttrName(e){let t=this.nameStart,n=e-t,r=``,i=this.nameHash&mo,a=!1;if(this.nameFix)r=fixName(this.src.slice(t,e));else{for(;;){let e=_o[i];if(e===0)break;let o=po[e];if(o.length===n&&this.src.startsWith(o,t)){r=o,a=!0;break}i=i+1&mo}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)&mo;for(;;){let n=ho[t];if(n===0)break;if(fo[n]===e){this.tagId=n;return}t=t+1&mo}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 vo=1024,yo=/* @__PURE__ */ new Int32Array(178);function mark(e,t){for(let n=0;n<t.length;n++)yo[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(vo,[17,38,61,84,88,106,123]);const bo=/* @__PURE__ */ new Map;for(let e=1;e<fo.length;e++)bo.set(fo[e],e);function parserTagId(e){let t=bo.get(e);return t===void 0?0:t}const xo=/* @__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(`.`),So=/* @__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(`.`),Co=/* @__PURE__ */ new Map;for(let e=0;e<xo.length;e++)Co.set(xo[e].toLowerCase(),xo[e]);const wo=/* @__PURE__ */ new Map;for(let e=0;e<So.length;e++)wo.set(So[e].toLowerCase(),So[e]);const To=/* @__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=yo[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=yo[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(yo[this.hTag[r]]&1)return!1}return!1}isSpecial(e){return!!(yo[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||!(yo[r]&32)||r===e)return;t.pop()}}generateImpliedEndTagsThoroughly(){let e=this.stack;for(;;){let t=e[e.length-1];if(this.hNs[t]!==0||!(yo[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&&yo[t]&512&&this.fragmentContext<0&&!this.parsingTemplateContents()&&(yo[t]&vo&&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=wo.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=Co.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<To.length;e++)if(t.startsWith(To[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=!!(yo[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 Eo={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(`
|
|
@@ -43,7 +43,7 @@ colgroup[hidden], col[hidden], thead[hidden], tbody[hidden], tfoot[hidden], tr[h
|
|
|
43
43
|
`);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(`
|
|
44
44
|
`.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===E;if(r&&e.tag===Z.br){t.raw(`
|
|
45
45
|
`);return}if(r&&e.tag===Z.select){collectOptions(e,t);return}if(isReplaced$1(e)){n===2?t.lineBreak(1):t.atomicEnd(t.atomicStart());return}if(r&&e.tag===Z.details&&contentAttr(e,`open`)===null){t.lineBreak(1);for(let n=e.first;n!==null;n=n.next)if(n.type===1&&n.tag===Z.summary){collect$1(n,t);break}t.lineBreak(1);return}let i=r&&e.tag===Z.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(`
|
|
46
|
-
`)),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===Z.option?(collect$1(n,t),n=nextSkippingChildren(n,e)):(n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Z.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===Z.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 Fd=`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`,Id=[[`ariaActiveDescendantElement`,`aria-activedescendant`]],Ld=[[`ariaControlsElements`,`aria-controls`],[`ariaDescribedByElements`,`aria-describedby`],[`ariaDetailsElements`,`aria-details`],[`ariaErrorMessageElements`,`aria-errormessage`],[`ariaFlowToElements`,`aria-flowto`],[`ariaLabelledByElements`,`aria-labelledby`],[`ariaOwnsElements`,`aria-owns`]],Rd=/* @__PURE__ */ new WeakMap,zd=/* @__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=Rd.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=Rd.get(e);r===void 0&&Rd.set(e,r=/* @__PURE__ */ new Map),r.set(t,{record:findRecord(e,t),elements:n,cached:null})}function clearExplicit(e,t){Rd.get(e)?.delete(t),removeAttribute(e,t)}function shadowIncludingParent(e){return e.parent===null?isShadowRootImpl(e)?e.node[R]?.[z]??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 ws))throw TypeError(`Failed to set the '${t}' property on 'Element': Failed to convert value to 'Element'.`);return e[z]}for(let[e,t]of Id)defineAccessor(ws,e,function(){return attrAssociatedElement(this[z],t)?.node??null},function(n){n==null?clearExplicit(this[z],t):setExplicit(this[z],t,[new WeakRef(toElement(n,e))])});for(let[e,t]of Ld)defineAccessor(ws,e,function(){let e=this[z],n=attrAssociatedElements(e,t);if(n===null)return null;let r=liveExplicit(e,t),i=r===null?zd.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=zd.get(e);n===void 0&&zd.set(e,n=/* @__PURE__ */ new Map),n.set(t,a)}return i=a,i},function(n){let r=this[z];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(ws,Fd);const Bd=/* @__PURE__ */ new WeakSet;var HTMLElement=class extends ws{constructor(e,t,n,r){if(e!==void 0){super(e,t,n,r),this[z].flags&128&&(this[z].flags|=4);return}let i=htmlElementConstructorSteps(new.target);if(i.upgrade!==null)return i.upgrade;super(i.doc,i.localName,E,null),initNewCustomElement(this,i.def,i.active)}_connectedSteps(){let e=this[z];(e.flags&128||isValueOf(this)!==null)&&ceConnected(this),e.flags&16384&&faceStateMaybeChanged(e)}_disconnectedSteps(){let e=this[z];(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[z].doc)}_movingSteps(e,t){definitionOf(this)!==void 0&&ceMoved(this)}_shadowDisabled(){return shadowDisabled(this)}_parserAssociateForm(e){parserAssociateForm(this[z],e[z])}_attributeChangedSteps(e,t,n,r){e===`popover`&&r===null&&popoverAttributeChanged(this[z],t,n),definitionOf(this)!==void 0&&ceAttributeChanged(this,e,t,n,r),this[z].flags&16384&&r===null&&(e===`form`||e===`disabled`)&&faceStateMaybeChanged(this[z])}get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get translate(){for(let e=this[z];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[z],`translate`,e?`yes`:`no`)}get hidden(){return contentAttr(this[z],`hidden`)!==null}set hidden(e){typeof e==`string`&&asciiLowercase$1(e)===`until-found`?setAttribute(this[z],`hidden`,`until-found`):e===!1||e===``||e==null||e===0||Number.isNaN(e)?removeAttribute(this[z],`hidden`):setAttribute(this[z],`hidden`,``)}get accessKeyLabel(){let e=contentAttr(this[z],`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[z],`draggable`);if(e!==null){let t=asciiLowercase$1(e);if(t===`true`)return!0;if(t===`false`)return!1}let t=this[z];return t.tag===Z.img||t.tag===Z.a&&contentAttr(t,`href`)!==null}set draggable(e){setAttribute(this[z],`draggable`,e?`true`:`false`)}get spellcheck(){for(let e=this[z];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[z],`spellcheck`,e?`true`:`false`)}get autocorrect(){return usedAutocorrection(this[z])}set autocorrect(e){setAttribute(this[z],`autocorrect`,e?`on`:`off`)}get contentEditable(){let e=this[z];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[z],`contenteditable`);else if(t===`true`||t===`false`||t===`plaintext-only`)setAttribute(this[z],`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[z])}get innerText(){return getInnerText(this[z])}set innerText(e){let t=e===null?``:String(e);this._replaceAll(t===``?null:renderedTextFragment(t,this[z]))}get outerText(){return getInnerText(this[z])}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[z]);i.hasChildNodes()||i.appendChild(this[z].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[z])&&!Bd.has(this)){Bd.add(this);try{fireSyntheticClick(this)}finally{Bd.delete(this)}}}showPopover(e){let t=this[z];t.flags|=12,showPopover(t,!0,popoverSource(e))}hidePopover(){hidePopover(this[z],!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[z];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(Vd.has(this))throw new DOMException(`ElementInternals for the specified element was already attached.`,`NotSupportedError`);let t=new ElementInternals(this);return Vd.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===Z.button||t===Z.fieldset||t===Z.input||t===Z.output||t===Z.select||t===Z.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===Z.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[z])},function(e){setAttribute(this[z],`autocapitalize`,String(e))}),defineAccessor(HTMLElement,`writingSuggestions`,function(){return computedWritingSuggestions(this[z])?`true`:`false`},function(e){setAttribute(this[z],`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 Vd=/* @__PURE__ */ new WeakMap;function customStatesOf(e){return Vd.get(e)?.[Mr]??null}var ElementInternals=class{[Lr];[Mr];[Zr];constructor(e){if(!(e instanceof HTMLElement)||Vd.has(e))throw TypeError(`Illegal constructor`);this[Lr]=e,this[Mr]=null,this[Zr]=null}get shadowRoot(){let e=this[Lr][G];return e==null||!e[Ke]?null:e}get states(){return this[Mr]??=new CustomStateSet}get form(){return internalsForm(this[Lr][z])}get labels(){return internalsLabels(this[Lr][z])}get willValidate(){return internalsWillValidate(this[Lr][z])}get validity(){return internalsValidity(this[Lr][z])}get validationMessage(){return internalsValidationMessage(this[Lr][z])}setFormValue(e,t){internalsSetFormValue(this[Lr][z],e,t),this[Zr]=e}setValidity(e,t,n){internalsSetValidity(this[Lr][z],e,t,n)}checkValidity(){return internalsCheckValidity(this[Lr][z])}reportValidity(){return internalsCheckValidity(this[Lr][z],`reportValidity`)}};const Hd=/* @__PURE__ */ new WeakMap;for(let e of Fd.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 Hd.get(this)?.get(r)??null},set(e){let t=Hd.get(this);e==null?t?.delete(r):(t===void 0&&Hd.set(this,t=/* @__PURE__ */ new Map),t.set(r,String(e)))},configurable:!0,enumerable:!0})}const Ud=/* @__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 ws))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=Ud.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=Ud.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&&Ud.set(this,r=/* @__PURE__ */ new Map),r.set(e,{refs:i,cached:null})},configurable:!0,enumerable:!0})}var CustomStateSet=class extends Set{};const Wd=Symbol(`nonce`);function installHTMLOrSVGElement(e){installEventHandlers(e.prototype,`element`),defineAccessor(e,`nonce`,function(){let e=this[Wd],t=contentAttr(this[z],`nonce`);return e!==void 0&&e[1]===t?e[0]:t??``},function(e){Object.defineProperty(this,Wd,{value:[String(e),contentAttr(this[z],`nonce`)],writable:!0,configurable:!0})}),bool(e,`autofocus`),defineAccessor(e,`tabIndex`,function(){let e=tabIndexValue(this[z]);return Number.isNaN(e)?defaultTabIndex(this[z]):e},function(e){setAttribute(this[z],`tabindex`,String(Number(e)|0))}),Object.defineProperty(e.prototype,"focus",{value:function focus(e){focusElement(this[z],e)},writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"blur",{value:function blur(){blurElement(this[z])},writable:!0,configurable:!0,enumerable:!0})}installHTMLOrSVGElement(HTMLElement);for(let e of[Q,ShadowRoot])Object.hasOwn(e.prototype,`activeElement`)||defineAccessor(e,`activeElement`,function(){return activeElement(this[z])});Object.hasOwn(Q.prototype,`hasFocus`)||Object.defineProperty(Q.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[z]}const Gd=class HTMLCollection$1 extends Wa{static{__name(this,`HTMLCollection`)}constructor(e,t){super(e,!1,null,!0),Object.defineProperty(this,Jt,{value:t})}_collect(e){this[Jt](this._s.root,e)}};function fnCollection(e,t){return new Gd(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[z],t=contentAttr(e,`href`)??``,n=URL.parse(t,e.doc.URL);return n===null?t:n.href}set href(e){setAttribute(this[z],`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[z];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[z],`width`)}set width(e){setAttribute(this[z],`width`,String(clampUlong(e)))}get height(){return dimension(this[z],`height`)}set height(e){setAttribute(this[z],`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`,ic),bool(HTMLImageElement,`isMap=ismap`),ulong(HTMLImageElement,`hspace vspace`),enumerated(HTMLImageElement,`referrerPolicy=referrerpolicy`,ac),enumerated(HTMLImageElement,`decoding`,{keywords:[`sync`,`async`,`auto`],missing:`auto`,invalid:`auto`}),enumerated(HTMLImageElement,`loading`,oc),enumerated(HTMLImageElement,`fetchPriority=fetchpriority`,sc);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 Kd=function Image(e,t){if(new.target===void 0)throw TypeError(`Failed to construct 'Image': Please use the 'new' operator.`);let n=currentDocument().createElementNS(E,`img`);return e!==void 0&&setAttribute(n[z],`width`,String(Number(e)>>>0)),t!==void 0&&setAttribute(n[z],`height`,String(Number(t)>>>0)),n};Kd.prototype=HTMLImageElement.prototype;var HTMLIFrameElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].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`,ac),enumerated(HTMLIFrameElement,`loading`,oc);var HTMLEmbedElement=class extends HTMLElement{getSVGDocument(){return null}};url(HTMLEmbedElement,`src`),str(HTMLEmbedElement,`type width height align name`);var HTMLObjectElement=class extends HTMLElement{get contentDocument(){return null}get contentWindow(){return null}getSVGDocument(){return null}get form(){let e=formOwner(this[z]);return e===null?null:e.node}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};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}};defineConstants(HTMLTrackElement,{NONE:0,LOADING:1,LOADED:2,ERROR:3}),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,qd,()=>fnCollection(this[z],(e,t)=>{for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))n.tag===Z.area&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}};const qd=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))}};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 Jd=Symbol(`rows`),Yd=Symbol(`tBodies`),Xd=Symbol(`cells`);function fillTableRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.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===Z.tr?t.push(n.node):n.tag===Z.tbody&&pushRows(n,t));for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.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===Z.tr&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}var HTMLTableElement=class extends HTMLElement{get caption(){let e=childOfType(this[z],Z.caption);return e===null?null:e.node}set caption(e){let t=childOfType(this[z],Z.caption);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this.firstChild)}createCaption(){let e=childOfType(this[z],Z.caption);if(e!==null)return e.node;let t=this[z].doc.createElement(`caption`);return this.insertBefore(t,this.firstChild),t}deleteCaption(){let e=childOfType(this[z],Z.caption);e!==null&&this.removeChild(e.node)}get tHead(){let e=childOfType(this[z],Z.thead);return e===null?null:e.node}set tHead(e){if(e!==null&&e[z].tag!==Z.thead)throw hierarchyError(`Not a thead element.`);let t=childOfType(this[z],Z.thead);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this._afterCaptionAndColgroups())}createTHead(){let e=childOfType(this[z],Z.thead);if(e!==null)return e.node;let t=this[z].doc.createElement(`thead`);return this.insertBefore(t,this._afterCaptionAndColgroups()),t}deleteTHead(){let e=childOfType(this[z],Z.thead);e!==null&&this.removeChild(e.node)}get tFoot(){let e=childOfType(this[z],Z.tfoot);return e===null?null:e.node}set tFoot(e){if(e!==null&&e[z].tag!==Z.tfoot)throw hierarchyError(`Not a tfoot element.`);let t=childOfType(this[z],Z.tfoot);t!==null&&this.removeChild(t.node),e!==null&&this.appendChild(e)}createTFoot(){let e=childOfType(this[z],Z.tfoot);return e===null?this.appendChild(this[z].doc.createElement(`tfoot`)):e.node}deleteTFoot(){let e=childOfType(this[z],Z.tfoot);e!==null&&this.removeChild(e.node)}get tBodies(){return sameObject(this,Yd,()=>fnCollection(this[z],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.tbody&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}createTBody(){let e=this[z].doc.createElement(`tbody`),t=null;for(let e=this[z].first;e!==null;e=e.next)e.type===1&&e.tag===Z.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,Jd,()=>fnCollection(this[z],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[z].doc,i=r.createElement(`tr`);if(n===0&&childOfType(this[z],Z.tbody)===null)this.appendChild(r.createElement(`tbody`)).appendChild(i);else if(n===0){let e=null;for(let t=this[z].first;t!==null;t=t.next)t.type===1&&t.tag===Z.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[z].first;e!==null;e=e.next)if(e.type===1&&(e.tag!==Z.caption&&e.tag!==Z.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,Jd,()=>fnCollection(this[z],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[z].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[z].parent;if(e===null)return-1;let t=null;if(e.tag===Z.table&&e.ns===`http://www.w3.org/1999/xhtml`?t=e:(e.tag===Z.thead||e.tag===Z.tbody||e.tag===Z.tfoot)&&e.ns===`http://www.w3.org/1999/xhtml`&&e.parent!==null&&e.parent.tag===Z.table&&(t=e.parent),t===null)return-1;let n=[];return fillTableRows(t,n),n.indexOf(this)}get sectionRowIndex(){let e=this[z].parent;if(e===null)return-1;let t=[];return e.tag===Z.table?fillTableRows(e,t):pushRows(e,t),t.indexOf(this)}get cells(){return sameObject(this,Xd,()=>fnCollection(this[z],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&(n.tag===Z.td||n.tag===Z.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[z].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[z].parent;if(e===null||e.tag!==Z.tr)return-1;let t=0;for(let n=e.first;n!==null;n=n.next){if(n===this[z])return t;n.type===1&&(n.tag===Z.td||n.tag===Z.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 Zd=[`noreferrer`,`noopener`,`opener`];function installHyperlinkUtils(e){let t=e.prototype,define=(e,n,r)=>{Object.defineProperty(t,e,{get(){let e=this[z];return n(linkURL(e),e)},set:r?function(e){let t=this[z],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[z],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[z],`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[z],n=linkURL(t);if(n===null)return;let r=t.doc[Y];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[Y];if(t===null)return;let n=contentAttr(e,`target`);if(n===null){let t=querySelector(e.doc[z],`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[Zn]??t;else if(r===`_top`)for(i=t;i[Zn]!==null;)i=i[Zn];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[q].href),t=new URL(a.href);e.hash=``,t.hash=``,e.href!==t.href&&reportNotImplemented(o,Lu)},0)}var HTMLAnchorElement=class extends HTMLElement{get text(){let e=this[z],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[z],`href`)!==null}_activationBehavior(e){contentAttr(this[z],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[z]))}};installHyperlinkUtils(HTMLAnchorElement),str(HTMLAnchorElement,`target download ping rel hreflang type coords charset name rev shape`),tokenList(HTMLAnchorElement,`relList`,`rel`,Zd),enumerated(HTMLAnchorElement,`referrerPolicy=referrerpolicy`,ac);var HTMLAreaElement=class extends HTMLElement{get _hasActivationBehavior(){return contentAttr(this[z],`href`)!==null}_activationBehavior(e){contentAttr(this[z],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[z]))}};installHyperlinkUtils(HTMLAreaElement),str(HTMLAreaElement,`alt coords shape target download ping rel hreflang type`),tokenList(HTMLAreaElement,`relList`,`rel`,Zd),enumerated(HTMLAreaElement,`referrerPolicy=referrerpolicy`,ac),bool(HTMLAreaElement,`noHref=nohref`);const Qd={load:stubbedMethod(`HTMLMediaElement`,`load`),play:stubbedMethod(`HTMLMediaElement`,`play`),pause:stubbedMethod(`HTMLMediaElement`,`pause`),addTextTrack:stubbedMethod(`HTMLMediaElement`,`addTextTrack`)},windowOf=e=>e[z].doc[Y];var MediaState=class{paused=!0;currentTime=0;volume=1;muted=null;playbackRate=1;defaultPlaybackRate=1;ended=!1;seeking=!1;preservesPitch=!0;srcObject=null};const $d=Symbol(`media`);function state$1(e){let t=e[$d];return t===void 0&&(t=new MediaState,Object.defineProperty(e,$d,{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};defineConstants(MediaError,{MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4});var 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[z],`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),Qd.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),Qd.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),Qd.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),Qd.addTextTrack),new DOMException(`Text tracks are not supported.`,`NotSupportedError`)}setMediaKeys(){return Promise.resolve()}get mediaKeys(){return null}setSinkId(){return Promise.resolve()}get sinkId(){return``}};defineConstants(HTMLMediaElement,{NETWORK_EMPTY:0,NETWORK_IDLE:1,NETWORK_LOADING:2,NETWORK_NO_SOURCE:3,HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4}),url(HTMLMediaElement,`src`),enumerated(HTMLMediaElement,`crossOrigin=crossorigin`,ic),enumerated(HTMLMediaElement,`preload`,{keywords:[`none`,`metadata`,`auto`],missing:`metadata`,invalid:`metadata`,empty:`auto`}),enumerated(HTMLMediaElement,`loading`,oc),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`))}};ulong(HTMLVideoElement,`width height`),url(HTMLVideoElement,`poster`),bool(HTMLVideoElement,`playsInline=playsinline disablePictureInPicture=disablepictureinpicture`);const ef=function Audio(e){if(new.target===void 0)throw TypeError(`Failed to construct 'Audio': Please use the 'new' operator.`);let t=currentDocument().createElementNS(E,`audio`);return setAttribute(t[z],`preload`,`auto`),e!==void 0&&setAttribute(t[z],`src`,String(e)),t};ef.prototype=HTMLAudioElement.prototype;const tf=/* @__PURE__ */ new WeakMap;function queueDetailsToggle(e,t,n){let r=tf.get(e);r!==void 0&&(t=r.oldState,r.cancelled=!0);let i={oldState:t,cancelled:!1};tf.set(e,i),queueElementTask(e,()=>{i.cancelled||(tf.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===Z.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[z].flags|=12}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;let i=this[z];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[z])}};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 nf=HTMLElement,rf=class HTMLElement extends nf{get _hasActivationBehavior(){return isSummaryForParentDetails(this[z])}_activationBehavior(e){let t=this[z];if(!isSummaryForParentDetails(t))return;let n=e?.target?.[z];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 Z.a:if(contentAttr(n,`href`)!==null)return!0;break;case Z.audio:case Z.video:if(contentAttr(n,`controls`)!==null)return!0;break;case Z.img:if(contentAttr(n,`usemap`)!==null)return!0;break;case Z.input:if(contentAttr(n,`type`)?.toLowerCase()!==`hidden`)return!0;break;case Z.button:case Z.details:case Z.embed:case Z.iframe:case Z.label:case Z.select:case Z.textarea:return!0}}return!1}const af=/* @__PURE__ */ new WeakMap;function dialogRecord(e){let t=af.get(e);return t===void 0&&(t={returnValue:``,toggleTracker:null,closeWatcher:null,requestCloseReturnValue:null,requestCloseSource:null,enableCloseWatcherForRequestClose:!1},af.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[z].flags|=12}get returnValue(){return af.get(this[z])?.returnValue??``}set returnValue(e){dialogRecord(this[z]).returnValue=String(e)}get closedBy(){return computedClosedBy(this[z])}set closedBy(e){setAttribute(this[z],`closedby`,String(e))}show(){let e=this[z];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[L]);let t=e.doc;hidePopoversUntil(t,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}showModal(){showModalDialog(this[z],null)}close(e){closeDialog(this[z],e===void 0?null:String(e),null)}requestClose(e){requestCloseDialog(this[z],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[z];n===null&&t!==null&&dialogCleanupSteps(i),isFullyActive(i.doc)&&i.flags&1&&n!==null&&t===null&&dialogSetupSteps(i)}_connectedSteps(){super._connectedSteps();let e=this[z];isFullyActive(e.doc)&&contentAttr(e,`open`)!==null&&e.flags&1&&dialogSetupSteps(e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[z];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[L];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[L];(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=af.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!==Z.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===Z.input&&contentAttr(t,`type`)?.toLowerCase()===`image`){let e=Uu.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===Z.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=af.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[R];n=e===null?null:e[z]}else n=null}return!1}setTopLayerDialogHooks(dialogFocusingSteps,lightDismissOpenDialogs),setDialogCommandSteps(dialogCommandSteps),setDialogSubmission(submitFormToDialog);const of=/* @__PURE__ */ new WeakMap;function templateContentsOwner(e){let t=of.get(e);if(t!==void 0)return t;let n=e[Dn]?Q._createHTML(null):new Q;return e[Dn]||(n[gt]=e[gt]),of.set(n,n),of.set(e,n),n}const sf=Symbol(`content`);var HTMLTemplateElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=me}get content(){let e=this[sf];return e===void 0&&(e=new DocumentFragment(templateContentsOwner(this[z].doc)),e[R]=this,Object.defineProperty(this,sf,{value:e,writable:!0})),e}_cloningSteps(e,t){if(super._cloningSteps(e,t),!t)return;let n=this[sf];if(n===void 0||n[z].first===null)return;let r=e.content,i=r[z].doc;for(let e=n[z].first;e!==null;e=e.next)appendDetached(cloneNode(e,i,!0),r[z])}_adoptingSteps(e){super._adoptingSteps(e);let t=this[sf];t!==void 0&&templateContentsOwner(this[z].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[z],!!e?.flatten).map(e=>e.node)}assignedElements(e){return assignedElements(this[z],!!e?.flatten).map(e=>e.node)}assign(...e){let t=[];for(let n of e){let e=n?.[z];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[z],t)}};str(HTMLSlotElement,`name`);const cf={createSheet:null,removeSheet:null,createLinkSheet:null},lf=Symbol(`sheet`);function getSheet(e){return e[lf]??null}function setSheet(e,t){Object.defineProperty(e,lf,{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),cf.removeSheet?.(e[z],t))}function updateStyleBlock(e){let t=e[z];if(removeAssociatedSheet(e),!(t.flags&1))return;let n=contentAttr(t,`type`);if(n!==null&&n!==``&&n.toLowerCase()!==`text/css`)return;let r=cf.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[z].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[z];if(removeAssociatedSheet(e),!(t.flags&1)||!isStylesheetLink(t)||contentAttr(t,`disabled`)!==null)return;let n=cf.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[z].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`,ic),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`,ac),enumerated(HTMLLinkElement,`fetchPriority=fetchpriority`,sc),bool(HTMLLinkElement,`disabled`);const uf=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[z])}set text(e){this.textContent=String(e)}get async(){return(this[uf]??!0)||contentAttr(this[z],`async`)!==null}set async(e){Object.defineProperty(this,uf,{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`,ic),enumerated(HTMLScriptElement,`referrerPolicy=referrerpolicy`,ac),enumerated(HTMLScriptElement,`fetchPriority=fetchpriority`,sc),tokenList(HTMLScriptElement,`blocking`,`blocking`,[`render`]);var HTMLTitleElement=class extends HTMLElement{get text(){return childTextContent(this[z])}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[z];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.tag===Z.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[z]),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[z]);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(D,`title`)[z],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`))[z]}r.node.textContent=t}Object.hasOwn(Q.prototype,`title`)||Object.defineProperty(Q.prototype,"title",{get(){return getDocumentTitle(this)},set(e){setDocumentTitle(this,String(e))},configurable:!0,enumerable:!0}),Object.hasOwn(Q.prototype,`dir`)||Object.defineProperty(Q.prototype,"dir",{get(){let e=firstElementChild(this[z]);if(e===null||e.tag!==Z.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[z]);t!==null&&t.tag===Z.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(Q.prototype,e)||Object.defineProperty(Q.prototype,e,{get(){let e=this.body;return e===null||e[z].tag!==Z.body?``:contentAttr(e[z],t)??``},set(e){let n=this.body;n!==null&&n[z].tag===Z.body&&n.setAttribute(t,e===null?``:String(e))},configurable:!0,enumerable:!0});var SVGNumber=class{#e=0;get value(){return this.#e}set value(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to set the 'value' property on 'SVGNumber': The provided float value is non-finite.`);this.#e=Math.fround(t)}};const df=`[ \\t\\n\\r\\f]`,ff=`[+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?`,pf=`(?:${df}*,${df}*|${df}+)`,mf=RegExp(`^${df}*(${ff})${pf}(${ff})${pf}(${ff})${pf}(${ff})${df}*$`);function parseViewBox(e,t){let n=mf.exec(contentAttr(e[z],t)??``);if(n!==null){let e=Number(n[3]),t=Number(n[4]);if(e>=0&&t>=0)return[Number(n[1]),Number(n[2]),e,t]}return[0,0,0,0]}function writeViewBox(e,t,n,r){let i=parseViewBox(e,t);i[n]=Number(r),setAttribute(e[z],t,`${i[0]} ${i[1]} ${i[2]} ${i[3]}`)}var ReflectedRect=class extends Xo{#e;#t;constructor(e,t){super(),this.#e=e,this.#t=t}get x(){return parseViewBox(this.#e,this.#t)[0]}set x(e){writeViewBox(this.#e,this.#t,0,e)}get y(){return parseViewBox(this.#e,this.#t)[1]}set y(e){writeViewBox(this.#e,this.#t,1,e)}get width(){return parseViewBox(this.#e,this.#t)[2]}set width(e){writeViewBox(this.#e,this.#t,2,e)}get height(){return parseViewBox(this.#e,this.#t)[3]}set height(e){writeViewBox(this.#e,this.#t,3,e)}get top(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[1],e[1]+e[3])}get right(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[0],e[0]+e[2])}get bottom(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[1],e[1]+e[3])}get left(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[0],e[0]+e[2])}toJSON(){return new DOMRectReadOnly(this.x,this.y,this.width,this.height).toJSON()}},ReflectedRectReadOnly=class extends DOMRectReadOnly{#e;#t;constructor(e,t){super(),this.#e=e,this.#t=t}get x(){return parseViewBox(this.#e,this.#t)[0]}get y(){return parseViewBox(this.#e,this.#t)[1]}get width(){return parseViewBox(this.#e,this.#t)[2]}get height(){return parseViewBox(this.#e,this.#t)[3]}get top(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[1],e[1]+e[3])}get right(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[0],e[0]+e[2])}get bottom(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[1],e[1]+e[3])}get left(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[0],e[0]+e[2])}toJSON(){return new DOMRectReadOnly(this.x,this.y,this.width,this.height).toJSON()}};exposeMembers(ReflectedRect,ReflectedRectReadOnly),Object.defineProperty(ReflectedRect.prototype,"constructor",{value:Xo,configurable:!0,writable:!0}),Object.defineProperty(ReflectedRectReadOnly.prototype,"constructor",{value:DOMRectReadOnly,configurable:!0,writable:!0});var SVGAnimatedRect=class{#e;#t;#n=null;#r=null;constructor(e,t){this.#e=e,this.#t=t}get baseVal(){return this.#n??=new ReflectedRect(this.#e,this.#t)}get animVal(){return this.#r??=new ReflectedRectReadOnly(this.#e,this.#t)}};const hf=[`unknown`,`none`,`xMinYMin`,`xMidYMin`,`xMaxYMin`,`xMinYMid`,`xMidYMid`,`xMaxYMid`,`xMinYMax`,`xMidYMax`,`xMaxYMax`],gf=[`unknown`,`meet`,`slice`],_f=/^(none|x(?:Min|Mid|Max)Y(?:Min|Mid|Max))(?: +(meet|slice))?$/;function parsePreserveAspectRatio(e){let t=_f.exec(contentAttr(e[z],`preserveAspectRatio`)??``);return t===null?[`xMidYMid`,`meet`]:[t[1],t[2]??`meet`]}var SVGPreserveAspectRatio=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get align(){return hf.indexOf(parsePreserveAspectRatio(this.#e)[0])}set align(e){this.#n(hf,e,0,`Invalid alignment`)}get meetOrSlice(){return gf.indexOf(parsePreserveAspectRatio(this.#e)[1])}set meetOrSlice(e){this.#n(gf,e,1,`Invalid meet-or-slice value`)}#n(e,t,n,r){if(this.#t)throw new DOMException(`Attempting to modify a read-only SVGPreserveAspectRatio`,`NoModificationAllowedError`);let i=e[Number(t)&65535];if(i===void 0||i===`unknown`)throw TypeError(r);let a=parsePreserveAspectRatio(this.#e);a[n]=i,setAttribute(this.#e[z],`preserveAspectRatio`,`${a[0]} ${a[1]}`)}};defineConstants(SVGPreserveAspectRatio,{SVG_PRESERVEASPECTRATIO_UNKNOWN:0,SVG_PRESERVEASPECTRATIO_NONE:1,SVG_PRESERVEASPECTRATIO_XMINYMIN:2,SVG_PRESERVEASPECTRATIO_XMIDYMIN:3,SVG_PRESERVEASPECTRATIO_XMAXYMIN:4,SVG_PRESERVEASPECTRATIO_XMINYMID:5,SVG_PRESERVEASPECTRATIO_XMIDYMID:6,SVG_PRESERVEASPECTRATIO_XMAXYMID:7,SVG_PRESERVEASPECTRATIO_XMINYMAX:8,SVG_PRESERVEASPECTRATIO_XMIDYMAX:9,SVG_PRESERVEASPECTRATIO_XMAXYMAX:10,SVG_MEETORSLICE_UNKNOWN:0,SVG_MEETORSLICE_MEET:1,SVG_MEETORSLICE_SLICE:2});var SVGAnimatedPreserveAspectRatio=class{#e;#t=null;#n=null;constructor(e){this.#e=e}get baseVal(){return this.#t??=new SVGPreserveAspectRatio(this.#e,!1)}get animVal(){return this.#n??=new SVGPreserveAspectRatio(this.#e,!0)}};const vf=Symbol(`viewBox`),yf=Symbol(`preserveAspectRatio`);function installFitToViewBox(e){Object.defineProperty(e.prototype,"viewBox",{get(){let e=this[vf];return e===void 0&&(e=new SVGAnimatedRect(this,`viewBox`),Object.defineProperty(this,vf,{value:e})),e},configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"preserveAspectRatio",{get(){let e=this[yf];return e===void 0&&(e=new SVGAnimatedPreserveAspectRatio(this),Object.defineProperty(this,yf,{value:e})),e},configurable:!0,enumerable:!0})}exposeMembers(SVGNumber,SVGAnimatedRect,SVGPreserveAspectRatio,SVGAnimatedPreserveAspectRatio);for(let e of[SVGNumber,SVGAnimatedRect,SVGPreserveAspectRatio,SVGAnimatedPreserveAspectRatio])defineInterfaceShape(e);var SVGAnimatedString=class{[F];[We];constructor(e,t){this[F]=e,this[We]=t}get baseVal(){let e=this[F][z];return this[We]===`href`?contentAttr(e,`href`)??xlinkHref(e)??``:contentAttr(e,this[We])??``}set baseVal(e){setAttribute(this[F][z],this[We],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 bf=Symbol(`className`),xf=Symbol(`href`);var SVGElement=class extends ws{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get className(){let e=this[bf];return e===void 0&&(e=new SVGAnimatedString(this,`class`),Object.defineProperty(this,bf,{value:e})),e}set className(e){}get ownerSVGElement(){for(let e=this[z].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[xf];return e===void 0&&(e=new SVGAnimatedString(this,`href`),Object.defineProperty(this,xf,{value:e})),e},configurable:!0,enumerable:!0})}var SVGGraphicsElement=class extends SVGElement{getBBox(){return new Xo}getCTM(){return new Ss}getScreenCTM(){return new Ss}},SVGGeometryElement=class extends SVGGraphicsElement{isPointInFill(){return!1}isPointInStroke(){return!1}getTotalLength(){return 0}getPointAtLength(){return new Yo}},SVGSVGElement=class extends SVGGraphicsElement{createSVGNumber(){return new SVGNumber}createSVGLength(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGAngle(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGPoint(){return new Yo}createSVGMatrix(){return new Ss}createSVGRect(){return new Xo}createSVGTransform(){return{type:0,matrix:new Ss,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[z];for(let n=t.first;n!==null;n=nextEl(n,t))if(n.type===1&&n.id===String(e))return n.node;return null}};installFitToViewBox(SVGSVGElement);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{};installFitToViewBox(SVGSymbolElement);var 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{};installFitToViewBox(SVGMarkerElement);var SVGClipPathElement=class extends SVGElement{},SVGMaskElement=class extends SVGElement{},SVGPatternElement=class extends SVGElement{};installFitToViewBox(SVGPatternElement),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{};installFitToViewBox(SVGViewElement);var SVGFilterElement=class extends SVGElement{};const Sf=/* @__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 ws{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}};installHTMLOrSVGElement(MathMLElement);const Cf=/* @__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(`.`))Cf.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`])Cf.set(e,3);const wf=[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=Cf.get(i);if(a===void 0||n.length>wf[a])return``;if(a===0||a===1)return e.tag===Z.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=Cf.get(e),a!==2&&a!==3||r>wf[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[z])},set(e){setAttribute(this[z],`autocomplete`,String(e))},enumerable:!0,configurable:!0})}const Tf=/^-?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?$/;function parseFloatStrict(e){if(!Tf.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 Ef=[31,28,31,30,31,30,31,31,30,31,30,31];function daysInMonth(e,t){return e===2&&isLeapYear(t)?29:Ef[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 Df=/^(\d{4,})-(\d{2})$/,Of=/^(\d{4,})-(\d{2})-(\d{2})$/,kf=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/,Af=/^(\d{4,})-W(\d{2})$/;function isValidDateString(e){let t=Of.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=Df.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=Af.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=Df.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=Of.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=kf.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=Af.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 jf=/^[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 jf.test(e)}function isValidAbsoluteURL(e){return URL.canParse(e)}const Mf=Symbol(`FileList`);var FileList=class{constructor(e,t){if(e!==Mf)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(Mf,e)}var ControlState=class{value;dirtyValue;checked;checkedSet;dirtyChecked;indeterminate;files;selStart;selEnd;selDir;userEdited;badInput;uiValue;constructor(){this.value=``,this.dirtyValue=!1,this.checked=!1,this.checkedSet=!1,this.dirtyChecked=!1,this.indeterminate=!1,this.files=null,this.selStart=0,this.selEnd=0,this.selDir=`none`,this.userEdited=!1,this.badInput=!1,this.uiValue=null}};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{[N];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=12,this[N]=new ControlState}get type(){return ca[inputType(this[z])]}set type(e){setAttribute(this[z],`type`,String(e))}_currentValue(e){return this[N].dirtyValue?this[N].value:sanitizeValue(e,attr(this[z],`value`)??``,this[z])}get value(){let e=this[z],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[N].files;return n===null||n.length===0?``:`C:\\fakepath\\`+n.item(0).name}set value(e){let t=e===null?``:String(e),n=this[z],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[N].files=null}_setValueFromAPI(e,t){let n=this._currentValue(e);if(this[z].doc[J]++,this[N].value=sanitizeValue(e,t,this[z]),this[N].dirtyValue=!0,this[N].userEdited=!1,this[N].badInput=!1,this[N].uiValue=null,this[N].value!==n){let e=this[N].value.length;this[N].selStart=e,this[N].selEnd=e,this[N].selDir=`none`}}_checkedness(){return this[N].checkedSet?this[N].checked:attr(this[z],`checked`)!==null}_setCheckedness(e,t){return this[z].doc[J]++,this[N].checked=e,this[N].checkedSet=!0,t&&(this[N].dirtyChecked=!0),e&&inputType(this[z])===16?uncheckOtherRadios(this[z]):null}get checked(){return this._checkedness()}set checked(e){this._setCheckedness(!!e,!0)}get indeterminate(){return this[N].indeterminate}set indeterminate(e){this[z].doc[J]++,this[N].indeterminate=!!e}get files(){return inputType(this[z])===17?this[N].files??=createFileList([]):null}set files(e){inputType(this[z])===17&&e!=null&&(this[N].files=toFileList(e))}get valueAsNumber(){let e=inputType(this[z]);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[z]);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[z]);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[z]);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[z],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[z])))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[z]))?Math.min(this[N].selStart,this._selectionLength()):null}set selectionStart(e){this._assertSelectable(`selectionStart`);let t=toUnsignedLong(e),n=Math.max(t,this.selectionEnd);setSelection(this,t,n,this[N].selDir)}get selectionEnd(){return supportsSelectionType(inputType(this[z]))?Math.min(this[N].selEnd,this._selectionLength()):null}set selectionEnd(e){this._assertSelectable(`selectionEnd`),setSelection(this,this.selectionStart,toUnsignedLong(e),this[N].selDir)}get selectionDirection(){return supportsSelectionType(inputType(this[z]))?this[N].selDir: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[z]))&&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[N].selStart,this[N].selEnd,String(e),t,n,r,arguments.length),a=inputType(this[z]);this[z].doc[J]++,this[N].value=sanitizeValue(a,i.value,this[z]),this[N].dirtyValue=!0,this[N].uiValue=null,setSelection(this,i.start,i.end,`none`)}get height(){return dimensionAttr(this[z],`height`)}set height(e){let t=toUnsignedLong(e);setAttribute(this[z],`height`,String(t<=2147483647?t:0))}get width(){return dimensionAttr(this[z],`width`)}set width(e){let t=toUnsignedLong(e);setAttribute(this[z],`width`,String(t<=2147483647?t:0))}get formAction(){return reflectActionURL(this[z],`formaction`)}set formAction(e){setAttribute(this[z],`formaction`,String(e))}get list(){let e=this[z];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===Z.datalist?n.node:null}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return inputType(this[z])===0?null:this[An]??=new LabelsNodeList(this[z])}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[z];return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&attr(e,`readonly`)!==null)}_barredFromValidation(){let e=this[z],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[z],t=inputType(e),n=this[Et]?512:0,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[N].files===null||this[N].files.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[N].badInput&&(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[N].userEdited){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[z],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.`:gc;if(e&256)return n===12?`Please enter a number.`:_c;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[Et]??``}_reset(){this[Yr]&&(this[Yr]=!1),this[N].dirtyValue=!1,this[N].dirtyChecked=!1,this[N].userEdited=!1,this[N].badInput=!1,this[N].uiValue=null,this[N].value=``,this[N].files=null,this._setCheckedness(attr(this[z],`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);if(e!==r){let t=this[z];if(t.flags&1){let n=attr(t,`name`);reindexRadio(t,radioKey(e,n),radioKey(r,n))}this._typeChange(e,r)}break}case`checked`:this[N].dirtyChecked||this._setCheckedness(n!==null,!1);break;case`name`:{let e=this[z];if(e.flags&1){let r=inputType(e);reindexRadio(e,radioKey(r,t),radioKey(r,n))}}case`form`:inputType(this[z])===16&&this._checkedness()&&uncheckOtherRadios(this[z]);break;case`multiple`:this[N].dirtyValue&&inputType(this[z])===5&&(this[N].value=sanitizeValue(5,this[N].value,this[z]))}}_typeChange(e,t){let n=this[z];(e===19||t===19)&&n.doc[Qt]++;let r=valueMode(e),i=valueMode(t);if(r===0&&(i===1||i===2)){let t=this[N].dirtyValue?this[N].value:sanitizeValue(e,attr(n,`value`)??``,n);this[N].dirtyValue=!1,t!==``&&setAttribute(n,`value`,t)}else(r!==0&&i===0||r!==3&&i===3)&&(this[N].dirtyValue=!1,this[N].value=``);r===3&&i!==3&&(this[N].files=null),t===16&&this._checkedness()&&uncheckOtherRadios(n),i===0&&this[N].dirtyValue&&(this[N].value=sanitizeValue(t,this[N].value,n)),this[N].uiValue=null,this[N].badInput=!1,!supportsSelectionType(e)&&supportsSelectionType(t)&&(this[N].selStart=0,this[N].selEnd=0,this[N].selDir=`none`)}_connectedSteps(){super._connectedSteps();let e=this[z],t=inputType(e);t===16&&(reindexRadio(e,null,radioKey(t,attr(e,`name`))),this._checkedness()&&radioInserted(e))}_disconnectedSteps(){super._disconnectedSteps();let e=this[z];reindexRadio(e,radioKey(inputType(e),attr(e,`name`)),null)}_cloningSteps(e){let t=e;t[N].value=this[N].value,t[N].dirtyValue=this[N].dirtyValue,t[N].checked=this._checkedness(),t[N].checkedSet=!0,t[N].dirtyChecked=this[N].dirtyChecked,t[N].indeterminate=this[N].indeterminate}get _hasActivationBehavior(){switch(inputType(this[z])){case 15:case 16:case 18:case 19:case 20:case 21:case 17:case 14:return!0}return!1}_legacyPreActivationBehavior(){let e=this[z],t=inputType(e);if(t===15){let e=this._checkedness(),t=this[N].indeterminate;return this._setCheckedness(!e,!0),this[N].indeterminate=!1,{checked:e,indeterminate:t,previousRadio:null}}if(t===16){let t=this._checkedness(),n=this._setCheckedness(!0,!0);return{checked:t,indeterminate:!1,previousRadio:t?e:n}}}_legacyCanceledActivationBehavior(e){if(e===void 0)return;let t=this[z],n=inputType(t);if(t.doc[J]++,n===15)this[N].checked=e.checked,this[N].checkedSet=!0,this[N].indeterminate=e.indeterminate;else if(n===16){let n=e.previousRadio;n!==null&&n!==t&&inSameRadioGroup(t,n)?n.node._setCheckedness(!0,!1):n!==t&&(this[N].checked=!1,this[N].checkedSet=!0)}}_activationBehavior(e,t){let n=this[z],r=inputType(n);if(r===15||r===16){if(!(n.flags&1)||r===16&&t?.checked)return;fireEvent$1(this,`input`,!0,!1,!0),fireEvent$1(this,`change`,!0,!1)}else if(this._isMutable()){if(r===18||r===19){if(r===19){let t=e;t!==null&&typeof t.offsetX==`number`&&typeof t.offsetY==`number`?Uu.set(n,{x:t.offsetX,y:t.offsetY}):Uu.delete(n)}let t=formOwner(n);t!==null&&submitForm(t,n,!1)}else if(r===20){let e=formOwner(n);e!==null&&n.flags&1&&resetForm(e)}popoverTargetAttributeActivation(n,e?.target?.[z]??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`,Bu),enumerated(HTMLInputElement,`formMethod=formmethod`,Vu);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 Nf=/* @__PURE__ */ new Map;function compilePattern(e){let t=Nf.get(e);if(t!==void 0)return t;try{new RegExp(e,`v`),t=RegExp(`^(?:`+e+`)$`,`v`)}catch{t=null}return Nf.size>256&&Nf.clear(),Nf.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[N].selStart,i)||n!==Math.min(e[N].selEnd,i)||a!==e[N].selDir;if(e[N].selStart=t,e[N].selEnd=n,e[N].selDir=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!==Z.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 radioKey(e,t){return e===16&&t!==null&&t!==``?t:null}function reindexRadio(e,t,n){t!==n&&(t!==null&&radioIndexRemove(e.doc[ar],t,e),n!==null&&radioIndexAdd(e.doc[ar]??=/* @__PURE__ */ new Map,n,e))}function radioInserted(e){let t=connectingRoot(),n=!1;t!==null&&t!==e&&forEachInRadioGroup(e,e=>(n=isInclusiveAncestor(t,e)&&e.node._checkedness(),n)),n?uncheck(e):uncheckOtherRadios(e)}function uncheck(e){let t=e.node;if(t[N].checkedSet&&!t[N].checked)return!1;let n=t._checkedness();return e.doc[J]++,t[N].checked=!1,t[N].checkedSet=!0,n}function forEachInRadioGroup(e,t){let n=attr(e,`name`);if(n===null||n===``)return;let r=formOwner(e);if(e.flags&1){let i=e.doc[ar]?.get(n);if(i===void 0)return;let a=r===null?treeRoot(e):null;for(let n of i)if(!(n===e||formOwner(n)!==r||a!==null&&treeRoot(n)!==a)&&t(n))return;return}let 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===Z.input&&attr(a,`name`)===n&&inputType(a)===16&&formOwner(a)===r&&t(a))return}function uncheckOtherRadios(e){let t=null;return forEachInRadioGroup(e,e=>(uncheck(e)&&t===null&&(t=e),!1)),t}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];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=16,this[N]=new ControlState}get type(){return`textarea`}get defaultValue(){let e=``;for(let t=this[z].first;t!==null;t=t.next)(t.type===3||t.type===4)&&(e+=t.data);return e}set defaultValue(e){this.textContent=String(e)}_apiValue(){return this[N].dirtyValue?this[N].value:normalizeNewlines(this.defaultValue)}get value(){return this._apiValue()}set value(e){let t=e===null?``:normalizeNewlines(String(e)),n=this._apiValue();this[z].doc[J]++,this[N].value=t,this[N].dirtyValue=!0,this[N].userEdited=!1,t!==n&&(this[N].selStart=t.length,this[N].selEnd=t.length,this[N].selDir=`none`)}get textLength(){return this._apiValue().length}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}_selectionLength(){return this._apiValue().length}get selectionStart(){return Math.min(this[N].selStart,this._selectionLength())}set selectionStart(e){let t=toUnsignedLong(e);setSelection(this,t,Math.max(t,this.selectionEnd),this[N].selDir)}get selectionEnd(){return Math.min(this[N].selEnd,this._selectionLength())}set selectionEnd(e){setSelection(this,this.selectionStart,toUnsignedLong(e),this[N].selDir)}get selectionDirection(){return this[N].selDir}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[N].selStart,this[N].selEnd,String(e),t,n,r,arguments.length);this[z].doc[J]++,this[N].value=normalizeNewlines(i.value),this[N].dirtyValue=!0,setSelection(this,i.start,i.end,`none`)}_isMutable(){return!isActuallyDisabled(this[z])&&contentAttr(this[z],`readonly`)===null}_barredFromValidation(){let e=this[z];return contentAttr(e,`readonly`)!==null||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[z],t=this[Et]?512:0,n=this._apiValue();if(contentAttr(e,`required`)!==null&&this._isMutable()&&n===``&&(t|=1),this[N].userEdited&&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 gc;let t=this._apiValue().length;return e&8?msgTooLong(this.maxLength,t):e&16?msgTooShort(this.minLength,t):this[Et]??``}_reset(){this[Yr]&&(this[Yr]=!1),this[N].dirtyValue=!1,this[N].userEdited=!1,this[N].value=``}_childrenChangedSteps(){if(this[N].dirtyValue)return;let e=this._selectionLength();this[N].selStart>e&&(this[N].selStart=e),this[N].selEnd>e&&(this[N].selEnd=e)}_cloningSteps(e){let t=e;t[N].value=this[N].value,t[N].dirtyValue=this[N].dirtyValue}};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}function settleFlatOptions(e,t){let n=!1;for(let r=e.first;r!==null;r=r.next)if(r.type===1){if(r.tag!==Z.option)return!1;if(t!==void 0)r!==t&&opt(r)._setSelectedness(!1);else if(opt(r)._selectednessNow()){if(n)return!1;n=!0}}return t!==void 0||n}var SelectedOptionsCollection=class extends Wa{_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:Wa,writable:!0,configurable:!0});var HTMLSelectElement=class extends HTMLElement{[H];[xr];[Dr];[Kr];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=28,this[H]=null,this[xr]=null,this[Dr]=!1,this[Kr]=!1}_ensureSettled(){this[Dr]||this._selectednessSettingAlgorithm()}_cloningSteps(e){e[Dr]=this[Dr]}_connectedSteps(){super._connectedSteps(),this._ensureSettled()}get type(){return contentAttr(this[z],`multiple`)===null?`select-one`:`select-multiple`}_displaySize(){let e=contentAttr(this[z],`size`);if(e!==null){let t=parseNonNegativeInteger(e);if(!Number.isNaN(t))return t}return contentAttr(this[z],`multiple`)===null?1:4}_isSingle(){return contentAttr(this[z],`multiple`)===null}get options(){return this[H]??=new HTMLOptionsCollection(this[z])}get length(){return listOfOptions(this[z],[]).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[z],!1,null)}get selectedIndex(){let e=listOfOptions(this[z],[]);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[z],[]);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[Ft]=!0}this._updateSelectedContent()}get value(){let e=listOfOptions(this[z],[]);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[z],[]),r=!1;for(let e=0;e<n.length;e++){let i=opt(n[e]);!r&&i.value===t?(i._setSelectedness(!0),i[Ft]=!0,r=!0):i._setSelectedness(!1)}this._updateSelectedContent()}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}showPicker(){if(isActuallyDisabled(this[z]))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[z],[]);for(let n=0;n<t.length;n++)t[n]!==e&&opt(t[n])._setSelectedness(!1)}_selectednessSettingAlgorithm(e){if(this[Dr]=!0,this._isSingle()){if(e!==void 0||this._displaySize()===1){if(settleFlatOptions(this[z],e))return;e===void 0?this._runSelectedness():this._deselectOthers(e)}this._updateSelectedContent()}}_runSelectedness(){let e=listOfOptions(this[z],[]),t;for(let n=0;n<e.length;n++){let r=opt(e[n]);r._selectednessNow()&&(t?._setSelectedness(!1),t=r)}if(t===void 0){for(let t=0;t<e.length;t++)if(!isActuallyDisabled(e[t])){opt(e[t])._setSelectedness(!0);return}}}_enabledSelectedContent(){let e=this[z];if(contentAttr(e,`multiple`)!==null)return null;for(let t=e.first;t!==null;)if(t.type!==1||t.tag===Z.option||t.tag!==Z.selectedcontent)t=t.tag===Z.option?nextSkippingChildren(t,e):nextInTree(t,e);else{for(let n=t.parent;n!==null&&n!==e;n=n.parent)if(n.tag===Z.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[z],[]),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[z].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[Yr]&&(this[Yr]=!1),this[Dr]=!0;let e=listOfOptions(this[z],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);n[Ft]=!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[z])||hasDatalistAncestor(this[z])}_placeholderLabelOption(){let e=this[z];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[Et]?512:0;if(contentAttr(this[z],`required`)!==null){let t=listOfOptions(this[z],[]),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[Et]??``}};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===Z.select)return n;if(e===Z.datalist||e===Z.hr||e===Z.option)return null;if(e===Z.optgroup){if(t)return null;t=!0}}return null}var HTMLOptionElement=class extends HTMLElement{[Sr];[Ft];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=8,this[Ft]=!1}_selectednessNow(){if(this[Sr]!==void 0)return this[Sr];let e=optionSelect(this[z]);return e===null?contentAttr(this[z],`selected`)!==null:(e.node._ensureSettled(),this[Sr]??=contentAttr(this[z],`selected`)!==null)}_setSelectedness(e){this[Sr]!==e&&(this[z].doc[J]++,this[Sr]=e)}get selected(){return this._selectednessNow()}set selected(e){this._setSelectedness(!!e),this[Ft]=!0;let t=optionSelect(this[z]);t!==null&&t.node._selectednessSettingAlgorithm(e?this[z]:void 0)}get text(){let e=this[z],t=``;for(let n=e.first;n!==null;)n.tag===Z.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[z],`value`)??this.text}set value(e){this.setAttribute(`value`,String(e))}get label(){let e=contentAttr(this[z],`label`);return e===null?this.text:e}set label(e){this.setAttribute(`label`,String(e))}get index(){let e=optionSelect(this[z]);if(e===null)return 0;let t=listOfOptions(e,[]).indexOf(this[z]);return t===-1?0:t}get form(){let e=optionSelect(this[z]);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[z]);return}if(e!==`selected`||this[Ft])return;this._setSelectedness(n!==null);let i=optionSelect(this[z]);i!==null&&i.node._selectednessSettingAlgorithm(n===null?void 0:this[z])}_cloningSteps(e){let t=e;t[Sr]=this._selectednessNow(),t[Ft]=this[Ft]}};bool(HTMLOptionElement,`defaultSelected=selected disabled`);const Pf=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};Pf.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[z].flags|=24}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&e===`disabled`&&t===null!=(n===null)&&resetOwnerSelect(this[z])}_childrenChangedSteps(){let e=this[z].parent;e!==null&&e.tag===Z.select&&e.node._selectednessSettingAlgorithm()}};bool(HTMLOptGroupElement,`disabled`),str(HTMLOptGroupElement,`label`);var HTMLButtonElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r)}get type(){return buttonType(this[z])}set type(e){this.setAttribute(`type`,String(e))}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}get formAction(){return reflectActionURL(this[z],`formaction`)}set formAction(e){this.setAttribute(`formaction`,String(e))}_barredFromValidation(){let e=this[z];return buttonType(e)!==`submit`||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[z];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?.[z]??null)}};installConstraintValidation(HTMLButtonElement),str(HTMLButtonElement,`formTarget=formtarget name value`),bool(HTMLButtonElement,`disabled formNoValidate=formnovalidate`),enumerated(HTMLButtonElement,`formEnctype=formenctype`,Bu),enumerated(HTMLButtonElement,`formMethod=formmethod`,Vu);function isInteractiveContent(e){switch(e.tag){case Z.a:return contentAttr(e,`href`)!==null;case Z.audio:case Z.video:return contentAttr(e,`controls`)!==null;case Z.img:return contentAttr(e,`usemap`)!==null;case Z.input:return inputType(e)!==0;case Z.button:case Z.details:case Z.embed:case Z.iframe:case Z.label:case Z.select:case Z.textarea:return!0}return!1}var HTMLLabelElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=12}_connectedSteps(){super._connectedSteps();let e=this[z],t=attr(e,`for`);t!==null&&addToElementIndex(e.doc[en]??=/* @__PURE__ */ new Map,t,e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[z],t=attr(e,`for`);t!==null&&removeFromElementIndex(e.doc[en],t,e)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r);let i=this[z];e===`for`&&r===null&&t!==n&&i.flags&1&&(t!==null&&removeFromElementIndex(i.doc[en],t,i),n!==null&&addToElementIndex(i.doc[en]??=/* @__PURE__ */ new Map,n,i))}get control(){let e=labeledControl(this[z]);return e===null?null:e.node}get form(){let e=labeledControl(this[z]);if(e===null||e.tag===Z.meter||e.tag===Z.progress)return null;let t=formOwner(e);return t===null?null:t.node}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[z],n=labeledControl(t);if(n===null)return;let r=e===null?null:e.target?.[z]??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{[Ht];constructor(e,t,n,r){super(e,t,n,r),this[Ht]=null}get type(){return`fieldset`}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get elements(){return this[Ht]??=Wa._descendants(this[z],!1,isListed)}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};installConstraintValidation(HTMLFieldSetElement),bool(HTMLFieldSetElement,`disabled`),str(HTMLFieldSetElement,`name`);var HTMLLegendElement=class extends HTMLElement{get form(){let e=this[z].parent;if(e===null||e.tag!==Z.fieldset)return null;let t=formOwner(e);return t===null?null:t.node}};str(HTMLLegendElement,`align`);var HTMLOutputElement=class extends HTMLElement{[Mt];constructor(e,t,n,r){super(e,t,n,r),this[Mt]=null}get type(){return`output`}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}get defaultValue(){return this[Mt]??descendantTextContent(this[z])}set defaultValue(e){this[Mt]===null?this.textContent=String(e):this[Mt]=String(e)}get value(){return descendantTextContent(this[z])}set value(e){this[Mt]=this.defaultValue,this.textContent=String(e)}_reset(){this.textContent=this.defaultValue,this[Mt]=null}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};installConstraintValidation(HTMLOutputElement),str(HTMLOutputElement,`name`),tokenList(HTMLOutputElement,`htmlFor`,`for`);function attrFloat(e,t){let n=contentAttr(e[z],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{constructor(e,t,n,r){super(e,t,n,r)}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[z],`value`)===null?-1:this.value/this.max}get labels(){return this[An]??=new LabelsNodeList(this[z])}},HTMLMeterElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r)}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[An]??=new LabelsNodeList(this[z])}};function isOption(e){return e.tag===Z.option}var HTMLDataListElement=class extends HTMLElement{[H];constructor(e,t,n,r){super(e,t,n,r),this[H]=null}get options(){return this[H]??=Wa._descendants(this[z],!0,isOption)}};const Ff=stubbedMethod(`HTMLFormElement`,`submit`),If={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:`application/x-www-form-urlencoded`,invalid:`application/x-www-form-urlencoded`},Lf={keywords:[`get`,`post`,`dialog`],missing:`get`,invalid:`get`},Rf={keywords:[`on`,`off`],missing:`on`,invalid:`on`};var HTMLFormElement=class extends HTMLElement{[Ht];[Xt];[In];[ht];[Qn];constructor(e,t,n,r){super(e,t,n,r),this[Ht]=null,this[Xt]=!1,this[In]=!1,this[ht]=!1,this[Qn]=null;let i=new Proxy(this,zf);return this[z].node=i,i}_namedProperty(e){if(e===``)return;let t=this[z],n=namedControl(t,this._controls(),e)??namedImage(t,e);return n===null?this[Qn]?.get(e)?.deref()?.node:n instanceof RadioNodeList?n:(rememberName(this,e,n),n.node)}_controls(){let e=this[z],t=e.doc,n=t[Hr]+t[Qt],r=cachedSnapshot(t,e,n);if(r!==void 0)return r;let i=formControls(e,[],!1);return storeSnapshot(t,e,n,i),i}get elements(){return this[Ht]??=createFormControlsCollection(this[z])}get length(){return this._controls().length}get action(){return reflectActionURL(this[z],`action`)}set action(e){this.setAttribute(`action`,String(e))}get encoding(){return this.enctype}set encoding(e){this.enctype=e}submit(){reportNotImplemented(this[z].doc[Y],Ff),submitForm(this[z],this[z],!0)}requestSubmit(e=null){let t=this[z];if(e!=null){let n=e[z];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[z],t,!1)}reset(){resetForm(this[z]),flushFaceReactions()}checkValidity(){return formCheckValidity(this[z])}reportValidity(){return formCheckValidity(this[z])}};str(HTMLFormElement,`acceptCharset=accept-charset name rel target`),bool(HTMLFormElement,`noValidate=novalidate`),enumerated(HTMLFormElement,`enctype`,If),enumerated(HTMLFormElement,`method`,Lf),enumerated(HTMLFormElement,`autocomplete`,Rf),tokenList(HTMLFormElement,`relList`,`rel`,[`noopener`,`noreferrer`,`opener`]);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[Qn];if(r!==null)for(let n of r.keys())!t.includes(n)&&e._namedProperty(n)!==void 0&&t.push(n);return t}function indexedOrNamedValue(e,t){let n=arrayIndex(t);return n===-1?e._namedProperty(t):e._controls()[n]?.node}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 zf={get(e,t,n){if(t===z)return e[z];if(typeof t==`symbol`)return e[t];let r=arrayIndex(t);if(r!==-1){let i=e._controls();return r<i.length?i[r].node:Reflect.get(e,t,n)}let i=Reflect.get(e,t,n);if(i!==void 0)return i;let a=e._namedProperty(t);return a===void 0||t in e?void 0:a},has(e,t){return t in e||typeof t==`string`&&indexedOrNamedValue(e,t)!==void 0},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!(t in e)){let n=indexedOrNamedValue(e,t);if(n!==void 0)return{value:n,writable:!1,enumerable:arrayIndex(t)!==-1,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n,r){if(typeof t==`symbol`)return Reflect.set(e,t,n,r);if(r!==e[z].node)return!(t in e)&&indexedOrNamedValue(e,t)!==void 0?!1:Reflect.set(e,t,n,r);let i=Reflect.getOwnPropertyDescriptor(e,t);return i===void 0?t in e?Reflect.set(e,t,n,r):arrayIndex(t)!==-1||e._namedProperty(t)!==void 0?!1:Reflect.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):i.writable===!0?(e[t]=n,!0):i.set===void 0&&i.get===void 0?!1:Reflect.set(e,t,n,r)},defineProperty(e,t,n){return typeof t==`string`&&(arrayIndex(t)!==-1||!(t in e)&&e._namedProperty(t)!==void 0)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&!(t in e)&&indexedOrNamedValue(e,t)!==void 0?!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}},Bf=/* @__PURE__ */ new Map;function recordHostOriginal(e,t){Bf.has(e)||Bf.set(e,t)}const Vf=/* @__PURE__ */ new WeakSet;let Hf=null;function hostFormData(){let e=Bf.get(`FormData`);if(e!==void 0)return e;let t=globalThis.FormData;return t===FormData$1?void 0:t}function nodeFormData(){if(Hf!==null)return Hf;let e=hostFormData();if(e===void 0)throw TypeError(`FormData is not available in this Node.js runtime.`);return Hf=e,Object.setPrototypeOf(FormData$1.prototype,Hf.prototype),Object.setPrototypeOf(FormData$1,Hf),Hf}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?.[z];if(r===void 0||r.tag!==Z.form)throw TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`);let i=null;if(t!=null){let e=t[z];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 Uf=/* @__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]]),Wf=/* @__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`,rf]]);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(`.`))Wf.set(e,HTMLElement);for(let[e,t]of Uf)Wf.set(e,t);installPopoverInvoker(Wf.get(`button`)),installPopoverInvoker(Wf.get(`input`)),installCommandInvoker(Wf.get(`button`));function elementClassFor(e,t){if(t===`http://www.w3.org/1999/xhtml`){let t=Wf.get(e);return t===void 0?e.includes(`-`)&&isValidCustomElementName(e)?HTMLElement:HTMLUnknownElement:t}return t===`http://www.w3.org/2000/svg`?Sf.get(e)??SVGElement:t===`http://www.w3.org/1998/Math/MathML`?MathMLElement:ws}setElementClassLookup(elementClassFor);let Gf=null;function isBuiltinInterface(e){if(Gf===null){Gf=/* @__PURE__ */ new Set([HTMLElement,HTMLUnknownElement,HTMLMediaElement]);for(let e of Wf.values())Gf.add(e)}return Gf.has(e)}function localNamesForInterface(e){let t=[];for(let[n,r]of Wf)r===e&&t.push(n);return t}uu.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,...Wf.values(),...Sf.values()])(e.name!==`HTMLElement`||e===HTMLElement)&&setClassString(e);for(let e of[SVGGraphicsElement,SVGGeometryElement,SVGTextContentElement,SVGTextPositioningElement,SVGGradientElement])setClassString(e);const Kf=[`window`,`self`,`frames`,`parent`,`top`],qf=/* @__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(`.`),Jf=new Set(jd);let Yf=null;function windowAttributes(){if(Yf!==null)return Yf;let e=windowInterfaces(),t=/* @__PURE__ */ new Set([...Kf,...qf,`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)||Jf.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`),Yf=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 Kf)define(e,{value:t,writable:!0,enumerable:!0,configurable:!0});define(`document`,{value:e.document,writable:!0,enumerable:!0,configurable:!0});let i=e[H].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 qf){if(a.has(t))continue;let n=l[t].bind(e);Vf.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[R];e[R]=t;let _=e[un];e[un]=t;let v=Dd.get(t);Dd.set(t,e);let y=!0;return function uninstall(){if(y){y=!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[R]=h,e[un]=_,Dd.get(t)===e&&(v===void 0?Dd.delete(t):Dd.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}},Xf=class XMLHttpRequestEventTarget extends EventTarget{constructor(){if(new.target===XMLHttpRequestEventTarget)throw TypeError(`Illegal constructor`);super()}};const Zf=Symbol(`upload`);var XMLHttpRequestUpload=class extends Xf{constructor(e){if(e!==Zf)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(Xf.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?.[ai];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 Xf{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;[ai];constructor(){super(),this[ai]=new XhrState(currentWindowOrNull(),new XMLHttpRequestUpload(Zf))}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[ut])throw invalidState(`execute 'open' on`,`The document is not fully active.`);if(e=String(e),!Qf.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`);$f.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,``),!Qf.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(tp.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[ut])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 Q)&&(r[1]=r[1].replace(/;\s*charset=("[^"]*"|[^;]*)/i,e=>/utf-8/i.test(e)?e:`;charset=UTF-8`))}t.uploadListener=hasAnyListener(t.upload),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),ep.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 Qf=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,$f=/* @__PURE__ */ new Set([`DELETE`,`GET`,`HEAD`,`OPTIONS`,`POST`,`PUT`]),ep=/* @__PURE__ */ new Set([``,`arraybuffer`,`blob`,`document`,`json`,`text`]),tp=/* @__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`]),np=[`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 np)_.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(),y=process.getBuiltinModule(`node:zlib`),b=v===`gzip`||v===`x-gzip`?y.createGunzip():v===`deflate`?y.createInflate():v===`br`?y.createBrotliDecompress():null,x=Number(l.headers[`content-length`]??0)||0;processResponse(e,t,n,r,d,l.statusMessage??``,_,b===null?l:l.pipe(b),b===null?x: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 Q){let t=e[z],n=e[Dn],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
|
+
`)),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===Z.option?(collect$1(n,t),n=nextSkippingChildren(n,e)):(n.type===1&&n.ns===`http://www.w3.org/1999/xhtml`&&n.tag===Z.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===Z.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 Fd=`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`,Id=[[`ariaActiveDescendantElement`,`aria-activedescendant`]],Ld=[[`ariaControlsElements`,`aria-controls`],[`ariaDescribedByElements`,`aria-describedby`],[`ariaDetailsElements`,`aria-details`],[`ariaErrorMessageElements`,`aria-errormessage`],[`ariaFlowToElements`,`aria-flowto`],[`ariaLabelledByElements`,`aria-labelledby`],[`ariaOwnsElements`,`aria-owns`]],Rd=/* @__PURE__ */ new WeakMap,zd=/* @__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=Rd.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=Rd.get(e);r===void 0&&Rd.set(e,r=/* @__PURE__ */ new Map),r.set(t,{record:findRecord(e,t),elements:n,cached:null})}function clearExplicit(e,t){Rd.get(e)?.delete(t),removeAttribute(e,t)}function shadowIncludingParent(e){return e.parent===null?isShadowRootImpl(e)?e.node[R]?.[z]??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 ws))throw TypeError(`Failed to set the '${t}' property on 'Element': Failed to convert value to 'Element'.`);return e[z]}for(let[e,t]of Id)defineAccessor(ws,e,function(){return attrAssociatedElement(this[z],t)?.node??null},function(n){n==null?clearExplicit(this[z],t):setExplicit(this[z],t,[new WeakRef(toElement(n,e))])});for(let[e,t]of Ld)defineAccessor(ws,e,function(){let e=this[z],n=attrAssociatedElements(e,t);if(n===null)return null;let r=liveExplicit(e,t),i=r===null?zd.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=zd.get(e);n===void 0&&zd.set(e,n=/* @__PURE__ */ new Map),n.set(t,a)}return i=a,i},function(n){let r=this[z];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(ws,Fd);const Bd=/* @__PURE__ */ new WeakSet;var HTMLElement=class extends ws{constructor(e,t,n,r){if(e!==void 0){super(e,t,n,r),this[z].flags&128&&(this[z].flags|=4);return}let i=htmlElementConstructorSteps(new.target);if(i.upgrade!==null)return i.upgrade;super(i.doc,i.localName,E,null),initNewCustomElement(this,i.def,i.active)}_connectedSteps(){let e=this[z];(e.flags&128||isValueOf(this)!==null)&&ceConnected(this),e.flags&16384&&faceStateMaybeChanged(e)}_disconnectedSteps(){let e=this[z];(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[z].doc)}_movingSteps(e,t){definitionOf(this)!==void 0&&ceMoved(this)}_shadowDisabled(){return shadowDisabled(this)}_parserAssociateForm(e){parserAssociateForm(this[z],e[z])}_attributeChangedSteps(e,t,n,r){e===`popover`&&r===null&&popoverAttributeChanged(this[z],t,n),definitionOf(this)!==void 0&&ceAttributeChanged(this,e,t,n,r),this[z].flags&16384&&r===null&&(e===`form`||e===`disabled`)&&faceStateMaybeChanged(this[z])}get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get translate(){for(let e=this[z];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[z],`translate`,e?`yes`:`no`)}get hidden(){return contentAttr(this[z],`hidden`)!==null}set hidden(e){typeof e==`string`&&asciiLowercase$1(e)===`until-found`?setAttribute(this[z],`hidden`,`until-found`):e===!1||e===``||e==null||e===0||Number.isNaN(e)?removeAttribute(this[z],`hidden`):setAttribute(this[z],`hidden`,``)}get accessKeyLabel(){let e=contentAttr(this[z],`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[z],`draggable`);if(e!==null){let t=asciiLowercase$1(e);if(t===`true`)return!0;if(t===`false`)return!1}let t=this[z];return t.tag===Z.img||t.tag===Z.a&&contentAttr(t,`href`)!==null}set draggable(e){setAttribute(this[z],`draggable`,e?`true`:`false`)}get spellcheck(){for(let e=this[z];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[z],`spellcheck`,e?`true`:`false`)}get autocorrect(){return usedAutocorrection(this[z])}set autocorrect(e){setAttribute(this[z],`autocorrect`,e?`on`:`off`)}get contentEditable(){let e=this[z];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[z],`contenteditable`);else if(t===`true`||t===`false`||t===`plaintext-only`)setAttribute(this[z],`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[z])}get innerText(){return getInnerText(this[z])}set innerText(e){let t=e===null?``:String(e);this._replaceAll(t===``?null:renderedTextFragment(t,this[z]))}get outerText(){return getInnerText(this[z])}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[z]);i.hasChildNodes()||i.appendChild(this[z].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[z])&&!Bd.has(this)){Bd.add(this);try{fireSyntheticClick(this)}finally{Bd.delete(this)}}}showPopover(e){let t=this[z];t.flags|=12,showPopover(t,!0,popoverSource(e))}hidePopover(){hidePopover(this[z],!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[z];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(Vd.has(this))throw new DOMException(`ElementInternals for the specified element was already attached.`,`NotSupportedError`);let t=new ElementInternals(this);return Vd.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===Z.button||t===Z.fieldset||t===Z.input||t===Z.output||t===Z.select||t===Z.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===Z.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[z])},function(e){setAttribute(this[z],`autocapitalize`,String(e))}),defineAccessor(HTMLElement,`writingSuggestions`,function(){return computedWritingSuggestions(this[z])?`true`:`false`},function(e){setAttribute(this[z],`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 Vd=/* @__PURE__ */ new WeakMap;function customStatesOf(e){return Vd.get(e)?.[Mr]??null}var ElementInternals=class{[Lr];[Mr];[Zr];constructor(e){if(!(e instanceof HTMLElement)||Vd.has(e))throw TypeError(`Illegal constructor`);this[Lr]=e,this[Mr]=null,this[Zr]=null}get shadowRoot(){let e=this[Lr][G];return e==null||!e[Ke]?null:e}get states(){return this[Mr]??=new CustomStateSet}get form(){return internalsForm(this[Lr][z])}get labels(){return internalsLabels(this[Lr][z])}get willValidate(){return internalsWillValidate(this[Lr][z])}get validity(){return internalsValidity(this[Lr][z])}get validationMessage(){return internalsValidationMessage(this[Lr][z])}setFormValue(e,t){internalsSetFormValue(this[Lr][z],e,t),this[Zr]=e}setValidity(e,t,n){internalsSetValidity(this[Lr][z],e,t,n)}checkValidity(){return internalsCheckValidity(this[Lr][z])}reportValidity(){return internalsCheckValidity(this[Lr][z],`reportValidity`)}};const Hd=/* @__PURE__ */ new WeakMap;for(let e of Fd.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 Hd.get(this)?.get(r)??null},set(e){let t=Hd.get(this);e==null?t?.delete(r):(t===void 0&&Hd.set(this,t=/* @__PURE__ */ new Map),t.set(r,String(e)))},configurable:!0,enumerable:!0})}const Ud=/* @__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 ws))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=Ud.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=Ud.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&&Ud.set(this,r=/* @__PURE__ */ new Map),r.set(e,{refs:i,cached:null})},configurable:!0,enumerable:!0})}var CustomStateSet=class extends Set{};const Wd=Symbol(`nonce`);function installHTMLOrSVGElement(e){installEventHandlers(e.prototype,`element`),defineAccessor(e,`nonce`,function(){let e=this[Wd],t=contentAttr(this[z],`nonce`);return e!==void 0&&e[1]===t?e[0]:t??``},function(e){Object.defineProperty(this,Wd,{value:[String(e),contentAttr(this[z],`nonce`)],writable:!0,configurable:!0})}),bool(e,`autofocus`),defineAccessor(e,`tabIndex`,function(){let e=tabIndexValue(this[z]);return Number.isNaN(e)?defaultTabIndex(this[z]):e},function(e){setAttribute(this[z],`tabindex`,String(Number(e)|0))}),Object.defineProperty(e.prototype,"focus",{value:function focus(e){focusElement(this[z],e)},writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"blur",{value:function blur(){blurElement(this[z])},writable:!0,configurable:!0,enumerable:!0})}installHTMLOrSVGElement(HTMLElement);for(let e of[Q,ShadowRoot])Object.hasOwn(e.prototype,`activeElement`)||defineAccessor(e,`activeElement`,function(){return activeElement(this[z])});Object.hasOwn(Q.prototype,`hasFocus`)||Object.defineProperty(Q.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[z]}const Gd=class HTMLCollection$1 extends Wa{static{__name(this,`HTMLCollection`)}constructor(e,t){super(e,!1,null,!0),Object.defineProperty(this,Jt,{value:t})}_collect(e){this[Jt](this._s.root,e)}};function fnCollection(e,t){return new Gd(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[z],t=contentAttr(e,`href`)??``,n=URL.parse(t,e.doc.URL);return n===null?t:n.href}set href(e){setAttribute(this[z],`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[z];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[z],`width`)}set width(e){setAttribute(this[z],`width`,String(clampUlong(e)))}get height(){return dimension(this[z],`height`)}set height(e){setAttribute(this[z],`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`,ic),bool(HTMLImageElement,`isMap=ismap`),ulong(HTMLImageElement,`hspace vspace`),enumerated(HTMLImageElement,`referrerPolicy=referrerpolicy`,ac),enumerated(HTMLImageElement,`decoding`,{keywords:[`sync`,`async`,`auto`],missing:`auto`,invalid:`auto`}),enumerated(HTMLImageElement,`loading`,oc),enumerated(HTMLImageElement,`fetchPriority=fetchpriority`,sc);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 Kd=function Image(e,t){if(new.target===void 0)throw TypeError(`Failed to construct 'Image': Please use the 'new' operator.`);let n=currentDocument().createElementNS(E,`img`);return e!==void 0&&setAttribute(n[z],`width`,String(Number(e)>>>0)),t!==void 0&&setAttribute(n[z],`height`,String(Number(t)>>>0)),n};Kd.prototype=HTMLImageElement.prototype;var HTMLIFrameElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].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`,ac),enumerated(HTMLIFrameElement,`loading`,oc);var HTMLEmbedElement=class extends HTMLElement{getSVGDocument(){return null}};url(HTMLEmbedElement,`src`),str(HTMLEmbedElement,`type width height align name`);var HTMLObjectElement=class extends HTMLElement{get contentDocument(){return null}get contentWindow(){return null}getSVGDocument(){return null}get form(){let e=formOwner(this[z]);return e===null?null:e.node}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};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}};defineConstants(HTMLTrackElement,{NONE:0,LOADING:1,LOADED:2,ERROR:3}),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,qd,()=>fnCollection(this[z],(e,t)=>{for(let n=nextElementInTree(e,e);n!==null;n=nextElementInTree(n,e))n.tag===Z.area&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}};const qd=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))}};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 Jd=Symbol(`rows`),Yd=Symbol(`tBodies`),Xd=Symbol(`cells`);function fillTableRows(e,t){for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.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===Z.tr?t.push(n.node):n.tag===Z.tbody&&pushRows(n,t));for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.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===Z.tr&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}var HTMLTableElement=class extends HTMLElement{get caption(){let e=childOfType(this[z],Z.caption);return e===null?null:e.node}set caption(e){let t=childOfType(this[z],Z.caption);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this.firstChild)}createCaption(){let e=childOfType(this[z],Z.caption);if(e!==null)return e.node;let t=this[z].doc.createElement(`caption`);return this.insertBefore(t,this.firstChild),t}deleteCaption(){let e=childOfType(this[z],Z.caption);e!==null&&this.removeChild(e.node)}get tHead(){let e=childOfType(this[z],Z.thead);return e===null?null:e.node}set tHead(e){if(e!==null&&e[z].tag!==Z.thead)throw hierarchyError(`Not a thead element.`);let t=childOfType(this[z],Z.thead);t!==null&&this.removeChild(t.node),e!==null&&this.insertBefore(e,this._afterCaptionAndColgroups())}createTHead(){let e=childOfType(this[z],Z.thead);if(e!==null)return e.node;let t=this[z].doc.createElement(`thead`);return this.insertBefore(t,this._afterCaptionAndColgroups()),t}deleteTHead(){let e=childOfType(this[z],Z.thead);e!==null&&this.removeChild(e.node)}get tFoot(){let e=childOfType(this[z],Z.tfoot);return e===null?null:e.node}set tFoot(e){if(e!==null&&e[z].tag!==Z.tfoot)throw hierarchyError(`Not a tfoot element.`);let t=childOfType(this[z],Z.tfoot);t!==null&&this.removeChild(t.node),e!==null&&this.appendChild(e)}createTFoot(){let e=childOfType(this[z],Z.tfoot);return e===null?this.appendChild(this[z].doc.createElement(`tfoot`)):e.node}deleteTFoot(){let e=childOfType(this[z],Z.tfoot);e!==null&&this.removeChild(e.node)}get tBodies(){return sameObject(this,Yd,()=>fnCollection(this[z],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&n.tag===Z.tbody&&n.ns===`http://www.w3.org/1999/xhtml`&&t.push(n.node)}))}createTBody(){let e=this[z].doc.createElement(`tbody`),t=null;for(let e=this[z].first;e!==null;e=e.next)e.type===1&&e.tag===Z.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,Jd,()=>fnCollection(this[z],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[z].doc,i=r.createElement(`tr`);if(n===0&&childOfType(this[z],Z.tbody)===null)this.appendChild(r.createElement(`tbody`)).appendChild(i);else if(n===0){let e=null;for(let t=this[z].first;t!==null;t=t.next)t.type===1&&t.tag===Z.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[z].first;e!==null;e=e.next)if(e.type===1&&(e.tag!==Z.caption&&e.tag!==Z.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,Jd,()=>fnCollection(this[z],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[z].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[z].parent;if(e===null)return-1;let t=null;if(e.tag===Z.table&&e.ns===`http://www.w3.org/1999/xhtml`?t=e:(e.tag===Z.thead||e.tag===Z.tbody||e.tag===Z.tfoot)&&e.ns===`http://www.w3.org/1999/xhtml`&&e.parent!==null&&e.parent.tag===Z.table&&(t=e.parent),t===null)return-1;let n=[];return fillTableRows(t,n),n.indexOf(this)}get sectionRowIndex(){let e=this[z].parent;if(e===null)return-1;let t=[];return e.tag===Z.table?fillTableRows(e,t):pushRows(e,t),t.indexOf(this)}get cells(){return sameObject(this,Xd,()=>fnCollection(this[z],(e,t)=>{for(let n=e.first;n!==null;n=n.next)n.type===1&&(n.tag===Z.td||n.tag===Z.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[z].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[z].parent;if(e===null||e.tag!==Z.tr)return-1;let t=0;for(let n=e.first;n!==null;n=n.next){if(n===this[z])return t;n.type===1&&(n.tag===Z.td||n.tag===Z.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 Zd=[`noreferrer`,`noopener`,`opener`];function installHyperlinkUtils(e){let t=e.prototype,define=(e,n,r)=>{Object.defineProperty(t,e,{get(){let e=this[z];return n(linkURL(e),e)},set:r?function(e){let t=this[z],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[z],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[z],`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[z],n=linkURL(t);if(n===null)return;let r=t.doc[Y];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[Y];if(t===null)return;let n=contentAttr(e,`target`);if(n===null){let t=querySelector(e.doc[z],`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[Zn]??t;else if(r===`_top`)for(i=t;i[Zn]!==null;)i=i[Zn];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[q].href),t=new URL(a.href);e.hash=``,t.hash=``,e.href!==t.href&&reportNotImplemented(o,Lu)},0)}var HTMLAnchorElement=class extends HTMLElement{get text(){let e=this[z],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[z],`href`)!==null}_activationBehavior(e){contentAttr(this[z],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[z]))}};installHyperlinkUtils(HTMLAnchorElement),str(HTMLAnchorElement,`target download ping rel hreflang type coords charset name rev shape`),tokenList(HTMLAnchorElement,`relList`,`rel`,Zd),enumerated(HTMLAnchorElement,`referrerPolicy=referrerpolicy`,ac);var HTMLAreaElement=class extends HTMLElement{get _hasActivationBehavior(){return contentAttr(this[z],`href`)!==null}_activationBehavior(e){contentAttr(this[z],`href`)!==null&&(followHyperlink(this),reportFollowedHyperlink(this[z]))}};installHyperlinkUtils(HTMLAreaElement),str(HTMLAreaElement,`alt coords shape target download ping rel hreflang type`),tokenList(HTMLAreaElement,`relList`,`rel`,Zd),enumerated(HTMLAreaElement,`referrerPolicy=referrerpolicy`,ac),bool(HTMLAreaElement,`noHref=nohref`);const Qd={load:stubbedMethod(`HTMLMediaElement`,`load`),play:stubbedMethod(`HTMLMediaElement`,`play`),pause:stubbedMethod(`HTMLMediaElement`,`pause`),addTextTrack:stubbedMethod(`HTMLMediaElement`,`addTextTrack`)},windowOf=e=>e[z].doc[Y];var MediaState=class{paused=!0;currentTime=0;volume=1;muted=null;playbackRate=1;defaultPlaybackRate=1;ended=!1;seeking=!1;preservesPitch=!0;srcObject=null};const $d=Symbol(`media`);function state$1(e){let t=e[$d];return t===void 0&&(t=new MediaState,Object.defineProperty(e,$d,{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};defineConstants(MediaError,{MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4});var 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[z],`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),Qd.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),Qd.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),Qd.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),Qd.addTextTrack),new DOMException(`Text tracks are not supported.`,`NotSupportedError`)}setMediaKeys(){return Promise.resolve()}get mediaKeys(){return null}setSinkId(){return Promise.resolve()}get sinkId(){return``}};defineConstants(HTMLMediaElement,{NETWORK_EMPTY:0,NETWORK_IDLE:1,NETWORK_LOADING:2,NETWORK_NO_SOURCE:3,HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4}),url(HTMLMediaElement,`src`),enumerated(HTMLMediaElement,`crossOrigin=crossorigin`,ic),enumerated(HTMLMediaElement,`preload`,{keywords:[`none`,`metadata`,`auto`],missing:`metadata`,invalid:`metadata`,empty:`auto`}),enumerated(HTMLMediaElement,`loading`,oc),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`))}};ulong(HTMLVideoElement,`width height`),url(HTMLVideoElement,`poster`),bool(HTMLVideoElement,`playsInline=playsinline disablePictureInPicture=disablepictureinpicture`);const ef=function Audio(e){if(new.target===void 0)throw TypeError(`Failed to construct 'Audio': Please use the 'new' operator.`);let t=currentDocument().createElementNS(E,`audio`);return setAttribute(t[z],`preload`,`auto`),e!==void 0&&setAttribute(t[z],`src`,String(e)),t};ef.prototype=HTMLAudioElement.prototype;const tf=/* @__PURE__ */ new WeakMap;function queueDetailsToggle(e,t,n){let r=tf.get(e);r!==void 0&&(t=r.oldState,r.cancelled=!0);let i={oldState:t,cancelled:!1};tf.set(e,i),queueElementTask(e,()=>{i.cancelled||(tf.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===Z.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[z].flags|=12}_attributeChangedSteps(e,t,n,r){if(super._attributeChangedSteps(e,t,n,r),r!==null)return;let i=this[z];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[z])}};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 nf=HTMLElement,rf=class HTMLElement extends nf{get _hasActivationBehavior(){return isSummaryForParentDetails(this[z])}_activationBehavior(e){let t=this[z];if(!isSummaryForParentDetails(t))return;let n=e?.target?.[z];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 Z.a:if(contentAttr(n,`href`)!==null)return!0;break;case Z.audio:case Z.video:if(contentAttr(n,`controls`)!==null)return!0;break;case Z.img:if(contentAttr(n,`usemap`)!==null)return!0;break;case Z.input:if(contentAttr(n,`type`)?.toLowerCase()!==`hidden`)return!0;break;case Z.button:case Z.details:case Z.embed:case Z.iframe:case Z.label:case Z.select:case Z.textarea:return!0}}return!1}const af=/* @__PURE__ */ new WeakMap;function dialogRecord(e){let t=af.get(e);return t===void 0&&(t={returnValue:``,toggleTracker:null,closeWatcher:null,requestCloseReturnValue:null,requestCloseSource:null,enableCloseWatcherForRequestClose:!1},af.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[z].flags|=12}get returnValue(){return af.get(this[z])?.returnValue??``}set returnValue(e){dialogRecord(this[z]).returnValue=String(e)}get closedBy(){return computedClosedBy(this[z])}set closedBy(e){setAttribute(this[z],`closedby`,String(e))}show(){let e=this[z];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[L]);let t=e.doc;hidePopoversUntil(t,topmostPopoverAncestor(e,null,!1),!1,!0),dialogFocusingSteps(e)}showModal(){showModalDialog(this[z],null)}close(e){closeDialog(this[z],e===void 0?null:String(e),null)}requestClose(e){requestCloseDialog(this[z],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[z];n===null&&t!==null&&dialogCleanupSteps(i),isFullyActive(i.doc)&&i.flags&1&&n!==null&&t===null&&dialogSetupSteps(i)}_connectedSteps(){super._connectedSteps();let e=this[z];isFullyActive(e.doc)&&contentAttr(e,`open`)!==null&&e.flags&1&&dialogSetupSteps(e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[z];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[L];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[L];(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=af.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!==Z.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===Z.input&&contentAttr(t,`type`)?.toLowerCase()===`image`){let e=Uu.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===Z.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=af.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[R];n=e===null?null:e[z]}else n=null}return!1}setTopLayerDialogHooks(dialogFocusingSteps,lightDismissOpenDialogs),setDialogCommandSteps(dialogCommandSteps),setDialogSubmission(submitFormToDialog);const of=/* @__PURE__ */ new WeakMap;function templateContentsOwner(e){let t=of.get(e);if(t!==void 0)return t;let n=e[Dn]?Q._createHTML(null):new Q;return e[Dn]||(n[gt]=e[gt]),of.set(n,n),of.set(e,n),n}const sf=Symbol(`content`);var HTMLTemplateElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=me}get content(){let e=this[sf];return e===void 0&&(e=new DocumentFragment(templateContentsOwner(this[z].doc)),e[R]=this,Object.defineProperty(this,sf,{value:e,writable:!0})),e}_cloningSteps(e,t){if(super._cloningSteps(e,t),!t)return;let n=this[sf];if(n===void 0||n[z].first===null)return;let r=e.content,i=r[z].doc;for(let e=n[z].first;e!==null;e=e.next)appendDetached(cloneNode(e,i,!0),r[z])}_adoptingSteps(e){super._adoptingSteps(e);let t=this[sf];t!==void 0&&templateContentsOwner(this[z].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[z],!!e?.flatten).map(e=>e.node)}assignedElements(e){return assignedElements(this[z],!!e?.flatten).map(e=>e.node)}assign(...e){let t=[];for(let n of e){let e=n?.[z];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[z],t)}};str(HTMLSlotElement,`name`);const cf={createSheet:null,removeSheet:null,createLinkSheet:null},lf=Symbol(`sheet`);function getSheet(e){return e[lf]??null}function setSheet(e,t){Object.defineProperty(e,lf,{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),cf.removeSheet?.(e[z],t))}function updateStyleBlock(e){let t=e[z];if(removeAssociatedSheet(e),!(t.flags&1))return;let n=contentAttr(t,`type`);if(n!==null&&n!==``&&n.toLowerCase()!==`text/css`)return;let r=cf.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[z].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[z];if(removeAssociatedSheet(e),!(t.flags&1)||!isStylesheetLink(t)||contentAttr(t,`disabled`)!==null)return;let n=cf.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[z].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`,ic),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`,ac),enumerated(HTMLLinkElement,`fetchPriority=fetchpriority`,sc),bool(HTMLLinkElement,`disabled`);const uf=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[z])}set text(e){this.textContent=String(e)}get async(){return(this[uf]??!0)||contentAttr(this[z],`async`)!==null}set async(e){Object.defineProperty(this,uf,{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`,ic),enumerated(HTMLScriptElement,`referrerPolicy=referrerpolicy`,ac),enumerated(HTMLScriptElement,`fetchPriority=fetchpriority`,sc),tokenList(HTMLScriptElement,`blocking`,`blocking`,[`render`]);var HTMLTitleElement=class extends HTMLElement{get text(){return childTextContent(this[z])}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[z];for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.tag===Z.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[z]),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[z]);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(D,`title`)[z],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`))[z]}r.node.textContent=t}Object.hasOwn(Q.prototype,`title`)||Object.defineProperty(Q.prototype,"title",{get(){return getDocumentTitle(this)},set(e){setDocumentTitle(this,String(e))},configurable:!0,enumerable:!0}),Object.hasOwn(Q.prototype,`dir`)||Object.defineProperty(Q.prototype,"dir",{get(){let e=firstElementChild(this[z]);if(e===null||e.tag!==Z.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[z]);t!==null&&t.tag===Z.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(Q.prototype,e)||Object.defineProperty(Q.prototype,e,{get(){let e=this.body;return e===null||e[z].tag!==Z.body?``:contentAttr(e[z],t)??``},set(e){let n=this.body;n!==null&&n[z].tag===Z.body&&n.setAttribute(t,e===null?``:String(e))},configurable:!0,enumerable:!0});var SVGNumber=class{#e=0;get value(){return this.#e}set value(e){let t=Number(e);if(!Number.isFinite(t))throw TypeError(`Failed to set the 'value' property on 'SVGNumber': The provided float value is non-finite.`);this.#e=Math.fround(t)}};const df=`[ \\t\\n\\r\\f]`,ff=`[+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?`,pf=`(?:${df}*,${df}*|${df}+)`,mf=RegExp(`^${df}*(${ff})${pf}(${ff})${pf}(${ff})${pf}(${ff})${df}*$`);function parseViewBox(e,t){let n=mf.exec(contentAttr(e[z],t)??``);if(n!==null){let e=Number(n[3]),t=Number(n[4]);if(e>=0&&t>=0)return[Number(n[1]),Number(n[2]),e,t]}return[0,0,0,0]}function writeViewBox(e,t,n,r){let i=parseViewBox(e,t);i[n]=Number(r),setAttribute(e[z],t,`${i[0]} ${i[1]} ${i[2]} ${i[3]}`)}var ReflectedRect=class extends Xo{#e;#t;constructor(e,t){super(),this.#e=e,this.#t=t}get x(){return parseViewBox(this.#e,this.#t)[0]}set x(e){writeViewBox(this.#e,this.#t,0,e)}get y(){return parseViewBox(this.#e,this.#t)[1]}set y(e){writeViewBox(this.#e,this.#t,1,e)}get width(){return parseViewBox(this.#e,this.#t)[2]}set width(e){writeViewBox(this.#e,this.#t,2,e)}get height(){return parseViewBox(this.#e,this.#t)[3]}set height(e){writeViewBox(this.#e,this.#t,3,e)}get top(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[1],e[1]+e[3])}get right(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[0],e[0]+e[2])}get bottom(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[1],e[1]+e[3])}get left(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[0],e[0]+e[2])}toJSON(){return new DOMRectReadOnly(this.x,this.y,this.width,this.height).toJSON()}},ReflectedRectReadOnly=class extends DOMRectReadOnly{#e;#t;constructor(e,t){super(),this.#e=e,this.#t=t}get x(){return parseViewBox(this.#e,this.#t)[0]}get y(){return parseViewBox(this.#e,this.#t)[1]}get width(){return parseViewBox(this.#e,this.#t)[2]}get height(){return parseViewBox(this.#e,this.#t)[3]}get top(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[1],e[1]+e[3])}get right(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[0],e[0]+e[2])}get bottom(){let e=parseViewBox(this.#e,this.#t);return Math.max(e[1],e[1]+e[3])}get left(){let e=parseViewBox(this.#e,this.#t);return Math.min(e[0],e[0]+e[2])}toJSON(){return new DOMRectReadOnly(this.x,this.y,this.width,this.height).toJSON()}};exposeMembers(ReflectedRect,ReflectedRectReadOnly),Object.defineProperty(ReflectedRect.prototype,"constructor",{value:Xo,configurable:!0,writable:!0}),Object.defineProperty(ReflectedRectReadOnly.prototype,"constructor",{value:DOMRectReadOnly,configurable:!0,writable:!0});var SVGAnimatedRect=class{#e;#t;#n=null;#r=null;constructor(e,t){this.#e=e,this.#t=t}get baseVal(){return this.#n??=new ReflectedRect(this.#e,this.#t)}get animVal(){return this.#r??=new ReflectedRectReadOnly(this.#e,this.#t)}};const hf=[`unknown`,`none`,`xMinYMin`,`xMidYMin`,`xMaxYMin`,`xMinYMid`,`xMidYMid`,`xMaxYMid`,`xMinYMax`,`xMidYMax`,`xMaxYMax`],gf=[`unknown`,`meet`,`slice`],_f=/^(none|x(?:Min|Mid|Max)Y(?:Min|Mid|Max))(?: +(meet|slice))?$/;function parsePreserveAspectRatio(e){let t=_f.exec(contentAttr(e[z],`preserveAspectRatio`)??``);return t===null?[`xMidYMid`,`meet`]:[t[1],t[2]??`meet`]}var SVGPreserveAspectRatio=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get align(){return hf.indexOf(parsePreserveAspectRatio(this.#e)[0])}set align(e){this.#n(hf,e,0,`Invalid alignment`)}get meetOrSlice(){return gf.indexOf(parsePreserveAspectRatio(this.#e)[1])}set meetOrSlice(e){this.#n(gf,e,1,`Invalid meet-or-slice value`)}#n(e,t,n,r){if(this.#t)throw new DOMException(`Attempting to modify a read-only SVGPreserveAspectRatio`,`NoModificationAllowedError`);let i=e[Number(t)&65535];if(i===void 0||i===`unknown`)throw TypeError(r);let a=parsePreserveAspectRatio(this.#e);a[n]=i,setAttribute(this.#e[z],`preserveAspectRatio`,`${a[0]} ${a[1]}`)}};defineConstants(SVGPreserveAspectRatio,{SVG_PRESERVEASPECTRATIO_UNKNOWN:0,SVG_PRESERVEASPECTRATIO_NONE:1,SVG_PRESERVEASPECTRATIO_XMINYMIN:2,SVG_PRESERVEASPECTRATIO_XMIDYMIN:3,SVG_PRESERVEASPECTRATIO_XMAXYMIN:4,SVG_PRESERVEASPECTRATIO_XMINYMID:5,SVG_PRESERVEASPECTRATIO_XMIDYMID:6,SVG_PRESERVEASPECTRATIO_XMAXYMID:7,SVG_PRESERVEASPECTRATIO_XMINYMAX:8,SVG_PRESERVEASPECTRATIO_XMIDYMAX:9,SVG_PRESERVEASPECTRATIO_XMAXYMAX:10,SVG_MEETORSLICE_UNKNOWN:0,SVG_MEETORSLICE_MEET:1,SVG_MEETORSLICE_SLICE:2});var SVGAnimatedPreserveAspectRatio=class{#e;#t=null;#n=null;constructor(e){this.#e=e}get baseVal(){return this.#t??=new SVGPreserveAspectRatio(this.#e,!1)}get animVal(){return this.#n??=new SVGPreserveAspectRatio(this.#e,!0)}};const vf=Symbol(`viewBox`),yf=Symbol(`preserveAspectRatio`);function installFitToViewBox(e){Object.defineProperty(e.prototype,"viewBox",{get(){let e=this[vf];return e===void 0&&(e=new SVGAnimatedRect(this,`viewBox`),Object.defineProperty(this,vf,{value:e})),e},configurable:!0,enumerable:!0}),Object.defineProperty(e.prototype,"preserveAspectRatio",{get(){let e=this[yf];return e===void 0&&(e=new SVGAnimatedPreserveAspectRatio(this),Object.defineProperty(this,yf,{value:e})),e},configurable:!0,enumerable:!0})}exposeMembers(SVGNumber,SVGAnimatedRect,SVGPreserveAspectRatio,SVGAnimatedPreserveAspectRatio);for(let e of[SVGNumber,SVGAnimatedRect,SVGPreserveAspectRatio,SVGAnimatedPreserveAspectRatio])defineInterfaceShape(e);var SVGAnimatedString=class{[F];[We];constructor(e,t){this[F]=e,this[We]=t}get baseVal(){let e=this[F][z];return this[We]===`href`?contentAttr(e,`href`)??xlinkHref(e)??``:contentAttr(e,this[We])??``}set baseVal(e){setAttribute(this[F][z],this[We],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 bf=Symbol(`className`),xf=Symbol(`href`);var SVGElement=class extends ws{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}get className(){let e=this[bf];return e===void 0&&(e=new SVGAnimatedString(this,`class`),Object.defineProperty(this,bf,{value:e})),e}set className(e){}get ownerSVGElement(){for(let e=this[z].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[xf];return e===void 0&&(e=new SVGAnimatedString(this,`href`),Object.defineProperty(this,xf,{value:e})),e},configurable:!0,enumerable:!0})}var SVGGraphicsElement=class extends SVGElement{getBBox(){return new Xo}getCTM(){return new Ss}getScreenCTM(){return new Ss}},SVGGeometryElement=class extends SVGGraphicsElement{isPointInFill(){return!1}isPointInStroke(){return!1}getTotalLength(){return 0}getPointAtLength(){return new Yo}},SVGSVGElement=class extends SVGGraphicsElement{createSVGNumber(){return new SVGNumber}createSVGLength(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGAngle(){return{unitType:0,value:0,valueInSpecifiedUnits:0,valueAsString:`0`}}createSVGPoint(){return new Yo}createSVGMatrix(){return new Ss}createSVGRect(){return new Xo}createSVGTransform(){return{type:0,matrix:new Ss,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[z];for(let n=t.first;n!==null;n=nextEl(n,t))if(n.type===1&&n.id===String(e))return n.node;return null}};installFitToViewBox(SVGSVGElement);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{};installFitToViewBox(SVGSymbolElement);var 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{};installFitToViewBox(SVGMarkerElement);var SVGClipPathElement=class extends SVGElement{},SVGMaskElement=class extends SVGElement{},SVGPatternElement=class extends SVGElement{};installFitToViewBox(SVGPatternElement),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{};installFitToViewBox(SVGViewElement);var SVGFilterElement=class extends SVGElement{};const Sf=/* @__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 ws{get style(){return this[Nr]??=new CSSStyleDeclaration(this)}set style(e){this.style.cssText=String(e)}};installHTMLOrSVGElement(MathMLElement);const Cf=/* @__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(`.`))Cf.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`])Cf.set(e,3);const wf=[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=Cf.get(i);if(a===void 0||n.length>wf[a])return``;if(a===0||a===1)return e.tag===Z.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=Cf.get(e),a!==2&&a!==3||r>wf[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[z])},set(e){setAttribute(this[z],`autocomplete`,String(e))},enumerable:!0,configurable:!0})}const Tf=/^-?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?$/;function parseFloatStrict(e){if(!Tf.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 Ef=[31,28,31,30,31,30,31,31,30,31,30,31];function daysInMonth(e,t){return e===2&&isLeapYear(t)?29:Ef[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 Df=/^(\d{4,})-(\d{2})$/,Of=/^(\d{4,})-(\d{2})-(\d{2})$/,kf=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/,Af=/^(\d{4,})-W(\d{2})$/;function isValidDateString(e){let t=Of.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=Df.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=Af.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=Df.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=Of.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=kf.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=Af.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 jf=/^[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 jf.test(e)}function isValidAbsoluteURL(e){return URL.canParse(e)}const Mf=Symbol(`FileList`);var FileList=class{constructor(e,t){if(e!==Mf)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(Mf,e)}var ControlState=class{value;dirtyValue;checked;checkedSet;dirtyChecked;indeterminate;files;selStart;selEnd;selDir;userEdited;badInput;uiValue;constructor(){this.value=``,this.dirtyValue=!1,this.checked=!1,this.checkedSet=!1,this.dirtyChecked=!1,this.indeterminate=!1,this.files=null,this.selStart=0,this.selEnd=0,this.selDir=`none`,this.userEdited=!1,this.badInput=!1,this.uiValue=null}};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{[N];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=12,this[N]=new ControlState}get type(){return ca[inputType(this[z])]}set type(e){setAttribute(this[z],`type`,String(e))}_currentValue(e){return this[N].dirtyValue?this[N].value:sanitizeValue(e,attr(this[z],`value`)??``,this[z])}get value(){let e=this[z],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[N].files;return n===null||n.length===0?``:`C:\\fakepath\\`+n.item(0).name}set value(e){let t=e===null?``:String(e),n=this[z],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[N].files=null}_setValueFromAPI(e,t){let n=this._currentValue(e);if(this[z].doc[J]++,this[N].value=sanitizeValue(e,t,this[z]),this[N].dirtyValue=!0,this[N].userEdited=!1,this[N].badInput=!1,this[N].uiValue=null,this[N].value!==n){let e=this[N].value.length;this[N].selStart=e,this[N].selEnd=e,this[N].selDir=`none`}}_checkedness(){return this[N].checkedSet?this[N].checked:attr(this[z],`checked`)!==null}_setCheckedness(e,t){return this[z].doc[J]++,this[N].checked=e,this[N].checkedSet=!0,t&&(this[N].dirtyChecked=!0),e&&inputType(this[z])===16?uncheckOtherRadios(this[z]):null}get checked(){return this._checkedness()}set checked(e){this._setCheckedness(!!e,!0)}get indeterminate(){return this[N].indeterminate}set indeterminate(e){this[z].doc[J]++,this[N].indeterminate=!!e}get files(){return inputType(this[z])===17?this[N].files??=createFileList([]):null}set files(e){inputType(this[z])===17&&e!=null&&(this[N].files=toFileList(e))}get valueAsNumber(){let e=inputType(this[z]);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[z]);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[z]);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[z]);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[z],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[z])))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[z]))?Math.min(this[N].selStart,this._selectionLength()):null}set selectionStart(e){this._assertSelectable(`selectionStart`);let t=toUnsignedLong(e),n=Math.max(t,this.selectionEnd);setSelection(this,t,n,this[N].selDir)}get selectionEnd(){return supportsSelectionType(inputType(this[z]))?Math.min(this[N].selEnd,this._selectionLength()):null}set selectionEnd(e){this._assertSelectable(`selectionEnd`),setSelection(this,this.selectionStart,toUnsignedLong(e),this[N].selDir)}get selectionDirection(){return supportsSelectionType(inputType(this[z]))?this[N].selDir: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[z]))&&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[N].selStart,this[N].selEnd,String(e),t,n,r,arguments.length),a=inputType(this[z]);this[z].doc[J]++,this[N].value=sanitizeValue(a,i.value,this[z]),this[N].dirtyValue=!0,this[N].uiValue=null,setSelection(this,i.start,i.end,`none`)}get height(){return dimensionAttr(this[z],`height`)}set height(e){let t=toUnsignedLong(e);setAttribute(this[z],`height`,String(t<=2147483647?t:0))}get width(){return dimensionAttr(this[z],`width`)}set width(e){let t=toUnsignedLong(e);setAttribute(this[z],`width`,String(t<=2147483647?t:0))}get formAction(){return reflectActionURL(this[z],`formaction`)}set formAction(e){setAttribute(this[z],`formaction`,String(e))}get list(){let e=this[z];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===Z.datalist?n.node:null}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return inputType(this[z])===0?null:this[An]??=new LabelsNodeList(this[z])}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[z];return!isActuallyDisabled(e)&&!(readonlyApplies(inputType(e))&&attr(e,`readonly`)!==null)}_barredFromValidation(){let e=this[z],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[z],t=inputType(e),n=this[Et]?512:0,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[N].files===null||this[N].files.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[N].badInput&&(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[N].userEdited){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[z],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.`:gc;if(e&256)return n===12?`Please enter a number.`:_c;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[Et]??``}_reset(){this[Yr]&&(this[Yr]=!1),this[N].dirtyValue=!1,this[N].dirtyChecked=!1,this[N].userEdited=!1,this[N].badInput=!1,this[N].uiValue=null,this[N].value=``,this[N].files=null,this._setCheckedness(attr(this[z],`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);if(e!==r){let t=this[z];if(t.flags&1){let n=attr(t,`name`);reindexRadio(t,radioKey(e,n),radioKey(r,n))}this._typeChange(e,r)}break}case`checked`:this[N].dirtyChecked||this._setCheckedness(n!==null,!1);break;case`name`:{let e=this[z];if(e.flags&1){let r=inputType(e);reindexRadio(e,radioKey(r,t),radioKey(r,n))}}case`form`:inputType(this[z])===16&&this._checkedness()&&uncheckOtherRadios(this[z]);break;case`multiple`:this[N].dirtyValue&&inputType(this[z])===5&&(this[N].value=sanitizeValue(5,this[N].value,this[z]))}}_typeChange(e,t){let n=this[z];(e===19||t===19)&&n.doc[Qt]++;let r=valueMode(e),i=valueMode(t);if(r===0&&(i===1||i===2)){let t=this[N].dirtyValue?this[N].value:sanitizeValue(e,attr(n,`value`)??``,n);this[N].dirtyValue=!1,t!==``&&setAttribute(n,`value`,t)}else(r!==0&&i===0||r!==3&&i===3)&&(this[N].dirtyValue=!1,this[N].value=``);r===3&&i!==3&&(this[N].files=null),t===16&&this._checkedness()&&uncheckOtherRadios(n),i===0&&this[N].dirtyValue&&(this[N].value=sanitizeValue(t,this[N].value,n)),this[N].uiValue=null,this[N].badInput=!1,!supportsSelectionType(e)&&supportsSelectionType(t)&&(this[N].selStart=0,this[N].selEnd=0,this[N].selDir=`none`)}_connectedSteps(){super._connectedSteps();let e=this[z],t=inputType(e);t===16&&(reindexRadio(e,null,radioKey(t,attr(e,`name`))),this._checkedness()&&radioInserted(e))}_disconnectedSteps(){super._disconnectedSteps();let e=this[z];reindexRadio(e,radioKey(inputType(e),attr(e,`name`)),null)}_cloningSteps(e){let t=e;t[N].value=this[N].value,t[N].dirtyValue=this[N].dirtyValue,t[N].checked=this._checkedness(),t[N].checkedSet=!0,t[N].dirtyChecked=this[N].dirtyChecked,t[N].indeterminate=this[N].indeterminate}get _hasActivationBehavior(){switch(inputType(this[z])){case 15:case 16:case 18:case 19:case 20:case 21:case 17:case 14:return!0}return!1}_legacyPreActivationBehavior(){let e=this[z],t=inputType(e);if(t===15){let e=this._checkedness(),t=this[N].indeterminate;return this._setCheckedness(!e,!0),this[N].indeterminate=!1,{checked:e,indeterminate:t,previousRadio:null}}if(t===16){let t=this._checkedness(),n=this._setCheckedness(!0,!0);return{checked:t,indeterminate:!1,previousRadio:t?e:n}}}_legacyCanceledActivationBehavior(e){if(e===void 0)return;let t=this[z],n=inputType(t);if(t.doc[J]++,n===15)this[N].checked=e.checked,this[N].checkedSet=!0,this[N].indeterminate=e.indeterminate;else if(n===16){let n=e.previousRadio;n!==null&&n!==t&&inSameRadioGroup(t,n)?n.node._setCheckedness(!0,!1):n!==t&&(this[N].checked=!1,this[N].checkedSet=!0)}}_activationBehavior(e,t){let n=this[z],r=inputType(n);if(r===15||r===16){if(!(n.flags&1)||r===16&&t?.checked)return;fireEvent$1(this,`input`,!0,!1,!0),fireEvent$1(this,`change`,!0,!1)}else if(this._isMutable()){if(r===18||r===19){if(r===19){let t=e;t!==null&&typeof t.offsetX==`number`&&typeof t.offsetY==`number`?Uu.set(n,{x:t.offsetX,y:t.offsetY}):Uu.delete(n)}let t=formOwner(n);t!==null&&submitForm(t,n,!1)}else if(r===20){let e=formOwner(n);e!==null&&n.flags&1&&resetForm(e)}popoverTargetAttributeActivation(n,e?.target?.[z]??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`,Bu),enumerated(HTMLInputElement,`formMethod=formmethod`,Vu);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 Nf=/* @__PURE__ */ new Map;function compilePattern(e){let t=Nf.get(e);if(t!==void 0)return t;try{new RegExp(e,`v`),t=RegExp(`^(?:`+e+`)$`,`v`)}catch{t=null}return Nf.size>256&&Nf.clear(),Nf.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[N].selStart,i)||n!==Math.min(e[N].selEnd,i)||a!==e[N].selDir;if(e[N].selStart=t,e[N].selEnd=n,e[N].selDir=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!==Z.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 radioKey(e,t){return e===16&&t!==null&&t!==``?t:null}function reindexRadio(e,t,n){t!==n&&(t!==null&&radioIndexRemove(e.doc[ar],t,e),n!==null&&radioIndexAdd(e.doc[ar]??=/* @__PURE__ */ new Map,n,e))}function radioInserted(e){let t=connectingRoot(),n=!1;t!==null&&t!==e&&forEachInRadioGroup(e,e=>(n=isInclusiveAncestor(t,e)&&e.node._checkedness(),n)),n?uncheck(e):uncheckOtherRadios(e)}function uncheck(e){let t=e.node;if(t[N].checkedSet&&!t[N].checked)return!1;let n=t._checkedness();return e.doc[J]++,t[N].checked=!1,t[N].checkedSet=!0,n}function forEachInRadioGroup(e,t){let n=attr(e,`name`);if(n===null||n===``)return;let r=formOwner(e);if(e.flags&1){let i=e.doc[ar]?.get(n);if(i===void 0)return;let a=r===null?treeRoot(e):null;for(let n of i)if(!(n===e||formOwner(n)!==r||a!==null&&treeRoot(n)!==a)&&t(n))return;return}let 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===Z.input&&attr(a,`name`)===n&&inputType(a)===16&&formOwner(a)===r&&t(a))return}function uncheckOtherRadios(e){let t=null;return forEachInRadioGroup(e,e=>(uncheck(e)&&t===null&&(t=e),!1)),t}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];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=16,this[N]=new ControlState}get type(){return`textarea`}get defaultValue(){let e=``;for(let t=this[z].first;t!==null;t=t.next)(t.type===3||t.type===4)&&(e+=t.data);return e}set defaultValue(e){this.textContent=String(e)}_apiValue(){return this[N].dirtyValue?this[N].value:normalizeNewlines(this.defaultValue)}get value(){return this._apiValue()}set value(e){let t=e===null?``:normalizeNewlines(String(e)),n=this._apiValue();this[z].doc[J]++,this[N].value=t,this[N].dirtyValue=!0,this[N].userEdited=!1,t!==n&&(this[N].selStart=t.length,this[N].selEnd=t.length,this[N].selDir=`none`)}get textLength(){return this._apiValue().length}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}_selectionLength(){return this._apiValue().length}get selectionStart(){return Math.min(this[N].selStart,this._selectionLength())}set selectionStart(e){let t=toUnsignedLong(e);setSelection(this,t,Math.max(t,this.selectionEnd),this[N].selDir)}get selectionEnd(){return Math.min(this[N].selEnd,this._selectionLength())}set selectionEnd(e){setSelection(this,this.selectionStart,toUnsignedLong(e),this[N].selDir)}get selectionDirection(){return this[N].selDir}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[N].selStart,this[N].selEnd,String(e),t,n,r,arguments.length);this[z].doc[J]++,this[N].value=normalizeNewlines(i.value),this[N].dirtyValue=!0,setSelection(this,i.start,i.end,`none`)}_isMutable(){return!isActuallyDisabled(this[z])&&contentAttr(this[z],`readonly`)===null}_barredFromValidation(){let e=this[z];return contentAttr(e,`readonly`)!==null||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){let e=this[z],t=this[Et]?512:0,n=this._apiValue();if(contentAttr(e,`required`)!==null&&this._isMutable()&&n===``&&(t|=1),this[N].userEdited&&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 gc;let t=this._apiValue().length;return e&8?msgTooLong(this.maxLength,t):e&16?msgTooShort(this.minLength,t):this[Et]??``}_reset(){this[Yr]&&(this[Yr]=!1),this[N].dirtyValue=!1,this[N].userEdited=!1,this[N].value=``}_childrenChangedSteps(){if(this[N].dirtyValue)return;let e=this._selectionLength();this[N].selStart>e&&(this[N].selStart=e),this[N].selEnd>e&&(this[N].selEnd=e)}_cloningSteps(e){let t=e;t[N].value=this[N].value,t[N].dirtyValue=this[N].dirtyValue}};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}function settleFlatOptions(e,t){let n=!1;for(let r=e.first;r!==null;r=r.next)if(r.type===1){if(r.tag!==Z.option)return!1;if(t!==void 0)r!==t&&opt(r)._setSelectedness(!1);else if(opt(r)._selectednessNow()){if(n)return!1;n=!0}}return t!==void 0||n}var SelectedOptionsCollection=class extends Wa{_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:Wa,writable:!0,configurable:!0});var HTMLSelectElement=class extends HTMLElement{[H];[xr];[Dr];[Kr];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=28,this[H]=null,this[xr]=null,this[Dr]=!1,this[Kr]=!1}_ensureSettled(){this[Dr]||this._selectednessSettingAlgorithm()}_cloningSteps(e){e[Dr]=this[Dr]}_connectedSteps(){super._connectedSteps(),this._ensureSettled()}get type(){return contentAttr(this[z],`multiple`)===null?`select-one`:`select-multiple`}_displaySize(){let e=contentAttr(this[z],`size`);if(e!==null){let t=parseNonNegativeInteger(e);if(!Number.isNaN(t))return t}return contentAttr(this[z],`multiple`)===null?1:4}_isSingle(){return contentAttr(this[z],`multiple`)===null}get options(){return this[H]??=new HTMLOptionsCollection(this[z])}get length(){return listOfOptions(this[z],[]).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[z],!1,null)}get selectedIndex(){let e=listOfOptions(this[z],[]);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[z],[]);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[Ft]=!0}this._updateSelectedContent()}get value(){let e=listOfOptions(this[z],[]);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[z],[]),r=!1;for(let e=0;e<n.length;e++){let i=opt(n[e]);!r&&i.value===t?(i._setSelectedness(!0),i[Ft]=!0,r=!0):i._setSelectedness(!1)}this._updateSelectedContent()}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}showPicker(){if(isActuallyDisabled(this[z]))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[z],[]);for(let n=0;n<t.length;n++)t[n]!==e&&opt(t[n])._setSelectedness(!1)}_selectednessSettingAlgorithm(e){if(this[Dr]=!0,this._isSingle()){if(e!==void 0||this._displaySize()===1){if(settleFlatOptions(this[z],e))return;e===void 0?this._runSelectedness():this._deselectOthers(e)}this._updateSelectedContent()}}_runSelectedness(){let e=listOfOptions(this[z],[]),t;for(let n=0;n<e.length;n++){let r=opt(e[n]);r._selectednessNow()&&(t?._setSelectedness(!1),t=r)}if(t===void 0){for(let t=0;t<e.length;t++)if(!isActuallyDisabled(e[t])){opt(e[t])._setSelectedness(!0);return}}}_enabledSelectedContent(){let e=this[z];if(contentAttr(e,`multiple`)!==null)return null;for(let t=e.first;t!==null;)if(t.type!==1||t.tag===Z.option||t.tag!==Z.selectedcontent)t=t.tag===Z.option?nextSkippingChildren(t,e):nextInTree(t,e);else{for(let n=t.parent;n!==null&&n!==e;n=n.parent)if(n.tag===Z.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[z],[]),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[z].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[Yr]&&(this[Yr]=!1),this[Dr]=!0;let e=listOfOptions(this[z],[]);for(let t=0;t<e.length;t++){let n=opt(e[t]);n[Ft]=!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[z])||hasDatalistAncestor(this[z])}_placeholderLabelOption(){let e=this[z];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[Et]?512:0;if(contentAttr(this[z],`required`)!==null){let t=listOfOptions(this[z],[]),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[Et]??``}};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===Z.select)return n;if(e===Z.datalist||e===Z.hr||e===Z.option)return null;if(e===Z.optgroup){if(t)return null;t=!0}}return null}var HTMLOptionElement=class extends HTMLElement{[Sr];[Ft];constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=8,this[Ft]=!1}_selectednessNow(){if(this[Sr]!==void 0)return this[Sr];let e=optionSelect(this[z]);return e===null?contentAttr(this[z],`selected`)!==null:(e.node._ensureSettled(),this[Sr]??=contentAttr(this[z],`selected`)!==null)}_setSelectedness(e){this[Sr]!==e&&(this[z].doc[J]++,this[Sr]=e)}get selected(){return this._selectednessNow()}set selected(e){this._setSelectedness(!!e),this[Ft]=!0;let t=optionSelect(this[z]);t!==null&&t.node._selectednessSettingAlgorithm(e?this[z]:void 0)}get text(){let e=this[z],t=``;for(let n=e.first;n!==null;)n.tag===Z.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[z],`value`)??this.text}set value(e){this.setAttribute(`value`,String(e))}get label(){let e=contentAttr(this[z],`label`);return e===null?this.text:e}set label(e){this.setAttribute(`label`,String(e))}get index(){let e=optionSelect(this[z]);if(e===null)return 0;let t=listOfOptions(e,[]).indexOf(this[z]);return t===-1?0:t}get form(){let e=optionSelect(this[z]);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[z]);return}if(e!==`selected`||this[Ft])return;this._setSelectedness(n!==null);let i=optionSelect(this[z]);i!==null&&i.node._selectednessSettingAlgorithm(n===null?void 0:this[z])}_cloningSteps(e){let t=e;t[Sr]=this._selectednessNow(),t[Ft]=this[Ft]}};bool(HTMLOptionElement,`defaultSelected=selected disabled`);const Pf=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};Pf.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[z].flags|=24}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r),r===null&&e===`disabled`&&t===null!=(n===null)&&resetOwnerSelect(this[z])}_childrenChangedSteps(){let e=this[z].parent;e!==null&&e.tag===Z.select&&e.node._selectednessSettingAlgorithm()}};bool(HTMLOptGroupElement,`disabled`),str(HTMLOptGroupElement,`label`);var HTMLButtonElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r)}get type(){return buttonType(this[z])}set type(e){this.setAttribute(`type`,String(e))}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}get formAction(){return reflectActionURL(this[z],`formaction`)}set formAction(e){this.setAttribute(`formaction`,String(e))}_barredFromValidation(){let e=this[z];return buttonType(e)!==`submit`||isActuallyDisabled(e)||hasDatalistAncestor(e)}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[z];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?.[z]??null)}};installConstraintValidation(HTMLButtonElement),str(HTMLButtonElement,`formTarget=formtarget name value`),bool(HTMLButtonElement,`disabled formNoValidate=formnovalidate`),enumerated(HTMLButtonElement,`formEnctype=formenctype`,Bu),enumerated(HTMLButtonElement,`formMethod=formmethod`,Vu);function isInteractiveContent(e){switch(e.tag){case Z.a:return contentAttr(e,`href`)!==null;case Z.audio:case Z.video:return contentAttr(e,`controls`)!==null;case Z.img:return contentAttr(e,`usemap`)!==null;case Z.input:return inputType(e)!==0;case Z.button:case Z.details:case Z.embed:case Z.iframe:case Z.label:case Z.select:case Z.textarea:return!0}return!1}var HTMLLabelElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r),this[z].flags|=12}_connectedSteps(){super._connectedSteps();let e=this[z],t=attr(e,`for`);t!==null&&addToElementIndex(e.doc[en]??=/* @__PURE__ */ new Map,t,e)}_disconnectedSteps(){super._disconnectedSteps();let e=this[z],t=attr(e,`for`);t!==null&&removeFromElementIndex(e.doc[en],t,e)}_attributeChangedSteps(e,t,n,r){super._attributeChangedSteps(e,t,n,r);let i=this[z];e===`for`&&r===null&&t!==n&&i.flags&1&&(t!==null&&removeFromElementIndex(i.doc[en],t,i),n!==null&&addToElementIndex(i.doc[en]??=/* @__PURE__ */ new Map,n,i))}get control(){let e=labeledControl(this[z]);return e===null?null:e.node}get form(){let e=labeledControl(this[z]);if(e===null||e.tag===Z.meter||e.tag===Z.progress)return null;let t=formOwner(e);return t===null?null:t.node}get _hasActivationBehavior(){return!0}_activationBehavior(e){let t=this[z],n=labeledControl(t);if(n===null)return;let r=e===null?null:e.target?.[z]??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{[Ht];constructor(e,t,n,r){super(e,t,n,r),this[Ht]=null}get type(){return`fieldset`}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get elements(){return this[Ht]??=Wa._descendants(this[z],!1,isListed)}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};installConstraintValidation(HTMLFieldSetElement),bool(HTMLFieldSetElement,`disabled`),str(HTMLFieldSetElement,`name`);var HTMLLegendElement=class extends HTMLElement{get form(){let e=this[z].parent;if(e===null||e.tag!==Z.fieldset)return null;let t=formOwner(e);return t===null?null:t.node}};str(HTMLLegendElement,`align`);var HTMLOutputElement=class extends HTMLElement{[Mt];constructor(e,t,n,r){super(e,t,n,r),this[Mt]=null}get type(){return`output`}get form(){let e=formOwner(this[z]);return e===null?null:e.node}get labels(){return this[An]??=new LabelsNodeList(this[z])}get defaultValue(){return this[Mt]??descendantTextContent(this[z])}set defaultValue(e){this[Mt]===null?this.textContent=String(e):this[Mt]=String(e)}get value(){return descendantTextContent(this[z])}set value(e){this[Mt]=this.defaultValue,this.textContent=String(e)}_reset(){this.textContent=this.defaultValue,this[Mt]=null}_barredFromValidation(){return!0}_validityFlags(){return this[Et]?512:0}_validationMessage(e){return this[Et]??``}};installConstraintValidation(HTMLOutputElement),str(HTMLOutputElement,`name`),tokenList(HTMLOutputElement,`htmlFor`,`for`);function attrFloat(e,t){let n=contentAttr(e[z],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{constructor(e,t,n,r){super(e,t,n,r)}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[z],`value`)===null?-1:this.value/this.max}get labels(){return this[An]??=new LabelsNodeList(this[z])}},HTMLMeterElement=class extends HTMLElement{constructor(e,t,n,r){super(e,t,n,r)}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[An]??=new LabelsNodeList(this[z])}};function isOption(e){return e.tag===Z.option}var HTMLDataListElement=class extends HTMLElement{[H];constructor(e,t,n,r){super(e,t,n,r),this[H]=null}get options(){return this[H]??=Wa._descendants(this[z],!0,isOption)}};const Ff=stubbedMethod(`HTMLFormElement`,`submit`),If={keywords:[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],missing:`application/x-www-form-urlencoded`,invalid:`application/x-www-form-urlencoded`},Lf={keywords:[`get`,`post`,`dialog`],missing:`get`,invalid:`get`},Rf={keywords:[`on`,`off`],missing:`on`,invalid:`on`};var HTMLFormElement=class extends HTMLElement{[Ht];[Xt];[In];[ht];[Qn];constructor(e,t,n,r){super(e,t,n,r),this[Ht]=null,this[Xt]=!1,this[In]=!1,this[ht]=!1,this[Qn]=null;let i=new Proxy(this,zf);return this[z].node=i,i}_namedProperty(e){if(e===``)return;let t=this[z],n=namedControl(t,this._controls(),e)??namedImage(t,e);return n===null?this[Qn]?.get(e)?.deref()?.node:n instanceof RadioNodeList?n:(rememberName(this,e,n),n.node)}_controls(){let e=this[z],t=e.doc,n=t[Hr]+t[Qt],r=cachedSnapshot(t,e,n);if(r!==void 0)return r;let i=formControls(e,[],!1);return storeSnapshot(t,e,n,i),i}get elements(){return this[Ht]??=createFormControlsCollection(this[z])}get length(){return this._controls().length}get action(){return reflectActionURL(this[z],`action`)}set action(e){this.setAttribute(`action`,String(e))}get encoding(){return this.enctype}set encoding(e){this.enctype=e}submit(){reportNotImplemented(this[z].doc[Y],Ff),submitForm(this[z],this[z],!0)}requestSubmit(e=null){let t=this[z];if(e!=null){let n=e[z];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[z],t,!1)}reset(){resetForm(this[z]),flushFaceReactions()}checkValidity(){return formCheckValidity(this[z])}reportValidity(){return formCheckValidity(this[z])}};str(HTMLFormElement,`acceptCharset=accept-charset name rel target`),bool(HTMLFormElement,`noValidate=novalidate`),enumerated(HTMLFormElement,`enctype`,If),enumerated(HTMLFormElement,`method`,Lf),enumerated(HTMLFormElement,`autocomplete`,Rf),tokenList(HTMLFormElement,`relList`,`rel`,[`noopener`,`noreferrer`,`opener`]);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[Qn];if(r!==null)for(let n of r.keys())!t.includes(n)&&e._namedProperty(n)!==void 0&&t.push(n);return t}function indexedOrNamedValue(e,t){let n=arrayIndex(t);return n===-1?e._namedProperty(t):e._controls()[n]?.node}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 zf={get(e,t,n){if(t===z)return e[z];if(typeof t==`symbol`)return e[t];let r=arrayIndex(t);if(r!==-1){let i=e._controls();return r<i.length?i[r].node:Reflect.get(e,t,n)}let i=Reflect.get(e,t,n);if(i!==void 0)return i;let a=e._namedProperty(t);return a===void 0||t in e?void 0:a},has(e,t){return t in e||typeof t==`string`&&indexedOrNamedValue(e,t)!==void 0},getOwnPropertyDescriptor(e,t){if(typeof t==`string`&&!(t in e)){let n=indexedOrNamedValue(e,t);if(n!==void 0)return{value:n,writable:!1,enumerable:arrayIndex(t)!==-1,configurable:!0}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n,r){if(typeof t==`symbol`)return Reflect.set(e,t,n,r);if(r!==e[z].node)return!(t in e)&&indexedOrNamedValue(e,t)!==void 0?!1:Reflect.set(e,t,n,r);let i=Reflect.getOwnPropertyDescriptor(e,t);return i===void 0?t in e?Reflect.set(e,t,n,r):arrayIndex(t)!==-1||e._namedProperty(t)!==void 0?!1:Reflect.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):i.writable===!0?(e[t]=n,!0):i.set===void 0&&i.get===void 0?!1:Reflect.set(e,t,n,r)},defineProperty(e,t,n){return typeof t==`string`&&(arrayIndex(t)!==-1||!(t in e)&&e._namedProperty(t)!==void 0)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&!(t in e)&&indexedOrNamedValue(e,t)!==void 0?!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}},Bf=/* @__PURE__ */ new Map;function recordHostOriginal(e,t){Bf.has(e)||Bf.set(e,t)}const Vf=/* @__PURE__ */ new WeakSet;let Hf=null;function hostFormData(){let e=Bf.get(`FormData`);if(e!==void 0)return e;let t=globalThis.FormData;return t===FormData$1?void 0:t}function nodeFormData(){if(Hf!==null)return Hf;let e=hostFormData();if(e===void 0)throw TypeError(`FormData is not available in this Node.js runtime.`);return Hf=e,Object.setPrototypeOf(FormData$1.prototype,Hf.prototype),Object.setPrototypeOf(FormData$1,Hf),Hf}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?.[z];if(r===void 0||r.tag!==Z.form)throw TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`);let i=null;if(t!=null){let e=t[z];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];n.append(r,i)}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 Uf=/* @__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]]),Wf=/* @__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`,rf]]);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(`.`))Wf.set(e,HTMLElement);for(let[e,t]of Uf)Wf.set(e,t);installPopoverInvoker(Wf.get(`button`)),installPopoverInvoker(Wf.get(`input`)),installCommandInvoker(Wf.get(`button`));function elementClassFor(e,t){if(t===`http://www.w3.org/1999/xhtml`){let t=Wf.get(e);return t===void 0?e.includes(`-`)&&isValidCustomElementName(e)?HTMLElement:HTMLUnknownElement:t}return t===`http://www.w3.org/2000/svg`?Sf.get(e)??SVGElement:t===`http://www.w3.org/1998/Math/MathML`?MathMLElement:ws}setElementClassLookup(elementClassFor);let Gf=null;function isBuiltinInterface(e){if(Gf===null){Gf=/* @__PURE__ */ new Set([HTMLElement,HTMLUnknownElement,HTMLMediaElement]);for(let e of Wf.values())Gf.add(e)}return Gf.has(e)}function localNamesForInterface(e){let t=[];for(let[n,r]of Wf)r===e&&t.push(n);return t}uu.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,...Wf.values(),...Sf.values()])(e.name!==`HTMLElement`||e===HTMLElement)&&setClassString(e);for(let e of[SVGGraphicsElement,SVGGeometryElement,SVGTextContentElement,SVGTextPositioningElement,SVGGradientElement])setClassString(e);const Kf=[`window`,`self`,`frames`,`parent`,`top`],qf=/* @__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(`.`),Jf=new Set(jd);let Yf=null;function windowAttributes(){if(Yf!==null)return Yf;let e=windowInterfaces(),t=/* @__PURE__ */ new Set([...Kf,...qf,`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)||Jf.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`),Yf=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 Kf)define(e,{value:t,writable:!0,enumerable:!0,configurable:!0});define(`document`,{value:e.document,writable:!0,enumerable:!0,configurable:!0});let i=e[H].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 qf){if(a.has(t))continue;let n=l[t].bind(e);Vf.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[R];e[R]=t;let _=e[un];e[un]=t;let v=Dd.get(t);Dd.set(t,e);let y=!0;return function uninstall(){if(y){y=!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[R]=h,e[un]=_,Dd.get(t)===e&&(v===void 0?Dd.delete(t):Dd.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}},Xf=class XMLHttpRequestEventTarget extends EventTarget{constructor(){if(new.target===XMLHttpRequestEventTarget)throw TypeError(`Illegal constructor`);super()}};const Zf=Symbol(`upload`);var XMLHttpRequestUpload=class extends Xf{constructor(e){if(e!==Zf)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(Xf.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?.[ai];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 Xf{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;[ai];constructor(){super(),this[ai]=new XhrState(currentWindowOrNull(),new XMLHttpRequestUpload(Zf))}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[ut])throw invalidState(`execute 'open' on`,`The document is not fully active.`);if(e=String(e),!Qf.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`);$f.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,``),!Qf.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(tp.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[ut])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 Q)&&(r[1]=r[1].replace(/;\s*charset=("[^"]*"|[^;]*)/i,e=>/utf-8/i.test(e)?e:`;charset=UTF-8`))}t.uploadListener=hasAnyListener(t.upload),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),ep.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 Qf=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,$f=/* @__PURE__ */ new Set([`DELETE`,`GET`,`HEAD`,`OPTIONS`,`POST`,`PUT`]),ep=/* @__PURE__ */ new Set([``,`arraybuffer`,`blob`,`document`,`json`,`text`]),tp=/* @__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`]),np=[`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 np)_.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(),y=process.getBuiltinModule(`node:zlib`),b=v===`gzip`||v===`x-gzip`?y.createGunzip():v===`deflate`?y.createInflate():v===`br`?y.createBrotliDecompress():null,x=Number(l.headers[`content-length`]??0)||0;processResponse(e,t,n,r,d,l.statusMessage??``,_,b===null?l:l.pipe(b),b===null?x: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 Q){let t=e[z],n=e[Dn],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(`
|
|
47
47
|
`,`%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
|
|
48
48
|
`));if(typeof o==`string`){let i=o.toWellFormed().replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
|
49
49
|
`),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
|