/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/mol_jsx_lib@0.0.1594/web.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
#!/usr/bin/env node
"use strict";function require(t){return $node[t]}var $node=$node||{};(function(t){var e;t.exports=this;Error.stackTraceLimit=50,e||(e={}),t.exports=e,$node["../mam.ts"]=$node["../mam.ts"]=t.exports}).call({},{});var $,__decorate=this&&this.__decorate||function(t,e,o,r){var n,s=arguments.length,i=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,r);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(i=(s<3?n(i):s>3?n(e,o,i):n(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i};($="object"==typeof module?module.exports=globalThis:globalThis).$$=$,$||($={}),function(t){t.$mol_dom_context=self}($||($={})),function(t){t.$mol_fail=function(t){throw t}}($||($={})),function(t){const e=new WeakSet;t.$mol_func_name=function(t){let o=t.name;if(o?.length>1)return o;if(e.has(t))return o;for(let e in this)try{if(this[e]!==t)continue;o=e,Object.defineProperty(t,"name",{value:o});break}catch{}return e.add(t),o},t.$mol_func_name_from=function(t,e){return Object.defineProperty(t,"name",{value:e.name}),t}}($||($={})),function(t){t.$mol_dom=$mol_dom_context}($||($={})),function(t){t.$mol_dom_render_children=function(t,e){const o=new Set(e);let r=t.firstChild;for(let n of e)if(null!=n)if(n instanceof $mol_dom_context.Node)for(;;){if(!r){t.appendChild(n);break}if(r==n){r=r.nextSibling;break}if(o.has(r)){t.insertBefore(n,r);break}{const e=r.nextSibling;t.removeChild(r),r=e}}else if(r&&"#text"===r.nodeName){const t=String(n);r.nodeValue!==t&&(r.nodeValue=t),r=r.nextSibling}else{const e=$mol_dom_context.document.createTextNode(String(n));t.insertBefore(e,r)}for(;r;){const e=r;r=e.nextSibling,t.removeChild(e)}}}($||($={})),function(t){t.$mol_jsx_prefix="",t.$mol_jsx_crumbs="",t.$mol_jsx_booked=null,t.$mol_jsx_document={getElementById:()=>null,createElementNS:(t,e)=>$mol_dom_context.document.createElementNS(t,e),createDocumentFragment:()=>$mol_dom_context.document.createDocumentFragment()},t.$mol_jsx_frag="",t.$mol_jsx=function(e,o,...r){const n=o&&o.id||"",s=n?t.$mol_jsx_prefix?t.$mol_jsx_prefix+"/"+n:n:t.$mol_jsx_prefix,i=n?t.$mol_jsx_crumbs.replace(/(\S+)/g,`$1_${n.replace(/\/.*/i,"")}`):t.$mol_jsx_crumbs;e&&t.$mol_jsx_booked&&(t.$mol_jsx_booked.has(n)?$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(s)}`)):t.$mol_jsx_booked.add(n));let l=s?t.$mol_jsx_document.getElementById(s):null;if(t.$mol_jsx_prefix){const e=t.$mol_jsx_prefix,r=t.$mol_jsx_booked,n=t.$mol_jsx_crumbs;for(const s in o){const i=o[s];if("function"!=typeof i)continue;const l=function(...o){const s=t.$mol_jsx_prefix,l=t.$mol_jsx_booked,c=t.$mol_jsx_crumbs;try{return t.$mol_jsx_prefix=e,t.$mol_jsx_booked=r,t.$mol_jsx_crumbs=n,i.call(this,...o)}finally{t.$mol_jsx_prefix=s,t.$mol_jsx_booked=l,t.$mol_jsx_crumbs=c}};$mol_func_name_from(l,i),o[s]=l}}if("string"!=typeof e){if("prototype"in e){const n=l&&l[String(e)]||new e;return Object.assign(n,o),n[Symbol.toStringTag]=s,n.childNodes=r,n.ownerDocument||(n.ownerDocument=t.$mol_jsx_document),n.className=(i?i+" ":"")+(e.name||e),l=n.valueOf(),l[String(e)]=n,l}{const n=t.$mol_jsx_prefix,l=t.$mol_jsx_booked,c=t.$mol_jsx_crumbs;try{return t.$mol_jsx_prefix=s,t.$mol_jsx_booked=new Set,t.$mol_jsx_crumbs=(i?i+" ":"")+(e.name||e),e(o,...r)}finally{t.$mol_jsx_prefix=n,t.$mol_jsx_booked=l,t.$mol_jsx_crumbs=c}}}if(l||(l=e?t.$mol_jsx_document.createElementNS(o?.xmlns??"http://www.w3.org/1999/xhtml",e):t.$mol_jsx_document.createDocumentFragment()),$mol_dom_render_children(l,[].concat(...r)),!e)return l;s&&(l.id=s);for(const t in o)if("id"!==t)if("string"==typeof o[t])"string"==typeof l[t]&&(l[t]=o[t]),l.setAttribute(t,o[t]);else if(o[t]&&"object"==typeof o[t]&&Reflect.getPrototypeOf(o[t])===Reflect.getPrototypeOf({})){if("object"==typeof l[t]){Object.assign(l[t],o[t]);continue}}else l[t]=o[t];return t.$mol_jsx_crumbs&&(l.className=(o?.class?o.class+" ":"")+i),l}}($||($={})),function(t){t.$mol_jsx_attach=function(t,e){const o=$mol_jsx_document;try{return $mol_jsx_document=t,e()}finally{$mol_jsx_document=o}}}($||($={})),function(t){t.$mol_ambient_ref=Symbol("$mol_ambient_ref"),t.$mol_ambient=function(e){return Object.setPrototypeOf(e,this||t)}}($||($={})),function(t){const e=new WeakSet;function o(t,o){const r=new Proxy(t,{get:(t,e)=>{const r=o();let n=Reflect.get(r,e);return"function"==typeof n&&(n=n.bind(r)),n},has:(t,e)=>Reflect.has(o(),e),set:(t,e,r)=>Reflect.set(o(),e,r),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(o(),e),ownKeys:()=>Reflect.ownKeys(o()),getPrototypeOf:()=>Reflect.getPrototypeOf(o()),setPrototypeOf:(t,e)=>Reflect.setPrototypeOf(o(),e),isExtensible:()=>Reflect.isExtensible(o()),preventExtensions:()=>Reflect.preventExtensions(o()),apply:(t,e,r)=>Reflect.apply(o(),e,r),construct:(t,e,r)=>Reflect.construct(o(),e,r),defineProperty:(t,e,r)=>Reflect.defineProperty(o(),e,r),deleteProperty:(t,e)=>Reflect.deleteProperty(o(),e)});return e.add(r),r}t.$mol_delegate=o,Reflect.defineProperty(o,Symbol.hasInstance,{value:t=>e.has(t)})}($||($={})),function(t){function e(t){try{return!!t&&(("object"==typeof t||"function"==typeof t)&&(!(t instanceof $mol_delegate)&&"function"==typeof t.destructor))}catch{return!1}}t.$mol_owning_map=new WeakMap,t.$mol_owning_allow=e,t.$mol_owning_get=function(o,r){if(!e(o))return null;for(;;){const e=t.$mol_owning_map.get(o);if(!e)return e;if(!r)return e;if(e instanceof r)return e;o=e}},t.$mol_owning_check=function(o,r){return!!e(r)&&t.$mol_owning_map.get(r)===o},t.$mol_owning_catch=function(o,r){return!!e(r)&&(!t.$mol_owning_map.get(r)&&(t.$mol_owning_map.set(r,o),!0))}}($||($={})),function(t){t.$mol_fail_hidden=function(t){throw t}}($||($={})),function(t){t.$mol_key_handle=Symbol.for("$mol_key_handle"),t.$mol_key_store=new WeakMap}($||($={})),function(t){Symbol.dispose||(Symbol.dispose=Symbol("Symbol.dispose"));class e{static $=t;[Symbol.toStringTag];[$mol_ambient_ref]=null;get $(){if(this[$mol_ambient_ref])return this[$mol_ambient_ref];const t=$mol_owning_get(this);return this[$mol_ambient_ref]=t?.$||this.constructor.$||e.$}set $(t){this[$mol_ambient_ref]&&$mol_fail_hidden(new Error("Context already defined")),this[$mol_ambient_ref]=t}static create(t){const e=new this;return t&&t(e),e}static[Symbol.toPrimitive](){return this.toString()}static toString(){return this[Symbol.toStringTag]||this.$.$mol_func_name(this)}static toJSON(){return this.toString()}static[$mol_key_handle](){return this.toString()}destructor(){}static destructor(){}[Symbol.dispose](){this.destructor()}toString(){return this[Symbol.toStringTag]||this.constructor.name+"<>"}}t.$mol_object2=e}($||($={})),function(t){t.$mol_guid=function(t=8,e=()=>!1){for(;;){let o=Math.random().toString(36).substring(2,t+2).toUpperCase();if(!e(o))return o}}}($||($={})),function(t){let e;!function(t){t[t.stale=-1]="stale",t[t.doubt=-2]="doubt",t[t.fresh=-3]="fresh",t[t.final=-4]="final"}(e=t.$mol_wire_cursor||(t.$mol_wire_cursor={}))}($||($={})),function(t){class e extends Object{constructor(t=`$mol_wire_pub:${$mol_guid()}`){super(),this[Symbol.toStringTag]=t}[Symbol.toStringTag];data=[];static get[Symbol.species](){return Array}sub_from=0;get sub_list(){const t=[];for(let e=this.sub_from;e<this.data.length;e+=2)t.push(this.data[e]);return t}get sub_empty(){return this.sub_from===this.data.length}sub_on(t,e){const o=this.data.length;return this.data.push(t,e),o}sub_off(t){t<this.data.length||$mol_fail(new Error(`Wrong pos ${t}`));const e=this.data.length-2;t!==e&&this.peer_move(e,t),this.data.length=e,e===this.sub_from&&this.reap()}reap(){}promote(){$mol_wire_auto()?.track_next(this)}fresh(){}complete(){}get incompleted(){return!1}emit(t=$mol_wire_cursor.stale){for(let e=this.sub_from;e<this.data.length;e+=2)this.data[e].absorb(t,this.data[e+1])}peer_move(t,e){const o=this.data[t],r=this.data[t+1];this.data[e]=o,this.data[e+1]=r,o.peer_repos(r,e)}peer_repos(t,e){this.data[t+1]=e}}t.$mol_wire_pub=e}($||($={})),function(t){t.$mol_wire_auto_sub=null,t.$mol_wire_auto=function(e=t.$mol_wire_auto_sub){return t.$mol_wire_auto_sub=e},t.$mol_wire_affected=[]}($||($={})),function(t){function e(e){t.devtoolsFormatters.push(e)}function o(e){return void 0===e?t.$mol_dev_format_shade("undefined"):["object",{object:e,config:!0}]}function r(e){return null==e?t.$mol_dev_format_shade(String(e)):["object",{object:e,config:!1}]}function n(t,e,...o){const r=[];for(let t in e)r.push(`${t} : ${e[t]}`);return[t,{style:r.join(" ; ")},...o]}t.devtoolsFormatters||=[],t.$mol_dev_format_register=e,t.$mol_dev_format_head=Symbol("$mol_dev_format_head"),t.$mol_dev_format_body=Symbol("$mol_dev_format_body"),e({header:(e,n=!1)=>{if(n)return null;if(!e)return null;if(t.$mol_dev_format_head in e)try{return e[t.$mol_dev_format_head]()}catch(r){return t.$mol_dev_format_accent(o(e),"💨",o(r),"")}return"function"==typeof e?o(e):e instanceof Error?t.$mol_dev_format_span({},o(e)," ",(s="throw",i=()=>$mol_fail_hidden(e),r({[t.$mol_dev_format_head]:()=>t.$mol_dev_format_span({color:"cornflowerblue"},s),[t.$mol_dev_format_body]:()=>(Promise.resolve().then(i),t.$mol_dev_format_span({}))}))):e instanceof Promise?t.$mol_dev_format_shade(o(e)," ",e[Symbol.toStringTag]??""):Symbol.toStringTag in e?o(e):null;var s,i},hasBody:(e,o=!1)=>!o&&(!!e&&!!e[t.$mol_dev_format_body]),body:(e,r=!1)=>{if(r)return null;if(!e)return null;if(t.$mol_dev_format_body in e)try{return e[t.$mol_dev_format_body]()}catch(r){return t.$mol_dev_format_accent(o(e),"💨",o(r),"")}return null}}),t.$mol_dev_format_native=o,t.$mol_dev_format_auto=r,t.$mol_dev_format_element=n,t.$mol_dev_format_span=n.bind(null,"span"),t.$mol_dev_format_div=n.bind(null,"div"),t.$mol_dev_format_ol=n.bind(null,"ol"),t.$mol_dev_format_li=n.bind(null,"li"),t.$mol_dev_format_table=n.bind(null,"table"),t.$mol_dev_format_tr=n.bind(null,"tr"),t.$mol_dev_format_td=n.bind(null,"td"),t.$mol_dev_format_accent=t.$mol_dev_format_span.bind(null,{color:"magenta"}),t.$mol_dev_format_strong=t.$mol_dev_format_span.bind(null,{"font-weight":"bold"}),t.$mol_dev_format_string=t.$mol_dev_format_span.bind(null,{color:"green"}),t.$mol_dev_format_shade=t.$mol_dev_format_span.bind(null,{color:"gray"}),t.$mol_dev_format_indent=t.$mol_dev_format_div.bind(null,{"margin-left":"13px"});class s extends Array{toString(){return this.join("\n")}}class i extends Object{type;function;method;eval;source;offset;pos;object;flags;[Symbol.toStringTag];constructor(t){super(),this.type=t.getTypeName()??"",this.function=t.getFunctionName()??"",this.method=t.getMethodName()??"",this.method===this.function&&(this.method=""),this.pos=[t.getEnclosingLineNumber()??0,t.getEnclosingColumnNumber()??0],this.eval=t.getEvalOrigin()??"",this.source=t.getScriptNameOrSourceURL()??"",this.object=t.getThis(),this.offset=t.getPosition();const e=[];t.isAsync()&&e.push("async"),t.isConstructor()&&e.push("constructor"),t.isEval()&&e.push("eval"),t.isNative()&&e.push("native"),t.isPromiseAll()&&e.push("PromiseAll"),t.isToplevel()&&e.push("top"),this.flags=e;const o=this.type?this.type+".":"",r=this.function||"<anon>",n=this.method?" ["+this.method+"] ":"";this[Symbol.toStringTag]=`${o}${r}${n}`}[Symbol.toPrimitive](){return this.toString()}toString(){return`\tat ${this.object||""}${this[Symbol.toStringTag]} (${`${this.source}:${this.pos.join(":")} #${this.offset}`})`}[t.$mol_dev_format_head](){return t.$mol_dev_format_div({},o(this),t.$mol_dev_format_shade(" "),...this.object?[o(this.object)]:[],...this.method?[t.$mol_dev_format_shade(" "," [",this.method,"]")]:[],t.$mol_dev_format_shade(" ",this.flags.join(", ")))}}Error.prepareStackTrace??=(t,e)=>new s(...e.map((t=>new i(t))))}($||($={})),function(t){t.$mol_const=function(t){const e=()=>t;return e["()"]=t,e[Symbol.toStringTag]=t,e[$mol_dev_format_head]=()=>$mol_dev_format_span({},"()=> ",$mol_dev_format_auto(t)),e}}($||($={})),function(t){class e extends $mol_wire_pub{pub_from=0;cursor=$mol_wire_cursor.stale;get temp(){return!1}get pub_list(){const t=[],e=this.cursor>=0?this.cursor:this.sub_from;for(let o=this.pub_from;o<e;o+=2)this.data[o]&&t.push(this.data[o]);return t}track_on(){this.cursor=this.pub_from;const t=$mol_wire_auto();return $mol_wire_auto(this),t}promote(){this.cursor>=this.pub_from&&$mol_fail(new Error("Circular subscription")),super.promote()}track_next(t){if(this.cursor<0&&$mol_fail(new Error("Promo to non begun sub")),this.cursor<this.sub_from){const e=this.data[this.cursor];if(void 0===t)return e??null;if(e===t)return this.cursor+=2,e;e&&(this.sub_from<this.data.length&&this.peer_move(this.sub_from,this.data.length),this.peer_move(this.cursor,this.sub_from),this.sub_from+=2)}else{if(void 0===t)return null;this.sub_from<this.data.length&&this.peer_move(this.sub_from,this.data.length),this.sub_from+=2}return this.data[this.cursor]=t,this.data[this.cursor+1]=t.sub_on(this,this.cursor),this.cursor+=2,t}track_off(t){$mol_wire_auto(t),this.cursor<0&&$mol_fail(new Error("End of non begun sub"));for(let t=this.pub_from;t<this.cursor;t+=2){this.data[t].fresh()}this.cursor=$mol_wire_cursor.fresh}pub_off(t){this.data[t]=void 0,this.data[t+1]=void 0}destructor(){for(let t=this.data.length-2;t>=this.sub_from;t-=2){const e=this.data[t],o=this.data[t+1];e.pub_off(o)}this.data.length=this.sub_from,this.cursor=this.pub_from,this.track_cut(),this.cursor=$mol_wire_cursor.stale}track_cut(){this.cursor<this.pub_from&&$mol_fail(new Error("Cut of non begun sub"));let t=this.data.length;for(let e=this.cursor;e<this.sub_from;e+=2){const o=this.data[e];o?.sub_off(this.data[e+1]),t-=2,this.sub_from<=t&&this.peer_move(t,e)}this.data.length=t,this.sub_from=this.cursor}complete(){}complete_pubs(){const t=this.cursor<0?this.sub_from:this.cursor;for(let e=this.pub_from;e<t;e+=2){const t=this.data[e];if(t?.incompleted)return}for(let e=this.pub_from;e<t;e+=2){const t=this.data[e];t?.complete()}}absorb(t=$mol_wire_cursor.stale,e=-1){this.cursor!==$mol_wire_cursor.final&&(this.cursor>=t||(this.cursor=t,this.emit($mol_wire_cursor.doubt)))}[$mol_dev_format_head](){return $mol_dev_format_native(this)}get pub_empty(){return this.sub_from===this.pub_from}}t.$mol_wire_pub_sub=e}($||($={})),function(t){class e extends $mol_object2{task;static promise=null;cancelled=!1;constructor(t){super(),this.task=t,e.promise||(e.promise=Promise.resolve().then((()=>{e.promise=null}))),e.promise.then((()=>{this.cancelled||t()}))}destructor(){this.cancelled=!0}}t.$mol_after_tick=e}($||($={})),function(t){t.$mol_promise_like=function(t){try{return t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then}catch{return!1}}}($||($={})),function(t){const e=new WeakMap;class o extends $mol_wire_pub_sub{task;host;static warm=!0;static planning=new Set;static reaping=new Set;static plan_task=null;static plan(){this.plan_task||(this.plan_task=new $mol_after_tick((()=>{try{this.sync()}finally{o.plan_task=null}})))}static sync(){for(;this.planning.size;)for(const t of this.planning)this.planning.delete(t),t.cursor>=0||t.cursor!==$mol_wire_cursor.final&&t.fresh();for(;this.reaping.size;){const t=this.reaping;this.reaping=new Set;for(const e of t)e.sub_empty&&e.destructor()}}cache=void 0;get args(){return this.data.slice(0,this.pub_from)}result(){if(!($mol_promise_like(this.cache)||this.cache instanceof Error))return this.cache}get incompleted(){return $mol_promise_like(this.cache)}field(){return this.task.name+"()"}constructor(t,e,o,r){super(t),this.task=e,this.host=o,r&&this.data.push(...r),this.pub_from=this.sub_from=r?.length??0}plan(){return o.planning.add(this),o.plan(),this}reap(){o.reaping.add(this),o.plan()}toString(){return this[Symbol.toStringTag]}toJSON(){return this[Symbol.toStringTag]}[$mol_dev_format_head](){const t={[$mol_wire_cursor.stale]:"🔴",[$mol_wire_cursor.doubt]:"🟡",[$mol_wire_cursor.fresh]:"🟢",[$mol_wire_cursor.final]:"🔵"}[this.cursor]??this.cursor.toString();return $mol_dev_format_div({},$mol_owning_check(this,this.cache)?$mol_dev_format_shade(t):$mol_dev_format_shade(this[Symbol.toStringTag],t),$mol_dev_format_auto(this.cache))}[$mol_dev_format_body](){return null}get $(){return(this.host??this.task).$}emit(t=$mol_wire_cursor.stale){this.sub_empty?this.plan():super.emit(t)}fresh(){if(this.cursor===$mol_wire_cursor.fresh)return;if(this.cursor===$mol_wire_cursor.final)return;t:if(this.cursor===$mol_wire_cursor.doubt){for(let t=this.pub_from;t<this.sub_from;t+=2)if(this.data[t]?.fresh(),this.cursor!==$mol_wire_cursor.doubt)break t;return void(this.cursor=$mol_wire_cursor.fresh)}const t=this.track_on();let o;try{switch(this.pub_from){case 0:o=this.task.call(this.host);break;case 1:o=this.task.call(this.host,this.data[0]);break;default:o=this.task.call(this.host,...this.args)}if($mol_promise_like(o))if(e.has(o))o=e.get(o).then((t=>t));else{const t=t=>(this.cache===o&&this.put(t),t);e.set(o,o=Object.assign(o.then(t,t),{destructor:o.destructor||(()=>{})})),e.set(o,o);const r=new Error(`Promise in ${this}`);Object.defineProperty(o,"stack",{get:()=>r.stack})}}catch(t){if(o=t instanceof Error||$mol_promise_like(t)?t:new Error(String(t),{cause:t}),$mol_promise_like(o))if(e.has(o))o=e.get(o);else{const t=t=>(this.cache===o&&this.absorb(),t);e.set(o,o=Object.assign(o.then(t,t),{destructor:o.destructor||(()=>{})}));const r=new Error(`Promise in ${this}`);Object.defineProperty(o,"stack",{get:()=>r.stack})}}return $mol_promise_like(o)||this.track_cut(),this.track_off(t),this.put(o),this}refresh(){this.cursor=$mol_wire_cursor.stale,this.fresh()}sync(){return o.warm?(this.promote(),this.fresh(),this.cache instanceof Error||$mol_promise_like(this.cache)?$mol_fail_hidden(this.cache):this.cache):this.result()}async async_raw(){for(;;){if(this.fresh(),this.cache instanceof Error&&$mol_fail_hidden(this.cache),!$mol_promise_like(this.cache))return this.cache;if(await Promise.race([this.cache,this.step()]),!$mol_promise_like(this.cache))return this.cache;this.cursor===$mol_wire_cursor.final&&await new Promise((()=>{}))}}async(){const t=this.async_raw();return t.destructor||(t.destructor=()=>this.destructor()),t}step(){return new Promise((t=>{const e=new $mol_wire_pub_sub,o=e.track_on();e.track_next(this),e.track_off(o),e.absorb=()=>{t(null),setTimeout((()=>e.destructor()))}}))}destructor(){if(super.destructor(),o.planning.delete(this),$mol_owning_check(this,this.cache))try{this.cache.destructor()}catch(t){if($mol_promise_like(t)){const e=new Error(`Promise in ${this}.destructor()`);Object.defineProperty(t,"stack",{get:()=>e.stack})}$mol_fail_hidden(t)}}}t.$mol_wire_fiber=o}($||($={})),function(t){const e=Object.getPrototypeOf(Uint8Array);t.$mol_key=function t(o){if("bigint"==typeof o)return o.toString()+"n";if("symbol"==typeof o)return`Symbol(${o.description})`;if(!o)return JSON.stringify(o);if("object"!=typeof o&&"function"!=typeof o)return JSON.stringify(o);{let t=$mol_key_store.get(o);if(t)return t}if(o instanceof e)return`${o[Symbol.toStringTag]}([${[...o].map((e=>t(e)))}])`;if(Array.isArray(o))return`[${o.map((e=>t(e)))}]`;if(o instanceof RegExp)return o.toString();if(o instanceof Date)return`Date(${o.valueOf()})`;{const e=Reflect.getPrototypeOf(o);if(!e||!Reflect.getPrototypeOf(e))return`{${Object.entries(o).map((([e,o])=>JSON.stringify(e)+":"+t(o)))}}`}if($mol_key_handle in o)return o[$mol_key_handle]();{const t=JSON.stringify("#"+$mol_guid());return $mol_key_store.set(o,t),t}}}($||($={})),function(t){class e extends $mol_object2{task;static _promise=null;static get promise(){return this._promise?this._promise:this._promise=new Promise((t=>{const e=()=>{this._promise=null,t()};"function"==typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e,16)}))}cancelled=!1;promise;constructor(t){super(),this.task=t,this.promise=e.promise.then((()=>{this.cancelled||t()}))}destructor(){this.cancelled=!0}}t.$mol_after_frame=e}($||($={})),function(t){function e(i,l){if(Object.is(i,l))return!0;if(null===i)return!1;if(null===l)return!1;if("object"!=typeof i)return!1;if("object"!=typeof l)return!1;const c=Reflect.getPrototypeOf(i);if(c!==Reflect.getPrototypeOf(l))return!1;if(i instanceof Boolean)return Object.is(i.valueOf(),l.valueOf());if(i instanceof Number)return Object.is(i.valueOf(),l.valueOf());if(i instanceof String)return Object.is(i.valueOf(),l.valueOf());if(i instanceof Date)return Object.is(i.valueOf(),l.valueOf());if(i instanceof RegExp)return i.source===l.source&&i.flags===l.flags;if(i instanceof Error)return i.message===l.message&&e(i.stack,l.stack);let a,_=t.$mol_compare_deep_cache.get(i);if(_){const t=_.get(l);if("boolean"==typeof t)return t}else _=new WeakMap,t.$mol_compare_deep_cache.set(i,_);_.set(l,!0);try{a=c&&Reflect.getPrototypeOf(c)?Symbol.toPrimitive in i?function(t,e){return Object.is(t[Symbol.toPrimitive]("default"),e[Symbol.toPrimitive]("default"))}(i,l):Array.isArray(i)?o(i,l):i instanceof Set?function(t,e){return t.size===e.size&&n(t.values(),e.values())}(i,l):i instanceof Map?function(t,e){return t.size===e.size&&(n(t.keys(),e.keys())&&n(t.values(),e.values()))}(i,l):ArrayBuffer.isView(i)?r(i,l):Symbol.iterator in i&&n(i[Symbol.iterator](),l[Symbol.iterator]()):s(i,l)}finally{_.set(l,a)}return a}function o(t,o){const r=t.length;if(r!==o.length)return!1;for(let n=0;n<r;++n)if(!e(t[n],o[n]))return!1;return!0}function r(t,e){const o=t.byteLength;if(o!==e.byteLength)return!1;if(t instanceof DataView)return r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength));for(let r=0;r<o;++r)if(t[r]!==e[r])return!1;return!0}function n(t,o){for(;;){const r=t.next(),n=o.next();if(r.done!==n.done)return!1;if(r.done)break;if(!e(r.value,n.value))return!1}return!0}function s(t,r){const n=Object.getOwnPropertyNames(t);if(!o(n,Object.getOwnPropertyNames(r)))return!1;for(let o of n)if(!e(t[o],r[o]))return!1;const s=Object.getOwnPropertySymbols(t);if(!o(s,Object.getOwnPropertySymbols(r)))return!1;for(let o of s)if(!e(t[o],r[o]))return!1;return!0}t.$mol_compare_deep_cache=new WeakMap,t.$mol_compare_deep=e}($||($={})),function(t){t.$mol_log3_area_lazy=function(t){const e=this.$,o=e.$mol_log3_stack,r=o.length;let n=!1;return o.push((()=>{n=!0,e.$mol_log3_area.call(e,t)})),()=>{n&&e.console.groupEnd(),o.length>r&&(o.length=r)}},t.$mol_log3_stack=[]}($||($={})),function(t){function e(t,e){return function(o){const r=this.$mol_log3_stack.pop();r&&r();let n="%c";const s=Object.entries(o);for(let t=0;t<s.length;++t)n+="string"==typeof s[t][1]?"%s: %s\n":"%s: %o\n";const i=`color:${e};font-weight:bolder`;this.console[t](n.trim(),i,...[].concat(...s));const l=this;return()=>l.console.groupEnd()}}t.$mol_log3_web_make=e,t.$mol_log3_come=e("info","royalblue"),t.$mol_log3_done=e("info","forestgreen"),t.$mol_log3_fail=e("error","orangered"),t.$mol_log3_warn=e("warn","goldenrod"),t.$mol_log3_rise=e("log","magenta"),t.$mol_log3_area=e("group","cyan")}($||($={})),function(t){class e extends $mol_wire_fiber{static getter(t){return function(o,r){const n=$mol_wire_auto(),s=n?.track_next();let i="";t:if(s){if(!s.temp)break t;if(s.task!==t){i="task";break t}if(s.host!==o){i="host";break t}if(!$mol_compare_deep(s.args,r)){i="args";break t}return s}const l=(o?.[Symbol.toStringTag]??o)+"."+t.name+"<#>",c=new e(l,t,o,r);return s?.temp&&$$.$mol_log3_warn({place:"$mol_wire_task",message:`Different ${i} on restart`,sub:n,prev:s,next:c,hint:"Maybe required additional memoization"}),c}}get temp(){return!0}complete(){$mol_promise_like(this.cache)||this.destructor()}put(t){const e=this.cache;if(this.cache=t,$mol_promise_like(t)){if(this.cursor=$mol_wire_cursor.fresh,t!==e&&this.emit(),$mol_owning_catch(this,t))try{t[Symbol.toStringTag]=this[Symbol.toStringTag]}catch{Object.defineProperty(t,Symbol.toStringTag,{value:this[Symbol.toStringTag]})}return t}return this.cursor=$mol_wire_cursor.final,this.sub_empty?this.destructor():t!==e&&this.emit(),t}destructor(){super.destructor(),this.cursor=$mol_wire_cursor.final}}t.$mol_wire_task=e}($||($={})),function(t){t.$mol_wire_method=function(t,e,o){o||(o=Reflect.getOwnPropertyDescriptor(t,e));const r=o?.value??t[e],n=Reflect.getPrototypeOf(t);"function"==typeof n[e]&&Object.defineProperty(r,"name",{value:n[e].name});const s=$mol_wire_task.getter(r),i=function(...t){return s(this??null,t).sync()};Object.defineProperty(i,"name",{value:r.name+" "}),Object.assign(i,{orig:r});const l={...o,value:i};return Reflect.defineProperty(t,e,l),l}}($||($={})),function(t){const e=new WeakSet;t.$mol_fail_catch=function(t){return"object"==typeof t&&($mol_promise_like(t)&&$mol_fail_hidden(t),!e.has(t)&&(e.add(t),!0))}}($||($={})),function(t){t.$mol_try=function(t){try{return t()}catch(t){return console.error(t),t}}}($||($={})),function(t){let e,o,r;function n(t){r=t,e=void 0,o=void 0,window.dispatchEvent(new Event("$mol_try"));const n=e,s=o;return e=void 0,o=void 0,n||s}t.$mol_try_web=n,t.$mol_try=n,self.addEventListener("$mol_try",(t=>{o=r()}),!0),self.addEventListener("error",(t=>{e=t.error}),!0)}($||($={})),function(t){t.$mol_fail_log=function(t){return!$mol_promise_like(t)&&(!!$mol_fail_catch(t)&&($mol_try((()=>{$mol_fail_hidden(t)})),!0))}}($||($={})),function(t){class e extends $mol_wire_fiber{static solo(t,o){const r=o.name+"()",n=Object.getOwnPropertyDescriptor(t??o,r)?.value;if(n)return n;const s=(t?.[Symbol.toStringTag]??(t instanceof Function?$$.$mol_func_name(t):t))+"."+o.name+"<>",i=new e(s,o,t,[]);return(t??o)[r]=i,i}static plex(t,o,r){const n=o.name+"()";let s=Object.getOwnPropertyDescriptor(t??o,n)?.value;const i=t?.[Symbol.toStringTag]??(t instanceof Function?$$.$mol_func_name(t):t),l=$mol_key(r);if(s){const t=s.get(l);if(t)return t}else s=(t??o)[n]=new Map;const c=i+"."+o.name+"<"+l.replace(/^"|"$/g,"'")+">",a=new e(c,o,t,[r]);return s.set(l,a),a}static watching=new Set;static watcher=null;static watch(){e.watcher=new $mol_after_frame(e.watch);for(const t of e.watching)t.cursor===$mol_wire_cursor.final?e.watching.delete(t):(t.cursor=$mol_wire_cursor.stale,t.fresh())}watch(){e.watcher||(e.watcher=new $mol_after_frame(e.watch)),e.watching.add(this)}resync(t){for(let t=this.pub_from;t<this.sub_from;t+=2){const e=this.data[t];e&&e instanceof $mol_wire_task&&e.destructor()}return this.put(this.task.call(this.host,...t))}once(){return this.sync()}channel(){return Object.assign((t=>void 0!==t?this.resync([...this.args,t]):$mol_wire_fiber.warm?$mol_wire_auto()?.temp?this.once():this.sync():this.result()),{atom:this})}destructor(){if(super.destructor(),0===this.pub_from)(this.host??this.task)[this.field()]=null;else{const t=$mol_key(this.args[0]),e=(this.host??this.task)[this.field()];e.has(t)||this.$.$mol_log3_warn({place:this,message:"Absent key on destruction",hint:"Check for $mol_key(key) is not changed"}),e.delete(t)}}put(t){const e=this.cache;t:if(t!==e){try{if($mol_compare_deep(e,t))break t}catch(t){$mol_fail_log(t)}if($mol_owning_check(this,e)&&e.destructor(),$mol_owning_catch(this,t))try{t[Symbol.toStringTag]=this[Symbol.toStringTag]}catch{Object.defineProperty(t,Symbol.toStringTag,{value:this[Symbol.toStringTag]})}this.sub_empty||this.emit()}return this.cache=t,this.cursor=$mol_wire_cursor.fresh,$mol_promise_like(t)||this.complete_pubs(),t}}__decorate([$mol_wire_method],e.prototype,"resync",null),__decorate([$mol_wire_method],e.prototype,"once",null),t.$mol_wire_atom=e}($||($={})),function(t){t.$mol_wire_field=function(t,e,o){o||(o=Reflect.getOwnPropertyDescriptor(t,e));const r=o?.get||$mol_const(o?.value),n=o?.set||function(t){$mol_wire_atom.solo(this,r).put(t)},s=Reflect.getPrototypeOf(t),i=Reflect.getOwnPropertyDescriptor(s,e);function l(){return $mol_wire_atom.solo(this,r).sync()}Object.defineProperty(r,"name",{value:i?.get?.name??e}),Object.defineProperty(n,"name",{value:i?.set?.name??e});const c=$mol_wire_task.getter(n);function a(t){c(this,[t]).sync()}Object.defineProperty(l,"name",{value:r.name+"$"}),Object.defineProperty(a,"name",{value:n.name+"@"}),Object.assign(l,{orig:r}),Object.assign(a,{orig:n});const{value:_,writable:m,...u}={...o,get:l,set:a};return Reflect.defineProperty(t,e,u),u}}($||($={})),function(t){t.$mol_wire_solo=function(t,e,o){o||(o=Reflect.getOwnPropertyDescriptor(t,e));const r=o?.value??t[e],n=Reflect.getPrototypeOf(t);"function"==typeof n[e]&&Object.defineProperty(r,"name",{value:n[e].name});const s={...o,value:function(...t){let e=$mol_wire_atom.solo(this,r);return 0===t.length||void 0===t[0]?$mol_wire_fiber.warm?$mol_wire_auto()?.temp?e.once():e.sync():e.result():e.resync(t)}};return Reflect.defineProperty(s.value,"name",{value:r.name+" "}),Reflect.defineProperty(s.value,"length",{value:r.length}),Object.assign(s.value,{orig:r}),Reflect.defineProperty(t,e,s),s}}($||($={})),function(t){t.$mol_wire_plex=function(t,e,o){o||(o=Reflect.getOwnPropertyDescriptor(t,e));const r=o?.value??t[e],n=Reflect.getPrototypeOf(t);"function"==typeof n[e]&&Object.defineProperty(r,"name",{value:n[e].name});const s={...o,value:function(...t){let e=$mol_wire_atom.plex(this,r,t[0]);return 1===t.length||void 0===t[1]?$mol_wire_fiber.warm?$mol_wire_auto()?.temp?e.once():e.sync():e.result():e.resync(t)}};return Reflect.defineProperty(s.value,"name",{value:r.name+" "}),Reflect.defineProperty(s.value,"length",{value:r.length}),Object.assign(s.value,{orig:r}),Reflect.defineProperty(t,e,s),s}}($||($={})),function(t){t.$mol_mem=$mol_wire_solo,t.$mol_mem_key=$mol_wire_plex}($||($={})),function(t){class e extends $mol_object2{static of(t){return t[this]}attributes;ownerDocument;className="";get childNodes(){return[]}valueOf(){const t=$mol_jsx_prefix,e=$mol_jsx_booked,o=$mol_jsx_crumbs,r=$mol_jsx_document;try{return $mol_jsx_prefix=this[Symbol.toStringTag],$mol_jsx_booked=new Set,$mol_jsx_crumbs=this.className,$mol_jsx_document=this.ownerDocument,this.render()}finally{$mol_jsx_prefix=t,$mol_jsx_booked=e,$mol_jsx_crumbs=o,$mol_jsx_document=r}}}__decorate([$mol_wire_field],e.prototype,"childNodes",null),__decorate([$mol_mem],e.prototype,"valueOf",null),t.$mol_jsx_view=e}($||($={})),function(t){t.$mol_wire_probe=function(t,e){const o=$mol_wire_fiber.warm;try{$mol_wire_fiber.warm=!1;const o=t();return void 0===o?e:o}finally{$mol_wire_fiber.warm=o}}}($||($={})),function(t){t.$mol_wire_solid=function(){let t=$mol_wire_auto();t.temp&&(t=t.host),t.reap!==e&&t?.sub_on(o,o.data.length),t.reap=e};const e=()=>{},o=new $mol_wire_pub_sub}($||($={})),function(t){t.$mol_wire_watch=function(){const t=$mol_wire_auto();t instanceof $mol_wire_atom?t.watch():$mol_fail(new Error("Atom is required for watching"))}}($||($={})),function(t){const e=new WeakMap;const o=new WeakMap;function r(t,e){let r=o.get(t),n=r?.[e];return n||(n=o=>(void 0!==o&&(t[e]=o),t[e]),Object.defineProperty(n,"name",{value:e}),r||(r={},o.set(t,r)),r[e]=n,n)}t.$mol_wire_sync=function(t){return new Proxy(t,{get(t,e){let o=t[e];const n=$mol_wire_task.getter("function"==typeof o?o:r(t,e));return"function"!=typeof o?n(t,[]).sync():function(...e){return n(t,e).sync()}},set:(t,e,o)=>($mol_wire_task.getter(r(t,e))(t,[o]).sync(),!0),construct(t,o){const r=$mol_wire_task.getter(function(t){let o=e.get(t);return o||(o=$mol_func_name_from(((...e)=>new t(...e)),t),e.set(t,o),o)}(t));return r(t,o).sync()},apply:(t,e,o)=>$mol_wire_task.getter(t)(e,o).sync()})}}($||($={})),function(t){t.$mol_wire_async=function(t){let e;const o=$mol_wire_task.getter(t);return new Proxy(t,{get(t,e){const o=t[e];if("function"!=typeof o)return o;let r;const n=$mol_wire_task.getter(o);return function(...e){return r?.destructor(),r=n(t,e),r.async()}},apply:(t,r,n)=>(e?.destructor(),e=o(r,n),e.async())})}}($||($={})),function(t){t.$mol_wire_race=function(...t){const e=t.map((t=>{try{return t()}catch(t){return t}})),o=e.filter((t=>$mol_promise_like(t)));o.length&&$mol_fail(Promise.race(o));const r=e.find((t=>t instanceof Error));return r&&$mol_fail(r),e}}($||($={})),function(t){let e;e=t.$$||(t.$$={}),t.$mol_object_field=Symbol("$mol_object_field");class o extends $mol_object2{static make(t){return super.create((e=>{for(let o in t)e[o]=t[o]}))}}t.$mol_object=o}($||($={})),function(t){class e extends $mol_object2{delay;task;id;constructor(t,e){super(),this.delay=t,this.task=e,this.id=setTimeout(e,t)}destructor(){clearTimeout(this.id)}}t.$mol_after_timeout=e}($||($={})),function(t){class e extends $mol_object{static task(t,e){return t?new $mol_after_timeout(t,(()=>this.task(t,null))):new $mol_after_frame((()=>this.task(t,null)))}static now(t){return this.task(t),Date.now()}}__decorate([$mol_mem_key],e,"task",null),__decorate([$mol_mem_key],e,"now",null),t.$mol_state_time=e}($||($={})),function(t){t.$mol_wire_easing=function(t){const e=$mol_wire_auto();e instanceof $mol_wire_atom||$mol_fail(new Error("Allowed only inside atom"));const o=e.result()??t;if("number"!=typeof o)return t;const r=(2*o+t)/3;return Math.abs(r-t)<1?t:($mol_state_time.now(0),r)}}($||($={})),function(t){t.$mol_wire_patch=function(t){for(const e of Reflect.ownKeys(t)){const o=Reflect.getOwnPropertyDescriptor(t,e);if(!o.configurable)continue;if(!o.get)continue;const r=o.get??(()=>o.value),n=o.set??(t=>o.value=t);Reflect.defineProperty(t,e,{configurable:!0,enumerable:o.enumerable,get(){const e=$mol_wire_atom.solo(t,r);return e.watch(),e.sync()},set(e){const o=$mol_wire_atom.solo(t,r);n.call(this,e),o.refresh()}})}}}($||($={})),function(t){t.$mol_wire_let=function(t){for(const e of Object.keys(t))t[e]=new $mol_wire_atom(e,t[e],t).channel();return t}}($||($={})),function(t){class e extends Set{pub=new $mol_wire_pub;has(t){return this.pub.promote(),super.has(t)}entries(){return this.pub.promote(),super.entries()}keys(){return this.pub.promote(),super.keys()}values(){return this.pub.promote(),super.values()}forEach(t,e){this.pub.promote(),super.forEach(t,e)}[Symbol.iterator](){return this.pub.promote(),super[Symbol.iterator]()}get size(){return this.pub.promote(),super.size}add(t){return super.has(t)||(super.add(t),this.pub.emit()),this}delete(t){const e=super.delete(t);return e&&this.pub.emit(),e}clear(){super.size&&(super.clear(),this.pub.emit())}item(t,e){return void 0===e?this.has(t):(e?this.add(t):this.delete(t),e)}}t.$mol_wire_set=e}($||($={})),function(t){const e=new WeakMap;function o(t,o){let r=e.get(o);return r||e.set(o,r=new $mol_wire_pub(t)),r}t.$mol_wire_proxy_pub=o,t.$mol_wire_proxy=function t(r,n){if(!n)return n;const s=typeof n;return"object"!==s&&"function"!==s?n:new Proxy(n,{get(e,n){o(r,e).promote();const s="."+("symbol"==typeof n?n.description:n);return t(r+s,Reflect.get(e,n))},getOwnPropertyDescriptor:(t,e)=>(o(r,t).promote(),Reflect.getOwnPropertyDescriptor(t,e)),ownKeys:t=>(o(r,t).promote(),Reflect.ownKeys(t)),has:(t,e)=>(o(r,t).promote(),Reflect.has(t,e)),getPrototypeOf:e=>(o(r,e).promote(),t(r,Reflect.getPrototypeOf(e))),isExtensible:t=>(o(r,t).promote(),Reflect.isExtensible(t)),set(t,o,r){const n=e.get(t);if(n){const e=Reflect.get(t,o);if($mol_compare_deep(e,r))return!0;n.emit()}return Reflect.set(t,o,r)},defineProperty:(t,o,r)=>(e.get(t)?.emit(),Reflect.defineProperty(t,o,r)),deleteProperty:(t,o)=>(e.get(t)?.emit(),Reflect.deleteProperty(t,o)),setPrototypeOf:(t,o)=>(e.get(t)?.emit(),Reflect.setPrototypeOf(t,o)),preventExtensions:t=>(e.get(t)?.emit(),Reflect.preventExtensions(t))})}}($||($={})),function(t){class e extends Map{pub=new $mol_wire_pub;has(t){return this.pub.promote(),super.has(t)}get(t){return this.pub.promote(),super.get(t)}entries(){return this.pub.promote(),super.entries()}keys(){return this.pub.promote(),super.keys()}values(){return this.pub.promote(),super.values()}forEach(t,e){this.pub.promote(),super.forEach(t,e)}[Symbol.iterator](){return this.pub.promote(),super[Symbol.iterator]()}get size(){return this.pub.promote(),super.size}set(t,e){return super.get(t)===e||(super.set(t,e),this.pub?.emit()),this}delete(t){const e=super.delete(t);return e&&this.pub.emit(),e}clear(){super.size&&(super.clear(),this.pub.emit())}item(t,e){return void 0===e?this.get(t)??null:(null===e?this.delete(t):this.set(t,e),e)}}t.$mol_wire_dict=e}($||($={})),function(t){t.$mol_promise=class extends Promise{done;fail;constructor(t){let e,o;super(((r,n)=>{e=r,o=n,t?.(r,n)})),this.done=e,this.fail=o}}}($||($={})),function(t){t.$mol_wait_timeout_async=function(t){const e=new $mol_promise,o=new this.$mol_after_timeout(t,(()=>e.done()));return Object.assign(e,{destructor:()=>o.destructor()})},t.$mol_wait_timeout=function(t){return this.$mol_wire_sync(this).$mol_wait_timeout_async(t)}}($||($={})),function(t){class e extends $mol_object2{static watch(t){return t}static track(t){const e=$mol_wire_probe((()=>this.track(t)));let o;try{o=t.sync()}finally{for(const e of t.pub_list)e instanceof $mol_wire_fiber&&this.track(e)}return t.host===this||($mol_compare_deep(e,o)?this.$.$mol_log3_rise({message:"💧 Same",place:t}):void 0!==e&&this.$.$mol_log3_rise({message:"🔥 Next",place:t,prev:e})),o}static active(){try{this.watch()?.()}catch(t){$mol_fail_log(t)}finally{for(const t of $mol_wire_auto().pub_list)t instanceof $mol_wire_fiber&&this.track(t)}}}__decorate([$mol_mem],e,"watch",null),__decorate([$mol_mem_key],e,"track",null),__decorate([$mol_mem],e,"active",null),t.$mol_wire_log=e}($||($={}));
//# sourceMappingURL=/sm/08a18f0de2f7266b17cb8f6dbaf19f80ca638194d0d10e2a5089d7c6b077d8aa.map