From 2157fa769a85cc158ba52e8370dd0bff05bcb7f7 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 14:21:35 +0100 Subject: [PATCH] fix: refine composer reply focus --- ...{index-DnVRnSi7.css => index-BddjDjB3.css} | 2 +- .../webassets/dist/assets/index-Ci-0jUjM.js | 72 ------- .../webassets/dist/assets/index-vInMpaH9.js | 72 +++++++ apps/api/internal/webassets/dist/index.html | 4 +- apps/web/src/ChatApp.svelte | 204 +++++++++--------- apps/web/src/styles.css | 118 ++++++---- tests/e2e/type-to-focus.spec.ts | 24 +++ 7 files changed, 286 insertions(+), 210 deletions(-) rename apps/api/internal/webassets/dist/assets/{index-DnVRnSi7.css => index-BddjDjB3.css} (59%) delete mode 100644 apps/api/internal/webassets/dist/assets/index-Ci-0jUjM.js create mode 100644 apps/api/internal/webassets/dist/assets/index-vInMpaH9.js diff --git a/apps/api/internal/webassets/dist/assets/index-DnVRnSi7.css b/apps/api/internal/webassets/dist/assets/index-BddjDjB3.css similarity index 59% rename from apps/api/internal/webassets/dist/assets/index-DnVRnSi7.css rename to apps/api/internal/webassets/dist/assets/index-BddjDjB3.css index 5bd09c7..1d54edd 100644 --- a/apps/api/internal/webassets/dist/assets/index-DnVRnSi7.css +++ b/apps/api/internal/webassets/dist/assets/index-BddjDjB3.css @@ -1 +1 @@ -.product-site{min-height:100vh;background:#f7f3ea;color:#151716;font-family:Avenir Next,Segoe UI,ui-sans-serif,system-ui,sans-serif}.product-site a{color:inherit;text-decoration:none}.hero{position:relative;display:grid;min-height:clamp(680px,92vh,920px);overflow:hidden;isolation:isolate;background:linear-gradient(90deg,#0c1f23c7,#0c1f232e 62%,#0c1f23b3),#103033;color:#fff8ee}.hero:after{position:absolute;inset:auto 0 0;height:22vh;min-height:130px;background:linear-gradient(0deg,#f7f3ea 8%,#f7f3ea00);content:"";z-index:-1}.hero:before{position:absolute;inset:0 38% 0 0;background:linear-gradient(90deg,#081c1efa,#081c1e00);content:"";z-index:-1}.hero-bg{position:absolute;inset:0 0 0 clamp(260px,28vw,460px);display:grid;grid-template-columns:92px minmax(360px,1fr) minmax(260px,28vw);gap:18px;padding:102px clamp(18px,5vw,70px) 80px;opacity:.36;z-index:-2}.workspace-rail,.timeline-preview,.thread-preview{border:1px solid rgba(255,248,238,.24);background:#fff8ee1f;box-shadow:0 28px 90px #0000003d;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.workspace-rail{display:grid;align-content:start;gap:14px;padding:16px}.workspace-rail span{display:grid;place-items:center;min-height:54px;border-radius:8px;background:#fff8ee2e;color:#fff8ee;font-weight:900;text-transform:uppercase}.timeline-preview{align-self:stretch;padding:clamp(18px,3vw,34px)}.preview-top{display:flex;justify-content:space-between;margin-bottom:48px;color:#b9ddd9;font-weight:800}.preview-top strong{color:#7ce0b5}.timeline-preview article,.thread-preview{max-width:720px;margin:0 0 18px;border-radius:8px;background:#fff8ee29;padding:18px}.timeline-preview b,.thread-preview span{color:#ff8a70}.timeline-preview p,.thread-preview p{margin:6px 0 0;color:#fff8ee;font-size:clamp(17px,1.8vw,24px)}.timeline-preview code{border-radius:5px;background:#0c1f2394;padding:2px 5px}.thread-line{margin-left:clamp(0px,8vw,130px)}.thread-preview{align-self:center;min-height:260px}.product-nav{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px clamp(18px,5vw,70px);font-weight:800}.product-nav>div{display:flex;gap:clamp(14px,3vw,34px)}.brand-lockup{display:inline-flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#ff6f55;color:#151716;font-weight:950;text-transform:uppercase}.hero-copy{position:relative;z-index:2;align-self:center;width:min(780px,calc(100vw - 36px));padding:0 clamp(18px,5vw,70px) 16vh}.eyebrow,.section-kicker{margin:0 0 14px;color:#ffb09f;font-size:13px;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.hero h1,.product-band h2{margin:0;letter-spacing:0}.hero h1{font-family:Georgia,Times New Roman,serif;font-size:clamp(66px,13vw,152px);font-weight:900;line-height:.9}.lede{width:min(680px,100%);margin:26px 0 0;color:#fff3df;font-size:clamp(20px,2.2vw,31px);line-height:1.18}.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:32px}.primary-action,.secondary-action{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border-radius:8px;padding:0 18px;font-weight:950}.primary-action{background:#ff6f55;color:#151716}.secondary-action{border:1px solid rgba(255,248,238,.42);color:#fff8ee}.product-band{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(280px,1.1fr);gap:clamp(28px,6vw,90px);padding:clamp(58px,8vw,112px) clamp(18px,5vw,70px)}.product-band h2{max-width:720px;font-size:clamp(34px,5vw,74px);line-height:.96}.product-band p{margin:0;color:#3f4743;font-size:clamp(18px,2.1vw,27px);line-height:1.34}.intro-band{padding-top:0}.intro-band .section-kicker,.cli-band .section-kicker,.docs-band .section-kicker{color:#b84632}.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-block:1px solid #c8c0b2}.feature-grid article{min-height:250px;border-right:1px solid #c8c0b2;padding:clamp(22px,3vw,40px)}.feature-grid article:nth-child(2n){background:#e8f0e9}.feature-grid article:last-child{border-right:0}.feature-grid h3{margin:0 0 44px;font-size:24px}.feature-grid p{margin:0;color:#48504c;line-height:1.45}.cli-band{background:#162a2d;color:#fff8ee}.cli-band p{color:#c9d8d4}.cli-band pre{overflow:auto;align-self:start;margin:0;border:1px solid rgba(255,248,238,.18);border-radius:8px;background:#071314;color:#bdf1dc;padding:clamp(18px,3vw,32px);line-height:1.7}.docs-band{background:#fffaf0}.destination-list{display:grid;gap:12px}.destination-list a{display:flex;justify-content:space-between;gap:20px;border-top:1px solid #cbc2b3;padding:18px 0;font-size:clamp(21px,3vw,40px);font-weight:900}.destination-list span{color:#6f7772;font-size:15px;font-weight:700;text-align:right}@media(prefers-color-scheme:dark){.product-site{background:#101616;color:#fff8ee}.hero:after{background:linear-gradient(0deg,#101616 8%,#10161600)}.product-band p,.feature-grid p,.destination-list span{color:#bac7c3}.feature-grid{border-color:#34413e}.feature-grid article{border-color:#34413e}.feature-grid article:nth-child(2n),.docs-band{background:#182221}}@media(max-width:900px){.hero:before{inset-right:0}.hero-bg{inset:0;grid-template-columns:58px minmax(0,1fr);padding-top:90px;opacity:.38}.thread-preview{display:none}.product-band,.feature-grid{grid-template-columns:1fr}.feature-grid article,.feature-grid article:last-child{min-height:0;border-right:0;border-bottom:1px solid #c8c0b2}}@media(max-width:620px){.product-nav{align-items:flex-start;flex-direction:column}.hero{min-height:760px}.hero-bg{grid-template-columns:1fr;opacity:.42}.workspace-rail{display:none}.hero-copy{padding-bottom:90px}.destination-list a{flex-direction:column}.destination-list span{text-align:left}}:root{color-scheme:light dark;font-family:Inter,SF Pro Text,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:"ss01","cv11";--rail: #e9e1d7;--bg: #f7f3ed;--panel: #fffaf2;--panel-2: #efe7dc;--panel-3: #e4dbcf;--hover: rgba(16, 32, 39, .05);--hover-strong: rgba(16, 32, 39, .08);--line: rgba(16, 32, 39, .1);--line-strong: rgba(16, 32, 39, .16);--text: #22201d;--text-strong: #11100e;--muted: #6f675f;--muted-2: #958b80;--accent: #dd5d45;--accent-2: #006d77;--accent-soft: rgba(221, 93, 69, .16);--accent-glow: 0 0 0 1px rgba(221, 93, 69, .28), 0 8px 30px -12px rgba(221, 93, 69, .45);--success: #168b51;--warn: #f5b050;--danger: #c84343;--shadow: 0 24px 60px -24px rgba(16, 32, 39, .32);--radius-sm: 6px;--radius: 8px;--radius-lg: 14px;--radius-xl: 18px;background:var(--bg);color:var(--text)}@media(prefers-color-scheme:dark){:root{--rail: #0d0e12;--bg: #131419;--panel: #1a1b22;--panel-2: #20222b;--panel-3: #272a35;--hover: rgba(255, 255, 255, .04);--hover-strong: rgba(255, 255, 255, .07);--line: rgba(255, 255, 255, .07);--line-strong: rgba(255, 255, 255, .12);--text: #e7e9ee;--text-strong: #ffffff;--muted: #8a8f9c;--muted-2: #5d626d;--accent: #6f7eff;--accent-2: #5666ee;--accent-soft: rgba(111, 126, 255, .18);--accent-glow: 0 0 0 1px rgba(111, 126, 255, .4), 0 8px 30px -12px rgba(111, 126, 255, .6);--success: #2ecc71;--warn: #f5b050;--danger: #ff6b6b;--shadow: 0 24px 60px -20px rgba(0, 0, 0, .6)}}*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%}body{background:radial-gradient(1000px 600px at 0% 0%,rgba(111,126,255,.08),transparent 60%),radial-gradient(900px 700px at 100% 100%,rgba(255,130,200,.05),transparent 60%),var(--bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}input,textarea{background:transparent;border:0;outline:0}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:#ffffff0f;border-radius:999px;border:2px solid transparent;background-clip:content-box}::-webkit-scrollbar-thumb:hover{background:#ffffff1f;background-clip:content-box}.auth-shell{display:grid;min-height:100vh;place-items:center;padding:32px;background:radial-gradient(700px 500px at 30% 20%,rgba(111,126,255,.18),transparent 60%),radial-gradient(700px 500px at 80% 90%,rgba(255,110,196,.12),transparent 60%),var(--bg)}.auth-panel{display:grid;gap:22px;width:min(100%,440px);border:1px solid var(--line-strong);border-radius:var(--radius-xl);background:linear-gradient(180deg,#ffffff0a,#fff0) var(--panel);box-shadow:var(--shadow);padding:36px}.auth-brand{display:flex;align-items:center;gap:12px}.auth-brand .mark{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;font-weight:800;letter-spacing:-.02em;box-shadow:0 10px 24px -8px #6f7effb3}.auth-brand .brand-text strong{display:block;color:var(--text-strong);letter-spacing:-.01em}.auth-brand .brand-text span{display:block;color:var(--muted);font-size:12px}.auth-copy{display:grid;gap:8px;margin-top:8px}.auth-copy h1{margin:0;font-size:28px;letter-spacing:-.02em;color:var(--text-strong)}.auth-copy p{margin:0;color:var(--muted);line-height:1.5}.github-login{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;border-radius:12px;background:#0d1117;color:#fff;font-weight:600;text-decoration:none;border:1px solid #2b2f36;transition:transform 80ms ease,background .12s ease,border-color .12s ease}.github-login:hover{background:#161b22;border-color:#3f4750;transform:translateY(-1px)}.auth-foot{margin:0;color:var(--muted-2);font-size:12px;text-align:center}.shell{display:grid;grid-template-columns:72px 260px minmax(0,1fr) 0;height:100vh;min-height:100vh;overflow:hidden;transition:grid-template-columns .22s cubic-bezier(.2,.8,.2,1)}.shell.thread-open{grid-template-columns:72px 260px minmax(0,1fr) minmax(340px,28vw)}.shell.sidebar-collapsed{grid-template-columns:72px 0 minmax(0,1fr) 0}.shell.sidebar-collapsed.thread-open{grid-template-columns:72px 0 minmax(0,1fr) minmax(340px,28vw)}.guild-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 0;background:var(--rail);border-right:1px solid var(--line);overflow-y:auto;position:relative}.guild-rail .guild{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:var(--panel-2);color:var(--text);border:0;font-weight:700;font-size:14px;letter-spacing:-.02em;position:relative;transition:border-radius .14s ease,background .12s ease,transform .12s ease;box-shadow:0 1px #ffffff0a inset}.guild-rail .guild:hover{border-radius:12px;background:var(--accent);color:#fff;box-shadow:0 8px 24px -10px #6f7eff99}.guild-rail .guild.home{background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;font-weight:800}.guild-rail .guild.home:hover{border-radius:12px;filter:brightness(1.1)}.guild-rail .guild.add{background:transparent;color:var(--success);border:1px dashed rgba(46,204,113,.4)}.guild-rail .guild.add:hover{background:#2ecc711f;color:#fff;border-style:solid;border-color:var(--success)}.guild-divider{width:36px;height:1px;background:var(--line-strong);margin:4px 0}.guild-list{display:flex;flex-direction:column;align-items:center;gap:8px}.guild-wrap{position:relative}.guild-wrap:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%) scaleY(.2);width:4px;height:28px;border-radius:0 4px 4px 0;background:var(--text-strong);opacity:0;transition:opacity .14s ease,transform .14s ease}.guild-wrap:hover:before{opacity:.6;transform:translateY(-50%) scaleY(.5)}.guild-wrap.active:before{opacity:1;transform:translateY(-50%) scaleY(1)}.guild-wrap.active .guild{border-radius:14px;background:var(--accent);color:#fff}.guild-create{position:absolute;left:100%;top:14px;margin-left:8px;background:var(--panel);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px;box-shadow:var(--shadow);z-index:20}.guild-create input{height:32px;padding:0 10px;width:200px;border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text)}.sidebar{display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--panel);border-right:1px solid var(--line);overflow:hidden;min-width:0;transition:opacity .16s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.sidebar-collapsed .sidebar{opacity:0;pointer-events:none;transform:translate(-14px)}.workspace-header{padding:14px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;min-height:60px}.sidebar-collapse{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:8px;background:var(--panel-2);color:var(--muted);transition:color .12s ease,background .12s ease,transform .12s ease}.sidebar-collapse:hover{background:var(--panel-3);color:var(--text-strong);transform:translate(-1px)}.workspace-name{display:flex;flex-direction:column;gap:2px;min-width:0}.workspace-name strong{color:var(--text-strong);letter-spacing:-.01em;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-name .presence{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:11px}.workspace-name .presence:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--muted-2)}.workspace-name .presence.online{color:var(--success)}.workspace-name .presence.online:before{background:var(--success);box-shadow:0 0 0 3px #2ecc712e}.sidebar-scroll{overflow-y:auto;padding:12px 8px 16px}.nav-section+.nav-section{margin-top:12px}.section-title{display:flex;align-items:center;gap:6px;width:100%;border:0;background:transparent;color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:700;letter-spacing:.04em;padding:6px 8px;border-radius:var(--radius-sm)}.section-title:hover{color:var(--text);background:var(--hover)}.section-title .caret{font-size:10px;opacity:.7}.section-title .label{flex:1;text-align:left}.section-title .add-button{width:18px;height:18px;border-radius:4px;display:grid;place-items:center;font-size:14px;font-weight:700;background:#ffffff0f;color:var(--text)}.section-title:hover .add-button{background:var(--accent);color:#fff}.nav-list{display:flex;flex-direction:column;gap:1px;margin-top:4px}.nav-item{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);text-align:left;padding:6px 10px;min-height:30px;transition:background .1s ease,color .1s ease}.nav-item:hover{background:var(--hover);color:var(--text)}.nav-item.active{background:var(--accent-soft);color:var(--text-strong)}.nav-item .hash{color:var(--muted);font-weight:600;width:14px;text-align:center}.nav-item.active .hash{color:var(--accent)}.nav-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.nav-empty{margin:4px 8px;color:var(--muted-2);font-size:12px}.dm-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,hsl(var(--hue, 220deg) 70% 55%),hsl(calc(var(--hue, 220deg) + 40deg) 70% 45%));flex-shrink:0;overflow:hidden}.dm-avatar img,.avatar img{width:100%;height:100%;display:block;object-fit:cover}.presence-dot{width:8px;height:8px;border-radius:50%;background:var(--muted-2);flex-shrink:0}.presence-dot.active{background:var(--success);box-shadow:0 0 0 2px var(--panel)}.inline-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;margin:6px 4px 2px}.inline-create input{width:100%;min-width:0;height:30px;padding:0 10px;border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text);border:1px solid var(--line)}.inline-create input:focus{border-color:var(--accent);background:var(--panel-3)}.inline-create button.ghost,button.ghost{width:30px;height:30px;border:0;border-radius:var(--radius-sm);background:var(--panel-3);color:var(--muted);font-weight:600;padding:0;font-size:14px;display:grid;place-items:center}.inline-create button.ghost:hover{background:var(--accent);color:#fff}.user-card{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;background:var(--panel-2);border-top:1px solid var(--line);border-right:0;border-bottom:0;border-left:0;color:inherit;text-align:left;cursor:pointer;transition:background .12s ease}.user-card:hover{background:var(--panel-3)}.user-card .dm-avatar{width:28px;height:28px;font-size:12px}.user-card .user-meta{flex:1;min-width:0}.user-card .user-meta strong{display:block;color:var(--text-strong);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-card .user-meta span{display:block;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline{display:flex;flex-direction:column;min-width:0;background:var(--bg);overflow:hidden}.timeline>*{min-width:0;flex-shrink:0}.timeline>.messages{flex:1 1 0;min-height:0}.topbar{display:flex;align-items:center;gap:14px;padding:12px 20px;min-height:60px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.02),transparent),var(--bg)}.topbar-title{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.topbar-title h1{margin:0;font-size:16px;font-weight:700;letter-spacing:-.01em;color:var(--text-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-title h1.with-glyph:first-letter{color:var(--muted);margin-right:1px}.topbar-divider{width:1px;height:18px;background:var(--line-strong);margin:0 6px}.topbar-meta{margin:0;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search{display:flex;align-items:center;gap:8px;width:min(280px,30vw);height:34px;padding:0 10px;border-radius:var(--radius);background:var(--panel);border:1px solid var(--line);color:var(--muted);transition:border-color .12s ease,background .12s ease}.search:focus-within{border-color:var(--accent);background:var(--panel-2);color:var(--text)}.search input{flex:1;min-width:0;height:100%;color:var(--text)}.search input::placeholder{color:var(--muted)}.search-clear{width:18px;height:18px;border-radius:50%;border:0;background:var(--panel-3);color:var(--muted);display:grid;place-items:center;font-size:14px;line-height:1}.search-clear:hover{background:var(--accent);color:#fff}.search-submit{height:22px;padding:0 8px;border:0;border-radius:5px;background:var(--accent-soft);color:var(--accent);font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.search-submit:hover{background:var(--accent);color:#fff}.topbar-actions{display:inline-flex;align-items:center;gap:6px}.topbar-actions button{width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--muted);transition:background .12s ease,color .12s ease,border-color .12s ease,transform 80ms ease}.topbar-actions button:hover,.topbar-actions button.active{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 55%,transparent);color:var(--accent)}.topbar-actions button:active{transform:translateY(1px)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.search-results{display:flex;flex-direction:column;gap:2px;padding:10px 14px 14px;border-bottom:1px solid var(--line);background:var(--panel);max-height:280px;overflow-y:auto}.search-results-head{display:flex;align-items:center;justify-content:space-between;padding:0 6px 8px}.search-results-head strong{color:var(--text-strong);font-size:13px}.search-results-head button{border:0;background:transparent;color:var(--muted);font-size:12px;padding:4px 8px;border-radius:var(--radius-sm)}.search-results-head button:hover{background:var(--hover);color:var(--text)}.search-result{display:flex;align-items:flex-start;gap:10px;border:0;background:transparent;color:var(--text);padding:8px;border-radius:var(--radius-sm);text-align:left}.search-result:hover{background:var(--hover)}.search-result .dm-avatar{width:30px;height:30px;font-size:13px}.search-result-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.search-result-body>div{display:flex;align-items:baseline;gap:8px}.search-result-body strong{color:var(--text-strong);font-size:13px}.search-result-body time{color:var(--muted);font-size:11px}.search-result-body span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages{overflow-y:auto;padding:16px 4px 24px;scroll-behavior:smooth}.empty{display:grid;place-items:center;align-content:center;text-align:center;gap:10px;min-height:50vh;padding:48px 24px}.empty-icon{width:64px;height:64px;border-radius:18px;background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;display:grid;place-items:center;font-size:26px;font-weight:800;box-shadow:0 18px 40px -16px #6f7effb3}.empty strong{color:var(--text-strong);font-size:18px;letter-spacing:-.01em}.empty span{color:var(--muted);max-width:380px;line-height:1.5}.day-divider{display:flex;align-items:center;gap:12px;margin:18px 18px 8px;position:sticky;top:0;z-index:1;pointer-events:none}.day-divider:before,.day-divider:after{content:"";flex:1;height:1px;background:var(--line)}.day-divider span{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:4px 12px;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.message-group{display:grid;grid-template-columns:56px minmax(0,1fr);padding:8px 18px;position:relative}.message-group:hover{background:var(--hover)}.avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:14px;background:linear-gradient(135deg,hsl(var(--hue, 220deg) 70% 55%),hsl(calc(var(--hue, 220deg) + 40deg) 70% 45%));box-shadow:0 6px 20px -10px #0009;margin-top:2px;overflow:hidden}.avatar-button{position:relative;z-index:2;border:0;padding:0;cursor:pointer;transition:transform .1s ease,box-shadow .12s ease,filter .12s ease}.avatar-button:hover{transform:translateY(-1px);filter:brightness(1.05);box-shadow:0 10px 24px -12px #000c}.avatar.small{width:30px;height:30px;font-size:12px;border-radius:10px}.avatar.large{width:56px;height:56px;border-radius:16px;font-size:18px;margin:0}.group-body{min-width:0}.group-body>header{display:flex;align-items:baseline;gap:8px;margin-bottom:2px}.group-body>header strong{color:var(--text-strong);font-size:14.5px;letter-spacing:-.005em;font-weight:700}.author-name{border:0;background:transparent;color:var(--text-strong);padding:0;border-radius:4px;font-size:14.5px;letter-spacing:0;font-weight:700}.author-name:hover{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.group-body>header time{color:var(--muted);font-size:11px}.group-body>header span{color:var(--muted);font-size:12px}.message-row{margin-left:-56px;padding:1px 0 1px 56px;position:relative;border-radius:0;transition:background 80ms ease}.message-row:not(:first-child){margin-top:1px}.message-row:hover{background:var(--hover-strong)}.message-row.selected{background:var(--accent-soft)}.message-row.selected:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}.row-stamp{position:absolute;left:8px;top:4px;font-size:10px;color:var(--muted-2);opacity:0;font-variant-numeric:tabular-nums}.message-row:hover .row-stamp{opacity:1}.message-content{min-width:0}.message-actions{display:flex;align-items:flex-start;gap:4px;opacity:0;transform:translateY(-50%);position:absolute;right:8px;top:0;background:var(--panel);border:1px solid var(--line-strong);border-radius:8px;padding:2px;box-shadow:var(--shadow);transition:opacity .1s ease,transform .1s ease}.message-row:hover .message-actions,.message-row.selected .message-actions{opacity:1}.message-actions button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--muted)}.message-actions button:hover{background:var(--hover-strong);color:var(--text-strong)}.markdown{line-height:1.5;color:var(--text);font-size:14.5px;overflow-wrap:anywhere;word-break:break-word}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown p{margin:0}.markdown p+p,.markdown ul,.markdown ol,.markdown blockquote,.markdown pre{margin-top:6px}.markdown a{color:var(--accent);text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{background:var(--panel-2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}.markdown pre{background:var(--panel-2);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;overflow-x:auto}.markdown pre code{background:transparent;border:0;padding:0}.markdown blockquote{border-left:3px solid var(--accent);margin:0;padding:4px 0 4px 12px;color:var(--muted)}.markdown ul,.markdown ol{padding-left:22px}.markdown img{max-width:100%;max-height:360px;border-radius:var(--radius);margin-top:6px;border:1px solid var(--line);object-fit:contain;background:var(--panel);cursor:zoom-in}.attachment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,280px));gap:8px;margin-top:8px}.attachment-grid.compact{grid-template-columns:minmax(0,1fr)}.image-attachment,.video-attachment,.file-attachment{color:inherit;text-decoration:none}.image-attachment,.video-attachment{position:relative;display:block;width:100%;overflow:hidden;padding:0;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--panel);box-shadow:0 12px 30px -24px #000c;text-align:left;cursor:zoom-in;transition:border-color .12s ease,transform .12s ease,box-shadow .12s ease}.image-attachment:hover{border-color:color-mix(in srgb,var(--accent) 42%,var(--line));transform:translateY(-1px);box-shadow:0 16px 36px -26px #000000e6}.video-attachment{cursor:default}.image-attachment img{display:block;width:100%;max-height:320px;object-fit:cover}.video-attachment video{display:block;width:100%;max-height:360px;background:#05070d}.image-attachment span{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 16px);padding:4px 8px;border-radius:999px;background:#00000094;color:#fff;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.video-attachment a{display:block;padding:8px 10px;color:var(--muted);font-size:12px;text-decoration:none;background:var(--panel-2)}.video-attachment a:hover{color:var(--text-strong)}.file-attachment{display:flex;align-items:center;gap:10px;max-width:360px;padding:10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.file-attachment:hover{border-color:var(--line-strong);background:var(--panel-2)}.file-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-weight:800}.file-attachment strong,.file-attachment small{display:block}.file-attachment strong{color:var(--text-strong);font-size:13px}.file-attachment small{color:var(--muted);font-size:11px}.composer{padding:10px 18px 18px;background:var(--bg);display:grid;gap:0;position:relative}.composer-toolbar{display:inline-flex;align-items:center;gap:4px;width:100%;padding:6px 8px;border:1px solid var(--line);border-bottom:0;border-radius:var(--radius-lg) var(--radius-lg) 0 0;background:color-mix(in srgb,var(--panel-2) 72%,var(--panel));box-shadow:none}.composer-toolbar button{min-width:30px;height:28px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;transition:background .1s ease,color .1s ease,transform 80ms ease}.composer-toolbar button:hover,.composer-toolbar button.active{background:var(--accent-soft);color:var(--accent)}.composer-toolbar button:active{transform:translateY(1px)}.gif-picker{margin-top:8px;margin-bottom:8px;width:min(520px,calc(100vw - 40px));border:1px solid var(--line-strong);border-radius:16px;background:color-mix(in srgb,var(--panel) 96%,transparent);box-shadow:var(--shadow);padding:10px;animation:picker-in .16s cubic-bezier(.2,.8,.2,1)}.gif-picker-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:2px 2px 10px}.gif-picker-head strong{color:var(--text-strong);font-size:13px}.gif-picker-head input{min-width:0;height:32px;padding:0 10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-2)}.gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:240px;overflow-y:auto}.gif-grid button{position:relative;overflow:hidden;aspect-ratio:4 / 3;border:0;border-radius:12px;background:var(--panel-2);color:#fff;padding:0;box-shadow:inset 0 0 0 1px var(--line);transition:transform .12s ease,box-shadow .12s ease}.gif-grid button:hover{transform:translateY(-2px);box-shadow:inset 0 0 0 2px var(--accent),0 14px 30px -22px #000c}.gif-grid img{width:100%;height:100%;display:block;object-fit:cover}.gif-grid span{position:absolute;left:6px;right:6px;bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;background:#0000008f;padding:4px 7px;font-size:10.5px;font-weight:700;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes picker-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.composer-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:6px;padding:10px 8px 8px 10px;background:var(--panel);border:1px solid var(--line-strong);border-radius:0 0 var(--radius-lg) var(--radius-lg);transition:border-color .12s ease,box-shadow .12s ease}.composer:focus-within .composer-toolbar,.composer-row:focus-within{border-color:var(--accent)}.composer-row:focus-within{box-shadow:var(--accent-glow)}.composer-icon{width:36px;height:36px;display:grid;place-items:center;color:var(--muted);border-radius:10px;cursor:pointer;transition:background .12s ease,color .12s ease}.composer-icon:hover{background:var(--hover-strong);color:var(--text-strong)}.composer-icon input[type=file]{position:absolute;inline-size:1px;block-size:1px;opacity:0;pointer-events:none}.composer textarea,.reply-composer textarea{width:100%;height:auto;min-height:36px;max-height:50vh;padding:8px 4px;resize:none;color:var(--text);line-height:1.45;font-size:14.5px;align-self:end;overflow-y:auto;box-sizing:border-box}.composer textarea::placeholder,.reply-composer textarea::placeholder{color:var(--muted)}.send{width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:10px;background:var(--accent);color:#fff;transition:background .12s ease,transform 80ms ease,opacity .12s ease}.send:hover:not(:disabled){background:var(--accent-2);transform:translateY(-1px)}.send:disabled{background:var(--panel-3);color:var(--muted-2);cursor:not-allowed}.composer-attachment{margin-top:8px;margin-bottom:8px;display:inline-flex;align-items:center;gap:8px;padding:6px 10px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);color:var(--text);font-size:13px;width:fit-content}.attachment-icon{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:var(--accent-soft);color:var(--accent)}.pending-image{width:42px;height:32px;object-fit:cover;border-radius:7px;border:1px solid var(--line);background:var(--panel-2)}.attachment-name{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-remove{width:18px;height:18px;border:0;background:transparent;color:var(--muted);border-radius:50%;font-size:14px;line-height:1}.attachment-remove:hover{background:var(--danger);color:#fff}.composer-hint{color:var(--muted-2);font-size:11px;padding:7px 4px 0}.composer-hint kbd{display:inline-block;background:var(--panel-2);border:1px solid var(--line);border-radius:4px;padding:0 5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10.5px;color:var(--text)}.thread{display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--panel);border-left:1px solid var(--line);min-width:0;overflow:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.thread.open{opacity:1;transform:translate(0);pointer-events:auto}.thread>header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;min-height:60px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.02),transparent),var(--panel)}.thread>header p,.thread>header strong{margin:0}.thread>header p{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:700}.thread>header strong{display:block;color:var(--text-strong);font-size:14px}.thread .close{width:28px;height:28px;border:0;border-radius:50%;background:var(--panel-2);color:var(--muted);font-size:18px;line-height:1}.thread .close:hover{background:var(--panel-3);color:var(--text-strong)}.thread-scroll{overflow-y:auto;padding:12px 16px}.thread-root{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}.thread-divider{display:flex;align-items:center;gap:10px;margin:14px 0 10px}.thread-divider:before,.thread-divider:after{content:"";flex:1;height:1px;background:var(--line)}.thread-divider span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:700}.reply-list{display:flex;flex-direction:column;gap:10px}.reply{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:6px;border-radius:var(--radius-sm)}.reply:hover{background:var(--hover)}.reply-composer{padding:10px 14px 14px;background:var(--panel);border-top:1px solid var(--line)}.reply-composer .composer-row{border-radius:var(--radius-lg)}.thread-empty{display:grid;place-items:center;align-content:center;gap:8px;padding:32px 24px;text-align:center;grid-row:span 3}.thread-icon{width:56px;height:56px;border-radius:16px;background:var(--panel-2);color:var(--muted);display:grid;place-items:center}.thread-empty strong{color:var(--text-strong);font-size:15px}.thread-empty span{color:var(--muted);font-size:13px;max-width:260px;line-height:1.5}.profile-pane{overflow-y:auto}.profile-hero{min-height:210px;display:grid;place-items:end center;padding:28px 20px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.24)),linear-gradient(135deg,hsl(var(--hue, 220deg) 76% 58%),hsl(calc(var(--hue, 220deg) + 54deg) 74% 38%));border-bottom:1px solid var(--line)}.profile-avatar{width:min(240px,70%);aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:16px;background:#ffffff2e;color:#fff;font-size:clamp(48px,12vw,88px);font-weight:800;box-shadow:0 26px 60px -30px #000000e6}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-pane-body{display:grid;gap:18px;padding:18px 16px 22px}.profile-pane-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.profile-pane-title h2{margin:0;color:var(--text-strong);font-size:22px;letter-spacing:0}.profile-pane-title span{display:block;margin-top:3px;color:var(--muted);font-size:13px}.text-action{border:0;border-radius:6px;background:transparent;color:var(--accent);font-size:13px;font-weight:700;padding:4px 6px}.text-action:hover{background:var(--accent-soft)}.profile-presence{display:inline-flex;align-items:center;gap:8px;color:var(--text);font-size:14px}.profile-actions-row{display:flex;gap:8px;flex-wrap:wrap}.profile-actions-row .primary-action,.profile-actions-row .ghost-action{min-width:110px}.profile-info{display:grid;gap:12px;padding-top:18px;border-top:1px solid var(--line)}.profile-info header{display:flex;align-items:center;justify-content:space-between;gap:10px}.profile-info header strong{color:var(--text-strong);font-size:14px}.profile-info-row{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center}.info-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:var(--panel-2);color:var(--muted);font-size:11px;font-weight:800}.profile-info-row small,.profile-info-row span{display:block}.profile-info-row small{color:var(--muted);font-size:11px}.profile-info-row span{color:var(--text);font-size:13px;overflow-wrap:anywhere}.profile-note{margin:0;color:var(--muted);line-height:1.5;font-size:13px}.modal-scrim{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:24px;background:#05080f8a;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.modal-backdrop{position:absolute;inset:0;border:0;background:transparent}.profile-modal{position:relative;z-index:1;width:min(480px,100%);border:1px solid var(--line-strong);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:var(--shadow);overflow:hidden}.profile-modal>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid var(--line);background:var(--panel-2)}.profile-modal p{margin:0 0 3px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.profile-modal h2{margin:0;color:var(--text-strong);font-size:20px;letter-spacing:0}.profile-modal>header button{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:22px}.profile-modal>header button:hover{background:var(--hover);color:var(--text-strong)}.profile-form{display:grid;gap:14px;padding:20px}.profile-preview{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-2)}.profile-preview strong,.profile-preview span{display:block}.profile-preview strong{color:var(--text-strong);font-size:15px}.profile-preview span{color:var(--muted);font-size:13px}.field{display:grid;gap:6px}.field span{color:var(--muted);font-size:12px;font-weight:700}.field input{width:100%;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text)}.field input:focus{border-color:var(--accent);outline:0;box-shadow:0 0 0 3px var(--accent-soft)}.profile-status{color:var(--success);font-size:12px}.profile-status.error{color:var(--danger)}.profile-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}.ghost-action,.primary-action{height:36px;padding:0 14px;border-radius:var(--radius-sm);font-weight:700}.ghost-action{border:1px solid var(--line);background:var(--panel);color:var(--text)}.primary-action{border:0;background:var(--accent);color:#fff}.ghost-action:hover{background:var(--hover)}.primary-action:hover{filter:brightness(1.04)}.image-viewer-scrim{padding:28px;background:#000000c7;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.image-viewer{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr);width:min(1120px,100%);max-height:min(86vh,900px);overflow:hidden;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:#07090f;color:#fff;box-shadow:0 34px 90px -34px #000000f2;animation:picker-in .15s cubic-bezier(.2,.8,.2,1)}.image-viewer>header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:10px 12px 10px 16px;border-bottom:1px solid rgba(255,255,255,.1);background:#ffffff0a}.image-viewer>header strong{min-width:0;overflow:hidden;color:#fff;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.image-viewer>header div{display:inline-flex;align-items:center;gap:8px;flex-shrink:0}.image-viewer>header a{height:30px;display:inline-flex;align-items:center;padding:0 10px;border-radius:7px;background:#ffffff14;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.image-viewer>header a:hover{background:#ffffff24}.image-viewer>header button{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#ffffffc7;font-size:22px;line-height:1}.image-viewer>header button:hover{background:#ffffff1f;color:#fff}.image-viewer-stage{display:grid;place-items:center;min-height:0;padding:18px}.image-viewer-stage img{display:block;max-width:100%;max-height:calc(86vh - 96px);object-fit:contain;border-radius:8px;background:#ffffff0a}.mobile-nav-toggle{display:none;position:fixed;top:14px;left:14px;z-index:30;width:38px;height:38px;border-radius:10px;border:1px solid var(--line-strong);background:var(--panel);color:var(--text);font-size:22px;line-height:1}.mobile-nav-toggle .bars{display:grid;gap:3px}.mobile-nav-toggle .bars i{display:block;width:16px;height:2px;background:currentColor;border-radius:2px}@media(max-width:1180px){.shell{grid-template-columns:72px 240px minmax(0,1fr)}.shell.sidebar-collapsed,.shell.sidebar-collapsed.thread-open{grid-template-columns:72px 0 minmax(0,1fr)}.thread{position:fixed;inset:0 0 0 auto;width:min(420px,100vw);box-shadow:var(--shadow);transform:translate(100%);transition:transform .18s ease;z-index:4;border-left:1px solid var(--line-strong)}.thread.open{transform:translate(0)}}@media(max-width:820px){.mobile-nav-toggle{display:grid;place-items:center}.shell,.shell.thread-open,.shell.sidebar-collapsed,.shell.sidebar-collapsed.thread-open{grid-template-columns:1fr}.sidebar-collapsed .sidebar{opacity:1;pointer-events:auto;transform:translate(-100%)}.guild-rail,.sidebar{position:fixed;inset:0 auto 0 0;z-index:20;transform:translate(-100%);transition:transform .18s ease}.guild-rail{width:72px}.sidebar{left:72px;width:260px}.nav-open .guild-rail,.nav-open .sidebar{transform:translate(0)}.topbar{padding-left:64px}.search{width:180px}}@media(max-width:520px){.search,.topbar-meta,.topbar-divider{display:none}}.message-row.highlight,.thread-root.highlight,.reply.highlight{animation:quote-flash 1.4s ease-out}@keyframes quote-flash{0%{background:#6366f138}to{background:transparent}}.quote-block{display:inline-flex;align-items:stretch;gap:.5rem;margin:0 0 .35rem;padding:.25rem .5rem .25rem 0;background:transparent;border:0;border-radius:6px;color:inherit;cursor:pointer;text-align:left;max-width:100%;font:inherit}.quote-block:hover:not(:disabled){background:#6366f114}.quote-block:disabled{cursor:default;opacity:.75}.quote-block .quote-bar{width:3px;align-self:stretch;background:var(--accent, #6366f1);border-radius:2px;flex:0 0 3px}.quote-block .quote-content{display:flex;flex-direction:column;gap:.1rem;min-width:0}.quote-block .quote-author{font-size:.78rem;font-weight:600;color:var(--accent, #6366f1)}.quote-block .quote-snippet{font-size:.85rem;color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56ch}.quote-block .quote-snippet.muted{font-style:italic;opacity:.75}.quote-preview{display:flex;align-items:stretch;gap:.5rem;padding:.4rem .5rem;margin-bottom:.4rem;background:#6366f114;border-left:3px solid var(--accent, #6366f1);border-radius:6px;font-size:.85rem}.quote-preview .quote-bar{display:none}.quote-preview-body{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0}.quote-preview-label{font-size:.75rem;color:var(--text-muted, #6b7280)}.quote-preview-snippet{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text, inherit)}.quote-preview-clear{background:transparent;border:0;color:var(--text-muted, #6b7280);font-size:1.1rem;line-height:1;cursor:pointer;padding:0 .25rem}.quote-preview-clear:hover{color:var(--text, inherit)}.reply-quote-btn{position:relative;margin-left:auto;background:transparent;border:0;color:var(--text-muted, #6b7280);cursor:pointer;font-size:.95rem;padding:0 .3rem;opacity:0;transition:opacity .15s}.reply:hover .reply-quote-btn,.thread-root:hover .reply-quote-btn,.reply-quote-btn:focus-visible{opacity:1}.reply-quote-btn:hover{color:var(--accent, #6366f1)}.tooltip{position:relative}.tooltip:before,.reply-quote-btn:before{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 12px);z-index:20;transform:translate(-50%,4px) scale(.96);padding:.42rem .62rem;border-radius:9px;background:#3a3a44;color:#f4f4f7;box-shadow:0 10px 28px #00000047;font-size:.78rem;font-weight:700;line-height:1;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.tooltip:after,.reply-quote-btn:after{content:"";position:absolute;left:50%;bottom:calc(100% + 5px);z-index:20;width:12px;height:12px;border-radius:2px;background:#3a3a44;transform:translate(-50%,4px) rotate(45deg) scale(.9);opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.tooltip:hover:before,.tooltip:focus-visible:before,.reply-quote-btn:hover:before,.reply-quote-btn:focus-visible:before,.tooltip:hover:after,.tooltip:focus-visible:after,.reply-quote-btn:hover:after,.reply-quote-btn:focus-visible:after{opacity:1;transform:translate(-50%) scale(1)}.tooltip:hover:after,.tooltip:focus-visible:after,.reply-quote-btn:hover:after,.reply-quote-btn:focus-visible:after{transform:translate(-50%) rotate(45deg) scale(1)} +.product-site{min-height:100vh;background:#f7f3ea;color:#151716;font-family:Avenir Next,Segoe UI,ui-sans-serif,system-ui,sans-serif}.product-site a{color:inherit;text-decoration:none}.hero{position:relative;display:grid;min-height:clamp(680px,92vh,920px);overflow:hidden;isolation:isolate;background:linear-gradient(90deg,#0c1f23c7,#0c1f232e 62%,#0c1f23b3),#103033;color:#fff8ee}.hero:after{position:absolute;inset:auto 0 0;height:22vh;min-height:130px;background:linear-gradient(0deg,#f7f3ea 8%,#f7f3ea00);content:"";z-index:-1}.hero:before{position:absolute;inset:0 38% 0 0;background:linear-gradient(90deg,#081c1efa,#081c1e00);content:"";z-index:-1}.hero-bg{position:absolute;inset:0 0 0 clamp(260px,28vw,460px);display:grid;grid-template-columns:92px minmax(360px,1fr) minmax(260px,28vw);gap:18px;padding:102px clamp(18px,5vw,70px) 80px;opacity:.36;z-index:-2}.workspace-rail,.timeline-preview,.thread-preview{border:1px solid rgba(255,248,238,.24);background:#fff8ee1f;box-shadow:0 28px 90px #0000003d;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.workspace-rail{display:grid;align-content:start;gap:14px;padding:16px}.workspace-rail span{display:grid;place-items:center;min-height:54px;border-radius:8px;background:#fff8ee2e;color:#fff8ee;font-weight:900;text-transform:uppercase}.timeline-preview{align-self:stretch;padding:clamp(18px,3vw,34px)}.preview-top{display:flex;justify-content:space-between;margin-bottom:48px;color:#b9ddd9;font-weight:800}.preview-top strong{color:#7ce0b5}.timeline-preview article,.thread-preview{max-width:720px;margin:0 0 18px;border-radius:8px;background:#fff8ee29;padding:18px}.timeline-preview b,.thread-preview span{color:#ff8a70}.timeline-preview p,.thread-preview p{margin:6px 0 0;color:#fff8ee;font-size:clamp(17px,1.8vw,24px)}.timeline-preview code{border-radius:5px;background:#0c1f2394;padding:2px 5px}.thread-line{margin-left:clamp(0px,8vw,130px)}.thread-preview{align-self:center;min-height:260px}.product-nav{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px clamp(18px,5vw,70px);font-weight:800}.product-nav>div{display:flex;gap:clamp(14px,3vw,34px)}.brand-lockup{display:inline-flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#ff6f55;color:#151716;font-weight:950;text-transform:uppercase}.hero-copy{position:relative;z-index:2;align-self:center;width:min(780px,calc(100vw - 36px));padding:0 clamp(18px,5vw,70px) 16vh}.eyebrow,.section-kicker{margin:0 0 14px;color:#ffb09f;font-size:13px;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.hero h1,.product-band h2{margin:0;letter-spacing:0}.hero h1{font-family:Georgia,Times New Roman,serif;font-size:clamp(66px,13vw,152px);font-weight:900;line-height:.9}.lede{width:min(680px,100%);margin:26px 0 0;color:#fff3df;font-size:clamp(20px,2.2vw,31px);line-height:1.18}.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:32px}.primary-action,.secondary-action{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border-radius:8px;padding:0 18px;font-weight:950}.primary-action{background:#ff6f55;color:#151716}.secondary-action{border:1px solid rgba(255,248,238,.42);color:#fff8ee}.product-band{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(280px,1.1fr);gap:clamp(28px,6vw,90px);padding:clamp(58px,8vw,112px) clamp(18px,5vw,70px)}.product-band h2{max-width:720px;font-size:clamp(34px,5vw,74px);line-height:.96}.product-band p{margin:0;color:#3f4743;font-size:clamp(18px,2.1vw,27px);line-height:1.34}.intro-band{padding-top:0}.intro-band .section-kicker,.cli-band .section-kicker,.docs-band .section-kicker{color:#b84632}.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-block:1px solid #c8c0b2}.feature-grid article{min-height:250px;border-right:1px solid #c8c0b2;padding:clamp(22px,3vw,40px)}.feature-grid article:nth-child(2n){background:#e8f0e9}.feature-grid article:last-child{border-right:0}.feature-grid h3{margin:0 0 44px;font-size:24px}.feature-grid p{margin:0;color:#48504c;line-height:1.45}.cli-band{background:#162a2d;color:#fff8ee}.cli-band p{color:#c9d8d4}.cli-band pre{overflow:auto;align-self:start;margin:0;border:1px solid rgba(255,248,238,.18);border-radius:8px;background:#071314;color:#bdf1dc;padding:clamp(18px,3vw,32px);line-height:1.7}.docs-band{background:#fffaf0}.destination-list{display:grid;gap:12px}.destination-list a{display:flex;justify-content:space-between;gap:20px;border-top:1px solid #cbc2b3;padding:18px 0;font-size:clamp(21px,3vw,40px);font-weight:900}.destination-list span{color:#6f7772;font-size:15px;font-weight:700;text-align:right}@media(prefers-color-scheme:dark){.product-site{background:#101616;color:#fff8ee}.hero:after{background:linear-gradient(0deg,#101616 8%,#10161600)}.product-band p,.feature-grid p,.destination-list span{color:#bac7c3}.feature-grid{border-color:#34413e}.feature-grid article{border-color:#34413e}.feature-grid article:nth-child(2n),.docs-band{background:#182221}}@media(max-width:900px){.hero:before{inset-right:0}.hero-bg{inset:0;grid-template-columns:58px minmax(0,1fr);padding-top:90px;opacity:.38}.thread-preview{display:none}.product-band,.feature-grid{grid-template-columns:1fr}.feature-grid article,.feature-grid article:last-child{min-height:0;border-right:0;border-bottom:1px solid #c8c0b2}}@media(max-width:620px){.product-nav{align-items:flex-start;flex-direction:column}.hero{min-height:760px}.hero-bg{grid-template-columns:1fr;opacity:.42}.workspace-rail{display:none}.hero-copy{padding-bottom:90px}.destination-list a{flex-direction:column}.destination-list span{text-align:left}}:root{color-scheme:light dark;font-family:Inter,SF Pro Text,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:"ss01","cv11";--rail: #e9e1d7;--bg: #f7f3ed;--panel: #fffaf2;--panel-2: #efe7dc;--panel-3: #e4dbcf;--hover: rgba(16, 32, 39, .05);--hover-strong: rgba(16, 32, 39, .08);--line: rgba(16, 32, 39, .1);--line-strong: rgba(16, 32, 39, .16);--text: #22201d;--text-strong: #11100e;--muted: #6f675f;--muted-2: #958b80;--accent: #dd5d45;--accent-2: #006d77;--accent-soft: rgba(221, 93, 69, .16);--accent-glow: 0 0 0 1px rgba(221, 93, 69, .28), 0 8px 30px -12px rgba(221, 93, 69, .45);--success: #168b51;--warn: #f5b050;--danger: #c84343;--shadow: 0 24px 60px -24px rgba(16, 32, 39, .32);--radius-sm: 6px;--radius: 8px;--radius-lg: 14px;--radius-xl: 18px;background:var(--bg);color:var(--text)}@media(prefers-color-scheme:dark){:root{--rail: #0d0e12;--bg: #131419;--panel: #1a1b22;--panel-2: #20222b;--panel-3: #272a35;--hover: rgba(255, 255, 255, .04);--hover-strong: rgba(255, 255, 255, .07);--line: rgba(255, 255, 255, .07);--line-strong: rgba(255, 255, 255, .12);--text: #e7e9ee;--text-strong: #ffffff;--muted: #8a8f9c;--muted-2: #5d626d;--accent: #6f7eff;--accent-2: #5666ee;--accent-soft: rgba(111, 126, 255, .18);--accent-glow: 0 0 0 1px rgba(111, 126, 255, .4), 0 8px 30px -12px rgba(111, 126, 255, .6);--success: #2ecc71;--warn: #f5b050;--danger: #ff6b6b;--shadow: 0 24px 60px -20px rgba(0, 0, 0, .6)}}*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%}body{background:radial-gradient(1000px 600px at 0% 0%,rgba(111,126,255,.08),transparent 60%),radial-gradient(900px 700px at 100% 100%,rgba(255,130,200,.05),transparent 60%),var(--bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}input,textarea{background:transparent;border:0;outline:0}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:#ffffff0f;border-radius:999px;border:2px solid transparent;background-clip:content-box}::-webkit-scrollbar-thumb:hover{background:#ffffff1f;background-clip:content-box}.auth-shell{display:grid;min-height:100vh;place-items:center;padding:32px;background:radial-gradient(700px 500px at 30% 20%,rgba(111,126,255,.18),transparent 60%),radial-gradient(700px 500px at 80% 90%,rgba(255,110,196,.12),transparent 60%),var(--bg)}.auth-panel{display:grid;gap:22px;width:min(100%,440px);border:1px solid var(--line-strong);border-radius:var(--radius-xl);background:linear-gradient(180deg,#ffffff0a,#fff0) var(--panel);box-shadow:var(--shadow);padding:36px}.auth-brand{display:flex;align-items:center;gap:12px}.auth-brand .mark{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;font-weight:800;letter-spacing:-.02em;box-shadow:0 10px 24px -8px #6f7effb3}.auth-brand .brand-text strong{display:block;color:var(--text-strong);letter-spacing:-.01em}.auth-brand .brand-text span{display:block;color:var(--muted);font-size:12px}.auth-copy{display:grid;gap:8px;margin-top:8px}.auth-copy h1{margin:0;font-size:28px;letter-spacing:-.02em;color:var(--text-strong)}.auth-copy p{margin:0;color:var(--muted);line-height:1.5}.github-login{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;border-radius:12px;background:#0d1117;color:#fff;font-weight:600;text-decoration:none;border:1px solid #2b2f36;transition:transform 80ms ease,background .12s ease,border-color .12s ease}.github-login:hover{background:#161b22;border-color:#3f4750;transform:translateY(-1px)}.auth-foot{margin:0;color:var(--muted-2);font-size:12px;text-align:center}.shell{display:grid;grid-template-columns:72px 260px minmax(0,1fr) 0;height:100vh;min-height:100vh;overflow:hidden;transition:grid-template-columns .22s cubic-bezier(.2,.8,.2,1)}.shell.thread-open{grid-template-columns:72px 260px minmax(0,1fr) minmax(340px,28vw)}.shell.sidebar-collapsed{grid-template-columns:72px 0 minmax(0,1fr) 0}.shell.sidebar-collapsed.thread-open{grid-template-columns:72px 0 minmax(0,1fr) minmax(340px,28vw)}.guild-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 0;background:var(--rail);border-right:1px solid var(--line);overflow-y:auto;position:relative}.guild-rail .guild{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:var(--panel-2);color:var(--text);border:0;font-weight:700;font-size:14px;letter-spacing:-.02em;position:relative;transition:border-radius .14s ease,background .12s ease,transform .12s ease;box-shadow:0 1px #ffffff0a inset}.guild-rail .guild:hover{border-radius:12px;background:var(--accent);color:#fff;box-shadow:0 8px 24px -10px #6f7eff99}.guild-rail .guild.home{background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;font-weight:800}.guild-rail .guild.home:hover{border-radius:12px;filter:brightness(1.1)}.guild-rail .guild.add{background:transparent;color:var(--success);border:1px dashed rgba(46,204,113,.4)}.guild-rail .guild.add:hover{background:#2ecc711f;color:#fff;border-style:solid;border-color:var(--success)}.guild-divider{width:36px;height:1px;background:var(--line-strong);margin:4px 0}.guild-list{display:flex;flex-direction:column;align-items:center;gap:8px}.guild-wrap{position:relative}.guild-wrap:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%) scaleY(.2);width:4px;height:28px;border-radius:0 4px 4px 0;background:var(--text-strong);opacity:0;transition:opacity .14s ease,transform .14s ease}.guild-wrap:hover:before{opacity:.6;transform:translateY(-50%) scaleY(.5)}.guild-wrap.active:before{opacity:1;transform:translateY(-50%) scaleY(1)}.guild-wrap.active .guild{border-radius:14px;background:var(--accent);color:#fff}.guild-create{position:absolute;left:100%;top:14px;margin-left:8px;background:var(--panel);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px;box-shadow:var(--shadow);z-index:20}.guild-create input{height:32px;padding:0 10px;width:200px;border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text)}.sidebar{display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--panel);border-right:1px solid var(--line);overflow:hidden;min-width:0;transition:opacity .16s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.sidebar-collapsed .sidebar{opacity:0;pointer-events:none;transform:translate(-14px)}.workspace-header{padding:14px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;min-height:60px}.sidebar-collapse{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:8px;background:var(--panel-2);color:var(--muted);transition:color .12s ease,background .12s ease,transform .12s ease}.sidebar-collapse:hover{background:var(--panel-3);color:var(--text-strong);transform:translate(-1px)}.workspace-name{display:flex;flex-direction:column;gap:2px;min-width:0}.workspace-name strong{color:var(--text-strong);letter-spacing:-.01em;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-name .presence{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:11px}.workspace-name .presence:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--muted-2)}.workspace-name .presence.online{color:var(--success)}.workspace-name .presence.online:before{background:var(--success);box-shadow:0 0 0 3px #2ecc712e}.sidebar-scroll{overflow-y:auto;padding:12px 8px 16px}.nav-section+.nav-section{margin-top:12px}.section-title{display:flex;align-items:center;gap:6px;width:100%;border:0;background:transparent;color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:700;letter-spacing:.04em;padding:6px 8px;border-radius:var(--radius-sm)}.section-title:hover{color:var(--text);background:var(--hover)}.section-title .caret{font-size:10px;opacity:.7}.section-title .label{flex:1;text-align:left}.section-title .add-button{width:18px;height:18px;border-radius:4px;display:grid;place-items:center;font-size:14px;font-weight:700;background:#ffffff0f;color:var(--text)}.section-title:hover .add-button{background:var(--accent);color:#fff}.nav-list{display:flex;flex-direction:column;gap:1px;margin-top:4px}.nav-item{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);text-align:left;padding:6px 10px;min-height:30px;transition:background .1s ease,color .1s ease}.nav-item:hover{background:var(--hover);color:var(--text)}.nav-item.active{background:var(--accent-soft);color:var(--text-strong)}.nav-item .hash{color:var(--muted);font-weight:600;width:14px;text-align:center}.nav-item.active .hash{color:var(--accent)}.nav-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.nav-empty{margin:4px 8px;color:var(--muted-2);font-size:12px}.dm-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,hsl(var(--hue, 220deg) 70% 55%),hsl(calc(var(--hue, 220deg) + 40deg) 70% 45%));flex-shrink:0;overflow:hidden}.dm-avatar img,.avatar img{width:100%;height:100%;display:block;object-fit:cover}.presence-dot{width:8px;height:8px;border-radius:50%;background:var(--muted-2);flex-shrink:0}.presence-dot.active{background:var(--success);box-shadow:0 0 0 2px var(--panel)}.inline-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;margin:6px 4px 2px}.inline-create input{width:100%;min-width:0;height:30px;padding:0 10px;border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text);border:1px solid var(--line)}.inline-create input:focus{border-color:var(--accent);background:var(--panel-3)}.inline-create button.ghost,button.ghost{width:30px;height:30px;border:0;border-radius:var(--radius-sm);background:var(--panel-3);color:var(--muted);font-weight:600;padding:0;font-size:14px;display:grid;place-items:center}.inline-create button.ghost:hover{background:var(--accent);color:#fff}.user-card{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;background:var(--panel-2);border-top:1px solid var(--line);border-right:0;border-bottom:0;border-left:0;color:inherit;text-align:left;cursor:pointer;transition:background .12s ease}.user-card:hover{background:var(--panel-3)}.user-card .dm-avatar{width:28px;height:28px;font-size:12px}.user-card .user-meta{flex:1;min-width:0}.user-card .user-meta strong{display:block;color:var(--text-strong);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-card .user-meta span{display:block;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline{display:flex;flex-direction:column;min-width:0;background:var(--bg);overflow:hidden}.timeline>*{min-width:0;flex-shrink:0}.timeline>.messages{flex:1 1 0;min-height:0}.topbar{display:flex;align-items:center;gap:14px;padding:12px 20px;min-height:60px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.02),transparent),var(--bg)}.topbar-title{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.topbar-title h1{margin:0;font-size:16px;font-weight:700;letter-spacing:-.01em;color:var(--text-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-title h1.with-glyph:first-letter{color:var(--muted);margin-right:1px}.topbar-divider{width:1px;height:18px;background:var(--line-strong);margin:0 6px}.topbar-meta{margin:0;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search{display:flex;align-items:center;gap:8px;width:min(280px,30vw);height:34px;padding:0 10px;border-radius:var(--radius);background:var(--panel);border:1px solid var(--line);color:var(--muted);transition:border-color .12s ease,background .12s ease}.search:focus-within{border-color:var(--accent);background:var(--panel-2);color:var(--text)}.search input{flex:1;min-width:0;height:100%;color:var(--text)}.search input::placeholder{color:var(--muted)}.search-clear{width:18px;height:18px;border-radius:50%;border:0;background:var(--panel-3);color:var(--muted);display:grid;place-items:center;font-size:14px;line-height:1}.search-clear:hover{background:var(--accent);color:#fff}.search-submit{height:22px;padding:0 8px;border:0;border-radius:5px;background:var(--accent-soft);color:var(--accent);font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.search-submit:hover{background:var(--accent);color:#fff}.topbar-actions{display:inline-flex;align-items:center;gap:6px}.topbar-actions button{width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--muted);transition:background .12s ease,color .12s ease,border-color .12s ease,transform 80ms ease}.topbar-actions button:hover,.topbar-actions button.active{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 55%,transparent);color:var(--accent)}.topbar-actions button:active{transform:translateY(1px)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.search-results{display:flex;flex-direction:column;gap:2px;padding:10px 14px 14px;border-bottom:1px solid var(--line);background:var(--panel);max-height:280px;overflow-y:auto}.search-results-head{display:flex;align-items:center;justify-content:space-between;padding:0 6px 8px}.search-results-head strong{color:var(--text-strong);font-size:13px}.search-results-head button{border:0;background:transparent;color:var(--muted);font-size:12px;padding:4px 8px;border-radius:var(--radius-sm)}.search-results-head button:hover{background:var(--hover);color:var(--text)}.search-result{display:flex;align-items:flex-start;gap:10px;border:0;background:transparent;color:var(--text);padding:8px;border-radius:var(--radius-sm);text-align:left}.search-result:hover{background:var(--hover)}.search-result .dm-avatar{width:30px;height:30px;font-size:13px}.search-result-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.search-result-body>div{display:flex;align-items:baseline;gap:8px}.search-result-body strong{color:var(--text-strong);font-size:13px}.search-result-body time{color:var(--muted);font-size:11px}.search-result-body span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages{overflow-y:auto;padding:16px 4px 24px;scroll-behavior:smooth}.empty{display:grid;place-items:center;align-content:center;text-align:center;gap:10px;min-height:50vh;padding:48px 24px}.empty-icon{width:64px;height:64px;border-radius:18px;background:linear-gradient(135deg,var(--accent),#b46cff);color:#fff;display:grid;place-items:center;font-size:26px;font-weight:800;box-shadow:0 18px 40px -16px #6f7effb3}.empty strong{color:var(--text-strong);font-size:18px;letter-spacing:-.01em}.empty span{color:var(--muted);max-width:380px;line-height:1.5}.day-divider{display:flex;align-items:center;gap:12px;margin:18px 18px 8px;position:sticky;top:0;z-index:1;pointer-events:none}.day-divider:before,.day-divider:after{content:"";flex:1;height:1px;background:var(--line)}.day-divider span{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:4px 12px;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.message-group{display:grid;grid-template-columns:56px minmax(0,1fr);padding:8px 18px;position:relative}.message-group:hover{background:var(--hover)}.avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:14px;background:linear-gradient(135deg,hsl(var(--hue, 220deg) 70% 55%),hsl(calc(var(--hue, 220deg) + 40deg) 70% 45%));box-shadow:0 6px 20px -10px #0009;margin-top:2px;overflow:hidden}.avatar-button{position:relative;z-index:2;border:0;padding:0;cursor:pointer;transition:transform .1s ease,box-shadow .12s ease,filter .12s ease}.avatar-button:hover{transform:translateY(-1px);filter:brightness(1.05);box-shadow:0 10px 24px -12px #000c}.avatar.small{width:30px;height:30px;font-size:12px;border-radius:10px}.avatar.large{width:56px;height:56px;border-radius:16px;font-size:18px;margin:0}.group-body{min-width:0}.group-body>header{display:flex;align-items:baseline;gap:8px;margin-bottom:2px}.group-body>header strong{color:var(--text-strong);font-size:14.5px;letter-spacing:-.005em;font-weight:700}.author-name{border:0;background:transparent;color:var(--text-strong);padding:0;border-radius:4px;font-size:14.5px;letter-spacing:0;font-weight:700}.author-name:hover{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.group-body>header time{color:var(--muted);font-size:11px}.group-body>header span{color:var(--muted);font-size:12px}.message-row{margin-left:-56px;padding:1px 0 1px 56px;position:relative;border-radius:0;transition:background 80ms ease}.message-row:not(:first-child){margin-top:1px}.message-row:hover{background:var(--hover-strong)}.message-row.selected{background:var(--accent-soft)}.message-row.selected:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent)}.row-stamp{position:absolute;left:8px;top:4px;font-size:10px;color:var(--muted-2);opacity:0;font-variant-numeric:tabular-nums}.message-row:hover .row-stamp{opacity:1}.message-content{min-width:0}.message-actions{display:flex;align-items:flex-start;gap:4px;opacity:0;transform:translateY(-50%);position:absolute;right:8px;top:0;background:var(--panel);border:1px solid var(--line-strong);border-radius:8px;padding:2px;box-shadow:var(--shadow);transition:opacity .1s ease,transform .1s ease}.message-row:hover .message-actions,.message-row.selected .message-actions{opacity:1}.message-actions button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--muted)}.message-actions button:hover{background:var(--hover-strong);color:var(--text-strong)}.markdown{line-height:1.5;color:var(--text);font-size:14.5px;overflow-wrap:anywhere;word-break:break-word}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown p{margin:0}.markdown p+p,.markdown ul,.markdown ol,.markdown blockquote,.markdown pre{margin-top:6px}.markdown a{color:var(--accent);text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{background:var(--panel-2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}.markdown pre{background:var(--panel-2);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;overflow-x:auto}.markdown pre code{background:transparent;border:0;padding:0}.markdown blockquote{border-left:3px solid var(--accent);margin:0;padding:4px 0 4px 12px;color:var(--muted)}.markdown ul,.markdown ol{padding-left:22px}.markdown img{max-width:100%;max-height:360px;border-radius:var(--radius);margin-top:6px;border:1px solid var(--line);object-fit:contain;background:var(--panel);cursor:zoom-in}.attachment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,280px));gap:8px;margin-top:8px}.attachment-grid.compact{grid-template-columns:minmax(0,1fr)}.image-attachment,.video-attachment,.file-attachment{color:inherit;text-decoration:none}.image-attachment,.video-attachment{position:relative;display:block;width:100%;overflow:hidden;padding:0;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--panel);box-shadow:0 12px 30px -24px #000c;text-align:left;cursor:zoom-in;transition:border-color .12s ease,transform .12s ease,box-shadow .12s ease}.image-attachment:hover{border-color:color-mix(in srgb,var(--accent) 42%,var(--line));transform:translateY(-1px);box-shadow:0 16px 36px -26px #000000e6}.video-attachment{cursor:default}.image-attachment img{display:block;width:100%;max-height:320px;object-fit:cover}.video-attachment video{display:block;width:100%;max-height:360px;background:#05070d}.image-attachment span{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 16px);padding:4px 8px;border-radius:999px;background:#00000094;color:#fff;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.video-attachment a{display:block;padding:8px 10px;color:var(--muted);font-size:12px;text-decoration:none;background:var(--panel-2)}.video-attachment a:hover{color:var(--text-strong)}.file-attachment{display:flex;align-items:center;gap:10px;max-width:360px;padding:10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.file-attachment:hover{border-color:var(--line-strong);background:var(--panel-2)}.file-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-weight:800}.file-attachment strong,.file-attachment small{display:block}.file-attachment strong{color:var(--text-strong);font-size:13px}.file-attachment small{color:var(--muted);font-size:11px}.composer{padding:10px 18px 18px;background:var(--bg);display:grid;gap:0;position:relative}.composer-card{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line-strong);border-radius:var(--radius-lg);overflow:hidden;transition:border-color .12s ease,box-shadow .12s ease}.composer:focus-within .composer-card{border-color:color-mix(in srgb,var(--accent) 55%,var(--line-strong));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent)}.composer-toolbar{display:inline-flex;align-items:center;gap:2px;width:100%;padding:4px 6px;margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:color-mix(in srgb,var(--panel-2) 35%,transparent);box-shadow:none}.composer-toolbar button{min-width:28px;height:26px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--text);opacity:.78;font-size:11.5px;font-weight:700;transition:background .1s ease,color .1s ease,opacity .1s ease,transform 80ms ease}.composer-toolbar button:hover{background:var(--hover-strong);color:var(--text-strong);opacity:1}.composer-toolbar button.active{background:var(--accent-soft);color:var(--accent);opacity:1}.composer-toolbar button:active{transform:translateY(1px)}.gif-picker{margin-top:8px;margin-bottom:8px;width:min(520px,calc(100vw - 40px));border:1px solid var(--line-strong);border-radius:16px;background:color-mix(in srgb,var(--panel) 96%,transparent);box-shadow:var(--shadow);padding:10px;animation:picker-in .16s cubic-bezier(.2,.8,.2,1)}.gif-picker-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:2px 2px 10px}.gif-picker-head strong{color:var(--text-strong);font-size:13px}.gif-picker-head input{min-width:0;height:32px;padding:0 10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-2)}.gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:240px;overflow-y:auto}.gif-grid button{position:relative;overflow:hidden;aspect-ratio:4 / 3;border:0;border-radius:12px;background:var(--panel-2);color:#fff;padding:0;box-shadow:inset 0 0 0 1px var(--line);transition:transform .12s ease,box-shadow .12s ease}.gif-grid button:hover{transform:translateY(-2px);box-shadow:inset 0 0 0 2px var(--accent),0 14px 30px -22px #000c}.gif-grid img{width:100%;height:100%;display:block;object-fit:cover}.gif-grid span{position:absolute;left:6px;right:6px;bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;background:#0000008f;padding:4px 7px;font-size:10.5px;font-weight:700;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes picker-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.composer-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:6px;padding:6px 8px 6px 10px;background:transparent;border:0;border-radius:0}.composer:focus-within .composer-toolbar,.composer-row:focus-within{border-color:transparent}.composer-row:focus-within{box-shadow:none}.composer-icon{width:36px;height:36px;display:grid;place-items:center;color:var(--muted);border-radius:10px;cursor:pointer;transition:background .12s ease,color .12s ease}.composer-icon:hover{background:var(--hover-strong);color:var(--text-strong)}.composer-icon input[type=file]{position:absolute;inline-size:1px;block-size:1px;opacity:0;pointer-events:none}.composer textarea,.reply-composer textarea{width:100%;height:auto;min-height:36px;max-height:50vh;padding:8px 4px;resize:none;color:var(--text);line-height:1.45;font-size:14.5px;align-self:end;overflow-y:auto;box-sizing:border-box}.composer textarea::placeholder,.reply-composer textarea::placeholder{color:var(--muted)}.send{width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:10px;background:var(--accent);color:#fff;transition:background .12s ease,transform 80ms ease,opacity .12s ease}.send:hover:not(:disabled){background:var(--accent-2);transform:translateY(-1px)}.send:disabled{background:var(--panel-3);color:var(--muted-2);cursor:not-allowed}.composer-attachment{margin-top:8px;margin-bottom:8px;display:inline-flex;align-items:center;gap:8px;padding:6px 10px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);color:var(--text);font-size:13px;width:fit-content}.attachment-icon{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:var(--accent-soft);color:var(--accent)}.pending-image{width:42px;height:32px;object-fit:cover;border-radius:7px;border:1px solid var(--line);background:var(--panel-2)}.attachment-name{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-remove{width:18px;height:18px;border:0;background:transparent;color:var(--muted);border-radius:50%;font-size:14px;line-height:1}.attachment-remove:hover{background:var(--danger);color:#fff}.composer-hint{color:var(--muted-2);font-size:11px;padding:7px 4px 0}.composer-hint kbd{display:inline-block;background:var(--panel-2);border:1px solid var(--line);border-radius:4px;padding:0 5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10.5px;color:var(--text)}.thread{display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--panel);border-left:1px solid var(--line);min-width:0;overflow:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1)}.thread.open{opacity:1;transform:translate(0);pointer-events:auto}.thread>header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;min-height:60px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.02),transparent),var(--panel)}.thread>header p,.thread>header strong{margin:0}.thread>header p{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:700}.thread>header strong{display:block;color:var(--text-strong);font-size:14px}.thread .close{width:28px;height:28px;border:0;border-radius:50%;background:var(--panel-2);color:var(--muted);font-size:18px;line-height:1}.thread .close:hover{background:var(--panel-3);color:var(--text-strong)}.thread-scroll{overflow-y:auto;padding:12px 16px}.thread-root{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}.thread-divider{display:flex;align-items:center;gap:10px;margin:14px 0 10px}.thread-divider:before,.thread-divider:after{content:"";flex:1;height:1px;background:var(--line)}.thread-divider span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:700}.reply-list{display:flex;flex-direction:column;gap:10px}.reply{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:6px;border-radius:var(--radius-sm)}.reply:hover{background:var(--hover)}.reply-composer{padding:10px 14px 14px;background:var(--panel);border-top:1px solid var(--line)}.reply-composer .composer-row{border-radius:0}.thread-empty{display:grid;place-items:center;align-content:center;gap:8px;padding:32px 24px;text-align:center;grid-row:span 3}.thread-icon{width:56px;height:56px;border-radius:16px;background:var(--panel-2);color:var(--muted);display:grid;place-items:center}.thread-empty strong{color:var(--text-strong);font-size:15px}.thread-empty span{color:var(--muted);font-size:13px;max-width:260px;line-height:1.5}.profile-pane{overflow-y:auto}.profile-hero{min-height:210px;display:grid;place-items:end center;padding:28px 20px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.24)),linear-gradient(135deg,hsl(var(--hue, 220deg) 76% 58%),hsl(calc(var(--hue, 220deg) + 54deg) 74% 38%));border-bottom:1px solid var(--line)}.profile-avatar{width:min(240px,70%);aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:16px;background:#ffffff2e;color:#fff;font-size:clamp(48px,12vw,88px);font-weight:800;box-shadow:0 26px 60px -30px #000000e6}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-pane-body{display:grid;gap:18px;padding:18px 16px 22px}.profile-pane-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.profile-pane-title h2{margin:0;color:var(--text-strong);font-size:22px;letter-spacing:0}.profile-pane-title span{display:block;margin-top:3px;color:var(--muted);font-size:13px}.text-action{border:0;border-radius:6px;background:transparent;color:var(--accent);font-size:13px;font-weight:700;padding:4px 6px}.text-action:hover{background:var(--accent-soft)}.profile-presence{display:inline-flex;align-items:center;gap:8px;color:var(--text);font-size:14px}.profile-actions-row{display:flex;gap:8px;flex-wrap:wrap}.profile-actions-row .primary-action,.profile-actions-row .ghost-action{min-width:110px}.profile-info{display:grid;gap:12px;padding-top:18px;border-top:1px solid var(--line)}.profile-info header{display:flex;align-items:center;justify-content:space-between;gap:10px}.profile-info header strong{color:var(--text-strong);font-size:14px}.profile-info-row{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center}.info-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:var(--panel-2);color:var(--muted);font-size:11px;font-weight:800}.profile-info-row small,.profile-info-row span{display:block}.profile-info-row small{color:var(--muted);font-size:11px}.profile-info-row span{color:var(--text);font-size:13px;overflow-wrap:anywhere}.profile-note{margin:0;color:var(--muted);line-height:1.5;font-size:13px}.modal-scrim{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:24px;background:#05080f8a;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.modal-backdrop{position:absolute;inset:0;border:0;background:transparent}.profile-modal{position:relative;z-index:1;width:min(480px,100%);border:1px solid var(--line-strong);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:var(--shadow);overflow:hidden}.profile-modal>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid var(--line);background:var(--panel-2)}.profile-modal p{margin:0 0 3px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.profile-modal h2{margin:0;color:var(--text-strong);font-size:20px;letter-spacing:0}.profile-modal>header button{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:22px}.profile-modal>header button:hover{background:var(--hover);color:var(--text-strong)}.profile-form{display:grid;gap:14px;padding:20px}.profile-preview{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-2)}.profile-preview strong,.profile-preview span{display:block}.profile-preview strong{color:var(--text-strong);font-size:15px}.profile-preview span{color:var(--muted);font-size:13px}.field{display:grid;gap:6px}.field span{color:var(--muted);font-size:12px;font-weight:700}.field input{width:100%;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--panel-2);color:var(--text)}.field input:focus{border-color:var(--accent);outline:0;box-shadow:0 0 0 3px var(--accent-soft)}.profile-status{color:var(--success);font-size:12px}.profile-status.error{color:var(--danger)}.profile-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}.ghost-action,.primary-action{height:36px;padding:0 14px;border-radius:var(--radius-sm);font-weight:700}.ghost-action{border:1px solid var(--line);background:var(--panel);color:var(--text)}.primary-action{border:0;background:var(--accent);color:#fff}.ghost-action:hover{background:var(--hover)}.primary-action:hover{filter:brightness(1.04)}.image-viewer-scrim{padding:28px;background:#000000c7;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.image-viewer{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr);width:min(1120px,100%);max-height:min(86vh,900px);overflow:hidden;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:#07090f;color:#fff;box-shadow:0 34px 90px -34px #000000f2;animation:picker-in .15s cubic-bezier(.2,.8,.2,1)}.image-viewer>header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:10px 12px 10px 16px;border-bottom:1px solid rgba(255,255,255,.1);background:#ffffff0a}.image-viewer>header strong{min-width:0;overflow:hidden;color:#fff;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.image-viewer>header div{display:inline-flex;align-items:center;gap:8px;flex-shrink:0}.image-viewer>header a{height:30px;display:inline-flex;align-items:center;padding:0 10px;border-radius:7px;background:#ffffff14;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.image-viewer>header a:hover{background:#ffffff24}.image-viewer>header button{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#ffffffc7;font-size:22px;line-height:1}.image-viewer>header button:hover{background:#ffffff1f;color:#fff}.image-viewer-stage{display:grid;place-items:center;min-height:0;padding:18px}.image-viewer-stage img{display:block;max-width:100%;max-height:calc(86vh - 96px);object-fit:contain;border-radius:8px;background:#ffffff0a}.mobile-nav-toggle{display:none;position:fixed;top:14px;left:14px;z-index:30;width:38px;height:38px;border-radius:10px;border:1px solid var(--line-strong);background:var(--panel);color:var(--text);font-size:22px;line-height:1}.mobile-nav-toggle .bars{display:grid;gap:3px}.mobile-nav-toggle .bars i{display:block;width:16px;height:2px;background:currentColor;border-radius:2px}@media(max-width:1180px){.shell{grid-template-columns:72px 240px minmax(0,1fr)}.shell.sidebar-collapsed,.shell.sidebar-collapsed.thread-open{grid-template-columns:72px 0 minmax(0,1fr)}.thread{position:fixed;inset:0 0 0 auto;width:min(420px,100vw);box-shadow:var(--shadow);transform:translate(100%);transition:transform .18s ease;z-index:4;border-left:1px solid var(--line-strong)}.thread.open{transform:translate(0)}}@media(max-width:820px){.mobile-nav-toggle{display:grid;place-items:center}.shell,.shell.thread-open,.shell.sidebar-collapsed,.shell.sidebar-collapsed.thread-open{grid-template-columns:1fr}.sidebar-collapsed .sidebar{opacity:1;pointer-events:auto;transform:translate(-100%)}.guild-rail,.sidebar{position:fixed;inset:0 auto 0 0;z-index:20;transform:translate(-100%);transition:transform .18s ease}.guild-rail{width:72px}.sidebar{left:72px;width:260px}.nav-open .guild-rail,.nav-open .sidebar{transform:translate(0)}.topbar{padding-left:64px}.search{width:180px}}@media(max-width:520px){.search,.topbar-meta,.topbar-divider{display:none}}.message-row.highlight,.thread-root.highlight,.reply.highlight{animation:quote-flash 1.4s ease-out}@keyframes quote-flash{0%{background:#6366f138}to{background:transparent}}.quote-block{display:inline-flex;align-items:stretch;gap:.5rem;margin:0 0 .35rem;padding:.25rem .5rem .25rem 0;background:transparent;border:0;border-radius:6px;color:inherit;cursor:pointer;text-align:left;max-width:100%;font:inherit}.quote-block:hover:not(:disabled){background:#6366f114}.quote-block:disabled{cursor:default;opacity:.75}.quote-block .quote-bar{width:3px;align-self:stretch;background:var(--accent, #6366f1);border-radius:2px;flex:0 0 3px}.quote-block .quote-content{display:flex;flex-direction:column;gap:.1rem;min-width:0}.quote-block .quote-author{font-size:.78rem;font-weight:600;color:var(--accent, #6366f1)}.quote-block .quote-snippet{font-size:.85rem;color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56ch}.quote-block .quote-snippet.muted{font-style:italic;opacity:.75}.quote-preview{display:flex;align-items:center;gap:.5rem;padding:6px 10px 6px 12px;margin:0;background:color-mix(in srgb,var(--accent) 5%,transparent);border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:12.5px;color:var(--muted)}.quote-preview .quote-bar{display:none}.quote-preview-body{display:flex;align-items:baseline;gap:.4rem;flex:1;min-width:0;overflow:hidden}.quote-preview-label{font-size:12px;color:color-mix(in srgb,var(--accent) 85%,var(--text));white-space:nowrap}.quote-preview-label strong{color:var(--text-strong);font-weight:600}.quote-preview-snippet{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:12px;flex:1;min-width:0}.quote-preview-clear{background:transparent;border:0;color:var(--muted);font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:6px;transition:background .1s ease,color .1s ease}.quote-preview-clear:hover{color:var(--text-strong);background:var(--hover-strong)}.reply-quote-btn{position:relative;margin-left:auto;background:transparent;border:0;color:var(--text-muted, #6b7280);cursor:pointer;font-size:.95rem;padding:0 .3rem;opacity:0;transition:opacity .15s}.reply:hover .reply-quote-btn,.thread-root:hover .reply-quote-btn,.reply-quote-btn:focus-visible{opacity:1}.reply-quote-btn:hover{color:var(--accent, #6366f1)}.tooltip{position:relative}.tooltip:before,.reply-quote-btn:before{content:attr(data-tooltip);position:absolute;left:50%;bottom:calc(100% + 12px);z-index:20;transform:translate(-50%,4px) scale(.96);padding:.42rem .62rem;border-radius:9px;background:#3a3a44;color:#f4f4f7;box-shadow:0 10px 28px #00000047;font-size:.78rem;font-weight:700;line-height:1;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.tooltip:after,.reply-quote-btn:after{content:"";position:absolute;left:50%;bottom:calc(100% + 5px);z-index:20;width:12px;height:12px;border-radius:2px;background:#3a3a44;transform:translate(-50%,4px) rotate(45deg) scale(.9);opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.tooltip:hover:before,.tooltip:focus-visible:before,.reply-quote-btn:hover:before,.reply-quote-btn:focus-visible:before,.tooltip:hover:after,.tooltip:focus-visible:after,.reply-quote-btn:hover:after,.reply-quote-btn:focus-visible:after{opacity:1;transform:translate(-50%) scale(1)}.tooltip:hover:after,.tooltip:focus-visible:after,.reply-quote-btn:hover:after,.reply-quote-btn:focus-visible:after{transform:translate(-50%) rotate(45deg) scale(1)} diff --git a/apps/api/internal/webassets/dist/assets/index-Ci-0jUjM.js b/apps/api/internal/webassets/dist/assets/index-Ci-0jUjM.js deleted file mode 100644 index 435e204..0000000 --- a/apps/api/internal/webassets/dist/assets/index-Ci-0jUjM.js +++ /dev/null @@ -1,72 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const Xc=!1;var Wl=Array.isArray,Vc=Array.prototype.indexOf,Vr=Array.prototype.includes,vs=Array.from,Kc=Object.defineProperty,La=Object.getOwnPropertyDescriptor,jl=Object.getOwnPropertyDescriptors,Jc=Object.prototype,Qc=Array.prototype,ui=Object.getPrototypeOf,hl=Object.isExtensible;const eu=()=>{};function tu(e){return e()}function js(e){for(var t=0;t{e=s,t=a});return{promise:n,resolve:e,reject:t}}const dt=2,Kr=4,za=8,Yl=1<<24,Mn=16,mn=32,ur=64,Zs=128,Yt=512,Ye=1024,ct=2048,bn=4096,bt=8192,Xt=16384,Ir=32768,Ys=1<<25,Jr=65536,Xs=1<<17,Xl=1<<18,Lr=1<<19,Vl=1<<20,On=1<<25,Sr=65536,us=1<<21,Ma=1<<22,or=1<<23,Xr=Symbol("$state"),nu=Symbol(""),Kn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Kl(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ru(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function au(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function su(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function iu(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function lu(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ou(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function cu(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function uu(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fu(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function du(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const pu=1,hu=2,Jl=4,vu=8,_u=16,gu=1,mu=2,tt=Symbol(),Ql="http://www.w3.org/1999/xhtml",bu="http://www.w3.org/2000/svg",ku="http://www.w3.org/1998/Math/MathML";function wu(){console.warn("https://svelte.dev/e/derived_inert")}function yu(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function eo(e){return e===this.v}function to(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function no(e){return!to(e,this.v)}let $a=!1,xu=!1;function Tu(){$a=!0}let De=null;function Qr(e){De=e}function fi(e,t=!1,n){De={p:De,i:!1,c:null,e:null,s:e,x:null,r:ne,l:$a&&!t?{s:null,u:null,$:[]}:null}}function di(e){var t=De,n=t.e;if(n!==null){t.e=null;for(var s of n)To(s)}return t.i=!0,De=t.p,{}}function Fa(){return!$a||De!==null&&De.l===null}let wr=[];function ro(){var e=wr;wr=[],js(e)}function cr(e){if(wr.length===0&&!Da){var t=wr;queueMicrotask(()=>{t===wr&&ro()})}wr.push(e)}function Eu(){for(;wr.length>0;)ro()}function ao(e){var t=ne;if(t===null)return fe.f|=or,e;if((t.f&Ir)===0&&(t.f&Kr)===0)throw e;ir(e,t)}function ir(e,t){for(;t!==null;){if((t.f&Zs)!==0){if((t.f&Ir)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Su=-7169;function Fe(e,t){e.f=e.f&Su|t}function pi(e){(e.f&Yt)!==0||e.deps===null?Fe(e,Ye):Fe(e,bn)}function so(e){if(e!==null)for(const t of e)(t.f&dt)===0||(t.f&Sr)===0||(t.f^=Sr,so(t.deps))}function io(e,t,n){(e.f&ct)!==0?t.add(e):(e.f&bn)!==0&&n.add(e),so(e.deps),Fe(e,Ye)}const br=new Set;let te=null,_n=null,Vs=null,Da=!1,Ps=!1,Yr=null,os=null;var vl=0;let Au=1;class fr{id=Au++;current=new Map;previous=new Map;#n=new Set;#o=new Set;#e=new Set;#a=new Map;#r=new Map;#s=null;#t=[];#i=[];#c=new Set;#u=new Set;#l=new Map;#d=new Set;is_fork=!1;#h=!1;#p=new Set;#f(){return this.is_fork||this.#r.size>0}#g(){for(const s of this.#p)for(const a of s.#r.keys()){for(var t=!1,n=a;n.parent!==null;){if(this.#l.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#l.has(t)||this.#l.set(t,{d:[],m:[]}),this.#d.delete(t)}unskip_effect(t,n=s=>this.schedule(s)){var s=this.#l.get(t);if(s){this.#l.delete(t);for(var a of s.d)Fe(a,ct),n(a);for(a of s.m)Fe(a,bn),n(a)}this.#d.add(t)}#v(){if(vl++>1e3&&(br.delete(this),Cu()),!this.#f()){for(const c of this.#c)this.#u.delete(c),Fe(c,ct),this.schedule(c);for(const c of this.#u)Fe(c,bn),this.schedule(c)}const t=this.#t;this.#t=[],this.apply();var n=Yr=[],s=[],a=os=[];for(const c of t)try{this.#m(c,n,s)}catch(o){throw co(c),o}if(te=null,a.length>0){var i=fr.ensure();for(const c of a)i.schedule(c)}if(Yr=null,os=null,this.#f()||this.#g()){this.#_(s),this.#_(n);for(const[c,o]of this.#l)oo(c,o)}else{this.#a.size===0&&br.delete(this),this.#c.clear(),this.#u.clear();for(const c of this.#n)c(this);this.#n.clear(),_l(s),_l(n),this.#s?.resolve()}var l=te;if(this.#t.length>0){const c=l??=this;c.#t.push(...this.#t.filter(o=>!c.#t.includes(o)))}l!==null&&(br.add(l),l.#v())}#m(t,n,s){t.f^=Ye;for(var a=t.first;a!==null;){var i=a.f,l=(i&(mn|ur))!==0,c=l&&(i&Ye)!==0,o=c||(i&bt)!==0||this.#l.has(a);if(!o&&a.fn!==null){l?a.f^=Ye:(i&Kr)!==0?n.push(a):ra(a)&&((i&Mn)!==0&&this.#u.add(a),Rr(a));var f=a.first;if(f!==null){a=f;continue}}for(;a!==null;){var h=a.next;if(h!==null){a=h;break}a=a.parent}}}#_(t){for(var n=0;n!this.current.has(w));if(a.length===0)t&&h.discard();else if(n.length>0){if(t)for(const w of this.#d)h.unskip_effect(w,m=>{(m.f&(Mn|Ma))!==0?h.schedule(m):h.#_([m])});h.activate();var i=new Set,l=new Map;for(var c of n)lo(c,a,i,l);l=new Map;var o=[...h.current.keys()].filter(w=>this.current.has(w)?this.current.get(w)[0]!==w:!0);for(const w of this.#i)(w.f&(Xt|bt|Xs))===0&&hi(w,o,l)&&((w.f&(Ma|Mn))!==0?(Fe(w,ct),h.schedule(w)):h.#c.add(w));if(h.#t.length>0){h.apply();for(var f of h.#t)h.#m(f,[],[]);h.#t=[]}h.deactivate()}}for(const h of br)h.#p.has(this)&&(h.#p.delete(this),h.#p.size===0&&!h.#f()&&(h.activate(),h.#v()))}increment(t,n){let s=this.#a.get(n)??0;if(this.#a.set(n,s+1),t){let a=this.#r.get(n)??0;this.#r.set(n,a+1)}}decrement(t,n,s){let a=this.#a.get(n)??0;if(a===1?this.#a.delete(n):this.#a.set(n,a-1),t){let i=this.#r.get(n)??0;i===1?this.#r.delete(n):this.#r.set(n,i-1)}this.#h||s||(this.#h=!0,cr(()=>{this.#h=!1,this.flush()}))}transfer_effects(t,n){for(const s of t)this.#c.add(s);for(const s of n)this.#u.add(s);t.clear(),n.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#o.add(t)}on_fork_commit(t){this.#e.add(t)}run_fork_commit_callbacks(){for(const t of this.#e)t(this);this.#e.clear()}settled(){return(this.#s??=Zl()).promise}static ensure(){if(te===null){const t=te=new fr;Ps||(br.add(te),Da||cr(()=>{te===t&&t.flush()}))}return te}apply(){{_n=null;return}}schedule(t){if(Vs=t,t.b?.is_pending&&(t.f&(Kr|za|Yl))!==0&&(t.f&Ir)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var s=n.f;if(Yr!==null&&n===ne&&(fe===null||(fe.f&dt)===0))return;if((s&(ur|mn))!==0){if((s&Ye)===0)return;n.f^=Ye}}this.#t.push(n)}}function Ru(e){var t=Da;Da=!0;try{for(var n;;){if(Eu(),te===null)return n;te.flush()}}finally{Da=t}}function Cu(){try{ou()}catch(e){ir(e,Vs)}}let Vn=null;function _l(e){var t=e.length;if(t!==0){for(var n=0;n0)){xr.clear();for(const a of Vn){if((a.f&(Xt|bt))!==0)continue;const i=[a];let l=a.parent;for(;l!==null;)Vn.has(l)&&(Vn.delete(l),i.push(l)),l=l.parent;for(let c=i.length-1;c>=0;c--){const o=i[c];(o.f&(Xt|bt))===0&&Rr(o)}}Vn.clear()}}Vn=null}}function lo(e,t,n,s){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;(i&dt)!==0?lo(a,t,n,s):(i&(Ma|Mn))!==0&&(i&ct)===0&&hi(a,t,s)&&(Fe(a,ct),vi(a))}}function hi(e,t,n){const s=n.get(e);if(s!==void 0)return s;if(e.deps!==null)for(const a of e.deps){if(Vr.call(t,a))return!0;if((a.f&dt)!==0&&hi(a,t,n))return n.set(a,!0),!0}return n.set(e,!1),!1}function vi(e){te.schedule(e)}function oo(e,t){if(!((e.f&mn)!==0&&(e.f&Ye)!==0)){(e.f&ct)!==0?t.d.push(e):(e.f&bn)!==0&&t.m.push(e),Fe(e,Ye);for(var n=e.first;n!==null;)oo(n,t),n=n.next}}function co(e){Fe(e,Ye);for(var t=e.first;t!==null;)co(t),t=t.next}function Iu(e){let t=0,n=Ar(0),s;return()=>{mi()&&(r(n),na(()=>(t===0&&(s=v(()=>e(()=>Oa(n)))),t+=1,()=>{cr(()=>{t-=1,t===0&&(s?.(),s=void 0,Oa(n))})})))}}var Lu=Jr|Lr;function Du(e,t,n,s){new Ou(e,t,n,s)}class Ou{parent;is_pending=!1;transform_error;#n;#o=null;#e;#a;#r;#s=null;#t=null;#i=null;#c=null;#u=0;#l=0;#d=!1;#h=new Set;#p=new Set;#f=null;#g=Iu(()=>(this.#f=Ar(this.#u),()=>{this.#f=null}));constructor(t,n,s,a){this.#n=t,this.#e=n,this.#a=i=>{var l=ne;l.b=this,l.f|=Zs,s(i)},this.parent=ne.b,this.transform_error=a??this.parent?.transform_error??(i=>i),this.#r=ms(()=>{this.#b()},Lu)}#v(){try{this.#s=Zt(()=>this.#a(this.#n))}catch(t){this.error(t)}}#m(t){const n=this.#e.failed;n&&(this.#i=Zt(()=>{n(this.#n,()=>t,()=>()=>{})}))}#_(){const t=this.#e.pending;t&&(this.is_pending=!0,this.#t=Zt(()=>t(this.#n)),cr(()=>{var n=this.#c=document.createDocumentFragment(),s=Nn();n.append(s),this.#s=this.#w(()=>Zt(()=>this.#a(s))),this.#l===0&&(this.#n.before(n),this.#c=null,Tr(this.#t,()=>{this.#t=null}),this.#k(te))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#u=0,this.#s=Zt(()=>{this.#a(this.#n)}),this.#l>0){var t=this.#c=document.createDocumentFragment();wi(this.#s,t);const n=this.#e.pending;this.#t=Zt(()=>n(this.#n))}else this.#k(te)}catch(n){this.error(n)}}#k(t){this.is_pending=!1,t.transfer_effects(this.#h,this.#p)}defer_effect(t){io(t,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#w(t){var n=ne,s=fe,a=De;Jt(this.#r),Kt(this.#r),Qr(this.#r.ctx);try{return fr.ensure(),t()}catch(i){return ao(i),null}finally{Jt(n),Kt(s),Qr(a)}}#y(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,n);return}this.#l+=t,this.#l===0&&(this.#k(n),this.#t&&Tr(this.#t,()=>{this.#t=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(t,n){this.#y(t,n),this.#u+=t,!(!this.#f||this.#d)&&(this.#d=!0,cr(()=>{this.#d=!1,this.#f&&ea(this.#f,this.#u)}))}get_effect_pending(){return this.#g(),r(this.#f)}error(t){if(!this.#e.onerror&&!this.#e.failed)throw t;te?.is_fork?(this.#s&&te.skip_effect(this.#s),this.#t&&te.skip_effect(this.#t),this.#i&&te.skip_effect(this.#i),te.on_fork_commit(()=>{this.#x(t)})):this.#x(t)}#x(t){this.#s&&(At(this.#s),this.#s=null),this.#t&&(At(this.#t),this.#t=null),this.#i&&(At(this.#i),this.#i=null);var n=this.#e.onerror;let s=this.#e.failed;var a=!1,i=!1;const l=()=>{if(a){yu();return}a=!0,i&&du(),this.#i!==null&&Tr(this.#i,()=>{this.#i=null}),this.#w(()=>{this.#b()})},c=o=>{try{i=!0,n?.(o,l),i=!1}catch(f){ir(f,this.#r&&this.#r.parent)}s&&(this.#i=this.#w(()=>{try{return Zt(()=>{var f=ne;f.b=this,f.f|=Zs,s(this.#n,()=>o,()=>l)})}catch(f){return ir(f,this.#r.parent),null}}))};cr(()=>{var o;try{o=this.transform_error(t)}catch(f){ir(f,this.#r&&this.#r.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(c,f=>ir(f,this.#r&&this.#r.parent)):c(o)})}}function Mu(e,t,n,s){const a=Fa()?_s:_i;var i=e.filter(m=>!m.settled);if(n.length===0&&i.length===0){s(t.map(a));return}var l=ne,c=Nu(),o=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(m=>m.promise)):null;function f(m){c();try{s(m)}catch(E){(l.f&Xt)===0&&ir(E,l)}fs()}if(n.length===0){o.then(()=>f(t.map(a)));return}var h=uo();function w(){Promise.all(n.map(m=>Pu(m))).then(m=>f([...t.map(a),...m])).catch(m=>ir(m,l)).finally(()=>h())}o?o.then(()=>{c(),w(),fs()}):w()}function Nu(){var e=ne,t=fe,n=De,s=te;return function(i=!0){Jt(e),Kt(t),Qr(n),i&&(e.f&Xt)===0&&(s?.activate(),s?.apply())}}function fs(e=!0){Jt(null),Kt(null),Qr(null),e&&te?.deactivate()}function uo(){var e=ne,t=e.b,n=te,s=t.is_rendered();return t.update_pending_count(1,n),n.increment(s,e),(a=!1)=>{t.update_pending_count(-1,n),n.decrement(s,e,a)}}function _s(e){var t=dt|ct;return ne!==null&&(ne.f|=Lr),{ctx:De,deps:null,effects:null,equals:eo,f:t,fn:e,reactions:null,rv:0,v:tt,wv:0,parent:ne,ac:null}}function Pu(e,t,n){let s=ne;s===null&&ru();var a=void 0,i=Ar(tt),l=!fe,c=new Map;return Xu(()=>{var o=ne,f=Zl();a=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(fs)}catch(E){f.reject(E),fs()}var h=te;if(l){if((o.f&Ir)!==0)var w=uo();if(s.b.is_rendered())c.get(h)?.reject(Kn),c.delete(h);else{for(const E of c.values())E.reject(Kn);c.clear()}c.set(h,f)}const m=(E,T=void 0)=>{if(w){var D=T===Kn;w(D)}if(!(T===Kn||(o.f&Xt)!==0)){if(h.activate(),T)i.f|=or,ea(i,T);else{(i.f&or)!==0&&(i.f^=or),ea(i,E);for(const[S,$]of c){if(c.delete(S),S===h)break;$.reject(Kn)}}h.deactivate()}};f.promise.then(m,E=>m(null,E||"unknown"))}),xo(()=>{for(const o of c.values())o.reject(Kn)}),new Promise(o=>{function f(h){function w(){h===a?o(i):f(a)}h.then(w,w)}f(a)})}function rr(e){const t=_s(e);return Io(t),t}function _i(e){const t=_s(e);return t.equals=no,t}function zu(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;nr(e))),t}function g(e,t,n=!1){fe!==null&&(!gn||(fe.f&Xs)!==0)&&Fa()&&(fe.f&(dt|Mn|Ma|Xs))!==0&&(Vt===null||!Vr.call(Vt,e))&&fu();let s=n?Ea(t):t;return ea(e,s,os)}function ea(e,t,n=null){if(!e.equals(t)){xr.set(e,dr?t:e.v);var s=fr.ensure();if(s.capture(e,t),(e.f&dt)!==0){const a=e;(e.f&ct)!==0&&gi(a),_n===null&&pi(a)}e.wv=Do(),vo(e,ct,n),Fa()&&ne!==null&&(ne.f&Ye)!==0&&(ne.f&(mn|ur))===0&&(jt===null?Ku([e]):jt.push(e)),!s.is_fork&&Ks.size>0&&!ho&&Uu()}return t}function Uu(){ho=!1;for(const e of Ks)(e.f&Ye)!==0&&Fe(e,bn),ra(e)&&Rr(e);Ks.clear()}function Oa(e){g(e,e.v+1)}function vo(e,t,n){var s=e.reactions;if(s!==null)for(var a=Fa(),i=s.length,l=0;l{if(Er===i)return c();var o=fe,f=Er;Kt(null),bl(i);var h=c();return Kt(o),bl(f),h};return s&&n.set("length",ar(e.length)),new Proxy(e,{defineProperty(c,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&cu();var h=n.get(o);return h===void 0?l(()=>{var w=ar(f.value);return n.set(o,w),w}):g(h,f.value,!0),!0},deleteProperty(c,o){var f=n.get(o);if(f===void 0){if(o in c){const h=l(()=>ar(tt));n.set(o,h),Oa(a)}}else g(f,tt),Oa(a);return!0},get(c,o,f){if(o===Xr)return e;var h=n.get(o),w=o in c;if(h===void 0&&(!w||La(c,o)?.writable)&&(h=l(()=>{var E=Ea(w?c[o]:tt),T=ar(E);return T}),n.set(o,h)),h!==void 0){var m=r(h);return m===tt?void 0:m}return Reflect.get(c,o,f)},getOwnPropertyDescriptor(c,o){var f=Reflect.getOwnPropertyDescriptor(c,o);if(f&&"value"in f){var h=n.get(o);h&&(f.value=r(h))}else if(f===void 0){var w=n.get(o),m=w?.v;if(w!==void 0&&m!==tt)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return f},has(c,o){if(o===Xr)return!0;var f=n.get(o),h=f!==void 0&&f.v!==tt||Reflect.has(c,o);if(f!==void 0||ne!==null&&(!h||La(c,o)?.writable)){f===void 0&&(f=l(()=>{var m=h?Ea(c[o]):tt,E=ar(m);return E}),n.set(o,f));var w=r(f);if(w===tt)return!1}return h},set(c,o,f,h){var w=n.get(o),m=o in c;if(s&&o==="length")for(var E=f;Ear(tt)),n.set(E+"",T))}if(w===void 0)(!m||La(c,o)?.writable)&&(w=l(()=>ar(void 0)),g(w,Ea(f)),n.set(o,w));else{m=w.v!==tt;var D=l(()=>Ea(f));g(w,D)}var S=Reflect.getOwnPropertyDescriptor(c,o);if(S?.set&&S.set.call(h,f),!m){if(s&&typeof o=="string"){var $=n.get("length"),R=Number(o);Number.isInteger(R)&&R>=$.v&&g($,R+1)}Oa(a)}return!0},ownKeys(c){r(a);var o=Reflect.ownKeys(c).filter(w=>{var m=n.get(w);return m===void 0||m.v!==tt});for(var[f,h]of n)h.v!==tt&&!(f in c)&&o.push(f);return o},setPrototypeOf(){uu()}})}var Js,_o,go,mo,bo;function Hu(){if(Js===void 0){Js=window,_o=document,go=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mo=La(t,"firstChild").get,bo=La(t,"nextSibling").get,hl(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),hl(n)&&(n.__t=void 0)}}function Nn(e=""){return document.createTextNode(e)}function lr(e){return mo.call(e)}function Ua(e){return bo.call(e)}function p(e,t){return lr(e)}function Xn(e,t=!1){{var n=lr(e);return n instanceof Comment&&n.data===""?Ua(n):n}}function _(e,t=1,n=!1){let s=e;for(;t--;)s=Ua(s);return s}function Bu(e){e.textContent=""}function ko(){return!1}function wo(e,t,n){return document.createElementNS(t??Ql,e,void 0)}let gl=!1;function qu(){gl||(gl=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function gs(e){var t=fe,n=ne;Kt(null),Jt(null);try{return e()}finally{Kt(t),Jt(n)}}function Gu(e,t,n,s=n){e.addEventListener(t,()=>gs(n));const a=e.__on_r;a?e.__on_r=()=>{a(),s(!0)}:e.__on_r=()=>s(!0),qu()}function yo(e){ne===null&&(fe===null&&lu(),iu()),dr&&su()}function Wu(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pn(e,t){var n=ne;n!==null&&(n.f&bt)!==0&&(e|=bt);var s={ctx:De,deps:null,nodes:null,f:e|ct|Yt,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};te?.register_created_effect(s);var a=s;if((e&Kr)!==0)Yr!==null?Yr.push(s):fr.ensure().schedule(s);else if(t!==null){try{Rr(s)}catch(l){throw At(s),l}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Lr)===0&&(a=a.first,(e&Mn)!==0&&(e&Jr)!==0&&a!==null&&(a.f|=Jr))}if(a!==null&&(a.parent=n,n!==null&&Wu(a,n),fe!==null&&(fe.f&dt)!==0&&(e&ur)===0)){var i=fe;(i.effects??=[]).push(a)}return s}function mi(){return fe!==null&&!gn}function xo(e){const t=Pn(za,null);return Fe(t,Ye),t.teardown=e,t}function Qs(e){yo();var t=ne.f,n=!fe&&(t&mn)!==0&&(t&Ir)===0;if(n){var s=De;(s.e??=[]).push(e)}else return To(e)}function To(e){return Pn(Kr|Vl,e)}function ju(e){return yo(),Pn(za|Vl,e)}function Zu(e){fr.ensure();const t=Pn(ur|Lr,e);return(n={})=>new Promise(s=>{n.outro?Tr(t,()=>{At(t),s(void 0)}):(At(t),s(void 0))})}function Na(e){return Pn(Kr,e)}function Rn(e,t){var n=De,s={effect:null,ran:!1,deps:e};n.l.$.push(s),s.effect=na(()=>{if(e(),!s.ran){s.ran=!0;var a=ne;try{Jt(a.parent),v(t)}finally{Jt(a)}}})}function Yu(){var e=De;na(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&Ye)!==0&&n.deps!==null&&Fe(n,bn),ra(n)&&Rr(n),t.ran=!1}})}function Xu(e){return Pn(Ma|Lr,e)}function na(e,t=0){return Pn(za|t,e)}function z(e,t=[],n=[],s=[]){Mu(s,t,n,a=>{Pn(za,()=>e(...a.map(r)))})}function ms(e,t=0){var n=Pn(Mn|t,e);return n}function Zt(e){return Pn(mn|Lr,e)}function Eo(e){var t=e.teardown;if(t!==null){const n=dr,s=fe;ml(!0),Kt(null);try{t.call(null)}finally{ml(n),Kt(s)}}}function bi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const a=n.ac;a!==null&&gs(()=>{a.abort(Kn)});var s=n.next;(n.f&ur)!==0?n.parent=null:At(n,t),n=s}}function Vu(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&mn)===0&&At(t),t=n}}function At(e,t=!0){var n=!1;(t||(e.f&Xl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(So(e.nodes.start,e.nodes.end),n=!0),Fe(e,Ys),bi(e,t&&!n),Pa(e,0);var s=e.nodes&&e.nodes.t;if(s!==null)for(const i of s)i.stop();Eo(e),e.f^=Ys,e.f|=Xt;var a=e.parent;a!==null&&a.first!==null&&Ao(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function So(e,t){for(;e!==null;){var n=e===t?null:Ua(e);e.remove(),e=n}}function Ao(e){var t=e.parent,n=e.prev,s=e.next;n!==null&&(n.next=s),s!==null&&(s.prev=n),t!==null&&(t.first===e&&(t.first=s),t.last===e&&(t.last=n))}function Tr(e,t,n=!0){var s=[];Ro(e,s,!0);var a=()=>{n&&At(e),t&&t()},i=s.length;if(i>0){var l=()=>--i||a();for(var c of s)c.out(l)}else a()}function Ro(e,t,n){if((e.f&bt)===0){e.f^=bt;var s=e.nodes&&e.nodes.t;if(s!==null)for(const c of s)(c.is_global||n)&&t.push(c);for(var a=e.first;a!==null;){var i=a.next;if((a.f&ur)===0){var l=(a.f&Jr)!==0||(a.f&mn)!==0&&(e.f&Mn)!==0;Ro(a,t,l?n:!1)}a=i}}}function ki(e){Co(e,!0)}function Co(e,t){if((e.f&bt)!==0){e.f^=bt,(e.f&Ye)===0&&(Fe(e,ct),fr.ensure().schedule(e));for(var n=e.first;n!==null;){var s=n.next,a=(n.f&Jr)!==0||(n.f&mn)!==0;Co(n,a?t:!1),n=s}var i=e.nodes&&e.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&l.in()}}function wi(e,t){if(e.nodes)for(var n=e.nodes.start,s=e.nodes.end;n!==null;){var a=n===s?null:Ua(n);t.append(n),n=a}}let cs=!1,dr=!1;function ml(e){dr=e}let fe=null,gn=!1;function Kt(e){fe=e}let ne=null;function Jt(e){ne=e}let Vt=null;function Io(e){fe!==null&&(Vt===null?Vt=[e]:Vt.push(e))}let St=null,Pt=0,jt=null;function Ku(e){jt=e}let Lo=1,yr=0,Er=yr;function bl(e){Er=e}function Do(){return++Lo}function ra(e){var t=e.f;if((t&ct)!==0)return!0;if(t&dt&&(e.f&=~Sr),(t&bn)!==0){for(var n=e.deps,s=n.length,a=0;ae.wv)return!0}(t&Yt)!==0&&_n===null&&Fe(e,Ye)}return!1}function Oo(e,t,n=!0){var s=e.reactions;if(s!==null&&!(Vt!==null&&Vr.call(Vt,e)))for(var a=0;a{e.ac.abort(Kn)}),e.ac=null);try{e.f|=us;var h=e.fn,w=h();e.f|=Ir;var m=e.deps,E=te?.is_fork;if(St!==null){var T;if(E||Pa(e,Pt),m!==null&&Pt>0)for(m.length=Pt+St.length,T=0;Tn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?cr(()=>{t.addEventListener(e,a,s)}):t.addEventListener(e,a,s),a}function Cn(e,t,n,s,a){var i={capture:s,passive:a},l=tf(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&xo(()=>{t.removeEventListener(e,l,i)})}function W(e,t,n){(t[Sa]??={})[e]=n}function nf(e){for(var t=0;t{throw S});throw m}}finally{e[Sa]=t,delete e.currentTarget,Kt(h),Jt(w)}}}const rf=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function af(e){return rf?.createHTML(e)??e}function sf(e){var t=wo("template");return t.innerHTML=af(e.replaceAll("","")),t.content}function ta(e,t){var n=ne;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function M(e,t){var n=(t&gu)!==0,s=(t&mu)!==0,a,i=!e.startsWith("");return()=>{a===void 0&&(a=sf(i?e:""+e),n||(a=lr(a)));var l=s||go?document.importNode(a,!0):a.cloneNode(!0);if(n){var c=lr(l),o=l.lastChild;ta(c,o)}else ta(l,l);return l}}function _t(e=""){{var t=Nn(e+"");return ta(t,t),t}}function Aa(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Nn();return e.append(t,n),ta(t,n),e}function A(e,t){e!==null&&e.before(t)}function L(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function lf(e,t){return of(e,t)}const as=new Map;function of(e,{target:t,anchor:n,props:s={},events:a,context:i,intro:l=!0,transformError:c}){Hu();var o=void 0,f=Zu(()=>{var h=n??t.appendChild(Nn());Du(h,{pending:()=>{}},E=>{fi({});var T=De;i&&(T.c=i),a&&(s.$$events=a),o=e(E,s)||{},di()},c);var w=new Set,m=E=>{for(var T=0;T{for(var E of w)for(const S of[t,document]){var T=as.get(S),D=T.get(E);--D==0?(S.removeEventListener(E,ri),T.delete(E),T.size===0&&as.delete(S)):T.set(E,D)}ni.delete(m),h!==n&&h.parentNode?.removeChild(h)}});return cf.set(o,f),o}let cf=new WeakMap;class uf{anchor;#n=new Map;#o=new Map;#e=new Map;#a=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#s=t=>{if(this.#n.has(t)){var n=this.#n.get(t),s=this.#o.get(n);if(s)ki(s),this.#a.delete(n);else{var a=this.#e.get(n);a&&(this.#o.set(n,a.effect),this.#e.delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[i,l]of this.#n){if(this.#n.delete(i),i===t)break;const c=this.#e.get(l);c&&(At(c.effect),this.#e.delete(l))}for(const[i,l]of this.#o){if(i===n||this.#a.has(i))continue;const c=()=>{if(Array.from(this.#n.values()).includes(i)){var f=document.createDocumentFragment();wi(l,f),f.append(Nn()),this.#e.set(i,{effect:l,fragment:f})}else At(l);this.#a.delete(i),this.#o.delete(i)};this.#r||!s?(this.#a.add(i),Tr(l,c,!1)):c()}}};#t=t=>{this.#n.delete(t);const n=Array.from(this.#n.values());for(const[s,a]of this.#e)n.includes(s)||(At(a.effect),this.#e.delete(s))};ensure(t,n){var s=te,a=ko();if(n&&!this.#o.has(t)&&!this.#e.has(t))if(a){var i=document.createDocumentFragment(),l=Nn();i.append(l),this.#e.set(t,{effect:Zt(()=>n(l)),fragment:i})}else this.#o.set(t,Zt(()=>n(this.anchor)));if(this.#n.set(s,t),a){for(const[c,o]of this.#o)c===t?s.unskip_effect(o):s.skip_effect(o);for(const[c,o]of this.#e)c===t?s.unskip_effect(o.effect):s.skip_effect(o.effect);s.oncommit(this.#s),s.ondiscard(this.#t)}else this.#s(s)}}function j(e,t,n=!1){var s=new uf(e),a=n?Jr:0;function i(l,c){s.ensure(l,c)}ms(()=>{var l=!1;t((c,o=0)=>{l=!0,i(o,c)}),l||i(-1,null)},a)}function ff(e,t){return t}function df(e,t,n){for(var s=[],a=t.length,i,l=t.length,c=0;c{if(i){if(i.pending.delete(w),i.done.add(w),i.pending.size===0){var m=e.outrogroups;ai(e,vs(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var o=s.length===0&&n!==null;if(o){var f=n,h=f.parentNode;Bu(h),h.append(f),e.items.clear()}ai(e,t,!o)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function ai(e,t,n=!0){var s;if(e.pending.size>0){s=new Set;for(const l of e.pending.values())for(const c of l)s.add(e.items.get(c).e)}for(var a=0;a{var ee=n();return Wl(ee)?ee:ee==null?[]:vs(ee)}),m,E=new Map,T=!0;function D(ee){(R.effect.f&Xt)===0&&(R.pending.delete(ee),R.fallback=h,pf(R,m,l,t,s),h!==null&&(m.length===0?(h.f&On)===0?ki(h):(h.f^=On,Ra(h,null,l)):Tr(h,()=>{h=null})))}function S(ee){R.pending.delete(ee)}var $=ms(()=>{m=r(w);for(var ee=m.length,C=new Set,le=te,he=ko(),Ae=0;Aei(l)):(h=Zt(()=>i(wl??=Nn())),h.f|=On)),ee>C.size&&au(),!T)if(E.set(le,C),he){for(const[Te,Re]of c)C.has(Te)||le.skip_effect(Re.e);le.oncommit(D),le.ondiscard(S)}else D(le);r(w)}),R={effect:$,items:c,pending:E,outrogroups:null,fallback:h};T=!1}function ma(e){for(;e!==null&&(e.f&mn)===0;)e=e.next;return e}function pf(e,t,n,s,a){var i=(s&vu)!==0,l=t.length,c=e.items,o=ma(e.effect.first),f,h=null,w,m=[],E=[],T,D,S,$;if(i)for($=0;$0){var rt=(s&Jl)!==0&&l===0?n:null;if(i){for($=0;${if(w!==void 0)for(S of w)S.nodes?.a?.apply()})}function hf(e,t,n,s,a,i,l,c){var o=(l&pu)!==0?(l&_u)===0?Z(n,!1,!1):Ar(n):null,f=(l&hu)!==0?Ar(a):null;return{v:o,i:f,e:Zt(()=>(i(t,o??n,f??a,c),()=>{e.delete(s)}))}}function Ra(e,t,n){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end,i=t&&(t.f&On)===0?t.nodes.start:n;s!==null;){var l=Ua(s);if(i.before(s),s===a)return;s=l}}function sr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function zs(e,t,n=!1,s=!1,a=!1,i=!1){var l=e,c="";if(n)var o=e;z(()=>{var f=ne;if(c!==(c=t()??"")){if(n){f.nodes=null,o.innerHTML=c,c!==""&&ta(lr(o),o.lastChild);return}if(f.nodes!==null&&(So(f.nodes.start,f.nodes.end),f.nodes=null),c!==""){var h=s?bu:a?ku:void 0,w=wo(s?"svg":a?"math":"template",h);w.innerHTML=c;var m=s||a?w:w.content;if(ta(lr(m),m.lastChild),s||a)for(;lr(m);)l.before(lr(m));else l.before(m)}}})}function $o(e,t){var n;n=document.head.appendChild(Nn()),ms(()=>t(n),Xl|Lr)}function yl(e,t,n){Na(()=>{var s=v(()=>t(e,n?.())||{});if(n&&s?.update){var a=!1,i={};na(()=>{var l=n();pn(l),a&&to(i,l)&&(i=l,s.update(l))}),a=!0}if(s?.destroy)return()=>s.destroy()})}const xl=[...` -\r\f \v\uFEFF`];function vf(e,t,n){var s=e==null?"":""+e;if(n){for(var a of Object.keys(n))if(n[a])s=s?s+" "+a:a;else if(s.length)for(var i=a.length,l=0;(l=s.indexOf(a,l))>=0;){var c=l+i;(l===0||xl.includes(s[l-1]))&&(c===s.length||xl.includes(s[c]))?s=(l===0?"":s.substring(0,l))+s.substring(c+1):l=c}}return s===""?null:s}function _f(e,t){return e==null?null:String(e)}function Mt(e,t,n,s,a,i){var l=e.__className;if(l!==n||l===void 0){var c=vf(n,s,i);c==null?e.removeAttribute("class"):e.className=c,e.__className=n}else if(i&&a!==i)for(var o in i){var f=!!i[o];(a==null||f!==!!a[o])&&e.classList.toggle(o,f)}return i}function Yn(e,t,n,s){var a=e.__style;if(a!==t){var i=_f(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return s}const gf=Symbol("is custom element"),mf=Symbol("is html");function F(e,t,n,s){var a=bf(e);a[t]!==(a[t]=n)&&(t==="loading"&&(e[nu]=n),n==null?e.removeAttribute(t):typeof n!="string"&&kf(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function bf(e){return e.__attributes??={[gf]:e.nodeName.includes("-"),[mf]:e.namespaceURI===Ql}}var Tl=new Map;function kf(e){var t=e.getAttribute("is")||e.nodeName,n=Tl.get(t);if(n)return n;Tl.set(t,n=[]);for(var s,a=e,i=Element.prototype;i!==a;){s=jl(a);for(var l in s)s[l].set&&n.push(l);a=ui(a)}return n}function In(e,t,n=t){var s=new WeakSet;Gu(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=$s(e)?Fs(i):i,n(i),te!==null&&s.add(te),await ei(),i!==(i=t())){var l=e.selectionStart,c=e.selectionEnd,o=e.value.length;if(e.value=i??"",c!==null){var f=e.value.length;l===c&&c===o&&f>o?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=l,e.selectionEnd=Math.min(c,f))}}}),v(t)==null&&e.value&&(n($s(e)?Fs(e.value):e.value),te!==null&&s.add(te)),na(()=>{var a=t();if(e===document.activeElement){var i=te;if(s.has(i))return}$s(e)&&a===Fs(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function $s(e){var t=e.type;return t==="number"||t==="range"}function Fs(e){return e===""?null:+e}function El(e,t){return e===t||e?.[Xr]===t}function Us(e={},t,n,s){var a=De.r,i=ne;return Na(()=>{var l,c;return na(()=>{l=c,c=[],v(()=>{e!==n(...c)&&(t(e,...c),l&&El(n(...l),e)&&t(null,...l))})}),()=>{let o=i;for(;o!==a&&o.parent!==null&&o.parent.f&Ys;)o=o.parent;const f=()=>{c&&El(n(...c),e)&&t(null,...c)},h=o.teardown;o.teardown=()=>{f(),h?.()}}}),e}function Fo(e=!1){const t=De,n=t.l.u;if(!n)return;let s=()=>pn(t.s);if(e){let a=0,i={};const l=_s(()=>{let c=!1;const o=t.s;for(const f in o)o[f]!==i[f]&&(i[f]=o[f],c=!0);return c&&a++,a});s=()=>r(l)}n.b.length&&ju(()=>{Sl(t,s),js(n.b)}),Qs(()=>{const a=v(()=>n.m.map(tu));return()=>{for(const i of a)typeof i=="function"&&i()}}),n.a.length&&Qs(()=>{Sl(t,s),js(n.a)})}function Sl(e,t){if(e.l.s)for(const n of e.l.s)r(n);t()}function Uo(e){De===null&&Kl(),$a&&De.l!==null?yf(De).m.push(e):Qs(()=>{const t=v(e);if(typeof t=="function")return t})}function wf(e){De===null&&Kl(),Uo(()=>()=>v(e))}function yf(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const xf="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(xf);Tu();class Ho extends Error{constructor(t,n){super(n),this.status=t}status}async function lt(e,t={}){const n=new Headers(t.headers);n.set("Accept","application/json"),t.body&&!(t.body instanceof FormData)&&n.set("Content-Type","application/json");const s=await fetch(e,{...t,headers:n});if(!s.ok)throw new Ho(s.status,await s.text());return s.json()}const{entries:Bo,setPrototypeOf:Al,isFrozen:Tf,getPrototypeOf:Ef,getOwnPropertyDescriptor:Sf}=Object;let{freeze:kt,seal:Qt,create:jr}=Object,{apply:si,construct:ii}=typeof Reflect<"u"&&Reflect;kt||(kt=function(t){return t});Qt||(Qt=function(t){return t});si||(si=function(t,n){for(var s=arguments.length,a=new Array(s>2?s-2:0),i=2;i1?n-1:0),a=1;a"u"?null:Xe(BigInt.prototype.toString),Dl=typeof Symbol>"u"?null:Xe(Symbol.prototype.toString),$e=Xe(Object.prototype.hasOwnProperty),wa=Xe(Object.prototype.toString),ot=Xe(RegExp.prototype.test),ss=Df(TypeError);function Xe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:Ca;if(Al&&Al(e,null),!gt(t))return e;let s=t.length;for(;s--;){let a=t[s];if(typeof a=="string"){const i=n(a);i!==a&&(Tf(t)||(t[s]=i),a=i)}e[a]=!0}return e}function Of(e){for(let t=0;t/gm),Uf=Qt(/\$\{[\w\W]*/gm),Hf=Qt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bf=Qt(/^aria-[\-\w]+$/),qo=Qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qf=Qt(/^(?:\w+script|data):/i),Gf=Qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Go=Qt(/^html$/i),Wf=Qt(/^[a-z][.\w]*(-[.\w]+)+$/i);var zl=Object.freeze({__proto__:null,ARIA_ATTR:Bf,ATTR_WHITESPACE:Gf,CUSTOM_ELEMENT:Wf,DATA_ATTR:Hf,DOCTYPE_NAME:Go,ERB_EXPR:Ff,IS_ALLOWED_URI:qo,IS_SCRIPT_OR_DATA:qf,MUSTACHE_EXPR:$f,TMPLIT_EXPR:Uf});const ya={element:1,text:3,progressingInstruction:7,comment:8,document:9},jf=function(){return typeof window>"u"?null:window},Zf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(s=n.getAttribute(a));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},$l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Wo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jf();const t=q=>Wo(q);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==ya.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const s=n,a=s.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:c,Element:o,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:w,DOMParser:m,trustedTypes:E}=e,T=o.prototype,D=Zr(T,"cloneNode"),S=Zr(T,"remove"),$=Zr(T,"nextSibling"),R=Zr(T,"childNodes"),ee=Zr(T,"parentNode");if(typeof l=="function"){const q=n.createElement("template");q.content&&q.content.ownerDocument&&(n=q.content.ownerDocument)}let C,le="";const{implementation:he,createNodeIterator:Ae,createDocumentFragment:nt,getElementsByTagName:rt}=n,{importNode:xe}=s;let Te=$l();t.isSupported=typeof Bo=="function"&&typeof ee=="function"&&he&&he.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Re,ERB_EXPR:Ee,TMPLIT_EXPR:Rt,DATA_ATTR:kn,ARIA_ATTR:zn,IS_SCRIPT_OR_DATA:zt,ATTR_WHITESPACE:en,CUSTOM_ELEMENT:Jn}=zl;let{IS_ALLOWED_URI:$n}=zl,Oe=null;const $t=K({},[...Ol,...Bs,...qs,...Gs,...Ml]);let Ue=null;const wn=K({},[...Nl,...Ws,...Pl,...is]);let ve=Object.seal(jr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),tn=null,nn=null;const Ct=Object.seal(jr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fn=!0,rn=!0,de=!1,Je=!0,Ft=!1,an=!0,Me=!1,sa=!1,ia=!1,sn=!1,Or=!1,Mr=!1,Ba=!0,pr=!1;const qa="user-content-";let pt=!0,Un=!1,Hn={},It=null;const Nr=K({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Pr=null;const Ga=K({},["audio","video","img","source","image","track"]);let la=null;const Wa=K({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),zr="http://www.w3.org/1998/Math/MathML",$r="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml";let Qn=Ut,oa=!1,ca=null;const ws=K({},[zr,$r,Ut],Hs);let wt=K({},["mi","mo","mn","ms","mtext"]),Fr=K({},["annotation-xml"]);const er=K({},["title","style","font","a","script"]);let yn=null;const ja=["application/xhtml+xml","text/html"],ys="text/html";let He=null,xn=null;const xs=n.createElement("form"),Za=function(u){return u instanceof RegExp||u instanceof Function},tr=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(xn&&xn===u)return;(!u||typeof u!="object")&&(u={}),u=Et(u),yn=ja.indexOf(u.PARSER_MEDIA_TYPE)===-1?ys:u.PARSER_MEDIA_TYPE,He=yn==="application/xhtml+xml"?Hs:Ca,Oe=$e(u,"ALLOWED_TAGS")&>(u.ALLOWED_TAGS)?K({},u.ALLOWED_TAGS,He):$t,Ue=$e(u,"ALLOWED_ATTR")&>(u.ALLOWED_ATTR)?K({},u.ALLOWED_ATTR,He):wn,ca=$e(u,"ALLOWED_NAMESPACES")&>(u.ALLOWED_NAMESPACES)?K({},u.ALLOWED_NAMESPACES,Hs):ws,la=$e(u,"ADD_URI_SAFE_ATTR")&>(u.ADD_URI_SAFE_ATTR)?K(Et(Wa),u.ADD_URI_SAFE_ATTR,He):Wa,Pr=$e(u,"ADD_DATA_URI_TAGS")&>(u.ADD_DATA_URI_TAGS)?K(Et(Ga),u.ADD_DATA_URI_TAGS,He):Ga,It=$e(u,"FORBID_CONTENTS")&>(u.FORBID_CONTENTS)?K({},u.FORBID_CONTENTS,He):Nr,tn=$e(u,"FORBID_TAGS")&>(u.FORBID_TAGS)?K({},u.FORBID_TAGS,He):Et({}),nn=$e(u,"FORBID_ATTR")&>(u.FORBID_ATTR)?K({},u.FORBID_ATTR,He):Et({}),Hn=$e(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?Et(u.USE_PROFILES):u.USE_PROFILES:!1,Fn=u.ALLOW_ARIA_ATTR!==!1,rn=u.ALLOW_DATA_ATTR!==!1,de=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Je=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=u.SAFE_FOR_TEMPLATES||!1,an=u.SAFE_FOR_XML!==!1,Me=u.WHOLE_DOCUMENT||!1,sn=u.RETURN_DOM||!1,Or=u.RETURN_DOM_FRAGMENT||!1,Mr=u.RETURN_TRUSTED_TYPE||!1,ia=u.FORCE_BODY||!1,Ba=u.SANITIZE_DOM!==!1,pr=u.SANITIZE_NAMED_PROPS||!1,pt=u.KEEP_CONTENT!==!1,Un=u.IN_PLACE||!1,$n=Nf(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:qo,Qn=typeof u.NAMESPACE=="string"?u.NAMESPACE:Ut,wt=$e(u,"MATHML_TEXT_INTEGRATION_POINTS")&&u.MATHML_TEXT_INTEGRATION_POINTS&&typeof u.MATHML_TEXT_INTEGRATION_POINTS=="object"?Et(u.MATHML_TEXT_INTEGRATION_POINTS):K({},["mi","mo","mn","ms","mtext"]),Fr=$e(u,"HTML_INTEGRATION_POINTS")&&u.HTML_INTEGRATION_POINTS&&typeof u.HTML_INTEGRATION_POINTS=="object"?Et(u.HTML_INTEGRATION_POINTS):K({},["annotation-xml"]);const x=$e(u,"CUSTOM_ELEMENT_HANDLING")&&u.CUSTOM_ELEMENT_HANDLING&&typeof u.CUSTOM_ELEMENT_HANDLING=="object"?Et(u.CUSTOM_ELEMENT_HANDLING):jr(null);if(ve=jr(null),$e(x,"tagNameCheck")&&Za(x.tagNameCheck)&&(ve.tagNameCheck=x.tagNameCheck),$e(x,"attributeNameCheck")&&Za(x.attributeNameCheck)&&(ve.attributeNameCheck=x.attributeNameCheck),$e(x,"allowCustomizedBuiltInElements")&&typeof x.allowCustomizedBuiltInElements=="boolean"&&(ve.allowCustomizedBuiltInElements=x.allowCustomizedBuiltInElements),Ft&&(rn=!1),Or&&(sn=!0),Hn&&(Oe=K({},Ml),Ue=jr(null),Hn.html===!0&&(K(Oe,Ol),K(Ue,Nl)),Hn.svg===!0&&(K(Oe,Bs),K(Ue,Ws),K(Ue,is)),Hn.svgFilters===!0&&(K(Oe,qs),K(Ue,Ws),K(Ue,is)),Hn.mathMl===!0&&(K(Oe,Gs),K(Ue,Pl),K(Ue,is))),Ct.tagCheck=null,Ct.attributeCheck=null,$e(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?Ct.tagCheck=u.ADD_TAGS:gt(u.ADD_TAGS)&&(Oe===$t&&(Oe=Et(Oe)),K(Oe,u.ADD_TAGS,He))),$e(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?Ct.attributeCheck=u.ADD_ATTR:gt(u.ADD_ATTR)&&(Ue===wn&&(Ue=Et(Ue)),K(Ue,u.ADD_ATTR,He))),$e(u,"ADD_URI_SAFE_ATTR")&>(u.ADD_URI_SAFE_ATTR)&&K(la,u.ADD_URI_SAFE_ATTR,He),$e(u,"FORBID_CONTENTS")&>(u.FORBID_CONTENTS)&&(It===Nr&&(It=Et(It)),K(It,u.FORBID_CONTENTS,He)),$e(u,"ADD_FORBID_CONTENTS")&>(u.ADD_FORBID_CONTENTS)&&(It===Nr&&(It=Et(It)),K(It,u.ADD_FORBID_CONTENTS,He)),pt&&(Oe["#text"]=!0),Me&&K(Oe,["html","head","body"]),Oe.table&&(K(Oe,["tbody"]),delete tn.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=u.TRUSTED_TYPES_POLICY,le=C.createHTML("")}else C===void 0&&(C=Zf(E,a)),C!==null&&typeof le=="string"&&(le=C.createHTML(""));kt&&kt(u),xn=u},Ya=K({},[...Bs,...qs,...Pf]),Xa=K({},[...Gs,...zf]),ln=function(u){let x=ee(u);(!x||!x.tagName)&&(x={namespaceURI:Qn,tagName:"template"});const N=Ca(u.tagName),_e=Ca(x.tagName);return ca[u.namespaceURI]?u.namespaceURI===$r?x.namespaceURI===Ut?N==="svg":x.namespaceURI===zr?N==="svg"&&(_e==="annotation-xml"||wt[_e]):!!Ya[N]:u.namespaceURI===zr?x.namespaceURI===Ut?N==="math":x.namespaceURI===$r?N==="math"&&Fr[_e]:!!Xa[N]:u.namespaceURI===Ut?x.namespaceURI===$r&&!Fr[_e]||x.namespaceURI===zr&&!wt[_e]?!1:!Xa[N]&&(er[N]||!Ya[N]):!!(yn==="application/xhtml+xml"&&ca[u.namespaceURI]):!1},qe=function(u){ka(t.removed,{element:u});try{ee(u).removeChild(u)}catch{S(u)}},Ht=function(u,x){try{ka(t.removed,{attribute:x.getAttributeNode(u),from:x})}catch{ka(t.removed,{attribute:null,from:x})}if(x.removeAttribute(u),u==="is")if(sn||Or)try{qe(x)}catch{}else try{x.setAttribute(u,"")}catch{}},Va=function(u){let x=null,N=null;if(ia)u=""+u;else{const Ne=Cl(u,/^[\r\n\t ]+/);N=Ne&&Ne[0]}yn==="application/xhtml+xml"&&Qn===Ut&&(u=''+u+"");const _e=C?C.createHTML(u):u;if(Qn===Ut)try{x=new m().parseFromString(_e,yn)}catch{}if(!x||!x.documentElement){x=he.createDocument(Qn,"template",null);try{x.documentElement.innerHTML=oa?le:_e}catch{}}const Be=x.body||x.documentElement;return u&&N&&Be.insertBefore(n.createTextNode(N),Be.childNodes[0]||null),Qn===Ut?rt.call(x,Me?"html":"body")[0]:Me?x.documentElement:Be},Ka=function(u){return Ae.call(u.ownerDocument||u,u,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},hr=function(u){return u instanceof w&&(typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||!(u.attributes instanceof h)||typeof u.removeAttribute!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function")},Lt=function(u){return typeof c=="function"&&u instanceof c};function on(q,u,x){ba(q,N=>{N.call(t,u,x,xn)})}const Ja=function(u){let x=null;if(on(Te.beforeSanitizeElements,u,null),hr(u))return qe(u),!0;const N=He(u.nodeName);if(on(Te.uponSanitizeElement,u,{tagName:N,allowedTags:Oe}),an&&u.hasChildNodes()&&!Lt(u.firstElementChild)&&ot(/<[/\w!]/g,u.innerHTML)&&ot(/<[/\w!]/g,u.textContent)||an&&u.namespaceURI===Ut&&N==="style"&&Lt(u.firstElementChild)||u.nodeType===ya.progressingInstruction||an&&u.nodeType===ya.comment&&ot(/<[/\w]/g,u.data))return qe(u),!0;if(tn[N]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(N))&&!Oe[N]){if(!tn[N]&&Qa(N)&&(ve.tagNameCheck instanceof RegExp&&ot(ve.tagNameCheck,N)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(N)))return!1;if(pt&&!It[N]){const _e=ee(u)||u.parentNode,Be=R(u)||u.childNodes;if(Be&&_e){const Ne=Be.length;for(let ut=Ne-1;ut>=0;--ut){const ft=D(Be[ut],!0);_e.insertBefore(ft,$(u))}}}return qe(u),!0}return u instanceof o&&!ln(u)||(N==="noscript"||N==="noembed"||N==="noframes")&&ot(/<\/no(script|embed|frames)/i,u.innerHTML)?(qe(u),!0):(Ft&&u.nodeType===ya.text&&(x=u.textContent,ba([Re,Ee,Rt],_e=>{x=Gr(x,_e," ")}),u.textContent!==x&&(ka(t.removed,{element:u.cloneNode()}),u.textContent=x)),on(Te.afterSanitizeElements,u,null),!1)},vr=function(u,x,N){if(nn[x]||Ba&&(x==="id"||x==="name")&&(N in n||N in xs))return!1;const _e=Ue[x]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(x,u);if(!(rn&&!nn[x]&&ot(kn,x))){if(!(Fn&&ot(zn,x))){if(!_e||nn[x]){if(!(Qa(u)&&(ve.tagNameCheck instanceof RegExp&&ot(ve.tagNameCheck,u)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(u))&&(ve.attributeNameCheck instanceof RegExp&&ot(ve.attributeNameCheck,x)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(x,u))||x==="is"&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&ot(ve.tagNameCheck,N)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(N))))return!1}else if(!la[x]){if(!ot($n,Gr(N,en,""))){if(!((x==="src"||x==="xlink:href"||x==="href")&&u!=="script"&&Il(N,"data:")===0&&Pr[u])){if(!(de&&!ot(zt,Gr(N,en,"")))){if(N)return!1}}}}}}return!0},Ts=K({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Qa=function(u){return!Ts[Ca(u)]&&ot(Jn,u)},Ve=function(u){on(Te.beforeSanitizeAttributes,u,null);const{attributes:x}=u;if(!x||hr(u))return;const N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ue,forceKeepAttr:void 0};let _e=x.length;for(;_e--;){const Be=x[_e],{name:Ne,namespaceURI:ut,value:ft}=Be,Qe=He(Ne),Ur=ft;let Ge=Ne==="value"?Ur:Cf(Ur);if(N.attrName=Qe,N.attrValue=Ge,N.keepAttr=!0,N.forceKeepAttr=void 0,on(Te.uponSanitizeAttribute,u,N),Ge=N.attrValue,pr&&(Qe==="id"||Qe==="name")&&Il(Ge,qa)!==0&&(Ht(Ne,u),Ge=qa+Ge),an&&ot(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ge)){Ht(Ne,u);continue}if(Qe==="attributename"&&Cl(Ge,"href")){Ht(Ne,u);continue}if(N.forceKeepAttr)continue;if(!N.keepAttr){Ht(Ne,u);continue}if(!Je&&ot(/\/>/i,Ge)){Ht(Ne,u);continue}Ft&&ba([Re,Ee,Rt],ts=>{Ge=Gr(Ge,ts," ")});const es=He(u.nodeName);if(!vr(es,Qe,Ge)){Ht(Ne,u);continue}if(C&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!ut)switch(E.getAttributeType(es,Qe)){case"TrustedHTML":{Ge=C.createHTML(Ge);break}case"TrustedScriptURL":{Ge=C.createScriptURL(Ge);break}}if(Ge!==Ur)try{ut?u.setAttributeNS(ut,Ne,Ge):u.setAttribute(Ne,Ge),hr(u)?qe(u):Rl(t.removed)}catch{Ht(Ne,u)}}on(Te.afterSanitizeAttributes,u,null)},_r=function(u){let x=null;const N=Ka(u);for(on(Te.beforeSanitizeShadowDOM,u,null);x=N.nextNode();)on(Te.uponSanitizeShadowNode,x,null),Ja(x),Ve(x),x.content instanceof i&&_r(x.content);on(Te.afterSanitizeShadowDOM,u,null)};return t.sanitize=function(q){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=null,N=null,_e=null,Be=null;if(oa=!q,oa&&(q=""),typeof q!="string"&&!Lt(q)&&(q=Mf(q),typeof q!="string"))throw ss("dirty is not a string, aborting");if(!t.isSupported)return q;if(sa||tr(u),t.removed=[],typeof q=="string"&&(Un=!1),Un){const ft=q.nodeName;if(typeof ft=="string"){const Qe=He(ft);if(!Oe[Qe]||tn[Qe])throw ss("root node is forbidden and cannot be sanitized in-place")}}else if(q instanceof c)x=Va(""),N=x.ownerDocument.importNode(q,!0),N.nodeType===ya.element&&N.nodeName==="BODY"||N.nodeName==="HTML"?x=N:x.appendChild(N);else{if(!sn&&!Ft&&!Me&&q.indexOf("<")===-1)return C&&Mr?C.createHTML(q):q;if(x=Va(q),!x)return sn?null:Mr?le:""}x&&ia&&qe(x.firstChild);const Ne=Ka(Un?q:x);for(;_e=Ne.nextNode();)Ja(_e),Ve(_e),_e.content instanceof i&&_r(_e.content);if(Un)return q;if(sn){if(Ft){x.normalize();let ft=x.innerHTML;ba([Re,Ee,Rt],Qe=>{ft=Gr(ft,Qe," ")}),x.innerHTML=ft}if(Or)for(Be=nt.call(x.ownerDocument);x.firstChild;)Be.appendChild(x.firstChild);else Be=x;return(Ue.shadowroot||Ue.shadowrootmode)&&(Be=xe.call(s,Be,!0)),Be}let ut=Me?x.outerHTML:x.innerHTML;return Me&&Oe["!doctype"]&&x.ownerDocument&&x.ownerDocument.doctype&&x.ownerDocument.doctype.name&&ot(Go,x.ownerDocument.doctype.name)&&(ut=" -`+ut),Ft&&ba([Re,Ee,Rt],ft=>{ut=Gr(ut,ft," ")}),C&&Mr?C.createHTML(ut):ut},t.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tr(q),sa=!0},t.clearConfig=function(){xn=null,sa=!1},t.isValidAttribute=function(q,u,x){xn||tr({});const N=He(q),_e=He(u);return vr(N,_e,x)},t.addHook=function(q,u){typeof u=="function"&&ka(Te[q],u)},t.removeHook=function(q,u){if(u!==void 0){const x=Af(Te[q],u);return x===-1?void 0:Rf(Te[q],x,1)[0]}return Rl(Te[q])},t.removeHooks=function(q){Te[q]=[]},t.removeAllHooks=function(){Te=$l()},t}var Yf=Wo();function yi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dr=yi();function jo(e){Dr=e}var kr={exec:()=>null};function ue(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(a,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(mt.caret,"$1"),n=n.replace(a,l),s},getRegex:()=>new RegExp(n,t)};return s}var Xf=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Vf=/^(?:[ \t]*(?:\n|$))+/,Kf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Jf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ha=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Qf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Zo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yo=ue(Zo).replace(/bull/g,xi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ed=ue(Zo).replace(/bull/g,xi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ti=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,td=/^[^\n]+/,Ei=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nd=ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ei).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rd=ue(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xi).getRegex(),bs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Si=/|$))/,ad=ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Si).replace("tag",bs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xo=ue(Ti).replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex(),sd=ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xo).getRegex(),Ai={blockquote:sd,code:Kf,def:nd,fences:Jf,heading:Qf,hr:Ha,html:ad,lheading:Yo,list:rd,newline:Vf,paragraph:Xo,table:kr,text:td},Fl=ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex(),id={...Ai,lheading:ed,table:Fl,paragraph:ue(Ti).replace("hr",Ha).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex()},ld={...Ai,html:ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Si).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:kr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ue(Ti).replace("hr",Ha).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Yo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},od=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Vo=/^( {2,}|\\)\n(?!\s*$)/,ud=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xf?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Jo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,vd=ue(Jo,"u").replace(/punct/g,aa).getRegex(),_d=ue(Jo,"u").replace(/punct/g,Ko).getRegex(),Qo="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gd=ue(Qo,"gu").replace(/notPunctSpace/g,Ri).replace(/punctSpace/g,ks).replace(/punct/g,aa).getRegex(),md=ue(Qo,"gu").replace(/notPunctSpace/g,pd).replace(/punctSpace/g,dd).replace(/punct/g,Ko).getRegex(),bd=ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ri).replace(/punctSpace/g,ks).replace(/punct/g,aa).getRegex(),kd=ue(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,aa).getRegex(),wd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",yd=ue(wd,"gu").replace(/notPunctSpace/g,Ri).replace(/punctSpace/g,ks).replace(/punct/g,aa).getRegex(),xd=ue(/\\(punct)/,"gu").replace(/punct/g,aa).getRegex(),Td=ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ed=ue(Si).replace("(?:-->|$)","-->").getRegex(),Sd=ue("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ed).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ad=ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ec=ue(/^!?\[(label)\]\[(ref)\]/).replace("label",ds).replace("ref",Ei).getRegex(),tc=ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ei).getRegex(),Rd=ue("reflink|nolink(?!\\()","g").replace("reflink",ec).replace("nolink",tc).getRegex(),Ul=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ci={_backpedal:kr,anyPunctuation:xd,autolink:Td,blockSkip:hd,br:Vo,code:cd,del:kr,delLDelim:kr,delRDelim:kr,emStrongLDelim:vd,emStrongRDelimAst:gd,emStrongRDelimUnd:bd,escape:od,link:Ad,nolink:tc,punctuation:fd,reflink:ec,reflinkSearch:Rd,tag:Sd,text:ud,url:kr},Cd={...Ci,link:ue(/^!?\[(label)\]\((.*?)\)/).replace("label",ds).getRegex(),reflink:ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ds).getRegex()},li={...Ci,emStrongRDelimAst:md,emStrongLDelim:_d,delLDelim:kd,delRDelim:yd,url:ue(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ul).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ue(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Hl=e=>Ld[e];function Dn(e,t){if(t){if(mt.escapeTest.test(e))return e.replace(mt.escapeReplace,Hl)}else if(mt.escapeTestNoEncode.test(e))return e.replace(mt.escapeReplaceNoEncode,Hl);return e}function Bl(e){try{e=encodeURI(e).replace(mt.percentDecode,"%")}catch{return null}return e}function ql(e,t){let n=e.replace(mt.findPipe,(i,l,c)=>{let o=!1,f=l;for(;--f>=0&&c[f]==="\\";)o=!o;return o?"|":" |"}),s=n.split(mt.splitPipe),a=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length0?-2:-1}function Od(e,t=0){let n=t,s="";for(let a of e)if(a===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=a,n++;return s}function Gl(e,t,n,s,a){let i=t.href,l=t.title||null,c=e[1].replace(a.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,o}function Md(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let a=s[1];return t.split(` -`).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[c]=l;return c.length>=a.length?i.slice(a.length):i}).join(` -`)}var ps=class{options;rules;lexer;constructor(e){this.options=e||Dr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ta(n,` -`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=Md(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Ta(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ta(t[0],` -`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ta(t[0],` -`).split(` -`),s="",a="",i=[];for(;n.length>0;){let l=!1,c=[],o;for(o=0;o1,a={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let o=!1,f="",h="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let w=Od(t[2].split(` -`,1)[0],t[1].length),m=e.split(` -`,1)[0],E=!w.trim(),T=0;if(this.options.pedantic?(T=2,h=w.trimStart()):E?T=t[1].length+1:(T=w.search(this.rules.other.nonSpaceChar),T=T>4?1:T,h=w.slice(T),T+=t[1].length),E&&this.rules.other.blankLine.test(m)&&(f+=m+` -`,e=e.substring(m.length+1),o=!0),!o){let D=this.rules.other.nextBulletRegex(T),S=this.rules.other.hrRegex(T),$=this.rules.other.fencesBeginRegex(T),R=this.rules.other.headingBeginRegex(T),ee=this.rules.other.htmlBeginRegex(T),C=this.rules.other.blockquoteBeginRegex(T);for(;e;){let le=e.split(` -`,1)[0],he;if(m=le,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),he=m):he=m.replace(this.rules.other.tabCharGlobal," "),$.test(m)||R.test(m)||ee.test(m)||C.test(m)||D.test(m)||S.test(m))break;if(he.search(this.rules.other.nonSpaceChar)>=T||!m.trim())h+=` -`+he.slice(T);else{if(E||w.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(w)||R.test(w)||S.test(w))break;h+=` -`+m}E=!m.trim(),f+=le+` -`,e=e.substring(le.length+1),w=he.slice(T)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0)),a.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=f}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let o of a.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(o.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};o.checked=h.checked,a.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!a.loose){let f=o.tokens.filter(w=>w.type==="space"),h=f.length>0&&f.some(w=>this.rules.other.anyLine.test(w.raw));a.loose=h}}if(a.loose)for(let o of a.items){o.loose=!0;for(let f of o.tokens)f.type==="text"&&(f.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ql(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` -`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[o]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Ta(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=Dd(t[2],"()");if(i===-2)return;if(i>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],a="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],a=i[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Gl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[s.toLowerCase()];if(!a){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Gl(n,a,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...s[0]].length-1,i,l,c=a,o=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+a);(s=f.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){c+=l;continue}else if((s[5]||s[6])&&a%3&&!((a+l)%3)){o+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+o);let h=[...s[0]][0].length,w=e.slice(0,a+s.index+h+l);if(Math.min(a,l)%2){let E=w.slice(1,-1);return{type:"em",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}let m=w.slice(2,-2);return{type:"strong",raw:w,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...s[0]].length-1,i,l,c=a,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+a);(s=o.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==a))continue;if(s[3]||s[4]){c+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c);let f=[...s[0]][0].length,h=e.slice(0,a+s.index+f+l),w=h.slice(a,-a);return{type:"del",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},hn=class oi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Dr,this.options.tokenizer=this.options.tokenizer||new ps,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:mt,block:ls.normal,inline:xa.normal};this.options.pedantic?(n.block=ls.pedantic,n.inline=xa.pedantic):this.options.gfm&&(n.block=ls.gfm,this.options.breaks?n.inline=xa.breaks:n.inline=xa.gfm),this.tokenizer.rules=n}static get rules(){return{block:ls,inline:xa}}static lex(t,n){return new oi(n).lex(t)}static lexInline(t,n){return new oi(n).inlineTokens(t)}lex(t){t=t.replace(mt.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let n=0;n(a=l.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let l=n.at(-1);a.raw.length===1&&l!==void 0?l.raw+=` -`:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(` -`)?"":` -`)+a.raw,l.text+=` -`+a.text,this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(` -`)?"":` -`)+a.raw,l.text+=` -`+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},n.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let i=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),o;this.options.extensions.startBlock.forEach(f=>{o=f.call({lexer:this},c),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(i=t.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(i))){let l=n.at(-1);s&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(` -`)?"":` -`)+a.raw,l.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a),s=i.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(` -`)?"":` -`)+a.raw,l.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let s=t,a=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)o.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=a[2]?a[2].length:0,s=s.slice(0,a.index+i)+"["+"a".repeat(a[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let l=!1,c="";for(;t;){l||(c=""),l=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let f=t;if(this.options.extensions?.startInline){let h=1/0,w=t.slice(1),m;this.options.extensions.startInline.forEach(E=>{m=E.call({lexer:this},w),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(f=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(f)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},hs=class{options;parser;constructor(e){this.options=e||Dr}space(e){return""}code({text:e,lang:t,escaped:n}){let s=(t||"").match(mt.notSpaceStart)?.[0],a=e.replace(mt.endingNewline,"")+` -`;return s?'
'+(n?a:Dn(a,!0))+`
-`:"
"+(n?a:Dn(a,!0))+`
-`}blockquote({tokens:e}){return`
-${this.parser.parse(e)}
-`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} -`}hr(e){return`
-`}list(e){let t=e.ordered,n=e.start,s="";for(let l=0;l -`+s+" -`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • -`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t="",n="";for(let a=0;a${s}`),` - -`+t+` -`+s+`
    -`}tablerow({text:e}){return` -${e} -`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Dn(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),a=Bl(e);if(a===null)return s;e=a;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let a=Bl(e);if(a===null)return Dn(n);e=a;let i=`${Dn(n)}{let l=a[i].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=t.renderers[a.name];i?t.renderers[a.name]=function(...l){let c=a.renderer.apply(this,l);return c===!1&&(c=i.apply(this,l)),c}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),s.extensions=t),n.renderer){let a=this.defaults.renderer||new hs(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,c=n.renderer[l],o=a[l];a[l]=(...f)=>{let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h||""}}s.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new ps(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,c=n.tokenizer[l],o=a[l];a[l]=(...f)=>{let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h}}s.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Ia;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,c=n.hooks[l],o=a[l];Ia.passThroughHooks.has(i)?a[l]=f=>{if(this.defaults.async&&Ia.passThroughHooksRespectAsync.has(i))return(async()=>{let w=await c.call(a,f);return o.call(a,w)})();let h=c.call(a,f);return o.call(a,h)}:a[l]=(...f)=>{if(this.defaults.async)return(async()=>{let w=await c.apply(a,f);return w===!1&&(w=await o.apply(a,f)),w})();let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h}}s.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let c=[];return c.push(i.call(this,l)),a&&(c=c.concat(a.call(this,l))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return hn.lex(e,t??this.defaults)}parser(e,t){return vn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},a={...this.defaults,...s},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let l=a.hooks?await a.hooks.preprocess(t):t,c=await(a.hooks?await a.hooks.provideLexer(e):e?hn.lex:hn.lexInline)(l,a),o=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(o,a.walkTokens));let f=await(a.hooks?await a.hooks.provideParser(e):e?vn.parse:vn.parseInline)(o,a);return a.hooks?await a.hooks.postprocess(f):f})().catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let l=(a.hooks?a.hooks.provideLexer(e):e?hn.lex:hn.lexInline)(t,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let c=(a.hooks?a.hooks.provideParser(e):e?vn.parse:vn.parseInline)(l,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+Dn(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},Cr=new Nd;function we(e,t){return Cr.parse(e,t)}we.options=we.setOptions=function(e){return Cr.setOptions(e),we.defaults=Cr.defaults,jo(we.defaults),we};we.getDefaults=yi;we.defaults=Dr;we.use=function(...e){return Cr.use(...e),we.defaults=Cr.defaults,jo(we.defaults),we};we.walkTokens=function(e,t){return Cr.walkTokens(e,t)};we.parseInline=Cr.parseInline;we.Parser=vn;we.parser=vn.parse;we.Renderer=hs;we.TextRenderer=Ii;we.Lexer=hn;we.lexer=hn.lex;we.Tokenizer=ps;we.Hooks=Ia;we.parse=we;we.options;we.setOptions;we.use;we.walkTokens;we.parseInline;vn.parse;hn.lex;function Wr(e){return Yf.sanitize(we.parse(e,{async:!1,breaks:!0,gfm:!0}))}function Ln(e){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(new Date(e))}var Pd=M(''),zd=M(`
    cc
    ClickClack OpenClaw workspace chat

    Welcome back.

    Workspace chat for the OpenClaw crew. Sign in with the GitHub account that's a member of the org.

    Limited to active members of the OpenClaw org.

    `),$d=M(''),Fd=M('
    '),Ud=M('
    '),Hd=M(''),Bd=M(''),qd=M(''),Gd=M(''),Wd=M(''),jd=M(''),Zd=M(''),Yd=M(''),Xd=M(''),Vd=M(''),Kd=M('

    '),Jd=M('

    '),Qd=M('

    ClickClack

    '),ep=M(''),tp=M(''),np=M(''),rp=M('
    '),ap=M('
    Send a message in Markdown — code fences, lists, links all work. Threads open from any message.
    '),sp=M('
    '),ip=M(''),lp=M(" "),op=M(' '),cp=M(' '),up=M(''),fp=M(''),dp=M('',2),pp=M(' '),hp=M('
    '),vp=M('
    '),_p=M('
    ',1),gp=M(''),mp=M('
    GIFs
    '),bp=M(''),kp=M('
    '),wp=M('
    Replying to
    '),yp=M(''),xp=M(" "),Tp=M(''),Ep=M('',2),Sp=M(' '),Ap=M('
    '),Rp=M(''),Cp=M(" "),Ip=M(' '),Lp=M(' '),Dp=M(''),Op=M(''),Mp=M('',2),Np=M(' '),Pp=M('
    '),zp=M('
    '),$p=M('
    Replying to
    '),Fp=M('

    Thread

    ',1),Up=M(''),Hp=M(" "),Bp=M(''),qp=M(''),Gp=M(''),Wp=M('

    Profile

    Active
    Contact information
    Handle
    User ID
    About

    ',1),jp=M('
    No thread open Hover any message and tap the bubble to keep side conversations tidy.
    '),Zp=M(''),Yp=M("

    "),Xp=M(''),Vp=M(''),Kp=M('

    Enter to send · Shift+Enter for newline · Markdown supported
    ',1);function Jp(e,t){fi(t,!1);const n=Z(),s=Z(),a=Z(),i=Z(),l=Z(),c=Z(),o=Z();let f=Z(null),h=Z([]),w=Z([]),m=Z([]),E=Z([]),T=Z([]),D=Z(""),S=Z(""),$=Z(""),R=Z(null),ee=Z(null),C=Z(null),le=Z(null),he=Z(""),Ae=Z(""),nt=Z(""),rt=Z(""),xe=Z(""),Te=Z(""),Re=Z([]),Ee=Z(null),Rt=Z(!1),kn=Z(!1),zn=Z(""),zt=Z(""),en=Z(""),Jn=Z(""),$n=Z(""),Oe=Z(!1),$t=Z("loading"),Ue=Z(!1),wn=null,ve=Z(!1),tn,nn=Z(null),Ct=Z(!1),Fn=Z(!1),rn=Z(!1),de=Z(null),Je=Z(null),Ft=Z(null),an=Z(null),Me=Z("message");const sa=[{title:"Ship it",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYjJ1bm1meHE4N2x3bnN0djJkMWtjNGc5bXYzZDFiOHBsbG16M3F0ZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/l0HlHFRbmaZtBRhXG/giphy.gif",tags:["ship","launch","done"]},{title:"Approved",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExazBpbzJ6ODZ3bXQ3OHBvNGJidWZoajc0cHV6YnVub3MzZ3c1a2Z2dSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/111ebonMs90YLu/giphy.gif",tags:["yes","approved","nice"]},{title:"Deploy dance",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY3NkaTVmZW9ydWNnZnl0ZWQ5aHQyeGNrd2k3NG4wZWNqYzNmd3k1ZCZlcD12MV9naWZzX3NlYXJjaCZjdD1n/GeimqsH0TLDt4tScGw/giphy.gif",tags:["deploy","dance","celebrate"]},{title:"Looking",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYWZ3emE0dm5mN2h0bGVsY2w0OXBodGd2cGJlNDRiZXo1YWNtdWRmZyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/26n6WywJyh39n1pBu/giphy.gif",tags:["search","looking","debug"]},{title:"Typing faster",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOWFlbnJnbnIzbHYxcDIzdXZ3NGF3N2FocHNvMmR5enU3bHpycHBlZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/13HgwGsXF0aiGY/giphy.gif",tags:["typing","code","work"]},{title:"Tiny victory",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExdjJ2b2tqNmF4dG16NjE0eXhuc3h5bTlvamgwNTR0Zmd6ZjhtM2JuaSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/3o7abKhOpu0NwenH3O/giphy.gif",tags:["win","victory","celebrate"]}];Uo(()=>{ia()}),wf(()=>{const d=wn;wn=null,g(ve,!1),d?.close(),tn&&window.clearTimeout(tn)});async function ia(){try{const d=await lt("/api/me");g(f,d.user),await Mr(),g($t,"ready")}catch(d){if(d instanceof Ho&&(d.status===401||d.status===403)){g(Ue,!0),g($t,"auth");return}g($t,d instanceof Error?d.message:"Could not load ClickClack")}}function sn(){r(f)&&(g(zt,r(f).display_name),g(en,r(f).handle?`@${r(f).handle}`:""),g(Jn,r(f).avatar_url),g($n,""),g(Oe,!1),g(kn,!0))}async function Or(){g($n,""),g(Oe,!1);try{const d=await lt("/api/me",{method:"PATCH",body:JSON.stringify({display_name:r(zt),handle:r(en),avatar_url:r(Jn)})});g(f,d.user),g(E,r(E).map(b=>b.author?.id===r(f)?.id?{...b,author:d.user}:b)),g(T,r(T).map(b=>b.author?.id===r(f)?.id?{...b,author:d.user}:b)),r(R)?.author?.id===r(f).id&&g(R,{...r(R),author:d.user}),g($n,"Saved"),g(kn,!1)}catch(d){g($n,d instanceof Error?d.message:"Could not save profile"),g(Oe,!0)}}async function Mr(){const d=await lt("/api/workspaces");g(h,d.workspaces),g(D,r(D)||r(h)[0]?.id||""),await pr(),await xn(),r(h).length===0&&g($t,"create a workspace"),tr()}async function Ba(){if(!r(nt).trim())return;const d=await lt("/api/workspaces",{method:"POST",body:JSON.stringify({name:r(nt)})});g(nt,""),g(Ct,!1),g(h,[...r(h),d.workspace]),g(D,d.workspace.id),await pr(),await xn(),tr()}async function pr(){if(!r(D))return;const d=await lt(`/api/workspaces/${r(D)}/channels`);g(w,d.channels),g(S,r(w).find(b=>b.id===r(S))?.id||r(w)[0]?.id||""),g(R,null),g(C,null),g(Me,"message"),g(T,[]),await pt()}async function qa(){if(!r(D)||!r(rt).trim())return;const d=await lt(`/api/workspaces/${r(D)}/channels`,{method:"POST",body:JSON.stringify({name:r(rt),kind:"public"})});g(rt,""),g(w,[...r(w),d.channel]),g(S,d.channel.id),g($,""),await pt()}async function pt(){if(r($)){const b=await lt(`/api/dms/${r($)}/messages`);g(E,b.messages),await Un();return}if(!r(S)){g(E,[]);return}const d=await lt(`/api/channels/${r(S)}/messages`);g(E,d.messages),await Un()}async function Un(){await ei(),r(nn)&&Fu(nn,r(nn).scrollTop=r(nn).scrollHeight)}async function Hn(){const d=r(he).trim();if(!d)return;if(!r(S)&&!r($)){g($t,"pick or create a channel");return}const b=r($)?"dm":"channel",P=r(de)&&r(Je)===b?r(de):null;g(he,"");const J=r($)?`/api/dms/${r($)}/messages`:`/api/channels/${r(S)}/messages`,me={body:d};P&&(me.quoted_message_id=P.id);const re=await lt(J,{method:"POST",body:JSON.stringify(me)});let We=re.message;if(P&&wt(),r(Ee)){const Bt=r(Ee);await lt(`/api/messages/${re.message.id}/attachments`,{method:"POST",body:JSON.stringify({upload_id:Bt.id})}),g(Ee,null),We={...We,attachments:[...We.attachments||[],Bt]}}r(E).some(Bt=>Bt.id===We.id)?g(E,r(E).map(Bt=>Bt.id===We.id?We:Bt)):g(E,[...r(E),We]),await Un()}async function It(d){g(C,null),g(R,d),g(Me,"thread");const b=await lt(`/api/messages/${d.id}/thread`);g(R,b.root),g(T,b.replies),g(ee,b.thread_state)}async function Nr(){const d=r(Ae).trim();if(!d||!r(R))return;const b=r(de)&&r(Je)==="thread"?r(de):null;g(Ae,"");const P={body:d};b&&(P.quoted_message_id=b.id);const J=await lt(`/api/messages/${r(R).id}/thread/replies`,{method:"POST",body:JSON.stringify(P)});b&&wt(),r(T).some(me=>me.id===J.message.id)||g(T,[...r(T),J.message]),g(ee,J.thread_state)}function Pr(d,b){g(de,d),g(Je,b),g(Me,b==="thread"?"thread":"message")}const Ga=new Set(["button","checkbox","combobox","link","listbox","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","option","radio","radiogroup","slider","spinbutton","switch","tab","tablist","textbox","tree","treeitem"]),la=new Set(["INPUT","TEXTAREA","SELECT","BUTTON","A","DETAILS","SUMMARY","VIDEO","AUDIO"]);function Wa(){return r(le)!==null||r(kn)}function zr(d){if(!d)return!1;if(d.isContentEditable)return!0;if(d instanceof HTMLInputElement){const b=(d.type||"text").toLowerCase();return b!=="checkbox"&&b!=="radio"&&b!=="button"&&b!=="submit"&&b!=="reset"&&b!=="file"}return d instanceof HTMLTextAreaElement}function $r(d){if(!d||Ut(d))return!1;if(la.has(d.tagName))return!0;const b=d.getAttribute("role");if(b&&Ga.has(b))return!0;const P=d.getAttribute("tabindex");return!!(P!==null&&P!=="-1"&&d.hasAttribute("aria-keyshortcuts"))}function Ut(d){if(!d.closest(".messages, .thread"))return!1;if(d instanceof HTMLButtonElement||d instanceof HTMLAnchorElement)return!0;const b=d.getAttribute("role");return b==="button"||b==="link"}function Qn(){const d=typeof window<"u"?window.getSelection():null;if(!d||d.isCollapsed||d.rangeCount===0)return!1;const b=d.getRangeAt(0).commonAncestorContainer;return b?!!(b.nodeType===Node.ELEMENT_NODE?b:b.parentElement)?.closest(".messages, .thread, .markdown"):!1}function oa(d){if(r(Ue)||Wa()||d.defaultPrevented||d.isComposing||d.keyCode===229||d.ctrlKey||d.metaKey||d.altKey||d.key.length!==1||Qn())return!1;const b=document.activeElement;return!(b===r(Ft)||b===r(an)||zr(b)||$r(b))}function ca(d){if(!oa(d))return;const b=ws();if(!b||b.disabled||b.readOnly)return;d.key===" "&&d.preventDefault(),b.focus({preventScroll:!0});const P=b.value.length;if(b.setSelectionRange(P,P),d.key===" "){const J=b.selectionStart??P,me=b.selectionEnd??P;b.setRangeText(" ",J,me,"end"),b.dispatchEvent(new Event("input",{bubbles:!0}))}}function ws(){return r(Me)==="thread"&&r(R)&&r(an)?r(an):r(Ft)}function wt(){g(de,null),g(Je,null)}function Fr(d,b){const P=()=>{const re=d.style.height;d.style.height="auto";const We=`${d.scrollHeight}px`;re!==We?d.style.height=We:d.style.height=re},J=()=>P(),me=()=>P();return requestAnimationFrame(P),d.addEventListener("input",J),window.addEventListener("resize",me),{update(){requestAnimationFrame(P)},destroy(){d.removeEventListener("input",J),window.removeEventListener("resize",me)}}}function er(d,b=120){if(!d)return"";const P=d.replace(/\s+/g," ").trim();return P.length>b?P.slice(0,b-1)+"…":P}function yn(d){return d.quoted_author?.display_name||"Unknown"}async function ja(d){const b=d.quoted_message_id;if(!b)return;await ei();const P=document.querySelector(`[data-message-id="${CSS.escape(b)}"]`);P&&(P.scrollIntoView({behavior:"smooth",block:"center"}),P.classList.add("highlight"),window.setTimeout(()=>P.classList.remove("highlight"),1500))}async function ys(){if(!r(D)||!r(Te).trim()){g(Re,[]);return}const d=await lt(`/api/search?workspace_id=${encodeURIComponent(r(D))}&q=${encodeURIComponent(r(Te).trim())}`);g(Re,d.results)}async function He(d){const b=d.currentTarget,P=b.files?.[0];if(!P||!r(D))return;const J=new FormData;J.set("workspace_id",r(D)),J.set("file",P);const me=await lt("/api/uploads",{method:"POST",body:J});g(Ee,me.upload),b.value=""}async function xn(){if(!r(D))return;const d=await lt(`/api/dms?workspace_id=${r(D)}`);g(m,d.conversations)}async function xs(){if(!r(D)||!r(xe).trim())return;const d=await lt("/api/dms",{method:"POST",body:JSON.stringify({workspace_id:r(D),member_ids:[r(xe).trim()]})});g(xe,""),g(m,[...r(m),d.conversation]),g($,d.conversation.id),g(S,""),g(R,null),g(C,null),g(Me,"message"),await pt()}async function Za(d){if(!r(D)||!d)return;const b=r(m).find(J=>J.members.some(me=>me.id===d));if(b){g($,b.id),g(S,""),g(R,null),g(C,null),g(Me,"message"),await pt();return}const P=await lt("/api/dms",{method:"POST",body:JSON.stringify({workspace_id:r(D),member_ids:[d]})});g(m,[...r(m),P.conversation]),g($,P.conversation.id),g(S,""),g(R,null),g(C,null),g(Me,"message"),await pt()}function tr(){tn&&window.clearTimeout(tn);const d=wn;if(wn=null,g(ve,!1),d?.close(),!r(D))return;const b=localStorage.getItem(`clickclack:${r(D)}:cursor`)||"",P=new URL("/api/realtime/ws",window.location.href);P.protocol=window.location.protocol==="https:"?"wss:":"ws:",P.searchParams.set("workspace_id",r(D)),b&&P.searchParams.set("after_cursor",b);const J=new WebSocket(P);wn=J,J.addEventListener("open",()=>{wn===J&&g(ve,!0)}),J.addEventListener("message",me=>{const re=JSON.parse(String(me.data));re.cursor&&localStorage.setItem(`clickclack:${r(D)}:cursor`,re.cursor),Ya(re)}),J.addEventListener("close",()=>{wn===J&&(g(ve,!1),tn=window.setTimeout(tr,1200))})}async function Ya(d){if((d.type==="channel.created"||d.type==="channel.updated")&&d.workspace_id===r(D)){await pr();return}(d.channel_id===r(S)||d.payload.direct_conversation_id===r($))&&(d.type==="message.created"||d.type==="message.updated"||d.type==="message.deleted")&&await pt();const b=d.payload.root_message_id||d.payload.message_id;r(R)&&b===r(R).id&&await It(r(R))}function Xa(d){const b=d.trim();if(!b)return"?";const P=b.split(/\s+/);return P.length>=2?(P[0][0]+P[1][0]).toUpperCase():b.slice(0,2).toUpperCase()}function ln(d){if(!d)return"?";const b=d.trim();return b?b[0].toUpperCase():"?"}function qe(d){return d?`@${d}`:""}function Ht(d){return d.members.find(b=>b.id!==r(f)?.id)||d.members[0]}function Va(d,b,P){const J=new Map;for(const me of b)for(const re of me.members)re.id&&re.id!==P&&J.set(re.id,re);for(const me of[...d].reverse()){const re=me.author;re?.id&&re.id!==P&&J.set(re.id,re)}return[...J.values()].slice(0,12)}function Ka(d){return r(m).find(b=>b.members.some(P=>P.id===d))}function hr(d){d&&(g(R,null),g(C,d))}function Lt(d){let b=0;for(let P=0;P>>0;return b%360}function on(d){const b=new Date(d),P=new Date,J=new Date;J.setDate(P.getDate()-1);const me=(re,We)=>re.getFullYear()===We.getFullYear()&&re.getMonth()===We.getMonth()&&re.getDate()===We.getDate();return me(b,P)?"Today":me(b,J)?"Yesterday":new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(b)}function Ja(d){const b=[];let P="",J="",me=0;for(const re of d){const We=new Date(re.created_at),Bt=We.toDateString(),Hr=re.author?.id||re.author_id||"local",ua=Bt!==P,ns=Hr!==J,Es=We.getTime()-me>300*1e3;ua||ns||Es||b.length===0?b.push({key:re.id,dayLabel:ua?on(re.created_at):null,messages:[re],authorName:re.author?.display_name||"Local User",authorHandle:re.author?.handle||"",authorAvatarURL:re.author?.avatar_url||"",authorID:Hr,timestamp:re.created_at}):b[b.length-1].messages.push(re),P=Bt,J=Hr,me=We.getTime()}return b}function vr(d){const b=d.members.filter(J=>J.id!==r(f)?.id);return(b.length>0?b:d.members).map(J=>J.display_name).join(", ")}function Ts(d){if(d.key==="Escape"&&r(de)&&r(Je)!=="thread"){d.preventDefault(),wt();return}d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),Hn())}function Qa(d){if(d.key==="Escape"&&r(de)&&r(Je)==="thread"){d.preventDefault(),wt();return}d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),Nr())}function Ve(d){return`/api/uploads/${encodeURIComponent(d.id)}`}function _r(d,b){g(le,{url:d,title:b})}function q(d){const b=d.target;b instanceof HTMLImageElement&&b.closest(".markdown")&&(d.preventDefault(),_r(b.currentSrc||b.src,b.alt||"Image"))}function u(d){return d.content_type.startsWith("image/")}function x(d){return d.content_type.startsWith("video/")}function N(d){return d<1024?`${d} B`:d<1024*1024?`${Math.round(d/1024)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`}function _e(d){const b=r(he)&&!r(he).endsWith(` -`)?` -`:"";g(he,`${r(he)}${b}${d}`)}function Be(d,b=d){_e(`${d}${d==="```"?` -code -`:"text"}${b}`)}function Ne(d,b){_e(`![${b}](${d})`),g(Rt,!1),g(zn,"")}function ut(d){return r(R)?.id===d.id?"Open":"Thread"}function ft(){r(Je)==="thread"&&wt(),g(R,null),g(C,null),g(Me,"message"),g(T,[])}function Qe(){g(le,null),g(kn,!1)}Rn(()=>(r(h),r(D)),()=>{g(n,r(h).find(d=>d.id===r(D)))}),Rn(()=>(r(w),r(S)),()=>{g(s,r(w).find(d=>d.id===r(S)))}),Rn(()=>(r(m),r($)),()=>{g(a,r(m).find(d=>d.id===r($)))}),Rn(()=>(r(R),r(C)),()=>{g(i,r(R)!==null||r(C)!==null)}),Rn(()=>r(E),()=>{g(l,Ja(r(E)))}),Rn(()=>(r(E),r(m),r(f)),()=>{g(c,Va(r(E),r(m),r(f)?.id||""))}),Rn(()=>(r(Je),r(de),r(E)),()=>{r(Je)==="channel"&&r(de)&&!r(E).some(d=>d.id===r(de)?.id)&&wt()}),Rn(()=>(r(Je),r(de),r(E)),()=>{r(Je)==="dm"&&r(de)&&!r(E).some(d=>d.id===r(de)?.id)&&wt()}),Rn(()=>(r(Je),r(de),r(R),r(T)),()=>{r(Je)==="thread"&&r(de)&&r(R)&&r(de).id!==r(R).id&&!r(T).some(d=>d.id===r(de)?.id)&&wt()}),Rn(()=>r(zn),()=>{g(o,sa.filter(d=>{const b=r(zn).trim().toLowerCase();return!b||d.title.toLowerCase().includes(b)||d.tags.some(P=>P.includes(b))}))}),Yu(),Fo();var Ur=Aa();$o("1oa2eo8",d=>{var b=Pd();A(d,b)}),Cn("keydown",Js,d=>{d.key==="Escape"&&Qe(),ca(d)});var Ge=Xn(Ur);{var es=d=>{var b=zd();A(d,b)},ts=d=>{var b=Kp(),P=Xn(b);let J;var me=p(P),re=p(me);{var We=y=>{var k=_t("×");A(y,k)},Bt=y=>{var k=$d();A(y,k)};j(re,y=>{r(rn)?y(We):y(Bt,-1)})}var Hr=_(me,2),ua=_(p(Hr),4),ns=p(ua);Nt(ns,1,()=>r(h),y=>y.id,(y,k)=>{var H=Fd();let Y;var se=p(H),ae=p(se),Q=p(ae);z(ie=>{Y=Mt(H,1,"guild-wrap",null,Y,{active:r(k).id===r(D)}),F(se,"title",(r(k),v(()=>r(k).name))),L(Q,ie)},[()=>(r(k),v(()=>Xa(r(k).name)))]),W("click",se,async()=>{g(D,r(k).id),await pr(),await xn(),tr()}),A(y,H)});var Es=_(ns,2),nc=_(ua,2);{var rc=y=>{var k=Ud(),H=p(k);Cn("submit",k,Y=>{Y.preventDefault(),Ba()}),In(H,()=>r(nt),Y=>g(nt,Y)),A(y,k)};j(nc,y=>{r(Ct)&&y(rc)})}var Li=_(Hr,2),Di=p(Li),Oi=p(Di),Mi=p(Oi),ac=p(Mi),Ni=_(Mi,2);let Pi;var sc=p(Ni),rs=_(Oi,2),ic=p(rs),lc=p(ic),zi=_(Di,2),$i=p(zi),Fi=_(p($i),2),Ui=p(Fi);Nt(Ui,1,()=>r(w),y=>y.id,(y,k)=>{var H=Hd();let Y;var se=_(p(H),2),ae=p(se);z(()=>{Y=Mt(H,1,"nav-item channel",null,Y,{active:r(k).id===r(S)&&!r($)}),L(ae,(r(k),v(()=>r(k).name)))}),W("click",H,async()=>{g(S,r(k).id),g($,""),g(R,null),g(C,null),g(Me,"message"),g(rn,!1),await pt()}),A(y,H)});var oc=_(Ui,2);{var cc=y=>{var k=Bd();A(y,k)};j(oc,y=>{r(w),v(()=>r(w).length===0)&&y(cc)})}var Hi=_(Fi,2),uc=p(Hi),Bi=_($i,2),qi=_(p(Bi),2),Gi=p(qi);Nt(Gi,1,()=>r(m),y=>y.id,(y,k)=>{var H=Gd();let Y;var se=p(H),ae=p(se);{var Q=U=>{var X=qd();z(Pe=>F(X,"src",Pe),[()=>(r(k),v(()=>Ht(r(k))?.avatar_url))]),A(U,X)},ie=rr(()=>(r(k),v(()=>Ht(r(k))?.avatar_url))),B=U=>{var X=_t();z(Pe=>L(X,Pe),[()=>(r(k),v(()=>ln(Ht(r(k))?.display_name)))]),A(U,X)};j(ae,U=>{r(ie)?U(Q):U(B,-1)})}var pe=_(se,2),Ce=p(pe);z((U,X)=>{Y=Mt(H,1,"nav-item dm",null,Y,{active:r(k).id===r($)}),Yn(se,`--hue: ${U??""}deg`),L(Ce,X)},[()=>(r(k),v(()=>Lt(Ht(r(k))?.id||r(k).id))),()=>(r(k),v(()=>vr(r(k))))]),W("click",H,async()=>{g($,r(k).id),g(S,""),g(R,null),g(C,null),g(Me,"message"),g(rn,!1),await pt()}),A(y,H)});var fc=_(Gi,2);{var dc=y=>{var k=Wd();A(y,k)};j(fc,y=>{r(m),v(()=>r(m).length===0)&&y(dc)})}var Wi=_(qi,2),pc=p(Wi),hc=_(Bi,2),vc=_(p(hc),2),ji=p(vc);Nt(ji,1,()=>r(c),y=>y.id,(y,k)=>{const H=_i(()=>(r(k),v(()=>Ka(r(k).id))));var Y=Zd();let se;var ae=p(Y),Q=p(ae);{var ie=U=>{var X=jd();z(()=>F(X,"src",(r(k),v(()=>r(k).avatar_url)))),A(U,X)},B=U=>{var X=_t();z(Pe=>L(X,Pe),[()=>(r(k),v(()=>ln(r(k).display_name)))]),A(U,X)};j(Q,U=>{r(k),v(()=>r(k).avatar_url)?U(ie):U(B,-1)})}var pe=_(ae,2),Ce=p(pe);z(U=>{se=Mt(Y,1,"nav-item dm",null,se,{active:r(H)?.id===r($)||r(C)?.id===r(k).id}),Yn(ae,`--hue: ${U??""}deg`),L(Ce,(r(k),v(()=>r(k).display_name)))},[()=>(r(k),v(()=>Lt(r(k).id)))]),W("click",Y,async()=>{r(H)?(g($,r(H).id),g(S,""),g(R,null),g(C,null),g(Me,"message"),g(rn,!1),await pt()):hr(r(k))}),A(y,Y)});var _c=_(ji,2);{var gc=y=>{var k=Yd();A(y,k)};j(_c,y=>{r(c),v(()=>r(c).length===0)&&y(gc)})}var mc=_(zi,2);{var bc=y=>{var k=Vd(),H=p(k),Y=p(H);{var se=U=>{var X=Xd();z(()=>F(X,"src",(r(f),v(()=>r(f).avatar_url)))),A(U,X)},ae=U=>{var X=_t();z(Pe=>L(X,Pe),[()=>(r(f),v(()=>ln(r(f).display_name)))]),A(U,X)};j(Y,U=>{r(f),v(()=>r(f).avatar_url)?U(se):U(ae,-1)})}var Q=_(H,2),ie=p(Q),B=p(ie),pe=_(ie,2),Ce=p(pe);z((U,X,Pe)=>{F(k,"aria-label",U),Yn(H,`--hue: ${X??""}deg`),L(B,(r(f),v(()=>r(f).display_name))),L(Ce,Pe)},[()=>(r(f),v(()=>`Account settings for ${r(f).display_name} ${qe(r(f).handle)}`)),()=>(r(f),v(()=>Lt(r(f).id))),()=>(r(f),r(ve),v(()=>r(f).handle?qe(r(f).handle):r(ve)?"Active":"Reconnecting…"))]),W("click",k,sn),W("contextmenu",k,U=>{U.preventDefault(),sn()}),A(y,k)};j(mc,y=>{r(f)&&y(bc)})}var Zi=_(Li,2),Yi=p(Zi),Xi=p(Yi),Vi=p(Xi);{var kc=y=>{var k=Kd(),H=p(k);z(Y=>L(H,Y),[()=>(r(a),v(()=>`@${vr(r(a))}`))]),A(y,k)},wc=y=>{var k=Jd(),H=p(k);z(()=>L(H,(r(s),v(()=>`#${r(s).name}`)))),A(y,k)},yc=y=>{var k=Qd();A(y,k)};j(Vi,y=>{r(a)?y(kc):r(s)?y(wc,1):y(yc,-1)})}var xc=_(Vi,4),Tc=p(xc),Ss=_(Xi,2),Ki=_(p(Ss),2),Ec=_(Ki,2);{var Sc=y=>{var k=ep();W("click",k,()=>{g(Te,""),g(Re,[])}),A(y,k)};j(Ec,y=>{r(Te)&&y(Sc)})}var Ac=_(Ss,2),fa=p(Ac);let Ji;var Rc=_(fa,2),Qi=_(Yi,2);{var Cc=y=>{var k=rp(),H=p(k),Y=p(H),se=p(Y),ae=_(Y,2),Q=_(H,2);Nt(Q,1,()=>r(Re),ie=>ie.message.id,(ie,B)=>{var pe=np(),Ce=p(pe),U=p(Ce);{var X=Ie=>{var et=tp();z(()=>F(et,"src",(r(B),v(()=>r(B).message.author.avatar_url)))),A(Ie,et)},Pe=Ie=>{var et=_t();z(Tn=>L(et,Tn),[()=>(r(B),v(()=>ln(r(B).message.author?.display_name)))]),A(Ie,et)};j(U,Ie=>{r(B),v(()=>r(B).message.author?.avatar_url)?Ie(X):Ie(Pe,-1)})}var qt=_(Ce,2),Gt=p(qt),cn=p(Gt),un=p(cn),Bn=_(cn,2),ge=p(Bn),G=_(Gt,2),at=p(G);z((Ie,et)=>{Yn(Ce,`--hue: ${Ie??""}deg`),L(un,(r(B),v(()=>r(B).message.author?.display_name||"Local User"))),L(ge,et),L(at,(r(B),v(()=>r(B).message.body)))},[()=>(r(B),v(()=>Lt(r(B).message.author?.id||r(B).message.author_id||"x"))),()=>(pn(Ln),r(B),v(()=>Ln(r(B).message.created_at)))]),W("click",pe,async()=>{g(Re,[]),r(B).message.channel_id&&(g(S,r(B).message.channel_id),g($,""),await pt()),r(B).message.direct_conversation_id&&(g($,r(B).message.direct_conversation_id),g(S,""),await pt())}),A(ie,pe)}),z(()=>L(se,`${r(Re),v(()=>r(Re).length)??""} ${r(Re),v(()=>r(Re).length===1?"result":"results")??""}`)),W("click",ae,()=>{g(Re,[])}),A(y,k)};j(Qi,y=>{r(Re),v(()=>r(Re).length>0)&&y(Cc)})}var da=_(Qi,2),el=p(da);{var Ic=y=>{var k=ap(),H=p(k),Y=p(H);{var se=U=>{var X=_t("@");A(U,X)},ae=U=>{var X=_t("#");A(U,X)};j(Y,U=>{r(a)?U(se):U(ae,-1)})}var Q=_(H,2),ie=p(Q);{var B=U=>{var X=_t();z(Pe=>L(X,`This is the start of your conversation with ${Pe??""}.`),[()=>(r(a),v(()=>vr(r(a))))]),A(U,X)},pe=U=>{var X=_t();z(()=>L(X,`Welcome to #${r(s),v(()=>r(s).name)??""}!`)),A(U,X)},Ce=U=>{var X=_t("Pick a channel to get started.");A(U,X)};j(ie,U=>{r(a)?U(B):r(s)?U(pe,1):U(Ce,-1)})}A(y,k)};j(el,y=>{r(E),v(()=>r(E).length===0)&&y(Ic)})}var Lc=_(el,2);Nt(Lc,1,()=>r(l),y=>y.key,(y,k)=>{var H=_p(),Y=Xn(H);{var se=ge=>{var G=sp(),at=p(G),Ie=p(at);z(()=>L(Ie,(r(k),v(()=>r(k).dayLabel)))),A(ge,G)};j(Y,ge=>{r(k),v(()=>r(k).dayLabel)&&ge(se)})}var ae=_(Y,2),Q=p(ae),ie=p(Q);{var B=ge=>{var G=ip();z(()=>F(G,"src",(r(k),v(()=>r(k).authorAvatarURL)))),A(ge,G)},pe=ge=>{var G=_t();z(at=>L(G,at),[()=>(r(k),v(()=>ln(r(k).authorName)))]),A(ge,G)};j(ie,ge=>{r(k),v(()=>r(k).authorAvatarURL)?ge(B):ge(pe,-1)})}var Ce=_(Q,2),U=p(Ce),X=p(U),Pe=p(X),qt=_(X,2);{var Gt=ge=>{var G=lp(),at=p(G);z(Ie=>L(at,Ie),[()=>(r(k),v(()=>qe(r(k).authorHandle)))]),A(ge,G)};j(qt,ge=>{r(k),v(()=>r(k).authorHandle)&&ge(Gt)})}var cn=_(qt,2),un=p(cn),Bn=_(U,2);Nt(Bn,3,()=>(r(k),v(()=>r(k).messages)),ge=>ge.id,(ge,G,at)=>{var Ie=vp();let et;var Tn=p(Ie),nr=p(Tn),qn=_(Tn,2),ye=p(qn);{var st=V=>{var I=up();let Le;var O=_(p(I),2),yt=p(O),dn=p(yt),oe=_(yt,2);{var be=Ke=>{var Dt=op(),Se=p(Dt);z(ke=>L(Se,ke),[()=>(r(G),v(()=>er(r(G).quoted_body_snapshot)))]),A(Ke,Dt)},xt=Ke=>{var Dt=cp(),Se=p(Dt);z(ke=>L(Se,`[original deleted] ${ke??""}`),[()=>(r(G),v(()=>er(r(G).quoted_body_snapshot)))]),A(Ke,Dt)};j(oe,Ke=>{r(G),v(()=>r(G).quoted_message_id)?Ke(be):Ke(xt,-1)})}z((Ke,Dt)=>{Le=Mt(I,1,"quote-block",null,Le,{dangling:!r(G).quoted_message_id}),I.disabled=(r(G),v(()=>!r(G).quoted_message_id)),F(I,"aria-label",Ke),L(dn,Dt)},[()=>(r(G),v(()=>r(G).quoted_message_id?`Jump to quoted message from ${yn(r(G))}`:"Original message was deleted")),()=>(r(G),v(()=>yn(r(G))))]),W("click",I,()=>ja(r(G))),A(V,I)};j(ye,V=>{r(G),v(()=>r(G).quoted_message_id||r(G).quoted_body_snapshot)&&V(st)})}var Wt=_(ye,2);zs(Wt,()=>(pn(Wr),r(G),v(()=>Wr(r(G).body))),!0);var Gn=_(Wt,2);{var pa=V=>{var I=hp();Nt(I,5,()=>(r(G),v(()=>r(G).attachments)),Le=>Le.id,(Le,O)=>{var yt=Aa(),dn=Xn(yt);{var oe=Se=>{var ke=fp(),ze=p(ke),it=_(ze,2),ht=p(it);z(Tt=>{F(ke,"aria-label",(r(O),v(()=>`Open image ${r(O).filename}`))),F(ze,"src",Tt),F(ze,"alt",(r(O),v(()=>r(O).filename))),L(ht,(r(O),v(()=>r(O).filename)))},[()=>(r(O),v(()=>Ve(r(O))))]),W("click",ke,()=>_r(Ve(r(O)),r(O).filename)),A(Se,ke)},be=rr(()=>(r(O),v(()=>u(r(O))))),xt=Se=>{var ke=dp(),ze=p(ke),it=p(ze),ht=_(ze,2),Tt=p(ht);z((Wn,En)=>{F(ze,"aria-label",(r(O),v(()=>r(O).filename))),F(it,"src",Wn),F(it,"type",(r(O),v(()=>r(O).content_type))),F(ht,"href",En),L(Tt,(r(O),v(()=>r(O).filename)))},[()=>(r(O),v(()=>Ve(r(O)))),()=>(r(O),v(()=>Ve(r(O))))]),A(Se,ke)},Ke=rr(()=>(r(O),v(()=>x(r(O))))),Dt=Se=>{var ke=pp(),ze=_(p(ke),2),it=p(ze),ht=p(it),Tt=_(it,2),Wn=p(Tt);z((En,va)=>{F(ke,"href",En),L(ht,(r(O),v(()=>r(O).filename))),L(Wn,va)},[()=>(r(O),v(()=>Ve(r(O)))),()=>(r(O),v(()=>N(r(O).byte_size)))]),A(Se,ke)};j(dn,Se=>{r(be)?Se(oe):r(Ke)?Se(xt,1):Se(Dt,-1)})}A(Le,yt)}),A(V,I)};j(Gn,V=>{r(G),v(()=>r(G).attachments?.length)&&V(pa)})}var ha=_(qn,2),fn=p(ha),Br=_(fn,2);z((V,I)=>{et=Mt(Ie,1,"message-row",null,et,{selected:r(R)?.id===r(G).id}),F(Ie,"data-message-id",(r(G),v(()=>r(G).id))),L(nr,V),F(Br,"data-tooltip",I)},[()=>(pn(r(at)),pn(Ln),r(G),v(()=>r(at)===0?"":Ln(r(G).created_at))),()=>(r(G),v(()=>ut(r(G))))]),W("click",fn,()=>Pr(r(G),r($)?"dm":"channel")),W("click",Br,()=>It(r(G))),A(ge,Ie)}),z((ge,G)=>{Yn(Q,`--hue: ${ge??""}deg`),F(Q,"aria-label",(r(k),v(()=>`View profile for ${r(k).authorName}`))),L(Pe,(r(k),v(()=>r(k).authorName))),L(un,G)},[()=>(r(k),v(()=>Lt(r(k).authorID))),()=>(pn(Ln),r(k),v(()=>Ln(r(k).timestamp)))]),W("click",Q,()=>hr(r(k).messages[0]?.author)),W("click",X,()=>hr(r(k).messages[0]?.author)),A(y,H)}),Us(da,y=>g(nn,y),()=>r(nn));var tl=_(da,2),nl=p(tl),rl=p(nl),al=_(rl,2),As=_(al,2),Dc=p(As);Dc.textContent="<>";var Rs=_(As,2),Oc=p(Rs);Oc.textContent="{}";var sl=_(Rs,2),il=_(sl,2);let ll;var ol=_(nl,2);{var Mc=y=>{var k=mp(),H=p(k),Y=_(p(H),2),se=_(H,2);Nt(se,5,()=>r(o),ae=>ae.url,(ae,Q)=>{var ie=gp(),B=p(ie),pe=_(B,2),Ce=p(pe);z(()=>{F(B,"src",(r(Q),v(()=>r(Q).url))),F(B,"alt",(r(Q),v(()=>r(Q).title))),L(Ce,(r(Q),v(()=>r(Q).title)))}),W("click",ie,()=>Ne(r(Q).url,r(Q).title)),A(ae,ie)}),In(Y,()=>r(zn),ae=>g(zn,ae)),A(y,k)};j(ol,y=>{r(Rt)&&y(Mc)})}var cl=_(ol,2);{var Nc=y=>{var k=kp(),H=_(p(k),2);{var Y=B=>{var pe=bp();z(Ce=>{F(pe,"src",Ce),F(pe,"alt",(r(Ee),v(()=>r(Ee).filename)))},[()=>(r(Ee),v(()=>Ve(r(Ee))))]),A(B,pe)},se=rr(()=>(r(Ee),v(()=>u(r(Ee)))));j(H,B=>{r(se)&&B(Y)})}var ae=_(H,2),Q=p(ae),ie=_(ae,2);z(B=>L(Q,`${r(Ee),v(()=>r(Ee).filename)??""} · ${B??""}`),[()=>(r(Ee),v(()=>N(r(Ee).byte_size)))]),W("click",ie,()=>g(Ee,null)),A(y,k)};j(cl,y=>{r(Ee)&&y(Nc)})}var ul=_(cl,2);{var Pc=y=>{var k=wp(),H=_(p(k),2),Y=p(H),se=_(p(Y)),ae=p(se),Q=_(Y,2),ie=p(Q),B=_(H,2);z(pe=>{L(ae,(r(de),v(()=>r(de).author?.display_name||"Local User"))),L(ie,pe)},[()=>(r(de),v(()=>er(r(de).body)))]),W("click",B,wt),A(y,k)};j(ul,y=>{r(de)&&r(Je)===(r($)?"dm":"channel")&&y(Pc)})}var zc=_(ul,2),fl=p(zc),$c=p(fl),gr=_(fl,2);Us(gr,y=>g(Ft,y),()=>r(Ft)),Na(()=>In(gr,()=>r(he),y=>g(he,y))),yl(gr,(y,k)=>Fr?.(y),()=>r(he));var Fc=_(gr,2),Cs=_(Zi,2);let dl;var Uc=p(Cs);{var Hc=y=>{var k=Fp(),H=Xn(k),Y=p(H),se=_(p(Y),2),ae=p(se),Q=_(Y,2),ie=_(H,2),B=p(ie),pe=p(B),Ce=p(pe);{var U=V=>{var I=yp();z(()=>F(I,"src",(r(R),v(()=>r(R).author.avatar_url)))),A(V,I)},X=V=>{var I=_t();z(Le=>L(I,Le),[()=>(r(R),v(()=>ln(r(R).author?.display_name)))]),A(V,I)};j(Ce,V=>{r(R),v(()=>r(R).author?.avatar_url)?V(U):V(X,-1)})}var Pe=_(pe,2),qt=p(Pe),Gt=p(qt),cn=p(Gt),un=_(Gt,2);{var Bn=V=>{var I=xp(),Le=p(I);z(O=>L(Le,O),[()=>(r(R),v(()=>qe(r(R).author.handle)))]),A(V,I)};j(un,V=>{r(R),v(()=>r(R).author?.handle)&&V(Bn)})}var ge=_(un,2),G=p(ge),at=_(ge,2),Ie=_(qt,2);zs(Ie,()=>(pn(Wr),r(R),v(()=>Wr(r(R).body))),!0);var et=_(Ie,2);{var Tn=V=>{var I=Ap();Nt(I,5,()=>(r(R),v(()=>r(R).attachments)),Le=>Le.id,(Le,O)=>{var yt=Aa(),dn=Xn(yt);{var oe=Se=>{var ke=Tp(),ze=p(ke),it=_(ze,2),ht=p(it);z(Tt=>{F(ke,"aria-label",(r(O),v(()=>`Open image ${r(O).filename}`))),F(ze,"src",Tt),F(ze,"alt",(r(O),v(()=>r(O).filename))),L(ht,(r(O),v(()=>r(O).filename)))},[()=>(r(O),v(()=>Ve(r(O))))]),W("click",ke,()=>_r(Ve(r(O)),r(O).filename)),A(Se,ke)},be=rr(()=>(r(O),v(()=>u(r(O))))),xt=Se=>{var ke=Ep(),ze=p(ke),it=p(ze),ht=_(ze,2),Tt=p(ht);z((Wn,En)=>{F(ze,"aria-label",(r(O),v(()=>r(O).filename))),F(it,"src",Wn),F(it,"type",(r(O),v(()=>r(O).content_type))),F(ht,"href",En),L(Tt,(r(O),v(()=>r(O).filename)))},[()=>(r(O),v(()=>Ve(r(O)))),()=>(r(O),v(()=>Ve(r(O))))]),A(Se,ke)},Ke=rr(()=>(r(O),v(()=>x(r(O))))),Dt=Se=>{var ke=Sp(),ze=_(p(ke),2),it=p(ze),ht=p(it),Tt=_(it,2),Wn=p(Tt);z((En,va)=>{F(ke,"href",En),L(ht,(r(O),v(()=>r(O).filename))),L(Wn,va)},[()=>(r(O),v(()=>Ve(r(O)))),()=>(r(O),v(()=>N(r(O).byte_size)))]),A(Se,ke)};j(dn,Se=>{r(be)?Se(oe):r(Ke)?Se(xt,1):Se(Dt,-1)})}A(Le,yt)}),A(V,I)};j(et,V=>{r(R),v(()=>r(R).attachments?.length)&&V(Tn)})}var nr=_(B,2),qn=p(nr),ye=p(qn),st=_(nr,2);Nt(st,5,()=>r(T),V=>V.id,(V,I)=>{var Le=zp(),O=p(Le),yt=p(O);{var dn=je=>{var Ze=Rp();z(()=>F(Ze,"src",(r(I),v(()=>r(I).author.avatar_url)))),A(je,Ze)},oe=je=>{var Ze=_t();z(Sn=>L(Ze,Sn),[()=>(r(I),v(()=>ln(r(I).author?.display_name)))]),A(je,Ze)};j(yt,je=>{r(I),v(()=>r(I).author?.avatar_url)?je(dn):je(oe,-1)})}var be=_(O,2),xt=p(be),Ke=p(xt),Dt=p(Ke),Se=_(Ke,2);{var ke=je=>{var Ze=Cp(),Sn=p(Ze);z(ce=>L(Sn,ce),[()=>(r(I),v(()=>qe(r(I).author.handle)))]),A(je,Ze)};j(Se,je=>{r(I),v(()=>r(I).author?.handle)&&je(ke)})}var ze=_(Se,2),it=p(ze),ht=_(ze,2),Tt=_(xt,2);{var Wn=je=>{var Ze=Dp();let Sn;var ce=_(p(Ze),2),_a=p(ce),Is=p(_a),Ls=_(_a,2);{var Ds=An=>{var jn=Ip(),Ot=p(jn);z(vt=>L(Ot,vt),[()=>(r(I),v(()=>er(r(I).quoted_body_snapshot)))]),A(An,jn)},Os=An=>{var jn=Lp(),Ot=p(jn);z(vt=>L(Ot,`[original deleted] ${vt??""}`),[()=>(r(I),v(()=>er(r(I).quoted_body_snapshot)))]),A(An,jn)};j(Ls,An=>{r(I),v(()=>r(I).quoted_message_id)?An(Ds):An(Os,-1)})}z((An,jn)=>{Sn=Mt(Ze,1,"quote-block",null,Sn,{dangling:!r(I).quoted_message_id}),Ze.disabled=(r(I),v(()=>!r(I).quoted_message_id)),F(Ze,"aria-label",An),L(Is,jn)},[()=>(r(I),v(()=>r(I).quoted_message_id?`Jump to quoted message from ${yn(r(I))}`:"Original message was deleted")),()=>(r(I),v(()=>yn(r(I))))]),W("click",Ze,()=>ja(r(I))),A(je,Ze)};j(Tt,je=>{r(I),v(()=>r(I).quoted_message_id||r(I).quoted_body_snapshot)&&je(Wn)})}var En=_(Tt,2);zs(En,()=>(pn(Wr),r(I),v(()=>Wr(r(I).body))),!0);var va=_(En,2);{var Zc=je=>{var Ze=Pp();Nt(Ze,5,()=>(r(I),v(()=>r(I).attachments)),Sn=>Sn.id,(Sn,ce)=>{var _a=Aa(),Is=Xn(_a);{var Ls=Ot=>{var vt=Op(),Zn=p(vt),mr=_(Zn,2),qr=p(mr);z(ga=>{F(vt,"aria-label",(r(ce),v(()=>`Open image ${r(ce).filename}`))),F(Zn,"src",ga),F(Zn,"alt",(r(ce),v(()=>r(ce).filename))),L(qr,(r(ce),v(()=>r(ce).filename)))},[()=>(r(ce),v(()=>Ve(r(ce))))]),W("click",vt,()=>_r(Ve(r(ce)),r(ce).filename)),A(Ot,vt)},Ds=rr(()=>(r(ce),v(()=>u(r(ce))))),Os=Ot=>{var vt=Mp(),Zn=p(vt),mr=p(Zn),qr=_(Zn,2),ga=p(qr);z((Ms,Ns)=>{F(Zn,"aria-label",(r(ce),v(()=>r(ce).filename))),F(mr,"src",Ms),F(mr,"type",(r(ce),v(()=>r(ce).content_type))),F(qr,"href",Ns),L(ga,(r(ce),v(()=>r(ce).filename)))},[()=>(r(ce),v(()=>Ve(r(ce)))),()=>(r(ce),v(()=>Ve(r(ce))))]),A(Ot,vt)},An=rr(()=>(r(ce),v(()=>x(r(ce))))),jn=Ot=>{var vt=Np(),Zn=_(p(vt),2),mr=p(Zn),qr=p(mr),ga=_(mr,2),Ms=p(ga);z((Ns,Yc)=>{F(vt,"href",Ns),L(qr,(r(ce),v(()=>r(ce).filename))),L(Ms,Yc)},[()=>(r(ce),v(()=>Ve(r(ce)))),()=>(r(ce),v(()=>N(r(ce).byte_size)))]),A(Ot,vt)};j(Is,Ot=>{r(Ds)?Ot(Ls):r(An)?Ot(Os,1):Ot(jn,-1)})}A(Sn,_a)}),A(je,Ze)};j(va,je=>{r(I),v(()=>r(I).attachments?.length)&&je(Zc)})}z((je,Ze)=>{F(Le,"data-message-id",(r(I),v(()=>r(I).id))),Yn(O,`--hue: ${je??""}deg`),L(Dt,(r(I),v(()=>r(I).author?.display_name||"Local User"))),L(it,Ze)},[()=>(r(I),v(()=>Lt(r(I).author?.id||r(I).author_id||"x"))),()=>(pn(Ln),r(I),v(()=>Ln(r(I).created_at)))]),W("click",ht,()=>Pr(r(I),"thread")),A(V,Le)});var Wt=_(ie,2),Gn=p(Wt);{var pa=V=>{var I=$p(),Le=_(p(I),2),O=p(Le),yt=_(p(O)),dn=p(yt),oe=_(O,2),be=p(oe),xt=_(Le,2);z(Ke=>{L(dn,(r(de),v(()=>r(de).author?.display_name||"Local User"))),L(be,Ke)},[()=>(r(de),v(()=>er(r(de).body)))]),W("click",xt,wt),A(V,I)};j(Gn,V=>{r(de)&&r(Je)==="thread"&&V(pa)})}var ha=_(Gn,2),fn=p(ha);Us(fn,V=>g(an,V),()=>r(an)),Na(()=>In(fn,()=>r(Ae),V=>g(Ae,V))),yl(fn,(V,I)=>Fr?.(V),()=>r(Ae));var Br=_(fn,2);z((V,I,Le)=>{L(ae,`${r(ee),r(T),v(()=>r(ee)?.reply_count??r(T).length)??""} ${r(ee),r(T),v(()=>(r(ee)?.reply_count??r(T).length)===1?"reply":"replies")??""}`),F(B,"data-message-id",(r(R),v(()=>r(R).id))),Yn(pe,`--hue: ${V??""}deg`),L(cn,(r(R),v(()=>r(R).author?.display_name||"Local User"))),L(G,I),L(ye,`${r(T),v(()=>r(T).length)??""} ${r(T),v(()=>r(T).length===1?"reply":"replies")??""}`),Br.disabled=Le},[()=>(r(R),v(()=>Lt(r(R).author?.id||r(R).author_id||"x"))),()=>(pn(Ln),r(R),v(()=>Ln(r(R).created_at))),()=>(r(Ae),v(()=>!r(Ae).trim()))]),W("click",Q,()=>{ft()}),W("pointerdown",ie,()=>g(Me,"thread")),W("pointerup",ie,q),W("click",at,()=>r(R)&&Pr(r(R),"thread")),Cn("submit",Wt,V=>{V.preventDefault(),Nr()}),Cn("focus",fn,()=>g(Me,"thread")),W("keydown",fn,Qa),A(y,k)},Bc=y=>{var k=Wp(),H=Xn(k),Y=p(H),se=_(p(Y),2),ae=p(se),Q=_(Y,2),ie=_(H,2),B=p(ie),pe=p(B),Ce=p(pe);{var U=oe=>{var be=Up();z(()=>F(be,"src",(r(C),v(()=>r(C).avatar_url)))),A(oe,be)},X=oe=>{var be=_t();z(xt=>L(be,xt),[()=>(r(C),v(()=>ln(r(C).display_name)))]),A(oe,be)};j(Ce,oe=>{r(C),v(()=>r(C).avatar_url)?oe(U):oe(X,-1)})}var Pe=_(B,2),qt=p(Pe),Gt=p(qt),cn=p(Gt),un=p(cn),Bn=_(cn,2);{var ge=oe=>{var be=Hp(),xt=p(be);z(Ke=>L(xt,Ke),[()=>(r(C),v(()=>qe(r(C).handle)))]),A(oe,be)};j(Bn,oe=>{r(C),v(()=>r(C).handle)&&oe(ge)})}var G=_(Gt,2);{var at=oe=>{var be=Bp();W("click",be,sn),A(oe,be)};j(G,oe=>{r(f),r(C),v(()=>r(f)?.id===r(C).id)&&oe(at)})}var Ie=_(qt,4),et=p(Ie);{var Tn=oe=>{var be=qp();W("click",be,()=>Za(r(C)?.id||"")),A(oe,be)};j(et,oe=>{r(f),r(C),v(()=>r(f)?.id!==r(C).id)&&oe(Tn)})}var nr=_(et,2),qn=_(Ie,2),ye=p(qn),st=_(p(ye),2);{var Wt=oe=>{var be=Gp();W("click",be,sn),A(oe,be)};j(st,oe=>{r(f),r(C),v(()=>r(f)?.id===r(C).id)&&oe(Wt)})}var Gn=_(ye,2),pa=_(p(Gn),2),ha=_(p(pa),2),fn=p(ha),Br=_(Gn,2),V=_(p(Br),2),I=_(p(V),2),Le=p(I),O=_(qn,2),yt=_(p(O),2),dn=p(yt);z((oe,be)=>{L(ae,(r(C),v(()=>r(C).display_name))),Yn(B,`--hue: ${oe??""}deg`),L(un,(r(C),v(()=>r(C).display_name))),L(fn,be),L(Le,(r(C),v(()=>r(C).id))),L(dn,`Member of ${r(n),v(()=>r(n)?.name||"this workspace")??""}. Click Message to keep the conversation in your sidebar.`)},[()=>(r(C),v(()=>Lt(r(C).id))),()=>(r(C),v(()=>r(C).handle?qe(r(C).handle):"No handle set"))]),W("click",Q,ft),W("click",nr,()=>g($t,"status messages are coming soon")),A(y,k)},qc=y=>{var k=jp();A(y,k)};j(Uc,y=>{r(R)?y(Hc):r(C)?y(Bc,1):y(qc,-1)})}var pl=_(P,2);{var Gc=y=>{var k=Xp(),H=p(k),Y=_(H,2),se=p(Y),ae=_(p(se),2),Q=_(se,2),ie=p(Q),B=p(ie),pe=p(B);{var Ce=ye=>{var st=Zp();z(()=>F(st,"src",r(Jn))),A(ye,st)},U=ye=>{var st=_t();z(Wt=>L(st,Wt),[()=>(r(zt),v(()=>ln(r(zt))))]),A(ye,st)};j(pe,ye=>{r(Jn)?ye(Ce):ye(U,-1)})}var X=_(B,2),Pe=p(X),qt=p(Pe),Gt=_(Pe,2),cn=p(Gt),un=_(ie,2),Bn=_(p(un),2),ge=_(un,2),G=_(p(ge),2),at=_(ge,2),Ie=_(p(at),2),et=_(at,2);{var Tn=ye=>{var st=Yp();let Wt;var Gn=p(st);z(()=>{Wt=Mt(st,1,"profile-status",null,Wt,{error:r(Oe)}),L(Gn,r($n))}),A(ye,st)};j(et,ye=>{r($n)&&ye(Tn)})}var nr=_(et,2),qn=p(nr);z((ye,st)=>{Yn(B,`--hue: ${ye??""}deg`),L(qt,(r(zt),r(f),v(()=>r(zt)||r(f).display_name))),L(cn,st)},[()=>(r(f),v(()=>Lt(r(f).id))),()=>(r(en),r(f),v(()=>r(en)||qe(r(f).handle)||"No handle set"))]),W("click",H,Qe),W("click",ae,Qe),Cn("submit",Q,ye=>{ye.preventDefault(),Or()}),In(Bn,()=>r(zt),ye=>g(zt,ye)),In(G,()=>r(en),ye=>g(en,ye)),In(Ie,()=>r(Jn),ye=>g(Jn,ye)),W("click",qn,Qe),A(y,k)};j(pl,y=>{r(kn)&&r(f)&&y(Gc)})}var Wc=_(pl,2);{var jc=y=>{var k=Vp(),H=p(k),Y=_(H,2),se=p(Y),ae=p(se),Q=p(ae),ie=_(ae,2),B=p(ie),pe=_(B,2),Ce=_(se,2),U=p(Ce);z(()=>{L(Q,(r(le),v(()=>r(le).title))),F(B,"href",(r(le),v(()=>r(le).url))),F(U,"src",(r(le),v(()=>r(le).url))),F(U,"alt",(r(le),v(()=>r(le).title)))}),W("click",H,Qe),W("click",pe,Qe),A(y,k)};j(Wc,y=>{r(le)&&y(jc)})}z((y,k)=>{J=Mt(P,1,"shell",null,J,{"nav-open":r(rn),"sidebar-collapsed":r(Fn),"thread-open":r(i)}),L(ac,(r(n),v(()=>r(n)?.name||"Pick a workspace"))),Pi=Mt(Ni,1,"presence",null,Pi,{online:r(ve)}),L(sc,r(ve)?"Connected":r($t)),F(rs,"aria-label",r(Fn)?"Expand sidebar":"Collapse sidebar"),F(rs,"title",r(Fn)?"Expand sidebar":"Collapse sidebar"),F(lc,"d",r(Fn)?"m9 6 6 6-6 6":"m15 6-6 6 6 6"),L(Tc,(r(n),v(()=>r(n)?.name||"no workspace"))),F(fa,"title",r(R)?"Close thread":"Open a message thread"),F(fa,"aria-label",r(R)?"Close thread":"Open a message thread"),Ji=Mt(fa,1,"",null,Ji,{active:r(i)}),ll=Mt(il,1,"",null,ll,{active:r(Rt)}),F(gr,"placeholder",y),Fc.disabled=k,dl=Mt(Cs,1,"thread",null,dl,{open:r(i)}),F(Cs,"aria-label",r(C)?"Profile pane":"Thread pane")},[()=>(r(a),r(s),v(()=>r(a)?`Message ${vr(r(a))}`:r(s)?`Message #${r(s).name}`:"Pick a channel to start")),()=>(r(he),v(()=>!r(he).trim()))]),W("click",me,()=>g(rn,!r(rn))),W("click",Es,()=>g(Ct,!r(Ct))),W("click",rs,()=>g(Fn,!r(Fn))),Cn("submit",Hi,y=>{y.preventDefault(),qa()}),In(uc,()=>r(rt),y=>g(rt,y)),Cn("submit",Wi,y=>{y.preventDefault(),xs()}),In(pc,()=>r(xe),y=>g(xe,y)),Cn("submit",Ss,y=>{y.preventDefault(),ys()}),In(Ki,()=>r(Te),y=>g(Te,y)),W("click",fa,()=>{r(i)?ft():g($t,"pick a message to open its thread")}),W("click",Rc,()=>g($t,"no pinned items")),W("pointerdown",da,()=>g(Me,"message")),W("pointerup",da,q),Cn("submit",tl,y=>{y.preventDefault(),Hn()}),W("click",rl,()=>Be("**")),W("click",al,()=>Be("_")),W("click",As,()=>Be("`")),W("click",Rs,()=>Be("```","\n```")),W("click",sl,()=>_e("[label](https://)")),W("click",il,()=>g(Rt,!r(Rt))),W("change",$c,He),Cn("focus",gr,()=>g(Me,"message")),W("keydown",gr,Ts),A(d,b)};j(Ge,d=>{r(Ue)?d(es):d(ts,-1)})}A(e,Ur),di()}nf(["click","contextmenu","pointerdown","pointerup","change","keydown"]);var Qp=M(' ',1),eh=M("

    "),th=M(`

    Self-hostable chat. Serious tool. Mild brine.

    ClickClack

    A single-binary chat app for teams, communities, bots, and agents: - Slack-style threads, durable realtime, OpenAPI, SQLite, and a CLI that - can drive the whole thing from a shell.

    What it is

    Chat infrastructure that stays boring when the socket drops.

    WebSocket is the pipe. The database is the truth. Every durable message, - thread reply, reaction, and channel update can be recovered over HTTP with - a cursor, so clients and agents can reconnect without drama.

    Agent path

    A friendly CLI, no LLM baked in.

    External agents, CI jobs, and humans use the same public API as the web - app. Tokens and workspace defaults are scoped per server, so switching - hosts does not leak credentials or stale IDs.

     

    Destinations

    Product at the root. Docs and app where people expect them.

    `);function nh(e,t){fi(t,!1);const n="https://docs.clickclack.chat",s=["localhost","127.0.0.1","::1"].includes(window.location.hostname)?"/app":"https://app.clickclack.chat",a="https://github.com/openclaw/clickclack",i=[["Single binary","Go server, embedded Svelte app, embedded migrations, local SQLite and uploads."],["Threads that recover","Slack-style one-level threads with durable event replay after reconnects."],["Agent-friendly","A CLI, OpenAPI contract, TypeScript SDK, webhooks, and slash-command shapes."],["Self-host first","SQLite is the default, not the demo. Postgres can arrive behind the store layer."]],l=["clickclack serve --data ./data","clickclack login --magic-token mgt_...",'clickclack send --channel general "deploy started"',"clickclack threads reply msg_... --stdin {var Ee=Qp();Na(()=>{_o.title="ClickClack - Self-hostable chat with claws"}),A(Re,Ee)});var o=p(c),f=_(p(o),2),h=_(p(f),2),w=p(h);F(w,"href",n);var m=_(w,2),E=_(m,2);F(E,"href",a);var T=_(f,2),D=_(p(T),6),S=p(D),$=_(S,2);F($,"href",n);var R=_($,2);F(R,"href",a);var ee=_(o,4);Nt(ee,5,()=>i,ff,(Re,Ee)=>{var Rt=eh(),kn=p(Rt),zn=p(kn),zt=_(kn,2),en=p(zt);z(()=>{L(zn,r(Ee)[0]),L(en,r(Ee)[1])}),A(Re,Rt)});var C=_(ee,2),le=_(p(C),2),he=p(le),Ae=_(C,2),nt=_(p(Ae),2),rt=_(p(nt),2);F(rt,"href",n);var xe=_(rt,2),Te=_(xe,2);F(Te,"href",a),z(Re=>{F(m,"href",s),F(S,"href",s),L(he,Re),F(xe,"href",s)},[()=>l.join(` -`)]),A(e,c),di()}function rh(e){const t=window.location.pathname,s=window.location.hostname.startsWith("app.")||t==="/app"||t.startsWith("/app/");var a=Aa(),i=Xn(a);{var l=o=>{Jp(o,{})},c=o=>{nh(o,{})};j(i,o=>{s?o(l):o(c,-1)})}A(e,a)}lf(rh,{target:document.getElementById("app")}); diff --git a/apps/api/internal/webassets/dist/assets/index-vInMpaH9.js b/apps/api/internal/webassets/dist/assets/index-vInMpaH9.js new file mode 100644 index 0000000..1258b37 --- /dev/null +++ b/apps/api/internal/webassets/dist/assets/index-vInMpaH9.js @@ -0,0 +1,72 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const Kc=!1;var jl=Array.isArray,Jc=Array.prototype.indexOf,Jr=Array.prototype.includes,vs=Array.from,Qc=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,Zl=Object.getOwnPropertyDescriptors,eu=Object.prototype,tu=Array.prototype,fi=Object.getPrototypeOf,vl=Object.isExtensible;const nu=()=>{};function ru(e){return e()}function Zs(e){for(var t=0;t{e=s,t=a});return{promise:n,resolve:e,reject:t}}const ht=2,Qr=4,$a=8,Xl=1<<24,Mn=16,bn=32,fr=64,Ys=128,Vt=512,Ye=1024,ct=2048,kn=4096,wt=8192,Kt=16384,Lr=32768,Xs=1<<25,ea=65536,Vs=1<<17,Vl=1<<18,Dr=1<<19,Kl=1<<20,On=1<<25,Ar=65536,us=1<<21,Na=1<<22,cr=1<<23,Kr=Symbol("$state"),au=Symbol(""),Vn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Jl(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function su(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function iu(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function lu(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ou(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function cu(e){throw new Error("https://svelte.dev/e/effect_orphan")}function uu(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fu(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function du(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pu(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function hu(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vu=1,_u=2,Ql=4,gu=8,mu=16,bu=1,ku=2,tt=Symbol(),eo="http://www.w3.org/1999/xhtml",wu="http://www.w3.org/2000/svg",yu="http://www.w3.org/1998/Math/MathML";function xu(){console.warn("https://svelte.dev/e/derived_inert")}function Tu(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function to(e){return e===this.v}function no(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ro(e){return!no(e,this.v)}let Fa=!1,Eu=!1;function Su(){Fa=!0}let Le=null;function ta(e){Le=e}function di(e,t=!1,n){Le={p:Le,i:!1,c:null,e:null,s:e,x:null,r:re,l:Fa&&!t?{s:null,u:null,$:[]}:null}}function pi(e){var t=Le,n=t.e;if(n!==null){t.e=null;for(var s of n)Eo(s)}return t.i=!0,Le=t.p,{}}function Ua(){return!Fa||Le!==null&&Le.l===null}let yr=[];function ao(){var e=yr;yr=[],Zs(e)}function ur(e){if(yr.length===0&&!Oa){var t=yr;queueMicrotask(()=>{t===yr&&ao()})}yr.push(e)}function Au(){for(;yr.length>0;)ao()}function so(e){var t=re;if(t===null)return de.f|=cr,e;if((t.f&Lr)===0&&(t.f&Qr)===0)throw e;lr(e,t)}function lr(e,t){for(;t!==null;){if((t.f&Ys)!==0){if((t.f&Lr)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Ru=-7169;function $e(e,t){e.f=e.f&Ru|t}function hi(e){(e.f&Vt)!==0||e.deps===null?$e(e,Ye):$e(e,kn)}function io(e){if(e!==null)for(const t of e)(t.f&ht)===0||(t.f&Ar)===0||(t.f^=Ar,io(t.deps))}function lo(e,t,n){(e.f&ct)!==0?t.add(e):(e.f&kn)!==0&&n.add(e),io(e.deps),$e(e,Ye)}const kr=new Set;let ne=null,gn=null,Ks=null,Oa=!1,zs=!1,Vr=null,os=null;var _l=0;let Cu=1;class dr{id=Cu++;current=new Map;previous=new Map;#n=new Set;#o=new Set;#e=new Set;#a=new Map;#r=new Map;#s=null;#t=[];#i=[];#c=new Set;#u=new Set;#l=new Map;#d=new Set;is_fork=!1;#h=!1;#p=new Set;#f(){return this.is_fork||this.#r.size>0}#g(){for(const s of this.#p)for(const a of s.#r.keys()){for(var t=!1,n=a;n.parent!==null;){if(this.#l.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#l.has(t)||this.#l.set(t,{d:[],m:[]}),this.#d.delete(t)}unskip_effect(t,n=s=>this.schedule(s)){var s=this.#l.get(t);if(s){this.#l.delete(t);for(var a of s.d)$e(a,ct),n(a);for(a of s.m)$e(a,kn),n(a)}this.#d.add(t)}#v(){if(_l++>1e3&&(kr.delete(this),Lu()),!this.#f()){for(const c of this.#c)this.#u.delete(c),$e(c,ct),this.schedule(c);for(const c of this.#u)$e(c,kn),this.schedule(c)}const t=this.#t;this.#t=[],this.apply();var n=Vr=[],s=[],a=os=[];for(const c of t)try{this.#m(c,n,s)}catch(o){throw uo(c),o}if(ne=null,a.length>0){var i=dr.ensure();for(const c of a)i.schedule(c)}if(Vr=null,os=null,this.#f()||this.#g()){this.#_(s),this.#_(n);for(const[c,o]of this.#l)co(c,o)}else{this.#a.size===0&&kr.delete(this),this.#c.clear(),this.#u.clear();for(const c of this.#n)c(this);this.#n.clear(),gl(s),gl(n),this.#s?.resolve()}var l=ne;if(this.#t.length>0){const c=l??=this;c.#t.push(...this.#t.filter(o=>!c.#t.includes(o)))}l!==null&&(kr.add(l),l.#v())}#m(t,n,s){t.f^=Ye;for(var a=t.first;a!==null;){var i=a.f,l=(i&(bn|fr))!==0,c=l&&(i&Ye)!==0,o=c||(i&wt)!==0||this.#l.has(a);if(!o&&a.fn!==null){l?a.f^=Ye:(i&Qr)!==0?n.push(a):sa(a)&&((i&Mn)!==0&&this.#u.add(a),Cr(a));var f=a.first;if(f!==null){a=f;continue}}for(;a!==null;){var h=a.next;if(h!==null){a=h;break}a=a.parent}}}#_(t){for(var n=0;n!this.current.has(w));if(a.length===0)t&&h.discard();else if(n.length>0){if(t)for(const w of this.#d)h.unskip_effect(w,m=>{(m.f&(Mn|Na))!==0?h.schedule(m):h.#_([m])});h.activate();var i=new Set,l=new Map;for(var c of n)oo(c,a,i,l);l=new Map;var o=[...h.current.keys()].filter(w=>this.current.has(w)?this.current.get(w)[0]!==w:!0);for(const w of this.#i)(w.f&(Kt|wt|Vs))===0&&vi(w,o,l)&&((w.f&(Na|Mn))!==0?($e(w,ct),h.schedule(w)):h.#c.add(w));if(h.#t.length>0){h.apply();for(var f of h.#t)h.#m(f,[],[]);h.#t=[]}h.deactivate()}}for(const h of kr)h.#p.has(this)&&(h.#p.delete(this),h.#p.size===0&&!h.#f()&&(h.activate(),h.#v()))}increment(t,n){let s=this.#a.get(n)??0;if(this.#a.set(n,s+1),t){let a=this.#r.get(n)??0;this.#r.set(n,a+1)}}decrement(t,n,s){let a=this.#a.get(n)??0;if(a===1?this.#a.delete(n):this.#a.set(n,a-1),t){let i=this.#r.get(n)??0;i===1?this.#r.delete(n):this.#r.set(n,i-1)}this.#h||s||(this.#h=!0,ur(()=>{this.#h=!1,this.flush()}))}transfer_effects(t,n){for(const s of t)this.#c.add(s);for(const s of n)this.#u.add(s);t.clear(),n.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#o.add(t)}on_fork_commit(t){this.#e.add(t)}run_fork_commit_callbacks(){for(const t of this.#e)t(this);this.#e.clear()}settled(){return(this.#s??=Yl()).promise}static ensure(){if(ne===null){const t=ne=new dr;zs||(kr.add(ne),Oa||ur(()=>{ne===t&&t.flush()}))}return ne}apply(){{gn=null;return}}schedule(t){if(Ks=t,t.b?.is_pending&&(t.f&(Qr|$a|Xl))!==0&&(t.f&Lr)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var s=n.f;if(Vr!==null&&n===re&&(de===null||(de.f&ht)===0))return;if((s&(fr|bn))!==0){if((s&Ye)===0)return;n.f^=Ye}}this.#t.push(n)}}function Iu(e){var t=Oa;Oa=!0;try{for(var n;;){if(Au(),ne===null)return n;ne.flush()}}finally{Oa=t}}function Lu(){try{uu()}catch(e){lr(e,Ks)}}let Xn=null;function gl(e){var t=e.length;if(t!==0){for(var n=0;n0)){Tr.clear();for(const a of Xn){if((a.f&(Kt|wt))!==0)continue;const i=[a];let l=a.parent;for(;l!==null;)Xn.has(l)&&(Xn.delete(l),i.push(l)),l=l.parent;for(let c=i.length-1;c>=0;c--){const o=i[c];(o.f&(Kt|wt))===0&&Cr(o)}}Xn.clear()}}Xn=null}}function oo(e,t,n,s){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;(i&ht)!==0?oo(a,t,n,s):(i&(Na|Mn))!==0&&(i&ct)===0&&vi(a,t,s)&&($e(a,ct),_i(a))}}function vi(e,t,n){const s=n.get(e);if(s!==void 0)return s;if(e.deps!==null)for(const a of e.deps){if(Jr.call(t,a))return!0;if((a.f&ht)!==0&&vi(a,t,n))return n.set(a,!0),!0}return n.set(e,!1),!1}function _i(e){ne.schedule(e)}function co(e,t){if(!((e.f&bn)!==0&&(e.f&Ye)!==0)){(e.f&ct)!==0?t.d.push(e):(e.f&kn)!==0&&t.m.push(e),$e(e,Ye);for(var n=e.first;n!==null;)co(n,t),n=n.next}}function uo(e){$e(e,Ye);for(var t=e.first;t!==null;)uo(t),t=t.next}function Du(e){let t=0,n=Rr(0),s;return()=>{bi()&&(r(n),aa(()=>(t===0&&(s=v(()=>e(()=>Ma(n)))),t+=1,()=>{ur(()=>{t-=1,t===0&&(s?.(),s=void 0,Ma(n))})})))}}var Ou=ea|Dr;function Mu(e,t,n,s){new Nu(e,t,n,s)}class Nu{parent;is_pending=!1;transform_error;#n;#o=null;#e;#a;#r;#s=null;#t=null;#i=null;#c=null;#u=0;#l=0;#d=!1;#h=new Set;#p=new Set;#f=null;#g=Du(()=>(this.#f=Rr(this.#u),()=>{this.#f=null}));constructor(t,n,s,a){this.#n=t,this.#e=n,this.#a=i=>{var l=re;l.b=this,l.f|=Ys,s(i)},this.parent=re.b,this.transform_error=a??this.parent?.transform_error??(i=>i),this.#r=ms(()=>{this.#b()},Ou)}#v(){try{this.#s=Xt(()=>this.#a(this.#n))}catch(t){this.error(t)}}#m(t){const n=this.#e.failed;n&&(this.#i=Xt(()=>{n(this.#n,()=>t,()=>()=>{})}))}#_(){const t=this.#e.pending;t&&(this.is_pending=!0,this.#t=Xt(()=>t(this.#n)),ur(()=>{var n=this.#c=document.createDocumentFragment(),s=Nn();n.append(s),this.#s=this.#w(()=>Xt(()=>this.#a(s))),this.#l===0&&(this.#n.before(n),this.#c=null,Er(this.#t,()=>{this.#t=null}),this.#k(ne))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#u=0,this.#s=Xt(()=>{this.#a(this.#n)}),this.#l>0){var t=this.#c=document.createDocumentFragment();yi(this.#s,t);const n=this.#e.pending;this.#t=Xt(()=>n(this.#n))}else this.#k(ne)}catch(n){this.error(n)}}#k(t){this.is_pending=!1,t.transfer_effects(this.#h,this.#p)}defer_effect(t){lo(t,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#w(t){var n=re,s=de,a=Le;en(this.#r),Qt(this.#r),ta(this.#r.ctx);try{return dr.ensure(),t()}catch(i){return so(i),null}finally{en(n),Qt(s),ta(a)}}#y(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,n);return}this.#l+=t,this.#l===0&&(this.#k(n),this.#t&&Er(this.#t,()=>{this.#t=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(t,n){this.#y(t,n),this.#u+=t,!(!this.#f||this.#d)&&(this.#d=!0,ur(()=>{this.#d=!1,this.#f&&na(this.#f,this.#u)}))}get_effect_pending(){return this.#g(),r(this.#f)}error(t){if(!this.#e.onerror&&!this.#e.failed)throw t;ne?.is_fork?(this.#s&&ne.skip_effect(this.#s),this.#t&&ne.skip_effect(this.#t),this.#i&&ne.skip_effect(this.#i),ne.on_fork_commit(()=>{this.#x(t)})):this.#x(t)}#x(t){this.#s&&(St(this.#s),this.#s=null),this.#t&&(St(this.#t),this.#t=null),this.#i&&(St(this.#i),this.#i=null);var n=this.#e.onerror;let s=this.#e.failed;var a=!1,i=!1;const l=()=>{if(a){Tu();return}a=!0,i&&hu(),this.#i!==null&&Er(this.#i,()=>{this.#i=null}),this.#w(()=>{this.#b()})},c=o=>{try{i=!0,n?.(o,l),i=!1}catch(f){lr(f,this.#r&&this.#r.parent)}s&&(this.#i=this.#w(()=>{try{return Xt(()=>{var f=re;f.b=this,f.f|=Ys,s(this.#n,()=>o,()=>l)})}catch(f){return lr(f,this.#r.parent),null}}))};ur(()=>{var o;try{o=this.transform_error(t)}catch(f){lr(f,this.#r&&this.#r.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(c,f=>lr(f,this.#r&&this.#r.parent)):c(o)})}}function Pu(e,t,n,s){const a=Ua()?_s:gi;var i=e.filter(m=>!m.settled);if(n.length===0&&i.length===0){s(t.map(a));return}var l=re,c=zu(),o=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(m=>m.promise)):null;function f(m){c();try{s(m)}catch(E){(l.f&Kt)===0&&lr(E,l)}fs()}if(n.length===0){o.then(()=>f(t.map(a)));return}var h=fo();function w(){Promise.all(n.map(m=>$u(m))).then(m=>f([...t.map(a),...m])).catch(m=>lr(m,l)).finally(()=>h())}o?o.then(()=>{c(),w(),fs()}):w()}function zu(){var e=re,t=de,n=Le,s=ne;return function(i=!0){en(e),Qt(t),ta(n),i&&(e.f&Kt)===0&&(s?.activate(),s?.apply())}}function fs(e=!0){en(null),Qt(null),ta(null),e&&ne?.deactivate()}function fo(){var e=re,t=e.b,n=ne,s=t.is_rendered();return t.update_pending_count(1,n),n.increment(s,e),(a=!1)=>{t.update_pending_count(-1,n),n.decrement(s,e,a)}}function _s(e){var t=ht|ct;return re!==null&&(re.f|=Dr),{ctx:Le,deps:null,effects:null,equals:to,f:t,fn:e,reactions:null,rv:0,v:tt,wv:0,parent:re,ac:null}}function $u(e,t,n){let s=re;s===null&&su();var a=void 0,i=Rr(tt),l=!de,c=new Map;return Ku(()=>{var o=re,f=Yl();a=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(fs)}catch(E){f.reject(E),fs()}var h=ne;if(l){if((o.f&Lr)!==0)var w=fo();if(s.b.is_rendered())c.get(h)?.reject(Vn),c.delete(h);else{for(const E of c.values())E.reject(Vn);c.clear()}c.set(h,f)}const m=(E,T=void 0)=>{if(w){var L=T===Vn;w(L)}if(!(T===Vn||(o.f&Kt)!==0)){if(h.activate(),T)i.f|=cr,na(i,T);else{(i.f&cr)!==0&&(i.f^=cr),na(i,E);for(const[S,z]of c){if(c.delete(S),S===h)break;z.reject(Vn)}}h.deactivate()}};f.promise.then(m,E=>m(null,E||"unknown"))}),To(()=>{for(const o of c.values())o.reject(Vn)}),new Promise(o=>{function f(h){function w(){h===a?o(i):f(a)}h.then(w,w)}f(a)})}function ar(e){const t=_s(e);return Lo(t),t}function gi(e){const t=_s(e);return t.equals=ro,t}function Fu(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;nr(e))),t}function g(e,t,n=!1){de!==null&&(!mn||(de.f&Vs)!==0)&&Ua()&&(de.f&(ht|Mn|Na|Vs))!==0&&(Jt===null||!Jr.call(Jt,e))&&pu();let s=n?Sa(t):t;return na(e,s,os)}function na(e,t,n=null){if(!e.equals(t)){Tr.set(e,pr?t:e.v);var s=dr.ensure();if(s.capture(e,t),(e.f&ht)!==0){const a=e;(e.f&ct)!==0&&mi(a),gn===null&&hi(a)}e.wv=Oo(),_o(e,ct,n),Ua()&&re!==null&&(re.f&Ye)!==0&&(re.f&(bn|fr))===0&&(Yt===null?Qu([e]):Yt.push(e)),!s.is_fork&&Js.size>0&&!vo&&Bu()}return t}function Bu(){vo=!1;for(const e of Js)(e.f&Ye)!==0&&$e(e,kn),sa(e)&&Cr(e);Js.clear()}function Ma(e){g(e,e.v+1)}function _o(e,t,n){var s=e.reactions;if(s!==null)for(var a=Ua(),i=s.length,l=0;l{if(Sr===i)return c();var o=de,f=Sr;Qt(null),kl(i);var h=c();return Qt(o),kl(f),h};return s&&n.set("length",sr(e.length)),new Proxy(e,{defineProperty(c,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&fu();var h=n.get(o);return h===void 0?l(()=>{var w=sr(f.value);return n.set(o,w),w}):g(h,f.value,!0),!0},deleteProperty(c,o){var f=n.get(o);if(f===void 0){if(o in c){const h=l(()=>sr(tt));n.set(o,h),Ma(a)}}else g(f,tt),Ma(a);return!0},get(c,o,f){if(o===Kr)return e;var h=n.get(o),w=o in c;if(h===void 0&&(!w||Da(c,o)?.writable)&&(h=l(()=>{var E=Sa(w?c[o]:tt),T=sr(E);return T}),n.set(o,h)),h!==void 0){var m=r(h);return m===tt?void 0:m}return Reflect.get(c,o,f)},getOwnPropertyDescriptor(c,o){var f=Reflect.getOwnPropertyDescriptor(c,o);if(f&&"value"in f){var h=n.get(o);h&&(f.value=r(h))}else if(f===void 0){var w=n.get(o),m=w?.v;if(w!==void 0&&m!==tt)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return f},has(c,o){if(o===Kr)return!0;var f=n.get(o),h=f!==void 0&&f.v!==tt||Reflect.has(c,o);if(f!==void 0||re!==null&&(!h||Da(c,o)?.writable)){f===void 0&&(f=l(()=>{var m=h?Sa(c[o]):tt,E=sr(m);return E}),n.set(o,f));var w=r(f);if(w===tt)return!1}return h},set(c,o,f,h){var w=n.get(o),m=o in c;if(s&&o==="length")for(var E=f;Esr(tt)),n.set(E+"",T))}if(w===void 0)(!m||Da(c,o)?.writable)&&(w=l(()=>sr(void 0)),g(w,Sa(f)),n.set(o,w));else{m=w.v!==tt;var L=l(()=>Sa(f));g(w,L)}var S=Reflect.getOwnPropertyDescriptor(c,o);if(S?.set&&S.set.call(h,f),!m){if(s&&typeof o=="string"){var z=n.get("length"),R=Number(o);Number.isInteger(R)&&R>=z.v&&g(z,R+1)}Ma(a)}return!0},ownKeys(c){r(a);var o=Reflect.ownKeys(c).filter(w=>{var m=n.get(w);return m===void 0||m.v!==tt});for(var[f,h]of n)h.v!==tt&&!(f in c)&&o.push(f);return o},setPrototypeOf(){du()}})}var Qs,go,mo,bo,ko;function qu(){if(Qs===void 0){Qs=window,go=document,mo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;bo=Da(t,"firstChild").get,ko=Da(t,"nextSibling").get,vl(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),vl(n)&&(n.__t=void 0)}}function Nn(e=""){return document.createTextNode(e)}function or(e){return bo.call(e)}function Ha(e){return ko.call(e)}function p(e,t){return or(e)}function Yn(e,t=!1){{var n=or(e);return n instanceof Comment&&n.data===""?Ha(n):n}}function _(e,t=1,n=!1){let s=e;for(;t--;)s=Ha(s);return s}function Gu(e){e.textContent=""}function wo(){return!1}function yo(e,t,n){return document.createElementNS(t??eo,e,void 0)}let ml=!1;function Wu(){ml||(ml=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function gs(e){var t=de,n=re;Qt(null),en(null);try{return e()}finally{Qt(t),en(n)}}function ju(e,t,n,s=n){e.addEventListener(t,()=>gs(n));const a=e.__on_r;a?e.__on_r=()=>{a(),s(!0)}:e.__on_r=()=>s(!0),Wu()}function xo(e){re===null&&(de===null&&cu(),ou()),pr&&lu()}function Zu(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pn(e,t){var n=re;n!==null&&(n.f&wt)!==0&&(e|=wt);var s={ctx:Le,deps:null,nodes:null,f:e|ct|Vt,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};ne?.register_created_effect(s);var a=s;if((e&Qr)!==0)Vr!==null?Vr.push(s):dr.ensure().schedule(s);else if(t!==null){try{Cr(s)}catch(l){throw St(s),l}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Dr)===0&&(a=a.first,(e&Mn)!==0&&(e&ea)!==0&&a!==null&&(a.f|=ea))}if(a!==null&&(a.parent=n,n!==null&&Zu(a,n),de!==null&&(de.f&ht)!==0&&(e&fr)===0)){var i=de;(i.effects??=[]).push(a)}return s}function bi(){return de!==null&&!mn}function To(e){const t=Pn($a,null);return $e(t,Ye),t.teardown=e,t}function ei(e){xo();var t=re.f,n=!de&&(t&bn)!==0&&(t&Lr)===0;if(n){var s=Le;(s.e??=[]).push(e)}else return Eo(e)}function Eo(e){return Pn(Qr|Kl,e)}function Yu(e){return xo(),Pn($a|Kl,e)}function Xu(e){dr.ensure();const t=Pn(fr|Dr,e);return(n={})=>new Promise(s=>{n.outro?Er(t,()=>{St(t),s(void 0)}):(St(t),s(void 0))})}function Pa(e){return Pn(Qr,e)}function Rn(e,t){var n=Le,s={effect:null,ran:!1,deps:e};n.l.$.push(s),s.effect=aa(()=>{if(e(),!s.ran){s.ran=!0;var a=re;try{en(a.parent),v(t)}finally{en(a)}}})}function Vu(){var e=Le;aa(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&Ye)!==0&&n.deps!==null&&$e(n,kn),sa(n)&&Cr(n),t.ran=!1}})}function Ku(e){return Pn(Na|Dr,e)}function aa(e,t=0){return Pn($a|t,e)}function P(e,t=[],n=[],s=[]){Pu(s,t,n,a=>{Pn($a,()=>e(...a.map(r)))})}function ms(e,t=0){var n=Pn(Mn|t,e);return n}function Xt(e){return Pn(bn|Dr,e)}function So(e){var t=e.teardown;if(t!==null){const n=pr,s=de;bl(!0),Qt(null);try{t.call(null)}finally{bl(n),Qt(s)}}}function ki(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const a=n.ac;a!==null&&gs(()=>{a.abort(Vn)});var s=n.next;(n.f&fr)!==0?n.parent=null:St(n,t),n=s}}function Ju(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&bn)===0&&St(t),t=n}}function St(e,t=!0){var n=!1;(t||(e.f&Vl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ao(e.nodes.start,e.nodes.end),n=!0),$e(e,Xs),ki(e,t&&!n),za(e,0);var s=e.nodes&&e.nodes.t;if(s!==null)for(const i of s)i.stop();So(e),e.f^=Xs,e.f|=Kt;var a=e.parent;a!==null&&a.first!==null&&Ro(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ao(e,t){for(;e!==null;){var n=e===t?null:Ha(e);e.remove(),e=n}}function Ro(e){var t=e.parent,n=e.prev,s=e.next;n!==null&&(n.next=s),s!==null&&(s.prev=n),t!==null&&(t.first===e&&(t.first=s),t.last===e&&(t.last=n))}function Er(e,t,n=!0){var s=[];Co(e,s,!0);var a=()=>{n&&St(e),t&&t()},i=s.length;if(i>0){var l=()=>--i||a();for(var c of s)c.out(l)}else a()}function Co(e,t,n){if((e.f&wt)===0){e.f^=wt;var s=e.nodes&&e.nodes.t;if(s!==null)for(const c of s)(c.is_global||n)&&t.push(c);for(var a=e.first;a!==null;){var i=a.next;if((a.f&fr)===0){var l=(a.f&ea)!==0||(a.f&bn)!==0&&(e.f&Mn)!==0;Co(a,t,l?n:!1)}a=i}}}function wi(e){Io(e,!0)}function Io(e,t){if((e.f&wt)!==0){e.f^=wt,(e.f&Ye)===0&&($e(e,ct),dr.ensure().schedule(e));for(var n=e.first;n!==null;){var s=n.next,a=(n.f&ea)!==0||(n.f&bn)!==0;Io(n,a?t:!1),n=s}var i=e.nodes&&e.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&l.in()}}function yi(e,t){if(e.nodes)for(var n=e.nodes.start,s=e.nodes.end;n!==null;){var a=n===s?null:Ha(n);t.append(n),n=a}}let cs=!1,pr=!1;function bl(e){pr=e}let de=null,mn=!1;function Qt(e){de=e}let re=null;function en(e){re=e}let Jt=null;function Lo(e){de!==null&&(Jt===null?Jt=[e]:Jt.push(e))}let Et=null,Pt=0,Yt=null;function Qu(e){Yt=e}let Do=1,xr=0,Sr=xr;function kl(e){Sr=e}function Oo(){return++Do}function sa(e){var t=e.f;if((t&ct)!==0)return!0;if(t&ht&&(e.f&=~Ar),(t&kn)!==0){for(var n=e.deps,s=n.length,a=0;ae.wv)return!0}(t&Vt)!==0&&gn===null&&$e(e,Ye)}return!1}function Mo(e,t,n=!0){var s=e.reactions;if(s!==null&&!(Jt!==null&&Jr.call(Jt,e)))for(var a=0;a{e.ac.abort(Vn)}),e.ac=null);try{e.f|=us;var h=e.fn,w=h();e.f|=Lr;var m=e.deps,E=ne?.is_fork;if(Et!==null){var T;if(E||za(e,Pt),m!==null&&Pt>0)for(m.length=Pt+Et.length,T=0;Tn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ur(()=>{t.addEventListener(e,a,s)}):t.addEventListener(e,a,s),a}function Cn(e,t,n,s,a){var i={capture:s,passive:a},l=rf(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&To(()=>{t.removeEventListener(e,l,i)})}function G(e,t,n){(t[Aa]??={})[e]=n}function af(e){for(var t=0;t{throw S});throw m}}finally{e[Aa]=t,delete e.currentTarget,Qt(h),en(w)}}}const sf=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function lf(e){return sf?.createHTML(e)??e}function of(e){var t=yo("template");return t.innerHTML=lf(e.replaceAll("","")),t.content}function ra(e,t){var n=re;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function D(e,t){var n=(t&bu)!==0,s=(t&ku)!==0,a,i=!e.startsWith("");return()=>{a===void 0&&(a=of(i?e:""+e),n||(a=or(a)));var l=s||mo?document.importNode(a,!0):a.cloneNode(!0);if(n){var c=or(l),o=l.lastChild;ra(c,o)}else ra(l,l);return l}}function mt(e=""){{var t=Nn(e+"");return ra(t,t),t}}function Ra(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Nn();return e.append(t,n),ra(t,n),e}function A(e,t){e!==null&&e.before(t)}function I(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function cf(e,t){return uf(e,t)}const as=new Map;function uf(e,{target:t,anchor:n,props:s={},events:a,context:i,intro:l=!0,transformError:c}){qu();var o=void 0,f=Xu(()=>{var h=n??t.appendChild(Nn());Mu(h,{pending:()=>{}},E=>{di({});var T=Le;i&&(T.c=i),a&&(s.$$events=a),o=e(E,s)||{},pi()},c);var w=new Set,m=E=>{for(var T=0;T{for(var E of w)for(const S of[t,document]){var T=as.get(S),L=T.get(E);--L==0?(S.removeEventListener(E,ai),T.delete(E),T.size===0&&as.delete(S)):T.set(E,L)}ri.delete(m),h!==n&&h.parentNode?.removeChild(h)}});return ff.set(o,f),o}let ff=new WeakMap;class df{anchor;#n=new Map;#o=new Map;#e=new Map;#a=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#s=t=>{if(this.#n.has(t)){var n=this.#n.get(t),s=this.#o.get(n);if(s)wi(s),this.#a.delete(n);else{var a=this.#e.get(n);a&&(this.#o.set(n,a.effect),this.#e.delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[i,l]of this.#n){if(this.#n.delete(i),i===t)break;const c=this.#e.get(l);c&&(St(c.effect),this.#e.delete(l))}for(const[i,l]of this.#o){if(i===n||this.#a.has(i))continue;const c=()=>{if(Array.from(this.#n.values()).includes(i)){var f=document.createDocumentFragment();yi(l,f),f.append(Nn()),this.#e.set(i,{effect:l,fragment:f})}else St(l);this.#a.delete(i),this.#o.delete(i)};this.#r||!s?(this.#a.add(i),Er(l,c,!1)):c()}}};#t=t=>{this.#n.delete(t);const n=Array.from(this.#n.values());for(const[s,a]of this.#e)n.includes(s)||(St(a.effect),this.#e.delete(s))};ensure(t,n){var s=ne,a=wo();if(n&&!this.#o.has(t)&&!this.#e.has(t))if(a){var i=document.createDocumentFragment(),l=Nn();i.append(l),this.#e.set(t,{effect:Xt(()=>n(l)),fragment:i})}else this.#o.set(t,Xt(()=>n(this.anchor)));if(this.#n.set(s,t),a){for(const[c,o]of this.#o)c===t?s.unskip_effect(o):s.skip_effect(o);for(const[c,o]of this.#e)c===t?s.unskip_effect(o.effect):s.skip_effect(o.effect);s.oncommit(this.#s),s.ondiscard(this.#t)}else this.#s(s)}}function j(e,t,n=!1){var s=new df(e),a=n?ea:0;function i(l,c){s.ensure(l,c)}ms(()=>{var l=!1;t((c,o=0)=>{l=!0,i(o,c)}),l||i(-1,null)},a)}function pf(e,t){return t}function hf(e,t,n){for(var s=[],a=t.length,i,l=t.length,c=0;c{if(i){if(i.pending.delete(w),i.done.add(w),i.pending.size===0){var m=e.outrogroups;si(e,vs(i.done)),m.delete(i),m.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var o=s.length===0&&n!==null;if(o){var f=n,h=f.parentNode;Gu(h),h.append(f),e.items.clear()}si(e,t,!o)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function si(e,t,n=!0){var s;if(e.pending.size>0){s=new Set;for(const l of e.pending.values())for(const c of l)s.add(e.items.get(c).e)}for(var a=0;a{var te=n();return jl(te)?te:te==null?[]:vs(te)}),m,E=new Map,T=!0;function L(te){(R.effect.f&Kt)===0&&(R.pending.delete(te),R.fallback=h,vf(R,m,l,t,s),h!==null&&(m.length===0?(h.f&On)===0?wi(h):(h.f^=On,Ca(h,null,l)):Er(h,()=>{h=null})))}function S(te){R.pending.delete(te)}var z=ms(()=>{m=r(w);for(var te=m.length,C=new Set,oe=ne,ve=wo(),Ae=0;Aei(l)):(h=Xt(()=>i(yl??=Nn())),h.f|=On)),te>C.size&&iu(),!T)if(E.set(oe,C),ve){for(const[Ee,Re]of c)C.has(Ee)||oe.skip_effect(Re.e);oe.oncommit(L),oe.ondiscard(S)}else L(oe);r(w)}),R={effect:z,items:c,pending:E,outrogroups:null,fallback:h};T=!1}function ba(e){for(;e!==null&&(e.f&bn)===0;)e=e.next;return e}function vf(e,t,n,s,a){var i=(s&gu)!==0,l=t.length,c=e.items,o=ba(e.effect.first),f,h=null,w,m=[],E=[],T,L,S,z;if(i)for(z=0;z0){var rt=(s&Ql)!==0&&l===0?n:null;if(i){for(z=0;z{if(w!==void 0)for(S of w)S.nodes?.a?.apply()})}function _f(e,t,n,s,a,i,l,c){var o=(l&vu)!==0?(l&mu)===0?Z(n,!1,!1):Rr(n):null,f=(l&_u)!==0?Rr(a):null;return{v:o,i:f,e:Xt(()=>(i(t,o??n,f??a,c),()=>{e.delete(s)}))}}function Ca(e,t,n){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end,i=t&&(t.f&On)===0?t.nodes.start:n;s!==null;){var l=Ha(s);if(i.before(s),s===a)return;s=l}}function ir(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function $s(e,t,n=!1,s=!1,a=!1,i=!1){var l=e,c="";if(n)var o=e;P(()=>{var f=re;if(c!==(c=t()??"")){if(n){f.nodes=null,o.innerHTML=c,c!==""&&ra(or(o),o.lastChild);return}if(f.nodes!==null&&(Ao(f.nodes.start,f.nodes.end),f.nodes=null),c!==""){var h=s?wu:a?yu:void 0,w=yo(s?"svg":a?"math":"template",h);w.innerHTML=c;var m=s||a?w:w.content;if(ra(or(m),m.lastChild),s||a)for(;or(m);)l.before(or(m));else l.before(m)}}})}function Fo(e,t){var n;n=document.head.appendChild(Nn()),ms(()=>t(n),Vl|Dr)}function xl(e,t,n){Pa(()=>{var s=v(()=>t(e,n?.())||{});if(n&&s?.update){var a=!1,i={};aa(()=>{var l=n();hn(l),a&&no(i,l)&&(i=l,s.update(l))}),a=!0}if(s?.destroy)return()=>s.destroy()})}const Tl=[...` +\r\f \v\uFEFF`];function gf(e,t,n){var s=e==null?"":""+e;if(n){for(var a of Object.keys(n))if(n[a])s=s?s+" "+a:a;else if(s.length)for(var i=a.length,l=0;(l=s.indexOf(a,l))>=0;){var c=l+i;(l===0||Tl.includes(s[l-1]))&&(c===s.length||Tl.includes(s[c]))?s=(l===0?"":s.substring(0,l))+s.substring(c+1):l=c}}return s===""?null:s}function mf(e,t){return e==null?null:String(e)}function Mt(e,t,n,s,a,i){var l=e.__className;if(l!==n||l===void 0){var c=gf(n,s,i);c==null?e.removeAttribute("class"):e.className=c,e.__className=n}else if(i&&a!==i)for(var o in i){var f=!!i[o];(a==null||f!==!!a[o])&&e.classList.toggle(o,f)}return i}function Zn(e,t,n,s){var a=e.__style;if(a!==t){var i=mf(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return s}const bf=Symbol("is custom element"),kf=Symbol("is html");function $(e,t,n,s){var a=wf(e);a[t]!==(a[t]=n)&&(t==="loading"&&(e[au]=n),n==null?e.removeAttribute(t):typeof n!="string"&&yf(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function wf(e){return e.__attributes??={[bf]:e.nodeName.includes("-"),[kf]:e.namespaceURI===eo}}var El=new Map;function yf(e){var t=e.getAttribute("is")||e.nodeName,n=El.get(t);if(n)return n;El.set(t,n=[]);for(var s,a=e,i=Element.prototype;i!==a;){s=Zl(a);for(var l in s)s[l].set&&n.push(l);a=fi(a)}return n}function In(e,t,n=t){var s=new WeakSet;ju(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=Fs(e)?Us(i):i,n(i),ne!==null&&s.add(ne),await ti(),i!==(i=t())){var l=e.selectionStart,c=e.selectionEnd,o=e.value.length;if(e.value=i??"",c!==null){var f=e.value.length;l===c&&c===o&&f>o?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=l,e.selectionEnd=Math.min(c,f))}}}),v(t)==null&&e.value&&(n(Fs(e)?Us(e.value):e.value),ne!==null&&s.add(ne)),aa(()=>{var a=t();if(e===document.activeElement){var i=ne;if(s.has(i))return}Fs(e)&&a===Us(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function Fs(e){var t=e.type;return t==="number"||t==="range"}function Us(e){return e===""?null:+e}function Sl(e,t){return e===t||e?.[Kr]===t}function Hs(e={},t,n,s){var a=Le.r,i=re;return Pa(()=>{var l,c;return aa(()=>{l=c,c=[],v(()=>{e!==n(...c)&&(t(e,...c),l&&Sl(n(...l),e)&&t(null,...l))})}),()=>{let o=i;for(;o!==a&&o.parent!==null&&o.parent.f&Xs;)o=o.parent;const f=()=>{c&&Sl(n(...c),e)&&t(null,...c)},h=o.teardown;o.teardown=()=>{f(),h?.()}}}),e}function Uo(e=!1){const t=Le,n=t.l.u;if(!n)return;let s=()=>hn(t.s);if(e){let a=0,i={};const l=_s(()=>{let c=!1;const o=t.s;for(const f in o)o[f]!==i[f]&&(i[f]=o[f],c=!0);return c&&a++,a});s=()=>r(l)}n.b.length&&Yu(()=>{Al(t,s),Zs(n.b)}),ei(()=>{const a=v(()=>n.m.map(ru));return()=>{for(const i of a)typeof i=="function"&&i()}}),n.a.length&&ei(()=>{Al(t,s),Zs(n.a)})}function Al(e,t){if(e.l.s)for(const n of e.l.s)r(n);t()}function Ho(e){Le===null&&Jl(),Fa&&Le.l!==null?Tf(Le).m.push(e):ei(()=>{const t=v(e);if(typeof t=="function")return t})}function xf(e){Le===null&&Jl(),Ho(()=>()=>v(e))}function Tf(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Ef="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Ef);Su();class Bo extends Error{constructor(t,n){super(n),this.status=t}status}async function lt(e,t={}){const n=new Headers(t.headers);n.set("Accept","application/json"),t.body&&!(t.body instanceof FormData)&&n.set("Content-Type","application/json");const s=await fetch(e,{...t,headers:n});if(!s.ok)throw new Bo(s.status,await s.text());return s.json()}const{entries:qo,setPrototypeOf:Rl,isFrozen:Sf,getPrototypeOf:Af,getOwnPropertyDescriptor:Rf}=Object;let{freeze:yt,seal:tn,create:Yr}=Object,{apply:ii,construct:li}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});tn||(tn=function(t){return t});ii||(ii=function(t,n){for(var s=arguments.length,a=new Array(s>2?s-2:0),i=2;i1?n-1:0),a=1;a"u"?null:Xe(BigInt.prototype.toString),Ol=typeof Symbol>"u"?null:Xe(Symbol.prototype.toString),ze=Xe(Object.prototype.hasOwnProperty),ya=Xe(Object.prototype.toString),ot=Xe(RegExp.prototype.test),ss=Mf(TypeError);function Xe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:Ia;if(Rl&&Rl(e,null),!bt(t))return e;let s=t.length;for(;s--;){let a=t[s];if(typeof a=="string"){const i=n(a);i!==a&&(Sf(t)||(t[s]=i),a=i)}e[a]=!0}return e}function Nf(e){for(let t=0;t/gm),Bf=tn(/\$\{[\w\W]*/gm),qf=tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gf=tn(/^aria-[\-\w]+$/),Go=tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wf=tn(/^(?:\w+script|data):/i),jf=tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wo=tn(/^html$/i),Zf=tn(/^[a-z][.\w]*(-[.\w]+)+$/i);var $l=Object.freeze({__proto__:null,ARIA_ATTR:Gf,ATTR_WHITESPACE:jf,CUSTOM_ELEMENT:Zf,DATA_ATTR:qf,DOCTYPE_NAME:Wo,ERB_EXPR:Hf,IS_ALLOWED_URI:Go,IS_SCRIPT_OR_DATA:Wf,MUSTACHE_EXPR:Uf,TMPLIT_EXPR:Bf});const xa={element:1,text:3,progressingInstruction:7,comment:8,document:9},Yf=function(){return typeof window>"u"?null:window},Xf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(s=n.getAttribute(a));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Fl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function jo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yf();const t=B=>jo(B);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==xa.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const s=n,a=s.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:c,Element:o,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:w,DOMParser:m,trustedTypes:E}=e,T=o.prototype,L=Xr(T,"cloneNode"),S=Xr(T,"remove"),z=Xr(T,"nextSibling"),R=Xr(T,"childNodes"),te=Xr(T,"parentNode");if(typeof l=="function"){const B=n.createElement("template");B.content&&B.content.ownerDocument&&(n=B.content.ownerDocument)}let C,oe="";const{implementation:ve,createNodeIterator:Ae,createDocumentFragment:nt,getElementsByTagName:rt}=n,{importNode:Te}=s;let Ee=Fl();t.isSupported=typeof qo=="function"&&typeof te=="function"&&ve&&ve.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Re,ERB_EXPR:Se,TMPLIT_EXPR:At,DATA_ATTR:wn,ARIA_ATTR:zn,IS_SCRIPT_OR_DATA:zt,ATTR_WHITESPACE:nn,CUSTOM_ELEMENT:Kn}=$l;let{IS_ALLOWED_URI:$n}=$l,De=null;const $t=J({},[...Ml,...qs,...Gs,...Ws,...Nl]);let Fe=null;const yn=J({},[...Pl,...js,...zl,...is]);let _e=Object.seal(Yr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rn=null,an=null;const Rt=Object.seal(Yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fn=!0,sn=!0,pe=!1,Je=!0,Ft=!1,ln=!0,Oe=!1,la=!1,oa=!1,on=!1,Mr=!1,Nr=!1,qa=!0,hr=!1;const Ga="user-content-";let vt=!0,Un=!1,Hn={},Ct=null;const Pr=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zr=null;const Wa=J({},["audio","video","img","source","image","track"]);let ca=null;const ua=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$r="http://www.w3.org/1998/Math/MathML",Fr="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml";let Jn=Ut,fa=!1,da=null;const ws=J({},[$r,Fr,Ut],Bs);let _t=J({},["mi","mo","mn","ms","mtext"]),Ur=J({},["annotation-xml"]);const Qn=J({},["title","style","font","a","script"]);let xn=null;const ja=["application/xhtml+xml","text/html"],ys="text/html";let Ue=null,Tn=null;const xs=n.createElement("form"),Za=function(u){return u instanceof RegExp||u instanceof Function},er=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tn&&Tn===u)return;(!u||typeof u!="object")&&(u={}),u=Tt(u),xn=ja.indexOf(u.PARSER_MEDIA_TYPE)===-1?ys:u.PARSER_MEDIA_TYPE,Ue=xn==="application/xhtml+xml"?Bs:Ia,De=ze(u,"ALLOWED_TAGS")&&bt(u.ALLOWED_TAGS)?J({},u.ALLOWED_TAGS,Ue):$t,Fe=ze(u,"ALLOWED_ATTR")&&bt(u.ALLOWED_ATTR)?J({},u.ALLOWED_ATTR,Ue):yn,da=ze(u,"ALLOWED_NAMESPACES")&&bt(u.ALLOWED_NAMESPACES)?J({},u.ALLOWED_NAMESPACES,Bs):ws,ca=ze(u,"ADD_URI_SAFE_ATTR")&&bt(u.ADD_URI_SAFE_ATTR)?J(Tt(ua),u.ADD_URI_SAFE_ATTR,Ue):ua,zr=ze(u,"ADD_DATA_URI_TAGS")&&bt(u.ADD_DATA_URI_TAGS)?J(Tt(Wa),u.ADD_DATA_URI_TAGS,Ue):Wa,Ct=ze(u,"FORBID_CONTENTS")&&bt(u.FORBID_CONTENTS)?J({},u.FORBID_CONTENTS,Ue):Pr,rn=ze(u,"FORBID_TAGS")&&bt(u.FORBID_TAGS)?J({},u.FORBID_TAGS,Ue):Tt({}),an=ze(u,"FORBID_ATTR")&&bt(u.FORBID_ATTR)?J({},u.FORBID_ATTR,Ue):Tt({}),Hn=ze(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?Tt(u.USE_PROFILES):u.USE_PROFILES:!1,Fn=u.ALLOW_ARIA_ATTR!==!1,sn=u.ALLOW_DATA_ATTR!==!1,pe=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Je=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=u.SAFE_FOR_TEMPLATES||!1,ln=u.SAFE_FOR_XML!==!1,Oe=u.WHOLE_DOCUMENT||!1,on=u.RETURN_DOM||!1,Mr=u.RETURN_DOM_FRAGMENT||!1,Nr=u.RETURN_TRUSTED_TYPE||!1,oa=u.FORCE_BODY||!1,qa=u.SANITIZE_DOM!==!1,hr=u.SANITIZE_NAMED_PROPS||!1,vt=u.KEEP_CONTENT!==!1,Un=u.IN_PLACE||!1,$n=zf(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:Go,Jn=typeof u.NAMESPACE=="string"?u.NAMESPACE:Ut,_t=ze(u,"MATHML_TEXT_INTEGRATION_POINTS")&&u.MATHML_TEXT_INTEGRATION_POINTS&&typeof u.MATHML_TEXT_INTEGRATION_POINTS=="object"?Tt(u.MATHML_TEXT_INTEGRATION_POINTS):J({},["mi","mo","mn","ms","mtext"]),Ur=ze(u,"HTML_INTEGRATION_POINTS")&&u.HTML_INTEGRATION_POINTS&&typeof u.HTML_INTEGRATION_POINTS=="object"?Tt(u.HTML_INTEGRATION_POINTS):J({},["annotation-xml"]);const x=ze(u,"CUSTOM_ELEMENT_HANDLING")&&u.CUSTOM_ELEMENT_HANDLING&&typeof u.CUSTOM_ELEMENT_HANDLING=="object"?Tt(u.CUSTOM_ELEMENT_HANDLING):Yr(null);if(_e=Yr(null),ze(x,"tagNameCheck")&&Za(x.tagNameCheck)&&(_e.tagNameCheck=x.tagNameCheck),ze(x,"attributeNameCheck")&&Za(x.attributeNameCheck)&&(_e.attributeNameCheck=x.attributeNameCheck),ze(x,"allowCustomizedBuiltInElements")&&typeof x.allowCustomizedBuiltInElements=="boolean"&&(_e.allowCustomizedBuiltInElements=x.allowCustomizedBuiltInElements),Ft&&(sn=!1),Mr&&(on=!0),Hn&&(De=J({},Nl),Fe=Yr(null),Hn.html===!0&&(J(De,Ml),J(Fe,Pl)),Hn.svg===!0&&(J(De,qs),J(Fe,js),J(Fe,is)),Hn.svgFilters===!0&&(J(De,Gs),J(Fe,js),J(Fe,is)),Hn.mathMl===!0&&(J(De,Ws),J(Fe,zl),J(Fe,is))),Rt.tagCheck=null,Rt.attributeCheck=null,ze(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?Rt.tagCheck=u.ADD_TAGS:bt(u.ADD_TAGS)&&(De===$t&&(De=Tt(De)),J(De,u.ADD_TAGS,Ue))),ze(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?Rt.attributeCheck=u.ADD_ATTR:bt(u.ADD_ATTR)&&(Fe===yn&&(Fe=Tt(Fe)),J(Fe,u.ADD_ATTR,Ue))),ze(u,"ADD_URI_SAFE_ATTR")&&bt(u.ADD_URI_SAFE_ATTR)&&J(ca,u.ADD_URI_SAFE_ATTR,Ue),ze(u,"FORBID_CONTENTS")&&bt(u.FORBID_CONTENTS)&&(Ct===Pr&&(Ct=Tt(Ct)),J(Ct,u.FORBID_CONTENTS,Ue)),ze(u,"ADD_FORBID_CONTENTS")&&bt(u.ADD_FORBID_CONTENTS)&&(Ct===Pr&&(Ct=Tt(Ct)),J(Ct,u.ADD_FORBID_CONTENTS,Ue)),vt&&(De["#text"]=!0),Oe&&J(De,["html","head","body"]),De.table&&(J(De,["tbody"]),delete rn.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=u.TRUSTED_TYPES_POLICY,oe=C.createHTML("")}else C===void 0&&(C=Xf(E,a)),C!==null&&typeof oe=="string"&&(oe=C.createHTML(""));yt&&yt(u),Tn=u},Ya=J({},[...qs,...Gs,...$f]),Xa=J({},[...Ws,...Ff]),cn=function(u){let x=te(u);(!x||!x.tagName)&&(x={namespaceURI:Jn,tagName:"template"});const M=Ia(u.tagName),ge=Ia(x.tagName);return da[u.namespaceURI]?u.namespaceURI===Fr?x.namespaceURI===Ut?M==="svg":x.namespaceURI===$r?M==="svg"&&(ge==="annotation-xml"||_t[ge]):!!Ya[M]:u.namespaceURI===$r?x.namespaceURI===Ut?M==="math":x.namespaceURI===Fr?M==="math"&&Ur[ge]:!!Xa[M]:u.namespaceURI===Ut?x.namespaceURI===Fr&&!Ur[ge]||x.namespaceURI===$r&&!_t[ge]?!1:!Xa[M]&&(Qn[M]||!Ya[M]):!!(xn==="application/xhtml+xml"&&da[u.namespaceURI]):!1},Be=function(u){wa(t.removed,{element:u});try{te(u).removeChild(u)}catch{S(u)}},Ht=function(u,x){try{wa(t.removed,{attribute:x.getAttributeNode(u),from:x})}catch{wa(t.removed,{attribute:null,from:x})}if(x.removeAttribute(u),u==="is")if(on||Mr)try{Be(x)}catch{}else try{x.setAttribute(u,"")}catch{}},Va=function(u){let x=null,M=null;if(oa)u=""+u;else{const Ne=Il(u,/^[\r\n\t ]+/);M=Ne&&Ne[0]}xn==="application/xhtml+xml"&&Jn===Ut&&(u=''+u+"");const ge=C?C.createHTML(u):u;if(Jn===Ut)try{x=new m().parseFromString(ge,xn)}catch{}if(!x||!x.documentElement){x=ve.createDocument(Jn,"template",null);try{x.documentElement.innerHTML=fa?oe:ge}catch{}}const He=x.body||x.documentElement;return u&&M&&He.insertBefore(n.createTextNode(M),He.childNodes[0]||null),Jn===Ut?rt.call(x,Oe?"html":"body")[0]:Oe?x.documentElement:He},Ka=function(u){return Ae.call(u.ownerDocument||u,u,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},vr=function(u){return u instanceof w&&(typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||!(u.attributes instanceof h)||typeof u.removeAttribute!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function")},It=function(u){return typeof c=="function"&&u instanceof c};function un(B,u,x){ka(B,M=>{M.call(t,u,x,Tn)})}const Ja=function(u){let x=null;if(un(Ee.beforeSanitizeElements,u,null),vr(u))return Be(u),!0;const M=Ue(u.nodeName);if(un(Ee.uponSanitizeElement,u,{tagName:M,allowedTags:De}),ln&&u.hasChildNodes()&&!It(u.firstElementChild)&&ot(/<[/\w!]/g,u.innerHTML)&&ot(/<[/\w!]/g,u.textContent)||ln&&u.namespaceURI===Ut&&M==="style"&&It(u.firstElementChild)||u.nodeType===xa.progressingInstruction||ln&&u.nodeType===xa.comment&&ot(/<[/\w]/g,u.data))return Be(u),!0;if(rn[M]||!(Rt.tagCheck instanceof Function&&Rt.tagCheck(M))&&!De[M]){if(!rn[M]&&Qa(M)&&(_e.tagNameCheck instanceof RegExp&&ot(_e.tagNameCheck,M)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(M)))return!1;if(vt&&!Ct[M]){const ge=te(u)||u.parentNode,He=R(u)||u.childNodes;if(He&&ge){const Ne=He.length;for(let ut=Ne-1;ut>=0;--ut){const ft=L(He[ut],!0);ge.insertBefore(ft,z(u))}}}return Be(u),!0}return u instanceof o&&!cn(u)||(M==="noscript"||M==="noembed"||M==="noframes")&&ot(/<\/no(script|embed|frames)/i,u.innerHTML)?(Be(u),!0):(Ft&&u.nodeType===xa.text&&(x=u.textContent,ka([Re,Se,At],ge=>{x=jr(x,ge," ")}),u.textContent!==x&&(wa(t.removed,{element:u.cloneNode()}),u.textContent=x)),un(Ee.afterSanitizeElements,u,null),!1)},_r=function(u,x,M){if(an[x]||qa&&(x==="id"||x==="name")&&(M in n||M in xs))return!1;const ge=Fe[x]||Rt.attributeCheck instanceof Function&&Rt.attributeCheck(x,u);if(!(sn&&!an[x]&&ot(wn,x))){if(!(Fn&&ot(zn,x))){if(!ge||an[x]){if(!(Qa(u)&&(_e.tagNameCheck instanceof RegExp&&ot(_e.tagNameCheck,u)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(u))&&(_e.attributeNameCheck instanceof RegExp&&ot(_e.attributeNameCheck,x)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(x,u))||x==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&ot(_e.tagNameCheck,M)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(M))))return!1}else if(!ca[x]){if(!ot($n,jr(M,nn,""))){if(!((x==="src"||x==="xlink:href"||x==="href")&&u!=="script"&&Ll(M,"data:")===0&&zr[u])){if(!(pe&&!ot(zt,jr(M,nn,"")))){if(M)return!1}}}}}}return!0},Ts=J({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Qa=function(u){return!Ts[Ia(u)]&&ot(Kn,u)},Ve=function(u){un(Ee.beforeSanitizeAttributes,u,null);const{attributes:x}=u;if(!x||vr(u))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0};let ge=x.length;for(;ge--;){const He=x[ge],{name:Ne,namespaceURI:ut,value:ft}=He,Qe=Ue(Ne),Hr=ft;let qe=Ne==="value"?Hr:Lf(Hr);if(M.attrName=Qe,M.attrValue=qe,M.keepAttr=!0,M.forceKeepAttr=void 0,un(Ee.uponSanitizeAttribute,u,M),qe=M.attrValue,hr&&(Qe==="id"||Qe==="name")&&Ll(qe,Ga)!==0&&(Ht(Ne,u),qe=Ga+qe),ln&&ot(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,qe)){Ht(Ne,u);continue}if(Qe==="attributename"&&Il(qe,"href")){Ht(Ne,u);continue}if(M.forceKeepAttr)continue;if(!M.keepAttr){Ht(Ne,u);continue}if(!Je&&ot(/\/>/i,qe)){Ht(Ne,u);continue}Ft&&ka([Re,Se,At],ts=>{qe=jr(qe,ts," ")});const es=Ue(u.nodeName);if(!_r(es,Qe,qe)){Ht(Ne,u);continue}if(C&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!ut)switch(E.getAttributeType(es,Qe)){case"TrustedHTML":{qe=C.createHTML(qe);break}case"TrustedScriptURL":{qe=C.createScriptURL(qe);break}}if(qe!==Hr)try{ut?u.setAttributeNS(ut,Ne,qe):u.setAttribute(Ne,qe),vr(u)?Be(u):Cl(t.removed)}catch{Ht(Ne,u)}}un(Ee.afterSanitizeAttributes,u,null)},gr=function(u){let x=null;const M=Ka(u);for(un(Ee.beforeSanitizeShadowDOM,u,null);x=M.nextNode();)un(Ee.uponSanitizeShadowNode,x,null),Ja(x),Ve(x),x.content instanceof i&&gr(x.content);un(Ee.afterSanitizeShadowDOM,u,null)};return t.sanitize=function(B){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=null,M=null,ge=null,He=null;if(fa=!B,fa&&(B=""),typeof B!="string"&&!It(B)&&(B=Pf(B),typeof B!="string"))throw ss("dirty is not a string, aborting");if(!t.isSupported)return B;if(la||er(u),t.removed=[],typeof B=="string"&&(Un=!1),Un){const ft=B.nodeName;if(typeof ft=="string"){const Qe=Ue(ft);if(!De[Qe]||rn[Qe])throw ss("root node is forbidden and cannot be sanitized in-place")}}else if(B instanceof c)x=Va(""),M=x.ownerDocument.importNode(B,!0),M.nodeType===xa.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?x=M:x.appendChild(M);else{if(!on&&!Ft&&!Oe&&B.indexOf("<")===-1)return C&&Nr?C.createHTML(B):B;if(x=Va(B),!x)return on?null:Nr?oe:""}x&&oa&&Be(x.firstChild);const Ne=Ka(Un?B:x);for(;ge=Ne.nextNode();)Ja(ge),Ve(ge),ge.content instanceof i&&gr(ge.content);if(Un)return B;if(on){if(Ft){x.normalize();let ft=x.innerHTML;ka([Re,Se,At],Qe=>{ft=jr(ft,Qe," ")}),x.innerHTML=ft}if(Mr)for(He=nt.call(x.ownerDocument);x.firstChild;)He.appendChild(x.firstChild);else He=x;return(Fe.shadowroot||Fe.shadowrootmode)&&(He=Te.call(s,He,!0)),He}let ut=Oe?x.outerHTML:x.innerHTML;return Oe&&De["!doctype"]&&x.ownerDocument&&x.ownerDocument.doctype&&x.ownerDocument.doctype.name&&ot(Wo,x.ownerDocument.doctype.name)&&(ut=" +`+ut),Ft&&ka([Re,Se,At],ft=>{ut=jr(ut,ft," ")}),C&&Nr?C.createHTML(ut):ut},t.setConfig=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};er(B),la=!0},t.clearConfig=function(){Tn=null,la=!1},t.isValidAttribute=function(B,u,x){Tn||er({});const M=Ue(B),ge=Ue(u);return _r(M,ge,x)},t.addHook=function(B,u){typeof u=="function"&&wa(Ee[B],u)},t.removeHook=function(B,u){if(u!==void 0){const x=Cf(Ee[B],u);return x===-1?void 0:If(Ee[B],x,1)[0]}return Cl(Ee[B])},t.removeHooks=function(B){Ee[B]=[]},t.removeAllHooks=function(){Ee=Fl()},t}var Vf=jo();function xi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Or=xi();function Zo(e){Or=e}var wr={exec:()=>null};function fe(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(a,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(kt.caret,"$1"),n=n.replace(a,l),s},getRegex:()=>new RegExp(n,t)};return s}var Kf=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Jf=/^(?:[ \t]*(?:\n|$))+/,Qf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ed=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ba=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,td=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ti=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Yo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xo=fe(Yo).replace(/bull/g,Ti).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nd=fe(Yo).replace(/bull/g,Ti).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ei=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rd=/^[^\n]+/,Si=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ad=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Si).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sd=fe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ti).getRegex(),bs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ai=/|$))/,id=fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ai).replace("tag",bs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vo=fe(Ei).replace("hr",Ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex(),ld=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vo).getRegex(),Ri={blockquote:ld,code:Qf,def:ad,fences:ed,heading:td,hr:Ba,html:id,lheading:Xo,list:sd,newline:Jf,paragraph:Vo,table:wr,text:rd},Ul=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex(),od={...Ri,lheading:nd,table:Ul,paragraph:fe(Ei).replace("hr",Ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ul).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",bs).getRegex()},cd={...Ri,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ai).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(Ei).replace("hr",Ba).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Xo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ud=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ko=/^( {2,}|\\)\n(?!\s*$)/,dd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Kf?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Qo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,gd=fe(Qo,"u").replace(/punct/g,ia).getRegex(),md=fe(Qo,"u").replace(/punct/g,Jo).getRegex(),ec="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bd=fe(ec,"gu").replace(/notPunctSpace/g,Ci).replace(/punctSpace/g,ks).replace(/punct/g,ia).getRegex(),kd=fe(ec,"gu").replace(/notPunctSpace/g,vd).replace(/punctSpace/g,hd).replace(/punct/g,Jo).getRegex(),wd=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ci).replace(/punctSpace/g,ks).replace(/punct/g,ia).getRegex(),yd=fe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ia).getRegex(),xd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Td=fe(xd,"gu").replace(/notPunctSpace/g,Ci).replace(/punctSpace/g,ks).replace(/punct/g,ia).getRegex(),Ed=fe(/\\(punct)/,"gu").replace(/punct/g,ia).getRegex(),Sd=fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ad=fe(Ai).replace("(?:-->|$)","-->").getRegex(),Rd=fe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ad).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Cd=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tc=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",ds).replace("ref",Si).getRegex(),nc=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Si).getRegex(),Id=fe("reflink|nolink(?!\\()","g").replace("reflink",tc).replace("nolink",nc).getRegex(),Hl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ii={_backpedal:wr,anyPunctuation:Ed,autolink:Sd,blockSkip:_d,br:Ko,code:fd,del:wr,delLDelim:wr,delRDelim:wr,emStrongLDelim:gd,emStrongRDelimAst:bd,emStrongRDelimUnd:wd,escape:ud,link:Cd,nolink:nc,punctuation:pd,reflink:tc,reflinkSearch:Id,tag:Rd,text:dd,url:wr},Ld={...Ii,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",ds).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ds).getRegex()},oi={...Ii,emStrongRDelimAst:kd,emStrongLDelim:md,delLDelim:yd,delRDelim:Td,url:fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Hl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Bl=e=>Od[e];function Dn(e,t){if(t){if(kt.escapeTest.test(e))return e.replace(kt.escapeReplace,Bl)}else if(kt.escapeTestNoEncode.test(e))return e.replace(kt.escapeReplaceNoEncode,Bl);return e}function ql(e){try{e=encodeURI(e).replace(kt.percentDecode,"%")}catch{return null}return e}function Gl(e,t){let n=e.replace(kt.findPipe,(i,l,c)=>{let o=!1,f=l;for(;--f>=0&&c[f]==="\\";)o=!o;return o?"|":" |"}),s=n.split(kt.splitPipe),a=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length0?-2:-1}function Nd(e,t=0){let n=t,s="";for(let a of e)if(a===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=a,n++;return s}function Wl(e,t,n,s,a){let i=t.href,l=t.title||null,c=e[1].replace(a.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,o}function Pd(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let a=s[1];return t.split(` +`).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[c]=l;return c.length>=a.length?i.slice(a.length):i}).join(` +`)}var ps=class{options;rules;lexer;constructor(e){this.options=e||Or}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ea(n,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=Pd(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Ea(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ea(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ea(t[0],` +`).split(` +`),s="",a="",i=[];for(;n.length>0;){let l=!1,c=[],o;for(o=0;o1,a={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let o=!1,f="",h="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let w=Nd(t[2].split(` +`,1)[0],t[1].length),m=e.split(` +`,1)[0],E=!w.trim(),T=0;if(this.options.pedantic?(T=2,h=w.trimStart()):E?T=t[1].length+1:(T=w.search(this.rules.other.nonSpaceChar),T=T>4?1:T,h=w.slice(T),T+=t[1].length),E&&this.rules.other.blankLine.test(m)&&(f+=m+` +`,e=e.substring(m.length+1),o=!0),!o){let L=this.rules.other.nextBulletRegex(T),S=this.rules.other.hrRegex(T),z=this.rules.other.fencesBeginRegex(T),R=this.rules.other.headingBeginRegex(T),te=this.rules.other.htmlBeginRegex(T),C=this.rules.other.blockquoteBeginRegex(T);for(;e;){let oe=e.split(` +`,1)[0],ve;if(m=oe,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),ve=m):ve=m.replace(this.rules.other.tabCharGlobal," "),z.test(m)||R.test(m)||te.test(m)||C.test(m)||L.test(m)||S.test(m))break;if(ve.search(this.rules.other.nonSpaceChar)>=T||!m.trim())h+=` +`+ve.slice(T);else{if(E||w.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||z.test(w)||R.test(w)||S.test(w))break;h+=` +`+m}E=!m.trim(),f+=oe+` +`,e=e.substring(oe.length+1),w=ve.slice(T)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0)),a.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=f}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let o of a.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(o.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};o.checked=h.checked,a.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!a.loose){let f=o.tokens.filter(w=>w.type==="space"),h=f.length>0&&f.some(w=>this.rules.other.anyLine.test(w.raw));a.loose=h}}if(a.loose)for(let o of a.items){o.loose=!0;for(let f of o.tokens)f.type==="text"&&(f.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Gl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[o]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Ea(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=Md(t[2],"()");if(i===-2)return;if(i>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],a="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],a=i[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Wl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[s.toLowerCase()];if(!a){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Wl(n,a,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...s[0]].length-1,i,l,c=a,o=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+a);(s=f.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){c+=l;continue}else if((s[5]||s[6])&&a%3&&!((a+l)%3)){o+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+o);let h=[...s[0]][0].length,w=e.slice(0,a+s.index+h+l);if(Math.min(a,l)%2){let E=w.slice(1,-1);return{type:"em",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}let m=w.slice(2,-2);return{type:"strong",raw:w,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...s[0]].length-1,i,l,c=a,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+a);(s=o.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==a))continue;if(s[3]||s[4]){c+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c);let f=[...s[0]][0].length,h=e.slice(0,a+s.index+f+l),w=h.slice(a,-a);return{type:"del",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},vn=class ci{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Or,this.options.tokenizer=this.options.tokenizer||new ps,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:kt,block:ls.normal,inline:Ta.normal};this.options.pedantic?(n.block=ls.pedantic,n.inline=Ta.pedantic):this.options.gfm&&(n.block=ls.gfm,this.options.breaks?n.inline=Ta.breaks:n.inline=Ta.gfm),this.tokenizer.rules=n}static get rules(){return{block:ls,inline:Ta}}static lex(t,n){return new ci(n).lex(t)}static lexInline(t,n){return new ci(n).inlineTokens(t)}lex(t){t=t.replace(kt.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let n=0;n(a=l.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let l=n.at(-1);a.raw.length===1&&l!==void 0?l.raw+=` +`:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(` +`)?"":` +`)+a.raw,l.text+=` +`+a.text,this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(` +`)?"":` +`)+a.raw,l.text+=` +`+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},n.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let i=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),o;this.options.extensions.startBlock.forEach(f=>{o=f.call({lexer:this},c),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(i=t.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(i))){let l=n.at(-1);s&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(` +`)?"":` +`)+a.raw,l.text+=` +`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a),s=i.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(` +`)?"":` +`)+a.raw,l.text+=` +`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(a);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let s=t,a=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)o.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=a[2]?a[2].length:0,s=s.slice(0,a.index+i)+"["+"a".repeat(a[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let l=!1,c="";for(;t;){l||(c=""),l=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let f=t;if(this.options.extensions?.startInline){let h=1/0,w=t.slice(1),m;this.options.extensions.startInline.forEach(E=>{m=E.call({lexer:this},w),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(f=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(f)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},hs=class{options;parser;constructor(e){this.options=e||Or}space(e){return""}code({text:e,lang:t,escaped:n}){let s=(t||"").match(kt.notSpaceStart)?.[0],a=e.replace(kt.endingNewline,"")+` +`;return s?'
    '+(n?a:Dn(a,!0))+`
    +`:"
    "+(n?a:Dn(a,!0))+`
    +`}blockquote({tokens:e}){return`
    +${this.parser.parse(e)}
    +`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
    +`}list(e){let t=e.ordered,n=e.start,s="";for(let l=0;l +`+s+" +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",n="";for(let a=0;a${s}`),` + +`+t+` +`+s+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Dn(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),a=ql(e);if(a===null)return s;e=a;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let a=ql(e);if(a===null)return Dn(n);e=a;let i=`${Dn(n)}{let l=a[i].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=t.renderers[a.name];i?t.renderers[a.name]=function(...l){let c=a.renderer.apply(this,l);return c===!1&&(c=i.apply(this,l)),c}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),s.extensions=t),n.renderer){let a=this.defaults.renderer||new hs(this.defaults);for(let i in n.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,c=n.renderer[l],o=a[l];a[l]=(...f)=>{let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h||""}}s.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new ps(this.defaults);for(let i in n.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,c=n.tokenizer[l],o=a[l];a[l]=(...f)=>{let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h}}s.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new La;for(let i in n.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,c=n.hooks[l],o=a[l];La.passThroughHooks.has(i)?a[l]=f=>{if(this.defaults.async&&La.passThroughHooksRespectAsync.has(i))return(async()=>{let w=await c.call(a,f);return o.call(a,w)})();let h=c.call(a,f);return o.call(a,h)}:a[l]=(...f)=>{if(this.defaults.async)return(async()=>{let w=await c.apply(a,f);return w===!1&&(w=await o.apply(a,f)),w})();let h=c.apply(a,f);return h===!1&&(h=o.apply(a,f)),h}}s.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let c=[];return c.push(i.call(this,l)),a&&(c=c.concat(a.call(this,l))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return vn.lex(e,t??this.defaults)}parser(e,t){return _n.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},a={...this.defaults,...s},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let l=a.hooks?await a.hooks.preprocess(t):t,c=await(a.hooks?await a.hooks.provideLexer(e):e?vn.lex:vn.lexInline)(l,a),o=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(o,a.walkTokens));let f=await(a.hooks?await a.hooks.provideParser(e):e?_n.parse:_n.parseInline)(o,a);return a.hooks?await a.hooks.postprocess(f):f})().catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let l=(a.hooks?a.hooks.provideLexer(e):e?vn.lex:vn.lexInline)(t,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let c=(a.hooks?a.hooks.provideParser(e):e?_n.parse:_n.parseInline)(l,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+Dn(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},Ir=new zd;function we(e,t){return Ir.parse(e,t)}we.options=we.setOptions=function(e){return Ir.setOptions(e),we.defaults=Ir.defaults,Zo(we.defaults),we};we.getDefaults=xi;we.defaults=Or;we.use=function(...e){return Ir.use(...e),we.defaults=Ir.defaults,Zo(we.defaults),we};we.walkTokens=function(e,t){return Ir.walkTokens(e,t)};we.parseInline=Ir.parseInline;we.Parser=_n;we.parser=_n.parse;we.Renderer=hs;we.TextRenderer=Li;we.Lexer=vn;we.lexer=vn.lex;we.Tokenizer=ps;we.Hooks=La;we.parse=we;we.options;we.setOptions;we.use;we.walkTokens;we.parseInline;_n.parse;vn.lex;function Zr(e){return Vf.sanitize(we.parse(e,{async:!1,breaks:!0,gfm:!0}))}function Ln(e){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(new Date(e))}var $d=D(''),Fd=D(`
    cc
    ClickClack OpenClaw workspace chat

    Welcome back.

    Workspace chat for the OpenClaw crew. Sign in with the GitHub account that's a member of the org.

    Limited to active members of the OpenClaw org.

    `),Ud=D(''),Hd=D('
    '),Bd=D('
    '),qd=D(''),Gd=D(''),Wd=D(''),jd=D(''),Zd=D(''),Yd=D(''),Xd=D(''),Vd=D(''),Kd=D(''),Jd=D(''),Qd=D('

    '),ep=D('

    '),tp=D('

    ClickClack

    '),np=D(''),rp=D(''),ap=D(''),sp=D('
    '),ip=D('
    Send a message in Markdown — code fences, lists, links all work. Threads open from any message.
    '),lp=D('
    '),op=D(''),cp=D(" "),up=D(' '),fp=D(' '),dp=D(''),pp=D(''),hp=D('',2),vp=D(' '),_p=D('
    '),gp=D('
    '),mp=D('
    ',1),bp=D(''),kp=D('
    GIFs
    '),wp=D(''),yp=D('
    '),xp=D('
    Replying to
    '),Tp=D(''),Ep=D(" "),Sp=D(''),Ap=D('',2),Rp=D(' '),Cp=D('
    '),Ip=D(''),Lp=D(" "),Dp=D(' '),Op=D(' '),Mp=D(''),Np=D(''),Pp=D('',2),zp=D(' '),$p=D('
    '),Fp=D('
    '),Up=D('
    Replying to
    '),Hp=D('

    Thread

    ',1),Bp=D(''),qp=D(" "),Gp=D(''),Wp=D(''),jp=D(''),Zp=D('

    Profile

    Active
    Contact information
    Handle
    User ID
    About

    ',1),Yp=D('
    No thread open Hover any message and tap the bubble to keep side conversations tidy.
    '),Xp=D(''),Vp=D("

    "),Kp=D(''),Jp=D(''),Qp=D('

    Enter to send · Shift+Enter for newline · Markdown supported
    ',1);function eh(e,t){di(t,!1);const n=Z(),s=Z(),a=Z(),i=Z(),l=Z(),c=Z(),o=Z();let f=Z(null),h=Z([]),w=Z([]),m=Z([]),E=Z([]),T=Z([]),L=Z(""),S=Z(""),z=Z(""),R=Z(null),te=Z(null),C=Z(null),oe=Z(null),ve=Z(""),Ae=Z(""),nt=Z(""),rt=Z(""),Te=Z(""),Ee=Z(""),Re=Z([]),Se=Z(null),At=Z(!1),wn=Z(!1),zn=Z(""),zt=Z(""),nn=Z(""),Kn=Z(""),$n=Z(""),De=Z(!1),$t=Z("loading"),Fe=Z(!1),yn=null,_e=Z(!1),rn,an=Z(null),Rt=Z(!1),Fn=Z(!1),sn=Z(!1),pe=Z(null),Je=Z(null),Ft=Z(null),ln=Z(null),Oe=Z("message");const la=[{title:"Ship it",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYjJ1bm1meHE4N2x3bnN0djJkMWtjNGc5bXYzZDFiOHBsbG16M3F0ZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/l0HlHFRbmaZtBRhXG/giphy.gif",tags:["ship","launch","done"]},{title:"Approved",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExazBpbzJ6ODZ3bXQ3OHBvNGJidWZoajc0cHV6YnVub3MzZ3c1a2Z2dSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/111ebonMs90YLu/giphy.gif",tags:["yes","approved","nice"]},{title:"Deploy dance",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExY3NkaTVmZW9ydWNnZnl0ZWQ5aHQyeGNrd2k3NG4wZWNqYzNmd3k1ZCZlcD12MV9naWZzX3NlYXJjaCZjdD1n/GeimqsH0TLDt4tScGw/giphy.gif",tags:["deploy","dance","celebrate"]},{title:"Looking",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYWZ3emE0dm5mN2h0bGVsY2w0OXBodGd2cGJlNDRiZXo1YWNtdWRmZyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/26n6WywJyh39n1pBu/giphy.gif",tags:["search","looking","debug"]},{title:"Typing faster",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOWFlbnJnbnIzbHYxcDIzdXZ3NGF3N2FocHNvMmR5enU3bHpycHBlZSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/13HgwGsXF0aiGY/giphy.gif",tags:["typing","code","work"]},{title:"Tiny victory",url:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExdjJ2b2tqNmF4dG16NjE0eXhuc3h5bTlvamgwNTR0Zmd6ZjhtM2JuaSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/3o7abKhOpu0NwenH3O/giphy.gif",tags:["win","victory","celebrate"]}];Ho(()=>{oa()}),xf(()=>{const d=yn;yn=null,g(_e,!1),d?.close(),rn&&window.clearTimeout(rn)});async function oa(){try{const d=await lt("/api/me");g(f,d.user),await Nr(),g($t,"ready")}catch(d){if(d instanceof Bo&&(d.status===401||d.status===403)){g(Fe,!0),g($t,"auth");return}g($t,d instanceof Error?d.message:"Could not load ClickClack")}}function on(){r(f)&&(g(zt,r(f).display_name),g(nn,r(f).handle?`@${r(f).handle}`:""),g(Kn,r(f).avatar_url),g($n,""),g(De,!1),g(wn,!0))}async function Mr(){g($n,""),g(De,!1);try{const d=await lt("/api/me",{method:"PATCH",body:JSON.stringify({display_name:r(zt),handle:r(nn),avatar_url:r(Kn)})});g(f,d.user),g(E,r(E).map(b=>b.author?.id===r(f)?.id?{...b,author:d.user}:b)),g(T,r(T).map(b=>b.author?.id===r(f)?.id?{...b,author:d.user}:b)),r(R)?.author?.id===r(f).id&&g(R,{...r(R),author:d.user}),g($n,"Saved"),g(wn,!1)}catch(d){g($n,d instanceof Error?d.message:"Could not save profile"),g(De,!0)}}async function Nr(){const d=await lt("/api/workspaces");g(h,d.workspaces),g(L,r(L)||r(h)[0]?.id||""),await hr(),await Tn(),r(h).length===0&&g($t,"create a workspace"),er()}async function qa(){if(!r(nt).trim())return;const d=await lt("/api/workspaces",{method:"POST",body:JSON.stringify({name:r(nt)})});g(nt,""),g(Rt,!1),g(h,[...r(h),d.workspace]),g(L,d.workspace.id),await hr(),await Tn(),er()}async function hr(){if(!r(L))return;const d=await lt(`/api/workspaces/${r(L)}/channels`);g(w,d.channels),g(S,r(w).find(b=>b.id===r(S))?.id||r(w)[0]?.id||""),g(R,null),g(C,null),g(Oe,"message"),g(T,[]),await vt()}async function Ga(){if(!r(L)||!r(rt).trim())return;const d=await lt(`/api/workspaces/${r(L)}/channels`,{method:"POST",body:JSON.stringify({name:r(rt),kind:"public"})});g(rt,""),g(w,[...r(w),d.channel]),g(S,d.channel.id),g(z,""),await vt()}async function vt(){if(r(z)){const b=await lt(`/api/dms/${r(z)}/messages`);g(E,b.messages),await Un();return}if(!r(S)){g(E,[]);return}const d=await lt(`/api/channels/${r(S)}/messages`);g(E,d.messages),await Un()}async function Un(){await ti(),r(an)&&Hu(an,r(an).scrollTop=r(an).scrollHeight)}async function Hn(){const d=r(ve).trim();if(!d)return;if(!r(S)&&!r(z)){g($t,"pick or create a channel");return}const b=r(z)?"dm":"channel",N=r(pe)&&r(Je)===b?r(pe):null;g(ve,"");const Q=r(z)?`/api/dms/${r(z)}/messages`:`/api/channels/${r(S)}/messages`,be={body:d};N&&(be.quoted_message_id=N.id);const ae=await lt(Q,{method:"POST",body:JSON.stringify(be)});let Ge=ae.message;if(N&&_t(),r(Se)){const Bt=r(Se);await lt(`/api/messages/${ae.message.id}/attachments`,{method:"POST",body:JSON.stringify({upload_id:Bt.id})}),g(Se,null),Ge={...Ge,attachments:[...Ge.attachments||[],Bt]}}r(E).some(Bt=>Bt.id===Ge.id)?g(E,r(E).map(Bt=>Bt.id===Ge.id?Ge:Bt)):g(E,[...r(E),Ge]),await Un()}async function Ct(d){g(C,null),g(R,d),g(Oe,"thread");const b=await lt(`/api/messages/${d.id}/thread`);g(R,b.root),g(T,b.replies),g(te,b.thread_state)}async function Pr(){const d=r(Ae).trim();if(!d||!r(R))return;const b=r(pe)&&r(Je)==="thread"?r(pe):null;g(Ae,"");const N={body:d};b&&(N.quoted_message_id=b.id);const Q=await lt(`/api/messages/${r(R).id}/thread/replies`,{method:"POST",body:JSON.stringify(N)});b&&_t(),r(T).some(be=>be.id===Q.message.id)||g(T,[...r(T),Q.message]),g(te,Q.thread_state)}function zr(d,b){g(pe,d),g(Je,b),g(Oe,b==="thread"?"thread":"message")}const Wa=new Set(["button","checkbox","combobox","link","listbox","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","option","radio","radiogroup","slider","spinbutton","switch","tab","tablist","textbox","tree","treeitem"]),ca=new Set(["INPUT","TEXTAREA","SELECT","BUTTON","A","DETAILS","SUMMARY","VIDEO","AUDIO"]);function ua(){return r(oe)!==null||r(wn)}function $r(d){if(!d)return!1;if(d.isContentEditable)return!0;if(d instanceof HTMLInputElement){const b=(d.type||"text").toLowerCase();return b!=="checkbox"&&b!=="radio"&&b!=="button"&&b!=="submit"&&b!=="reset"&&b!=="file"}return d instanceof HTMLTextAreaElement}function Fr(d){if(!d||Ut(d))return!1;if(ca.has(d.tagName))return!0;const b=d.getAttribute("role");if(b&&Wa.has(b))return!0;const N=d.getAttribute("tabindex");return!!(N!==null&&N!=="-1"&&d.hasAttribute("aria-keyshortcuts"))}function Ut(d){if(!d.closest(".messages, .thread"))return!1;if(d instanceof HTMLButtonElement||d instanceof HTMLAnchorElement)return!0;const b=d.getAttribute("role");return b==="button"||b==="link"}function Jn(){const d=typeof window<"u"?window.getSelection():null;if(!d||d.isCollapsed||d.rangeCount===0)return!1;const b=d.getRangeAt(0).commonAncestorContainer;return b?!!(b.nodeType===Node.ELEMENT_NODE?b:b.parentElement)?.closest(".messages, .thread, .markdown"):!1}function fa(d){if(r(Fe)||ua()||d.defaultPrevented||d.isComposing||d.keyCode===229||d.ctrlKey||d.metaKey||d.altKey||d.key.length!==1||Jn())return!1;const b=document.activeElement;return!(b===r(Ft)||b===r(ln)||$r(b)||Fr(b))}function da(d){if(!fa(d))return;const b=ws();if(!b||b.disabled||b.readOnly)return;d.key===" "&&d.preventDefault(),b.focus({preventScroll:!0});const N=b.value.length;if(b.setSelectionRange(N,N),d.key===" "){const Q=b.selectionStart??N,be=b.selectionEnd??N;b.setRangeText(" ",Q,be,"end"),b.dispatchEvent(new Event("input",{bubbles:!0}))}}function ws(){return r(Oe)==="thread"&&r(R)&&r(ln)?r(ln):r(Ft)}function _t(){g(pe,null),g(Je,null)}function Ur(d,b){const N=()=>{const ae=d.style.height;d.style.height="auto";const Ge=`${d.scrollHeight}px`;ae!==Ge?d.style.height=Ge:d.style.height=ae},Q=()=>N(),be=()=>N();return requestAnimationFrame(N),d.addEventListener("input",Q),window.addEventListener("resize",be),{update(){requestAnimationFrame(N)},destroy(){d.removeEventListener("input",Q),window.removeEventListener("resize",be)}}}function Qn(d,b=120){if(!d)return"";const N=d.replace(/\s+/g," ").trim();return N.length>b?N.slice(0,b-1)+"…":N}function xn(d){return d.quoted_author?.display_name||"Unknown"}async function ja(d){const b=d.quoted_message_id;if(!b)return;await ti();const N=document.querySelector(`[data-message-id="${CSS.escape(b)}"]`);N&&(N.scrollIntoView({behavior:"smooth",block:"center"}),N.classList.add("highlight"),window.setTimeout(()=>N.classList.remove("highlight"),1500))}async function ys(){if(!r(L)||!r(Ee).trim()){g(Re,[]);return}const d=await lt(`/api/search?workspace_id=${encodeURIComponent(r(L))}&q=${encodeURIComponent(r(Ee).trim())}`);g(Re,d.results)}async function Ue(d){const b=d.currentTarget,N=b.files?.[0];if(!N||!r(L))return;const Q=new FormData;Q.set("workspace_id",r(L)),Q.set("file",N);const be=await lt("/api/uploads",{method:"POST",body:Q});g(Se,be.upload),b.value=""}async function Tn(){if(!r(L))return;const d=await lt(`/api/dms?workspace_id=${r(L)}`);g(m,d.conversations)}async function xs(){if(!r(L)||!r(Te).trim())return;const d=await lt("/api/dms",{method:"POST",body:JSON.stringify({workspace_id:r(L),member_ids:[r(Te).trim()]})});g(Te,""),g(m,[...r(m),d.conversation]),g(z,d.conversation.id),g(S,""),g(R,null),g(C,null),g(Oe,"message"),await vt()}async function Za(d){if(!r(L)||!d)return;const b=r(m).find(Q=>Q.members.some(be=>be.id===d));if(b){g(z,b.id),g(S,""),g(R,null),g(C,null),g(Oe,"message"),await vt();return}const N=await lt("/api/dms",{method:"POST",body:JSON.stringify({workspace_id:r(L),member_ids:[d]})});g(m,[...r(m),N.conversation]),g(z,N.conversation.id),g(S,""),g(R,null),g(C,null),g(Oe,"message"),await vt()}function er(){rn&&window.clearTimeout(rn);const d=yn;if(yn=null,g(_e,!1),d?.close(),!r(L))return;const b=localStorage.getItem(`clickclack:${r(L)}:cursor`)||"",N=new URL("/api/realtime/ws",window.location.href);N.protocol=window.location.protocol==="https:"?"wss:":"ws:",N.searchParams.set("workspace_id",r(L)),b&&N.searchParams.set("after_cursor",b);const Q=new WebSocket(N);yn=Q,Q.addEventListener("open",()=>{yn===Q&&g(_e,!0)}),Q.addEventListener("message",be=>{const ae=JSON.parse(String(be.data));ae.cursor&&localStorage.setItem(`clickclack:${r(L)}:cursor`,ae.cursor),Ya(ae)}),Q.addEventListener("close",()=>{yn===Q&&(g(_e,!1),rn=window.setTimeout(er,1200))})}async function Ya(d){if((d.type==="channel.created"||d.type==="channel.updated")&&d.workspace_id===r(L)){await hr();return}(d.channel_id===r(S)||d.payload.direct_conversation_id===r(z))&&(d.type==="message.created"||d.type==="message.updated"||d.type==="message.deleted")&&await vt();const b=d.payload.root_message_id||d.payload.message_id;r(R)&&b===r(R).id&&await Ct(r(R))}function Xa(d){const b=d.trim();if(!b)return"?";const N=b.split(/\s+/);return N.length>=2?(N[0][0]+N[1][0]).toUpperCase():b.slice(0,2).toUpperCase()}function cn(d){if(!d)return"?";const b=d.trim();return b?b[0].toUpperCase():"?"}function Be(d){return d?`@${d}`:""}function Ht(d){return d.members.find(b=>b.id!==r(f)?.id)||d.members[0]}function Va(d,b,N){const Q=new Map;for(const be of b)for(const ae of be.members)ae.id&&ae.id!==N&&Q.set(ae.id,ae);for(const be of[...d].reverse()){const ae=be.author;ae?.id&&ae.id!==N&&Q.set(ae.id,ae)}return[...Q.values()].slice(0,12)}function Ka(d){return r(m).find(b=>b.members.some(N=>N.id===d))}function vr(d){d&&(g(R,null),g(C,d))}function It(d){let b=0;for(let N=0;N>>0;return b%360}function un(d){const b=new Date(d),N=new Date,Q=new Date;Q.setDate(N.getDate()-1);const be=(ae,Ge)=>ae.getFullYear()===Ge.getFullYear()&&ae.getMonth()===Ge.getMonth()&&ae.getDate()===Ge.getDate();return be(b,N)?"Today":be(b,Q)?"Yesterday":new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(b)}function Ja(d){const b=[];let N="",Q="",be=0;for(const ae of d){const Ge=new Date(ae.created_at),Bt=Ge.toDateString(),Br=ae.author?.id||ae.author_id||"local",pa=Bt!==N,ns=Br!==Q,Es=Ge.getTime()-be>300*1e3;pa||ns||Es||b.length===0?b.push({key:ae.id,dayLabel:pa?un(ae.created_at):null,messages:[ae],authorName:ae.author?.display_name||"Local User",authorHandle:ae.author?.handle||"",authorAvatarURL:ae.author?.avatar_url||"",authorID:Br,timestamp:ae.created_at}):b[b.length-1].messages.push(ae),N=Bt,Q=Br,be=Ge.getTime()}return b}function _r(d){const b=d.members.filter(Q=>Q.id!==r(f)?.id);return(b.length>0?b:d.members).map(Q=>Q.display_name).join(", ")}function Ts(d){if(d.key==="Escape"&&r(pe)&&r(Je)!=="thread"){d.preventDefault(),_t();return}d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),Hn())}function Qa(d){if(d.key==="Escape"&&r(pe)&&r(Je)==="thread"){d.preventDefault(),_t();return}d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),Pr())}function Ve(d){return`/api/uploads/${encodeURIComponent(d.id)}`}function gr(d,b){g(oe,{url:d,title:b})}function B(d){const b=d.target;b instanceof HTMLImageElement&&b.closest(".markdown")&&(d.preventDefault(),gr(b.currentSrc||b.src,b.alt||"Image"))}function u(d){return d.content_type.startsWith("image/")}function x(d){return d.content_type.startsWith("video/")}function M(d){return d<1024?`${d} B`:d<1024*1024?`${Math.round(d/1024)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`}function ge(d){const b=r(ve)&&!r(ve).endsWith(` +`)?` +`:"";g(ve,`${r(ve)}${b}${d}`)}function He(d,b=d){ge(`${d}${d==="```"?` +code +`:"text"}${b}`)}function Ne(d,b){ge(`![${b}](${d})`),g(At,!1),g(zn,"")}function ut(d){return r(R)?.id===d.id?"Open":"Thread"}function ft(){r(Je)==="thread"&&_t(),g(R,null),g(C,null),g(Oe,"message"),g(T,[])}function Qe(){g(oe,null),g(wn,!1)}Rn(()=>(r(h),r(L)),()=>{g(n,r(h).find(d=>d.id===r(L)))}),Rn(()=>(r(w),r(S)),()=>{g(s,r(w).find(d=>d.id===r(S)))}),Rn(()=>(r(m),r(z)),()=>{g(a,r(m).find(d=>d.id===r(z)))}),Rn(()=>(r(R),r(C)),()=>{g(i,r(R)!==null||r(C)!==null)}),Rn(()=>r(E),()=>{g(l,Ja(r(E)))}),Rn(()=>(r(E),r(m),r(f)),()=>{g(c,Va(r(E),r(m),r(f)?.id||""))}),Rn(()=>(r(Je),r(pe),r(E)),()=>{r(Je)==="channel"&&r(pe)&&!r(E).some(d=>d.id===r(pe)?.id)&&_t()}),Rn(()=>(r(Je),r(pe),r(E)),()=>{r(Je)==="dm"&&r(pe)&&!r(E).some(d=>d.id===r(pe)?.id)&&_t()}),Rn(()=>(r(Je),r(pe),r(R),r(T)),()=>{r(Je)==="thread"&&r(pe)&&r(R)&&r(pe).id!==r(R).id&&!r(T).some(d=>d.id===r(pe)?.id)&&_t()}),Rn(()=>r(zn),()=>{g(o,la.filter(d=>{const b=r(zn).trim().toLowerCase();return!b||d.title.toLowerCase().includes(b)||d.tags.some(N=>N.includes(b))}))}),Vu(),Uo();var Hr=Ra();Fo("1oa2eo8",d=>{var b=$d();A(d,b)}),Cn("keydown",Qs,d=>{if(d.key==="Escape"){if(ua())Qe();else if(r(pe)){d.preventDefault(),_t();return}}da(d)});var qe=Yn(Hr);{var es=d=>{var b=Fd();A(d,b)},ts=d=>{var b=Qp(),N=Yn(b);let Q;var be=p(N),ae=p(be);{var Ge=y=>{var k=mt("×");A(y,k)},Bt=y=>{var k=Ud();A(y,k)};j(ae,y=>{r(sn)?y(Ge):y(Bt,-1)})}var Br=_(be,2),pa=_(p(Br),4),ns=p(pa);Nt(ns,1,()=>r(h),y=>y.id,(y,k)=>{var U=Hd();let X;var ie=p(U),se=p(ie),ee=p(se);P(le=>{X=Mt(U,1,"guild-wrap",null,X,{active:r(k).id===r(L)}),$(ie,"title",(r(k),v(()=>r(k).name))),I(ee,le)},[()=>(r(k),v(()=>Xa(r(k).name)))]),G("click",ie,async()=>{g(L,r(k).id),await hr(),await Tn(),er()}),A(y,U)});var Es=_(ns,2),rc=_(pa,2);{var ac=y=>{var k=Bd(),U=p(k);Cn("submit",k,X=>{X.preventDefault(),qa()}),In(U,()=>r(nt),X=>g(nt,X)),A(y,k)};j(rc,y=>{r(Rt)&&y(ac)})}var Di=_(Br,2),Oi=p(Di),Mi=p(Oi),Ni=p(Mi),sc=p(Ni),Pi=_(Ni,2);let zi;var ic=p(Pi),rs=_(Mi,2),lc=p(rs),oc=p(lc),$i=_(Oi,2),Fi=p($i),Ui=_(p(Fi),2),Hi=p(Ui);Nt(Hi,1,()=>r(w),y=>y.id,(y,k)=>{var U=qd();let X;var ie=_(p(U),2),se=p(ie);P(()=>{X=Mt(U,1,"nav-item channel",null,X,{active:r(k).id===r(S)&&!r(z)}),I(se,(r(k),v(()=>r(k).name)))}),G("click",U,async()=>{g(S,r(k).id),g(z,""),g(R,null),g(C,null),g(Oe,"message"),g(sn,!1),await vt()}),A(y,U)});var cc=_(Hi,2);{var uc=y=>{var k=Gd();A(y,k)};j(cc,y=>{r(w),v(()=>r(w).length===0)&&y(uc)})}var Bi=_(Ui,2),fc=p(Bi),qi=_(Fi,2),Gi=_(p(qi),2),Wi=p(Gi);Nt(Wi,1,()=>r(m),y=>y.id,(y,k)=>{var U=jd();let X;var ie=p(U),se=p(ie);{var ee=F=>{var K=Wd();P(Pe=>$(K,"src",Pe),[()=>(r(k),v(()=>Ht(r(k))?.avatar_url))]),A(F,K)},le=ar(()=>(r(k),v(()=>Ht(r(k))?.avatar_url))),H=F=>{var K=mt();P(Pe=>I(K,Pe),[()=>(r(k),v(()=>cn(Ht(r(k))?.display_name)))]),A(F,K)};j(se,F=>{r(le)?F(ee):F(H,-1)})}var he=_(ie,2),Ce=p(he);P((F,K)=>{X=Mt(U,1,"nav-item dm",null,X,{active:r(k).id===r(z)}),Zn(ie,`--hue: ${F??""}deg`),I(Ce,K)},[()=>(r(k),v(()=>It(Ht(r(k))?.id||r(k).id))),()=>(r(k),v(()=>_r(r(k))))]),G("click",U,async()=>{g(z,r(k).id),g(S,""),g(R,null),g(C,null),g(Oe,"message"),g(sn,!1),await vt()}),A(y,U)});var dc=_(Wi,2);{var pc=y=>{var k=Zd();A(y,k)};j(dc,y=>{r(m),v(()=>r(m).length===0)&&y(pc)})}var ji=_(Gi,2),hc=p(ji),vc=_(qi,2),_c=_(p(vc),2),Zi=p(_c);Nt(Zi,1,()=>r(c),y=>y.id,(y,k)=>{const U=gi(()=>(r(k),v(()=>Ka(r(k).id))));var X=Xd();let ie;var se=p(X),ee=p(se);{var le=F=>{var K=Yd();P(()=>$(K,"src",(r(k),v(()=>r(k).avatar_url)))),A(F,K)},H=F=>{var K=mt();P(Pe=>I(K,Pe),[()=>(r(k),v(()=>cn(r(k).display_name)))]),A(F,K)};j(ee,F=>{r(k),v(()=>r(k).avatar_url)?F(le):F(H,-1)})}var he=_(se,2),Ce=p(he);P(F=>{ie=Mt(X,1,"nav-item dm",null,ie,{active:r(U)?.id===r(z)||r(C)?.id===r(k).id}),Zn(se,`--hue: ${F??""}deg`),I(Ce,(r(k),v(()=>r(k).display_name)))},[()=>(r(k),v(()=>It(r(k).id)))]),G("click",X,async()=>{r(U)?(g(z,r(U).id),g(S,""),g(R,null),g(C,null),g(Oe,"message"),g(sn,!1),await vt()):vr(r(k))}),A(y,X)});var gc=_(Zi,2);{var mc=y=>{var k=Vd();A(y,k)};j(gc,y=>{r(c),v(()=>r(c).length===0)&&y(mc)})}var bc=_($i,2);{var kc=y=>{var k=Jd(),U=p(k),X=p(U);{var ie=F=>{var K=Kd();P(()=>$(K,"src",(r(f),v(()=>r(f).avatar_url)))),A(F,K)},se=F=>{var K=mt();P(Pe=>I(K,Pe),[()=>(r(f),v(()=>cn(r(f).display_name)))]),A(F,K)};j(X,F=>{r(f),v(()=>r(f).avatar_url)?F(ie):F(se,-1)})}var ee=_(U,2),le=p(ee),H=p(le),he=_(le,2),Ce=p(he);P((F,K,Pe)=>{$(k,"aria-label",F),Zn(U,`--hue: ${K??""}deg`),I(H,(r(f),v(()=>r(f).display_name))),I(Ce,Pe)},[()=>(r(f),v(()=>`Account settings for ${r(f).display_name} ${Be(r(f).handle)}`)),()=>(r(f),v(()=>It(r(f).id))),()=>(r(f),r(_e),v(()=>r(f).handle?Be(r(f).handle):r(_e)?"Active":"Reconnecting…"))]),G("click",k,on),G("contextmenu",k,F=>{F.preventDefault(),on()}),A(y,k)};j(bc,y=>{r(f)&&y(kc)})}var Yi=_(Di,2),Xi=p(Yi),Vi=p(Xi),Ki=p(Vi);{var wc=y=>{var k=Qd(),U=p(k);P(X=>I(U,X),[()=>(r(a),v(()=>`@${_r(r(a))}`))]),A(y,k)},yc=y=>{var k=ep(),U=p(k);P(()=>I(U,(r(s),v(()=>`#${r(s).name}`)))),A(y,k)},xc=y=>{var k=tp();A(y,k)};j(Ki,y=>{r(a)?y(wc):r(s)?y(yc,1):y(xc,-1)})}var Tc=_(Ki,4),Ec=p(Tc),Ss=_(Vi,2),Ji=_(p(Ss),2),Sc=_(Ji,2);{var Ac=y=>{var k=np();G("click",k,()=>{g(Ee,""),g(Re,[])}),A(y,k)};j(Sc,y=>{r(Ee)&&y(Ac)})}var Rc=_(Ss,2),ha=p(Rc);let Qi;var Cc=_(ha,2),el=_(Xi,2);{var Ic=y=>{var k=sp(),U=p(k),X=p(U),ie=p(X),se=_(X,2),ee=_(U,2);Nt(ee,1,()=>r(Re),le=>le.message.id,(le,H)=>{var he=ap(),Ce=p(he),F=p(Ce);{var K=Ie=>{var et=rp();P(()=>$(et,"src",(r(H),v(()=>r(H).message.author.avatar_url)))),A(Ie,et)},Pe=Ie=>{var et=mt();P(En=>I(et,En),[()=>(r(H),v(()=>cn(r(H).message.author?.display_name)))]),A(Ie,et)};j(F,Ie=>{r(H),v(()=>r(H).message.author?.avatar_url)?Ie(K):Ie(Pe,-1)})}var qt=_(Ce,2),Gt=p(qt),fn=p(Gt),dn=p(fn),Bn=_(fn,2),me=p(Bn),q=_(Gt,2),at=p(q);P((Ie,et)=>{Zn(Ce,`--hue: ${Ie??""}deg`),I(dn,(r(H),v(()=>r(H).message.author?.display_name||"Local User"))),I(me,et),I(at,(r(H),v(()=>r(H).message.body)))},[()=>(r(H),v(()=>It(r(H).message.author?.id||r(H).message.author_id||"x"))),()=>(hn(Ln),r(H),v(()=>Ln(r(H).message.created_at)))]),G("click",he,async()=>{g(Re,[]),r(H).message.channel_id&&(g(S,r(H).message.channel_id),g(z,""),await vt()),r(H).message.direct_conversation_id&&(g(z,r(H).message.direct_conversation_id),g(S,""),await vt())}),A(le,he)}),P(()=>I(ie,`${r(Re),v(()=>r(Re).length)??""} ${r(Re),v(()=>r(Re).length===1?"result":"results")??""}`)),G("click",se,()=>{g(Re,[])}),A(y,k)};j(el,y=>{r(Re),v(()=>r(Re).length>0)&&y(Ic)})}var va=_(el,2),tl=p(va);{var Lc=y=>{var k=ip(),U=p(k),X=p(U);{var ie=F=>{var K=mt("@");A(F,K)},se=F=>{var K=mt("#");A(F,K)};j(X,F=>{r(a)?F(ie):F(se,-1)})}var ee=_(U,2),le=p(ee);{var H=F=>{var K=mt();P(Pe=>I(K,`This is the start of your conversation with ${Pe??""}.`),[()=>(r(a),v(()=>_r(r(a))))]),A(F,K)},he=F=>{var K=mt();P(()=>I(K,`Welcome to #${r(s),v(()=>r(s).name)??""}!`)),A(F,K)},Ce=F=>{var K=mt("Pick a channel to get started.");A(F,K)};j(le,F=>{r(a)?F(H):r(s)?F(he,1):F(Ce,-1)})}A(y,k)};j(tl,y=>{r(E),v(()=>r(E).length===0)&&y(Lc)})}var Dc=_(tl,2);Nt(Dc,1,()=>r(l),y=>y.key,(y,k)=>{var U=mp(),X=Yn(U);{var ie=me=>{var q=lp(),at=p(q),Ie=p(at);P(()=>I(Ie,(r(k),v(()=>r(k).dayLabel)))),A(me,q)};j(X,me=>{r(k),v(()=>r(k).dayLabel)&&me(ie)})}var se=_(X,2),ee=p(se),le=p(ee);{var H=me=>{var q=op();P(()=>$(q,"src",(r(k),v(()=>r(k).authorAvatarURL)))),A(me,q)},he=me=>{var q=mt();P(at=>I(q,at),[()=>(r(k),v(()=>cn(r(k).authorName)))]),A(me,q)};j(le,me=>{r(k),v(()=>r(k).authorAvatarURL)?me(H):me(he,-1)})}var Ce=_(ee,2),F=p(Ce),K=p(F),Pe=p(K),qt=_(K,2);{var Gt=me=>{var q=cp(),at=p(q);P(Ie=>I(at,Ie),[()=>(r(k),v(()=>Be(r(k).authorHandle)))]),A(me,q)};j(qt,me=>{r(k),v(()=>r(k).authorHandle)&&me(Gt)})}var fn=_(qt,2),dn=p(fn),Bn=_(F,2);Nt(Bn,3,()=>(r(k),v(()=>r(k).messages)),me=>me.id,(me,q,at)=>{var Ie=gp();let et;var En=p(Ie),tr=p(En),qn=_(En,2),ye=p(qn);{var st=Lt=>{var V=dp();let O;var W=_(p(V),2),Y=p(W),jt=p(Y),ce=_(Y,2);{var ke=Ke=>{var dt=up(),it=p(dt);P(xe=>I(it,xe),[()=>(r(q),v(()=>Qn(r(q).quoted_body_snapshot)))]),A(Ke,dt)},Dt=Ke=>{var dt=fp(),it=p(dt);P(xe=>I(it,`[original deleted] ${xe??""}`),[()=>(r(q),v(()=>Qn(r(q).quoted_body_snapshot)))]),A(Ke,dt)};j(ce,Ke=>{r(q),v(()=>r(q).quoted_message_id)?Ke(ke):Ke(Dt,-1)})}P((Ke,dt)=>{O=Mt(V,1,"quote-block",null,O,{dangling:!r(q).quoted_message_id}),V.disabled=(r(q),v(()=>!r(q).quoted_message_id)),$(V,"aria-label",Ke),I(jt,dt)},[()=>(r(q),v(()=>r(q).quoted_message_id?`Jump to quoted message from ${xn(r(q))}`:"Original message was deleted")),()=>(r(q),v(()=>xn(r(q))))]),G("click",V,()=>ja(r(q))),A(Lt,V)};j(ye,Lt=>{r(q),v(()=>r(q).quoted_message_id||r(q).quoted_body_snapshot)&&Lt(st)})}var Wt=_(ye,2);$s(Wt,()=>(hn(Zr),r(q),v(()=>Zr(r(q).body))),!0);var nr=_(Wt,2);{var qr=Lt=>{var V=_p();Nt(V,5,()=>(r(q),v(()=>r(q).attachments)),O=>O.id,(O,W)=>{var Y=Ra(),jt=Yn(Y);{var ce=it=>{var xe=pp(),Me=p(xe),We=_(Me,2),pt=p(We);P(xt=>{$(xe,"aria-label",(r(W),v(()=>`Open image ${r(W).filename}`))),$(Me,"src",xt),$(Me,"alt",(r(W),v(()=>r(W).filename))),I(pt,(r(W),v(()=>r(W).filename)))},[()=>(r(W),v(()=>Ve(r(W))))]),G("click",xe,()=>gr(Ve(r(W)),r(W).filename)),A(it,xe)},ke=ar(()=>(r(W),v(()=>u(r(W))))),Dt=it=>{var xe=hp(),Me=p(xe),We=p(Me),pt=_(Me,2),xt=p(pt);P((Zt,Gn)=>{$(Me,"aria-label",(r(W),v(()=>r(W).filename))),$(We,"src",Zt),$(We,"type",(r(W),v(()=>r(W).content_type))),$(pt,"href",Gn),I(xt,(r(W),v(()=>r(W).filename)))},[()=>(r(W),v(()=>Ve(r(W)))),()=>(r(W),v(()=>Ve(r(W))))]),A(it,xe)},Ke=ar(()=>(r(W),v(()=>x(r(W))))),dt=it=>{var xe=vp(),Me=_(p(xe),2),We=p(Me),pt=p(We),xt=_(We,2),Zt=p(xt);P((Gn,rr)=>{$(xe,"href",Gn),I(pt,(r(W),v(()=>r(W).filename))),I(Zt,rr)},[()=>(r(W),v(()=>Ve(r(W)))),()=>(r(W),v(()=>M(r(W).byte_size)))]),A(it,xe)};j(jt,it=>{r(ke)?it(ce):r(Ke)?it(Dt,1):it(dt,-1)})}A(O,Y)}),A(Lt,V)};j(nr,Lt=>{r(q),v(()=>r(q).attachments?.length)&&Lt(qr)})}var _a=_(qn,2),Gr=p(_a),pn=_(Gr,2);P((Lt,V)=>{et=Mt(Ie,1,"message-row",null,et,{selected:r(R)?.id===r(q).id}),$(Ie,"data-message-id",(r(q),v(()=>r(q).id))),I(tr,Lt),$(pn,"data-tooltip",V)},[()=>(hn(r(at)),hn(Ln),r(q),v(()=>r(at)===0?"":Ln(r(q).created_at))),()=>(r(q),v(()=>ut(r(q))))]),G("click",Gr,()=>zr(r(q),r(z)?"dm":"channel")),G("click",pn,()=>Ct(r(q))),A(me,Ie)}),P((me,q)=>{Zn(ee,`--hue: ${me??""}deg`),$(ee,"aria-label",(r(k),v(()=>`View profile for ${r(k).authorName}`))),I(Pe,(r(k),v(()=>r(k).authorName))),I(dn,q)},[()=>(r(k),v(()=>It(r(k).authorID))),()=>(hn(Ln),r(k),v(()=>Ln(r(k).timestamp)))]),G("click",ee,()=>vr(r(k).messages[0]?.author)),G("click",K,()=>vr(r(k).messages[0]?.author)),A(y,U)}),Hs(va,y=>g(an,y),()=>r(an));var nl=_(va,2),rl=p(nl);{var Oc=y=>{var k=kp(),U=p(k),X=_(p(U),2),ie=_(U,2);Nt(ie,5,()=>r(o),se=>se.url,(se,ee)=>{var le=bp(),H=p(le),he=_(H,2),Ce=p(he);P(()=>{$(H,"src",(r(ee),v(()=>r(ee).url))),$(H,"alt",(r(ee),v(()=>r(ee).title))),I(Ce,(r(ee),v(()=>r(ee).title)))}),G("click",le,()=>Ne(r(ee).url,r(ee).title)),A(se,le)}),In(X,()=>r(zn),se=>g(zn,se)),A(y,k)};j(rl,y=>{r(At)&&y(Oc)})}var Mc=_(rl,2),al=p(Mc);{var Nc=y=>{var k=yp(),U=_(p(k),2);{var X=H=>{var he=wp();P(Ce=>{$(he,"src",Ce),$(he,"alt",(r(Se),v(()=>r(Se).filename)))},[()=>(r(Se),v(()=>Ve(r(Se))))]),A(H,he)},ie=ar(()=>(r(Se),v(()=>u(r(Se)))));j(U,H=>{r(ie)&&H(X)})}var se=_(U,2),ee=p(se),le=_(se,2);P(H=>I(ee,`${r(Se),v(()=>r(Se).filename)??""} · ${H??""}`),[()=>(r(Se),v(()=>M(r(Se).byte_size)))]),G("click",le,()=>g(Se,null)),A(y,k)};j(al,y=>{r(Se)&&y(Nc)})}var sl=_(al,2);{var Pc=y=>{var k=xp(),U=_(p(k),2),X=p(U),ie=_(p(X)),se=p(ie),ee=_(X,2),le=p(ee),H=_(U,2);P(he=>{I(se,(r(pe),v(()=>r(pe).author?.display_name||"Local User"))),I(le,he)},[()=>(r(pe),v(()=>Qn(r(pe).body)))]),G("click",H,_t),A(y,k)};j(sl,y=>{r(pe)&&r(Je)===(r(z)?"dm":"channel")&&y(Pc)})}var il=_(sl,2),ll=p(il),zc=p(ll),mr=_(ll,2);Hs(mr,y=>g(Ft,y),()=>r(Ft)),Pa(()=>In(mr,()=>r(ve),y=>g(ve,y))),xl(mr,(y,k)=>Ur?.(y),()=>r(ve));var $c=_(mr,2),Fc=_(il,2),ol=p(Fc),cl=_(ol,2),As=_(cl,2),Uc=p(As);Uc.textContent="<>";var Rs=_(As,2),Hc=p(Rs);Hc.textContent="{}";var ul=_(Rs,2),fl=_(ul,2);let dl;var Cs=_(Yi,2);let pl;var Bc=p(Cs);{var qc=y=>{var k=Hp(),U=Yn(k),X=p(U),ie=_(p(X),2),se=p(ie),ee=_(X,2),le=_(U,2),H=p(le),he=p(H),Ce=p(he);{var F=V=>{var O=Tp();P(()=>$(O,"src",(r(R),v(()=>r(R).author.avatar_url)))),A(V,O)},K=V=>{var O=mt();P(W=>I(O,W),[()=>(r(R),v(()=>cn(r(R).author?.display_name)))]),A(V,O)};j(Ce,V=>{r(R),v(()=>r(R).author?.avatar_url)?V(F):V(K,-1)})}var Pe=_(he,2),qt=p(Pe),Gt=p(qt),fn=p(Gt),dn=_(Gt,2);{var Bn=V=>{var O=Ep(),W=p(O);P(Y=>I(W,Y),[()=>(r(R),v(()=>Be(r(R).author.handle)))]),A(V,O)};j(dn,V=>{r(R),v(()=>r(R).author?.handle)&&V(Bn)})}var me=_(dn,2),q=p(me),at=_(me,2),Ie=_(qt,2);$s(Ie,()=>(hn(Zr),r(R),v(()=>Zr(r(R).body))),!0);var et=_(Ie,2);{var En=V=>{var O=Cp();Nt(O,5,()=>(r(R),v(()=>r(R).attachments)),W=>W.id,(W,Y)=>{var jt=Ra(),ce=Yn(jt);{var ke=xe=>{var Me=Sp(),We=p(Me),pt=_(We,2),xt=p(pt);P(Zt=>{$(Me,"aria-label",(r(Y),v(()=>`Open image ${r(Y).filename}`))),$(We,"src",Zt),$(We,"alt",(r(Y),v(()=>r(Y).filename))),I(xt,(r(Y),v(()=>r(Y).filename)))},[()=>(r(Y),v(()=>Ve(r(Y))))]),G("click",Me,()=>gr(Ve(r(Y)),r(Y).filename)),A(xe,Me)},Dt=ar(()=>(r(Y),v(()=>u(r(Y))))),Ke=xe=>{var Me=Ap(),We=p(Me),pt=p(We),xt=_(We,2),Zt=p(xt);P((Gn,rr)=>{$(We,"aria-label",(r(Y),v(()=>r(Y).filename))),$(pt,"src",Gn),$(pt,"type",(r(Y),v(()=>r(Y).content_type))),$(xt,"href",rr),I(Zt,(r(Y),v(()=>r(Y).filename)))},[()=>(r(Y),v(()=>Ve(r(Y)))),()=>(r(Y),v(()=>Ve(r(Y))))]),A(xe,Me)},dt=ar(()=>(r(Y),v(()=>x(r(Y))))),it=xe=>{var Me=Rp(),We=_(p(Me),2),pt=p(We),xt=p(pt),Zt=_(pt,2),Gn=p(Zt);P((rr,Is)=>{$(Me,"href",rr),I(xt,(r(Y),v(()=>r(Y).filename))),I(Gn,Is)},[()=>(r(Y),v(()=>Ve(r(Y)))),()=>(r(Y),v(()=>M(r(Y).byte_size)))]),A(xe,Me)};j(ce,xe=>{r(Dt)?xe(ke):r(dt)?xe(Ke,1):xe(it,-1)})}A(W,jt)}),A(V,O)};j(et,V=>{r(R),v(()=>r(R).attachments?.length)&&V(En)})}var tr=_(H,2),qn=p(tr),ye=p(qn),st=_(tr,2);Nt(st,5,()=>r(T),V=>V.id,(V,O)=>{var W=Fp(),Y=p(W),jt=p(Y);{var ce=je=>{var Ze=Ip();P(()=>$(Ze,"src",(r(O),v(()=>r(O).author.avatar_url)))),A(je,Ze)},ke=je=>{var Ze=mt();P(Sn=>I(Ze,Sn),[()=>(r(O),v(()=>cn(r(O).author?.display_name)))]),A(je,Ze)};j(jt,je=>{r(O),v(()=>r(O).author?.avatar_url)?je(ce):je(ke,-1)})}var Dt=_(Y,2),Ke=p(Dt),dt=p(Ke),it=p(dt),xe=_(dt,2);{var Me=je=>{var Ze=Lp(),Sn=p(Ze);P(ue=>I(Sn,ue),[()=>(r(O),v(()=>Be(r(O).author.handle)))]),A(je,Ze)};j(xe,je=>{r(O),v(()=>r(O).author?.handle)&&je(Me)})}var We=_(xe,2),pt=p(We),xt=_(We,2),Zt=_(Ke,2);{var Gn=je=>{var Ze=Mp();let Sn;var ue=_(p(Ze),2),ga=p(ue),Ls=p(ga),Ds=_(ga,2);{var Os=An=>{var Wn=Dp(),Ot=p(Wn);P(gt=>I(Ot,gt),[()=>(r(O),v(()=>Qn(r(O).quoted_body_snapshot)))]),A(An,Wn)},Ms=An=>{var Wn=Op(),Ot=p(Wn);P(gt=>I(Ot,`[original deleted] ${gt??""}`),[()=>(r(O),v(()=>Qn(r(O).quoted_body_snapshot)))]),A(An,Wn)};j(Ds,An=>{r(O),v(()=>r(O).quoted_message_id)?An(Os):An(Ms,-1)})}P((An,Wn)=>{Sn=Mt(Ze,1,"quote-block",null,Sn,{dangling:!r(O).quoted_message_id}),Ze.disabled=(r(O),v(()=>!r(O).quoted_message_id)),$(Ze,"aria-label",An),I(Ls,Wn)},[()=>(r(O),v(()=>r(O).quoted_message_id?`Jump to quoted message from ${xn(r(O))}`:"Original message was deleted")),()=>(r(O),v(()=>xn(r(O))))]),G("click",Ze,()=>ja(r(O))),A(je,Ze)};j(Zt,je=>{r(O),v(()=>r(O).quoted_message_id||r(O).quoted_body_snapshot)&&je(Gn)})}var rr=_(Zt,2);$s(rr,()=>(hn(Zr),r(O),v(()=>Zr(r(O).body))),!0);var Is=_(rr,2);{var Xc=je=>{var Ze=$p();Nt(Ze,5,()=>(r(O),v(()=>r(O).attachments)),Sn=>Sn.id,(Sn,ue)=>{var ga=Ra(),Ls=Yn(ga);{var Ds=Ot=>{var gt=Np(),jn=p(gt),br=_(jn,2),Wr=p(br);P(ma=>{$(gt,"aria-label",(r(ue),v(()=>`Open image ${r(ue).filename}`))),$(jn,"src",ma),$(jn,"alt",(r(ue),v(()=>r(ue).filename))),I(Wr,(r(ue),v(()=>r(ue).filename)))},[()=>(r(ue),v(()=>Ve(r(ue))))]),G("click",gt,()=>gr(Ve(r(ue)),r(ue).filename)),A(Ot,gt)},Os=ar(()=>(r(ue),v(()=>u(r(ue))))),Ms=Ot=>{var gt=Pp(),jn=p(gt),br=p(jn),Wr=_(jn,2),ma=p(Wr);P((Ns,Ps)=>{$(jn,"aria-label",(r(ue),v(()=>r(ue).filename))),$(br,"src",Ns),$(br,"type",(r(ue),v(()=>r(ue).content_type))),$(Wr,"href",Ps),I(ma,(r(ue),v(()=>r(ue).filename)))},[()=>(r(ue),v(()=>Ve(r(ue)))),()=>(r(ue),v(()=>Ve(r(ue))))]),A(Ot,gt)},An=ar(()=>(r(ue),v(()=>x(r(ue))))),Wn=Ot=>{var gt=zp(),jn=_(p(gt),2),br=p(jn),Wr=p(br),ma=_(br,2),Ns=p(ma);P((Ps,Vc)=>{$(gt,"href",Ps),I(Wr,(r(ue),v(()=>r(ue).filename))),I(Ns,Vc)},[()=>(r(ue),v(()=>Ve(r(ue)))),()=>(r(ue),v(()=>M(r(ue).byte_size)))]),A(Ot,gt)};j(Ls,Ot=>{r(Os)?Ot(Ds):r(An)?Ot(Ms,1):Ot(Wn,-1)})}A(Sn,ga)}),A(je,Ze)};j(Is,je=>{r(O),v(()=>r(O).attachments?.length)&&je(Xc)})}P((je,Ze)=>{$(W,"data-message-id",(r(O),v(()=>r(O).id))),Zn(Y,`--hue: ${je??""}deg`),I(it,(r(O),v(()=>r(O).author?.display_name||"Local User"))),I(pt,Ze)},[()=>(r(O),v(()=>It(r(O).author?.id||r(O).author_id||"x"))),()=>(hn(Ln),r(O),v(()=>Ln(r(O).created_at)))]),G("click",xt,()=>zr(r(O),"thread")),A(V,W)});var Wt=_(le,2),nr=p(Wt),qr=p(nr);{var _a=V=>{var O=Up(),W=_(p(O),2),Y=p(W),jt=_(p(Y)),ce=p(jt),ke=_(Y,2),Dt=p(ke),Ke=_(W,2);P(dt=>{I(ce,(r(pe),v(()=>r(pe).author?.display_name||"Local User"))),I(Dt,dt)},[()=>(r(pe),v(()=>Qn(r(pe).body)))]),G("click",Ke,_t),A(V,O)};j(qr,V=>{r(pe)&&r(Je)==="thread"&&V(_a)})}var Gr=_(qr,2),pn=p(Gr);Hs(pn,V=>g(ln,V),()=>r(ln)),Pa(()=>In(pn,()=>r(Ae),V=>g(Ae,V))),xl(pn,(V,O)=>Ur?.(V),()=>r(Ae));var Lt=_(pn,2);P((V,O,W)=>{I(se,`${r(te),r(T),v(()=>r(te)?.reply_count??r(T).length)??""} ${r(te),r(T),v(()=>(r(te)?.reply_count??r(T).length)===1?"reply":"replies")??""}`),$(H,"data-message-id",(r(R),v(()=>r(R).id))),Zn(he,`--hue: ${V??""}deg`),I(fn,(r(R),v(()=>r(R).author?.display_name||"Local User"))),I(q,O),I(ye,`${r(T),v(()=>r(T).length)??""} ${r(T),v(()=>r(T).length===1?"reply":"replies")??""}`),Lt.disabled=W},[()=>(r(R),v(()=>It(r(R).author?.id||r(R).author_id||"x"))),()=>(hn(Ln),r(R),v(()=>Ln(r(R).created_at))),()=>(r(Ae),v(()=>!r(Ae).trim()))]),G("click",ee,()=>{ft()}),G("pointerdown",le,()=>g(Oe,"thread")),G("pointerup",le,B),G("click",at,()=>r(R)&&zr(r(R),"thread")),Cn("submit",Wt,V=>{V.preventDefault(),Pr()}),Cn("focus",pn,()=>g(Oe,"thread")),G("keydown",pn,Qa),A(y,k)},Gc=y=>{var k=Zp(),U=Yn(k),X=p(U),ie=_(p(X),2),se=p(ie),ee=_(X,2),le=_(U,2),H=p(le),he=p(H),Ce=p(he);{var F=ce=>{var ke=Bp();P(()=>$(ke,"src",(r(C),v(()=>r(C).avatar_url)))),A(ce,ke)},K=ce=>{var ke=mt();P(Dt=>I(ke,Dt),[()=>(r(C),v(()=>cn(r(C).display_name)))]),A(ce,ke)};j(Ce,ce=>{r(C),v(()=>r(C).avatar_url)?ce(F):ce(K,-1)})}var Pe=_(H,2),qt=p(Pe),Gt=p(qt),fn=p(Gt),dn=p(fn),Bn=_(fn,2);{var me=ce=>{var ke=qp(),Dt=p(ke);P(Ke=>I(Dt,Ke),[()=>(r(C),v(()=>Be(r(C).handle)))]),A(ce,ke)};j(Bn,ce=>{r(C),v(()=>r(C).handle)&&ce(me)})}var q=_(Gt,2);{var at=ce=>{var ke=Gp();G("click",ke,on),A(ce,ke)};j(q,ce=>{r(f),r(C),v(()=>r(f)?.id===r(C).id)&&ce(at)})}var Ie=_(qt,4),et=p(Ie);{var En=ce=>{var ke=Wp();G("click",ke,()=>Za(r(C)?.id||"")),A(ce,ke)};j(et,ce=>{r(f),r(C),v(()=>r(f)?.id!==r(C).id)&&ce(En)})}var tr=_(et,2),qn=_(Ie,2),ye=p(qn),st=_(p(ye),2);{var Wt=ce=>{var ke=jp();G("click",ke,on),A(ce,ke)};j(st,ce=>{r(f),r(C),v(()=>r(f)?.id===r(C).id)&&ce(Wt)})}var nr=_(ye,2),qr=_(p(nr),2),_a=_(p(qr),2),Gr=p(_a),pn=_(nr,2),Lt=_(p(pn),2),V=_(p(Lt),2),O=p(V),W=_(qn,2),Y=_(p(W),2),jt=p(Y);P((ce,ke)=>{I(se,(r(C),v(()=>r(C).display_name))),Zn(H,`--hue: ${ce??""}deg`),I(dn,(r(C),v(()=>r(C).display_name))),I(Gr,ke),I(O,(r(C),v(()=>r(C).id))),I(jt,`Member of ${r(n),v(()=>r(n)?.name||"this workspace")??""}. Click Message to keep the conversation in your sidebar.`)},[()=>(r(C),v(()=>It(r(C).id))),()=>(r(C),v(()=>r(C).handle?Be(r(C).handle):"No handle set"))]),G("click",ee,ft),G("click",tr,()=>g($t,"status messages are coming soon")),A(y,k)},Wc=y=>{var k=Yp();A(y,k)};j(Bc,y=>{r(R)?y(qc):r(C)?y(Gc,1):y(Wc,-1)})}var hl=_(N,2);{var jc=y=>{var k=Kp(),U=p(k),X=_(U,2),ie=p(X),se=_(p(ie),2),ee=_(ie,2),le=p(ee),H=p(le),he=p(H);{var Ce=ye=>{var st=Xp();P(()=>$(st,"src",r(Kn))),A(ye,st)},F=ye=>{var st=mt();P(Wt=>I(st,Wt),[()=>(r(zt),v(()=>cn(r(zt))))]),A(ye,st)};j(he,ye=>{r(Kn)?ye(Ce):ye(F,-1)})}var K=_(H,2),Pe=p(K),qt=p(Pe),Gt=_(Pe,2),fn=p(Gt),dn=_(le,2),Bn=_(p(dn),2),me=_(dn,2),q=_(p(me),2),at=_(me,2),Ie=_(p(at),2),et=_(at,2);{var En=ye=>{var st=Vp();let Wt;var nr=p(st);P(()=>{Wt=Mt(st,1,"profile-status",null,Wt,{error:r(De)}),I(nr,r($n))}),A(ye,st)};j(et,ye=>{r($n)&&ye(En)})}var tr=_(et,2),qn=p(tr);P((ye,st)=>{Zn(H,`--hue: ${ye??""}deg`),I(qt,(r(zt),r(f),v(()=>r(zt)||r(f).display_name))),I(fn,st)},[()=>(r(f),v(()=>It(r(f).id))),()=>(r(nn),r(f),v(()=>r(nn)||Be(r(f).handle)||"No handle set"))]),G("click",U,Qe),G("click",se,Qe),Cn("submit",ee,ye=>{ye.preventDefault(),Mr()}),In(Bn,()=>r(zt),ye=>g(zt,ye)),In(q,()=>r(nn),ye=>g(nn,ye)),In(Ie,()=>r(Kn),ye=>g(Kn,ye)),G("click",qn,Qe),A(y,k)};j(hl,y=>{r(wn)&&r(f)&&y(jc)})}var Zc=_(hl,2);{var Yc=y=>{var k=Jp(),U=p(k),X=_(U,2),ie=p(X),se=p(ie),ee=p(se),le=_(se,2),H=p(le),he=_(H,2),Ce=_(ie,2),F=p(Ce);P(()=>{I(ee,(r(oe),v(()=>r(oe).title))),$(H,"href",(r(oe),v(()=>r(oe).url))),$(F,"src",(r(oe),v(()=>r(oe).url))),$(F,"alt",(r(oe),v(()=>r(oe).title)))}),G("click",U,Qe),G("click",he,Qe),A(y,k)};j(Zc,y=>{r(oe)&&y(Yc)})}P((y,k)=>{Q=Mt(N,1,"shell",null,Q,{"nav-open":r(sn),"sidebar-collapsed":r(Fn),"thread-open":r(i)}),I(sc,(r(n),v(()=>r(n)?.name||"Pick a workspace"))),zi=Mt(Pi,1,"presence",null,zi,{online:r(_e)}),I(ic,r(_e)?"Connected":r($t)),$(rs,"aria-label",r(Fn)?"Expand sidebar":"Collapse sidebar"),$(rs,"title",r(Fn)?"Expand sidebar":"Collapse sidebar"),$(oc,"d",r(Fn)?"m9 6 6 6-6 6":"m15 6-6 6 6 6"),I(Ec,(r(n),v(()=>r(n)?.name||"no workspace"))),$(ha,"title",r(R)?"Close thread":"Open a message thread"),$(ha,"aria-label",r(R)?"Close thread":"Open a message thread"),Qi=Mt(ha,1,"",null,Qi,{active:r(i)}),$(mr,"placeholder",y),$c.disabled=k,dl=Mt(fl,1,"",null,dl,{active:r(At)}),pl=Mt(Cs,1,"thread",null,pl,{open:r(i)}),$(Cs,"aria-label",r(C)?"Profile pane":"Thread pane")},[()=>(r(a),r(s),v(()=>r(a)?`Message ${_r(r(a))}`:r(s)?`Message #${r(s).name}`:"Pick a channel to start")),()=>(r(ve),v(()=>!r(ve).trim()))]),G("click",be,()=>g(sn,!r(sn))),G("click",Es,()=>g(Rt,!r(Rt))),G("click",rs,()=>g(Fn,!r(Fn))),Cn("submit",Bi,y=>{y.preventDefault(),Ga()}),In(fc,()=>r(rt),y=>g(rt,y)),Cn("submit",ji,y=>{y.preventDefault(),xs()}),In(hc,()=>r(Te),y=>g(Te,y)),Cn("submit",Ss,y=>{y.preventDefault(),ys()}),In(Ji,()=>r(Ee),y=>g(Ee,y)),G("click",ha,()=>{r(i)?ft():g($t,"pick a message to open its thread")}),G("click",Cc,()=>g($t,"no pinned items")),G("pointerdown",va,()=>g(Oe,"message")),G("pointerup",va,B),Cn("submit",nl,y=>{y.preventDefault(),Hn()}),G("change",zc,Ue),Cn("focus",mr,()=>g(Oe,"message")),G("keydown",mr,Ts),G("click",ol,()=>He("**")),G("click",cl,()=>He("_")),G("click",As,()=>He("`")),G("click",Rs,()=>He("```","\n```")),G("click",ul,()=>ge("[label](https://)")),G("click",fl,()=>g(At,!r(At))),A(d,b)};j(qe,d=>{r(Fe)?d(es):d(ts,-1)})}A(e,Hr),pi()}af(["click","contextmenu","pointerdown","pointerup","change","keydown"]);var th=D(' ',1),nh=D("

    "),rh=D(`

    Self-hostable chat. Serious tool. Mild brine.

    ClickClack

    A single-binary chat app for teams, communities, bots, and agents: + Slack-style threads, durable realtime, OpenAPI, SQLite, and a CLI that + can drive the whole thing from a shell.

    What it is

    Chat infrastructure that stays boring when the socket drops.

    WebSocket is the pipe. The database is the truth. Every durable message, + thread reply, reaction, and channel update can be recovered over HTTP with + a cursor, so clients and agents can reconnect without drama.

    Agent path

    A friendly CLI, no LLM baked in.

    External agents, CI jobs, and humans use the same public API as the web + app. Tokens and workspace defaults are scoped per server, so switching + hosts does not leak credentials or stale IDs.

     

    Destinations

    Product at the root. Docs and app where people expect them.

    `);function ah(e,t){di(t,!1);const n="https://docs.clickclack.chat",s=["localhost","127.0.0.1","::1"].includes(window.location.hostname)?"/app":"https://app.clickclack.chat",a="https://github.com/openclaw/clickclack",i=[["Single binary","Go server, embedded Svelte app, embedded migrations, local SQLite and uploads."],["Threads that recover","Slack-style one-level threads with durable event replay after reconnects."],["Agent-friendly","A CLI, OpenAPI contract, TypeScript SDK, webhooks, and slash-command shapes."],["Self-host first","SQLite is the default, not the demo. Postgres can arrive behind the store layer."]],l=["clickclack serve --data ./data","clickclack login --magic-token mgt_...",'clickclack send --channel general "deploy started"',"clickclack threads reply msg_... --stdin {var Se=th();Pa(()=>{go.title="ClickClack - Self-hostable chat with claws"}),A(Re,Se)});var o=p(c),f=_(p(o),2),h=_(p(f),2),w=p(h);$(w,"href",n);var m=_(w,2),E=_(m,2);$(E,"href",a);var T=_(f,2),L=_(p(T),6),S=p(L),z=_(S,2);$(z,"href",n);var R=_(z,2);$(R,"href",a);var te=_(o,4);Nt(te,5,()=>i,pf,(Re,Se)=>{var At=nh(),wn=p(At),zn=p(wn),zt=_(wn,2),nn=p(zt);P(()=>{I(zn,r(Se)[0]),I(nn,r(Se)[1])}),A(Re,At)});var C=_(te,2),oe=_(p(C),2),ve=p(oe),Ae=_(C,2),nt=_(p(Ae),2),rt=_(p(nt),2);$(rt,"href",n);var Te=_(rt,2),Ee=_(Te,2);$(Ee,"href",a),P(Re=>{$(m,"href",s),$(S,"href",s),I(ve,Re),$(Te,"href",s)},[()=>l.join(` +`)]),A(e,c),pi()}function sh(e){const t=window.location.pathname,s=window.location.hostname.startsWith("app.")||t==="/app"||t.startsWith("/app/");var a=Ra(),i=Yn(a);{var l=o=>{eh(o,{})},c=o=>{ah(o,{})};j(i,o=>{s?o(l):o(c,-1)})}A(e,a)}cf(sh,{target:document.getElementById("app")}); diff --git a/apps/api/internal/webassets/dist/index.html b/apps/api/internal/webassets/dist/index.html index 5a378db..b25c37d 100644 --- a/apps/api/internal/webassets/dist/index.html +++ b/apps/api/internal/webassets/dist/index.html @@ -4,8 +4,8 @@ ClickClack - - + +
    diff --git a/apps/web/src/ChatApp.svelte b/apps/web/src/ChatApp.svelte index 7396e43..b1ca501 100644 --- a/apps/web/src/ChatApp.svelte +++ b/apps/web/src/ChatApp.svelte @@ -788,7 +788,15 @@ { - if (event.key === "Escape") closeModal(); + if (event.key === "Escape") { + if (isModalOpen()) { + closeModal(); + } else if (replyTarget) { + event.preventDefault(); + clearReplyTarget(); + return; + } + } redirectTypingToComposer(event); }} /> @@ -1314,34 +1322,6 @@ void sendMessage(); }} > -
    - - - - - - -
    {#if showGifPicker}
    @@ -1358,50 +1338,80 @@
    {/if} - {#if pendingUpload} -
    - - {#if isImageUpload(pendingUpload)} - {pendingUpload.filename} - {/if} - {pendingUpload.filename} · {formatBytes(pendingUpload.byte_size)} - +
    + {#if pendingUpload} +
    + + {#if isImageUpload(pendingUpload)} + {pendingUpload.filename} + {/if} + {pendingUpload.filename} · {formatBytes(pendingUpload.byte_size)} + +
    + {/if} + {#if replyTarget && replyContext === (selectedDirectID ? "dm" : "channel")} +
    + + + Replying to {replyTarget.author?.display_name || "Local User"} + {quoteSnippet(replyTarget.body)} + + +
    + {/if} +
    + + +
    - {/if} - {#if replyTarget && replyContext === (selectedDirectID ? "dm" : "channel")} -
    - - - Replying to {replyTarget.author?.display_name || "Local User"} - {quoteSnippet(replyTarget.body)} - - +
    + + + + + +
    - {/if} -
    - - -
    Enter to send · Shift+Enter for newline · Markdown supported @@ -1576,32 +1586,34 @@ void sendReply(); }} > - {#if replyTarget && replyContext === "thread"} -
    - - - Replying to {replyTarget.author?.display_name || "Local User"} - {quoteSnippet(replyTarget.body)} - - +
    + {#if replyTarget && replyContext === "thread"} +
    + + + Replying to {replyTarget.author?.display_name || "Local User"} + {quoteSnippet(replyTarget.body)} + + +
    + {/if} +
    + +
    - {/if} -
    - -
    {:else if selectedProfile} diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css index b348cdb..a06aefa 100644 --- a/apps/web/src/styles.css +++ b/apps/web/src/styles.css @@ -1493,40 +1493,66 @@ button.ghost { position: relative; } +.composer-card { + display: flex; + flex-direction: column; + background: var(--panel); + border: 1px solid var(--line-strong); + border-radius: var(--radius-lg); + overflow: hidden; + transition: + border-color 120ms ease, + box-shadow 120ms ease; +} + +.composer:focus-within .composer-card { + border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); + box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); +} + .composer-toolbar { display: inline-flex; align-items: center; - gap: 4px; + gap: 2px; width: 100%; - padding: 6px 8px; - border: 1px solid var(--line); - border-bottom: 0; - border-radius: var(--radius-lg) var(--radius-lg) 0 0; - background: color-mix(in srgb, var(--panel-2) 72%, var(--panel)); + padding: 4px 6px; + margin: 0; + border: 0; + border-top: 1px solid var(--line); + border-radius: 0; + background: color-mix(in srgb, var(--panel-2) 35%, transparent); box-shadow: none; } .composer-toolbar button { - min-width: 30px; - height: 28px; + min-width: 28px; + height: 26px; display: grid; place-items: center; border: 0; - border-radius: 7px; + border-radius: 6px; background: transparent; - color: var(--muted); - font-size: 11px; - font-weight: 800; + color: var(--text); + opacity: 0.78; + font-size: 11.5px; + font-weight: 700; transition: background 100ms ease, color 100ms ease, + opacity 100ms ease, transform 80ms ease; } -.composer-toolbar button:hover, +.composer-toolbar button:hover { + background: var(--hover-strong); + color: var(--text-strong); + opacity: 1; +} + .composer-toolbar button.active { background: var(--accent-soft); color: var(--accent); + opacity: 1; } .composer-toolbar button:active { @@ -1636,22 +1662,19 @@ button.ghost { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 6px; - padding: 10px 8px 8px 10px; - background: var(--panel); - border: 1px solid var(--line-strong); - border-radius: 0 0 var(--radius-lg) var(--radius-lg); - transition: - border-color 120ms ease, - box-shadow 120ms ease; + padding: 6px 8px 6px 10px; + background: transparent; + border: 0; + border-radius: 0; } .composer:focus-within .composer-toolbar, .composer-row:focus-within { - border-color: var(--accent); + border-color: transparent; } .composer-row:focus-within { - box-shadow: var(--accent-glow); + box-shadow: none; } .composer-icon { @@ -1930,7 +1953,7 @@ button.ghost { } .reply-composer .composer-row { - border-radius: var(--radius-lg); + border-radius: 0; } .thread-empty { @@ -2591,14 +2614,16 @@ button.ghost { .quote-preview { display: flex; - align-items: stretch; + align-items: center; gap: 0.5rem; - padding: 0.4rem 0.5rem; - margin-bottom: 0.4rem; - background: rgba(99, 102, 241, 0.08); - border-left: 3px solid var(--accent, #6366f1); - border-radius: 6px; - font-size: 0.85rem; + padding: 6px 10px 6px 12px; + margin: 0; + background: color-mix(in srgb, var(--accent) 5%, transparent); + border: 0; + border-bottom: 1px solid var(--line); + border-radius: 0; + font-size: 12.5px; + color: var(--muted); } .quote-preview .quote-bar { @@ -2607,36 +2632,51 @@ button.ghost { .quote-preview-body { display: flex; - flex-direction: column; - gap: 0.15rem; + align-items: baseline; + gap: 0.4rem; flex: 1; min-width: 0; + overflow: hidden; } .quote-preview-label { - font-size: 0.75rem; - color: var(--text-muted, #6b7280); + font-size: 12px; + color: color-mix(in srgb, var(--accent) 85%, var(--text)); + white-space: nowrap; +} + +.quote-preview-label strong { + color: var(--text-strong); + font-weight: 600; } .quote-preview-snippet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - color: var(--text, inherit); + color: var(--muted); + font-size: 12px; + flex: 1; + min-width: 0; } .quote-preview-clear { background: transparent; border: 0; - color: var(--text-muted, #6b7280); - font-size: 1.1rem; + color: var(--muted); + font-size: 16px; line-height: 1; cursor: pointer; - padding: 0 0.25rem; + padding: 2px 6px; + border-radius: 6px; + transition: + background 100ms ease, + color 100ms ease; } .quote-preview-clear:hover { - color: var(--text, inherit); + color: var(--text-strong); + background: var(--hover-strong); } .reply-quote-btn { diff --git a/tests/e2e/type-to-focus.spec.ts b/tests/e2e/type-to-focus.spec.ts index aaf9ce3..f51466e 100644 --- a/tests/e2e/type-to-focus.spec.ts +++ b/tests/e2e/type-to-focus.spec.ts @@ -156,4 +156,28 @@ test.describe("type-to-focus composer", () => { const afterClearHeight = await composer.evaluate((el) => el.getBoundingClientRect().height); expect(Math.abs(afterClearHeight - initialHeight)).toBeLessThan(2); }); + + test("global Escape clears the reply target even when composer is not focused", async ({ + page, + }) => { + const composer = page.getByLabel("Message body"); + await composer.fill("the original draft"); + await page.getByRole("button", { name: "Send" }).click(); + + const originalRow = page.locator(".message-row", { + has: page.locator(".markdown").filter({ hasText: "the original draft" }), + }); + await originalRow.hover(); + await originalRow.getByRole("button", { name: "Reply" }).click(); + + const chip = page.getByLabel("Replying to message"); + await expect(chip).toBeVisible(); + + // Move focus away from the composer. + await page.locator("body").click({ position: { x: 5, y: 5 } }); + await expect(composer).not.toBeFocused(); + + await page.keyboard.press("Escape"); + await expect(chip).toHaveCount(0); + }); });