UNPKG

134 kBJavaScriptView Raw
1var mh=Object.create;var Ke=Object.defineProperty;var gh=Object.getOwnPropertyDescriptor;var yh=Object.getOwnPropertyNames;var bh=Object.getPrototypeOf,_h=Object.prototype.hasOwnProperty;var vh=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),xh=(i,t)=>{for(var e in t)Ke(i,e,{get:t[e],enumerable:!0})},hn=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of yh(t))!_h.call(i,s)&&s!==e&&Ke(i,s,{get:()=>t[s],enumerable:!(r=gh(t,s))||r.enumerable});return i};var he=(i,t,e)=>(e=i!=null?mh(bh(i)):{},hn(t||!i||!i.__esModule?Ke(e,"default",{value:i,enumerable:!0}):e,i)),Sh=i=>hn(Ke({},"__esModule",{value:!0}),i);var kl=vh((ad,ws)=>{"use strict";var ie=typeof Reflect=="object"?Reflect:null,Sl=ie&&typeof ie.apply=="function"?ie.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Vr;ie&&typeof ie.ownKeys=="function"?Vr=ie.ownKeys:Object.getOwnPropertySymbols?Vr=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Vr=function(t){return Object.getOwnPropertyNames(t)};function Gu(i){console&&console.warn&&console.warn(i)}var Tl=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}ws.exports=g;ws.exports.once=Uu;g.EventEmitter=g;g.prototype._events=void 0;g.prototype._eventsCount=0;g.prototype._maxListeners=void 0;var wl=10;function Dr(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return wl},set:function(i){if(typeof i!="number"||i<0||Tl(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");wl=i}});g.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};g.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Tl(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Ll(i){return i._maxListeners===void 0?g.defaultMaxListeners:i._maxListeners}g.prototype.getMaxListeners=function(){return Ll(this)};g.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s=t==="error",n=this._events;if(n!==void 0)s=s&&n.error===void 0;else if(!s)return!1;if(s){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var h=n[t];if(h===void 0)return!1;if(typeof h=="function")Sl(h,this,e);else for(var a=h.length,c=Pl(h,a),r=0;r<a;++r)Sl(c[r],this,e);return!0};function Nl(i,t,e,r){var s,n,o;if(Dr(e),n=i._events,n===void 0?(n=i._events=Object.create(null),i._eventsCount=0):(n.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),n=i._events),o=n[t]),o===void 0)o=n[t]=e,++i._eventsCount;else if(typeof o=="function"?o=n[t]=r?[e,o]:[o,e]:r?o.unshift(e):o.push(e),s=Ll(i),s>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=i,l.type=t,l.count=o.length,Gu(l)}return i}g.prototype.addListener=function(t,e){return Nl(this,t,e,!1)};g.prototype.on=g.prototype.addListener;g.prototype.prependListener=function(t,e){return Nl(this,t,e,!0)};function $u(){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 Cl(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},s=$u.bind(r);return s.listener=e,r.wrapFn=s,s}g.prototype.once=function(t,e){return Dr(e),this.on(t,Cl(this,t,e)),this};g.prototype.prependOnceListener=function(t,e){return Dr(e),this.prependListener(t,Cl(this,t,e)),this};g.prototype.removeListener=function(t,e){var r,s,n,o,l;if(Dr(e),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){l=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():zu(r,n),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,l||e)}return this};g.prototype.off=g.prototype.removeListener;g.prototype.removeAllListeners=function(t){var e,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n=Object.keys(r),o;for(s=0;s<n.length;++s)o=n[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this};function Ol(i,t,e){var r=i._events;if(r===void 0)return[];var s=r[t];return s===void 0?[]:typeof s=="function"?e?[s.listener||s]:[s]:e?Bu(s):Pl(s,s.length)}g.prototype.listeners=function(t){return Ol(this,t,!0)};g.prototype.rawListeners=function(t){return Ol(this,t,!1)};g.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):Ml.call(i,t)};g.prototype.listenerCount=Ml;function Ml(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}g.prototype.eventNames=function(){return this._eventsCount>0?Vr(this._events):[]};function Pl(i,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=i[r];return e}function zu(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function Bu(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function Uu(i,t){return new Promise(function(e,r){function s(){n!==void 0&&i.removeListener("error",n),e([].slice.call(arguments))}var n;t!=="error"&&(n=function(l){i.removeListener(t,s),r(l)},i.once("error",n)),i.once(t,s)})}});var Pc={};xh(Pc,{Accessor:()=>Qr,CUSTOM_TYPES:()=>io,Comment:()=>rt,Component:()=>kt,CustomEvent:()=>P,Document:()=>X,DocumentFragment:()=>Bt,Easer:()=>Me,Element:()=>d,ElementRoute:()=>He,ElementRouteTo:()=>Ur,Emitter:()=>Rt,Event:()=>M,EventHandler:()=>Er,Fragment:()=>ft,HTMLButtonElement:()=>Yt,HTMLElement:()=>O,HTMLHtmlElement:()=>hr,HTMLInputElement:()=>qt,HTMLLinkElement:()=>ur,HTMLOptionElement:()=>Wt,HTMLScriptElement:()=>ar,HTMLSelectElement:()=>Ut,HTMLStyleElement:()=>cr,HTMLTextAreaElement:()=>Kt,ImbaElement:()=>Aa,IntersectionEventDefaults:()=>Ar,KeyboardEvent:()=>_e,LazyProxy:()=>We,Location:()=>$t,MouseEvent:()=>Xt,Node:()=>w,PointerEvent:()=>be,RenderContext:()=>$,Router:()=>De,SVGElement:()=>Qt,SVGSVGElement:()=>fr,Scheduler:()=>Ze,ShadowRoot:()=>Li,StyleDeclaration:()=>lr,Text:()=>_t,UIEvent:()=>ye,Window:()=>xi,accessor:()=>Lc,autorun:()=>dc,awaits:()=>pc,clearInterval:()=>mn,clearTimeout:()=>gn,colors:()=>$a,commit:()=>C,createAtom:()=>fc,createComment:()=>ut,createComponent:()=>no,createDynamic:()=>ha,createElement:()=>na,createFragment:()=>la,createIndexedList:()=>Na,createKeyedList:()=>Ma,createLiveFragment:()=>ba,createRenderContext:()=>di,createSVGElement:()=>oa,createSlot:()=>xe,createTextNode:()=>dr,customElements:()=>ra,defineTag:()=>aa,descriptor:()=>Nc,document:()=>Ti,emit:()=>R,events:()=>gu,getDeepPropertyDescriptor:()=>Xe,getRenderContext:()=>Ah,getSuperTagType:()=>ia,getTagType:()=>ht,get_document:()=>Jt,hooks:()=>ii,hotkeys:()=>ju,hydrate:()=>Ia,listen:()=>A,locals:()=>Oc,mount:()=>Go,observable:()=>mc,once:()=>E,parseTime:()=>Vt,proxy:()=>ti,render:()=>Ua,renderContext:()=>N,renderer:()=>jt,reportChanged:()=>yc,reportObserved:()=>bc,router:()=>lc,run:()=>gc,scheduler:()=>F,serve:()=>Eh,session:()=>Mc,setInterval:()=>pn,setTimeout:()=>dn,styles:()=>Ho,toCamelCase:()=>Th,transitions:()=>Pr,unlisten:()=>gt,unmount:()=>$o,use_dom_bind:()=>qa,use_dom_teleport:()=>iu,use_dom_transitions:()=>au,use_events:()=>yu,use_events_hotkey:()=>Hu,use_events_intersect:()=>Ou,use_events_keyboard:()=>Zi,use_events_mouse:()=>Pe,use_events_pointer:()=>vu,use_events_resize:()=>Iu,use_events_selection:()=>Vu,use_events_touch:()=>Tu,use_hooks:()=>Oh,use_router:()=>oc,use_slots:()=>ga,use_styles:()=>za,use_window:()=>ta,αaction:()=>wc,αautorun:()=>Sc,αcomputed:()=>_c,αlazy:()=>Mh,αobservable:()=>vc,αprop:()=>Cc,αref:()=>xc});module.exports=Sh(Pc);var Ye=Symbol.for("#__listeners__"),wh=/-./g,We=class{static for(t){return new Proxy({},new this(t))}constructor(t){this.getter=t}get target(){return this.getter()}get(t,e){return this.target[e]}set(t,e,r){return this.target[e]=r,!0}};function ti(i,t={}){return new Proxy(t,new We(i))}function Vt(i){let t=typeof i;if(t=="number")return i;if(t=="string"){if(/^\d+fps$/.test(i))return 1e3/parseFloat(i);if(/^([-+]?[\d\.]+)s$/.test(i))return parseFloat(i)*1e3;if(/^([-+]?[\d\.]+)ms$/.test(i))return parseFloat(i)}return null}function Th(i){return i.indexOf("-")>=0?i.replace(wh,function(t){return t.charAt(1).toUpperCase()}):i}function Xe(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:Xe(Reflect.getPrototypeOf(i),t,e)}var an=function(i,t,e){let r,s,n;for(;(r=e)&&(e=e.next);)(s=e.listener)&&(e.path&&s[e.path]?n=t?s[e.path].apply(s,t):s[e.path]():n=t?s.apply(e,t):s.call(e)),e.times&&--e.times<=0&&(r.next=e.next,e.listener=null)};function A(i,t,e,r){var s;let n,o,l;return n=i[Ye]||(i[Ye]={}),o=n[t]||(n[t]={}),l=o.tail||(o.tail=o.next={}),l.listener=e,l.path=r,o.tail=l.next={},l}function E(i,t,e){let r=A(i,t,e);return r.times=1,r}function gt(i,t,e,r){let s,n,o=i[Ye];if(!!o&&(s=o[t])){for(;(n=s)&&(s=s.next);)if(s==e||s.listener==e){n.next=s.next,s.listener=null;break}}}function R(i,t,e){let r;(r=i[Ye])&&(r[t]&&an(t,e,r[t]),r.all&&an(t,[t,e],r.all))}var Rt=class{emit(t,...e){return R(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return E(this,t,...e)}un(t,...e){return gt(this,t,...e)}};function Lh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var un=Symbol.for("#__init__");var cn=Symbol.for("#schedule"),ei=Symbol.for("#frames"),Qe=Symbol.for("#interval"),Dt=Symbol.for("#stage"),Ht=Symbol.for("#scheduled"),Je=Symbol.for("#version"),Nh=Symbol.for("#fps"),fn=Symbol.for("#ticker"),Ch=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var Fc=1/60,ri=class{constructor(t=null){this[un](t)}[un](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[ei],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[Qe]=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[Qe]&&(globalThis.clearInterval(this[Qe]),this[Qe]=null),this.active=!1,this}},Ze=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Dt]=-1,this[ei]=0,this[Ht]=!1,this[Je]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Nh]=0,t.$promise=null,t.$resolve=null,this[fn]=function(e){return t[Ht]=!1,t.tick(e)}}touch(){return this[Je]++}get version(){return this[Je]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[Ht]||this[cn](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Dt]==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[ei]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Dt]=1,this[Je]++,r.length)for(let n=0,o=Lh(r),l=o.length;n<l;n++){let h=o[n];typeof h=="string"&&this.listeners[h]?e.listeners[h].forEach(function(a){if(a.tick instanceof Function)return a.tick(e,h);if(a instanceof Function)return a(e,h)}):h instanceof Function?h(e.dt,e):h.tick&&h.tick(e.dt,e)}return this[Dt]=this[Ht]?0:-1,e.$promise&&(e.$resolve(e),e.$promise=e.$resolve=null),e.listeners.raf&&e.add("raf"),e}[cn](){return this[Ht]||(this[Ht]=!0,this[Dt]==-1&&(this[Dt]=0),Ch(this[fn])),this}schedule(t,e){var r,s;return e||(e=t[r=this.id]||(t[r]={value:!0})),(e[s=this.id]||(e[s]=new ri({owner:this,target:t}))).update(e,!0)}unschedule(t,e={}){e||(e=t[this.id]);let r=e&&e[this.id];return r&&r.active&&r.deactivate(),this}},F=new Ze;function C(){return F.add("commit").promise}function dn(i,t){return globalThis.setTimeout(function(){i(),C()},t)}function pn(i,t){return globalThis.setInterval(function(){i(),C()},t)}var mn=globalThis.clearInterval,gn=globalThis.clearTimeout,ae=globalThis.imba||(globalThis.imba={});ae.commit=C;ae.setTimeout=dn;ae.setInterval=pn;ae.clearInterval=mn;ae.clearTimeout=gn;var ii={on:function(i,t){return A(this,i,t)},inited:function(i){return R(this,"inited",[i])}};function Oh(){return!0}function Mh(i,t,e){if(e.get){let r=e.get;e.get=function(){let s=r.call(this);return Object.defineProperty(this,t,{enumerable:!1,value:s}),s}}return e}var hi=he(require("cluster")),Y=he(require("fs")),yt=he(require("path")),Tn=require("events"),Ln=he(require("http"));function Z(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var wn=Symbol.for("#setup"),yn=Symbol.for("#__initor__"),bn=Symbol.for("#__inited__"),_n=Symbol.for("#__init__"),vn=Symbol.for("#setup?"),Ph=Symbol.for("#dom"),kh=Symbol.for("#server"),xn=Symbol(),si={html:{"Content-Type":"text/html; charset=utf-8"},js:{"Content-Type":"text/javascript; charset=utf-8"},cjs:{"Content-Type":"text/javascript; charset=utf-8"},mjs:{"Content-Type":"text/javascript; charset=utf-8"},json:{"Content-Type":"application/json; charset=utf-8"},css:{"Content-Type":"text/css; charset=utf-8"},map:{"Content-Type":"application/json; charset=utf-8"},otf:{"Content-Type":"font/otf"},ttf:{"Content-Type":"font/ttf"},woff:{"Content-Type":"font/woff"},woff2:{"Content-Type":"font/woff2"},svg:{"Content-Type":"image/svg+xml"},avif:{"Content-Type":"image/avif"},gif:{"Content-Type":"image/gif"},png:{"Content-Type":"image/png"},apng:{"Content-Type":"image/apng"},webp:{"Content-Type":"image/webp"},jpg:{"Content-Type":"image/jpeg"},jpeg:{"Content-Type":"image/jpeg"},ico:{"Content-Type":"image/x-icon"},bmp:{"Content-Type":"image/bmp"},pdf:{"Content-Type":"application/pdf"},webm:{"Content-Type":"video/webm"},weba:{"Content-Type":"audio/webm"},avi:{"Content-Type":"video/x-msvideo"},mp3:{"Content-Type":"audio/mpeg"},mp4:{"Content-Type":"video/mp4"},m4a:{"Content-Type":"audio/m4a"},mov:{"Content-Type":"video/quicktime"},wmv:{"Content-Type":"video/x-ms-wmv"},mpeg:{"Content-Type":"video/mpeg"},wav:{"Content-Type":"audio/wav"},ogg:{"Content-Type":"audio/ogg"},ogv:{"Content-Type":"video/ogg"},oga:{"Content-Type":"audio/ogg"},opus:{"Content-Type":"audio/opus"}},D=globalThis.process,ni=class extends Set{call(t,...e){var r;r=[];for(let s of Z(this))r.push(s[t](...e));return r}close(t={}){var e;e=[];for(let r of Z(this))e.push(r.close(t));return e}reload(t={}){var e;e=[];for(let r of Z(this))e.push(r.reload(t));return e}broadcast(t,...e){var r;r=[];for(let s of Z(this))r.push(s.broadcast(t,...e));return r}emit(t,e){var r;r=[];for(let s of Z(this))r.push(s.emit(t,e));return r}},ue=new ni,Sn=new(class extends Tn.EventEmitter{static[_n](){return this.prototype[yn]=xn,this}constructor(){var t;super(...arguments),t=this,this.autoreload=!1,this.state={},globalThis.IMBA_RUN&&hi.default.isWorker&&D.on("message",function(e){if(t.emit("message",e),e[0]=="emit")return t.emit(...e.slice(1))}),this[yn]===xn&&this[bn]&&this[bn]()}[wn](){var t=this;if(this[vn]!=!0&&(this[vn]=!0,!0))return this.on("rebuild",function(e){let r=globalThis.IMBA_MANIFEST;return globalThis.IMBA_MANIFEST=e,ue.broadcast("rebuild",e)}),t.on("reloading",function(e){var r;t.state.reloading=!0,r=[];for(let s of Z(ue))r.push(s.pause());return r}),t.on("reloaded",async function(e){var r;t.state.reloaded=!0,ue.broadcast("reloaded"),await new Promise(function(n){return setTimeout(n,100)}),r=[];for(let n of Z(ue))r.push(n.close());let s=r;return setTimeout(function(){return D.exit(0)},100),await Promise.all(s),D.exit(0)}),!0}send(t){if(D.send instanceof Function)return D.send(t)}on(t,e){return super.on(...arguments)}reload(){if(!(this.isReloading!=!0&&(this.isReloading=!0,!0)))return this;if(this.state.reloading=!0,!D.env.IMBA_SERVE){console.warn("not possible to gracefully reload servers not started via imba start");return}this.send("reload")}}[_n]());function Nn(i,t=[],e=0){let r=globalThis.IMBA_MANIFEST[i];if(t.indexOf(i)>=0)return t;if(r?.imports)for(let s=0,n=Z(r?.imports),o=n.length;s<o;s++){let l=n[s];t.push(l),Nn(l,t,e+1)}return t}var oi=class{constructor(t,e,r={}){this.server=t,this.url=e,[this.pathname,this.query]=e.split("?"),this.ext=yt.default.extname(this.pathname),this.headers={"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public, max-age=31536000"},Object.assign(this.headers,si[this.ext.slice(1)]||{}),this.headers["max-age"]=864e5,r.imports&&(this.headers.Link=Nn(e).map(function(s){return"<"+s+">; rel=modulepreload; as=script"}).join(", ")),this.path=t.localPathForUrl(e)}respond(t,e){var r=this;return Y.default.access(this.path,Y.default.constants.R_OK,function(s){if(s)return e.writeHead(404,{}),e.end();try{if(globalThis.BUN)return Y.default.readFile(r.path,function(n,o){return e.writeHead(200,r.headers),e.end(o)});{let n=Y.default.createReadStream(r.path);return e.writeHead(200,r.headers),n.pipe(e)}}catch{return e.writeHead(503,{}),e.end()}})}createReadStream(){return Y.default.createReadStream(this.path)}pipe(t){return this.createReadStream().pipe(t)}},li=class{static wrap(t,e={}){return new this(t,e)}localPathForUrl(t){var e,r,s;let n=t.replace(/\?.*$/,"");return(e=this.urlToLocalPathMap)[n]==null?e[n]=(r=yt.default.resolve(this.publicPath,"."+n),s=Y.default.existsSync(r)&&r,!s&&this.staticDir&&(r=yt.default.resolve(this.staticDir,"."+n),s=Y.default.existsSync(r)&&r),s):e[n]}headersForAsset(t){let e,r=yt.default.extname(t);return e=Object.assign({"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public"},si[r.slice(1)]||{})}get manifest(){return globalThis.IMBA_MANIFEST||{}}constructor(t,e){var r=this;ue.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=D.env.IMBA_OUTDIR||yt.default.dirname(D.env.pm_exec_path||D.argv[1])}catch{}try{this.publicPath=yt.default.resolve(this.rootDir,D.env.IMBA_PUBDIR||globalThis.IMBA_PUBDIR||"public")}catch{}this.staticDir=globalThis.IMBA_STATICDIR||"",D.env.IMBA_PATH&&(this.devtoolsPath=yt.default.resolve(D.env.IMBA_PATH,"dist","hmr.js")),this.scheme=t instanceof Ln.default.Server?"http":"https";let s=this.server._events.request,n=globalThis[Ph];t.off("request",s),s[kh]=this,t.on("listening",function(){let o=r.server.address(),l=o.address;(l=="::"||l=="0.0.0.0")&&(l="localhost");let h=""+r.scheme+"://"+l+":"+o.port+"/";if(!D.env.IMBA_CLUSTER)return console.log("listening on "+h)}),r.handler=function(o,l){var h,a;let c=o.constructor.name=="Http2ServerRequest",u=o.url;if(r.paused||r.closed)return l.statusCode=302,l.setHeader("Location",o.url),c||l.setHeader("Connection","close"),r.closed?(c&&o.stream.session.close(),l.end()):r.stalledResponses.push(l);if(globalThis.IMBA_HMR){if(u=="/__hmr__.js"&&r.devtoolsPath){let m=Y.default.createReadStream(r.devtoolsPath);return l.writeHead(200,si.js),m.pipe(l)}if(u=="/__hmr__"){let m={"Content-Type":"text/event-stream","Cache-Control":"no-cache"};return c||(m.Connection="keep-alive"),l.writeHead(200,m),r.clients.add(l),r.broadcast("init",globalThis.IMBA_MANIFEST,[l]),o.on("close",function(){return r.clients.delete(l)}),!0}}let p=o.headers,y;c?y=p[":scheme"]+"://"+p[":authority"]:y=(o.connection.encrypted?"https":"http")+"://"+p.host;let f=r.manifest[u];if(f&&r.localPathForUrl(u))return((a=r.assetResponders)[u]||(a[u]=new oi(r,u,f))).respond(o,l);if((u.match(/\.[A-Z\d]{8}\./)||u.match(/\.\w{1,4}($|\?)/))&&(h=r.localPathForUrl(u)))try{let m=r.headersForAsset(h);if(globalThis.BUN)return Y.default.readFile(h,function(b,S){return b?(l.writeHead(500,{}),l.write("Error getting the file: "+b)):(l.writeHead(200,m),l.end(S))});{let b=Y.default.createReadStream(h);return l.writeHead(200,m),b.pipe(l)}}catch{return l.writeHead(503,{}),l.end()}if(n){let m=new n.Location(o.url,y);return n.Document.create({location:m},function(){return s(o,l)})}else return s(o,l)},t.on("request",r.handler),t.on("close",function(){return console.log("server is closing!!!")}),globalThis.IMBA_RUN&&hi.default.isWorker&&(Sn[wn](),Sn.send("serve"))}broadcast(t,e={},r=this.clients){e=JSON.stringify(e);let s="data: "+e+`
2
3
4`;for(let n of Z(r))n.write("event: "+t+`
5`),n.write(`id: imba
6`),n.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=Z(this.stalledResponses),r=e.length;t<r;t++)e[t].end();return this.stalledResponses=[]}close(){var t=this;return this.pause(),new Promise(function(e){return t.closed=!0,t.server.close(e),t.flushStalledResponses()})}};function Eh(i,...t){return li.wrap(i,...t)}function Fh(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var W={"":[-1,{id:1,slot:1,part:1,elementTiming:"elementtiming"}],HTML:[-1,{title:1,lang:1,translate:1,dir:1,accessKey:"accesskey",draggable:1,spellcheck:1,autocapitalize:1,inputMode:"inputmode",style:1,tabIndex:"tabindex",enterKeyHint:"enterkeyhint"}],HTMLAnchor:[1,{target:1,download:1,ping:1,rel:1,relList:"rel",hreflang:1,type:1,referrerPolicy:"referrerpolicy",coords:1,charset:1,name:1,rev:1,shape:1,href:1}],HTMLArea:[1,{alt:1,coords:1,download:1,shape:1,target:1,ping:1,rel:1,relList:"rel",referrerPolicy:"referrerpolicy",href:1}],HTMLMedia:[1,{src:1,crossOrigin:"crossorigin",preload:1,controlsList:"controlslist"}],HTMLAudio:[4,{}],HTMLBase:[1,{href:1,target:1}],HTMLQuote:[1,{cite:1}],HTMLBody:[1,{text:1,link:1,vLink:"vlink",aLink:"alink",bgColor:"bgcolor",background:1}],HTMLBR:[1,{clear:1}],HTMLButton:[1,{formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",name:1,type:1,value:1}],HTMLCanvas:[1,{width:1,height:1}],HTMLTableCaption:[1,{align:1}],HTMLTableCol:[1,{span:1,align:1,ch:"char",chOff:"charoff",vAlign:"valign",width:1}],HTMLData:[1,{value:1}],HTMLDataList:[1,{}],HTMLMod:[1,{cite:1,dateTime:"datetime"}],HTMLDetails:[1,{}],HTMLDialog:[1,{}],HTMLDiv:[1,{align:1}],HTMLDList:[1,{}],HTMLEmbed:[1,{src:1,type:1,width:1,height:1,align:1,name:1}],HTMLFieldSet:[1,{name:1}],HTMLForm:[1,{acceptCharset:"accept-charset",action:1,autocomplete:1,enctype:1,encoding:"enctype",method:1,name:1,target:1}],HTMLHeading:[1,{align:1}],HTMLHead:[1,{}],HTMLHR:[1,{align:1,color:1,size:1,width:1}],HTMLHtml:[1,{version:1}],HTMLIFrame:[1,{src:1,srcdoc:1,name:1,sandbox:1,width:1,height:1,referrerPolicy:"referrerpolicy",csp:1,allow:1,align:1,scrolling:1,frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",loading:1}],HTMLImage:[1,{alt:1,src:1,srcset:1,sizes:1,crossOrigin:"crossorigin",useMap:"usemap",width:1,height:1,referrerPolicy:"referrerpolicy",decoding:1,name:1,lowsrc:1,align:1,hspace:1,vspace:1,longDesc:"longdesc",border:1,loading:1}],HTMLInput:[1,{accept:1,alt:1,autocomplete:1,dirName:"dirname",formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",height:1,max:1,maxLength:"maxlength",min:1,minLength:"minlength",name:1,pattern:1,placeholder:1,src:1,step:1,type:1,defaultValue:"value",value:1,width:1,align:1,useMap:"usemap",required:1}],HTMLLabel:[1,{htmlFor:"for"}],HTMLLegend:[1,{align:1}],HTMLLI:[1,{value:1,type:1}],HTMLLink:[1,{href:1,crossOrigin:"crossorigin",rel:1,relList:"rel",media:1,hreflang:1,type:1,as:1,referrerPolicy:"referrerpolicy",sizes:1,imageSrcset:"imagesrcset",imageSizes:"imagesizes",charset:1,rev:1,target:1,integrity:1}],HTMLMap:[1,{name:1}],HTMLMenu:[1,{}],HTMLMeta:[1,{name:1,httpEquiv:"http-equiv",content:1,scheme:1,property:1,charset:1}],HTMLMeter:[1,{value:1,min:1,max:1,low:1,high:1,optimum:1}],HTMLObject:[1,{data:1,type:1,name:1,useMap:"usemap",width:1,height:1,align:1,archive:1,code:1,hspace:1,standby:1,vspace:1,codeBase:"codebase",codeType:"codetype",border:1}],HTMLOList:[1,{start:1,type:1}],HTMLOptGroup:[1,{label:1}],HTMLOption:[1,{label:1,value:1}],HTMLOutput:[1,{htmlFor:"for",name:1}],HTMLParagraph:[1,{align:1}],HTMLParam:[1,{name:1,value:1,type:1,valueType:"valuetype"}],HTMLPicture:[1,{}],HTMLPre:[1,{width:1}],HTMLProgress:[1,{value:1,max:1}],HTMLScript:[1,{src:1,type:1,charset:1,crossOrigin:"crossorigin",referrerPolicy:"referrerpolicy",event:1,htmlFor:"for",integrity:1,defer:1,async:1}],HTMLSelect:[1,{autocomplete:1,name:1,size:1,value:1,required:1}],HTMLSlot:[1,{name:1}],HTMLSource:[1,{src:1,type:1,srcset:1,sizes:1,media:1}],HTMLSpan:[1,{}],HTMLStyle:[1,{media:1,type:1}],HTMLTable:[1,{align:1,border:1,frame:1,rules:1,summary:1,width:1,bgColor:"bgcolor",cellPadding:"cellpadding",cellSpacing:"cellspacing"}],HTMLTableSection:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign"}],HTMLTableCell:[1,{colSpan:"colspan",rowSpan:"rowspan",headers:1,align:1,axis:1,height:1,width:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor",abbr:1,scope:1}],HTMLTemplate:[1,{}],HTMLTextArea:[1,{autocomplete:1,cols:1,dirName:"dirname",maxLength:"maxlength",minLength:"minlength",name:1,placeholder:1,rows:1,wrap:1}],HTMLTime:[1,{dateTime:"datetime"}],HTMLTitle:[1,{}],HTMLTableRow:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor"}],HTMLTrack:[1,{kind:1,src:1,srclang:1,label:1}],HTMLUList:[1,{type:1}],HTMLVideo:[4,{width:1,height:1,poster:1}],SVG:[-1,{}],SVGGraphics:[66,{transform:1}],SVGA:[67,{}],SVGAnimation:[66,{}],SVGAnimate:[69,{}],SVGAnimateMotion:[69,{}],SVGAnimateTransform:[69,{}],SVGGeometry:[67,{}],SVGCircle:[73,{cx:1,cy:1,r:1}],SVGClipPath:[67,{clipPathUnits:1}],SVGDefs:[67,{}],SVGDesc:[66,{}],SVGDiscard:[66,{}],SVGEllipse:[73,{cx:1,cy:1,rx:1,ry:1}],SVGFEBlend:[66,{mode:1,x:1,y:1,width:1,height:1}],SVGFEColorMatrix:[66,{type:1,values:1,x:1,y:1,width:1,height:1}],SVGFEComponentTransfer:[66,{x:1,y:1,width:1,height:1}],SVGFEComposite:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEConvolveMatrix:[66,{orderX:1,orderY:1,kernelMatrix:1,divisor:1,edgeMode:1,x:1,y:1,width:1,height:1}],SVGFEDiffuseLighting:[66,{surfaceScale:1,diffuseConstant:1,x:1,y:1,width:1,height:1}],SVGFEDisplacementMap:[66,{xChannelSelector:1,yChannelSelector:1,x:1,y:1,width:1,height:1}],SVGFEDistantLight:[66,{}],SVGFEDropShadow:[66,{dx:1,dy:1,stdDeviationX:1,stdDeviationY:1,x:1,y:1,width:1,height:1}],SVGFEFlood:[66,{x:1,y:1,width:1,height:1}],SVGComponentTransferFunction:[66,{type:1,tableValues:1,slope:1,amplitude:1,exponent:1}],SVGFEFuncA:[90,{}],SVGFEFuncB:[90,{}],SVGFEFuncG:[90,{}],SVGFEFuncR:[90,{}],SVGFEGaussianBlur:[66,{x:1,y:1,width:1,height:1}],SVGFEImage:[66,{preserveAspectRatio:1,x:1,y:1,width:1,height:1}],SVGFEMerge:[66,{x:1,y:1,width:1,height:1}],SVGFEMergeNode:[66,{}],SVGFEMorphology:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEOffset:[66,{x:1,y:1,width:1,height:1}],SVGFEPointLight:[66,{}],SVGFESpecularLighting:[66,{surfaceScale:1,specularConstant:1,specularExponent:1,x:1,y:1,width:1,height:1}],SVGFESpotLight:[66,{specularExponent:1}],SVGFETile:[66,{x:1,y:1,width:1,height:1}],SVGFETurbulence:[66,{numOctaves:1,stitchTiles:1,type:1,x:1,y:1,width:1,height:1}],SVGFilter:[66,{filterUnits:1,primitiveUnits:1,x:1,y:1,width:1,height:1}],SVGForeignObject:[67,{x:1,y:1,width:1,height:1}],SVGG:[67,{}],SVGImage:[67,{x:1,y:1,width:1,height:1,preserveAspectRatio:1}],SVGLine:[73,{x1:1,y1:1,x2:1,y2:1}],SVGGradient:[66,{gradientUnits:1,gradientTransform:1,spreadMethod:1}],SVGLinearGradient:[111,{x1:1,y1:1,x2:1,y2:1}],SVGMarker:[66,{refX:1,refY:1,markerUnits:1,markerWidth:1,markerHeight:1,orientType:1,orientAngle:1,viewBox:1,preserveAspectRatio:1}],SVGMask:[66,{maskUnits:1,maskContentUnits:1,x:1,y:1,width:1,height:1}],SVGMetadata:[66,{}],SVGMPath:[66,{}],SVGPath:[73,{}],SVGPattern:[66,{patternUnits:1,patternContentUnits:1,patternTransform:1,x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGPolygon:[73,{}],SVGPolyline:[73,{}],SVGRadialGradient:[111,{cx:1,cy:1,r:1,fx:1,fy:1,fr:1}],SVGRect:[73,{x:1,y:1,width:1,height:1,rx:1,ry:1}],SVGScript:[66,{}],SVGSet:[69,{}],SVGStop:[66,{}],SVGStyle:[66,{}],SVGSVG:[67,{x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGSwitch:[67,{}],SVGSymbol:[66,{viewBox:1,preserveAspectRatio:1}],SVGTextContent:[67,{textLength:1,lengthAdjust:1}],SVGTextPositioning:[130,{x:1,y:1,dx:1,dy:1,rotate:1}],SVGText:[131,{}],SVGTextPath:[130,{startOffset:1,method:1,spacing:1}],SVGTitle:[66,{}],SVGTSpan:[131,{}],SVGUse:[67,{x:1,y:1,width:1,height:1}],SVGView:[66,{viewBox:1,preserveAspectRatio:1}]},T={a:2,abbr:1,address:1,area:3,article:1,aside:1,audio:5,b:1,base:6,bdi:1,bdo:1,blockquote:7,body:8,br:9,button:10,canvas:11,caption:12,cite:1,code:1,col:13,colgroup:13,data:14,datalist:15,dd:1,del:16,details:17,dfn:1,dialog:18,div:19,dl:20,dt:1,em:1,embed:21,fieldset:22,figcaption:1,figure:1,footer:1,form:23,h1:24,h2:24,h3:24,h4:24,h5:24,h6:24,head:25,header:1,hgroup:1,hr:26,html:27,i:1,iframe:28,img:29,input:30,ins:16,kbd:1,label:31,legend:32,li:33,link:34,main:1,map:35,mark:1,menu:36,meta:37,meter:38,nav:1,noscript:1,object:39,ol:40,optgroup:41,option:42,output:43,p:44,param:45,picture:46,pre:47,progress:48,q:7,rp:1,rt:1,ruby:1,s:1,samp:1,script:49,section:1,select:50,slot:51,small:1,source:52,span:53,strike:1,strong:1,style:54,sub:1,summary:1,sup:1,table:55,tbody:56,td:57,template:58,textarea:59,tfoot:56,th:57,thead:56,time:60,title:61,tr:62,track:63,u:1,ul:64,var:1,video:65,wbr:1,svg_a:68,svg_animate:70,svg_animateMotion:71,svg_animateTransform:72,svg_audio:66,svg_canvas:66,svg_circle:74,svg_clipPath:75,svg_defs:76,svg_desc:77,svg_discard:78,svg_ellipse:79,svg_feBlend:80,svg_feColorMatrix:81,svg_feComponentTransfer:82,svg_feComposite:83,svg_feConvolveMatrix:84,svg_feDiffuseLighting:85,svg_feDisplacementMap:86,svg_feDistantLight:87,svg_feDropShadow:88,svg_feFlood:89,svg_feFuncA:91,svg_feFuncB:92,svg_feFuncG:93,svg_feFuncR:94,svg_feGaussianBlur:95,svg_feImage:96,svg_feMerge:97,svg_feMergeNode:98,svg_feMorphology:99,svg_feOffset:100,svg_fePointLight:101,svg_feSpecularLighting:102,svg_feSpotLight:103,svg_feTile:104,svg_feTurbulence:105,svg_filter:106,svg_foreignObject:107,svg_g:108,svg_iframe:66,svg_image:109,svg_line:110,svg_linearGradient:112,svg_marker:113,svg_mask:114,svg_metadata:115,svg_mpath:116,svg_path:117,svg_pattern:118,svg_polygon:119,svg_polyline:120,svg_radialGradient:121,svg_rect:122,svg_script:123,svg_set:124,svg_stop:125,svg_style:126,svg_svg:127,svg_switch:128,svg_symbol:129,svg_text:132,svg_textPath:133,svg_title:134,svg_tspan:135,svg_unknown:66,svg_use:136,svg_video:66,svg_view:137},ai=Object.keys(W);for(let i=0,t=Fh(ai),e=t.length;i<e;i++){let r=t[i],s=W[r];s.name=r+"Element",s.up=W[ai[s[0]]]}for(let i=0,t=Object.keys(T),e=t.length,r,s;i<e;i++)r=t[i],s=T[r],T[r]=W[ai[s]],r.indexOf("svg_")==0&&(T[r.replace("_",":")]=T[r]);var ui=require("async_hooks");var Cn=Symbol.for("#toStringDeopt");var On=Symbol.for("#symbols"),Mn=Symbol.for("#batches"),Pn=Symbol.for("#extras"),kn=Symbol.for("#stacks"),Pt=class{constructor(t){this.dom=t,this.string=""}contains(t){return this.dom.classList.contains(t)}add(t){return this.contains(t)?this:(this.string+=(this.string?" ":"")+t,this.dom.classList.add(t),this)}remove(t){if(!this.contains(t))return this;let e=new RegExp("(^|\\s)"+t+"(?=\\s|$)","g");return this.string=this.string.replace(e,""),this.dom.classList.remove(t),this}toggle(t,e){return e===void 0&&(e=!this.contains(t)),e?this.add(t):this.remove(t)}incr(t,e=0){var r=this;let s=this.stacks,n=s[t]||0;return n<1&&this.add(t),e>0&&setTimeout(function(){return r.decr(t)},e),s[t]=Math.max(n,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[On],s=this[Mn],n=!0;if(!r)r=this[On]=[t],s=this[Mn]=[e||""],this.toString=this.valueOf=this[Cn];else{let o=r.indexOf(t),l=e||"";o==-1?(r.push(t),s.push(l)):s[o]!=l?s[o]=l:n=!1}n&&(this[Pn]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Cn](){return this.string+(this[Pn]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[kn]||(this[kn]={})}};var tr=Symbol.for("#__init__"),En=Symbol.for("#__initor__"),Fn=Symbol.for("#__inited__"),ci=Symbol.for("#getRenderContext"),Ih=Symbol.for("#getDynamicContext"),In=Symbol(),N={context:null},fi=class{constructor(t=null){this[tr](t)}[tr](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()}},jt=new fi,$=class extends Map{static[tr](){return this.prototype[En]=In,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[En]===In&&this[Fn]&&this[Fn]()}pop(){return N.context=null}[ci](t){let e=this.get(t);return e||this.set(t,e=new $(this._,t)),N.context=e}[Ih](t,e){return this[ci](t)[ci](e)}run(t){return this.value=t,N.context==this&&(N.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};$[tr]();function di(i,t=Symbol(),e=i){return N.context=i[t]||(i[t]=new $(e,t))}function Ah(){let i=N.context,t=i||new $(null);return globalThis.DEBUG_IMBA&&!i&&jt.stack.length>0&&console.warn("detected unmemoized nodes in",jt.stack.slice(0),"see https://imba.io",t),i&&(N.context=null),t}function _i(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var tt=Symbol.for("#__initor__"),et=Symbol.for("#__inited__"),z=Symbol.for("#__init__"),vi=Symbol.for("#parent"),to=Symbol.for("#context"),An=Symbol.for("#closestNode"),Rh=Symbol.for("#parentNode"),Vh=Symbol.for("##inited"),pi=Symbol.for("#getRenderContext"),Dh=Symbol.for("#getDynamicContext"),mi=Symbol.for("#replaceChild"),me=Symbol.for("#appendChild"),Rn=Symbol.for("#removeChild"),bt=Symbol.for("#insertInto"),Vn=Symbol.for("#insertChild"),ce=Symbol.for("#removeFrom"),Dn=Symbol.for("#removeFromDeopt"),Gt=Symbol.for("#replaceWith"),Hn=Symbol.for("#replaceWithDeopt"),gi=Symbol.for("#placeholderNode"),Hh=Symbol.for("#attachToParent"),jh=Symbol.for("#detachFromParent"),Gh=Symbol.for("#placeChild"),$h=Symbol.for("#beforeReconcile"),zh=Symbol.for("#afterReconcile"),Bh=Symbol.for("#afterVisit"),Uh=Symbol.for("#visitContext"),jn=Symbol.for("#document"),nr=Symbol.for("#htmlNodeName"),Gn=Symbol.for("#ImbaElement"),$n=Symbol.for("#flags"),or=Symbol.for("#scripts"),yi=Symbol.for("#location"),zn=Symbol.for("##document"),eo=Symbol.for("##parent"),qh=Symbol.for("##up"),Bn=Symbol.for("##context"),fe=Symbol.for("#domNode"),er=Symbol.for("##placeholderNode"),Un=Symbol.for("#domDeopt"),Kh=Symbol.for("#insertIntoDeopt"),qn=Symbol.for("##classList"),rr=Symbol.for("##style"),Kn=Symbol.for("##dataset"),ot=Symbol.for("#asset"),bi=Symbol.for("#innerHTML"),ir=Symbol.for("##visitContext"),Yh=Symbol.for("#isRichElement"),de=Symbol.for("#src"),Wh=Symbol.for("#getSlot"),Xh=Symbol.for("#cssns"),Qh=Symbol.for("#cssid"),Jh=Symbol.for("#dom"),Yn=Symbol(),Wn=Symbol(),Xn=Symbol(),Qn=Symbol(),Jn=Symbol(),Zh={},pe=null,$t=class extends URL{},xi=class{get document(){return this[jn]||(this[jn]=new this.Document(this))}get location(){return this.document.location}};function ta(){return!0}var ea={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,ro={},Si=class{define(){return this}get(){return this}upgrade(){}whenDefined(){}},ra=new Si,io={};function ht(i,t){let e=i;if(typeof i=="string"&&(i=W[i]||T[i]||W[i+"Element"]||T["svg_"+i]),i instanceof w)return i;if(!i)return ht("HTML");if(i&&!i.klass){class r extends ht(i.up){}i.klass=r}if(i&&!i.idl){i.idl=!0;let r=Object.getOwnPropertyDescriptors(i.klass.prototype);for(let s=i[1],n=0,o=Object.keys(s),l=o.length,h,a;n<l;n++){h=o[n],a=s[h];let c=a==1?h:a;r[c]||c=="style"||Object.defineProperty(i.klass.prototype,h,{set:function(u){this.setAttribute(c,u)},get:function(){return this.getAttribute(c)}})}}return i.klass}function ia(i,t,e){let r=ht(i,t);if(!(r==e||r.prototype instanceof e||r.prototype[nr])){let n=r.prototype[Gn];if(!n){n=class extends r{static[z](){return this.prototype[tt]=Yn,this}constructor(){super(...arguments),this.__slots={},this.__F=0,this[tt]===Yn&&this[et]&&this[et]()}}[z](),r.prototype[Gn]=n;let o=Object.getOwnPropertyDescriptors(e.prototype);Object.defineProperties(n.prototype,o),n.prototype[nr]=i}return n}return r}var sr=function(i){let t=typeof i=="string"?i:String(i);return t.indexOf('"')>=0&&(t=t.replace(/\"/g,"&quot;")),t},wi=function(i,t){let e=typeof i=="string"?i:String(i);return t=="script"||(e.indexOf('"')>=0&&(e=e.replace(/\"/g,"&quot;")),e.indexOf("<")>=0&&(e=e.replace(/\</g,"&lt;")),e.indexOf(">")>=0&&(e=e.replace(/\>/g,"&gt;"))),e},X=class{static create(t,e){let r=new X;return r[to]=t,r.location=t.location,pe||(pe=new ui.AsyncLocalStorage),pe.run(r,e),r}constructor(){}get flags(){return this[$n]||(this[$n]=new Pt({classList:new zt(this)}))}get scripts(){return this[or]||(this[or]=[])}set location(t){typeof t=="string"&&(t=new $t(t)),this[yi]=t}get location(){return this[yi]||(this[yi]=new $t("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 _t(t)}createComment(t){return new rt(t)}createDocumentFragment(){return new Bt}getElementById(t){return null}},at=new X,Ti=at;function Jt(){return pe&&pe?.getStore?.()||at}var zt=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 zt(t,this.classes.slice(0))}toString(){return this.classes.join(" ").trim()}},lr=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),n=s.length,o,l;r<n;r++)o=s[r],l=e[o],l instanceof Function||t.push(""+o+": "+l);return t.join(";")}},ge=class{static wrap(t){return new Proxy(t.attributes,new ge)}set(t,e,r){return t["data-"+e]=r,!0}get(t,e){return t["data-"+e]}},sa={get(i,t){let e=i,r;for(;e&&r==null;)(e=e[vi])&&(r=e[t]);return r}},w=class{toString(){return this.outerHTML}get outerHTML(){return""}text$(t){return this.textContent=t,this}get ownerDocument(){return this[zn]||(this[zn]=Jt())}get[vi](){return this[eo]||this.parentNode||this[qh]}get[to](){return this[Bn]||(this[Bn]=new Proxy(this,sa))}get[An](){return this}get[Rh](){return this[vi][An]}[z](){return this}[Vh](){return this}[pi](t){return di(this,t)}[Dh](t,e){return this[pi](t)[pi](e)}[mi](t,e){let r=this[Vn](t,e);return this[Rn](e),r}[me](t){return t[bt](this,null)}[Rn](t){return t[ce](this)}[bt](t,e){return e?t.insertBefore(this,e):t.appendChild(this),this}[Vn](t,e){return t[bt](this,e)}[ce](t){return t.removeChild(this)}[Dn](t){return t.removeChild(this[fe]||this)}[Gt](t,e){return e[mi](t,this)}[Hn](t,e){return e[mi](t,this[fe]||this)}get[gi](){return this[er]||(this[er]=at.createComment("placeholder"))}set[gi](t){let e=this[er];this[er]=t,e&&e!=t&&e.parentNode&&e[Gt](t)}[Hh](){let t=this[fe],e=t&&t.parentNode;return t&&e&&t!=this&&(this[fe]=null,this[bt](e,t),t[ce](e)),this}[jh](){this[Un]!=!0&&(this[Un]=!0,!0)&&(this[Gt]=this[Hn],this[ce]=this[Dn],this[bt]=this[Kh]);let t=this[gi];return this.parentNode&&t!=this&&(t[bt](this.parentNode,this),this[ce](this.parentNode)),this[fe]=t,this}[Gh](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof rt)return r;let n=new rt("");return r?r[Gt](n,this):n[bt](this,null)}if(t===r)return t;if(s!=="object"){let n,o=t;return e&128&&e&256,r?r instanceof _t?(r.textContent=o,r):(n=Ti.createTextNode(o),r[Gt](n,this),n):(this.appendChild(n=Ti.createTextNode(o)),n)}else return r?r[Gt](t,this):t[bt](this,null)}},_t=class extends w{static[z](){return this.prototype[tt]=Wn,this}constructor(t){super(),this.textContent=t??"",this[tt]===Wn&&this[et]&&this[et]()}get outerHTML(){return this.textContent}};_t[z]();var rt=class extends w{static[z](){return this.prototype[tt]=Xn,this}constructor(t){super(),this.value=t,this[tt]===Xn&&this[et]&&this[et]()}get outerHTML(){return"<!-- "+wi(this.value)+" -->"}toString(){return this.tag&&this.tag.toNodeString?this.tag.toNodeString():this.outerHTML}};rt[z]();var d=class extends w{static[z](){return this.prototype[tt]=Qn,this}constructor(t){super(),this.nodeName=t,this.childNodes=[],this.attributes={},this[tt]===Qn&&this[et]&&this[et]()}emit(t,e,r={bubbles:!0}){console.warn("Element#emit not supported on node")}get classList(){return this[qn]||(this[qn]=new zt(this))}get style(){return this[rr]||(this[rr]=new lr)}get dataset(){return this[Kn]||(this[Kn]=ge.wrap(this))}get richValue(){return this.value}set richValue(t){this.value=t}set asset(t){this[ot]=t}get asset(){return this[ot]}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[bi]=t}get innerHTML(){let t="";if(this[bi])return this[bi];if(this.textContent!=null)return wi(this.textContent);for(let e=0,r=_i(this.childNodes),s=r.length;e<s;e++){let n=r[e];typeof n=="string"||n instanceof String?t+=wi(n,this.nodeName):typeof n=="number"||n instanceof Number?t+=""+n:n&&(t+=n.outerHTML)}return t}get outerHTML(){let t=this.nodeName,e=this[nr],r=""+t;e&&(r=""+e+" is='"+t+"'",t=e);let s,n=this.classList.toString();this.dehydrate&&(n=n?"_ssr_ "+n:"_ssr_",this.dehydrate()),(s=this.id)&&(r+=' id="'+sr(s)+'"'),n&&(r+=' class="'+sr(n)+'"');for(let o=this.attributes,l=0,h=Object.keys(o),a=h.length,c,u;l<a;l++)c=h[l],u=o[c],r+=" "+c+'="'+sr(u)+'"';return this[rr]&&(r+=' style="'+sr(this[rr].toString())+'"'),ea[t]?"<"+r+">":"<"+r+">"+this.innerHTML+"</"+t+">"}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(;e<t;){let r=this.childNodes[e++];if(r instanceof d)return r}return null}get lastElementChild(){let t=this.childNodes.length;for(;t>0;){let e=this.childNodes[--t];if(e instanceof d)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}[$h](){return this}[zh](){return this}[Bh](){this.render&&this.render(),this[ir]&&(this[ir]=null)}get[Uh](){return this[ir]||(this[ir]={})}get flags(){return this.$flags||(this.$flags=new Pt(this),this.flag$==d.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=Xe(this,t,d);!r||!r.set?this.setAttribute(t,e):this[t]=e}};d[z]();d.prototype.setns$=d.prototype.setAttributeNS;d.prototype[Yh]=!0;var Bt=class extends d{static[z](){return this.prototype[tt]=Jn,this}constructor(){super(null),this[tt]===Jn&&this[et]&&this[et]()}get outerHTML(){return this.innerHTML}};Bt[z]();var Li=class extends Bt{get outerHTML(){return this.innerHTML}},O=class extends d{},hr=class extends O{get scripts(){return this[or]||(this[or]=[])}get outerHTML(){let t=lt;lt=this;let e=super.outerHTML,r=new Set,s=[],n=[];if(globalThis.IMBA_HMR&&n.push("<script src='/__hmr__.js'><\/script>"),!this.styles){for(let o=0,l=_i(this.scripts),h=l.length;o<h;o++){let c=l[o].src,u=Zh[c];u&&u.css&&r.add(u.css)}for(let o of _i(r))n.push("<link rel='stylesheet' href='"+o.url+"'>")}if(lt=t,n.length){let o=e.indexOf("</head>");o==-1&&(o=e.indexOf("<body>")),o==-1&&(o=0),e=e.slice(0,o)+`
7`+n.join(`
8`)+`
9`+e.slice(o)}return"<!DOCTYPE html>"+e}},Ut=class extends O{},qt=class extends O{},Kt=class extends O{},Yt=class extends O{},Wt=class extends O{},ar=class extends O{get outerHTML(){return lt&&(lt.scripts||(lt.scripts=[])).push(this),this[ot]&&(this[ot].js?(this.setAttribute("src",this[ot].js.url),this.setAttribute("type","module")):console.warn("could not find browser entrypoint for "+this[ot].path)),super.outerHTML}},ur=class extends O{get outerHTML(){if(this[ot]){let t=this.getAttribute("rel"),e;t=="stylesheet"&&((e=this[ot].css.url)||console.warn("could not find stylesheet for "+this[ot].path)),e&&this.setAttribute("href",e)}return super.outerHTML}},cr=class extends O{set src(t){this[de]!=t&&(this[de]=t)}get src(){return this[de]}get outerHTML(){if(lt&&this.src&&(lt.styles||(lt.styles=[])).push(this),this.src){this.nodeName="link",this.setAttribute("rel","stylesheet"),this.setAttribute("href",String(this.src));let t=super.outerHTML;return this.nodeName="style",t}return super.outerHTML}},M=class{},ye=class extends M{},Xt=class extends ye{},be=class extends Xt{},_e=class extends ye{},P=class extends M{},Zn={};function so(i,t,e){if(!i)return e[t]=null;if(e[t]!==void 0)return e[t];let r=Object.getOwnPropertyDescriptor(i,t);return r!==void 0||i==Qt?e[t]=r||null:so(Reflect.getPrototypeOf(i),t,e)}var Qt=class extends d{set$(t,e){var r;let s=Zn[r=this.nodeName]||(Zn[r]={}),n=so(this,t,s);!n||!n.set?this.setAttribute(t,e):this[t]=e}},fr=class extends Qt{set src(t){if(this[de]!=t&&(this[de]=t,!0)){if(t&&t.adoptNode)t.adoptNode(this);else if(t&&t.type=="svg"){if(t.attributes)for(let e=t.attributes,r=0,s=Object.keys(e),n=s.length,o,l;r<n;r++)o=s[r],l=e[o],this.setAttribute(o,l);this.innerHTML=t.content}}}};W[""].klass=d;W.HTML.klass=O;W.SVG.klass=Qt;T.html.klass=hr;T.select.klass=Ut;T.input.klass=qt;T.textarea.klass=Kt;T.button.klass=Yt;T.option.klass=Wt;T.script.klass=ar;T.style.klass=cr;T.link.klass=ur;T.svg_svg.klass=fr;ht("");ht("HTML");ht("SVG");function na(i,t,e,r){let s=at.createElement(i);return e&&(s.className=e),r!==null&&s.text$(r),t&&t[me]&&t[me](s),s}function oa(i,t,e,r,s){let n=at.createElementNS("http://www.w3.org/2000/svg",i);return e&&(n.className=e),t&&t[me]&&t[me](n),r&&(n.textContent=r),n}function ut(i){return at.createComment(i)}function dr(i){return at.createTextNode(i)}function la(){return at.createDocumentFragment()}function no(i,t,e,r,s){let n;return typeof i!="string"&&(i.prototype instanceof O?(n=new i,n.nodeName=i.nodeName):i&&i.nodeName&&(i=i.nodeName)),n||(n=at.createElement(ro[i]||i)),n[eo]=t,n[z](),r!==null&&n[Wh]("__").text$(r),(e||n.flags$ns)&&n.flag$(e||""),n}function ha(i,t,e,r){if(i==null||i==null)return ut("");if(i instanceof w)return i;if(typeof i=="string"||i&&i.prototype instanceof w)return no(i,t,e,r)}function aa(i,t,e={}){W[i]=io[i]={idl:!0,name:i,klass:t};let r=t.nodeName=i,s=t.prototype;if(i.indexOf("-")==-1&&(r=t.nodeName=""+i+"-tag",ro[i]=r),e.extends&&(s[nr]=e.extends),e.cssns){let n=(s._ns_||"")+" "+e.cssns;s._ns_=n.trim()+" ",s[Xh]=e.cssns}if(e.cssid){let n=(s.flags$ns||"")+" "+e.cssid;s[Qh]=e.cssid,s.flags$ns=n.trim()+" "}return t}globalThis[Jh]={Location:$t,Document:X};function Ni(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function ua(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var yr=Symbol.for("#parent"),oo=Symbol.for("#closestNode"),ca=Symbol.for("#isRichElement"),fa=Symbol.for("#afterVisit"),lo=Symbol.for("#__initor__"),ho=Symbol.for("#__inited__"),ao=Symbol.for("#appendChild"),uo=Symbol.for("#removeChild"),co=Symbol.for("#replaceChild"),ct=Symbol.for("#insertInto"),pr=Symbol.for("#replaceWith"),fo=Symbol.for("#insertChild"),mr=Symbol.for("#removeFrom"),po=Symbol.for("#placeChild"),_o=Symbol.for("#__init__"),da=Symbol.for("#registerFunctionalSlot"),pa=Symbol.for("#getFunctionalSlot"),mo=Symbol.for("#getSlot"),Oi=Symbol.for("##parent"),vt=Symbol.for("##up"),go=Symbol.for("##flags"),ma=Symbol.for("#domFlags"),B=Symbol.for("#end"),yo=Symbol.for("#textContent"),gr=Symbol.for("#textNode"),Ci=Symbol.for("#functionalSlots"),bo=Symbol();function ga(){return!0}var ft=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[yr](t){this[Oi]=t}get[yr](){return this[Oi]||this[vt]}get[oo](){return this[yr][oo]}get[ca](){return!0}get flags(){return this[go]||(this[go]=new Pt(this))}flagSync$(){return this}[fa](){return this}},ya=0,ve=class extends ft{static[_o](){return this.prototype[lo]=bo,this}constructor(t,e){super(...arguments),this[vt]=e,this.parentNode=null,this[ma]=t,this.childNodes=[],this[B]=ut("slot"+ya++),e&&e[ao](this),this[lo]===bo&&this[ho]&&this[ho]()}get[yr](){return this[Oi]||this.parentNode||this[vt]}set textContent(t){this[yo]=t}get textContent(){return this[yo]}hasChildNodes(){for(let t=0,e=Ni(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(s instanceof ft&&s.hasChildNodes())return!0;if(!(s instanceof rt)){if(s instanceof w)return!0}}return!1}text$(t){return this[gr]?this[gr].textContent=t:this[gr]=this[po](t),this[gr]}appendChild(t){return this.parentNode&&t[ct](this.parentNode,this[B]),this.childNodes.push(t)}[ao](t){var e;return this.parentNode?t[ct](this.parentNode,this[B]):t[vt]==null?t[vt]=this[vt]||this:t[vt],this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[fo](t,e);let r=this.childNodes.indexOf(e);return r>=0&&this.childNodes.splice(r,0,t),t}[uo](t){this.parentNode&&this.parentNode[uo](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[co](t,e){this.parentNode&&this.parentNode[co](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[ct](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[B]&&(e=this[B][ct](t,e));for(let s=0,n=Ni(this.childNodes),o=n.length;s<o;s++)n[s][ct](t,e)}return this}[pr](t,e){let r=t[ct](e,this[B]);return this[mr](e),r}[fo](t,e){if(this.parentNode&&this.insertBefore(t,e||this[B]),e){let r=this.childNodes.indexOf(e);r>=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[mr](t){for(let e=0,r=Ni(this.childNodes),s=r.length;e<s;e++)r[e][mr](t);return this[B]&&this[B][mr](t),this.parentNode=null,this}[po](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&r instanceof rt)return r;let o=ut("");if(r){let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,o),s&&r[pr](o,s),o}return this.childNodes.push(o),s&&o[ct](s,this[B]),o}if(t===r)return t;if(n!=="object"){let o,l=t;if(r){if(r instanceof _t)return r.textContent=l,r;{o=dr(l);let h=this.childNodes.indexOf(r);return this.childNodes.splice(h,1,o),s&&r[pr](o,s),o}}else return this.childNodes.push(o=dr(l)),s&&o[ct](s,this[B]),o}else if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,t),s&&r[pr](t,s),t}else return this.childNodes.push(t),s&&t[ct](s,this[B]),t}};ve[_o]();function ba(i,t){return new ve(i,t)}function xe(i,t){let e=new ve(i,null);return e[vt]=t,e}var Mi=class{[da](t){let e=this[Ci]||(this[Ci]={});return e[t]||(e[t]=xe(0,this))}[pa](t,e){let r=this[Ci];return r&&r[t]||this[mo](t,e)}[mo](t,e){var r;return t=="__"&&!this.render?this:(r=this.__slots)[t]||(r[t]=xe(0,this))}};ua(w.prototype,Mi.prototype);function _a(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var va=Symbol.for("#afterVisit"),br=Symbol.for("#insertInto"),vo=Symbol.for("#appendChild"),xa=Symbol.for("#replaceWith"),Pi=Symbol.for("#removeFrom"),xo=Symbol.for("#__initor__"),So=Symbol.for("#__inited__"),To=Symbol.for("#__init__"),Sa=Symbol.for("#domFlags"),wa=Symbol.for("##parent"),xt=Symbol.for("#end"),Ta=Symbol.for("#removeChild"),La=Symbol.for("#insertChild"),wo=Symbol(),_r=class extends ft{static[To](){return this.prototype[xo]=wo,this}constructor(t,e){super(...arguments),this[Sa]=t,this[wa]=e,t&256||(this[xt]=ut("list")),this.$=this.childNodes,this.length=0,e&&e[vo](this),this[xo]===wo&&this[So]&&this[So]()}hasChildNodes(){return this.length!=0}[va](t){let e=this.length;if(this.length=t,e==t)return;let r=this.parentNode;if(!r)return;let s=this.childNodes,n=this[xt];if(e>t)for(;e>t;)r[Ta](s[--e]);else if(t>e)for(;t>e;)r[La](s[e++],n);this.length=t}[br](t,e){this.parentNode=t,this[xt]&&this[xt][br](t,e),e=this[xt];for(let r=0,s=_a(this.childNodes),n=s.length;r<n;r++){let o=s[r];if(r==this.length)break;o[br](t,e)}return this}[vo](t){}[xa](t,e){let r=t[br](e,this[xt]);return this[Pi](e),r}[Pi](t){let e=this.length;for(;e>0;)this.childNodes[--e][Pi](t);this[xt]&&t.removeChild(this[xt]),this.parentNode=null}};_r[To]();function Na(i,t){return new _r(i,t)}function Lo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var ki=Symbol.for("#appendChild"),vr=Symbol.for("#insertChild"),Ca=Symbol.for("#replaceWith"),xr=Symbol.for("#insertInto"),Ei=Symbol.for("#removeFrom"),Oa=Symbol.for("#afterVisit"),No=Symbol.for("#__initor__"),Co=Symbol.for("#__inited__"),ko=Symbol.for("#__init__"),Sr=Symbol.for("#domFlags"),Oo=Symbol.for("##parent"),St=Symbol.for("#end"),Mo=Symbol.for("#removeChild"),Po=Symbol(),wr=class extends ft{static[ko](){return this.prototype[No]=Po,this}constructor(t,e){super(...arguments),this[Sr]=t,this[Oo]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new $(this,Symbol()),t&256||(this[St]=ut("map")),e&&e[ki](this),this[No]===Po&&this[Co]&&this[Co]()}[ki](t){if(this.parentNode)return this.parentNode[vr](t,this[St])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Sr]&1)){this.array.push(t),this[ki](t);return}let r=this.array[e];if(r!==t){this.dirty=!0;let s=this.array.indexOf(t),n=this.changes.get(t);s===-1?(this.array.splice(e,0,t),this.insertChild(t,e,s)):s===e+1?(r&&this.changes.set(r,-1),this.array.splice(e,1)):(s>=0&&this.array.splice(s,1),this.array.splice(e,0,t),this.moveChild(t,e,s)),n==-1&&this.changes.delete(t)}}insertChild(t,e,r){let s=this.parentNode;if(!!s)if(e>0){let n=this.array[e-1];s[vr](t,n.nextSibling)}else s[vr](t,this.childNodes[e+1]||this[St])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[Ei](t.parentNode)}[vr](t,e){}[Ca](t,e){let r=t[xr](e,this[St]);return this[Ei](e),r}[xr](t,e){this[Oo]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=Lo(this.array),o=n.length;s<o;s++)n[s][xr](t,e);this[St]&&this[St][xr](t,e)}return this}[Ei](t){for(let e=0,r=Lo(this.array),s=r.length;e<s;e++){let n=r[e];t[Mo](n)}return this[St]&&t[Mo](this[St]),this.parentNode=null}[Oa](t){var e=this;if(!(this[Sr]&1)){this[Sr]|=1;return}if(this.dirty&&(e.changes.forEach(function(r,s){if(r==-1)return e.removeChild(s)}),e.changes.clear(),e.dirty=!1),e.array.length>t)for(;e.array.length>t;){let r=e.array.pop();e.removeChild(r)}}};wr[ko]();function Ma(i,t){return new wr(i,t)}var te=Symbol.for("#__init__"),Eo=Symbol.for("#__initor__"),Fo=Symbol.for("#__inited__"),Pa=Symbol.for("##inited"),ka=Symbol.for("#afterVisit"),Ea=Symbol.for("#beforeReconcile"),Fa=Symbol.for("#afterReconcile"),Io=Symbol.for("#__hooks__"),Zt=Symbol.for("#autorender"),Tr=Symbol.for("##visitContext"),Ao=Symbol(),Ro=new class{constructor(i=null){this[te](i)}[te](i=null){var t;this.items=i&&(t=i.items)!==void 0?t:[],this.current=i&&(t=i.current)!==void 0?t:null,this.lastQueued=i&&(t=i.lastQueued)!==void 0?t:null,this.tests=i&&(t=i.tests)!==void 0?t:0}flush(){let i=null;for(;i=this.items.shift();){if(!i.parentNode||i.hydratedΦ)continue;let t=this.current;this.current=i,i.__F|=1024,i.connectedCallback(),this.current=t}}queue(i){var t=this;let e=this.items.length,r=0,s=this.lastQueued;this.lastQueued=i;let n=w.DOCUMENT_POSITION_PRECEDING,o=w.DOCUMENT_POSITION_FOLLOWING;if(e){let l=this.items.indexOf(s),h=l,a=function(u,p){return t.tests++,u.compareDocumentPosition(p)};(l==-1||s.nodeName!=i.nodeName)&&(h=l=0);let c=t.items[h];for(;c&&a(c,i)&o;)c=t.items[++h];if(h!=l)c?t.items.splice(h,0,i):t.items.push(i);else{for(;c&&a(c,i)&n;)c=t.items[--h];h!=l&&(c?t.items.splice(h+1,0,i):t.items.unshift(i))}}else t.items.push(i),t.current||globalThis.queueMicrotask(t.flush.bind(t))}};function Ia(){return Ro.flush()}var kt=class extends O{static[te](){return this.prototype[Eo]=Ao,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[Eo]===Ao&&this[Fo]&&this[Fo]()}setup$(){return this.__slots={},this.__F=0}[te](){return this.__F|=3,this}[Pa](){if(this[Io])return this[Io].inited(this)}flag$(t){this.className=this.flags$ext=t}build(){return this}awaken(){return this}mount(){return this}unmount(){return this}rendered(){return this}dehydrate(){return this}hydrate(){return this.autoschedule=!0,this}tick(){return this.commit()}visit(){return this.commit()}commit(){return this.renderΦ?(this.__F|=256,this.render&&this.render(),this.rendered(),this.__F=(this.__F|512)&-257&-8193):(this.__F|=8192,this)}get autoschedule(){return(this.__F&64)!=0}set autoschedule(t){t?this.__F|=64:this.__F&=-65}set autorender(t){let e=this[Zt]||(this[Zt]={});e.value=t,this.mountedΦ&&F.schedule(this,e)}get renderΦ(){return!this.suspendedΦ}get mountingΦ(){return(this.__F&16)!=0}get mountedΦ(){return(this.__F&32)!=0}get awakenedΦ(){return(this.__F&8)!=0}get renderedΦ(){return(this.__F&512)!=0}get suspendedΦ(){return(this.__F&4096)!=0}get renderingΦ(){return(this.__F&256)!=0}get scheduledΦ(){return(this.__F&128)!=0}get hydratedΦ(){return(this.__F&2)!=0}get ssrΦ(){return(this.__F&1024)!=0}schedule(){return F.on("commit",this),this.__F|=128,this}unschedule(){return F.un("commit",this),this.__F&=-129,this}async suspend(t=null){let e=this.flags.incr("@suspended");return this.__F|=4096,t instanceof Function&&(await t(),this.unsuspend()),this}unsuspend(){return this.flags.decr("@suspended")==0&&(this.__F&=-4097,this.commit()),this}[ka](){if(this.visit(),this[Tr])return this[Tr]=null}[Ea](){return this.__F&1024&&(this.__F=this.__F&-1025,this.classList.remove("_ssr_"),this.flags$ext&&this.flags$ext.indexOf("_ssr_")==0&&(this.flags$ext=this.flags$ext.slice(5)),this.__F&512||(this.innerHTML="")),globalThis.DEBUG_IMBA&&jt.push(this),this[Tr]&&(this[Tr]=null),this}[Fa](){return globalThis.DEBUG_IMBA&&jt.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){Ro.queue(this);return}if(t&48)return;this.__F|=16,e||this[te](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),R(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(F.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[Zt]&&F.schedule(this,this[Zt]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),R(this,"unmount"),this.unmount(),this[Zt])return F.unschedule(this,this[Zt])}};kt[te]();var Aa=kt;function Ra(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Vo=Symbol.for("#__init__");var Va={cm:1,mm:1,Q:1,pc:1,pt:1,px:1,em:1,ex:1,ch:1,rem:1,vw:1,vh:1,vmin:1,vmax:1,s:1,ms:1,fr:1,"%":1,in:1,turn:1,grad:1,rad:1,deg:1,Hz:1,kHz:1};var Do={prefix:1,suffix:1,content:1},Ai={rose:[[356,100,97],[356,100,95],[353,96,90],[353,96,82],[351,95,71],[350,89,60],[347,77,50],[345,83,41],[343,80,35],[342,75,30]],pink:[[327,73,97],[326,78,95],[326,85,90],[327,87,82],[329,86,70],[330,81,60],[333,71,51],[335,78,42],[336,74,35],[336,69,30]],fuchsia:[[289,100,98],[287,100,95],[288,96,91],[291,93,83],[292,91,73],[292,84,61],[293,69,49],[295,72,40],[295,70,33],[297,64,28]],purple:[[270,100,98],[269,100,95],[269,100,92],[269,97,85],[270,95,75],[271,91,65],[271,81,56],[272,72,47],[273,67,39],[274,66,32]],violet:[[250,100,98],[251,91,95],[251,95,92],[252,95,85],[255,92,76],[258,90,66],[262,83,58],[263,70,50],[263,69,42],[264,67,35]],indigo:[[226,100,97],[226,100,94],[228,96,89],[230,94,82],[234,89,74],[239,84,67],[243,75,59],[245,58,51],[244,55,41],[242,47,34]],blue:[[214,100,97],[214,95,93],[213,97,87],[212,96,78],[213,94,68],[217,91,60],[221,83,53],[224,76,48],[226,71,40],[224,64,33]],sky:[[204,100,97],[204,94,94],[201,94,86],[199,95,74],[198,93,60],[199,89,48],[200,98,39],[201,96,32],[201,90,27],[202,80,24]],cyan:[[183,100,96],[185,96,90],[186,94,82],[187,92,69],[188,86,53],[189,94,43],[192,91,36],[193,82,31],[194,70,27],[196,64,24]],teal:[[166,76,97],[167,85,89],[168,84,78],[171,77,64],[172,66,50],[173,80,40],[175,84,32],[175,77,26],[176,69,22],[176,61,19]],emerald:[[152,81,96],[149,80,90],[152,76,80],[156,72,67],[158,64,52],[160,84,39],[161,94,30],[163,94,24],[163,88,20],[164,86,16]],green:[[138,76,97],[141,84,93],[141,79,85],[142,77,73],[142,69,58],[142,71,45],[142,76,36],[142,72,29],[143,64,24],[144,61,20]],lime:[[78,92,95],[80,89,89],[81,88,80],[82,85,67],[83,78,55],[84,81,44],[85,85,35],[86,78,27],[86,69,23],[88,61,20]],yellow:[[55,92,95],[55,97,88],[53,98,77],[50,98,64],[48,96,53],[45,93,47],[41,96,40],[35,92,33],[32,81,29],[28,73,26]],amber:[[48,100,96],[48,96,89],[48,97,77],[46,97,65],[43,96,56],[38,92,50],[32,95,44],[26,90,37],[23,83,31],[22,78,26]],orange:[[33,100,96],[34,100,92],[32,98,83],[31,97,72],[27,96,61],[25,95,53],[21,90,48],[17,88,40],[15,79,34],[15,75,28]],red:[[0,86,97],[0,93,94],[0,96,89],[0,94,82],[0,91,71],[0,84,60],[0,72,51],[0,74,42],[0,70,35],[0,63,31]],warmer:[[60,9,98],[60,5,96],[20,6,90],[24,6,83],[24,5,64],[25,5,45],[33,5,32],[30,6,25],[12,6,15],[24,10,10]],warm:[[0,0,98],[0,0,96],[0,0,90],[0,0,83],[0,0,64],[0,0,45],[0,0,32],[0,0,25],[0,0,15],[0,0,9]],gray:[[0,0,98],[240,5,96],[240,6,90],[240,5,84],[240,5,65],[240,4,46],[240,5,34],[240,5,26],[240,4,16],[240,6,10]],cool:[[210,20,98],[220,14,96],[220,13,91],[216,12,84],[218,11,65],[220,9,46],[215,14,34],[217,19,27],[215,28,17],[221,39,11]],cooler:[[210,40,98],[210,40,96],[214,32,91],[213,27,84],[215,20,65],[215,16,47],[215,19,35],[215,25,27],[217,33,17],[222,47,11]]},Da=new RegExp("^("+Object.keys(Ai).join("|")+")(\\d+(?:\\.\\d+)?)$"),Ha=/^([xyz])$/,ja=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,Ga=`*,::before,::after {
10box-sizing: border-box;
11border-width: 0;
12border-style: solid;
13border-color: currentColor;
14}`,Fi=class{constructor(t=null){this[Vo](t)}[Vo](t=null){var e;this.entries=t&&(e=t.entries)!==void 0?e:{}}register(t,e){let r=this.entries[t];r?r&&(r.css=e,r.node&&(r.node.textContent=e)):(r=this.entries[t]={sourceId:t,css:e},this.entries.resets||this.register("resets",Ga))}toString(){return Object.values(this.entries).map(function(t){return t.css}).join(`
15
16`)}toValue(t,e,r,s=null){let n;Do[r]&&(t=String(t));let o=typeof t;if(o=="number"){if(e||(Ha.test(r)?e="px":ja.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return Va[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(o=="string"){if(r&&Do[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(Da)){let h=Ai[n[1]][parseInt(n[2])],a="100%";if(typeof s=="number"?a=s+"%":typeof s=="string"&&(a=s),h)return"hsla("+h[0]+","+h[1]+"%,"+h[2]+"%,"+a+")"}}else if(t&&t.toStyleString instanceof Function)return t.toStyleString();return t}parseDimension(t){if(typeof t=="string"){let[e,r,s]=t.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(r),s]}else if(typeof t=="number")return[t]}},Ho=new Fi,$a=Object.keys(Ai);function za(){return!0}var Ii=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let o=Ho.toValue(e,r,s,n);this.style.setProperty(t,o)}};Ra(d.prototype,Ii.prototype);var Ba=Symbol.for("#insertInto"),jo=Symbol.for("#removeFrom");function Ua(i,t={}){let e=N.context;N.context=t;let r=i(t);return N.context==t&&(N.context=e),r}function Go(i,t){return console.error(`imba.mount not supported on server.
17To spawn a dev-server for an imba client run:
18 > imba serve my-imba-file.imba`),String(i);let e=t||globalThis.document.body,r=i;if(i instanceof Function){let s=new $(e,null),n=function(){let o=N.context;N.context=s;let l=i(s);return N.context==s&&(N.context=o),l};r=n(),F.listen("commit",n)}else r.__F|=64;return r[Ba](e),r}function $o(i){return i&&i[jo]&&i[jo](i.parentNode),i}var zo=globalThis.imba||(globalThis.imba={});zo.mount=Go;zo.unmount=$o;function ee(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Se(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var we=Symbol.for("##onchange"),Le=Symbol.for("#afterVisit"),Te=Symbol.for("##oninput"),Lr=Symbol.for("##onclick"),Ne=Symbol.for("##bound"),wt=Symbol.for("##visitContext");function qa(){return!0}var Ka={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},Ri=function(i){return i instanceof Array||i&&i.has instanceof Function},zi=function(i,t){return i==t?!0:i instanceof Array?i.indexOf(t)>=0:i&&i.has instanceof Function?i.has(t):i&&i.contains instanceof Function?i.contains(t):!1},Bi=function(i,t){if(i instanceof Array)return i.push(t);if(i&&i.add instanceof Function)return i.add(t)},Ui=function(i,t){if(i instanceof Array){let e=i.indexOf(t);if(e>=0)return i.splice(e,1)}else if(i&&i.delete instanceof Function)return i.delete(t)};function Ya(i){function t(){return i[0]?i[0][i[1]]:void 0}function e(r){return i[0]?i[0][i[1]]=r:null}return{get:t,set:e}}var Vi=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Ne]&&Ka[this.nodeName]&&(this[Ne]=!0,this[we]&&this.addEventListener("change",this[we]=this[we].bind(this)),this[Te]&&this.addEventListener("input",this[Te]=this[Te].bind(this),{capture:!0}),this[Lr]&&this.addEventListener("click",this[Lr]=this[Lr].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?Ya(r):r),r}};ee(d.prototype,Vi.prototype);Object.defineProperty(d.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(i){return this.setRichValue(i)}});var Di=class{[we](t){let e=this.data,r=this.$$value;this.$$value=void 0;let s=this.getRichValue();if(this.multiple){if(r)for(let n=0,o=Se(r),l=o.length;n<l;n++){let h=o[n];s.indexOf(h)==-1&&Ui(e,h)}for(let n=0,o=Se(s),l=o.length;n<l;n++){let h=o[n];(!r||r.indexOf(h)==-1)&&Bi(e,h)}}else this.data=s[0];return C(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=Se(this.selectedOptions),s=r.length;e<s;e++){let n=r[e];t.push(n.richValue)}return this.$$value=t}syncValue(){let t=this.data;if(this.multiple){let e=[];for(let r=0,s=Se(this.options),n=s.length;r<n;r++){let o=s[r],l=o.richValue,h=zi(t,l);o.selected=h,h&&e.push(l)}this.$$value=e}else for(let e=0,r=Se(this.options),s=r.length;e<s;e++){let o=r[e].richValue;if(o==t){this.$$value=[o],this.selectedIndex=e;break}}}[Le](){if(this.syncValue(),this[wt])return this[wt]=null}};ee(Ut.prototype,Di.prototype);var Hi=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}};ee(Wt.prototype,Hi.prototype);var ji=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Te](t){return this.data=this.value,C()}[Le](){let t=this.data;if(t==null&&(t=""),this[Ne]&&this.value!=t&&(this.value=t),this[wt])return this[wt]=null}};ee(Kt.prototype,ji.prototype);var Gi=class{[Te](t){let e=this.type;if(!(e=="checkbox"||e=="radio")&&!(e=="number"&&Number.isNaN(this.valueAsNumber)))return this.$$value=void 0,this.data=this.richValue,C()}[we](t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;Ri(e)?s?Bi(e,r):Ui(e,r):this.data=s?r:!1}return C()}setRichValue(t){this.$$value!==t&&(this.$$value=t,this.value!==t&&(this.value=t))}getRichValue(){if(this.$$value!==void 0)return this.$$value;let t=this.value,e=this.type;if(e=="range"||e=="number"){let r=this.valueAsNumber;Number.isNaN(r)&&(r=Number(t.replace(/\,/,".")+0)),Number.isNaN(r)&&(r=null),t=r}else e=="checkbox"&&(t==null||t==="on")&&(t=!0);return t}[Le](){if(this[Ne]){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=zi(e,this.richValue)}else this.richValue=this.data}this[wt]&&(this[wt]=null)}};ee(qt.prototype,Gi.prototype);var $i=class{get checked(){return this.$checked}set checked(t){t!=this.$checked&&(this.$checked=t,this.flags.toggle("checked",!!t))}setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Lr](t){let e=this.data,r=this.checked,s=this.richValue;return Ri(e)?r?Ui(e,s):Bi(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[Le](),C()}[Le](){if(this[Ne]){let t=this.data,e=this.$$value==null?!0:this.$$value;Ri(t)?this.checked=zi(t,e):this.checked=t==e}this[wt]&&(this[wt]=null)}};ee(Yt.prototype,$i.prototype);function Bo(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var Wa=Symbol.for("#getSlot"),Xa=Symbol.for("#container"),Qa=Symbol.for("#afterVisit"),Et=Symbol.for("#__init__"),Uo=Symbol.for("#__initor__"),qo=Symbol.for("#__inited__"),Nr=Symbol.for("#listeners"),it=Symbol.for("#slot"),Ja=Symbol.for("#parent"),H=Symbol.for("##container"),qi=Symbol.for("#domTarget"),Ko=Symbol.for("#insertInto"),Za=Symbol.for("#removeFrom"),tu=Symbol.for("#teleport"),eu=Symbol.for("#self"),ru=Symbol.for("#target"),Yo=Symbol(),Ce=class extends kt{static[Et](){return this.prototype[Uo]=Yo,this}constructor(){super(...arguments),super[Et]||this[Et](),this[Uo]===Yo&&this[qo]&&this[qo]()}[Et](t=null){super[Et]&&super[Et](...arguments),this.to=t?t.to:void 0}build(){return this[Nr]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[Wa](t,e){return this[it]||(this[it]=xe(0,this[Ja])),this[it]}get[Xa](){if(!this[H]){let t=this.className;this[H]=this.doc.createElement("div"),this[H].className=t,this[H].style.cssText="display:contents !important;"}return this[H]}get domTarget(){return this[qi]||(this[qi]=this.to instanceof d?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){return this[H]?this[H].style:super.style}get classList(){return this[H]?this[H].classList:super.classList}get className(){return this[H]?this[H].className:super.className}set className(t){this[H]?this[H].className=t:super.className=t}[Qa](){if(this.mountedΦ&&this[it]&&!this[it].parentNode)return this[it][Ko](this.target)}mount(){for(let e=0,r=Bo(this[Nr]),s=r.length;e<s;e++){let[n,o,l]=r[e];this.eventTarget.addEventListener(n,o,l)}let t=this.domTarget;return this[it]&&this[it][Ko](t),this}unmount(){for(let t=0,e=Bo(this[Nr]),r=e.length;t<r;t++){let[s,n,o]=e[t];this.eventTarget.removeEventListener(s,n,o)}return this[it]&&this[it][Za](this.domTarget),this[qi]=null,this}addEventListener(t,e,r={}){if(e[tu]=this,e[eu]=this,this[Nr].push([t,e,r]),this.mountedΦ&&this.eventTarget?.addEventListener)return this.eventTarget.addEventListener(t,e,r)}};Ce[Et]();var Ki=class extends Ce{get domTarget(){return this.doc.body}get eventTarget(){return this.win}addEventListener(t,e,r={}){return e[ru]=this.domTarget.parentNode,super.addEventListener(...arguments)}on$resize(t,e,r,s){return this.addEventListener("resize",r,s),r}};globalThis.customElements&&(globalThis.customElements.define("i-teleport",Ce),globalThis.customElements.define("i-global",Ki));function iu(){return!0}function Tt(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function su(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var pt=Symbol.for("#__init__"),Cr=Symbol.for("#__initor__"),Or=Symbol.for("#__inited__"),Wo=Symbol.for("#imba"),Yi=Symbol.for("#insertInto"),Wi=Symbol.for("#removeFrom"),nu=Symbol.for("#all"),Oe=Symbol.for("#phase"),dt=Symbol.for("#nodes"),ou=Symbol.for("#sizes"),Xo=Symbol.for("#mode"),Qo=Symbol.for("#enabled"),lu=Symbol.for("#easer"),Jo=Symbol.for("#anims"),Xi=Symbol.for("#_easer_"),Zo=Symbol(),tl=Symbol(),Mr=class extends Rt{static[pt](){return this.prototype[Cr]=Zo,this}constructor(){super(...arguments),super[pt]||this[pt](),this[Cr]===Zo&&this[Or]&&this[Or]()}[pt](t=null){var e;super[pt]&&super[pt](...arguments),this.selectors=t&&(e=t.selectors)!==void 0?e:{}}addSelectors(t,e){var r;return((r=this.selectors)[e]||(r[e]=[])).push(...t),!0}getSelectors(...t){let e=[];for(let r=0,s=Tt(t),n=s.length;r<n;r++){let o=s[r];this.selectors[o]&&e.push(...this.selectors[o])}return e&&e.length?e.join(","):null}nodesForBase(t,e="transition"){let r=[t],s=(this.selectors[e]||[]).join(",");if(s=="")return r;let n=t.querySelectorAll(s);for(let o=0,l=Tt(n),h=l.length;o<h;o++){let a=l[o];a.closest("._ease_")==t&&r.push(a)}return r[nu]=n,r}nodesWithSize(t,e="in"){let r=this.getSelectors("_off_sized","_"+e+"_sized");return r?t.filter(function(s){return s.matches(r)}):[]}};Mr[pt]();var Pr=new Mr,hu=globalThis.imba||(globalThis.imba={});hu.transitions=Pr;var Me=class extends Rt{static[pt](){return this.prototype[Cr]=tl,this}constructor(t){super(),this.dom=t,this[Oe]=null,this[dt]=[],this[ou]=new Map,this[Cr]===tl&&this[Or]&&this[Or]()}log(...t){}get flags(){return this.dom.flags}flag(t){for(let e=0,r=Tt(this[dt]),s=r.length;e<s;e++)r[e].flags.add(t);return this}unflag(t){for(let e=0,r=Tt(this[dt]),s=r.length;e<s;e++)r[e].flags.remove(t);return this}commit(){return this.dom.offsetWidth}enable(t){return t&&(this[Xo]=t),this[Qo]!=!0&&(this[Qo]=!0,!0)?(this.dom[Yi]=this[Yi].bind(this),this.dom[Wi]=this[Wi].bind(this),this.flags.add("_ease_")):this}disable(){return this.flags.remove("_ease_"),!0}set phase(t){let e=this[Oe];this[Oe]!=t&&(this[Oe]=t,!0)&&(e&&this.unflag("@"+e),t&&this.flag("@"+t),t||(this.unflag("@out"),this.unflag("@in"),this.unflag("@off"),this[dt]=null),t=="enter"&&e=="leave"&&this.dom?.transitionΞoutΞcancel?.(this),t=="leave"&&e=="enter"&&this.dom?.transitionΞinΞcancel?.(this),t=="enter"&&this.dom?.transitionΞin?.(this),t=="leave"&&this.dom?.transitionΞout?.(this),e=="leave"&&!t&&this.dom?.transitionΞoutΞend?.(this),e=="enter"&&!t&&this.dom?.transitionΞinΞend?.(this))}get phase(){return this[Oe]}get leavingΦ(){return this.phase=="leave"}get enteringΦ(){return this.phase=="enter"}get idleΦ(){return this.phase==null}track(t){var e=this;let r={before:Jt().getAnimations()};return this.commit(),t(),this.commit(),r.after=Jt().getAnimations(),r.fresh=r.after.filter(function(s){return r.before.indexOf(s)==-1}),r.deep=r.fresh.filter(function(s){let n;return!!((n=s.effect.target)&&n.closest("._ease_")!=e.dom)}),r.own=r.fresh.filter(function(s){return r.deep.indexOf(s)==-1}),r.own.length?r.finished=new Promise(function(s){let n=new Set(r.own),o=function(){if(n.delete(this),n.size==0)return s()};for(let l=0,h=Tt(r.own),a=h.length;l<a;l++){let c=h[l];c[lu]=e,c.addEventListener("finish",o,{once:!0}),c.addEventListener("cancel",o,{once:!0})}}):r.finished=Promise.resolve(!0),r}getAnimatedNodes(){return Pr.nodesForBase(this.dom)}getNodeSizes(t="in",e=this[dt]){let r=Pr.nodesWithSize(e,t),s=new Map;for(let n=0,o=Tt(r),l=o.length;n<l;n++){let h=o[n],a=(this&&this[Wo]||globalThis[Wo]).window.getComputedStyle(h);s.set(h,{width:a.width,height:a.height})}return s}applyNodeSizes(t){for(let[e,r]of Tt(t))e.style.width=r.width,e.style.height=r.height;return t}clearNodeSizes(t){if(!!t){for(let[e,r]of Tt(t))e.style.removeProperty("width"),e.style.removeProperty("height");return t}}[Yi](t,e){var r=this;let s;if(this.enteringΦ)return this.dom;let n=function(){if(s&&r.clearNodeSizes(s),r.enteringΦ)return r.phase=null};if(r.leavingΦ)return r.track(function(){return r.phase="enter",r.unflag("@off"),r.unflag("@out")}).finished.then(n,function(a){return r.log("error cancel leave",a)}),r.dom;let o=Jt().contains(t);return e?t.insertBefore(r.dom,e):t.appendChild(r.dom),this[dt]=r.getAnimatedNodes(),r.flag("_instant_"),r.unflag("@out"),r.commit(),s=this[dt].sized=r.getNodeSizes("in"),r.dom?.transitionΞinΞinit?.(r),r.flag("@off"),r.flag("@in"),r.flag("@enter"),r.commit(),r.unflag("_instant_"),(this[Jo]=r.track(function(){return r.phase="enter",r.applyNodeSizes(s),r.unflag("@off"),r.unflag("@in")})).finished.then(n,function(h){return r.clearNodeSizes(s),r.log("cancelled insert into",h)}),r.dom}[Wi](t){var e=this;if(this.leavingΦ)return;let r,s=function(){if(e.phase=="leave")return e.dom.emit("easeoutend",{}),t.removeChild(e.dom),e.phase=null};if(e.enteringΦ&&this[Xo]!="forward"){let o=e.track(function(){return e.flag("@off"),e.flag("@in"),e.unflag("@out"),e.phase="leave",e.clearNodeSizes(e[dt].sized)});e.log("cancel enter anims own",o.own,o),o.finished.then(s,function(l){return e.log("error cancel entering",l)});return}this[dt]=e.getAnimatedNodes(),r=e.getNodeSizes("out"),e.applyNodeSizes(r),e.flag("@leave");let n=this[Jo]=e.track(function(){return e.phase="leave",e.flag("@off"),e.flag("@out"),e.clearNodeSizes(r)});if(!n.own.length){s();return}n.finished.then(s,function(){return!0})}};Me[pt]();var Qi=class{transitionΞinΞinit(t){return!0}transitionΞin(t){return!0}transitionΞinΞend(t){return!0}transitionΞinΞcancel(t){return!0}transitionΞout(t){return!0}transitionΞoutΞend(t){return!0}transitionΞoutΞcancel(t){return!0}get ease(){return this[Xi]||(this[Xi]=new Me(this))}set ease(t){if(t==!1){this[Xi]?.disable?.();return}this.ease.enable(t)}};su(d.prototype,Qi.prototype);function au(){return!0}function uu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Zi(){return!0}var Ji=class{αesc(){return this.keyCode==27}αtab(){return this.keyCode==9}αenter(){return this.keyCode==13}αspace(){return this.keyCode==32}αup(){return this.keyCode==38}αdown(){return this.keyCode==40}αleft(){return this.keyCode==37}αright(){return this.keyCode==39}αdel(){return this.keyCode==8||this.keyCode==46}αkey(t){if(typeof t=="string")return this.key==t;if(typeof t=="number")return this.keyCode==t}};uu(_e.prototype,Ji.prototype);function cu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Pe(){return!0}var ts=class{αleft(){return this.button==0}αmiddle(){return this.button==1}αright(){return this.button==2}αshift(){return!!this.shiftKey}αalt(){return!!this.altKey}αctrl(){return!!this.ctrlKey}αmeta(){return!!this.metaKey}αmod(){let t=globalThis.navigator.platform;return/^(Mac|iPhone|iPad|iPod)/.test(t||"")?!!this.metaKey:!!this.ctrlKey}};cu(Xt.prototype,ts.prototype);function ss(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function el(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var fu=Symbol.for("#extendType"),du=Symbol.for("#modifierState"),kr=Symbol.for("#sharedModifierState"),rl=Symbol.for("#onceHandlerEnd");var il=Symbol.for("#extendDescriptors"),j=Symbol.for("#context"),sl=Symbol.for("#self"),pu=Symbol.for("#target"),nl=Symbol.for("#stopPropagation"),ol=Symbol.for("#defaultPrevented"),mu=Symbol.for("#teleport");Zi();Pe();var es=class{[fu](t){var e,r,s;let n=t[il]||(t[il]=(r=Object.getOwnPropertyDescriptors(t.prototype),s=r.constructor,delete r.constructor,r));return Object.defineProperties(this,n)}};ss(P.prototype,es.prototype);var rs=class{get[du](){var t,e;return(t=this[j])[e=this[j].step]||(t[e]={})}get[kr](){var t,e;return(t=this[j].handler)[e=this[j].step]||(t[e]={})}[rl](t){return E(this[j],"end",t)}αsel(t){return!!this.target.matches(String(t))}αclosest(t){return!!this.target.closest(String(t))}αlog(...t){return console.info(...t),!0}αtrusted(){return!!this.isTrusted}αif(t){return!!t}αwait(t=250){return new Promise(function(e){return setTimeout(e,Vt(t))})}αself(){return this.target==this[j].element}αcooldown(t=250){let e=this[kr];return e.active?!1:(e.active=!0,e.target=this[j].element,e.target.flags.incr("cooldown"),this[rl](function(){return setTimeout(function(){return e.target.flags.decr("cooldown"),e.active=!1},Vt(t))}),!0)}αthrottle(t=250){let e=this[kr];return e.active?(e.next&&e.next(!1),new Promise(function(r){return e.next=function(s){return e.next=null,r(s)}})):(e.active=!0,e.el||(e.el=this[j].element),e.el.flags.incr("throttled"),E(this[j],"end",function(){let r=Vt(t);return e.interval=setInterval(function(){e.next?e.next(!0):(clearInterval(e.interval),e.el.flags.decr("throttled"),e.active=!1)},r)}),!0)}αdebounce(t=250){let e=this[kr],r=this;return e.queue||(e.queue=[]),e.queue.push(e.last=r),new Promise(function(s){return setTimeout(function(){return e.last==r?(r.debounced=e.queue,e.last=null,e.queue=[],s(!0)):s(!1)},Vt(t))})}αflag(t,e){let{element:r,step:s,state:n,id:o,current:l}=this[j],h=e instanceof d?e:e?r.closest(e):r;if(!h)return!0;this[j].commit=!0,n[s]=o,h.flags.incr(t);let a=Date.now();return E(l,"end",function(){let c=Date.now()-a,u=Math.max(250-c,0);return setTimeout(function(){return h.flags.decr(t)},u)}),!0}αbusy(t){return this.αflag("busy",t)}αoutside(){let{handler:t}=this[j];if(t&&t[sl])return!t[sl].parentNode.contains(this.target)}};ss(M.prototype,rs.prototype);var gu={};function yu(){return!0}var Er=class{constructor(t,e){this.params=t,this.closure=e}getHandlerForMethod(t,e){return t?t[e]?t:this.getHandlerForMethod(t.parentNode,e):null}emit(t,...e){return R(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return E(this,t,...e)}un(t,...e){return gt(this,t,...e)}get passiveΦ(){return this.params.passive}get captureΦ(){return this.params.capture}get silentΦ(){return this.params.silent}get globalΦ(){return this.params.global}async handleEvent(t){let e=this[pu]||t.currentTarget,r=this.params,s=null,n=r.silence||r.silent;this.count||(this.count=0),this.state||(this.state={});let o={element:e,event:t,modifiers:r,handler:this,id:++this.count,step:-1,state:this.state,commit:null,current:null};if(o.current=o,t.handle$mod&&t.handle$mod.apply(o,r.options||[])==!1)return;let l=M[this.type+"$handle"]||M[t.type+"$handle"]||t.handle$mod||this.guard;if(!(l&&l.apply(o,r.options||[])==!1)){this.currentEvents||(this.currentEvents=new Set),this.currentEvents.add(t);for(let h=0,a=Object.keys(r),c=a.length,u,p;h<c;h++){if(u=a[h],p=r[u],o.step++,u[0]=="_")continue;u.indexOf("~")>0&&(u=u.split("~")[0]);let y=null,f=[t,o],m,b=null,S,I=!1,Jr=typeof u=="string";if(u[0]=="$"&&u[1]=="_"&&p[0]instanceof Function)u=p[0],u.passive||(o.commit=!0),f=[t,o].concat(p.slice(1)),b=e;else if(p instanceof Array){f=p.slice(),y=f;for(let L=0,K=el(f),Ue=K.length;L<Ue;L++){let le=K[L];if(typeof le=="string"&&le[0]=="~"&&le[1]=="$"){let on=le.slice(2).split("."),qe=o[on.shift()]||t;for(let Zr=0,ln=el(on),dh=ln.length;Zr<dh;Zr++){let ph=ln[Zr];qe=qe?qe[ph]:void 0}f[L]=qe}}}if(typeof u=="string"&&(S=u.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/))&&(y||(y=f=[]),f.unshift(S[2]),u=S[1]),u=="trap")t[nl]=!0,t.stopImmediatePropagation(),t[ol]=!0,t.preventDefault();else if(u=="stop")t[nl]=!0,t.stopImmediatePropagation();else if(u=="prevent")t[ol]=!0,t.preventDefault();else if(u=="commit")o.commit=!0;else if(u=="once")e.removeEventListener(t.type,this);else{if(u=="options"||u=="silence"||u=="silent")continue;if(u=="emit"){let L=f[0],K=f[1],Ue=new P(L,{bubbles:!0,detail:K});Ue.originalEvent=t;let fh=(this[mu]||e).dispatchEvent(Ue)}else if(typeof u=="string"){u[0]=="!"&&(I=!0,u=u.slice(1));let L="α"+u,K=t[L];K||(K=this.type&&M[this.type+"$"+u+"$mod"]),K||(K=t[u+"$mod"]||M[t.type+"$"+u]||M[u+"$mod"]),K instanceof Function?(u=K,b=o,f=y||[],t[L]&&(b=t,t[j]=o)):u[0]=="_"?(u=u.slice(1),b=this.closure):b=this.getHandlerForMethod(e,u)}}try{u instanceof Function?m=u.apply(b||e,f):b&&(m=b[u].apply(b,f)),m&&m.then instanceof Function&&m!=F.$promise&&(o.commit&&!n&&F.commit(),m=await m)}catch(L){s=L;break}if(I&&m===!0||!I&&m===!1)break;o.value=m}if(R(o,"end",o),o.commit&&!n&&F.commit(),this.currentEvents.delete(t),this.currentEvents.size==0&&this.emit("idle"),s!=null){if(this.type!="error"){let h=s instanceof Error?s.message:s,a=new P("error",{detail:h,bubbles:!0,cancelable:!0});a.error=s,a.originalEvent=t;let c=e.dispatchEvent(a);if(a.defaultPrevented)return}throw s}}}},is=class{on$(t,e,r){let s="on$"+t,n;n=new Er(e,r);let o=e.capture||!1,l=e.passive,h=o;return l&&(h={passive:l,capture:o}),this[s]instanceof Function?n=this[s](e,r,n,h):this.addEventListener(t,n,h),n}on$error(t,e,r,s){return t.options?.length&&(r.guard=function(...n){let o=this.event.error;return!!n.find(function(h){return o instanceof h})}),this.addEventListener("error",r,s),r}};ss(d.prototype,is.prototype);var ns=new class{get iosΦ(){let i=globalThis.navigator.platform||"";return!!(i.match(/iPhone|iPod|iPad/)||i=="MacIntel"&&globalThis.navigator.maxTouchPoints>2)}};function re(i,t){let e=t;return i instanceof Element?i:typeof i=="string"?i=="this"||i==""?e:i=="up"?e.parentNode:i=="op"?e.offsetParent:e.closest(i)||e.querySelector(i)||globalThis.document.querySelector(i):null}function Lt(i){if(typeof i=="string"){let[t,e,r]=i.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(e),r]}else if(typeof i=="number")return[i]}function Fr(i,t=1){let e=1/t;return Math.round(i*e)/e}function bu(i,t,e){return t>e?Math.max(e,Math.min(t,i)):Math.min(e,Math.max(t,i))}function os(i,t,e,r,s=.1){let[n,o]=Lt(e),[l,h]=Lt(r),[a,c]=Lt(s);return o=="%"&&(n=(t-i)*(n/100)),h=="%"&&(l=(t-i)*(l/100)),c=="%"&&(a=(l-n)*(a/100)),function(u,p){let y=(u-i)/(t-i),f=n+(l-n)*y;return s&&(f=Fr(f,a)),p&&(f=bu(f,n,l)),f}}function _u(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}Pe();function vu(){return!0}var hs=class{αprimary(){return!!this.isPrimary}αmouse(){return this.pointerType=="mouse"}αpen(){return this.pointerType=="pen"}αtouch(){return this.pointerType=="touch"}αpressure(t=.5){return this.pressure>=t}αlock(){return!0}};_u(be.prototype,hs.prototype);function xu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var ll=Symbol.for("#capture"),st=Symbol.for("#step"),Su=Symbol.for("#cancel"),as=Symbol.for("#reframe");var hl=Symbol.for("#mods"),us=Symbol.for("#dx"),cs=Symbol.for("#dy"),Nt=Symbol.for("#context"),Ir=Symbol.for("#locked"),fl=Symbol.for("#teardown"),al=Symbol.for("#x"),ul=Symbol.for("#y"),wu=Symbol.for("#pinTarget");function Tu(){return!0}var cl=null,fs=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[hl]={}}set event(t){this.events.push(t)}get ctrlKey(){return this.originalEvent.ctrlKey}get altKey(){return this.originalEvent.altKey}get shiftKey(){return this.originalEvent.shiftKey}get metaKey(){return this.originalEvent.metaKey}get isPrimary(){return this.originalEvent.isPrimary}get pointerType(){return this.originalEvent.pointerType}get start(){return this.originalEvent}get originalTarget(){return this.originalEvent.target}get event(){return this.events[this.events.length-1]}get elapsed(){return this.event.timeStamp-this.events[0].timeStamp}get type(){return this.event.type}get pointerId(){return this.originalEvent.pointerId}get pressure(){return this.event.pressure}get clientX(){return this.event.clientX}get clientY(){return this.event.clientY}get offsetX(){return this.event.offsetX}get offsetY(){return this.event.offsetY}get activeΦ(){return this.phase!="ended"}get endedΦ(){return this.phase=="ended"}get dx(){return this[us]==null?this.event.x-this.start.x:this[us]}get dy(){return this[cs]==null?this.event.y-this.start.y:this[cs]}stopImmediatePropagation(){return this.cancelBubble=!0,this.event.stopImmediatePropagation(),this}stopPropagation(){return this.cancelBubble=!0,this.event.stopPropagation(),this}preventDefault(){return this.defaultPrevented=!0,this.event.preventDefault()}emit(t,...e){return R(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return E(this,t,...e)}un(t,...e){return gt(this,t,...e)}αflag(t,e){let{element:r}=this[Nt],s=Date.now(),n=e instanceof d?e:e?r.closest(e):r;return this[st].setup!=!0&&(this[st].setup=!0,!0)&&(n.flags.incr(t),E(this,"end",function(){return n.flags.decr(t)})),!0}αlock(){return this[ll](),!0}[ll](){if(this[Ir]!=!0&&(this[Ir]=!0,!0))return this[Nt].element.setPointerCapture(this.pointerId)}get[st](){var t,e;return(t=this[hl])[e=this[Nt].step]||(t[e]={})}[Su](){return this[fl]()}αmoved(t,e){let r=this[st],{element:s,state:n,event:o}=this[Nt];if(!r.setup){let u=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,u=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[p,y]=Lt(u);r.threshold=p,r.sy=p,r.x0=this.x,r.y0=this.y,r.dir||(r.dir="dist"),r.x=r.left=r.right=r.y=r.up=r.down=r.dist=0,y&&y!="px"&&console.warn("only px threshold allowed in @touch.moved")}if(r.active)return!0;if(r.cancelled)return!1;let l=r.threshold,h=this.x-r.x0,a=this.y-r.y0;r.x=Math.max(r.x,Math.abs(h)),r.y=Math.max(r.y,Math.abs(a)),r.left=Math.max(r.left,-h),r.right=Math.max(r.right,h),r.up=Math.max(r.up,-a),r.down=Math.max(r.down,a),r.dist=Math.max(r.dist,Math.sqrt(h*h+a*a));let c=r[r.dir];if(c>l&&c>=r.x&&c>=r.y){r.active=!0;let u=n.pinTarget;return s.flags.incr("@move"),u&&u.flags.incr("@move"),this.preventDefault(),E(this,"end",function(){return u&&u.flags.decr("@move"),s.flags.decr("@move")}),!0}else if(r.x>l||r.y>l)return r.cancelled=!0,!1;return!1}αhold(t=250){var e=this;let r=this[st],s=this[Nt].element;if(r.cancelled)return!1;if(r.setup&&!r.active){let n=this.clientX,o=this.clientY,l=n-r.x,h=o-r.y;Math.sqrt(l*l+h*h)>5&&!r.cancelled&&(clearTimeout(r.timeout),r.cancelled=!0)}if(r.setup!=!0&&(r.setup=!0,!0)){r.active=!1,r.x=this.clientX,r.y=this.clientY;let n;return r.timeout=setTimeout(function(){return r.active=!0,e.preventDefault(),s.flags.incr("@hold"),n&&n(!0),n=null},t),E(e,"end",function(){return r.active&&s.flags.decr("@hold"),clearTimeout(r.timeout),n&&n(!1),n=null}),new Promise(function(o){return n=o})}return r.active}αsync(t,e="x",r="y"){let s=this[st];return s.setup!=!0&&(s.setup=!0,!0)?(s.x=t[e]||0,s.y=t[r]||0,s.tx=this.x,s.ty=this.y):(e&&(t[e]=s.x+(this.x-s.tx)),r&&(t[r]=s.y+(this.y-s.ty))),this[Nt].commit=!0,!0}αapply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[Nt].commit=!0,!0}αcss(t="x",e="y"){let r=this[st];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[Nt].element,r.x=r.el[al]||0,r.y=r.el[ul]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[al]=r.x+(this.x-r.tx),n=r.el[ul]=r.y+(this.y-r.ty);t&&r.el.style.setProperty("--x",s+"px"),e&&r.el.style.setProperty("--y",n+"px")}return!0}αend(){return this.phase=="ended"}αshift(){return!!this.shiftKey}αalt(){return!!this.altKey}αctrl(){return!!this.ctrlKey}αmeta(){return!!this.metaKey}αprimary(){return!!this.isPrimary}αmouse(){return this.pointerType=="mouse"}αpen(){return this.pointerType=="pen"}αtouch(){return this.pointerType=="touch"}αpressure(t=.5){return this.pressure>=t}αlog(...t){return console.info(...t),!0}αleft(){return this.originalEvent.button==0}αmiddle(){return this.originalEvent.button==1}αright(){return this.originalEvent.button==2}αround(t=1,e=t){return this.x=Fr(this.x,t),this.y=Fr(this.y,e),!0}[as](...t){let e=this[st];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,n=t[0],o=0,l="100%",h=0,a=typeof n;a=="number"||a=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(n)||n instanceof Array?n=null:a=="string"&&(n=="this"||n==""?n=r:n=="up"?n=r.parentNode:n=="op"?n=r.offsetParent:n=r.closest(n)||r.querySelector(n)),n==null&&(s++,t.unshift(n=r)),s==2?h=t[1]:s>2&&([o,l,h=0]=t.slice(1));let c=n.getBoundingClientRect();o instanceof Array||(o=[o,o]),l instanceof Array||(l=[l,l]),h instanceof Array||(h=[h,h]),e.rect=c,e.x=os(c.left,c.right,o[0],l[0],h[0]),e.y=os(c.top,c.bottom,o[1],l[1],h[1]),this.x0=this.x=e.x(this.x,e.clamp),this.y0=this.y=e.y(this.y,e.clamp)}else{let r=this.x=e.x(this.x,e.clamp),s=this.y=e.y(this.y,e.clamp);this[us]=r-this.x0,this[cs]=s-this.y0}return!0}αfit(...t){return this[st].clamp=!0,this[as](...t)}αreframe(...t){return this[as](...t)}αpin(...t){let e=this[st];if(e.setup!=!0&&(e.setup=!0,!0)){let r=re(t[0],this.target);r instanceof d||t.unshift(r=this.target);let s=t[1]||0,n=t[2]==null?t[2]=s:t[2],o=r.getBoundingClientRect();e.x=this.clientX-(o.left+o.width*s),e.y=this.clientY-(o.top+o.height*n),r&&(this[wu]=r,r.flags.incr("_touch_"),E(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},ds=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),ns.iosΦ&&globalThis.parent!=globalThis&&cl!=!0&&(cl=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};xu(d.prototype,ds.prototype);M.touch$handle=function(){let i=this.event,t=this.element,e=this.state.pointerId,r=this.modifiers,s=this.handler,n=ns.iosΦ;if(this.current=this.state,e!=null)return e==i.pointerId;if(r.ctrl&&!i.ctrlKey||r.alt&&!i.altKey||r.meta&&!i.metaKey||r.shift&&!i.shiftKey||r.if&&!r.if[0]||r.self&&i.target!=t||r.primary&&!i.isPrimary||r.pen&&i.pointerType!="pen"||r.mouse&&i.pointerType!="mouse"||r.touch&&i.pointerType!="touch"||r.sel&&!i.target.matches(String(r.sel[0])))return;let o=this.state=s.state=this.current=new fs(i,s,t);e=o.pointerId;let l=function(f){return f.preventDefault(),!1},h=null,a=Symbol(),c=function(f){let m=o.clientX,b=o.clientY,S=f.clientX,I=f.clientY;(o[Ir]||o.defaultPrevented)&&(f.pointerId==o.pointerId||m==S&&b==I)&&(f.preventDefault(),f.stopPropagation()),c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null)},u=function(f){if(!(o.type=="touchmove"&&f.changedTouches[0].identifier!=e)&&(o.defaultPrevented||o[Ir]))return f.preventDefault()},p=function(f){let m=f.type,b=o.phase;if(f.pointerId&&o.pointerId!=f.pointerId||f[a])return;f[a]=!0;let S=m=="pointerup"||m=="pointercancel";if(f.pressure==0&&f.pointerType=="mouse"&&m=="pointermove"&&o.originalEvent.pressure>0)return h(f);m=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=f.clientX,o.y=f.clientY),o.event=f,S&&(o.phase="ended");try{s.handleEvent(o)}catch{}if(b=="init"&&!S&&(o.phase="active"),S&&h)return h(f)},y=!1;return h=function(f){if(!y&&(y=!0,t.flags.decr("_touch_"),o.phase!="ended"&&(o.phase="ended",o.x=o.clientX,o.y=o.clientY,s.handleEvent(o)),o.emit("end"),r.passive||--s.prevents==0&&t.style.removeProperty("touch-action"),s.state={},globalThis.removeEventListener("pointermove",p,{passive:!!r.passive}),globalThis.removeEventListener("pointerup",p),globalThis.removeEventListener("pointercancel",p),setTimeout(function(){if(c&&(globalThis.removeEventListener("click",c,{capture:!0}),c=null),n&&u)return globalThis.removeEventListener("touchend",u),globalThis.removeEventListener("touchmove",u,{passive:!1}),u=null},100),!r.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[fl]=h,r.passive||(s.prevents||(s.prevents=0),s.prevents++,t.style.setProperty("touch-action","none"),t.offsetWidth),t.flags.incr("_touch_"),globalThis.addEventListener("pointermove",p,{passive:!!r.passive}),globalThis.addEventListener("pointerup",p),globalThis.addEventListener("pointercancel",p),globalThis.addEventListener("click",c,{capture:!0}),n&&!r.passive&&(globalThis.addEventListener("touchend",u),globalThis.addEventListener("touchmove",u,{passive:!1})),r.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),p(i),!1};function ml(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Lu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Nu=Symbol.for("#context"),Cu=Symbol.for("#extendType");function Ou(){return!0}var dl=new(globalThis.WeakMap||Map),Ar={threshold:[0]},Mu={};M.intersect$handle=function(){let i=this.event.detail.observer;return this.modifiers._observer==i};var ps=class extends Pin(){return this.delta>=0&&this.entry.isIntersecting}αout(){return this.delta<0}αcss(t="ratio"){return this.target.style.setProperty("--ratio",this.ratio),!0}αflag(t,e){let{state:r,step:s}=this[Nu],n=re(e||"",this.target);return this.isIntersecting&&!r[s]?(n.flags.incr(t),r[s]=!0):r[s]&&!this.isIntersecting&&(n.flags.decr(t),r[s]=!1),!0}};function Pu(i,t){return function(e,r){let s=r.prevRatios||(r.prevRatios=new WeakMap);for(let n=0,o=ml(e),l=o.length;n<l;n++){let h=o[n],a=s.get(h.target)||0,c=h.intersectionRatio,u={entry:h,ratio:c,from:a,delta:c-a,observer:r},p=new P(i,{bubbles:!1,detail:u});p[Cu](ps),p.entry=h,p.isIntersecting=h.isIntersecting,p.delta=u.delta,p.ratio=u.ratio,s.set(h.target,c),h.target.dispatchEvent(p)}}}function pl(i=Ar){let t=i.threshold.join("-")+i.rootMargin;!i.root&&Ar.root&&(i.root||(i.root=Ar.root));let e=i.root||Mu,r=dl.get(e);return r||dl.set(e,r={}),r[t]||(r[t]=new IntersectionObserver(Pu("intersect",t),i))}var ms=class{on$intersect(t,e,r,s){let n;if(t.options){let o=[],l={threshold:o};for(let h=0,a=ml(t.options),c=a.length;h<c;h++){let u=a[h];u instanceof d||u instanceof X?l.root=u:typeof u=="number"?o.push(u):typeof u=="string"?l.rootMargin=u:typeof u=="object"&&Object.assign(l,u)}if(o.length==1){let h=o[0];if(h>1)for(o[0]=0;o.length<h;)o.push(o.length/(h-1))}o.length==0&&o.push(0),n=pl(l)}else n=pl();return t._observer=n,n.observe(this),this.addEventListener("intersect",r,s),r}};Lu(d.prototype,ms.prototype);function ku(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Eu(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var gs=Symbol.for("#width"),ys=Symbol.for("#height"),Fu=Symbol.for("#extendType");function Iu(){return!0}var Rr=null,bs=class extends P{αcss(t="1elw",e="1elh",r=""){let s=this.target;if(s.offsetParent){let n=Lt(t),o=Lt(e),l=re(r,s),h=n?"--u_"+n[1]:"--"+t,a=o?"--u_"+o[1]:"--"+e,c=n?this.width/n[0]:this.width,u=o?this.height/o[0]:this.height;l.style.setProperty(h,c),l.style.setProperty(a,u)}return!0}get width(){return this[gs]==null?this[gs]=this.entry.target.offsetWidth:this[gs]}get height(){return this[ys]==null?this[ys]=this.entry.target.offsetHeight:this[ys]}};function Au(){return globalThis.ResizeObserver||Rr||(console.warn(":resize not supported in this browser"),Rr={observe:function(){return!0}}),Rr||(Rr=new ResizeObserver(function(i){for(let t=0,e=ku(i),r=e.length;t<r;t++){let s=e[t],n=new P("resize",{bubbles:!1,detail:s});n.entry=s,n.rect=s.contentRect,n[Fu](bs),s.target.dispatchEvent(n);let o=new P("resized",{bubbles:!0,detail:s});s.target.dispatchEvent(o)}}))}var _s=class{on$resize(t,e,r,s){return Au().observe(this),this.addEventListener("resize",r,s),r}};Eu(d.prototype,_s.prototype);function Ru(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}function Vu(){return!0}var vs,gl=Symbol();function Du(){if(!vs)return vs=function(i){if(i[gl])return;i[gl]=!0;let t=globalThis.document.activeElement;if(t&&t.matches("input,textarea")){let e=new P("selection",{detail:{start:t.selectionStart,end:t.selectionEnd}});return t.dispatchEvent(e)}},globalThis.document.addEventListener("selectionchange",vs)}var xs=class{on$selection(t,e,r,s){return Du(),this.addEventListener("selection",r,s),r}};Ru(d.prototype,xs.prototype);var yl=Symbol.for("#string"),bl=Symbol.for("#html"),Ct={win:{sep:"+",name:"win",order:["meta","ctrl","mod","alt","option","shift"].reverse(),labels:{option:"alt",mod:"ctrl",meta:"win"}},mac:{sep:"",name:"mac",order:["ctrl","alt","option","shift","mod","command"].reverse(),labels:{left:"→",up:"↑",down:"↓",right:"←",plus:"+",tab:"⇥",meta:"⌘",mod:"⌘",ctrl:"⌃",option:"⌥",alt:"⌥",del:"⌦",shift:"⇧",enter:"↩",esc:"⎋",backspace:"⌫"}}};Ct.auto=Ct.win;var Ss={};function _l(i,t="auto"){let e=""+i+":"+t;if(Ss[e])return Ss[e];let r=Ct[t]||Ct.win,s=i.split(" ").map(function(n){return n.split("+").sort(function(a,c){return r.order.indexOf(c)-r.order.indexOf(a)}).map(function(a){let c=r.labels[a]||a;return c=c[0].toUpperCase()+(c.slice(1)||"")})});return Ss[e]=s}function vl(i,t){var e;let r=_l(i,t),s=Ct[t]||Ct.win;return r[yl]||(r[yl]=r.map(function(n){return n.join(s.sep)}).join(" "))}function xl(i,t){var e;let r=_l(i,t),s=Ct[t]||Ct.win;return r[bl]||(r[bl]=r.map(function(n){return"<kbd>"+n.map(function(o){return"<kbd>"+o+"</kbd>"}).join("")+"</kbd>"}).join(" "))}function Hu(){return!0}var ju=new class{humanize(t,e="auto"){return vl(t,e)}htmlify(t,e="auto"){return xl(t,e)}};var eh=he(kl());var Ts=Symbol.for("#getQueryParam"),El=Symbol.for("#setQueryParam");var Fl=Symbol.for("#query");var Q=class{static parse(t,e){return t instanceof Q?t:new Q(t,e)}constructor(t,e){this.router=e,this.parse(t)}parse(t){let e;return t instanceof URL||(t=new URL(t,this.router.origin)),(e=this.router?.aliases[t.pathname])&&(t.pathname=e),this.url=t,this}get activeΦ(){return this.router.location==this}reparse(){return this.parse(this.url)}get searchParams(){return this.url.searchParams}search(){let t=this.searchParams?this.searchParams.toString():"";return t?"?"+t:""}update(t){if(t instanceof Object)for(let e=0,r=Object.keys(t),s=r.length,n,o;e<s;e++)n=r[e],o=t[n],this.searchParams.set(n,o);else typeof t=="string"&&this.parse(t);return this}clone(){return new Q(this.url.href,this.router)}equals(t){return this.toString()==String(t)}get href(){return this.url.href}get path(){return this.url.href.slice(this.url.origin.length)}get pathname(){return this.url.pathname}get query(){return this[Fl]||(this[Fl]=new Proxy({},{get:this[Ts].bind(this),set:this[El].bind(this)}))}toString(){return this.href}[Ts](t,e){return this.searchParams.get(e)}[El](t,e,r){return this[Ts](t,e)!=r&&(r==null||r==""?this.searchParams.delete(e):this.searchParams.set(e,r),this.activeΦ&&(this.router.history.replaceState({},null,this.url.toString()),this.router.touch())),!0}};var Hr=class{constructor(t){this.router=t,this.stack=[],this.pos=-1}pushState(t,e,r){return this.stack.length=Math.max(this.pos,0),this.stack[++this.pos]=[t,e,r],this}replaceState(t,e,r){return this.stack.length=this.pos,this.stack[this.pos]=[t,e,r]}popState(){return this.stack.length=this.pos+1,this.pos-=1,this.stack.pop()}currentState(){return this.stack[this.pos]}slice(){return[]}};var ke=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=Q.parse(e),this.original=this.location.clone()),this.referrer=r}get apply(){return this.params.apply||[]}get revert(){return this.params.revert||[]}get state(){return this.params.state}get mode(){return this.params.mode}redirect(t){return this.location?.update?.(t),this}get path(){return this.location?.path}get url(){return this.location?.toString?.()}set path(t){this.location.path=t}abort(t=!1){return this.aborted=!0,t&&(this.forceAbort=t),this}match(t){return this.location?this.router.route(t).match(this.path):null}};function Il(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var jr=Symbol.for("#routes"),Ls=Symbol.for("#match"),qu=Symbol.for("#symbol"),Al=Symbol.for("#matches"),Ns=new Map,Cs={},Rl={},Ku=/.*/;function Yu(i){if(!Ns.has(i)){let t=new Map;return Ns.set(i,t),t}return Ns.get(i)}function Wu(i,t){let e=Yu(i);if(!e.has(t)){let r=Object.create(i);return Object.assign(r,t),e.set(t,r),r}return e.get(t)}var Os=class{};function Xu(i){if(Cs[i])return Cs[i];let t=Cs[i]={url:i},e=i.indexOf("?"),r=i.indexOf("#");if(r>=0&&(t.hash=i.slice(r+1),i=t.url=i.slice(0,r)),e>=0){let s=t.query=i.slice(e+1);i=i.slice(0,e),t.query=Rl[s]||(Rl[s]=new URLSearchParams(s))}return t.path=i,t}var Gr=class{constructor(t){this.router=t,this.fullPath="",this[jr]={},this[Ls]=new Os,this[Ls].path=""}route(t){var e;return(e=this[jr])[t]||(e[t]=new Ee(this.router,t,this))}match(){return this[Ls]}resolve(t){return"/"}},Ee=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[qu]=Symbol(),this[Al]={},this[jr]={}}route(t){var e;return(e=this[jr])[t]||(e[t]=new Ee(this.router,t,this))}get fullPath(){return""+this.parent.fullPath+"/"+this.$path}load(t){return this.router.queue.add(t)}set path(t){var e=this;if(this.$path==t)return;if(this.raw=t,this.$path=t,this.groups=[],this.cache={},this.dynamic=!1,t.indexOf("?")>=0){let s=t.split("?");t=s.shift(),this.query={};for(let n=0,o=Il(s.join("?").split("&")),l=o.length;n<l;n++){let h=o[n];if(!h)continue;let[a,c]=h.split("=");a[0]=="!"&&(this.dynamic=!0,a=a.slice(1),c=!1),c===""&&(c=!1),c&&c[0]==":"&&(this.dynamic=!0),this.query[a]=c||c!==!1}}if(t=t.replace(/\:(\w+|\*)(\.)?/g,function(s,n,o){e.dynamic=!0,n!="*"&&e.groups.push(n);let l=e.router.matchers[n]||(o?"([^/#.?]+)":"([^/#?]+)");return o?""+l+".":l}),t==""&&e.query)return;if(t=="*")return e.regex=Ku,e;t="^"+t;let r=t[t.length-1];(r=="$"||r=="/")&&(t=t.slice(0,-1)+"(?=/?[#?]|/?$)"),r!="/"&&r!="$"&&t!="^/"&&(t=t+"(?=[/#?]|$)"),e.regex=new RegExp(t)}match(t=this.router.path){var e,r;let s=this.parent.match(t);if(!s)return null;let n=Xu(t),o=n.url,l="";if(s.path&&n.path.indexOf(s.path)==0&&(l=s.path+"/",o=o.slice(l.length)),e=this.regex?o.match(this.regex):[""]){let h=l+e[0],a=[this.$path],c={};if(this.groups.length)for(let y=0,f=Il(e),m=f.length,b;y<m;y++){let S=f[y];(b=this.groups[y-1])&&(c[b]=S,a.push(S))}if(this.query)for(let y=this.query,f=0,m=Object.keys(y),b=m.length,S,I;f<b;f++){S=m[f],I=y[S];let Jr=S,L=n.query?.get?.(S);if(I===!1){if(L)return null;a.push("1");continue}if(I[0]==":"&&(Jr=I.slice(1),I=!0),I==!0&&L||I==L)c[Jr]=L,a.push(L);else return null}let u=a.join("*");c=(r=this[Al])[u]||(r[u]=c);let p=Wu(s,c);return p.path=h,p}return null}resolve(t=this.router.path){if(this.raw[0]=="/"&&!this.dynamic)return this.raw.replace(/\$/g,"");let e=this.parent.match(t),r=this.parent.resolve(t),s;if(this.dynamic){let n=this.match(t);return n?n.path:null}return this.raw[0]=="?"?s=(r||"/")+this.raw:s=r+"/"+this.raw,s.replace(/\$/g,"").replace(/\/\/+/g,"/")}};var Vl=Symbol.for("#__initor__"),Dl=Symbol.for("#__inited__"),jl=Symbol.for("#__init__"),$r=Symbol.for("#idler"),Fe=Symbol.for("#resolve"),Hl=Symbol(),Ie=class extends Set{static[jl](){return this.prototype[Vl]=Hl,this}constructor(){super(),this[$r]=Promise.resolve(this),this[Vl]===Hl&&this[Dl]&&this[Dl]()}emit(t,...e){return R(this,t,e)}on(t,...e){return A(this,t,...e)}once(t,...e){return E(this,t,...e)}un(t,...e){return gt(this,t,...e)}add(t){var e=this;if(t instanceof Function&&(t=t()),!this.has(t)){t.then(function(){return e.delete(t)});let r=e.size==0;super.add(t),r&&(this[$r]=this[Fe]=null,e.emit("busy",e))}return t}delete(t){return super.delete(t)?(this.size==0&&(this[Fe]&&(this[Fe](this),this[Fe]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[$r]||(this[$r]=new Promise(function(e){return t[Fe]=e}))}};Ie[jl]();function Rs(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Gl=Symbol.for("#__initor__"),$l=Symbol.for("#__inited__"),th=Symbol.for("#__init__"),ks=Symbol.for("#enter"),Es=Symbol.for("#resolved"),Br=Symbol.for("#leave"),zl=Symbol.for("#afterVisitRouted"),Bl=Symbol.for("#afterVisitRouteTo"),Ul=Symbol.for("#router"),Ms=Symbol.for("#doc"),mt=Symbol.for("#version"),Qu=Symbol.for("#routes"),ql=Symbol.for("#origin"),Ps=Symbol.for("#request"),Kl=Symbol.for("#hash"),U=Symbol.for("#routeTo"),Ae=Symbol.for("#path"),nt=Symbol.for("#match"),Re=Symbol.for("#options"),Ju=Symbol.for("#cache"),Yl=Symbol.for("#unmatched"),Ot=Symbol.for("#active"),Zu=Symbol.for("#resolvedPath"),tc=Symbol.for("#dataKey"),ec=Symbol.for("#activeKey"),Ve=Symbol.for("#urlKey"),se=Symbol.for("#dataMap"),zr=Symbol.for("#href"),V=Symbol.for("#route"),Wl=Symbol.for("#context"),Xl=Symbol.for("#afterVisit"),Ql=Symbol.for("#routeHandler"),rc=Symbol.for("#parentNode"),ic=Symbol.for("#visitContext"),Jl=Symbol.for("##visitContext"),sc=Symbol.for("#attachToParent"),nc=Symbol.for("#detachFromParent"),Zl=Symbol();var Fs=class{get router(){return this[Ul]||(this[Ul]=new De(this))}};Rs(X.prototype,Fs.prototype);function oc(){return!0}var lc=ti(function(){return globalThis.document.router}),De=class extends eh.EventEmitter{static[th](){return this.prototype[Gl]=Zl,this}constructor(t,e={}){super(),this[Ms]=t,this[mt]=0,this[Qu]={},this.aliases={},this.redirects={},this.rules={},this.matchers={},this.options=e,this.busy=[],this.queue=new Ie,this.root=new Gr(this),this.location=new Q(e.url||t.location.href,this),this.history=new Hr(this),this.mode=e.mode||"history",this.setup(),this[Gl]===Zl&&this[$l]&&this[$l]()}get origin(){return this[ql]||(this[ql]=this[Ms].location.origin)}get query(){return this.location.query}init(){return this.refresh({mode:"replace"}),this}alias(t,e){return this.aliases[t]=e,this.location.reparse(),this}touch(){return this[mt]++}option(t,e){return e==null?this.options[t]:(this.options[t]=e,this)}get realpath(){return this.location.path}get state(){return this.history.state}get states(){return this.history.currentStates}set state(t){}get ctx(){return this[Ps]}pushState(t,e,r){return this.history.pushState(t,e||null,String(r))}replaceState(t,e,r){return this.history.replaceState(t,e||null,String(r))}refresh(t={}){if(this.refreshing)return;this.refreshing=!0;let e=this.location,r=Q.parse(t.location||this.realpath,this),s=t.mode,n=this[Ps];if(!r.equals(e)||!n||t.state){let o=new ke(this,r,e,t);this[Ps]=o,this.emit("beforechange",o),o.aborted&&(!o.forceAbort&&globalThis.window.confirm("Are you sure you want to leave? You might have unsaved changes")?o.aborted=!1:s=="pop"?this.pushState(this.state,null,String(e)):s=="replace"&&this.replaceState(this.state,null,String(e))),o.aborted||(this.location=o.location,s=="push"?this.pushState(o.state,null,String(this.location)):s=="replace"?this.replaceState(o.state,null,String(this.location)):s=="pop"&&(this.history.index=t.index),this.emit("change",o),this.touch(),C())}return this.refreshing=!1,this}onpopstate(t){let e=this.history.index,r=e,s={pop:!0,index:0,from:e,mode:"pop"};try{if(typeof t.state=="string"){let[n,o]=t.state.split("|");r=s.index=parseInt(o),r<e?s.revert=this.history.slice(r+1,e+1).reverse():r>e&&(s.apply=this.history.slice(e+1,r+1))}}catch{}return this.refresh(s),this}onbeforeunload(t){let e=new ke(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[Kl]=this[Ms].location.hash),C()}setup(){return this}onclick(t){if(t.metaKey||t.altKey)return;let e=null,r=null,s=t.target;for(;s&&(!e||!r);)!e&&s.nodeName=="A"&&(e=s),!r&&s[U]&&(r=s),s=s.parentNode;if(e&&r!=e&&(!r||r.contains(e))){let n=e.getAttribute("href");n&&!n.match(/\:\/\//)&&(!e.getAttribute("target")||e.getAttribute("target")=="_self")&&!e.classList.contains("external")&&e.addEventListener("click",this.onclicklink.bind(this),{once:!0})}return!0}onclicklink(t){let e=t.currentTarget||t.target;e[U]&&e[U].resolve();let r=e.getAttribute("href"),s=new URL(e.href),n=s.href.slice(s.origin.length),o=this.realpath.split("#")[0],l=n.split("#")[0];return o==l?globalThis.document.location.hash=s.hash:e[U]?e[U].go():this.go(n),t.stopPropagation(),t.preventDefault()}get url(){return this.location.url}get path(){let t=this.location.path;return this.aliases[t]||t}get pathname(){return this.location.pathname}serializeParams(t){var e;if(t instanceof Object){e=[];for(let s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++)l=n[s],h=t[l],e.push([l,globalThis.encodeURI(h)].join("="));return e.join("&")}return t||""}get hash(){return this[Kl]}set hash(t){}match(t){return this.route(t).match(this.path)}route(t){return this.root.route(t)}go(t,e=null){if(typeof t=="object"&&e===null&&(e=t,t=this.path),typeof t=="number")return globalThis.history.go(t),this;let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!0);return this.refresh({push:!0,mode:"push",location:r,state:s,apply:[s]}),this}replace(t,e=null){typeof t=="object"&&e===null&&(e=t,t=this.path);let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!1);return this.refresh({replace:!0,mode:"replace",location:r,state:s,apply:[s]})}};De[th]();var He=class{constructor(t,e,r,s={}){this.parent=r,this.node=t,this[Ae]=e,this[nt]=null,this[Re]=s,this[Ju]={},this[Yl]={},this[Ot]=null,this[Zu]=null,this[tc]=Symbol(),this[ec]=Symbol(),this[Ve]=Symbol()}get router(){return this.node.ownerDocument.router}get route(){return(this.parent?this.parent.route:this.router).route(this[Ae])}get match(){return this[nt]}get params(){return this[nt]||this[Yl]}get state(){let t=this[se]||(this[se]=new Map),e=this.params,r=this[se].get(e);return r||this[se].set(e,r={}),r}set state(t){(this[se]||(this[se]=new Map)).set(this.params,t)}set path(t){this[Ae]!=t&&(this[Ae]=t,!0)&&this.router.touch()}get path(){return this[Ae]}get isActive(){return!!this[Ot]}get activeΦ(){return!!this[Ot]}resolve(){let t=this.router[mt];if(!(this[mt]!=t&&(this[mt]=t,!0)))return;let e=this.route,r=this[Re],s=this.router.path,n=e.match(s),o=this[Ot],l=this[nt],h=n!=l,a=n&&n[this[Ve]];return n&&(this[Ot]=!0,this[nt]=n,n[this[Ve]]=s),n&&(h||a!=s||!o)&&this[Es](n,l,a),!o&&n&&this[ks](),!n&&(o||o===null)&&(this[Ot]=!1,this[Br]()),this[nt]}[ks](){return this.node.flags.remove("not-routed"),this.node.flags.add("routed"),this.node?.routeDidEnter?.(this)}[Es](t,e,r=""){return this.node?.routeDidResolve?.(this,t,e,r)}[Br](){return this.node.flags.add("not-routed"),this.node.flags.remove("routed"),this.node?.routeDidLeave?.(this)}},Ur=class extends He{[ks](){return this}[Es](){return this}[Br](){return this}resolve(){let t=this.router[mt];if(!(this[mt]!=t&&(this[mt]=t,!0)))return;let e=this[Re],r=this.route,s=this.router.path,n=this.route.resolve(s),o=this.route.match(s);o&&(this[nt]=o,this[nt][this[Ve]]=s),e.sticky&&this[nt]&&(n=this[nt][this[Ve]]),this[zr]!=n&&(this[zr]=n,!0)&&this.node.nodeName=="A"&&this.node.setAttribute("href",n),this.node.flags.toggle("active",!!o)}go(){return this.resolve(),this[Re]&&this[Re].replace?this.router.replace(this[zr]):this.router.go(this[zr])}},Is=class{get router(){return this.ownerDocument.router}};Rs(w.prototype,Is.prototype);var As=class{set route(t){if(this[V]){this[V].path=t;return}let e=t[0]!="/"?this[Wl].route:null;this[V]=new He(this,t,e,this.route__),this[Xl]=this[zl]}get route(){return this[V]}set routeΞto(t){var e=this;if(this[U]){this[U].path=t;return}let r=t[0]!="/"?this[Wl].route:null;this[V]=this[U]=new Ur(this,t,r,this.routeTo__),this[Xl]=this[Bl],e.onclick=function(s){if(!s.altKey&&!s.metaKey&&!s[Ql])return s.preventDefault(),s[Ql]=e[U],e[U].go()}}[zl](){if(this[V]){let t=this[rc],e=t&&t[ic];if(e&&e.matchedRoute&&e.matchedRoute!=this[V]){this[V][Ot]!=!1&&(this[V][Ot]=!1,!0)&&(this[V][Br](),this[V][mt]=-1);return}if(this[V].resolve(),this[V].activeΦ)e.matchedRoute=this[V];else return}if(this.visit&&this.visit(),this[Jl])return this[Jl]=null}[Bl](){if(this[U]&&this[U].resolve(),this.visit)return this.visit()}routeDidEnter(t){return this[sc]()}routeDidLeave(t){return this[nc]()}routeDidResolve(t,e,r){var s=this;this.routed instanceof Function&&e!=r&&s.router.queue.add(async function(){s.suspend();let n=await s.routed(e,t.state,r);return s.unsuspend()})}};Rs(d.prototype,As.prototype);function J(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}function Qs(i,t){let e=Object.getOwnPropertyDescriptors(t);return delete e.constructor,Object.defineProperties(i,e),i}var Be=Symbol.for("##reactive"),Ft=Symbol.for("##referenced"),Ge=Symbol.for("##dereferenced"),qr=Symbol.for("#map"),rh=Symbol.for("#__init__"),Kr=Symbol.for("#child"),je=Symbol.for("#reactions"),Vs=Symbol.for("#promise"),v={TOUCHING:1<<1,STALE:1<<2,OBJECT:1<<3,RUNNING:1<<4,INVALIDATING:1<<5,POSSIBLY_STALE:1<<6,AUTORUN:1<<7},k=0,ih=!1;var hc=0,lh=1,Js={META:new Map,VALUE:new Map,REF:new Map},G=Symbol.for("~"),hh=Symbol.for("~~"),Zs=function(i,t){return t.has(i)||t.set(i,Symbol()),t.get(i)},Wr=function(i){return typeof i=="symbol"?Zs(i,Js.VALUE):Symbol.for(i)},tn=function(i){return typeof i=="symbol"?Zs(i,Js.META):Symbol.for("#"+i+"__")},en=function(i){return typeof i=="symbol"?Zs(i,Js.REF):Symbol.for("~"+i)},x=function(i,t){return k&&_.add(i[G]),t},q=function(i,t){return i[G].invalidated(0),t},ne=function(i,t,e){let r=i[G];return r||(r=i[G]=new ze(v.OBJECT),Object.defineProperties(i,e)),t&&r.addSubscriber(t),i},rn=function(i,t){let e=i[G];return e&&e.removeSubscriber(t),i},Ds=class{constructor(t){this.changes=new Map,this.cleanup(),t&&this.reset(t)}reset(t=[]){return this.array=t,this.initialLength=t.length}cleanup(){return this.idx=0,this.array=null,this.changes.clear(),this.dirty=!1}push(t){if(this.initialLength==0){this.array.indexOf(t)<0&&(this.changes.set(t,1),this.array.push(t),this.idx++);return}let e=this.array[this.idx];if(e===t)return++this.idx;{let r=this.array.indexOf(t),s=this.changes.get(t);if(r===-1)this.array.splice(this.idx,0,t),this.changes.set(t,1),this.idx++;else if(r===this.idx+1)e&&this.changes.set(e,-1),this.array.splice(this.idx,1),++this.idx;else{if(r<this.idx)return;r>this.idx&&this.array.splice(r,1),this.array.splice(this.idx,0,t)}if(s==-1)return this.changes.delete(t)}}end(){if(this.array.length>=this.idx)for(;this.array.length>this.idx;)this.changes.set(this.array.pop(),-1);return this.array}patch(){return this.end()}};function sn(i){var t,e;let r=Object.getOwnPropertyDescriptors(i.prototype);return t=r.name,delete r.name,e=r.constructor,delete r.constructor,r}function ac(){if(ih!=!0&&(ih=!0,!0))return ii.on("inited",function(i){let t=i[hh];if(t){let e=i instanceof w,r=i[G]||(i[G]={});for(let s=0,n=Object.keys(t),o=n.length,l,h;s<o;s++){l=n[s],h=t[l];let a=r[l]=new At(i[l],i,h);e||a.call()}e&&(A(i,"mount",function(){var s;s=[];for(let n=0,o=J(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof At&&h.activate())}return s}),A(i,"unmount",function(){var s;s=[];for(let n=0,o=J(Object.values(r)),l=o.length;n<l;n++){let h=o[n];s.push(h instanceof At&&h.deactivate())}return s}))}})}function uc(i,t=hh){return i.hasOwnProperty(t)||(i[t]=Object.assign({},i[t]||{})),i[t]}var $e=class{constructor(t,e=0){this.depth=e,this.parent=t,this.target=null,this.patcher=new Ds}get activeΦ(){return _==this}get rootΦ(){return this==It}get snapshot(){let t=[],e=this[Kr];for(;e&&e.target;)t.push({depth:e.depth,target:e.target,beacon:e.beacon}),e=e[Kr];return t}reset(t){return this.tracking=!0,this.target=t,this.beacon=t.beacon,this.patcher.reset(t.observing||(t.observing=[])),this}add(t){if(this.tracking&&t)return this.patcher.push(t)}react(t){return It.reactions.add(t)}push(t){return _=this.child.reset(t)}pop(){let t=null;if(this.beacon){t=this.patcher.end();let e=this.patcher.changes;if(e.size)for(let[s,n]of J(e))n===1?s.addSubscriber(this.beacon):s.removeSubscriber(this.beacon)}return this.patcher.cleanup(),this.target=this.beacon=null,_=this.parent,_==It&&It.flush(),t}get child(){return this[Kr]||(this[Kr]=new $e(this,this.depth+1))}get reactions(){return this[je]||(this[je]=new Set)}flush(){if(!this[je])return;let t=this[je];this[je]=null;for(let e of J(t))e.call()}},Hs=class extends $e{add(){return!0}},_=new Hs(null,0),It=_,cc=function(){return _.tracking=!1},ah=function(i,t,e,r,s){let n=i[e],o=i[s];return o||(o=i[s]=new ze(0,r,n,t)),_.add(o,i),n},uh=function(i,t,e,r,s,n){let o=i[e];if(r!=o){i[e]=r;let l=i[n];l&&l.changed(0,r,o)}},ze=class{constructor(t,e,r,s){return this.id=lh++,this.observer=null,this.observers=null,r&&r[Ft]&&r[Ft](this),this}changed(t,e,r){if(hc++,r&&r[Ge]&&r[Ge](this,e),e&&e[Ft]&&e[Ft](this,r),this.observer&&this.observer.invalidated(t+1,this,e,r),this.observers)for(let s=0,n=J(this.observers),o=n.length;s<o;s++)n[s].invalidated(t+1,this,e,r);_==It&&_.flush()}invalidated(t,e){if(this.observer&&this.observer.invalidated(t+1,this),this.observers)for(let r=0,s=J(this.observers),n=s.length;r<n;r++)s[r].invalidated(t+1,this);return t==0&&_==It&&_.flush(),!0}addSubscriber(t){this.observer?(this.observers||(this.observers=[]),this.observers.push(t)):this.observer=t}removeSubscriber(t){if(this.observer==t)return this.observer=null;let e=this.observers,r=e.indexOf(t);r>=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return _.add(this)}};function fc(i){return new ze(null,null,null,i)}var js=class extends Array{push(){return q(this,super.push(...arguments))}pop(){return q(this,super.pop(...arguments))}unshift(){return q(this,super.unshift(...arguments))}shift(){return q(this,super.shift(...arguments))}splice(){return q(this,super.splice(...arguments))}at(){return x(this,super.at(...arguments))}map(){return x(this,super.map(...arguments))}flatMap(){return x(this,super.flatMap(...arguments))}flat(){return x(this,super.flat(...arguments))}filter(){return x(this,super.filter(...arguments))}find(){return x(this,super.find(...arguments))}slice(){return x(this,super.slice(...arguments))}sort(){return x(this,super.sort(...arguments))}get len(){return x(this,this.length)}set len(t){this.length=t,q(this)}toIterable(){return k&&_.add(this[G]),this}[Symbol.iterator](){return x(this,super[Symbol.iterator](...arguments))}},sh=sn(js),Gs=class{get len(){return this.length}set len(t){this.length=t}get[Be](){return ne(this,null,sh)}[Ft](t){return ne(this,t,sh)}[Ge](t){return rn(this,t)}};Qs(Array.prototype,Gs.prototype);var $s=class extends Set{has(){return x(this,super.has(...arguments))}keys(){return x(this,super.keys(...arguments))}values(){return x(this,super.values(...arguments))}entries(){return x(this,super.entries(...arguments))}add(){return q(this,super.add(...arguments))}clear(){return q(this,super.clear(...arguments))}delete(){return q(this,super.delete(...arguments))}},nh=sn($s),zs=class{get[Be](){return ne(this,null,nh)}[Ft](t){return ne(this,t,nh)}[Ge](t){return rn(this,t)}};Qs(Set.prototype,zs.prototype);var Bs=class extends Map{get(){return x(this,super.get(...arguments))}has(){return x(this,super.has(...arguments))}keys(){return x(this,super.keys(...arguments))}values(){return x(this,super.values(...arguments))}entries(){return x(this,super.entries(...arguments))}set(){return q(this,super.set(...arguments))}clear(){return q(this,super.clear(...arguments))}delete(){return q(this,super.delete(...arguments))}},oh=sn(Bs),Us=class{get[Be](){return ne(this,null,oh)}[Ft](t){return ne(this,t,oh)}[Ge](t){return rn(this,t)}};Qs(Map.prototype,Us.prototype);var qs=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=Wr(t),o=en(t),l=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return k?ah(this,t,n,r,o):this[n]},set:function(a){return k||!!this[o]?uh(this,t,n,a,r,o):this[n]=a}},h=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return k?(Object.defineProperty(this,t,l),this[t]):this[n]},set:function(a){return this[n]=a,this[o]=null,Object.defineProperty(this,t,l)}}}},Ks=class{constructor(t=null){this[rh](t)}[rh](t=null){var e;this[qr]=t&&(e=t[qr])!==void 0?e:new Map}for(t){let e=this[qr].get(t);return e||this[qr].set(t,e=[]),e}get(t){let e=this.for(t);return e[G]||e[Be],k&&x(e),e}add(t,e){return this.for(t).push(e)}delete(t,e){let r=this.for(t),s=r.indexOf(e);r.splice(s,1)}},Ys=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new Ks;let s=en(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return k?ah(this,t,e,r,s):this[e]},set:function(l){let h=this[e];if(k||!!this[s]?uh(this,t,e,l,r,s):this[e]=l,h!=l&&(h&&r.index.delete(h,this),l))return r.index.add(l,this)}},o=r.lazyDescriptor={set:function(l){return this[e]=l,l&&r.index.add(l,this),Object.defineProperty(this,t,n),this[s]=null}}}where(t){return this.index.get(t)}},oe=class{constructor(t,e,r){this.observing=null,this.observers=null,this.flags=68,this.target=t,this.func=e,this.vkey=r,this.version=0}get beacon(){return this}addSubscriber(t){this.observer?(this.observers||(this.observers=[]),this.observers.push(t)):this.observer=t}removeSubscriber(t){if(this.observer==t)return this.observer=null;let e=this.observers,r=e.indexOf(this);r>=0&&e.splice(r,1)}invalidated(t,e){if(this.flags|=v.STALE|v.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=J(this.observers),n=s.length;r<n;r++)s[r].invalidated(t,this);return this}}value(){if(k&&_.add(this),(this.flags&v.POSSIBLY_STALE)==0)return this.target[this.vkey];k++,this.flags|=v.RUNNING,_.push(this);let t=this.func.call(this.target);_.pop(this);let e=this.target[this.vkey];return this.target[this.vkey]=t,this.flags&=~(v.STALE|v.POSSIBLY_STALE|v.RUNNING),t!==e&&this.version++,k--,t}},Ws=class{constructor(t,e){this.name=t;let r=en(t),s=Wr(t),n=this.descriptor={enumerable:!1,configurable:!1,get:function(){return this[r].value()}},o=this.lazyDescriptor={enumerable:!1,get:function(){let l=this[r]=new oe(this,e,s);return Object.defineProperty(this,t,n),l.value()}}}},At=class{get beacon(){return this}constructor(t,e,r={}){this.cb=t,this.context=e,this.options=r,this.flags=0,this.id=lh++,this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.observing=[],this.timeout=null}get runningΦ(){return this.flags&v.RUNNING}invalidated(t,e){return e instanceof oe?(this.flags|=v.POSSIBLY_STALE,this.checkComputedValues.add(e)):this.flags|=v.STALE,_.react(this)}activate(){return this.observing=[],this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.call(),this}deactivate(){if(this.timeout&&clearTimeout(this.timeout),this.observing)for(let t=0,e=J(this.observing),r=e.length;t<r;t++)e[t].removeSubscriber(this);return this.observing=this.checkComputedValues=this.cachedComputedVersions=null,this}call(){var t=this;if(k&&console.warn("should not call reaction inside an autorunning context?",It.snapshot),this.flags&v.POSSIBLY_STALE&&(this.flags&v.STALE)==0){let e=!1;for(let r of J(this.checkComputedValues)){let s=this.cachedComputedVersions.get(r);r.value();let n=r.version;if(s!=n){e=!0;break}}if(!e){this.flags&=~v.POSSIBLY_STALE,this.checkComputedValues.clear();return}}if(this.options.delay){clearTimeout(this.timeout);let e=this.options.delay;typeof e!="number"&&(e=1e3),t.timeout=setTimeout(function(){return t.run()},e);return}return t.run()}run(){k++,this.flags|=v.RUNNING;let t=_.push(this),e=this.cb.call(this.context,cc),r=_.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=J(r),o=n.length;s<o;s++){let l=n[s];l instanceof oe&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(v.RUNNING|v.STALE|v.POSSIBLY_STALE),k--,e}dispose(){return this.deactivate(),this.cb=this.context=this.options=null,this}},Xs=class extends At{resolve(t){return this.deactivate(),this.resolved=t}then(...t){var e=this;return this.resolved!==void 0?Promise.resolve(this.resolved).then(...t):(this[Vs]||(this[Vs]=new Promise(function(r){return e.resolve=function(s){return e.deactivate(),e.resolved=s,r(s)}})),this[Vs].then(...t))}run(){k++,this.flags|=v.RUNNING;let t=_.push(this),e=this.cb.call(this.context),r=_.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=J(r),o=n.length;s<o;s++){let l=n[s];l instanceof oe&&this.cachedComputedVersions.set(l,l.version)}return this.flags&=~(v.RUNNING|v.STALE|v.POSSIBLY_STALE),k--,e!=!1&&e!=null&&e!=null&&this.resolve(e),e}},Yr=class{constructor(t,e){this.context=e,this.cb=t}run(t=this.context,e=[]){_.push(this);let r=this.cb.apply(t,e);return _.pop(this),r}};function dc(i,t={}){let e=new At(i,globalThis,t);return e.call(),e}function pc(i,t={}){let e=new Xs(i,globalThis,t);return e.call(),e}function mc(i){return i[Be]}function gc(i){return new Yr(i,globalThis).run()}function yc(i){return i&&i[G]&&i[G].invalidated(0),i}function bc(i){return i&&i[G]&&i[G].reportObserved(),i}function _c(i,t,e){let r=tn(t);return(i[r]=new Ws(t,e.get)).lazyDescriptor}function vc(i,t,e){let r=tn(t),s=Wr(t),n=this[0]||{},o=i[r]=new qs(t,n);return e?(Object.defineProperty(i,s,Object.assign({},e)),o.lazyDescriptor):(Object.defineProperty(i,t,o.lazyDescriptor),null)}function xc(i,t,e){let r=tn(t);return i.constructor[t],(i[r]=new Ys(t,Wr(t))).lazyDescriptor}function Sc(i,t,e){let r=uc(i),s=this[0]||{};return s.flags=v.AUTORUN,ac(),r[t]=s,e}function wc(i,t,e){if(e.value){let r=new Yr(e.value,null);e.value=function(){return r.run(this,arguments)}}return e}function Tc(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var ch=Symbol.for("#__init__");var Xr=Symbol.for("#watchers");function Lc(i,t,e,r,s,n){return i&&i.$accessor instanceof Function?i=i.$accessor(t,e,r,s,n):n[s]=i,i&&!i.$init&&(i.$init=i.$set||function(){return!0}),i}function Nc(i,t,e=[]){return t.prototype?new t(...e):t.apply(i,e)}var Qr=class{constructor(t=null){this[ch](t)}[ch](t=null){var e;this.local=t&&(e=t.local)!==void 0?e:!1,this.session=t&&(e=t.session)!==void 0?e:!1,this.weak=t&&(e=t.weak)!==void 0?e:!1}watch(t){return(this[Xr]||(this[Xr]=[])).push(t)}$get(t,e){return t[e]}$set(t,e,r,s){if(this[Xr]){let n=this.$get(e,r,s);if(n!=t){e[r]=t;for(let o=0,l=Tc(this[Xr]),h=l.length;o<h;o++){let c=l[o].call(e,t,n,this)}}}else e[r]=t}$accessor(t,e,r,s,n){return n[s]=this}};function Cc(){return new Qr}var nn=function(){return!0},Mt=class{constructor(t,e=""){this.store=t||{},this.cache={raw:{},rich:{}},this.ns=e,this.local=t==globalThis.sessionStorage,this.children=new Map}serialize(t,e){return JSON.stringify(t)}deserialize(t,e){return JSON.parse(t)}getItem(t){let e=String(this.ns)+":"+t;if(this.store instanceof Mt)return this.store.getItem(e);if(this.local&&this.cache.rich[e]!=null)return this.cache.rich[e];let r=this.store.getItem(e);if(r!=null)return this.cache.raw[e]==r?this.cache.rich[e]:(this.cache.raw[e]=r,this.cache.rich[e]=this.deserialize(r,e))}setItem(t,e){var r,s;let n=String(this.ns)+":"+t;if(this.store instanceof Mt)return this.store.setItem(n,e);let o=this.cache.rich[n],l=typeof e;if(this.local&&(this.cache.rich[n]=e),o!==e||l=="object"){let h=this.store.getItem(n);if(e==null)return this.store.removeItem(n),r=this.cache.rich[n],delete this.cache.rich[n],s=this.cache.raw[n],delete this.cache.raw[n],C();{let a=this.serialize(e,n);if(this.cache.rich[n]=e,this.cache.raw[n]=a,h!=a)return this.store.setItem(n,a),C()}}}get(t,e,r){return this.getItem(e)}set(t,e,r,s){return this.setItem(e,r),!0}apply(t,e,[r]){let s=this.children.get(r);return s||this.children.set(r,s=new Proxy(nn,new Mt(this,r))),s}deleteProperty(t,e){var r;let s=this.ns+e;return r=this.cache[s],delete this.cache[s],this.store.removeItem(s)}},Oc=new Proxy(nn,new Mt(globalThis.localStorage)),Mc=new Proxy(nn,new Mt(globalThis.sessionStorage));0&&(module.exports={Accessor,CUSTOM_TYPES,Comment,Component,CustomEvent,Document,DocumentFragment,Easer,Element,ElementRoute,ElementRouteTo,Emitter,Event,EventHandler,Fragment,HTMLButtonElement,HTMLElement,HTMLHtmlElement,HTMLInputElement,HTMLLinkElement,HTMLOptionElement,HTMLScriptElement,HTMLSelectElement,HTMLStyleElement,HTMLTextAreaElement,ImbaElement,IntersectionEventDefaults,KeyboardEvent,LazyProxy,Location,MouseEvent,Node,PointerEvent,RenderContext,Router,SVGElement,SVGSVGElement,Scheduler,ShadowRoot,StyleDeclaration,Text,UIEvent,Window,accessor,autorun,awaits,clearInterval,clearTimeout,colors,commit,createAtom,createComment,createComponent,createDynamic,createElement,createFragment,createIndexedList,createKeyedList,createLiveFragment,createRenderContext,createSVGElement,createSlot,createTextNode,customElements,defineTag,descriptor,document,emit,events,getDeepPropertyDescriptor,getRenderContext,getSuperTagType,getTagType,get_document,hooks,hotkeys,hydrate,listen,locals,mount,observable,once,parseTime,proxy,render,renderContext,renderer,reportChanged,reportObserved,router,run,scheduler,serve,session,setInterval,setTimeout,styles,toCamelCase,transitions,unlisten,unmount,use_dom_bind,use_dom_teleport,use_dom_transitions,use_events,use_events_hotkey,use_events_intersect,use_events_keyboard,use_events_mouse,use_events_pointer,use_events_resize,use_events_selection,use_events_touch,use_hooks,use_router,use_slots,use_styles,use_window,αaction,αautorun,αcomputed,αlazy,αobservable,αprop,αref});