Back to Good Morning Protocol
SOURCE / PINNED RELEASE

Made of little things.

Good Morning Protocol

Release
8606b961b210…
Author-recorded commit
Not provided
License
Check the original source

The hash-verified playable HTML, which may contain bundled or minified code. This view does not execute it.

index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Good Morning Protocol</title>
    <script type="module" crossorigin>var e=`identity`,t=`theme`;function n(){let e=window;if(!e.napplet?.theme)throw Error(`window.napplet.theme is unavailable -- runtime did not inject this domain`);return e.napplet.theme}function r(){return n().get()}function i(e){return n().onChanged(e)}var a=`resource`;function o(){let e=window;if(!e.napplet?.resource)throw Error(`window.napplet.resource is unavailable -- runtime did not inject this domain`);return e.napplet.resource}function s(e,t){return o().bytes(e,t)}var c=`outbox`,l=`link`;function u(){let e=window;if(!e.napplet)throw Error(`window.napplet is unavailable -- runtime did not inject the napplet namespace`);return e.napplet}function d(e){let t=u()[e];if(!t)throw Error(`window.napplet.${String(e)} is unavailable -- runtime did not inject this domain`);return t}var f={emit(e,t,n){d(`inc`).emit(e,t,n)},on(e,t){return d(`inc`).on(e,t)}},p={getPublicKey(){return d(`identity`).getPublicKey()},onChanged(e){return d(`identity`).onChanged(e)},getRelays(){return d(`identity`).getRelays()},getProfile(){return d(`identity`).getProfile()},getFollows(){return d(`identity`).getFollows()},getList(e){return d(`identity`).getList(e)},getZaps(){return d(`identity`).getZaps()},getMutes(){return d(`identity`).getMutes()},getBlocked(){return d(`identity`).getBlocked()},getBadges(){return d(`identity`).getBadges()}},m={getEvent(e,t){return d(`outbox`).getEvent(e,t)},query(e,t){return d(`outbox`).query(e,t)},subscribe(e,t){return d(`outbox`).subscribe(e,t)},publish(e,t){return d(`outbox`).publish(e,t)},resolveRelays(e){return d(`outbox`).resolveRelays(e)}},h={open(e,t){return d(`link`).open(e,t)}},g={"--hg-bg-base":`#14110c`,"--hg-bg-surface":`#1a1a1a`,"--hg-bg-elevated":`#242016`,"--hg-bg-overlay":`#080706`,"--hg-border-default":`#4a453c`,"--hg-border-dim":`#3a3a3a`,"--hg-text-primary":`#f5f1e8`,"--hg-text-secondary":`#d8d0c0`,"--hg-text-muted":`#b8b1a4`,"--hg-text-dim":`#776f62`,"--hg-accent-green":`#9be564`,"--hg-accent-amber":`#e5c464`,"--hg-accent-red":`#ff7369`,"--hg-font-body":`ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace`,"--hg-font-mono":`ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace`},_={background:`--hg-bg-base`,text:`--hg-text-primary`,primary:`--hg-accent-green`};function v(e){let t=document.documentElement.style;for(let[n,r]of Object.entries(e))t.setProperty(n,r);for(let[n,r]of Object.entries(e)){let e=/^#([0-9a-f]{6})$/i.exec(r.trim());if(!e)continue;let i=e[1];t.setProperty(`${n}-rgb`,`${parseInt(i.slice(0,2),16)} ${parseInt(i.slice(2,4),16)} ${parseInt(i.slice(4,6),16)}`)}}function y(e){let t={};for(let[n,r]of Object.entries(_)){let i=e.colors[n];typeof i==`string`&&i.trim()&&(t[r]=i)}let n=e.fonts?.body?.name;return typeof n==`string`&&n.trim()&&(t[`--hg-font-body`]=n),t}function b(){if(v(g),!globalThis.napplet?.theme)return{close:()=>void 0};try{r().then(e=>v(y(e))).catch(()=>void 0)}catch{}let e=null;try{e=i(e=>v(y(e)))}catch{}return{close:()=>e?.close()}}var x=Array.isArray,S=Array.prototype.indexOf,C=Array.prototype.includes,ee=Array.from,w=Object.defineProperty,T=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyDescriptors,ne=Object.prototype,re=Array.prototype,ie=Object.getPrototypeOf,ae=Object.isExtensible,oe=()=>{};function se(e){for(var t=0;t<e.length;t++)e[t]()}function ce(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var E=1024,D=2048,le=4096,ue=8192,de=16384,fe=32768,pe=1<<25,me=65536,he=1<<19,ge=1<<20,_e=1<<25,ve=65536,ye=1<<21,be=1<<22,xe=1<<23,Se=Symbol(`$state`),Ce=Symbol(`legacy props`),we=Symbol(``),Te=Symbol(`attributes`),Ee=Symbol(`class`),De=Symbol(`style`),Oe=Symbol(`text`),ke=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ae=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function je(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Fe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Le(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ue={},O=Symbol(`uninitialized`),We=`http://www.w3.org/1999/xhtml`;function Ge(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ke(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function qe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var k=!1;function Je(e){k=e}var A;function j(e){if(e===null)throw Ke(),Ue;return A=e}function Ye(){return j(gn(A))}function M(e){if(k){if(gn(A)!==null)throw Ke(),Ue;A=e}}function Xe(e=1){if(k){for(var t=e,n=A;t--;)n=gn(n);A=n}}function Ze(e=!0){for(var t=0,n=A;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=gn(n);e&&n.remove(),n=i}}function Qe(e){if(!e||e.nodeType!==8)throw Ke(),Ue;return e.data}function $e(e){return e===this.v}function et(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function tt(e){return!et(e,this.v)}var N=null;function nt(e){N=e}function rt(e,t=!1,n){N={p:N,i:!1,c:null,e:null,s:e,x:null,r:G,l:null}}function it(e){var t=N,n=t.e;if(n!==null){t.e=null;for(var r of n)kn(r)}return e!==void 0&&(t.x=e),t.i=!0,N=t.p,e??{}}function at(){return!0}var ot=[];function st(){var e=ot;ot=[],se(e)}function ct(e){if(ot.length===0&&!Rt){var t=ot;queueMicrotask(()=>{t===ot&&st()})}ot.push(e)}function lt(e){var t=G;if(t===null)return W.f|=xe,e;if(!(t.f&32768)&&!(t.f&4))throw e;ut(e,t)}function ut(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var dt=~(D|le|E);function P(e,t){e.f=e.f&dt|t}function ft(e){e.f&512||e.deps===null?P(e,E):P(e,le)}function pt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ve,pt(t.deps))}function mt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),pt(e.deps),P(e,E)}var ht=!1;function gt(e){var t=ht;try{return ht=!1,[e(),ht]}finally{ht=t}}function _t(e){let t=0,n=nn(0),r;return()=>{En()&&(J(n),Nn(()=>(t===0&&(r=gr(()=>e(()=>sn(n)))),t+=1,()=>{ct(()=>{--t,t===0&&(r?.(),r=void 0,sn(n))})})))}}var vt=me|he;function yt(e,t,n,r){new bt(e,t,n,r)}var bt=class{parent;is_pending=!1;transform_error;#e;#t=k?A:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=_t(()=>(this.#m=nn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Pn(()=>{if(k){let e=this.#t;Ye();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},vt),k&&(this.#e=A)}#g(){try{this.#a=Fn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=Fn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Fn(()=>e(this.#e)),ct(()=>{var e=this.#c=document.createDocumentFragment(),t=z();e.append(t),this.#a=this.#x(()=>Fn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Vn(this.#o,()=>{this.#o=null}),this.#b(I))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Fn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Gn(this.#a,e);let t=this.#n.pending;this.#o=Fn(()=>t(this.#e))}else this.#b(I)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){mt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=W,r=N;Qn(this.#i),Zn(this.#i),nt(this.#i.ctx);try{return Wt.ensure(),e()}catch(e){return lt(e),null}finally{Qn(t),Zn(n),nt(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Vn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,ct(()=>{this.#d=!1,this.#m&&an(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),J(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;I?.is_fork?(this.#a&&I.skip_effect(this.#a),this.#o&&I.skip_effect(this.#o),this.#s&&I.skip_effect(this.#s),I.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(U(this.#a),null),this.#o&&=(U(this.#o),null),this.#s&&=(U(this.#s),null),k&&(j(this.#t),Xe(),j(Ze()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){qe();return}r=!0,i&&He(),this.#s!==null&&Vn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){ut(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return Fn(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return ut(e,this.#i.parent),null}}))};ct(()=>{var t;try{t=this.transform_error(e)}catch(e){ut(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>ut(e,this.#i&&this.#i.parent)):o(t)})}};function xt(e,t,n,r){let i=at()?Tt:Ot;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=G,c=St(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){ut(e,s)}Ct()}}var d=wt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>Dt(e))).then(u).catch(e=>ut(e,s)).finally(d)}l?l.then(()=>{c(),f(),Ct()}):f()}function St(){var e=G,t=W,n=N,r=I;return function(i=!0){Qn(e),Zn(t),nt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Ct(e=!0){Qn(null),Zn(null),nt(null),e&&I?.deactivate()}function wt(){var e=G,t=e.b,n=I,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Tt(e){var t=2|D;return G!==null&&(G.f|=he),{ctx:N,deps:null,effects:null,equals:$e,f:t,fn:e,reactions:null,rv:0,v:O,wv:0,parent:G,ac:null}}var Et=Symbol(`obsolete`);function Dt(e,t,n){let r=G;r===null&&Me();var i=void 0,a=nn(O),o=!W,s=new Set;return Mn(()=>{var t=G,n=ce();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ke&&n.reject(e)}).finally(Ct)}catch(e){n.reject(e),Ct()}var c=I;if(o){if(t.f&32768)var l=wt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Et);else for(let e of s.values())e.reject(Et);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Et&&(c.activate(),t?(a.f|=xe,an(a,t)):(a.f&8388608&&(a.f^=xe),an(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Dn(()=>{for(let e of s)e.reject(Et)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function F(e){let t=Tt(e);return er(t),t}function Ot(e){let t=Tt(e);return t.equals=tt,t}function kt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)U(t[n])}}function At(e){var t,n=G,r=e.parent;if(!Jn&&r!==null&&e.v!==O&&r.f&24576)return Ge(),e.v;Qn(r);try{e.f&=~ve,kt(e),t=ur(e)}finally{Qn(n)}return t}function jt(e){var t=At(e);if(!e.equals(t)&&(e.wv=sr(),(!I?.is_fork||e.deps===null)&&(I===null?e.v=t:(I.capture(e,t,!0),Ft?.capture(e,t,!0)),e.deps===null))){P(e,E);return}Jn||(It===null?ft(e):(En()||I?.is_fork)&&It.set(e,t))}function Mt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ke),t.fn!==null&&(t.teardown=oe),t.ac=null,fr(t,0),Ln(t))}function Nt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&pr(t)}var Pt=null,I=null,Ft=null,It=null,Lt=null,Rt=!1,zt=!1,Bt=null,Vt=null,Ht=0,Ut=1,Wt=class e{id=Ut++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){Pt===null?Pt=this:(Pt.#n=this,this.#t=Pt),Pt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)P(r,D),t(r);for(r of n.m)P(r,le),t(r)}this.#p.add(e)}#g(){this.#e=!0,Ht++>1e3&&(this.#x(),Gt());for(let e of this.#u)this.#d.delete(e),P(e,D),this.schedule(e);for(let e of this.#d)P(e,le),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Bt=[],r=[],i=Vt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Qt(e),this.#h()||this.discard(),t}if(I=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Bt=null,Vt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Zt(e,t);i.length>0&&I.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Ft=this,qt(r),qt(n),Ft=null,this.#s?.resolve();var s=I;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=E;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=E:i&4?t.push(r):cr(r)&&(i&16&&this.#d.add(r),pr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),P(i,D),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),I=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)mt(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==O&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),It?.set(e,t)),this.is_fork||(e.v=t)}activate(){I=this}deactivate(){I=null,It=null}flush(){try{zt=!0,I=this,this.#g()}finally{Ht=0,Lt=null,Bt=null,Vt=null,zt=!1,I=null,It=null,en.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(Et);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,ct(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=ce()).promise}static ensure(){if(I===null){let t=I=new e;!zt&&ct(()=>{t.#e||t.flush()})}return I}apply(){It=null}schedule(e){if(Lt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Bt!==null&&t===G&&(W===null||!(W.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=E}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?Pt=e:t.#t=e,this.linked=!1}}};function Gt(){try{Le()}catch(e){ut(e,Lt)}}var Kt=null;function qt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&cr(r)&&(Kt=new Set,pr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Bn(r),Kt?.size>0)){en.clear();for(let e of Kt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Kt.has(n)&&(Kt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||pr(n)}}Kt.clear()}}Kt=null}}function Jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Jt(i,t,n,r):e&4194320&&!(e&2048)&&Yt(i,t,r)&&(P(i,D),Xt(i))}}function Yt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(C.call(t,r))return!0;if(r.f&2&&Yt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Xt(e){I.schedule(e)}function Zt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),P(e,E);for(var n=e.first;n!==null;)Zt(n,t),n=n.next}}function Qt(e){P(e,E);for(var t=e.first;t!==null;)Qt(t),t=t.next}var $t=new Set,en=new Map,tn=!1;function nn(e,t){return{f:0,v:e,reactions:null,equals:$e,rv:0,wv:0}}function L(e,t){let n=nn(e,t);return er(n),n}function rn(e,t=!1,n=!0){let r=nn(e);return t||(r.equals=tt),r}function R(e,t,n=!1){return W!==null&&(!Xn||W.f&131072)&&at()&&W.f&4325394&&($n===null||!$n.has(e))&&Ve(),an(e,n?ln(t):t,Vt)}function an(e,t,n=null){if(!e.equals(t)){en.set(e,Jn?t:e.v);var r=Wt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&At(t),It===null&&ft(t)}e.wv=sr(),cn(e,D,n),at()&&G!==null&&G.f&1024&&!(G.f&96)&&(tr===null?nr([e]):tr.push(e)),!r.is_fork&&$t.size>0&&!tn&&on()}return t}function on(){tn=!1;for(let e of $t){e.f&1024&&P(e,le);let t;try{t=cr(e)}catch{t=!0}t&&pr(e)}$t.clear()}function sn(e){R(e,e.v+1)}function cn(e,t,n){var r=e.reactions;if(r!==null)for(var i=at(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&D)===0;if(l&&P(s,t),c&131072)$t.add(s);else if(c&2){var u=s;It?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=ve),cn(u,le,n))}else if(l){var d=s;c&16&&Kt!==null&&Kt.add(d),n===null?Xt(d):n.push(d)}}}}function ln(e){if(typeof e!=`object`||!e||Se in e)return e;let t=ie(e);if(t!==ne&&t!==re)return e;var n=new Map,r=x(e),i=L(0),a=null,o=ar,s=e=>{if(ar===o)return e();var t=W,n=ar;Zn(null),or(o);var r=e();return Zn(t),or(n),r};return r&&n.set(`length`,L(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&ze();var i=n.get(t);return i===void 0?s(()=>{var e=L(r.value,a);return n.set(t,e),e}):R(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>L(O,a));n.set(t,e),sn(i)}}else R(r,O),sn(i);return!0},get(t,r,i){if(r===Se)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||T(t,r)?.writable)&&(o=s(()=>L(ln(c?t[r]:O),a)),n.set(r,o)),o!==void 0){var l=J(o);return l===O?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=J(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==O)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Se)return!0;var r=n.get(t),i=r!==void 0&&r.v!==O||Reflect.has(e,t);return(r!==void 0||G!==null&&(!i||T(e,t)?.writable))&&(r===void 0&&(r=s(()=>L(i?ln(e[t]):O,a)),n.set(t,r)),J(r)===O)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>L(O,a)),n.set(d+``,f)):R(f,O)}if(l===void 0)(!u||T(e,t)?.writable)&&(l=s(()=>L(void 0,a)),R(l,ln(o)),n.set(t,l));else{u=l.v!==O;var p=s(()=>ln(o));R(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&R(h,g+1)}sn(i)}return!0},ownKeys(e){J(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==O});for(var[r,a]of n)a.v!==O&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Be()}})}var un,dn,fn,pn;function mn(){if(un===void 0){un=window,dn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;fn=T(t,`firstChild`).get,pn=T(t,`nextSibling`).get,ae(e)&&(e[Ee]=void 0,e[Te]=null,e[De]=void 0,e.__e=void 0),ae(n)&&(n[Oe]=void 0)}}function z(e=``){return document.createTextNode(e)}function hn(e){return fn.call(e)}function gn(e){return pn.call(e)}function B(e,t){if(!k)return hn(e);var n=hn(A);if(n===null)n=A.appendChild(z());else if(t&&n.nodeType!==3){var r=z();return n?.before(r),j(r),r}return t&&xn(n),j(n),n}function _n(e,t=!1){if(!k){var n=hn(e);return n instanceof Comment&&n.data===``?gn(n):n}if(t){if(A?.nodeType!==3){var r=z();return A?.before(r),j(r),r}xn(A)}return A}function V(e,t=1,n=!1){let r=k?A:e;for(var i;t--;)i=r,r=gn(r);if(!k)return r;if(n){if(r?.nodeType!==3){var a=z();return r===null?i?.after(a):r.before(a),j(a),a}xn(r)}return j(r),r}function vn(e){e.textContent=``}function yn(){return!1}function bn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function xn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Sn(e){var t=W,n=G;Zn(null),Qn(null);try{return e()}finally{Zn(t),Qn(n)}}function Cn(e){G===null&&(W===null&&Ie(e),Fe()),Jn&&Pe(e)}function wn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Tn(e,t){var n=G;n!==null&&n.f&8192&&(e|=ue);var r={ctx:N,deps:null,nodes:null,f:e|D|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};I?.register_created_effect(r);var i=r;if(e&4)Bt===null?Wt.ensure().schedule(r):Bt.push(r);else if(t!==null){try{pr(r)}catch(e){throw U(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=me))}if(i!==null&&(i.parent=n,n!==null&&wn(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function En(){return W!==null&&!Xn}function Dn(e){let t=Tn(8,null);return P(t,E),t.teardown=e,t}function On(e){Cn(`$effect`);var t=G.f;if(!W&&t&32&&N!==null&&!N.i){var n=N;(n.e??=[]).push(e)}else return kn(e)}function kn(e){return Tn(4|ge,e)}function An(e){Wt.ensure();let t=Tn(64|he,e);return(e={})=>new Promise(n=>{e.outro?Vn(t,()=>{U(t),n(void 0)}):(U(t),n(void 0))})}function jn(e){return Tn(4,e)}function Mn(e){return Tn(be|he,e)}function Nn(e,t=0){return Tn(8|t,e)}function H(e,t=[],n=[],r=[]){xt(r,t,n,t=>{Tn(8,()=>{e(...t.map(J))})})}function Pn(e,t=0){return Tn(16|t,e)}function Fn(e){return Tn(32|he,e)}function In(e){var t=e.teardown;if(t!==null){let e=Jn,n=W;Yn(!0),Zn(null);try{t.call(null)}finally{Yn(e),Zn(n)}}}function Ln(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Sn(()=>{e.abort(ke)});var r=n.next;n.f&64?n.parent=null:U(n,t),n=r}}function Rn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||U(t),t=n}}function U(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(zn(e.nodes.start,e.nodes.end),n=!0),e.f|=pe,Ln(e,t&&!n),fr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();In(e),e.f^=pe,e.f|=de;var i=e.parent;i!==null&&i.first!==null&&Bn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function zn(e,t){for(;e!==null;){var n=e===t?null:gn(e);e.remove(),e=n}}function Bn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Vn(e,t,n=!0){var r=[];Hn(e,r,!0);var i=()=>{n&&U(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Hn(e,t,n){if(!(e.f&8192)){e.f^=ue;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Hn(i,t,o?n:!1)}i=a}}}function Un(e){Wn(e,!0)}function Wn(e,t){if(e.f&8192){e.f^=ue,e.f&1024||(P(e,D),Wt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Wn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Gn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:gn(n);t.append(n),n=i}}var Kn=null,qn=!1,Jn=!1;function Yn(e){Jn=e}var W=null,Xn=!1;function Zn(e){W=e}var G=null;function Qn(e){G=e}var $n=null;function er(e){W!==null&&($n??=new Set).add(e)}var K=null,q=0,tr=null;function nr(e){tr=e}var rr=1,ir=0,ar=ir;function or(e){ar=e}function sr(){return++rr}function cr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ve),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(cr(a)&&jt(a),a.wv>e.wv)return!0}t&512&&It===null&&P(e,E)}return!1}function lr(e,t,n=!0){var r=e.reactions;if(r!==null&&!($n!==null&&$n.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?lr(a,t,!1):t===a&&(n?P(a,D):a.f&1024&&P(a,le),Xt(a))}}function ur(e){var t=K,n=q,r=tr,i=W,a=$n,o=N,s=Xn,c=ar,l=e.f;K=null,q=0,tr=null,W=l&96?null:e,$n=null,nt(e.ctx),Xn=!1,ar=++ir,e.ac!==null&&(Sn(()=>{e.ac.abort(ke)}),e.ac=null);try{e.f|=ye;var u=e.fn,d=u();e.f|=fe;var f=e.deps,p=I?.is_fork;if(K!==null){var m;if(p||fr(e,q),f!==null&&q>0)for(f.length=q+K.length,m=0;m<K.length;m++)f[q+m]=K[m];else e.deps=f=K;if(En()&&e.f&512)for(m=q;m<f.length;m++)(f[m].reactions??=[]).push(e)}else!p&&f!==null&&q<f.length&&(fr(e,q),f.length=q);if(at()&&tr!==null&&!Xn&&f!==null&&!(e.f&6146))for(m=0;m<tr.length;m++)lr(tr[m],e);if(i!==null&&i!==e){if(ir++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=ir;if(t!==null)for(let e of t)e.rv=ir;tr!==null&&(r===null?r=tr:r.push(...tr))}return e.f&8388608&&(e.f^=xe),d}catch(e){return lt(e)}finally{e.f^=ye,K=t,q=n,tr=r,W=i,$n=a,nt(o),Xn=s,ar=c}}function dr(e,t){let n=t.reactions;if(n!==null){var r=S.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(K===null||!C.call(K,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~ve),a.v!==O&&ft(a),Mt(a),fr(a,0)}}function fr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)dr(e,n[r])}function pr(e){var t=e.f;if(!(t&16384)){P(e,E);var n=G,r=qn;G=e,qn=!0;try{t&16777232?Rn(e):Ln(e),In(e);var i=ur(e);e.teardown=typeof i==`function`?i:null,e.wv=rr}finally{qn=r,G=n}}}function J(e){var t=(e.f&2)!=0;if(Kn?.add(e),W!==null&&!Xn&&!(G!==null&&G.f&16384)&&($n===null||!$n.has(e))){var n=W.deps;if(W.f&2097152)e.rv<ir&&(e.rv=ir,K===null&&n!==null&&n[q]===e?q++:K===null?K=[e]:K.push(e));else{W.deps??=[],C.call(W.deps,e)||W.deps.push(e);var r=e.reactions;r===null?e.reactions=[W]:C.call(r,W)||r.push(W)}}if(Jn&&en.has(e))return en.get(e);if(t){var i=e;if(Jn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||hr(i))&&(a=At(i)),en.set(i,a),a}var o=(i.f&512)==0&&!Xn&&W!==null&&(qn||(W.f&512)!=0),s=(i.f&fe)===0;cr(i)&&(o&&(i.f|=512),jt(i)),o&&!s&&(Nt(i),mr(i))}if(It?.has(e))return It.get(e);if(e.f&8388608)throw e.v;return e.v}function mr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Nt(t),mr(t))}function hr(e){if(e.v===O)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(en.has(t)||t.f&2&&hr(t))return!0;return!1}function gr(e){var t=Xn;try{return Xn=!0,e()}finally{Xn=t}}function _r(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(Se in e)vr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&Se in n&&vr(n)}}}function vr(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{vr(e[n],t)}catch{}let n=ie(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=te(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var yr=[`touchstart`,`touchmove`];function br(e){return yr.includes(e)}var xr=Symbol(`events`),Sr=new Set,Cr=new Set;function wr(e){if(!k)return;e.removeAttribute(`onload`),e.removeAttribute(`onerror`);let t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function Tr(e,t,n){(t[xr]??={})[e]=n}function Er(e){for(var t=0;t<e.length;t++)Sr.add(e[t]);for(var n of Cr)n(e)}var Dr=null;function Or(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Dr=e;var o=0,s=Dr===e&&e[xr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[xr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){w(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=W,d=G;Zn(null),Qn(null);try{for(var f,p=[];a!==null&&a!==t;){try{var m=a[xr]?.[r];m!=null&&(!a.disabled||e.target===a)&&m.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[xr]=t,delete e.currentTarget,Zn(u),Qn(d)}}}var kr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Ar(e){return kr?.createHTML(e)??e}function jr(e){var t=bn(`template`);return t.innerHTML=Ar(e.replaceAll(`<!>`,`<!---->`)),t.content}function Mr(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(k)return Mr(A,null),A;i===void 0&&(i=jr(a?e:`<!>`+e),n||(i=hn(i)));var t=r||dn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=hn(t),s=t.lastChild;Mr(o,s)}else Mr(t,t);return t}}function Nr(e=``){if(!k){var t=z(e+``);return Mr(t,t),t}var n=A;return n.nodeType===3?xn(n):(n.before(n=z()),j(n)),Mr(n,n),n}function Pr(){if(k)return Mr(A,null),A;var e=document.createDocumentFragment(),t=document.createComment(``),n=z();return e.append(t,n),Mr(t,n),e}function X(e,t){if(k){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=A),Ye();return}e!==null&&e.before(t)}function Z(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[Oe]??=e.nodeValue)&&(e[Oe]=n,e.nodeValue=`${n}`)}function Fr(e,t){return Lr(e,t)}var Ir=new Map;function Lr(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){mn();var c=void 0,l=An(()=>{var o=n??t.appendChild(z());yt(o,{pending:()=>{}},t=>{rt({});var n=N;if(a&&(n.c=a),i&&(r.$$events=i),k&&Mr(t,null),c=e(t,r)||{},k&&(G.nodes.end=A,A===null||A.nodeType!==8||A.data!==`]`))throw Ke(),Ue;it()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=br(r);for(let e of[t,document]){var a=Ir.get(e);a===void 0&&(a=new Map,Ir.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Or,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(ee(Sr)),Cr.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=Ir.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Or),r.delete(e),r.size===0&&Ir.delete(n)):r.set(e,i)}Cr.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Rr.set(c,l),c}var Rr=new WeakMap,zr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Un(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Un(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(U(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Gn(r,t),t.append(z()),this.#n.set(e,{effect:r,fragment:t})}else U(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Vn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(U(n.effect),this.#n.delete(e))};ensure(e,t){var n=I,r=yn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=z();i.append(a),this.#n.set(e,{effect:Fn(()=>t(a)),fragment:i})}else this.#t.set(e,Fn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else k&&(this.anchor=A),this.#a(n)}};function Q(e,t,n=!1){var r;k&&(r=A,Ye());var i=new zr(e),a=n?me:0;function o(e,t){if(k){var n=Qe(r);if(e!==parseInt(n.substring(1))){var a=Ze();j(a),i.anchor=a,Je(!1),i.ensure(e,t),Je(!0);return}}i.ensure(e,t)}Pn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Br(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Vn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Vr(e,ee(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;vn(u),u.append(l),e.items.clear()}Vr(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Vr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=_e,Gn(a,document.createDocumentFragment())):U(t[i],n)}}var Hr;function Ur(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=k?j(hn(c)):c.appendChild(z())}k&&Ye();var l=null,u=Ot(()=>{var e=n();return x(e)?e:e==null?[]:ee(e)}),d,f=new Map,p=!0;function m(e){g.effect.f&16384||(g.pending.delete(e),g.fallback=l,Gr(g,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=_e,qr(l,null,o)):Un(l):Vn(l,()=>{l=null})))}function h(e){g.pending.delete(e)}var g={effect:Pn(()=>{d=J(u);var e=d.length;let c=!1;k&&Qe(o)===`[!`!=(e===0)&&(o=Ze(),j(o),Je(!1),c=!0);for(var g=new Set,_=I,v=yn(),y=0;y<e;y+=1){k&&A.nodeType===8&&A.data===`]`&&(o=A,c=!0,Je(!1));var b=d[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&an(S.v,b),S.i&&an(S.i,y),v&&_.unskip_effect(S.e)):(S=Kr(s,p?o:Hr??=z(),b,x,y,i,t,n),p||(S.e.f|=_e),s.set(x,S)),g.add(x)}if(e===0&&a&&!l&&(p?l=Fn(()=>a(o)):(l=Fn(()=>a(Hr??=z())),l.f|=_e)),e>g.size&&Ne(``,``,``),k&&e>0&&j(Ze()),!p)if(f.set(_,g),v){for(let[e,t]of s)g.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(h)}else m(_);c&&Je(!0),J(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,k&&(o=A)}function Wr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Gr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Wr(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(Un(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=_e,g===c)qr(g,null,n);else{var v=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Jr(e,u,g),Jr(e,g,v),qr(g,v,n),u=g,f=[],p=[],c=Wr(u.next);continue}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var y=p[0],b;u=y.prev;var x=f[0],S=f[f.length-1];for(b=0;b<f.length;b+=1)qr(f[b],y,n);for(b=0;b<p.length;b+=1)l.delete(p[b]);Jr(e,x.prev,S.next),Jr(e,u,x),Jr(e,S,y),c=y,u=S,--_,f=[],p=[]}else l.delete(g),qr(g,c,n),Jr(e,g.prev,g.next),Jr(e,g,u===null?e.effect.first:u.next),Jr(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Wr(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=Wr(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Vr(e,ee(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var C=[];if(l!==void 0)for(g of l)g.f&8192||C.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&C.push(c),c=Wr(c.next);var w=C.length;if(w>0){var T=r&4&&o===0?n:null;if(a){for(_=0;_<w;_+=1)C[_].nodes?.a?.measure();for(_=0;_<w;_+=1)C[_].nodes?.a?.fix()}Br(e,C,T)}}a&&ct(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Kr(e,t,n,r,i,a,o,s){var c=o&1?o&16?nn(n):rn(n,!1,!1):null,l=o&2?nn(i):null;return{v:c,i:l,e:Fn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function qr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=gn(r);if(a.before(r),r===i)return;r=o}}function Jr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Yr(e,t,n){jn(()=>{var r=gr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Nn(()=>{var e=n();_r(e),i&&et(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}var Xr=[...` 	
\r\f\xA0\v`];function Zr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Xr.includes(r[o-1]))&&(s===r.length||Xr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Qr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function $r(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ei(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map($r)),i&&c.push(...Object.keys(i).map($r));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=$r(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Qr(r)),i&&(n+=Qr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ti(e,t,n,r,i,a){var o=e[Ee];if(k||o!==n||o===void 0){var s=Zr(n,r,a);(!k||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[Ee]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ni(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ri(e,t,n,r){var i=e[De];if(k||i!==t){var a=ei(t,r);(!k||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[De]=t}else r&&(Array.isArray(r)?(ni(e,n?.[0],r[0]),ni(e,n?.[1],r[1],`important`)):ni(e,n,r));return r}var ii=Symbol(`is custom element`),ai=Symbol(`is html`),oi=Ae?`link`:`LINK`;function $(e,t,n,r){var i=si(e);k&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===oi)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[we]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&li(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e[Te]??={[ii]:e.nodeName.includes(`-`),[ai]:e.namespaceURI===We}}var ci=new Map;function li(e){var t=e.getAttribute(`is`)||e.nodeName,n=ci.get(t);if(n)return n;ci.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=te(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=ie(i)}return n}function ui(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Tt(r),J(l)):(c&&(c=!1,s=o?gr(r):r),s);let d;if(a){var f=Se in e||Ce in e;d=T(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=gt(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Re(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?Tt:Ot)(()=>(_=!1,h()));a&&J(v);var y=G;return(function(e,t){if(arguments.length>0){let n=t?J(v):i&&a?ln(e):e;return R(v,n),_=!0,s!==void 0&&(s=n),e}return Jn&&_||y.f&16384?v.v:J(v)})}function di(e){N===null&&je(`onMount`),On(()=>{let t=gr(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var fi=300;function pi(e,t){return typeof e==`string`&&e.length>0&&(!t||t(e))}function mi(e,t){return t?.aborted?Promise.resolve():new Promise(n=>{let r=window.setTimeout(n,e);t?.addEventListener(`abort`,()=>{window.clearTimeout(r),n()},{once:!0})})}async function hi(e,t={}){let n=Math.max(1,t.intervalMs??fi),r=Date.now(),i=0,a=new Set,o=null;if(typeof e.onChanged==`function`)try{o=e.onChanged(()=>{for(let e of a)e()})}catch(e){t.onError?.(e)}let s=e=>t.signal?.aborted?Promise.resolve():new Promise(n=>{let r=null,i=()=>{r!==null&&window.clearTimeout(r),a.delete(i),n()};a.add(i),r=window.setTimeout(i,e),t.signal?.addEventListener(`abort`,i,{once:!0})});try{for(;!t.signal?.aborted;){i++;try{let n=await e.getPublicKey();if(pi(n,t.isValidPubkey))return n}catch(e){t.onError?.(e)}if(t.maxAttempts!==void 0&&i>=t.maxAttempts)return null;if(t.timeoutMs!==void 0){let e=Date.now()-r;if(e>=t.timeoutMs)return null;await s(Math.min(n,t.timeoutMs-e))}else o?await s(n):await mi(n,t.signal)}return null}finally{o?.close(),a.clear()}}function gi(e){return/(?:^|[\s.,!?;:'"\-—()\[\]{}])(gm|good\s+morning)(?=$|[\s.,!?;:'"\-—()\[\]{}])/i.test(e)}function _i(e,t){return!t||Object.keys(t).length===0?e:e.map(e=>({...e,...t}))}function vi(e,t,n){let r=_i(e.filters,n),i=e.authors&&e.authors.length>0?{authors:[...e.authors]}:{},a=null,o=!1;function s(){o||(o=!0,a?.close(),a=null)}let c=m.subscribe(r,i);return c.on(`event`,e=>{o||t.onEvent(e.event)}),a={close:()=>{c.close()}},o?(c.close(),{close:s}):((async()=>{try{let{events:e}=await m.query(r,i);if(o)return;for(let n of e)t.onEvent(n.event)}catch{}finally{o||t.onScanSettled()}})(),{close:s})}var yi=1,bi=500;function xi(e=new Date){let t=new Date(e);return t.setHours(0,0,0,0),Math.floor(t.getTime()/1e3)}function Si(e){return e.tags.some(e=>e[0]===`e`)}function Ci(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function wi(e,t){let n=new Set;for(let e of t.values())for(let t of e.tags)t[0]===`e`&&typeof t[1]==`string`&&n.add(t[1]);return[...e.values()].filter(e=>!Si(e)).map(e=>({note:e,isRead:n.has(e.id)})).sort((e,t)=>t.note.created_at-e.note.created_at)}function Ti(e){let t={gmNotes:new Map,userReplies:new Map,contactCount:0,contactsLoaded:!1,scanning:!1,pubkey:null,error:null},n=null,r=[],i=xi(),a=0,o=0;function s(){for(let e of r)e.close();r=[]}function c(){o+=1,n?.close(),n=null,s()}function l(n){if(s(),n.length===0){t.scanning=!1,e();return}let o=Ci(n,bi);a=o.length,t.scanning=!0,e();for(let n of o){let o=vi({filters:[{kinds:[yi],authors:n,since:i}],origin:`outbox`,authors:n},{onEvent:n=>{n.kind===yi&&gi(n.content)&&(t.gmNotes.has(n.id)||(t.gmNotes.set(n.id,n),e()))},onScanSettled:()=>{a>0&&--a,a===0&&t.scanning&&(t.scanning=!1,e())}});r.push(o)}}function u(r){n=vi({filters:[{kinds:[yi],authors:[r],since:i}],origin:`outbox`,authors:[r]},{onEvent:n=>{n.kind===yi&&(!gi(n.content)||!Si(n)||t.userReplies.has(n.id)||(t.userReplies.set(n.id,n),e()))},onScanSettled:()=>{}})}async function d(){let n=o,r;try{r=await p.getFollows()}catch(r){if(n!==o)return;t.contactsLoaded=!0,t.scanning=!1,t.error=r instanceof Error?r.message:`failed to load contacts`,e();return}n===o&&(t.contactCount=r.length,t.contactsLoaded=!0,e(),l(r))}function f(){c(),t.gmNotes=new Map,t.userReplies=new Map,t.contactCount=0,t.contactsLoaded=!1,t.scanning=!1,t.error=null,a=0,i=xi()}function m(n){if(n!==t.pubkey){if(f(),t.pubkey=n,!n){e();return}t.scanning=!0,e(),d(),u(n)}}function h(){c()}return{get state(){return t},setPubkey:m,destroy:h}}var Ei={close:()=>{}};function Di(e){return typeof e==`string`&&e.length>0?e:void 0}function Oi(e){if(e.kind!==0)return null;try{let t=JSON.parse(e.content);return{name:Di(t.name),display_name:Di(t.display_name),displayName:Di(t.displayName),nip05:Di(t.nip05),picture:Di(t.picture)}}catch{return null}}function ki(e,t,n=()=>{}){let r=[...new Set(e.filter(e=>e.length>0))];if(r.length===0)return n(),Ei;let i=new Map,a=null,o=!1;function s(){o||(o=!0,a?.close(),a=null)}function c(e){if(o||e.kind!==0||!r.includes(e.pubkey))return;let n=i.get(e.pubkey);if(n!==void 0&&n>e.created_at)return;let a=Oi(e);a&&(i.set(e.pubkey,e.created_at),t(e.pubkey,a))}let l=!1;function u(){l||(l=!0,n())}let d=r.map(e=>({kinds:[0],authors:[e],limit:1})),f={authors:r},p=m.subscribe(d,f);return p.on(`event`,e=>c(e.event)),a={close:()=>p.close()},o?(p.close(),{close:s}):((async()=>{try{let{events:e}=await m.query(d,f);if(o)return;for(let t of e)c(t.event)}catch{}finally{o||u()}})(),{close:s})}var Ai=[`second`,`minute`,`hour`,`day`,`week`,`month`,`year`];function ji(e,t){if(t===0)return[`just now`,`right now`];var n=Ai[Math.floor(t/2)];return e>1&&(n+=`s`),[e+` `+n+` ago`,`in `+e+` `+n]}var Mi=[`秒`,`分钟`,`小时`,`天`,`周`,`个月`,`年`];function Ni(e,t){if(t===0)return[`刚刚`,`片刻后`];var n=Mi[~~(t/2)];return[e+` `+n+`前`,e+` `+n+`后`]}var Pi={},Fi=function(e,t){Pi[e]=t},Ii=function(e){return Pi[e]||Pi.en_US},Li=[60,60,24,7,365/7/12,12];function Ri(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||``).trim().replace(/\.\d+/,``).replace(/-/,`/`).replace(/-/,`/`).replace(/(\d)T(\d)/,`$1 $2`).replace(/Z/,` UTC`).replace(/([+-]\d\d):?(\d\d)/,` $1$2`),new Date(e))}function zi(e,t){var n=+(e<0);e=Math.abs(e);for(var r=e,i=0;e>=Li[i]&&i<Li.length;i++)e/=Li[i];return e=Math.floor(e),i*=2,e>(i===0?9:1)&&(i+=1),t(e,i,r)[n].replace(`%s`,e.toString())}function Bi(e,t){return((t?Ri(t):new Date)-+Ri(e))/1e3}var Vi=function(e,t,n){return zi(Bi(e,n&&n.relativeDate),Ii(t))};Fi(`en_US`,ji),Fi(`zh_CN`,Ni);function Hi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Ui(e,t,n=``){let r=Hi(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}var Wi=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,Gi=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Ki(e){if(Ui(e),Wi)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=Gi[e[n]];return t}var qi={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ji(e){if(e>=qi._0&&e<=qi._9)return e-qi._0;if(e>=qi.A&&e<=qi.F)return e-(qi.A-10);if(e>=qi.a&&e<=qi.f)return e-(qi.a-10)}function Yi(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);if(Wi)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=Ji(e.charCodeAt(i)),a=Ji(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function Xi(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];Ui(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function Zi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Qi(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(e=>typeof e==`string`):t.every(e=>Number.isSafeInteger(e)):!1}function $i(e){if(typeof e!=`function`)throw Error(`function expected`);return!0}function ea(e,t){if(typeof t!=`string`)throw Error(`${e}: string expected`);return!0}function ta(e){if(!Number.isSafeInteger(e))throw Error(`invalid integer: ${e}`)}function na(e){if(!Array.isArray(e))throw Error(`array expected`)}function ra(e,t){if(!Qi(!0,t))throw Error(`${e}: array of strings expected`)}function ia(e,t){if(!Qi(!1,t))throw Error(`${e}: array of numbers expected`)}function aa(...e){let t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map(e=>e.encode).reduceRight(n,t),decode:e.map(e=>e.decode).reduce(n,t)}}function oa(e){let t=typeof e==`string`?e.split(``):e,n=t.length;ra(`alphabet`,t);let r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(na(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]})),decode:t=>(na(t),t.map(t=>{ea(`alphabet.decode`,t);let n=r.get(t);if(n===void 0)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}function sa(e=``){return ea(`join`,e),{encode:t=>(ra(`join.decode`,t),t.join(e)),decode:t=>(ea(`join.decode`,t),t.split(e))}}function ca(e,t=`=`){return ta(e),ea(`padding`,t),{encode(n){for(ra(`padding.encode`,n);n.length*e%8;)n.push(t);return n},decode(n){ra(`padding.decode`,n);let r=n.length;if(r*e%8)throw Error(`padding: invalid, string should have whole number of bytes`);for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw Error(`padding: invalid, string has too much padding`);return n.slice(0,r)}}}function la(e){return $i(e),{encode:e=>e,decode:t=>e(t)}}var ua=(e,t)=>t===0?e:ua(t,e%t),da=(e,t)=>e+(t-ua(e,t)),fa=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function pa(e,t,n,r){if(na(e),t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw Error(`convertRadix2: wrong to=${n}`);if(da(t,n)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${da(t,n)}`);let i=0,a=0,o=fa[t],s=fa[n]-1,c=[];for(let r of e){if(ta(r),r>=o)throw Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,a+t>32)throw Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=n;a-=n)c.push((i>>a-n&s)>>>0);let e=fa[a];if(e===void 0)throw Error(`invalid carry`);i&=e-1}if(i=i<<n-a&s,!r&&a>=t)throw Error(`Excess padding`);if(!r&&i>0)throw Error(`Non-zero padding: ${i}`);return r&&a>0&&c.push(i>>>0),c}function ma(e,t=!1){if(ta(e),e<=0||e>32)throw Error(`radix2: bits should be in (0..32]`);if(da(8,e)>32||da(e,8)>32)throw Error(`radix2: carry overflow`);return{encode:n=>{if(!Zi(n))throw Error(`radix2.encode input should be Uint8Array`);return pa(Array.from(n),8,e,!t)},decode:n=>(ia(`radix2.decode`,n),Uint8Array.from(pa(n,e,8,t)))}}function ha(e){return $i(e),function(...t){try{return e.apply(null,t)}catch{}}}aa(ma(4),oa(`0123456789ABCDEF`),sa(``)),aa(ma(5),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),ca(5),sa(``)),aa(ma(5),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),sa(``)),aa(ma(5),oa(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),ca(5),sa(``)),aa(ma(5),oa(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),sa(``)),aa(ma(5),oa(`0123456789ABCDEFGHJKMNPQRSTVWXYZ`),sa(``),la(e=>e.toUpperCase().replace(/O/g,`0`).replace(/[IL]/g,`1`)));var ga=typeof Uint8Array.from([]).toBase64==`function`&&typeof Uint8Array.fromBase64==`function`;ga||aa(ma(6),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),ca(6),sa(``)),aa(ma(6),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),sa(``)),ga||aa(ma(6),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),ca(6),sa(``)),aa(ma(6),oa(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),sa(``));var _a=aa(oa(`qpzry9x8gf2tvdw0s3jn54khce6mua7l`),sa(``)),va=[996825010,642813549,513874426,1027748829,705979059];function ya(e){let t=e>>25,n=(e&33554431)<<5;for(let e=0;e<va.length;e++)(t>>e&1)==1&&(n^=va[e]);return n}function ba(e,t,n=1){let r=e.length,i=1;for(let t=0;t<r;t++){let n=e.charCodeAt(t);if(n<33||n>126)throw Error(`Invalid prefix (${e})`);i=ya(i)^n>>5}i=ya(i);for(let t=0;t<r;t++)i=ya(i)^e.charCodeAt(t)&31;for(let e of t)i=ya(i)^e;for(let e=0;e<6;e++)i=ya(i);return i^=n,_a.encode(pa([i%fa[30]],30,5,!1))}function xa(e){let t=e===`bech32`?1:734539939,n=ma(5),r=n.decode,i=n.encode,a=ha(r);function o(e,n,r=90){ea(`bech32.encode prefix`,e),Zi(n)&&(n=Array.from(n)),ia(`bech32.encode`,n);let i=e.length;if(i===0)throw TypeError(`Invalid prefix length ${i}`);let a=i+7+n.length;if(r!==!1&&a>r)throw TypeError(`Length ${a} exceeds limit ${r}`);let o=e.toLowerCase(),s=ba(o,n,t);return`${o}1${_a.encode(n)}${s}`}function s(e,n=90){ea(`bech32.decode input`,e);let r=e.length;if(r<8||n!==!1&&r>n)throw TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);let i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw Error(`String must be lowercase or uppercase`);let a=i.lastIndexOf(`1`);if(a===0||a===-1)throw Error(`Letter "1" must be present between prefix and data only`);let o=i.slice(0,a),s=i.slice(a+1);if(s.length<6)throw Error(`Data must be at least 6 characters long`);let c=_a.decode(s).slice(0,-6),l=ba(o,c,t);if(!s.endsWith(l))throw Error(`Invalid checksum in ${e}: expected "${l}"`);return{prefix:o,words:c}}let c=ha(s);function l(e){let{prefix:t,words:n}=s(e,!1);return{prefix:t,words:n,bytes:r(n)}}function u(e,t){return o(e,i(t))}return{encode:o,decode:s,encodeFromBytes:u,decodeToBytes:l,decodeUnsafe:c,fromWords:r,fromWordsUnsafe:a,toWords:i}}var Sa=xa(`bech32`);xa(`bech32m`),typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`||aa(ma(4),oa(`0123456789abcdef`),sa(``),la(e=>{if(typeof e!=`string`||e.length%2!=0)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));var Ca=new TextDecoder(`utf-8`),wa=new TextEncoder,Ta=5e3;function Ea(e){let t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t}function Da(e){let{prefix:t,words:n}=Sa.decode(e,Ta),r=new Uint8Array(Sa.fromWords(n));switch(t){case`nprofile`:{let e=Oa(r);if(!e[0]?.[0])throw Error(`missing TLV 0 for nprofile`);if(e[0][0].length!==32)throw Error(`TLV 0 should be 32 bytes`);return{type:`nprofile`,data:{pubkey:Ki(e[0][0]),relays:e[1]?e[1].map(e=>Ca.decode(e)):[]}}}case`nevent`:{let e=Oa(r);if(!e[0]?.[0])throw Error(`missing TLV 0 for nevent`);if(e[0][0].length!==32)throw Error(`TLV 0 should be 32 bytes`);if(e[2]&&e[2][0].length!==32)throw Error(`TLV 2 should be 32 bytes`);if(e[3]&&e[3][0].length!==4)throw Error(`TLV 3 should be 4 bytes`);return{type:`nevent`,data:{id:Ki(e[0][0]),relays:e[1]?e[1].map(e=>Ca.decode(e)):[],author:e[2]?.[0]?Ki(e[2][0]):void 0,kind:e[3]?.[0]?parseInt(Ki(e[3][0]),16):void 0}}}case`naddr`:{let e=Oa(r);if(!e[0]?.[0])throw Error(`missing TLV 0 for naddr`);if(!e[2]?.[0])throw Error(`missing TLV 2 for naddr`);if(e[2][0].length!==32)throw Error(`TLV 2 should be 32 bytes`);if(!e[3]?.[0])throw Error(`missing TLV 3 for naddr`);if(e[3][0].length!==4)throw Error(`TLV 3 should be 4 bytes`);return{type:`naddr`,data:{identifier:Ca.decode(e[0][0]),pubkey:Ki(e[2][0]),kind:parseInt(Ki(e[3][0]),16),relays:e[1]?e[1].map(e=>Ca.decode(e)):[]}}}case`nsec`:return{type:t,data:r};case`npub`:case`note`:return{type:t,data:Ki(r)};default:throw Error(`unknown prefix ${t}`)}}function Oa(e){let t={},n=e;for(;n.length>0;){let e=n[0],r=n[1],i=n.slice(2,2+r);if(n=n.slice(2+r),i.length<r)throw Error(`not enough data to read on TLV ${e}`);t[e]=t[e]||[],t[e].push(i)}return t}function ka(e){return ja(`npub`,Yi(e))}function Aa(e,t){let n=Sa.toWords(t);return Sa.encode(e,n,Ta)}function ja(e,t){return Aa(e,t)}function Ma(e){let t;return e.kind!==void 0&&(t=Ea(e.kind)),Aa(`nevent`,Pa({0:[Yi(e.id)],1:(e.relays||[]).map(e=>wa.encode(e)),2:e.author?[Yi(e.author)]:[],3:t?[new Uint8Array(t)]:[]}))}function Na(e){let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e.kind,!1),Aa(`naddr`,Pa({0:[wa.encode(e.identifier)],1:(e.relays||[]).map(e=>wa.encode(e)),2:[Yi(e.pubkey)],3:[new Uint8Array(t)]}))}function Pa(e){let t=[];return Object.entries(e).reverse().forEach(([e,n])=>{n.forEach(n=>{let r=new Uint8Array(n.length+2);r.set([parseInt(e)],0),r.set([n.length],1),r.set(n,2),t.push(r)})}),Xi(...t)}var Fa=/^[0-9a-f]{64}$/;function Ia(e){return typeof e==`string`&&Fa.test(e)}var La=/^[0-9a-f]{64}$/i,Ra=`hsl(180 60% 68%)`;function za(e){let t=e.trim().toLowerCase();if(!La.test(t))return Ra;let n=2166136261,r=`${t.slice(0,16)}${t.slice(-16)}`;for(let e=0;e<r.length;e++)n^=r.charCodeAt(e),n=Math.imul(n,16777619);return`hsl(${(n>>>0)%360} 72% 66%)`}function Ba(e){return`color: ${za(e)}`}function Va(e){let t=globalThis.napplet;return t!=null&&t[e]!=null}var Ha=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function Ua(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Wa(e){if(!Ha.test(e))return!1;try{let t=new URL(e).protocol.toLowerCase();return t!==`data:`&&t!==`blob:`}catch{return!0}}function Ga(e){return typeof e==`object`&&e&&`source`in e?Ua(e.source):Ua(e)}function Ka(e,t){let n=null,r=null,i=null,a=0;function o(){r&&URL.revokeObjectURL(r),r=null}function c(t){t?e.src=t:e.removeAttribute(`src`)}function l(e){let t=Ga(e);if(t===n)return;if(n=t,a++,i?.abort(),i=null,o(),!t){c(null);return}if(!Wa(t)){c(t);return}if(c(null),!Va(`resource`))return;let l=a,u=new AbortController;i=u;let d;try{d=s(t,{signal:u.signal})}catch{i=null;return}d.then(e=>{if(l!==a||u.signal.aborted)return;let t=URL.createObjectURL(e);if(l!==a||u.signal.aborted){URL.revokeObjectURL(t);return}o(),r=t,c(t)}).catch(()=>{l===a&&c(null)}).finally(()=>{i===u&&(i=null)})}return l(t),{update:l,destroy(){a++,i?.abort(),i=null,o(),e.removeAttribute(`src`)}}}function qa(e,t){return Ka(e,t)}function Ja(e,t){return Ka(e,t)}var Ya=`note:open`,Xa=/^[0-9a-f]{64}$/;function Za(e){if(!Qa(e.target))return null;let t=e.relays?.filter((e,t,n)=>e.length>0&&n.indexOf(e)===t);return{target:t&&t.length>0?$a(e.target,t):e.target,...t&&t.length>0?{relays:t}:{},...e.source?{source:e.source}:{},...e.behavior?{behavior:e.behavior}:{}}}function Qa(e){return e.type===`event`?Xa.test(e.id)&&(e.kind===void 0||Number.isInteger(e.kind))&&(e.pubkey===void 0||Xa.test(e.pubkey)):Number.isInteger(e.kind)&&Xa.test(e.pubkey)&&typeof e.identifier==`string`}function $a(e,t){try{return e.type===`event`?{...e,nip19:Ma({id:e.id,relays:t,...e.pubkey?{author:e.pubkey}:{},...e.kind===void 0?{}:{kind:e.kind}})}:{...e,nip19:Na({kind:e.kind,pubkey:e.pubkey,identifier:e.identifier,relays:t})}}catch{return e}}var eo=`compose:open`,to=`good-morning`,no=[`client`,`@napplelets/good-morning`];function ro(e){return Za({target:{type:`event`,id:e.id,kind:e.kind,pubkey:e.pubkey},behavior:{focus:!0},source:{napplet:to}})}function io(e){let t=e.trim().replace(/^nostr:/i,``);if(!t)return null;try{let e=Da(t);if(e.type===`note`)return Za({target:{type:`event`,id:e.data,nip19:t},behavior:{focus:!0},source:{napplet:to}});if(e.type===`nevent`){let n=e.data;return Za({target:{type:`event`,id:n.id,...typeof n.kind==`number`?{kind:n.kind}:{},...typeof n.author==`string`?{pubkey:n.author}:{},nip19:t},...Array.isArray(n.relays)?{relays:n.relays}:{},behavior:{focus:!0},source:{napplet:to}})}if(e.type===`naddr`){let n=e.data;return Za({target:{type:`address`,kind:n.kind,pubkey:n.pubkey,identifier:n.identifier,nip19:t},...Array.isArray(n.relays)?{relays:n.relays}:{},behavior:{focus:!0},source:{napplet:to}})}}catch{return null}return null}function ao(e){return{kind:1,content:`GM`,tags:[[`e`,e.id,``,`reply`],[`p`,e.pubkey],[...no]],created_at:Math.floor(Date.now()/1e3)}}async function oo(e){let t=ao(e);return m.publish(t)}function so(e){return{source:{napplet:to},intent:`reply`,replyTo:{id:e.id,pubkey:e.pubkey,kind:e.kind,...typeof e.content==`string`?{content:e.content}:{},...typeof e.created_at==`number`?{created_at:e.created_at}:{}}}}var co=/\b(?:nostr:)?((?:npub|nprofile|note|nevent|naddr)1[023456789acdefghjklmnpqrstuvwxyz]+)\b/gi,lo=/\bhttps?:\/\/[^\s<>"']+/gi,uo=/\bblossom:sha256:[0-9a-f]{64}\b/gi,fo=/:([A-Za-z0-9_-]+):/g,po=/^[A-Za-z0-9_-]+$/,mo=/\.(?:png|jpe?g|gif|webp|avif)(?:[?#].*)?$/i,ho=/\.(?:mp4|webm|mov|m4v)(?:[?#].*)?$/i;function go(e,t=[]){let n=vo(e,t),r=[],i=0;for(let t of n)t.start<i||(t.start>i&&r.push({type:`text`,value:e.slice(i,t.start)}),r.push(t.block),i=t.end);return i<e.length&&r.push({type:`text`,value:e.slice(i)}),r}function _o(e,t=6,n={}){let r=n.includeProfiles??!0,i=n.includeEvents??!0,a=n.includeAddresses??!0,o=n.includeImageUrls??!0,s=n.includeVideoUrls??!0,c=n.includeResources??!0,l=[],u=new Set;for(let n of go(e)){if(n.type===`text`||n.type===`url`||n.type===`emoji`||n.type===`profile`&&!r||n.type===`event`&&!i||n.type===`address`&&!a||n.type===`resource`&&!c||n.type===`media`&&n.mediaType===`image`&&!o||n.type===`media`&&n.mediaType===`video`&&!s)continue;let e=`${n.type}:${n.value}`;u.has(e)||l.length>=t||(u.add(e),l.push(n))}return l}function vo(e,t){let n=[],r=yo(t);for(let t of e.matchAll(fo)){let e=t[1],i=e?r.get(e):void 0;if(!e||!i)continue;let a=t[0],o=t.index??0;n.push({start:o,end:o+a.length,block:{type:`emoji`,value:e,source:a,imageUrl:i}})}for(let t of e.matchAll(co)){let e=t[1];if(!e)continue;let r=bo(e,t[0].startsWith(`nostr:`)?t[0]:`nostr:${e}`);if(r){let e=t.index??0;n.push({start:e,end:e+t[0].length,block:r})}}for(let t of e.matchAll(lo)){let e=t[0].replace(/[),.;!?]+$/g,``),r=t.index??0;n.push({start:r,end:r+e.length,block:xo(e)??{type:`url`,value:e,source:e}})}for(let t of e.matchAll(uo)){let e=t[0].toLowerCase(),r=t.index??0;n.push({start:r,end:r+t[0].length,block:{type:`resource`,mediaType:`image`,value:e,source:e}})}return n.sort((e,t)=>e.start-t.start||t.end-t.start-(e.end-e.start))}function yo(e){let t=new Map;for(let n of e){let e=n[1],r=n[2];n[0]===`emoji`&&typeof e==`string`&&typeof r==`string`&&po.test(e)&&t.set(e,r)}return t}function bo(e,t){try{let n=Da(e);return n.type===`npub`?{type:`profile`,value:n.data,source:t}:n.type===`note`?{type:`event`,value:n.data,source:t}:n.type===`nprofile`?{type:`profile`,value:n.data.pubkey,source:t}:n.type===`nevent`?{type:`event`,value:n.data.id,source:t}:n.type===`naddr`?{type:`address`,value:`${n.data.kind}:${n.data.pubkey}:${n.data.identifier}`,source:t}:null}catch{return null}}function xo(e){return mo.test(e)?{type:`media`,mediaType:`image`,value:e,source:e}:ho.test(e)?{type:`media`,mediaType:`video`,value:e,source:e}:null}async function So(e){if(!Va(`link`))return!1;try{return(await h.open(e)).status===`opened`}catch{return!1}}var Co=Y(`<button type="button" class="gm-inline-link svelte-oqbg4h"> </button>`),wo=Y(`<a class="gm-inline-link svelte-oqbg4h"> </a>`),To=Y(`<span class="gm-inline-resource svelte-oqbg4h"><img alt="Good morning media" loading="lazy" class="svelte-oqbg4h"/></span>`),Eo=Y(`<span class="text-text-muted">[media unavailable]</span>`),Do=Y(`<span class="gm-inline-resource svelte-oqbg4h"><video controls="" preload="auto" class="svelte-oqbg4h"></video></span>`,2),Oo=Y(`<span class="gm-inline-resource svelte-oqbg4h"><img alt="GM attachment" loading="lazy" class="svelte-oqbg4h"/></span>`),ko=Y(`<span class="text-text-muted">[attachment unavailable]</span>`),Ao=Y(`<img class="gm-inline-emoji svelte-oqbg4h" loading="lazy"/>`),jo=Y(`<span class="gm-note-content svelte-oqbg4h"></span>`);function Mo(e,t){rt(t,!0);let n=ui(t,`emojiTags`,19,()=>[]),r=Va(`resource`),i=F(()=>go(t.content,n()));function a(e){Ia(e)&&f.emit(`profile:open`,[],JSON.stringify({pubkey:e}))}function o(e,t){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),So(t))}function s(e){let t=io(e);t&&f.emit(Ya,[],JSON.stringify(t))}var c=jo();Ur(c,23,()=>J(i),(e,t)=>`${t}:${e.type}:${e.value}`,(e,n)=>{var i=Pr(),c=_n(i),l=e=>{var t=Nr();H(()=>Z(t,J(n).value)),X(e,t)},u=e=>{var r=Co(),i=B(r);M(r),H(e=>Z(i,`@${e??``}`),[()=>t.profileLabel?.(J(n).value)??J(n).source.replace(/^nostr:/,``).slice(0,16)]),Tr(`click`,r,()=>a(J(n).value)),X(e,r)},d=e=>{var t=Co(),r=B(t);M(t),H(e=>Z(r,`${e??``}...`),[()=>J(n).source.replace(/^nostr:/,``).slice(0,24)]),Tr(`click`,t,()=>s(J(n).source)),X(e,t)},f=e=>{var t=wo(),r=B(t,!0);M(t),H(()=>{$(t,`href`,J(n).value),Z(r,J(n).value)}),Tr(`click`,t,e=>o(e,J(n).value)),X(e,t)},p=e=>{var t=Pr(),i=_n(t),a=e=>{var t=To(),r=B(t);Yr(r,(e,t)=>qa?.(e,t),()=>J(n).value),M(t),wr(r),X(e,t)},o=e=>{X(e,Eo())};Q(i,e=>{r?e(a):e(o,-1)}),X(e,t)},m=e=>{var t=Pr(),i=_n(t),a=e=>{var t=Do();Yr(B(t),(e,t)=>Ja?.(e,t),()=>J(n).value),M(t),X(e,t)},o=e=>{X(e,Eo())};Q(i,e=>{r?e(a):e(o,-1)}),X(e,t)},h=e=>{var t=Pr(),i=_n(t),a=e=>{var t=Oo(),r=B(t);Yr(r,(e,t)=>qa?.(e,t),()=>J(n).source),M(t),wr(r),X(e,t)},o=e=>{X(e,ko())};Q(i,e=>{r?e(a):e(o,-1)}),X(e,t)},g=e=>{var t=Pr(),i=_n(t),a=e=>{var t=Ao();Yr(t,(e,t)=>qa?.(e,t),()=>J(n).imageUrl),H(()=>$(t,`alt`,J(n).source)),wr(t),X(e,t)},o=e=>{var t=Nr();H(()=>Z(t,J(n).source)),X(e,t)};Q(i,e=>{r?e(a):e(o,-1)}),X(e,t)},_=e=>{var t=Nr();H(()=>Z(t,J(n).source)),X(e,t)};Q(c,e=>{J(n).type===`text`?e(l):J(n).type===`profile`?e(u,1):J(n).type===`event`||J(n).type===`address`?e(d,2):J(n).type===`url`?e(f,3):J(n).type===`media`&&J(n).mediaType===`image`?e(p,4):J(n).type===`media`&&J(n).mediaType===`video`?e(m,5):J(n).type===`resource`?e(h,6):J(n).type===`emoji`?e(g,7):e(_,-1)}),X(e,i)}),M(c),X(e,c),it()}Er([`click`]);var No=Y(`<img class="w-full h-full object-cover" loading="lazy"/>`),Po=Y(`<span class="text-text-muted text-xs font-mono"> </span>`),Fo=Y(`<span class="gm-check mt-2 w-7 h-7 rounded-full bg-accent-green text-bg-base flex items-center justify-center" title="You replied with a GM" aria-label="Responded with a GM"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg></span>`),Io=Y(`<div><div class="flex flex-col items-center flex-shrink-0"><button type="button" class="w-8 h-8 rounded-full overflow-hidden cursor-pointer bg-bg-surface border border-border-dim flex items-center justify-center"><!></button> <div class="flex-1"></div> <!></div> <div class="flex-1 min-w-0"><div class="flex items-baseline gap-2 mb-1"><button type="button" class="text-sm font-semibold font-mono truncate hover:underline cursor-pointer bg-transparent border-none p-0"> </button> <span class="text-text-muted text-xs flex-shrink-0"> </span></div> <div class="text-text-primary text-sm leading-relaxed break-words"><!></div> <div class="flex flex-wrap gap-2 mt-2"><button type="button" class="gm-action svelte-foj49s" data-gm-action="open">Open</button> <button type="button" class="gm-action gm-action-primary svelte-foj49s" data-gm-action="quick-gm"> </button> <button type="button" class="gm-action svelte-foj49s" data-gm-action="reply">GM Reply</button></div></div></div>`);function Lo(e,t){rt(t,!0);let n=Va(`resource`),r=L(`idle`);function i(e){try{return ka(e).slice(0,16)+`...`}catch{return e.slice(0,12)+`...`}}let a=F(()=>t.profile?.display_name??t.profile?.name??i(t.event.pubkey)),o=F(()=>t.profile?.picture??null),s=F(()=>(t.profile?.name??t.profile?.display_name??``).slice(0,2).toUpperCase()||t.event.pubkey.slice(0,2).toUpperCase()),c=F(()=>Vi(t.event.created_at*1e3));function l(){let e=ro(t.event);e&&f.emit(Ya,[],JSON.stringify(e))}async function u(){if(!(J(r)===`sending`||t.isRead)){R(r,`sending`);try{await oo(t.event),R(r,`sent`)}catch(e){console.error(`[good-morning] Quick GM publish failed:`,e),R(r,`error`)}}}function d(){f.emit(eo,[],JSON.stringify(so(t.event)))}function p(){Ia(t.event.pubkey)&&f.emit(`profile:open`,[],JSON.stringify({pubkey:t.event.pubkey}))}function m(e){let n=t.profiles.get(e);return n?.display_name??n?.name??i(e)}let h=F(()=>J(r)===`sending`||t.isRead),g=F(()=>J(r)===`sending`?`sending…`:t.isRead||J(r)===`sent`?`GM sent ✓`:J(r)===`error`?`retry GM`:`Quick GM`);var _=Io(),v=B(_),y=B(v),b=B(y),x=e=>{var t=No();Yr(t,(e,t)=>qa?.(e,t),()=>J(o)),H(()=>$(t,`alt`,J(a))),wr(t),X(e,t)},S=e=>{var t=Po(),n=B(t,!0);M(t),H(()=>Z(n,J(s))),X(e,t)};Q(b,e=>{n&&J(o)!=null?e(x):e(S,-1)}),M(y);var C=V(y,4),ee=e=>{X(e,Fo())};Q(C,e=>{t.isRead&&e(ee)}),M(v);var w=V(v,2),T=B(w),te=B(T),ne=B(te,!0);M(te);var re=V(te,2),ie=B(re,!0);M(re),M(T);var ae=V(T,2);Mo(B(ae),{get content(){return t.event.content},get emojiTags(){return t.event.tags},profileLabel:m}),M(ae);var oe=V(ae,2),se=B(oe),ce=V(se,2),E=B(ce,!0);M(ce);var D=V(ce,2);M(oe),M(w),M(_),H(e=>{ti(_,1,`gm-row flex gap-2 p-2 border-b border-border-dim transition-colors ${t.isRead?`opacity-80`:`bg-accent-green/5`}`),$(_,`data-gm-note-id`,t.event.id),$(_,`data-gm-is-read`,t.isRead),$(y,`aria-label`,`Open profile for ${J(a)??``}`),ri(te,e),$(te,`data-gm-author-pubkey`,t.event.pubkey),Z(ne,J(a)),Z(ie,J(c)),ce.disabled=J(h),$(ce,`data-gm-quick-state`,J(r)),Z(E,J(g))},[()=>Ba(t.event.pubkey)]),Tr(`click`,y,p),Tr(`click`,te,p),Tr(`click`,se,l),Tr(`click`,ce,u),Tr(`click`,D,d),X(e,_),it()}Er([`click`]);function Ro(e){let t=_o(e,1,{includeProfiles:!1,includeEvents:!1,includeAddresses:!1,includeImageUrls:!0,includeVideoUrls:!1,includeResources:!0})[0];return t?t.source:null}function zo(e){let t=[];for(let n of e){let e=Ro(n.content);e&&t.push({note:n,imageSource:e})}return t}var Bo=Y(`<div class="p-4 text-text-muted font-mono text-sm">no GM images to show today</div>`),Vo=Y(`<img loading="lazy" class="svelte-1cxt3ee"/>`),Ho=Y(`<span class="gm-tile-unavailable svelte-1cxt3ee">media unavailable</span>`),Uo=Y(`<span class="gm-tile-avatar-fallback svelte-1cxt3ee"> </span>`),Wo=Y(`<span class="gm-tile-check svelte-1cxt3ee" title="You replied with a GM" aria-label="Responded with a GM"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg></span>`),Go=Y(`<figure class="gm-tile svelte-1cxt3ee"><button type="button" class="gm-tile-image svelte-1cxt3ee" aria-label="Open GM note"><!> <span class="gm-tile-avatar svelte-1cxt3ee"><!></span> <!></button> <figcaption class="gm-tile-caption svelte-1cxt3ee"> </figcaption></figure>`),Ko=Y(`<div class="gm-gallery svelte-1cxt3ee"></div>`);function qo(e,t){rt(t,!0);let n=Va(`resource`),r=F(()=>zo(t.threads.map(e=>e.note))),i=F(()=>new Map(t.threads.map(e=>[e.note.id,e.isRead])));function a(e){try{return ka(e).slice(0,16)+`...`}catch{return e.slice(0,12)+`...`}}function o(e){let n=t.profiles.get(e);return n?.display_name??n?.name??a(e)}function s(e){return t.profiles.get(e)?.picture??null}function c(e){let n=t.profiles.get(e);return(n?.name??n?.display_name??``).slice(0,2).toUpperCase()||e.slice(0,2).toUpperCase()}function l(e){let t=ro(e);t&&f.emit(Ya,[],JSON.stringify(t))}var u=Pr(),d=_n(u),p=e=>{X(e,Bo())},m=e=>{var t=Ko();Ur(t,21,()=>J(r),e=>e.note.id,(e,t)=>{var r=Go(),a=B(r),u=B(a),d=e=>{var n=Vo();Yr(n,(e,t)=>qa?.(e,t),()=>J(t).imageSource),H(()=>$(n,`alt`,J(t).note.content)),wr(n),X(e,n)},f=e=>{X(e,Ho())};Q(u,e=>{n?e(d):e(f,-1)});var p=V(u,2),m=B(p),h=e=>{var n=Vo();Yr(n,(e,t)=>qa?.(e,t),()=>s(J(t).note.pubkey)),H(e=>$(n,`alt`,e),[()=>o(J(t).note.pubkey)]),wr(n),X(e,n)},g=F(()=>n&&s(J(t).note.pubkey)!=null),_=e=>{var n=Uo(),r=B(n,!0);M(n),H(e=>Z(r,e),[()=>c(J(t).note.pubkey)]),X(e,n)};Q(m,e=>{J(g)?e(h):e(_,-1)}),M(p);var v=V(p,2),y=e=>{X(e,Wo())},b=F(()=>J(i).get(J(t).note.id));Q(v,e=>{J(b)&&e(y)}),M(a);var x=V(a,2),S=B(x,!0);M(x),M(r),H(e=>{$(a,`data-gm-note-id`,J(t).note.id),$(p,`title`,e),$(p,`data-gm-author-pubkey`,J(t).note.pubkey),$(x,`title`,J(t).note.content),Z(S,J(t).note.content)},[()=>o(J(t).note.pubkey)]),Tr(`click`,a,()=>l(J(t).note)),X(e,r)}),M(t),X(e,t)};Q(d,e=>{J(r).length===0?e(p):e(m,-1)}),X(e,u),it()}Er([`click`]);var Jo=Y(`<button type="button" role="radio"> </button>`),Yo=Y(`<button type="button" role="radio"> <span class="gm-filter-count svelte-1midz0k"> </span></button>`),Xo=Y(`<div class="p-4 text-text-muted font-mono text-sm animate-pulse">loading contacts…</div>`),Zo=Y(`<div class="p-4 text-text-muted font-mono text-sm animate-pulse">scanning for GMs…</div>`),Qo=Y(`<div class="p-4 text-text-muted font-mono text-sm">no GMs from your contacts today</div>`),$o=Y(`<div class="p-4 text-text-muted font-mono text-sm"> </div>`),es=Y(`<div class="gm-inbox flex flex-col h-full bg-bg-base"><div class="flex items-center gap-2 px-3 py-2 border-b border-border-dim flex-shrink-0"><span class="text-sm font-semibold font-mono text-accent-green">GM</span> <span class="text-text-muted text-xs"> </span> <div class="flex-1"></div> <div class="gm-filter flex svelte-1midz0k" role="radiogroup" aria-label="View mode"></div> <div class="gm-filter flex svelte-1midz0k" role="radiogroup" aria-label="Filter GMs"></div></div> <div class="flex-1 overflow-y-auto"><!></div></div>`);function ts(e,t){rt(t,!0);let n=L(ln(new Map)),r=L(ln(new Map)),i=L(0),a=L(!1),o=L(!1);function s(){let e=c.state;R(n,new Map(e.gmNotes),!0),R(r,new Map(e.userReplies),!0),R(i,e.contactCount,!0),R(a,e.contactsLoaded,!0),R(o,e.scanning,!0),C([...e.gmNotes.values()])}let c=Ti(s),l=F(()=>wi(J(n),J(r))),u=F(()=>J(l).filter(e=>!e.isRead).length),d=F(()=>J(l).length-J(u)),f=L(`all`),p=[{id:`all`,label:`All`},{id:`unreplied`,label:`Unreplied`},{id:`replied`,label:`Replied`}];function m(e){return e===`replied`?J(d):e===`unreplied`?J(u):J(l).length}let h=F(()=>J(f)===`all`?J(l):J(f)===`replied`?J(l).filter(e=>e.isRead):J(l).filter(e=>!e.isRead)),g=L(`list`),_=[{id:`list`,label:`List`},{id:`gallery`,label:`Gallery`}],v=L(ln(new Map)),y=new Set,b=new Set,x=new Set,S=null;function C(e){let t=e.map(e=>e.pubkey).filter(e=>e.length>0&&!y.has(e)&&!J(v).has(e));if(t.length!==0){for(let e of t)x.add(e);S===null&&(S=setTimeout(()=>{S=null,ee()},250))}}function ee(){let e=[...x].filter(e=>!y.has(e)&&!J(v).has(e));if(x.clear(),e.length!==0){for(let t of e)y.add(t);try{let t=ki(e,(e,t)=>{R(v,new Map(J(v)).set(e,t),!0),y.delete(e)});b.add(t)}catch{for(let t of e)y.delete(t)}}}On(()=>{c.setPubkey(t.pubkey)}),di(()=>()=>{S!==null&&(clearTimeout(S),S=null);for(let e of b)e.close();b.clear(),c.destroy()});var w=es(),T=B(w),te=V(B(T),2),ne=B(te);M(te);var re=V(te,4);Ur(re,21,()=>_,e=>e.id,(e,t)=>{var n=Jo(),r=B(n,!0);M(n),H(()=>{$(n,`aria-checked`,J(g)===J(t).id),ti(n,1,`gm-filter-btn ${J(g)===J(t).id?`is-active`:``}`,`svelte-1midz0k`),$(n,`data-gm-view-option`,J(t).id),Z(r,J(t).label)}),Tr(`click`,n,()=>R(g,J(t).id,!0)),X(e,n)}),M(re);var ie=V(re,2);Ur(ie,21,()=>p,e=>e.id,(e,t)=>{var n=Yo(),r=B(n),i=V(r),a=B(i,!0);M(i),M(n),H(e=>{$(n,`aria-checked`,J(f)===J(t).id),ti(n,1,`gm-filter-btn ${J(f)===J(t).id?`is-active`:``}`,`svelte-1midz0k`),$(n,`data-gm-filter-option`,J(t).id),Z(r,`${J(t).label??``} `),Z(a,e)},[()=>m(J(t).id)]),Tr(`click`,n,()=>R(f,J(t).id,!0)),X(e,n)}),M(ie),M(T);var ae=V(T,2),oe=B(ae),se=e=>{X(e,Xo())},ce=e=>{X(e,Zo())},E=e=>{X(e,Qo())},D=e=>{var t=$o(),n=B(t,!0);M(t),H(()=>Z(n,J(f)===`replied`?`no replied GMs yet`:`no unreplied GMs — all caught up`)),X(e,t)},le=e=>{qo(e,{get threads(){return J(h)},get profiles(){return J(v)}})},ue=e=>{var t=Pr();Ur(_n(t),17,()=>J(h),e=>e.note.id,(e,t)=>{{let n=F(()=>J(v).get(J(t).note.pubkey));Lo(e,{get event(){return J(t).note},get isRead(){return J(t).isRead},get profile(){return J(n)},get profiles(){return J(v)}})}}),X(e,t)};Q(oe,e=>{J(a)?J(l).length===0&&J(o)?e(ce,1):J(l).length===0?e(E,2):J(h).length===0?e(D,3):J(g)===`gallery`?e(le,4):e(ue,-1):e(se)}),M(ae),M(w),H(()=>{$(w,`data-gm-contact-count`,J(i)),$(w,`data-gm-pending`,J(u)),$(w,`data-gm-thread-count`,J(l).length),$(w,`data-gm-filter`,J(f)),$(w,`data-gm-view`,J(g)),$(w,`data-gm-visible-count`,J(h).length),Z(ne,`${J(i)??``} contacts`)}),X(e,w),it()}Er([`click`]);var ns=Y(`<div class="gm-nap-banner flex items-center gap-2 px-3 py-2 border-b border-border-dim bg-accent-amber/10 text-xs font-mono flex-shrink-0" role="status" data-gm-nap-banner=""><span class="text-accent-amber font-semibold flex-shrink-0">⚠ limited runtime</span> <span class="text-text-secondary truncate"> </span> <div class="flex-1"></div> <button type="button" class="gm-nap-dismiss text-text-muted hover:text-text-primary flex-shrink-0" aria-label="Dismiss runtime warning">dismiss</button></div>`),rs=Y(`<li class="border border-accent-red/40 rounded p-3 bg-accent-red/5" data-gm-nap-severity="essential"><div class="flex items-center gap-2 mb-1"><span class="text-[10px] uppercase tracking-wide text-accent-red border border-accent-red/50 rounded px-1.5 py-0.5">required</span> <code class="text-sm text-text-primary font-semibold"> </code></div> <p class="text-text-secondary text-xs leading-relaxed"> </p></li>`),is=Y(`<li class="border border-border-dim rounded p-3" data-gm-nap-severity="degraded"><div class="flex items-center gap-2 mb-1"><span class="text-[10px] uppercase tracking-wide text-accent-amber border border-accent-amber/50 rounded px-1.5 py-0.5">optional</span> <code class="text-sm text-text-primary font-semibold"> </code></div> <p class="text-text-secondary text-xs leading-relaxed"> </p></li>`),as=Y(`<details class="mt-4" data-gm-degraded-details=""><summary class="text-text-muted text-xs cursor-pointer hover:text-text-primary"> </summary> <ul class="flex flex-col gap-2 mt-2"></ul></details>`),os=Y(`<div class="gm-nap-screen h-full w-full overflow-y-auto bg-bg-base text-text-primary font-mono" role="alert" data-gm-nap-screen=""><div class="max-w-lg mx-auto px-5 py-8"><div class="text-accent-red text-sm font-semibold mb-1">⛔ Runtime missing NAP APIs</div> <h1 class="text-lg font-semibold mb-2">good-morning can't start here</h1> <p class="text-text-secondary text-sm leading-relaxed mb-2">This napplet needs host capabilities (NAPs) that the current runtime does not expose. It's a
        debugging napplet, so instead of failing silently it lists exactly what's missing.</p> <div class="text-text-muted text-xs uppercase tracking-wide mt-4 mb-2">Required — missing</div> <ul class="flex flex-col gap-2"></ul> <!></div></div>`);function ss(e,t){rt(t,!0);let n=ui(t,`variant`,3,`screen`),r=L(!1),i=F(()=>t.report.missingEssential),a=F(()=>t.report.missingDegraded),o=F(()=>J(a).map(e=>e.label).join(`, `));var s=Pr(),c=_n(s),l=e=>{var t=Pr(),n=_n(t),i=e=>{var t=ns(),n=V(B(t),2),i=B(n);M(n);var s=V(n,4);M(t),H(()=>{$(t,`data-gm-missing-degraded`,J(a).length),Z(i,`${J(o)??``} unavailable — ${J(a).length===1?`that feature is`:`those features are`}
        degraded.`)}),Tr(`click`,s,()=>R(r,!0)),X(e,t)};Q(n,e=>{J(r)||e(i)}),X(e,t)},u=e=>{var t=os(),n=B(t),r=V(B(n),8);Ur(r,21,()=>J(i),e=>e.domain,(e,t)=>{var n=rs(),r=B(n),i=V(B(r),2),a=B(i,!0);M(i),M(r);var o=V(r,2),s=B(o,!0);M(o),M(n),H(()=>{$(n,`data-gm-missing-nap`,J(t).domain),Z(a,J(t).label),Z(s,J(t).purpose)}),X(e,n)}),M(r);var o=V(r,2),s=e=>{var t=as(),n=B(t),r=B(n);M(n);var i=V(n,2);Ur(i,21,()=>J(a),e=>e.domain,(e,t)=>{var n=is(),r=B(n),i=V(B(r),2),a=B(i,!0);M(i),M(r);var o=V(r,2),s=B(o,!0);M(o),M(n),H(()=>{$(n,`data-gm-missing-nap`,J(t).domain),Z(a,J(t).label),Z(s,J(t).purpose)}),X(e,n)}),M(i),M(t),H(()=>Z(r,`${J(a).length??``} optional NAP${J(a).length===1?``:`s`} also unavailable`)),X(e,t)};Q(o,e=>{J(a).length>0&&e(s)}),M(n),M(t),H(()=>$(t,`data-gm-missing-essential`,J(i).length)),X(e,t)};Q(c,e=>{n()===`banner`?e(l):e(u,-1)}),X(e,s),it()}Er([`click`]);var cs=[{domain:e,label:`NAP-IDENTITY`,purpose:`Reads your public key and follow list (kind 3) so the inbox knows whose GMs to load.`,severity:`essential`},{domain:`inc`,label:`NAP-INC`,purpose:`Follows identity changes and opens notes, profiles, and the composer when you tap a row.`,severity:`essential`},{domain:c,label:`NAP-OUTBOX`,purpose:`Routes note fetches to each author's own relays and publishes your Quick GM replies.`,severity:`essential`},{domain:a,label:`NAP-RESOURCE`,purpose:`Loads contact avatar images. Falls back to initials when absent.`,severity:`degraded`},{domain:t,label:`NAP-THEME`,purpose:`Applies the host shell theme. Falls back to built-in colors when absent.`,severity:`degraded`},{domain:l,label:`NAP-LINK`,purpose:`Opens external URLs through the shell-owned opener. Links are dead without it.`,severity:`degraded`}];function ls(e,t){let n=e.map(e=>{let n=t(e.domain);return{...e,domainPresent:n,available:n}}),r=n.filter(e=>!e.available);return{statuses:n,missing:r,missingEssential:r.filter(e=>e.severity===`essential`),missingDegraded:r.filter(e=>e.severity===`degraded`),ok:r.every(e=>e.severity!==`essential`)}}function us(e=cs){return ls(e,Va)}var ds=Y(`<div class="flex items-center justify-center h-full"><p class="text-text-muted text-sm animate-pulse">checking runtime…</p></div>`),fs=Y(`<div class="flex items-center justify-center h-full"><p class="text-text-muted text-sm">not logged in</p></div>`),ps=Y(`<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>`),ms=Y(`<div class="app h-screen w-screen overflow-hidden bg-bg-base text-text-primary font-mono"><!></div>`);function hs(e,t){rt(t,!0);let n=L(null),r=ln(us());di(()=>{if(!r?.ok)return;let e=new AbortController,t=t=>{e.signal.aborted||R(n,t,!0)},i=null;try{i=p.onChanged(t)}catch{i=null}return hi(p,{signal:e.signal,onError:e=>console.error(`[good-morning/App] getPublicKey failed:`,e)}).then(t=>{!e.signal.aborted&&!J(n)&&t&&R(n,t,!0)}),()=>{e.abort(),i?.close()}});var i=ms(),a=B(i),o=e=>{X(e,ds())},s=e=>{ss(e,{get report(){return r}})},c=e=>{var t=ps(),i=B(t),a=e=>{ss(e,{get report(){return r},variant:`banner`})};Q(i,e=>{r.missingDegraded.length>0&&e(a)});var o=V(i,2),s=B(o),c=e=>{ts(e,{get pubkey(){return J(n)}})},l=e=>{X(e,fs())};Q(s,e=>{J(n)==null?e(l,-1):e(c)}),M(o),M(t),X(e,t)};Q(a,e=>{r==null?e(o):r.missingEssential.length>0?e(s,1):e(c,-1)}),M(i),X(e,i),it()}b(),Fr(hs,{target:document.getElementById(`app`)});</script>
    <style>*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute{position:absolute}.relative{position:relative}.grid{display:grid}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.hidden{display:none}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.max-w-lg{max-width:32rem}.min-h-0{min-height:0}.min-w-0{min-width:0}.w-7{width:1.75rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.break-words{overflow-wrap:break-word}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-accent-amber\/50{border-color:rgb(var(--hg-accent-amber-rgb) / .5)}.border-accent-red\/40{border-color:rgb(var(--hg-accent-red-rgb) / .4)}.border-accent-red\/50{border-color:rgb(var(--hg-accent-red-rgb) / .5)}.border-border-dim{--un-border-opacity:1;border-color:rgb(var(--hg-border-dim-rgb) / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border-none{border-style:none}.bg-accent-amber\/10{background-color:rgb(var(--hg-accent-amber-rgb) / .1)}.bg-accent-green{--un-bg-opacity:1;background-color:rgb(var(--hg-accent-green-rgb) / var(--un-bg-opacity))}.bg-accent-green\/5{background-color:rgb(var(--hg-accent-green-rgb) / .05)}.bg-accent-red\/5{background-color:rgb(var(--hg-accent-red-rgb) / .05)}.bg-bg-base{--un-bg-opacity:1;background-color:rgb(var(--hg-bg-base-rgb) / var(--un-bg-opacity))}.bg-bg-surface{--un-bg-opacity:1;background-color:rgb(var(--hg-bg-surface-rgb) / var(--un-bg-opacity))}.bg-transparent{background-color:#0000}.object-cover{object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.text-\[10px\]{font-size:10px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-accent-amber{--un-text-opacity:1;color:rgb(var(--hg-accent-amber-rgb) / var(--un-text-opacity))}.text-accent-green{--un-text-opacity:1;color:rgb(var(--hg-accent-green-rgb) / var(--un-text-opacity))}.text-accent-red{--un-text-opacity:1;color:rgb(var(--hg-accent-red-rgb) / var(--un-text-opacity))}.text-bg-base{--un-text-opacity:1;color:rgb(var(--hg-bg-base-rgb) / var(--un-text-opacity))}.text-text-muted{--un-text-opacity:1;color:rgb(var(--hg-text-muted-rgb) / var(--un-text-opacity))}.text-text-primary{--un-text-opacity:1;color:rgb(var(--hg-text-primary-rgb) / var(--un-text-opacity))}.text-text-secondary{--un-text-opacity:1;color:rgb(var(--hg-text-secondary-rgb) / var(--un-text-opacity))}.hover\:text-text-primary:hover{--un-text-opacity:1;color:rgb(var(--hg-text-primary-rgb) / var(--un-text-opacity))}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.font-mono{font-family:var(--hg-font-mono,ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace)}.uppercase{text-transform:uppercase}.underline,.hover\:underline:hover{text-decoration-line:underline}.opacity-80{opacity:.8}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.gm-note-content.svelte-oqbg4h{white-space:pre-wrap}.gm-inline-link.svelte-oqbg4h{color:var(--hg-accent-green,#9be564);font:inherit;cursor:pointer;overflow-wrap:anywhere;background:0 0;border:none;padding:0;text-decoration:underline}.gm-inline-resource.svelte-oqbg4h{margin-top:6px;display:block}.gm-inline-resource.svelte-oqbg4h img:where(.svelte-oqbg4h),.gm-inline-resource.svelte-oqbg4h video:where(.svelte-oqbg4h){border:1px solid var(--hg-border-dim,#3a3a3a);object-fit:contain;border-radius:6px;max-width:min(100%,360px);max-height:260px}.gm-inline-emoji.svelte-oqbg4h{vertical-align:-.2em;object-fit:contain;width:1.25em;height:1.25em;display:inline-block}.gm-action.svelte-foj49s{border:1px solid var(--hg-border-dim,#3a3a3a);font-size:12px;font-family:var(--hg-font-mono,monospace);color:var(--hg-text-muted,#b8b1a4);cursor:pointer;background:0 0;border-radius:4px;padding:2px 10px;transition:color .12s,border-color .12s,background .12s}.gm-action.svelte-foj49s:hover:not(:disabled){color:var(--hg-text-primary,#f5f1e8);border-color:var(--hg-text-muted,#b8b1a4)}.gm-action.svelte-foj49s:disabled{opacity:.6;cursor:default}.gm-action-primary.svelte-foj49s{color:var(--hg-accent-green,#9be564);border-color:color-mix(in srgb, var(--hg-accent-green,#9be564) 45%, transparent)}.gm-action-primary.svelte-foj49s:hover:not(:disabled){color:var(--hg-accent-green,#9be564);background:color-mix(in srgb, var(--hg-accent-green,#9be564) 12%, transparent);border-color:var(--hg-accent-green,#9be564)}.gm-gallery.svelte-1cxt3ee{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;padding:12px;display:grid}.gm-tile.svelte-1cxt3ee{flex-direction:column;gap:6px;margin:0;display:flex}.gm-tile-image.svelte-1cxt3ee{aspect-ratio:1;border:1px solid var(--hg-border-dim,#3a3a3a);background:var(--hg-bg-surface,#1a1a1a);cursor:pointer;border-radius:6px;width:100%;padding:0;transition:border-color .12s,transform .12s;display:block;position:relative;overflow:hidden}.gm-tile-unavailable.svelte-1cxt3ee{width:100%;height:100%;color:var(--hg-text-muted,#b8b1a4);place-items:center;font-size:.75rem;display:grid}.gm-tile-avatar.svelte-1cxt3ee,.gm-tile-check.svelte-1cxt3ee{z-index:1;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;overflow:hidden}.gm-tile-avatar.svelte-1cxt3ee{border:2px solid var(--hg-bg-base,#14110c);background:var(--hg-bg-surface,#1a1a1a);border-radius:9999px;width:28px;height:28px;top:6px;left:6px;box-shadow:0 1px 3px #00000073}.gm-tile-avatar.svelte-1cxt3ee img:where(.svelte-1cxt3ee){object-fit:cover;width:100%;height:100%;display:block}.gm-tile-avatar-fallback.svelte-1cxt3ee{font-size:10px;font-family:var(--hg-font-mono,monospace);color:var(--hg-text-muted,#b8b1a4)}.gm-tile-check.svelte-1cxt3ee{width:24px;height:24px;color:var(--hg-bg-base,#14110c);background:var(--hg-accent-green,#9be564);border-radius:9999px;bottom:6px;right:6px;box-shadow:0 1px 3px #00000073}.gm-tile-image.svelte-1cxt3ee:hover{border-color:var(--hg-accent-green,#9be564);transform:translateY(-1px)}.gm-tile-image.svelte-1cxt3ee img:where(.svelte-1cxt3ee){object-fit:cover;width:100%;height:100%;display:block}.gm-tile-caption.svelte-1cxt3ee{font-size:11px;line-height:1.4;font-family:var(--hg-font-mono,monospace);color:var(--hg-text-muted,#b8b1a4);-webkit-line-clamp:2;word-break:break-word;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.gm-filter.svelte-1midz0k{border:1px solid var(--hg-border-dim,#3a3a3a);border-radius:4px;overflow:hidden}.gm-filter-btn.svelte-1midz0k{font-size:11px;font-family:var(--hg-font-mono,monospace);color:var(--hg-text-muted,#b8b1a4);border:none;border-left:1px solid var(--hg-border-dim,#3a3a3a);cursor:pointer;background:0 0;align-items:center;gap:5px;padding:2px 8px;transition:color .12s,background .12s;display:inline-flex}.gm-filter-btn.svelte-1midz0k:first-child{border-left:none}.gm-filter-btn.svelte-1midz0k:hover{color:var(--hg-text-primary,#f5f1e8)}.gm-filter-btn.is-active.svelte-1midz0k{color:var(--hg-accent-green,#9be564);background:color-mix(in srgb, var(--hg-accent-green,#9be564) 14%, transparent)}.gm-filter-count.svelte-1midz0k{opacity:.75;font-size:10px}
/*$vite$:1*/</style>
    <meta name="napplet-type" content="good-morning">
    <meta name="napplet-requires" content="identity,inc,link,outbox,resource,theme">
  </head>
  <body>
    <div id="app"></div>
  </body>
</html>