var sa=Object.create;var Ne=Object.defineProperty;var ia=Object.getOwnPropertyDescriptor;var na=Object.getOwnPropertyNames;var oa=Object.getPrototypeOf,ha=Object.prototype.hasOwnProperty;var aa=(t,e)=>{for(var r in e)Ne(t,r,{get:e[r],enumerable:!0})},si=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of na(e))!ha.call(t,i)&&i!==r&&Ne(t,i,{get:()=>e[i],enumerable:!(s=ia(e,i))||s.enumerable});return t};var Wt=(t,e,r)=>(r=t!=null?sa(oa(t)):{},si(e||!t||!t.__esModule?Ne(r,"default",{value:t,enumerable:!0}):r,t)),la=t=>si(Ne({},"__esModule",{value:!0}),t);var Sc={};aa(Sc,{Accessor:()=>ri,CUSTOM_TYPES:()=>Ds,Comment:()=>Nt,Component:()=>xe,CustomEvent:()=>Z,Document:()=>Pt,DocumentFragment:()=>be,Easer:()=>Sr,Element:()=>x,ElementRoute:()=>wr,ElementRouteTo:()=>ei,Emitter:()=>lr,Event:()=>X,EventHandler:()=>ti,Fragment:()=>Yt,HTMLButtonElement:()=>mr,HTMLElement:()=>H,HTMLHtmlElement:()=>cr,HTMLInputElement:()=>fr,HTMLLinkElement:()=>zs,HTMLOptionElement:()=>gr,HTMLScriptElement:()=>Bs,HTMLSelectElement:()=>dr,HTMLStyleElement:()=>Us,HTMLTextAreaElement:()=>pr,ImbaElement:()=>_h,IntersectionEventDefaults:()=>Te,KeyboardEvent:()=>Ks,LazyProxy:()=>Cs,Location:()=>ve,MouseEvent:()=>vr,Node:()=>A,PointerEvent:()=>qs,RenderContext:()=>Lt,Router:()=>xr,SVGElement:()=>Se,SVGSVGElement:()=>Ys,Scheduler:()=>ks,ShadowRoot:()=>uh,StyleDeclaration:()=>Gs,Text:()=>Kt,UIEvent:()=>yr,Window:()=>oh,accessor:()=>Qh,autorun:()=>Rh,awaits:()=>Dh,clearInterval:()=>Is,clearTimeout:()=>As,colors:()=>xh,commit:()=>I,createAtom:()=>Vh,createComment:()=>kt,createComponent:()=>Ws,createDynamic:()=>ph,createElement:()=>ch,createFragment:()=>fh,createIndexedList:()=>vh,createKeyedList:()=>bh,createLiveFragment:()=>yh,createRenderContext:()=>Rs,createSVGElement:()=>dh,createSlot:()=>_e,createTextNode:()=>br,customElements:()=>ah,defineTag:()=>mh,descriptor:()=>Jh,document:()=>ur,emit:()=>ot,env:()=>sh,events:()=>Oh,getDeepPropertyDescriptor:()=>ar,getRenderContext:()=>nh,getSuperTagType:()=>lh,getTagType:()=>ht,get_document:()=>qt,hooks:()=>Hs,hotkeys:()=>Ah,hydrate:()=>Sh,listen:()=>nt,locals:()=>ta,mount:()=>Qs,observable:()=>Gh,once:()=>B,parseTime:()=>Bt,proxy:()=>Ps,render:()=>Th,renderContext:()=>k,renderer:()=>Ut,reportChanged:()=>zh,reportObserved:()=>Uh,router:()=>jh,run:()=>Bh,scheduler:()=>z,serve:()=>rh,session:()=>ea,setInterval:()=>Fs,setTimeout:()=>$s,styles:()=>Xs,toCamelCase:()=>Qo,transitions:()=>we,unlisten:()=>zt,unmount:()=>Js,use_dom_bind:()=>Lh,use_dom_teleport:()=>Nh,use_dom_transitions:()=>Mh,use_events:()=>Eh,use_events_hotkey:()=>Ih,use_events_intersect:()=>kh,use_events_keyboard:()=>Zs,use_events_mouse:()=>_r,use_events_pointer:()=>Ch,use_events_resize:()=>$h,use_events_selection:()=>Fh,use_events_touch:()=>Ph,use_hooks:()=>Jo,use_router:()=>Hh,use_slots:()=>gh,use_styles:()=>wh,use_window:()=>hh,\u03B1action:()=>Xh,\u03B1autorun:()=>Wh,\u03B1computed:()=>qh,\u03B1lazy:()=>Zo,\u03B1observable:()=>Kh,\u03B1prop:()=>Zh,\u03B1ref:()=>Yh});module.exports=la(Sc);var js=Wt(require("cluster")),J=Wt(require("fs")),Tt=Wt(require("path")),th=require("events"),eh=Wt(require("http")),Vs=Wt(require("path")),ih=require("async_hooks"),ua=Object.create,ii=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,da=Object.getOwnPropertyNames,fa=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty,ma=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ga=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of da(e))!pa.call(t,i)&&i!==r&&ii(t,i,{get:()=>e[i],enumerable:!(s=ca(e,i))||s.enumerable});return t},ya=(t,e,r)=>(r=t!=null?ua(fa(t)):{},ga(e||!t||!t.__esModule?ii(r,"default",{value:t,enumerable:!0}):r,t)),va=ma((t,e)=>{"use strict";var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(u,d,f){return Function.prototype.apply.call(u,d,f)},i;r&&typeof r.ownKeys=="function"?i=r.ownKeys:Object.getOwnPropertySymbols?i=function(u){return Object.getOwnPropertyNames(u).concat(Object.getOwnPropertySymbols(u))}:i=function(u){return Object.getOwnPropertyNames(u)};function n(u){console&&console.warn&&console.warn(u)}var o=Number.isNaN||function(u){return u!==u};function h(){h.init.call(this)}e.exports=h,e.exports.once=E,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var l=10;function c(u){if(typeof u!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof u)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(u){if(typeof u!="number"||u<0||o(u))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+u+".");l=u}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(u){if(typeof u!="number"||u<0||o(u))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+u+".");return this._maxListeners=u,this};function a(u){return u._maxListeners===void 0?h.defaultMaxListeners:u._maxListeners}h.prototype.getMaxListeners=function(){return a(this)},h.prototype.emit=function(u){for(var d=[],f=1;f0&&(b=d[0]),b instanceof Error)throw b;var w=new Error("Unhandled error."+(b?" ("+b.message+")":""));throw w.context=b,w}var j=y[u];if(j===void 0)return!1;if(typeof j=="function")s(j,this,d);else for(var Le=j.length,ra=N(j,Le),f=0;f0&&w.length>y&&!w.warned){w.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=u,j.type=d,j.count=w.length,n(j)}return u}h.prototype.addListener=function(u,d){return v(this,u,d,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(u,d){return v(this,u,d,!0)};function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(u,d,f){var g={fired:!1,wrapFn:void 0,target:u,type:d,listener:f},y=m.bind(g);return y.listener=f,g.wrapFn=y,y}h.prototype.once=function(u,d){return c(d),this.on(u,S(this,u,d)),this},h.prototype.prependOnceListener=function(u,d){return c(d),this.prependListener(u,S(this,u,d)),this},h.prototype.removeListener=function(u,d){var f,g,y,b,w;if(c(d),g=this._events,g===void 0)return this;if(f=g[u],f===void 0)return this;if(f===d||f.listener===d)--this._eventsCount===0?this._events=Object.create(null):(delete g[u],g.removeListener&&this.emit("removeListener",u,f.listener||d));else if(typeof f!="function"){for(y=-1,b=f.length-1;b>=0;b--)if(f[b]===d||f[b].listener===d){w=f[b].listener,y=b;break}if(y<0)return this;y===0?f.shift():O(f,y),f.length===1&&(g[u]=f[0]),g.removeListener!==void 0&&this.emit("removeListener",u,w||d)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(u){var d,f,g;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[u]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[u]),this;if(arguments.length===0){var y=Object.keys(f),b;for(g=0;g=0;g--)this.removeListener(u,d[g]);return this};function p(u,d,f){var g=u._events;if(g===void 0)return[];var y=g[d];return y===void 0?[]:typeof y=="function"?f?[y.listener||y]:[y]:f?Mt(y):N(y,y.length)}h.prototype.listeners=function(u){return p(this,u,!0)},h.prototype.rawListeners=function(u){return p(this,u,!1)},h.listenerCount=function(u,d){return typeof u.listenerCount=="function"?u.listenerCount(d):_.call(u,d)},h.prototype.listenerCount=_;function _(u){var d=this._events;if(d!==void 0){var f=d[u];if(typeof f=="function")return 1;if(f!==void 0)return f.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function N(u,d){for(var f=new Array(d),g=0;g=0?t.replace(ba,function(e){return e.charAt(1).toUpperCase()}):t}function ar(t,e,r){if(!t)return;let s=Object.getOwnPropertyDescriptor(t,e);return s||t==r?s||void 0:ar(Reflect.getPrototypeOf(t),e,r)}var ni=function(t,e,r){let s,i,n;for(;(s=r)&&(r=r.next);)(i=r.listener)&&(r.path&&i[r.path]?n=e?i[r.path].apply(i,e):i[r.path]():n=e?i.apply(r,e):i.call(r)),r.times&&--r.times<=0&&(s.next=r.next,r.listener=null)};function nt(t,e,r,s){var i;let n,o,h;return n=t[Me]||(t[Me]={}),o=n[e]||(n[e]={}),h=o.tail||(o.tail=o.next={}),h.listener=r,h.path=s,o.tail=h.next={},h}function B(t,e,r){let s=nt(t,e,r);return s.times=1,s}function zt(t,e,r,s){let i,n,o=t[Me];if(!!o&&(i=o[e])){for(;(n=i)&&(i=i.next);)if(i==r||i.listener==r){n.next=i.next,i.listener=null;break}}}function ot(t,e,r){let s;(s=t[Me])&&(s[e]&&ni(e,r,s[e]),s.all&&ni(e,[e,r],s.all))}var lr=class{emit(t,...e){return ot(this,t,e)}on(t,...e){return nt(this,t,...e)}once(t,...e){return B(this,t,...e)}un(t,...e){return zt(this,t,...e)}};function Sa(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var oi=Symbol.for("#__init__"),hi=Symbol.for("#schedule"),Tr=Symbol.for("#frames"),Oe=Symbol.for("#interval"),$t=Symbol.for("#stage"),Ft=Symbol.for("#scheduled"),Ee=Symbol.for("#version"),_a=Symbol.for("#fps"),ai=Symbol.for("#ticker"),xa=globalThis.requestAnimationFrame||function(t){return globalThis.setTimeout(t,1e3/60)},xc=1/60,wa=class{constructor(t=null){this[oi](t)}[oi](t=null){var e;this.owner=t&&(e=t.owner)!==void 0?e:null,this.target=t&&(e=t.target)!==void 0?e:null,this.active=t&&(e=t.active)!==void 0?e:!1,this.value=t&&(e=t.value)!==void 0?e:void 0,this.skip=t&&(e=t.skip)!==void 0?e:0,this.last=t&&(e=t.last)!==void 0?e:0}tick(t,e){return this.last=this.owner[Tr],this.target.tick(this,e),1}update(t,e){let r=this.active,s=t.value;return this.value!=s&&(this.deactivate(),this.value=s),(this.value||r||e)&&this.activate(),this}queue(){this.owner.add(this)}activate(){return this.value===!0?this.owner.on("commit",this):this.value===!1||typeof this.value=="number"&&(this.value/16.666666666666668<=2?this.owner.on("raf",this):this[Oe]=globalThis.setInterval(this.queue.bind(this),this.value)),this.active=!0,this}deactivate(){return this.value===!0&&this.owner.un("commit",this),this.owner.un("raf",this),this[Oe]&&(globalThis.clearInterval(this[Oe]),this[Oe]=null),this.active=!1,this}},ks=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[$t]=-1,this[Tr]=0,this[Ft]=!1,this[Ee]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[_a]=0,t.$promise=null,t.$resolve=null,this[ai]=function(e){return t[Ft]=!1,t.tick(e)}}touch(){return this[Ee]++}get version(){return this[Ee]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[Ft]||this[hi](),this}get committing\u03A6(){return this.queue.indexOf("commit")>=0}get syncing\u03A6(){return this[$t]==1}listen(t,e){let r=this.listeners[t],s=!r;return r||(r=this.listeners[t]=new Set),r.add(e),t=="raf"&&s&&this.add("raf"),this}unlisten(t,e){var r;let s=this.listeners[t];return s&&s.delete(e),t=="raf"&&s&&s.size==0&&(r=this.listeners.raf,delete this.listeners.raf),this}on(t,e){return this.listen(t,e)}un(t,e){return this.unlisten(t,e)}get promise(){var t=this;return t.$promise||(t.$promise=new Promise(function(e){return t.$resolve=e}))}tick(t){var e=this;let r=this.queue,s=this[Tr]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[$t]=1,this[Ee]++,r.length)for(let i=0,n=Sa(r),o=n.length;i=0)return e;if(s?.imports)for(let i=0,n=tt(s?.imports),o=n.length;i; rel=modulepreload; as=script"}).join(", ")),this.path=t.localPathForUrl(e)}respond(t,e){var r=this;return J.default.access(this.path,J.default.constants.R_OK,function(s){if(s)return e.writeHead(404,{}),e.end();try{if(r.server.options.setHeaders&&r.server.options.setHeaders(e,r.path),globalThis.BUN)return J.default.readFile(r.path,function(i,n){return e.writeHead(200,r.headers),e.end(n)});{let i=J.default.createReadStream(r.path);return e.writeHead(200,r.headers),i.pipe(e)}}catch{return e.writeHead(503,{}),e.end()}})}createReadStream(){return J.default.createReadStream(this.path)}pipe(t){return this.createReadStream().pipe(t)}},Oa=class{static wrap(t,e={}){return new this(t,e)}localPathForUrl(t){var e,r,s;let i=t.replace(/\?.*$/,"");return(e=this.urlToLocalPathMap)[i]==null?e[i]=(r=Tt.default.resolve(this.publicPath,"."+i),s=J.default.existsSync(r)&&r,!s&&this.staticDir&&(r=Tt.default.resolve(this.staticDir,"."+i),s=J.default.existsSync(r)&&r),s):e[i]}headersForAsset(t){let e,r=Tt.default.extname(t);return e=Object.assign({"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public"},Lr[r.slice(1)]||{})}get manifest(){return globalThis.IMBA_MANIFEST||{}}constructor(t,e={}){var r=this;Qt.add(this),this.id=Math.random(),this.options=e,this.closed=!1,this.paused=!1,this.server=t,this.clients=new Set,this.stalledResponses=[],this.assetResponders={},this.urlToLocalPathMap={},this.publicExistsMap={};try{this.rootDir=V.env.IMBA_OUTDIR||Tt.default.dirname(V.env.pm_exec_path||V.argv[1])}catch{}try{this.publicPath=Tt.default.resolve(this.rootDir,V.env.IMBA_PUBDIR||globalThis.IMBA_PUBDIR||"public")}catch{}this.staticDir=globalThis.IMBA_STATICDIR||"",V.env.IMBA_PATH&&(this.devtoolsPath=Tt.default.resolve(V.env.IMBA_PATH,"dist","hmr.js")),this.scheme=t instanceof eh.default.Server?"http":"https";let s=this.server._events.request,i=globalThis[Ta];t.off("request",s),s[La]=this,t.on("listening",function(){let n=r.server.address(),o=n.address;(o=="::"||o=="0.0.0.0")&&(o="localhost");let h=""+r.scheme+"://"+o+":"+n.port+"/";if(!V.env.IMBA_CLUSTER)return console.log("listening on "+h)}),globalThis.IMBA_HMR&&(globalThis.IMBA_HMR_PATH="/__hmr__.js"),r.handler=function(n,o){var h,l;let c=n.constructor.name=="Http2ServerRequest",a=n.url;if(r.paused||r.closed)return o.statusCode=302,o.setHeader("Location",n.url),c||o.setHeader("Connection","close"),r.closed?(c&&n.stream.session.close(),o.end()):r.stalledResponses.push(o);if(globalThis.IMBA_HMR){if(a=="/__hmr__.js"&&r.devtoolsPath){let p=J.default.createReadStream(r.devtoolsPath);return o.writeHead(200,Lr.js),p.pipe(o)}if(a=="/__hmr__"){let p={"Content-Type":"text/event-stream","Cache-Control":"no-cache"};return c||(p.Connection="keep-alive"),o.writeHead(200,p),r.clients.add(o),r.broadcast("init",globalThis.IMBA_MANIFEST,[o]),n.on("close",function(){return r.clients.delete(o)}),!0}}let v=n.headers,m;c?m=v[":scheme"]+"://"+v[":authority"]:m=(n.connection.encrypted?"https":"http")+"://"+v.host;let S=r.manifest[a];if(S&&r.localPathForUrl(a))return((l=r.assetResponders)[a]||(l[a]=new Ma(r,a,S))).respond(n,o);if((a.match(/\.[A-Z\d]{8}\./)||a.match(/\.\w{1,4}($|\?)/))&&(h=r.localPathForUrl(a)))try{let p=r.headersForAsset(h);if(e.setHeaders&&e.setHeaders(o,h),globalThis.BUN)return J.default.readFile(h,function(_,N){return _?(o.writeHead(500,{}),o.write("Error getting the file: "+_)):(o.writeHead(200,p),o.end(N))});{let _=J.default.createReadStream(h);return o.writeHead(200,p),_.pipe(o)}}catch{return o.writeHead(503,{}),o.end()}if(i){let p=new i.Location(n.url,m);return i.Document.create({location:p},function(){return s(n,o)})}else return s(n,o)},t.on("request",r.handler),t.on("close",function(){return console.log("server is closing!!!")}),globalThis.IMBA_RUN&&js.default.isWorker&&(mi[li](),mi.send("serve"))}broadcast(t,e={},r=this.clients){e=JSON.stringify(e);let s="data: "+e+` `;for(let i of tt(r))i.write("event: "+t+` `),i.write(`id: imba `),i.write(s);return this}pause(){return this.paused!=!0&&(this.paused=!0,!0)&&this.broadcast("paused"),this}resume(){if(this.paused!=!1&&(this.paused=!1,!0))return this.broadcast("resumed"),this.flushStalledResponses()}flushStalledResponses(){for(let t=0,e=tt(this.stalledResponses),r=e.length;t0&&setTimeout(function(){return r.decr(t)},e),s[t]=Math.max(i,0)+1}decr(t){let e=this.stacks,r=e[t]||0;return r==1&&this.remove(t),e[t]=Math.max(r,1)-1}reconcile(t,e){let r=this[vi],s=this[bi],i=!0;if(!r)r=this[vi]=[t],s=this[bi]=[e||""],this.toString=this.valueOf=this[yi];else{let n=r.indexOf(t),o=e||"";n==-1?(r.push(t),s.push(o)):s[n]!=o?s[n]=o:i=!1}i&&(this[Si]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[yi](){return this.string+(this[Si]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[_i]||(this[_i]={})}},Ce=Symbol.for("#__init__"),xi=Symbol.for("#__initor__"),wi=Symbol.for("#__inited__"),Or=Symbol.for("#getRenderContext"),Ca=Symbol.for("#getDynamicContext"),Ti=Symbol(),k={context:null},Pa=class{constructor(t=null){this[Ce](t)}[Ce](t=null){var e;this.stack=t&&(e=t.stack)!==void 0?e:[]}push(t){return this.stack.push(t)}pop(t){return this.stack.pop()}},Ut=new Pa,Lt=class extends Map{static[Ce](){return this.prototype[xi]=Ti,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[xi]===Ti&&this[wi]&&this[wi]()}pop(){return k.context=null}[Or](t){let e=this.get(t);return e||this.set(t,e=new Lt(this._,t)),k.context=e}[Ca](t,e){return this[Or](t)[Or](e)}run(t){return this.value=t,k.context==this&&(k.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};Lt[Ce]();function Rs(t,e=Symbol(),r=t){return k.context=t[e]||(t[e]=new Lt(r,e))}function nh(){let t=k.context,e=t||new Lt(null);return globalThis.DEBUG_IMBA&&!t&&Ut.stack.length>0&&console.warn("detected unmemoized nodes in",Ut.stack.slice(0),"see https://imba.io",e),t&&(k.context=null),e}function Er(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var U=Symbol.for("#__initor__"),q=Symbol.for("#__inited__"),C=Symbol.for("#__init__"),Cr=Symbol.for("#parent"),Li=Symbol.for("#context"),Ni=Symbol.for("#closestNode"),ka=Symbol.for("#parentNode"),$a=Symbol.for("##inited"),Pr=Symbol.for("#getRenderContext"),Fa=Symbol.for("#getDynamicContext"),kr=Symbol.for("#replaceChild"),Jt=Symbol.for("#appendChild"),Mi=Symbol.for("#removeChild"),mt=Symbol.for("#insertInto"),Oi=Symbol.for("#insertChild"),Zt=Symbol.for("#removeFrom"),Ei=Symbol.for("#removeFromDeopt"),It=Symbol.for("#replaceWith"),Ci=Symbol.for("#replaceWithDeopt"),$r=Symbol.for("#placeholderNode"),Ia=Symbol.for("#attachToParent"),Aa=Symbol.for("#detachFromParent"),Ha=Symbol.for("#placeChild"),ja=Symbol.for("#beforeReconcile"),Va=Symbol.for("#afterReconcile"),Ra=Symbol.for("#afterVisit"),Da=Symbol.for("#visitContext"),Pi=Symbol.for("#document"),Pe=Symbol.for("#htmlNodeName"),ki=Symbol.for("#ImbaElement"),$i=Symbol.for("#flags"),ke=Symbol.for("#scripts"),Fr=Symbol.for("#location"),Fi=Symbol.for("##document"),Ii=Symbol.for("##parent"),Ga=Symbol.for("##up"),Ai=Symbol.for("##context"),te=Symbol.for("#domNode"),$e=Symbol.for("##placeholderNode"),Hi=Symbol.for("#domDeopt"),Ba=Symbol.for("#insertIntoDeopt"),ji=Symbol.for("##classList"),Fe=Symbol.for("##style"),Vi=Symbol.for("##dataset"),at=Symbol.for("#asset"),Ir=Symbol.for("#innerHTML"),Ie=Symbol.for("##visitContext"),za=Symbol.for("#isRichElement"),ee=Symbol.for("#src"),Ua=Symbol.for("#getSlot"),qa=Symbol.for("#cssns"),Ka=Symbol.for("#cssid"),Ya=Symbol.for("#dom"),Ri=Symbol(),Di=Symbol(),Gi=Symbol(),Bi=Symbol(),zi=Symbol(),Ui=Symbol(),Wa={},re=null,ve=class extends URL{},oh=class{get document(){return this[Pi]||(this[Pi]=new this.Document(this))}get location(){return this.document.location}};function hh(){return!0}var Xa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},lt=null,qi={},Qa=class{define(){return this}get(){return this}upgrade(){}whenDefined(){}},ah=new Qa,Ds={};function ht(t,e){let r=t;if(typeof t=="string"&&(t=et[t]||P[t]||et[t+"Element"]||P["svg_"+t]),t instanceof A)return t;if(!t)return ht("HTML");if(t&&!t.klass){class s extends ht(t.up){}t.klass=s}if(t&&!t.idl){t.idl=!0;let s=Object.getOwnPropertyDescriptors(t.klass.prototype);for(let i=t[1],n=0,o=Object.keys(i),h=o.length,l,c;n=0&&(e=e.replace(/\"/g,""")),e},Ar=function(t,e){let r=typeof t=="string"?t:String(t);return e=="script"||(r.indexOf('"')>=0&&(r=r.replace(/\"/g,""")),r.indexOf("<")>=0&&(r=r.replace(/\")>=0&&(r=r.replace(/\>/g,">"))),r},Pt=class{static create(t,e){let r=new Pt;return r[Li]=t,r.location=t.location,re||(re=new ih.AsyncLocalStorage),re.run(r,e),r}constructor(){}get flags(){return this[$i]||(this[$i]=new Mr({classList:new Hr(this)}))}get scripts(){return this[ke]||(this[ke]=[])}set location(t){typeof t=="string"&&(t=new ve(t)),this[Fr]=t}get location(){return this[Fr]||(this[Fr]=new ve("http://localhost/"))}createElement(t){let e=ht(t),r=new e(t);return r.nodeName=t,r}createElementNS(t,e){if(t=="http://www.w3.org/2000/svg"){let r=ht("svg_"+e),s=new r;return s.nodeName=e,s}return this.createElement(e)}createTextNode(t){return new Kt(t)}createComment(t){return new Nt(t)}createDocumentFragment(){return new be}getElementById(t){return null}},ut=new Pt,ur=ut;function qt(){return re&&re?.getStore?.()||ut}var Hr=class{constructor(t,e){this.classes=e||[],this.dom=t}add(t){return this.classes.indexOf(t)<0&&this.classes.push(t),this}remove(t){let e=this.classes.indexOf(t);return e>=0&&(this.classes[e]=""),this}toggle(t){return this.contains(t)?this.remove(t):this.add(t),this}contains(t){return this.classes.indexOf(t)>=0}clone(t){return new Hr(t,this.classes.slice(0))}toString(){return this.classes.join(" ").trim()}},Gs=class{constructor(){}removeProperty(t){var e;return e=this[t],delete this[t],e}setProperty(t,e){return this[t]=e}toString(){let t=[];for(let e=this,r=0,s=Object.keys(e),i=s.length,n,o;r"}toString(){return this.tag&&this.tag.toNodeString?this.tag.toNodeString():this.outerHTML}};Nt[C]();var x=class extends A{static[C](){return this.prototype[U]=Bi,this}constructor(t){super(),this.nodeName=t,this.childNodes=[],this.attributes={},this[U]===Bi&&this[q]&&this[q]()}emit(t,e,r={bubbles:!0}){console.warn("Element#emit not supported on node")}get classList(){return this[ji]||(this[ji]=new Hr(this))}get style(){return this[Fe]||(this[Fe]=new Gs)}get dataset(){return this[Vi]||(this[Vi]=Ki.wrap(this))}get richValue(){return this.value}set richValue(t){this.value=t}set asset(t){this[at]=t}get asset(){return this[at]}flag$(){return this}flagIf$(){return this}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t}removeChild(t){let e=this.childNodes.indexOf(t);return e>=0&&this.childNodes.splice(e,1),this}replaceChild(t,e){let r=this.childNodes.indexOf(e);return r>=0&&(this.childNodes.splice(r,1,t),t.parentNode=this),e}insertBefore(t,e){let r=this.childNodes.indexOf(e);return this.childNodes.splice(r,0,t),this}setAttribute(t,e){return this.attributes[t]=e,this}setAttributeNS(t,e,r){return this.setAttribute(t+":"+e,r)}getAttribute(t){return this.attributes?this.attributes[t]:void 0}getAttributeNS(t,e){return this.getAttribute(t+":"+e)}removeAttribute(t){var e;return e=this.attributes[t],delete this.attributes[t],!0}addEventListener(){return this}removeEventListener(){return this}resolve(){return this}set innerHTML(t){this[Ir]=t}get innerHTML(){let t="";if(this[Ir])return this[Ir];if(this.textContent!=null)return Ar(this.textContent);for(let e=0,r=Er(this.childNodes),s=r.length;e":"<"+r+">"+this.innerHTML+""}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get firstElementChild(){let t=this.childNodes.length,e=0;for(;e0;){let e=this.childNodes[--t];if(e instanceof x)return e}return null}get className(){return this.classList.toString()}set className(t){this.classList.classes=(t||"").split(" "),this.classList.toString()}log(...t){return console.log(...t)}text$(t){return this.textContent=t,this}[ja](){return this}[Va](){return this}[Ra](){this.render&&this.render(),this[Ie]&&(this[Ie]=null)}get[Da](){return this[Ie]||(this[Ie]={})}get flags(){return this.$flags||(this.$flags=new Mr(this),this.flag$==x.prototype.flag$&&(this.flags$ext=this.className),this.flagDeopt$()),this.$flags}flag$(t){let e=this.flags$ns;this.className=e?e+(this.flags$ext=t):this.flags$ext=t}flagDeopt$(){var t=this;this.flag$=this.flagExt$,t.flagSelf$=function(e){return t.flagSync$(t.flags$own=e)}}flagExt$(t){return this.flagSync$(this.flags$ext=t)}flagSelf$(t){return this.flagDeopt$(),this.flagSelf$(t)}flagSync$(){return this.className=(this.flags$ns||"")+(this.flags$ext||"")+" "+(this.flags$own||"")+" "+(this.$flags||"")}set$(t,e){let r=ar(this,t,x);!r||!r.set?this.setAttribute(t,e):this[t]=e}};x[C](),x.prototype.setns$=x.prototype.setAttributeNS,x.prototype[za]=!0;var be=class extends x{static[C](){return this.prototype[U]=zi,this}constructor(){super(null),this[U]===zi&&this[q]&&this[q]()}get outerHTML(){return this.innerHTML}};be[C]();var uh=class extends be{get outerHTML(){return this.innerHTML}},H=class extends x{},cr=class extends H{static[C](){return this.prototype[U]=Ui,this}constructor(){super(...arguments),super[C]||this[C](),this[U]===Ui&&this[q]&&this[q]()}[C](t=null){super[C]&&super[C](...arguments),this.hmr=t?t.hmr:void 0}get scripts(){return this[ke]||(this[ke]=[])}get outerHTML(){let t=lt;lt=this;let e=super.outerHTML,r=new Set,s=[],i=[];if(globalThis.IMBA_HMR_PATH&&this.hmr!==!1&&i.push("