volute 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +127 -18
  2. package/dist/{accept-666DIZX2.js → accept-E3PAH3QJ.js} +2 -2
  3. package/dist/{activity-events-BBIEA2F4.js → activity-events-BKBPPUBP.js} +2 -2
  4. package/dist/ai-service-VAJT5UBS.js +29 -0
  5. package/dist/api.d.ts +586 -529
  6. package/dist/{archive-UA4BDFXQ.js → archive-WWDBWYN2.js} +2 -2
  7. package/dist/{bridge-FQHZL3MC.js → bridge-RO37CUFM.js} +2 -2
  8. package/dist/{chat-M4SX42JD.js → chat-TCUNPFGO.js} +8 -8
  9. package/dist/{chunk-IAYBDWVG.js → chunk-2C2VXEBB.js} +147 -2
  10. package/dist/chunk-2NDZC3S7.js +1330 -0
  11. package/dist/{chunk-IKRVFPWU.js → chunk-7D47T4RB.js} +3 -2
  12. package/dist/chunk-A6TUJJ3L.js +19 -0
  13. package/dist/{chunk-AW7PFDVN.js → chunk-CVH6Y2YG.js} +1 -1
  14. package/dist/{chunk-XBLSAVJF.js → chunk-DTC6EH5I.js} +1 -1
  15. package/dist/chunk-EFP3PE6C.js +232 -0
  16. package/dist/{chunk-JGFVMROS.js → chunk-EFVHR7KH.js} +1 -1
  17. package/dist/{chunk-K5NAC55T.js → chunk-FSM45XD5.js} +2 -2
  18. package/dist/{chunk-LAC664WU.js → chunk-FXHXHI2A.js} +42 -24
  19. package/dist/{chunk-RKQEHRBB.js → chunk-G3GBKZGG.js} +1 -1
  20. package/dist/{chunk-H7OZRFJB.js → chunk-HHTXM4JT.js} +0 -49
  21. package/dist/{chunk-J4IBNXGJ.js → chunk-IKHDUZRH.js} +4 -3
  22. package/dist/{chunk-MD4C26II.js → chunk-JGFRDMR6.js} +1 -1
  23. package/dist/{chunk-POSXWWTA.js → chunk-LIRWLNAK.js} +26 -12
  24. package/dist/{chunk-NI5FFCCS.js → chunk-MDPCSXZ4.js} +35 -11
  25. package/dist/chunk-NSBFETWP.js +188 -0
  26. package/dist/{chunk-VIVMW2H2.js → chunk-P27RV5WM.js} +1 -1
  27. package/dist/{chunk-EHYDTZTF.js → chunk-P7VFDSSG.js} +2 -2
  28. package/dist/{chunk-AAPXKR5V.js → chunk-QVAQ5454.js} +181 -544
  29. package/dist/{chunk-HDN7MNGD.js → chunk-S5LR3XYJ.js} +1 -1
  30. package/dist/{chunk-2YP2TVDT.js → chunk-UPA6COHU.js} +5 -5
  31. package/dist/{chunk-AKPFNL7L.js → chunk-VGWJSNHS.js} +1 -1
  32. package/dist/{chunk-SGVNFZHW.js → chunk-W5OOPLNP.js} +3 -3
  33. package/dist/{chunk-2WPW7OT6.js → chunk-ZWKTUQEL.js} +1 -1
  34. package/dist/cli.js +25 -26
  35. package/dist/clock-G3ALCMLJ.js +263 -0
  36. package/dist/{cloud-sync-HDL6PHZI.js → cloud-sync-JV4LJOK3.js} +14 -12
  37. package/dist/connectors/discord-bridge.js +1 -1
  38. package/dist/connectors/slack-bridge.js +1 -1
  39. package/dist/connectors/telegram-bridge.js +1 -1
  40. package/dist/{conversations-M2K4253F.js → conversations-7KVQV7EZ.js} +9 -3
  41. package/dist/create-JTLS7GX3.js +70 -0
  42. package/dist/{create-QWV73WXD.js → create-VQSQHJQW.js} +1 -1
  43. package/dist/{daemon-client-I42FK2BF.js → daemon-client-BCTFGVCZ.js} +2 -2
  44. package/dist/{daemon-restart-G4B2OYAB.js → daemon-restart-4JGBHEJ4.js} +7 -7
  45. package/dist/daemon.js +1474 -1124
  46. package/dist/{db-IC4J52XQ.js → db-HMFPIRO2.js} +1 -1
  47. package/dist/{delete-4JYGD4VN.js → delete-JESHKE7F.js} +1 -1
  48. package/dist/down-NGBMGORS.js +14 -0
  49. package/dist/{env-YJMUMFIY.js → env-CLXXT7M2.js} +2 -2
  50. package/dist/{export-BOJQWBMA.js → export-EGA5M5PB.js} +3 -3
  51. package/dist/extension-WZ4SUPJB.js +174 -0
  52. package/dist/extensions-ECO4RPFQ.js +27 -0
  53. package/dist/{files-M546TKVN.js → files-4VEJDASH.js} +3 -3
  54. package/dist/{history-ALPTNB3I.js → history-EJMMLXDO.js} +17 -2
  55. package/dist/{import-SRTQXBGH.js → import-YCGPMBSI.js} +3 -3
  56. package/dist/{join-J4QU42DL.js → join-2GBJKZEN.js} +1 -1
  57. package/dist/{list-R73GENNL.js → list-Q6O7FGAN.js} +2 -2
  58. package/dist/{login-3QZNR2DF.js → login-RET5WESK.js} +2 -2
  59. package/dist/{login-BKP3AFWN.js → login-RL6AU2SM.js} +3 -3
  60. package/dist/{logout-T53VKCPU.js → logout-CGAGJN3L.js} +2 -2
  61. package/dist/{logout-IQK7FNEK.js → logout-JRPBEMMR.js} +3 -3
  62. package/dist/message-delivery-6YMVNOEC.js +28 -0
  63. package/dist/{migrate-registry-to-db-XC7T5B7P.js → migrate-registry-to-db-FK35IPEH.js} +1 -1
  64. package/dist/{mind-S5V6CK5W.js → mind-LUWRQUQ5.js} +17 -17
  65. package/dist/{mind-activity-tracker-EN6XNXPF.js → mind-activity-tracker-VYN2ZZ2M.js} +3 -3
  66. package/dist/{mind-list-UPJ75GPI.js → mind-list-V5WW5DUA.js} +2 -2
  67. package/dist/{mind-manager-S6ILZVX3.js → mind-manager-YFCOIAAX.js} +6 -6
  68. package/dist/{mind-sleep-BTSWQNAC.js → mind-sleep-R6PTNNW4.js} +2 -2
  69. package/dist/{mind-status-TK5AETEM.js → mind-status-I4ISFJ6I.js} +2 -2
  70. package/dist/{mind-wake-SBAKIDVP.js → mind-wake-67ZQEWAV.js} +2 -2
  71. package/dist/{package-CG4RWUGP.js → package-S2OAA5ZA.js} +11 -5
  72. package/dist/pages-watcher-Z3PKNROC.js +21 -0
  73. package/dist/{read-36UFXN3G.js → read-WQMPTSN2.js} +2 -2
  74. package/dist/{register-CHREOMJ3.js → register-NZDSTLP3.js} +3 -3
  75. package/dist/{registry-NDNOOYG4.js → registry-ODSALQQL.js} +1 -1
  76. package/dist/{reject-LXIZFJ4Q.js → reject-2HZOJEIJ.js} +2 -2
  77. package/dist/{restart-6ESL3NBO.js → restart-QHS3NT64.js} +2 -2
  78. package/dist/{sandbox-5BW5HPXM.js → sandbox-O5FUSF43.js} +3 -3
  79. package/dist/{seed-SSUCYYDF.js → seed-WUQMPLDM.js} +1 -1
  80. package/dist/{send-TAOEZ4NH.js → send-OAN3RYYY.js} +20 -6
  81. package/dist/{setup-JHL5ZEST.js → setup-QMDK5RZX.js} +2 -2
  82. package/dist/{setup-RXYVGGT7.js → setup-XJH3E7YM.js} +45 -14
  83. package/dist/{skill-AUAQTSP5.js → skill-FZIN4W4Q.js} +65 -3
  84. package/dist/skills/dreaming/references/INSTALL.md +3 -17
  85. package/dist/skills/volute-mind/SKILL.md +45 -27
  86. package/dist/sleep-manager-O7YQFCV5.js +30 -0
  87. package/dist/{split-TKJ5OT3P.js → split-EXYGGGQN.js} +1 -1
  88. package/dist/{sprout-UNT7LKKE.js → sprout-AXQ6H5DB.js} +8 -7
  89. package/dist/{start-EUJSS5R4.js → start-MTOVL6SY.js} +2 -2
  90. package/dist/{status-NQJYR4BG.js → status-ZRO37MWR.js} +5 -5
  91. package/dist/{stop-3XAITBBF.js → stop-OK5WEPVC.js} +2 -2
  92. package/dist/{systems-SMEFSHTA.js → systems-W3BBMSOZ.js} +5 -5
  93. package/dist/{tailscale-NY5MUMY3.js → tailscale-BM72RXCJ.js} +1 -1
  94. package/dist/{template-hash-BIMA4ILT.js → template-hash-3HOR4UAJ.js} +1 -1
  95. package/dist/up-BXUAIDXB.js +17 -0
  96. package/dist/{update-PTSH22AZ.js → update-PLPHMMZ2.js} +5 -5
  97. package/dist/{update-check-64FWC4Y2.js → update-check-CVCN7MF6.js} +2 -2
  98. package/dist/{upgrade-HA47CS4C.js → upgrade-I6NPCYUU.js} +1 -1
  99. package/dist/{version-notify-JDUF4HQJ.js → version-notify-2NTWVEHL.js} +18 -16
  100. package/dist/web-assets/assets/index--kREqKl9.js +72 -0
  101. package/dist/web-assets/assets/index-BXYTG0nJ.css +1 -0
  102. package/dist/web-assets/ext-theme.css +111 -0
  103. package/dist/web-assets/index.html +2 -2
  104. package/package.json +11 -5
  105. package/packages/extensions/notes/dist/ui/assets/index-DgawVO5g.css +1 -0
  106. package/packages/extensions/notes/dist/ui/assets/index-qUWoeC4c.js +2 -0
  107. package/packages/extensions/notes/dist/ui/index.html +14 -0
  108. package/packages/extensions/notes/skills/notes/SKILL.md +62 -0
  109. package/packages/extensions/notes/skills/notes/scripts/notes.mjs +185 -0
  110. package/packages/extensions/pages/dist/ui/assets/index-D0HyS-xQ.css +1 -0
  111. package/packages/extensions/pages/dist/ui/assets/index-tLTROSk5.js +2 -0
  112. package/packages/extensions/pages/dist/ui/index.html +14 -0
  113. package/packages/extensions/pages/skills/pages/SKILL.md +58 -0
  114. package/templates/_base/home/VOLUTE.md +1 -1
  115. package/templates/_base/src/lib/logger.ts +10 -49
  116. package/templates/_base/src/lib/router.ts +1 -9
  117. package/templates/claude/src/lib/stream-consumer.ts +1 -4
  118. package/templates/pi/src/lib/event-handler.ts +1 -14
  119. package/dist/chunk-P72MVS4R.js +0 -188
  120. package/dist/chunk-T6HKBWXZ.js +0 -23
  121. package/dist/chunk-ZYGKG6VC.js +0 -22
  122. package/dist/create-D7J73A6H.js +0 -45
  123. package/dist/down-LVBXEULC.js +0 -14
  124. package/dist/message-delivery-HV3S6HZV.js +0 -24
  125. package/dist/notes-XCER3I7M.js +0 -220
  126. package/dist/pages-KJDJX4TA.js +0 -36
  127. package/dist/publish-ZZB33WP4.js +0 -86
  128. package/dist/schedule-QTJMFATP.js +0 -154
  129. package/dist/skills/notes/SKILL.md +0 -34
  130. package/dist/sleep-manager-WMVG2VCL.js +0 -28
  131. package/dist/status-S7UUPNRW.js +0 -38
  132. package/dist/up-GM2JOH2Y.js +0 -17
  133. package/dist/web-assets/assets/index-BZGvToHi.css +0 -1
  134. package/dist/web-assets/assets/index-Cz4TrpzB.js +0 -75
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * notes.mjs — manage notes via the daemon API
4
+ *
5
+ * Usage:
6
+ * node .claude/skills/notes/scripts/notes.mjs write "title" "content" [--reply-to author/slug]
7
+ * node .claude/skills/notes/scripts/notes.mjs list [--author name] [--limit N]
8
+ * node .claude/skills/notes/scripts/notes.mjs read <author/slug>
9
+ * node .claude/skills/notes/scripts/notes.mjs comment <author/slug> "content"
10
+ * node .claude/skills/notes/scripts/notes.mjs react <author/slug> "emoji"
11
+ * node .claude/skills/notes/scripts/notes.mjs delete <author/slug>
12
+ */
13
+
14
+ const mind = process.env.VOLUTE_MIND;
15
+ const port = process.env.VOLUTE_DAEMON_PORT;
16
+ const token = process.env.VOLUTE_DAEMON_TOKEN;
17
+
18
+ if (!mind || !port || !token) {
19
+ console.error("Missing VOLUTE_MIND, VOLUTE_DAEMON_PORT, or VOLUTE_DAEMON_TOKEN");
20
+ process.exit(1);
21
+ }
22
+
23
+ const baseUrl = `http://localhost:${port}/api/ext/notes`;
24
+ const headers = {
25
+ "Content-Type": "application/json",
26
+ Authorization: `Bearer ${token}`,
27
+ };
28
+
29
+ async function apiFetch(path, opts = {}) {
30
+ const url = `${baseUrl}${path}`;
31
+ try {
32
+ return await fetch(url, { headers, ...opts });
33
+ } catch {
34
+ console.error(`Failed to reach daemon at localhost:${port}`);
35
+ process.exit(1);
36
+ }
37
+ }
38
+
39
+ function getFlag(args, flag) {
40
+ const idx = args.indexOf(flag);
41
+ if (idx !== -1 && args[idx + 1]) return args[idx + 1];
42
+ return undefined;
43
+ }
44
+
45
+ const [command, ...args] = process.argv.slice(2);
46
+
47
+ switch (command) {
48
+ case "write": {
49
+ const title = args[0];
50
+ const content = args[1];
51
+ if (!title || !content) {
52
+ console.error(
53
+ 'Usage: node .claude/skills/notes/scripts/notes.mjs write "title" "content" [--reply-to author/slug]',
54
+ );
55
+ process.exit(1);
56
+ }
57
+ const replyTo = getFlag(args, "--reply-to");
58
+ const body = { title, content };
59
+ if (replyTo) body.reply_to = replyTo;
60
+
61
+ const res = await apiFetch("", { method: "POST", body: JSON.stringify(body) });
62
+ const data = await res.json();
63
+ if (!res.ok) {
64
+ console.error(`Error: ${data.error ?? res.statusText}`);
65
+ process.exit(1);
66
+ }
67
+ console.log(`Published: ${data.author_username}/${data.slug}`);
68
+ break;
69
+ }
70
+
71
+ case "list": {
72
+ const author = getFlag(args, "--author");
73
+ const limit = getFlag(args, "--limit") ?? "10";
74
+ const params = new URLSearchParams({ limit });
75
+ if (author) params.set("author", author);
76
+
77
+ const res = await apiFetch(`?${params}`);
78
+ const notes = await res.json();
79
+ if (!res.ok) {
80
+ console.error(`Error: ${notes.error ?? res.statusText}`);
81
+ process.exit(1);
82
+ }
83
+ for (const note of notes) {
84
+ const date = new Date(note.created_at).toLocaleDateString();
85
+ console.log(` ${note.author_username}/${note.slug} "${note.title}" (${date})`);
86
+ }
87
+ if (notes.length === 0) console.log("No notes found.");
88
+ break;
89
+ }
90
+
91
+ case "read": {
92
+ const ref = args[0];
93
+ if (!ref || !ref.includes("/")) {
94
+ console.error("Usage: node .claude/skills/notes/scripts/notes.mjs read <author/slug>");
95
+ process.exit(1);
96
+ }
97
+ const res = await apiFetch(`/${ref}`);
98
+ const data = await res.json();
99
+ if (!res.ok) {
100
+ console.error(`Error: ${data.error ?? res.statusText}`);
101
+ process.exit(1);
102
+ }
103
+ console.log(`# ${data.title}\n`);
104
+ console.log(`By ${data.author_username} — ${new Date(data.created_at).toLocaleString()}\n`);
105
+ console.log(data.content);
106
+ if (data.reactions?.length) {
107
+ console.log(
108
+ `\nReactions: ${data.reactions.map((r) => `${r.emoji} (${r.count})`).join(" ")}`,
109
+ );
110
+ }
111
+ if (data.comments?.length) {
112
+ console.log(`\nComments (${data.comments.length}):`);
113
+ for (const c of data.comments) {
114
+ console.log(` ${c.author_username}: ${c.content}`);
115
+ }
116
+ }
117
+ break;
118
+ }
119
+
120
+ case "comment": {
121
+ const ref = args[0];
122
+ const content = args[1];
123
+ if (!ref || !ref.includes("/") || !content) {
124
+ console.error(
125
+ 'Usage: node .claude/skills/notes/scripts/notes.mjs comment <author/slug> "content"',
126
+ );
127
+ process.exit(1);
128
+ }
129
+ const res = await apiFetch(`/${ref}/comments`, {
130
+ method: "POST",
131
+ body: JSON.stringify({ content }),
132
+ });
133
+ const data = await res.json();
134
+ if (!res.ok) {
135
+ console.error(`Error: ${data.error ?? res.statusText}`);
136
+ process.exit(1);
137
+ }
138
+ console.log("Comment added.");
139
+ break;
140
+ }
141
+
142
+ case "react": {
143
+ const ref = args[0];
144
+ const emoji = args[1];
145
+ if (!ref || !ref.includes("/") || !emoji) {
146
+ console.error(
147
+ 'Usage: node .claude/skills/notes/scripts/notes.mjs react <author/slug> "emoji"',
148
+ );
149
+ process.exit(1);
150
+ }
151
+ const res = await apiFetch(`/${ref}/reactions`, {
152
+ method: "POST",
153
+ body: JSON.stringify({ emoji }),
154
+ });
155
+ const data = await res.json();
156
+ if (!res.ok) {
157
+ console.error(`Error: ${data.error ?? res.statusText}`);
158
+ process.exit(1);
159
+ }
160
+ console.log(data.added ? "Reaction added." : "Reaction removed.");
161
+ break;
162
+ }
163
+
164
+ case "delete": {
165
+ const ref = args[0];
166
+ if (!ref || !ref.includes("/")) {
167
+ console.error("Usage: node .claude/skills/notes/scripts/notes.mjs delete <author/slug>");
168
+ process.exit(1);
169
+ }
170
+ const res = await apiFetch(`/${ref}`, { method: "DELETE" });
171
+ if (!res.ok) {
172
+ const data = await res.json();
173
+ console.error(`Error: ${data.error ?? res.statusText}`);
174
+ process.exit(1);
175
+ }
176
+ console.log("Note deleted.");
177
+ break;
178
+ }
179
+
180
+ default:
181
+ console.error(
182
+ "Usage: node .claude/skills/notes/scripts/notes.mjs <write|list|read|comment|react|delete> [args]",
183
+ );
184
+ process.exit(1);
185
+ }
@@ -0,0 +1 @@
1
+ .thumbnail-card.svelte-yqwgpu{display:flex;flex-direction:column;gap:6px;background:none;cursor:pointer;text-align:left;color:inherit;padding:0}.thumbnail-frame.svelte-yqwgpu{width:280px;height:180px;overflow:hidden;border-radius:var(--radius-lg);border:1px solid var(--border);background:var(--bg-0);transition:border-color .15s}.thumbnail-card.svelte-yqwgpu:hover .thumbnail-frame:where(.svelte-yqwgpu){border-color:var(--border-bright)}iframe.svelte-yqwgpu{width:1280px;height:960px;transform:scale(.219);transform-origin:top left;pointer-events:none;border:none;background:#fff;opacity:0;transition:opacity .15s}iframe.loaded.svelte-yqwgpu{opacity:1}.thumbnail-label.svelte-yqwgpu{font-size:13px;font-weight:500;color:var(--text-0);padding:0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}.thumbnail-sublabel.svelte-yqwgpu{font-size:11px;color:var(--text-2);padding:0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}.dashboard.svelte-apzsoj{max-width:1200px}.section.svelte-apzsoj{margin-bottom:24px}.section-header.svelte-apzsoj{font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}.section-title.svelte-apzsoj{color:var(--text-2)}.thumbnail-grid.svelte-apzsoj{display:flex;flex-wrap:wrap;gap:16px}.empty.svelte-apzsoj{color:var(--text-2);font-size:13px}.site-view.svelte-vvnkg1{max-width:1200px}.site-header.svelte-vvnkg1{display:flex;align-items:baseline;gap:8px;margin-bottom:16px}.site-name.svelte-vvnkg1{font-size:16px;font-weight:500;color:var(--text-0)}.page-count.svelte-vvnkg1{font-size:12px;color:var(--text-2)}.thumbnail-grid.svelte-vvnkg1{display:flex;flex-wrap:wrap;gap:16px}.empty.svelte-vvnkg1{color:var(--text-2);font-size:13px}.ext-app.svelte-1r8vfx3{padding:24px;max-width:100%;min-height:100%;animation:fadeIn .2s ease both}.ext-app.full-page.svelte-1r8vfx3{padding:0;height:100%}.full-page-iframe.svelte-1r8vfx3{width:100%;height:100%;border:none;background:#fff}
@@ -0,0 +1,2 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const f of s.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Mn=!1;var It=Array.isArray,An=Array.prototype.indexOf,Me=Array.prototype.includes,Ze=Array.from,Pn=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Nn=Object.getOwnPropertyDescriptors,On=Object.prototype,Rn=Array.prototype,Lt=Object.getPrototypeOf,xt=Object.isExtensible;const Cn=()=>{};function Dn(e){for(var t=0;t<e.length;t++)e[t]()}function jt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const T=2,Be=4,Je=8,zt=1<<24,ce=16,Y=32,we=64,rt=128,L=512,x=1024,M=2048,K=4096,O=8192,U=16384,Se=32768,Tt=1<<25,Ae=65536,kt=1<<17,Fn=1<<18,Re=1<<19,In=1<<20,te=1<<25,be=65536,it=1<<21,dt=1<<22,ae=1<<23,tt=Symbol("$state"),Ln=Symbol(""),ee=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function jn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function zn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function qn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Bn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Hn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Vn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Un(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Yn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Kn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Xn=1,Zn=2,Jn=16,Qn=2,k=Symbol(),qt="http://www.w3.org/1999/xhtml";function $n(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Bt(e){return e===this.v}function er(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ht(e){return!er(e,this.v)}let tr=!1,R=null;function Pe(e){R=e}function Qe(e,t=!1,n){R={p:R,i:!1,c:null,e:null,s:e,x:null,r:y,l:null}}function $e(e){var t=R,n=t.e;if(n!==null){t.e=null;for(var r of n)un(r)}return t.i=!0,R=t.p,{}}function Vt(){return!0}let xe=[];function nr(){var e=xe;xe=[],Dn(e)}function _e(e){if(xe.length===0){var t=xe;queueMicrotask(()=>{t===xe&&nr()})}xe.push(e)}function Ut(e){var t=y;if(t===null)return m.f|=ae,e;if((t.f&Se)===0&&(t.f&Be)===0)throw e;se(e,t)}function se(e,t){for(;t!==null;){if((t.f&rt)!==0){if((t.f&Se)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const rr=-7169;function S(e,t){e.f=e.f&rr|t}function ht(e){(e.f&L)!==0||e.deps===null?S(e,x):S(e,K)}function Yt(e){if(e!==null)for(const t of e)(t.f&T)===0||(t.f&be)===0||(t.f^=be,Yt(t.deps))}function Kt(e,t,n){(e.f&M)!==0?t.add(e):(e.f&K)!==0&&n.add(e),Yt(e.deps),S(e,x)}const De=new Set;let E=null,W=null,st=null,nt=!1,Te=null,Ke=null;var Mt=0;let ir=1;class ue{id=ir++;current=new Map;previous=new Map;#e=new Set;#a=new Set;#t=0;#l=0;#r=null;#n=[];#i=new Set;#s=new Set;#f=new Map;is_fork=!1;#o=!1;#u(){return this.is_fork||this.#l>0}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var r of n.d)S(r,M),this.schedule(r);for(r of n.m)S(r,K),this.schedule(r)}}#v(){Mt++>1e3&&sr();const t=this.#n;this.#n=[],this.apply();var n=Te=[],r=[],i=Ke=[];for(const l of t)try{this.#d(l,n,r)}catch(a){throw Zt(l),a}if(E=null,i.length>0){var s=ue.ensure();for(const l of i)s.schedule(l)}if(Te=null,Ke=null,this.#u()){this.#h(r),this.#h(n);for(const[l,a]of this.#f)Xt(l,a)}else{this.#t===0&&De.delete(this),this.#i.clear(),this.#s.clear();for(const l of this.#e)l(this);this.#e.clear(),At(r),At(n),this.#r?.resolve()}var f=E;if(this.#n.length>0){const l=f??=this;l.#n.push(...this.#n.filter(a=>!l.#n.includes(a)))}f!==null&&(De.add(f),f.#v()),De.has(this)||this.#c()}#d(t,n,r){t.f^=x;for(var i=t.first;i!==null;){var s=i.f,f=(s&(Y|we))!==0,l=f&&(s&x)!==0,a=l||(s&O)!==0||this.#f.has(i);if(!a&&i.fn!==null){f?i.f^=x:(s&Be)!==0?n.push(i):Ue(i)&&((s&ce)!==0&&this.#s.add(i),Oe(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}#h(t){for(var n=0;n<t.length;n+=1)Kt(t[n],this.#i,this.#s)}capture(t,n){n!==k&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&ae)===0&&(this.current.set(t,t.v),W?.set(t,t.v))}activate(){E=this}deactivate(){E=null,W=null}flush(){try{if(nt=!0,E=this,!this.#u()){for(const t of this.#i)this.#s.delete(t),S(t,M),this.schedule(t);for(const t of this.#s)S(t,K),this.schedule(t)}this.#v()}finally{Mt=0,st=null,Te=null,Ke=null,nt=!1,E=null,W=null,oe.clear()}}discard(){for(const t of this.#a)t(this);this.#a.clear()}#c(){for(const a of De){var t=a.id<this.id,n=[];for(const[o,c]of this.current){if(a.current.has(o))if(t&&c!==a.current.get(o))a.current.set(o,c);else continue;n.push(o)}if(n.length!==0){var r=[...a.current.keys()].filter(o=>!this.current.has(o));if(r.length>0){a.activate();var i=new Set,s=new Map;for(var f of n)Gt(f,r,i,s);if(a.#n.length>0){a.apply();for(var l of a.#n)a.#d(l,[],[])}a.deactivate()}}}}increment(t){this.#t+=1,t&&(this.#l+=1)}decrement(t,n){this.#t-=1,t&&(this.#l-=1),!(this.#o||n)&&(this.#o=!0,_e(()=>{this.#o=!1,this.flush()}))}oncommit(t){this.#e.add(t)}ondiscard(t){this.#a.add(t)}settled(){return(this.#r??=jt()).promise}static ensure(){if(E===null){const t=E=new ue;nt||(De.add(E),_e(()=>{E===t&&t.flush()}))}return E}apply(){{W=null;return}}schedule(t){if(st=t,t.b?.is_pending&&(t.f&(Be|Je|zt))!==0&&(t.f&Se)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Te!==null&&n===y&&(m===null||(m.f&T)===0))return;if((r&(we|Y))!==0){if((r&x)===0)return;n.f^=x}}this.#n.push(n)}}function sr(){try{Un()}catch(e){se(e,st)}}let $=null;function At(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(U|O))===0&&Ue(r)&&($=new Set,Oe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&vn(r),$?.size>0)){oe.clear();for(const i of $){if((i.f&(U|O))!==0)continue;const s=[i];let f=i.parent;for(;f!==null;)$.has(f)&&($.delete(f),s.push(f)),f=f.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(U|O))===0&&Oe(a)}}$.clear()}}$=null}}function Gt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&T)!==0?Gt(i,t,n,r):(s&(dt|ce))!==0&&(s&M)===0&&Wt(i,t,r)&&(S(i,M),_t(i))}}function Wt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Me.call(t,i))return!0;if((i.f&T)!==0&&Wt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function _t(e){E.schedule(e)}function Xt(e,t){if(!((e.f&Y)!==0&&(e.f&x)!==0)){(e.f&M)!==0?t.d.push(e):(e.f&K)!==0&&t.m.push(e),S(e,x);for(var n=e.first;n!==null;)Xt(n,t),n=n.next}}function Zt(e){S(e,x);for(var t=e.first;t!==null;)Zt(t),t=t.next}function lr(e){let t=0,n=ye(0),r;return()=>{wt()&&(p(n),kr(()=>(t===0&&(r=En(()=>e(()=>ze(n)))),t+=1,()=>{_e(()=>{t-=1,t===0&&(r?.(),r=void 0,ze(n))})})))}}var fr=Ae|Re;function ar(e,t,n,r){new or(e,t,n,r)}class or{parent;is_pending=!1;transform_error;#e;#a=null;#t;#l;#r;#n=null;#i=null;#s=null;#f=null;#o=0;#u=0;#v=!1;#d=new Set;#h=new Set;#c=null;#w=lr(()=>(this.#c=ye(this.#o),()=>{this.#c=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#l=s=>{var f=y;f.b=this,f.f|=rt,r(s)},this.parent=y.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#r=bt(()=>{this.#g()},fr)}#b(){try{this.#n=F(()=>this.#l(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#s=F(()=>{n(this.#e,()=>t,()=>()=>{})}))}#E(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#i=F(()=>t(this.#e)),_e(()=>{var n=this.#f=document.createDocumentFragment(),r=pe();n.append(r),this.#n=this.#p(()=>F(()=>this.#l(r))),this.#u===0&&(this.#e.before(n),this.#f=null,ge(this.#i,()=>{this.#i=null}),this.#_(E))}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#o=0,this.#n=F(()=>{this.#l(this.#e)}),this.#u>0){var t=this.#f=document.createDocumentFragment();St(this.#n,t);const n=this.#t.pending;this.#i=F(()=>n(this.#e))}else this.#_(E)}catch(n){this.error(n)}}#_(t){this.is_pending=!1;for(const n of this.#d)S(n,M),t.schedule(n);for(const n of this.#h)S(n,K),t.schedule(n);this.#d.clear(),this.#h.clear()}defer_effect(t){Kt(t,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=y,r=m,i=R;Z(this.#r),z(this.#r),Pe(this.#r.ctx);try{return ue.ensure(),t()}catch(s){return Ut(s),null}finally{Z(n),z(r),Pe(i)}}#m(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t,n);return}this.#u+=t,this.#u===0&&(this.#_(n),this.#i&&ge(this.#i,()=>{this.#i=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t,n){this.#m(t,n),this.#o+=t,!(!this.#c||this.#v)&&(this.#v=!0,_e(()=>{this.#v=!1,this.#c&&Ne(this.#c,this.#o)}))}get_effect_pending(){return this.#w(),p(this.#c)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#n&&(P(this.#n),this.#n=null),this.#i&&(P(this.#i),this.#i=null),this.#s&&(P(this.#s),this.#s=null);var i=!1,s=!1;const f=()=>{if(i){$n();return}i=!0,s&&Wn(),this.#s!==null&&ge(this.#s,()=>{this.#s=null}),this.#p(()=>{this.#g()})},l=a=>{try{s=!0,n?.(a,f),s=!1}catch(o){se(o,this.#r&&this.#r.parent)}r&&(this.#s=this.#p(()=>{try{return F(()=>{var o=y;o.b=this,o.f|=rt,r(this.#e,()=>a,()=>f)})}catch(o){return se(o,this.#r.parent),null}}))};_e(()=>{var a;try{a=this.transform_error(t)}catch(o){se(o,this.#r&&this.#r.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,o=>se(o,this.#r&&this.#r.parent)):l(a)})}}function ur(e,t,n,r){const i=pt;var s=e.filter(v=>!v.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var f=y,l=cr(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(v=>v.promise)):null;function o(v){l();try{r(v)}catch(h){(f.f&U)===0&&se(h,f)}We()}if(n.length===0){a.then(()=>o(t.map(i)));return}var c=Jt();function d(){Promise.all(n.map(v=>vr(v))).then(v=>o([...t.map(i),...v])).catch(v=>se(v,f)).finally(()=>c())}a?a.then(()=>{l(),d(),We()}):d()}function cr(){var e=y,t=m,n=R,r=E;return function(s=!0){Z(e),z(t),Pe(n),s&&(e.f&U)===0&&(r?.activate(),r?.apply())}}function We(e=!0){Z(null),z(null),Pe(null),e&&E?.deactivate()}function Jt(){var e=y.b,t=E,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function pt(e){var t=T|M,n=m!==null&&(m.f&T)!==0?m:null;return y!==null&&(y.f|=Re),{ctx:R,deps:null,effects:null,equals:Bt,f:t,fn:e,reactions:null,rv:0,v:k,wv:0,parent:n??y,ac:null}}function vr(e,t,n){let r=y;r===null&&zn();var i=void 0,s=ye(k),f=!m,l=new Map;return Tr(()=>{var a=y,o=jt();i=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).finally(We)}catch(h){o.reject(h),We()}var c=E;if(f){if((a.f&Se)!==0)var d=Jt();if(r.b.is_rendered())l.get(c)?.reject(ee),l.delete(c);else{for(const h of l.values())h.reject(ee);l.clear()}l.set(c,o)}const v=(h,u=void 0)=>{if(d){var g=u===ee;d(g)}if(!(u===ee||(a.f&U)!==0)){if(c.activate(),u)s.f|=ae,Ne(s,u);else{(s.f&ae)!==0&&(s.f^=ae),Ne(s,h);for(const[_,w]of l){if(l.delete(_),_===c)break;w.reject(ee)}}c.deactivate()}};o.promise.then(v,h=>v(null,h||"unknown"))}),an(()=>{for(const a of l.values())a.reject(ee)}),new Promise(a=>{function o(c){function d(){c===i?a(s):o(i)}c.then(d,d)}o(i)})}function le(e){const t=pt(e);return _n(t),t}function dr(e){const t=pt(e);return t.equals=Ht,t}function hr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)P(t[n])}}function _r(e){for(var t=e.parent;t!==null;){if((t.f&T)===0)return(t.f&U)===0?t:null;t=t.parent}return null}function gt(e){var t,n=y;Z(_r(e));try{e.f&=~be,hr(e),t=wn(e)}finally{Z(n)}return t}function Qt(e){var t=gt(e);if(!e.equals(t)&&(e.wv=gn(),(!E?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){S(e,x);return}Ee||(W!==null?(wt()||E?.is_fork)&&W.set(e,t):ht(e))}function pr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ee),t.teardown=Cn,t.ac=null,Ve(t,0),yt(t))}function $t(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Oe(t)}let lt=new Set;const oe=new Map;let en=!1;function ye(e,t){var n={f:0,v:e,reactions:null,equals:Bt,rv:0,wv:0};return n}function D(e,t){const n=ye(e);return _n(n),n}function gr(e,t=!1,n=!0){const r=ye(e);return t||(r.equals=Ht),r}function H(e,t,n=!1){m!==null&&(!V||(m.f&kt)!==0)&&Vt()&&(m.f&(T|ce|dt|kt))!==0&&(j===null||!Me.call(j,e))&&Gn();let r=n?fe(t):t;return Ne(e,r,Ke)}function Ne(e,t,n=null){if(!e.equals(t)){var r=e.v;Ee?oe.set(e,t):oe.set(e,r),e.v=t;var i=ue.ensure();if(i.capture(e,r),(e.f&T)!==0){const s=e;(e.f&M)!==0&&gt(s),ht(s)}e.wv=gn(),tn(e,M,n),y!==null&&(y.f&x)!==0&&(y.f&(Y|we))===0&&(C===null?Pr([e]):C.push(e)),!i.is_fork&&lt.size>0&&!en&&mr()}return t}function mr(){en=!1;for(const e of lt)(e.f&x)!==0&&S(e,K),Ue(e)&&Oe(e);lt.clear()}function ze(e){H(e,e.v+1)}function tn(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var f=r[s],l=f.f,a=(l&M)===0;if(a&&S(f,t),(l&T)!==0){var o=f;W?.delete(o),(l&be)===0&&(l&L&&(f.f|=be),tn(o,K,n))}else if(a){var c=f;(l&ce)!==0&&$!==null&&$.add(c),n!==null?n.push(c):_t(c)}}}function fe(e){if(typeof e!="object"||e===null||tt in e)return e;const t=Lt(e);if(t!==On&&t!==Rn)return e;var n=new Map,r=It(e),i=D(0),s=me,f=l=>{if(me===s)return l();var a=m,o=me;z(null),Ot(s);var c=l();return z(a),Ot(o),c};return r&&n.set("length",D(e.length)),new Proxy(e,{defineProperty(l,a,o){(!("value"in o)||o.configurable===!1||o.enumerable===!1||o.writable===!1)&&Yn();var c=n.get(a);return c===void 0?f(()=>{var d=D(o.value);return n.set(a,d),d}):H(c,o.value,!0),!0},deleteProperty(l,a){var o=n.get(a);if(o===void 0){if(a in l){const c=f(()=>D(k));n.set(a,c),ze(i)}}else H(o,k),ze(i);return!0},get(l,a,o){if(a===tt)return e;var c=n.get(a),d=a in l;if(c===void 0&&(!d||je(l,a)?.writable)&&(c=f(()=>{var h=fe(d?l[a]:k),u=D(h);return u}),n.set(a,c)),c!==void 0){var v=p(c);return v===k?void 0:v}return Reflect.get(l,a,o)},getOwnPropertyDescriptor(l,a){var o=Reflect.getOwnPropertyDescriptor(l,a);if(o&&"value"in o){var c=n.get(a);c&&(o.value=p(c))}else if(o===void 0){var d=n.get(a),v=d?.v;if(d!==void 0&&v!==k)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return o},has(l,a){if(a===tt)return!0;var o=n.get(a),c=o!==void 0&&o.v!==k||Reflect.has(l,a);if(o!==void 0||y!==null&&(!c||je(l,a)?.writable)){o===void 0&&(o=f(()=>{var v=c?fe(l[a]):k,h=D(v);return h}),n.set(a,o));var d=p(o);if(d===k)return!1}return c},set(l,a,o,c){var d=n.get(a),v=a in l;if(r&&a==="length")for(var h=o;h<d.v;h+=1){var u=n.get(h+"");u!==void 0?H(u,k):h in l&&(u=f(()=>D(k)),n.set(h+"",u))}if(d===void 0)(!v||je(l,a)?.writable)&&(d=f(()=>D(void 0)),H(d,fe(o)),n.set(a,d));else{v=d.v!==k;var g=f(()=>fe(o));H(d,g)}var _=Reflect.getOwnPropertyDescriptor(l,a);if(_?.set&&_.set.call(c,o),!v){if(r&&typeof a=="string"){var w=n.get("length"),b=Number(a);Number.isInteger(b)&&b>=w.v&&H(w,b+1)}ze(i)}return!0},ownKeys(l){p(i);var a=Reflect.ownKeys(l).filter(d=>{var v=n.get(d);return v===void 0||v.v!==k});for(var[o,c]of n)c.v!==k&&!(o in l)&&a.push(o);return a},setPrototypeOf(){Kn()}})}var Pt,nn,rn,sn;function wr(){if(Pt===void 0){Pt=window,nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;rn=je(t,"firstChild").get,sn=je(t,"nextSibling").get,xt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),xt(n)&&(n.__t=void 0)}}function pe(e=""){return document.createTextNode(e)}function ln(e){return rn.call(e)}function et(e){return sn.call(e)}function I(e,t){return ln(e)}function ne(e,t=1,n=!1){let r=e;for(;t--;)r=et(r);return r}function br(e){e.textContent=""}function fn(){return!1}function yr(e,t,n){return document.createElementNS(qt,e,void 0)}function mt(e){var t=m,n=y;z(null),Z(null);try{return e()}finally{z(t),Z(n)}}function Er(e){y===null&&(m===null&&Vn(),Hn()),Ee&&Bn()}function Sr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ve(e,t){var n=y;n!==null&&(n.f&O)!==0&&(e|=O);var r={ctx:R,deps:null,nodes:null,f:e|M|L,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&Be)!==0)Te!==null?Te.push(r):ue.ensure().schedule(r);else if(t!==null){try{Oe(r)}catch(f){throw P(r),f}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Re)===0&&(i=i.first,(e&ce)!==0&&(e&Ae)!==0&&i!==null&&(i.f|=Ae))}if(i!==null&&(i.parent=n,n!==null&&Sr(i,n),m!==null&&(m.f&T)!==0&&(e&we)===0)){var s=m;(s.effects??=[]).push(i)}return r}function wt(){return m!==null&&!V}function an(e){const t=ve(Je,null);return S(t,x),t.teardown=e,t}function on(e){Er();var t=y.f,n=!m&&(t&Y)!==0&&(t&Se)===0;if(n){var r=R;(r.e??=[]).push(e)}else return un(e)}function un(e){return ve(Be|In,e)}function xr(e){ue.ensure();const t=ve(we|Re,e);return(n={})=>new Promise(r=>{n.outro?ge(t,()=>{P(t),r(void 0)}):(P(t),r(void 0))})}function Tr(e){return ve(dt|Re,e)}function kr(e,t=0){return ve(Je|t,e)}function He(e,t=[],n=[],r=[]){ur(r,t,n,i=>{ve(Je,()=>e(...i.map(p)))})}function bt(e,t=0){var n=ve(ce|t,e);return n}function F(e){return ve(Y|Re,e)}function cn(e){var t=e.teardown;if(t!==null){const n=Ee,r=m;Nt(!0),z(null);try{t.call(null)}finally{Nt(n),z(r)}}}function yt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&mt(()=>{i.abort(ee)});var r=n.next;(n.f&we)!==0?n.parent=null:P(n,t),n=r}}function Mr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Y)===0&&P(t),t=n}}function P(e,t=!0){var n=!1;(t||(e.f&Fn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ar(e.nodes.start,e.nodes.end),n=!0),S(e,Tt),yt(e,t&&!n),Ve(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();cn(e),e.f^=Tt,e.f|=U;var i=e.parent;i!==null&&i.first!==null&&vn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ar(e,t){for(;e!==null;){var n=e===t?null:et(e);e.remove(),e=n}}function vn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ge(e,t,n=!0){var r=[];dn(e,r,!0);var i=()=>{n&&P(e),t&&t()},s=r.length;if(s>0){var f=()=>--s||i();for(var l of r)l.out(f)}else i()}function dn(e,t,n){if((e.f&O)===0){e.f^=O;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,f=(i.f&Ae)!==0||(i.f&Y)!==0&&(e.f&ce)!==0;dn(i,t,f?n:!1),i=s}}}function Et(e){hn(e,!0)}function hn(e,t){if((e.f&O)!==0){e.f^=O,(e.f&x)===0&&(S(e,M),ue.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Ae)!==0||(n.f&Y)!==0;hn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const f of s)(f.is_global||t)&&f.in()}}function St(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:et(n);t.append(n),n=i}}let Ge=!1,Ee=!1;function Nt(e){Ee=e}let m=null,V=!1;function z(e){m=e}let y=null;function Z(e){y=e}let j=null;function _n(e){m!==null&&(j===null?j=[e]:j.push(e))}let A=null,N=0,C=null;function Pr(e){C=e}let pn=1,he=0,me=he;function Ot(e){me=e}function gn(){return++pn}function Ue(e){var t=e.f;if((t&M)!==0)return!0;if(t&T&&(e.f&=~be),(t&K)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Ue(s)&&Qt(s),s.wv>e.wv)return!0}(t&L)!==0&&W===null&&S(e,x)}return!1}function mn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(j!==null&&Me.call(j,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&T)!==0?mn(s,t,!1):t===s&&(n?S(s,M):(s.f&x)!==0&&S(s,K),_t(s))}}function wn(e){var t=A,n=N,r=C,i=m,s=j,f=R,l=V,a=me,o=e.f;A=null,N=0,C=null,m=(o&(Y|we))===0?e:null,j=null,Pe(e.ctx),V=!1,me=++he,e.ac!==null&&(mt(()=>{e.ac.abort(ee)}),e.ac=null);try{e.f|=it;var c=e.fn,d=c();e.f|=Se;var v=e.deps,h=E?.is_fork;if(A!==null){var u;if(h||Ve(e,N),v!==null&&N>0)for(v.length=N+A.length,u=0;u<A.length;u++)v[N+u]=A[u];else e.deps=v=A;if(wt()&&(e.f&L)!==0)for(u=N;u<v.length;u++)(v[u].reactions??=[]).push(e)}else!h&&v!==null&&N<v.length&&(Ve(e,N),v.length=N);if(Vt()&&C!==null&&!V&&v!==null&&(e.f&(T|K|M))===0)for(u=0;u<C.length;u++)mn(C[u],e);if(i!==null&&i!==e){if(he++,i.deps!==null)for(let g=0;g<n;g+=1)i.deps[g].rv=he;if(t!==null)for(const g of t)g.rv=he;C!==null&&(r===null?r=C:r.push(...C))}return(e.f&ae)!==0&&(e.f^=ae),d}catch(g){return Ut(g)}finally{e.f^=it,A=t,N=n,C=r,m=i,j=s,Pe(f),V=l,me=a}}function Nr(e,t){let n=t.reactions;if(n!==null){var r=An.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&T)!==0&&(A===null||!Me.call(A,t))){var s=t;(s.f&L)!==0&&(s.f^=L,s.f&=~be),ht(s),pr(s),Ve(s,0)}}function Ve(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Nr(e,n[r])}function Oe(e){var t=e.f;if((t&U)===0){S(e,x);var n=y,r=Ge;y=e,Ge=!0;try{(t&(ce|zt))!==0?Mr(e):yt(e),cn(e);var i=wn(e);e.teardown=typeof i=="function"?i:null,e.wv=pn;var s;Mn&&tr&&(e.f&M)!==0&&e.deps}finally{Ge=r,y=n}}}function p(e){var t=e.f,n=(t&T)!==0;if(m!==null&&!V){var r=y!==null&&(y.f&U)!==0;if(!r&&(j===null||!Me.call(j,e))){var i=m.deps;if((m.f&it)!==0)e.rv<he&&(e.rv=he,A===null&&i!==null&&i[N]===e?N++:A===null?A=[e]:A.push(e));else{(m.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[m]:Me.call(s,m)||s.push(m)}}}if(Ee&&oe.has(e))return oe.get(e);if(n){var f=e;if(Ee){var l=f.v;return((f.f&x)===0&&f.reactions!==null||yn(f))&&(l=gt(f)),oe.set(f,l),l}var a=(f.f&L)===0&&!V&&m!==null&&(Ge||(m.f&L)!==0),o=(f.f&Se)===0;Ue(f)&&(a&&(f.f|=L),Qt(f)),a&&!o&&($t(f),bn(f))}if(W?.has(e))return W.get(e);if((e.f&ae)!==0)throw e.v;return e.v}function bn(e){if(e.f|=L,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&T)!==0&&(t.f&L)===0&&($t(t),bn(t))}function yn(e){if(e.v===k)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(oe.has(t)||(t.f&T)!==0&&yn(t))return!0;return!1}function En(e){var t=V;try{return V=!0,e()}finally{V=t}}const Or=["touchstart","touchmove"];function Rr(e){return Or.includes(e)}const Ie=Symbol("events"),Sn=new Set,ft=new Set;function Cr(e,t,n,r={}){function i(s){if(r.capture||at.call(t,s),!s.cancelBubble)return mt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?_e(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Dr(e,t,n,r,i){var s={capture:r,passive:i},f=Cr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&an(()=>{t.removeEventListener(e,f,s)})}function Fr(e,t,n){(t[Ie]??={})[e]=n}function Ir(e){for(var t=0;t<e.length;t++)Sn.add(e[t]);for(var n of ft)n(e)}let Rt=null;function at(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Rt=e;var f=0,l=Rt===e&&e[Ie];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[Ie]=t;return}var o=i.indexOf(t);if(o===-1)return;a<=o&&(f=a)}if(s=i[f]||e.target,s!==t){Pn(e,"currentTarget",{configurable:!0,get(){return s||n}});var c=m,d=y;z(null),Z(null);try{for(var v,h=[];s!==null;){var u=s.assignedSlot||s.parentNode||s.host||null;try{var g=s[Ie]?.[r];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(_){v?h.push(_):v=_}if(e.cancelBubble||u===t||u===null)break;s=u}if(v){for(let _ of h)queueMicrotask(()=>{throw _});throw v}}finally{e[Ie]=t,delete e.currentTarget,z(c),Z(d)}}}const Lr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function jr(e){return Lr?.createHTML(e)??e}function zr(e){var t=yr("template");return t.innerHTML=jr(e.replaceAll("<!>","<!---->")),t.content}function qr(e,t){var n=y;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function J(e,t){var n=(t&Qn)!==0,r,i=!e.startsWith("<!>");return()=>{r===void 0&&(r=zr(i?e:"<!>"+e),r=ln(r));var s=n||nn?document.importNode(r,!0):r.cloneNode(!0);return qr(s,s),s}}function X(e,t){e!==null&&e.before(t)}function Xe(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Br(e,t){return Hr(e,t)}const Ye=new Map;function Hr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:f=!0,transformError:l}){wr();var a=void 0,o=xr(()=>{var c=n??t.appendChild(pe());ar(c,{pending:()=>{}},h=>{Qe({});var u=R;s&&(u.c=s),i&&(r.$$events=i),a=e(h,r)||{},$e()},l);var d=new Set,v=h=>{for(var u=0;u<h.length;u++){var g=h[u];if(!d.has(g)){d.add(g);var _=Rr(g);for(const q of[t,document]){var w=Ye.get(q);w===void 0&&(w=new Map,Ye.set(q,w));var b=w.get(g);b===void 0?(q.addEventListener(g,at,{passive:_}),w.set(g,1)):w.set(g,b+1)}}}};return v(Ze(Sn)),ft.add(v),()=>{for(var h of d)for(const _ of[t,document]){var u=Ye.get(_),g=u.get(h);--g==0?(_.removeEventListener(h,at),u.delete(h),u.size===0&&Ye.delete(_)):u.set(h,g)}ft.delete(v),c!==n&&c.parentNode?.removeChild(c)}});return Vr.set(a,o),a}let Vr=new WeakMap;class Ur{anchor;#e=new Map;#a=new Map;#t=new Map;#l=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#n=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#a.get(n);if(r)Et(r),this.#l.delete(n);else{var i=this.#t.get(n);i&&(this.#a.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,f]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#t.get(f);l&&(P(l.effect),this.#t.delete(f))}for(const[s,f]of this.#a){if(s===n||this.#l.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var o=document.createDocumentFragment();St(f,o),o.append(pe()),this.#t.set(s,{effect:f,fragment:o})}else P(f);this.#l.delete(s),this.#a.delete(s)};this.#r||!r?(this.#l.add(s),ge(f,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(P(i.effect),this.#t.delete(r))};ensure(t,n){var r=E,i=fn();if(n&&!this.#a.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),f=pe();s.append(f),this.#t.set(t,{effect:F(()=>n(f)),fragment:s})}else this.#a.set(t,F(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,a]of this.#a)l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of this.#t)l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#n),r.ondiscard(this.#i)}else this.#n(r)}}function ke(e,t,n=!1){var r=new Ur(e),i=n?Ae:0;function s(f,l){r.ensure(f,l)}bt(()=>{var f=!1;t((l,a=0)=>{f=!0,s(a,l)}),f||s(-1,null)},i)}function ot(e,t){return t}function Yr(e,t,n){for(var r=[],i=t.length,s,f=t.length,l=0;l<i;l++){let d=t[l];ge(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var v=e.outrogroups;ut(e,Ze(s.done)),v.delete(s),v.size===0&&(e.outrogroups=null)}}else f-=1},!1)}if(f===0){var a=r.length===0&&n!==null;if(a){var o=n,c=o.parentNode;br(c),c.append(o),e.items.clear()}ut(e,t,!a)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function ut(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const f of e.pending.values())for(const l of f)r.add(e.items.get(l).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=te;const f=document.createDocumentFragment();St(s,f)}else P(t[i],n)}}var Ct;function ct(e,t,n,r,i,s=null){var f=e,l=new Map;{var a=e;f=a.appendChild(pe())}var o=null,c=dr(()=>{var b=n();return It(b)?b:b==null?[]:Ze(b)}),d,v=new Map,h=!0;function u(b){(w.effect.f&U)===0&&(w.pending.delete(b),w.fallback=o,Kr(w,d,f,t,r),o!==null&&(d.length===0?(o.f&te)===0?Et(o):(o.f^=te,Le(o,null,f)):ge(o,()=>{o=null})))}function g(b){w.pending.delete(b)}var _=bt(()=>{d=p(c);for(var b=d.length,q=new Set,G=E,de=fn(),re=0;re<b;re+=1){var Ce=d[re],B=r(Ce,re),Q=h?null:l.get(B);Q?(Q.v&&Ne(Q.v,Ce),Q.i&&Ne(Q.i,re),de&&G.unskip_effect(Q.e)):(Q=Gr(l,h?f:Ct??=pe(),Ce,B,re,i,t,n),h||(Q.e.f|=te),l.set(B,Q)),q.add(B)}if(b===0&&s&&!o&&(h?o=F(()=>s(f)):(o=F(()=>s(Ct??=pe())),o.f|=te)),b>q.size&&qn(),!h)if(v.set(G,q),de){for(const[Tn,kn]of l)q.has(Tn)||G.skip_effect(kn.e);G.oncommit(u),G.ondiscard(g)}else u(G);p(c)}),w={effect:_,items:l,pending:v,outrogroups:null,fallback:o};h=!1}function Fe(e){for(;e!==null&&(e.f&Y)===0;)e=e.next;return e}function Kr(e,t,n,r,i){var s=t.length,f=e.items,l=Fe(e.effect.first),a,o=null,c=[],d=[],v,h,u,g;for(g=0;g<s;g+=1){if(v=t[g],h=i(v,g),u=f.get(h).e,e.outrogroups!==null)for(const B of e.outrogroups)B.pending.delete(u),B.done.delete(u);if((u.f&te)!==0)if(u.f^=te,u===l)Le(u,null,n);else{var _=o?o.next:l;u===e.effect.last&&(e.effect.last=u.prev),u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),ie(e,o,u),ie(e,u,_),Le(u,_,n),o=u,c=[],d=[],l=Fe(o.next);continue}if((u.f&O)!==0&&Et(u),u!==l){if(a!==void 0&&a.has(u)){if(c.length<d.length){var w=d[0],b;o=w.prev;var q=c[0],G=c[c.length-1];for(b=0;b<c.length;b+=1)Le(c[b],w,n);for(b=0;b<d.length;b+=1)a.delete(d[b]);ie(e,q.prev,G.next),ie(e,o,q),ie(e,G,w),l=w,o=G,g-=1,c=[],d=[]}else a.delete(u),Le(u,l,n),ie(e,u.prev,u.next),ie(e,u,o===null?e.effect.first:o.next),ie(e,o,u),o=u;continue}for(c=[],d=[];l!==null&&l!==u;)(a??=new Set).add(l),d.push(l),l=Fe(l.next);if(l===null)continue}(u.f&te)===0&&c.push(u),o=u,l=Fe(u.next)}if(e.outrogroups!==null){for(const B of e.outrogroups)B.pending.size===0&&(ut(e,Ze(B.done)),e.outrogroups?.delete(B));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||a!==void 0){var de=[];if(a!==void 0)for(u of a)(u.f&O)===0&&de.push(u);for(;l!==null;)(l.f&O)===0&&l!==e.fallback&&de.push(l),l=Fe(l.next);var re=de.length;if(re>0){var Ce=s===0?n:null;Yr(e,de,Ce)}}}function Gr(e,t,n,r,i,s,f,l){var a=(f&Xn)!==0?(f&Jn)===0?gr(n,!1,!1):ye(n):null,o=(f&Zn)!==0?ye(i):null;return{v:a,i:o,e:F(()=>(s(t,a??n,o??i,l),()=>{e.delete(r)}))}}function Le(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&te)===0?t.nodes.start:n;r!==null;){var f=et(r);if(s.before(r),r===i)return;r=f}}function ie(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Dt=[...`
2
+ \r\f \v\uFEFF`];function Wr(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,f=0;(f=r.indexOf(i,f))>=0;){var l=f+s;(f===0||Dt.includes(r[f-1]))&&(l===r.length||Dt.includes(r[l]))?r=(f===0?"":r.substring(0,f))+r.substring(l+1):f=l}}return r===""?null:r}function xn(e,t,n,r,i,s){var f=e.__className;if(f!==n||f===void 0){var l=Wr(n,r,s);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(s&&i!==s)for(var a in s){var o=!!s[a];(i==null||o!==!!i[a])&&e.classList.toggle(a,o)}return s}const Xr=Symbol("is custom element"),Zr=Symbol("is html");function qe(e,t,n,r){var i=Jr(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ln]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Qr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Jr(e){return e.__attributes??={[Xr]:e.nodeName.includes("-"),[Zr]:e.namespaceURI===qt}}var Ft=new Map;function Qr(e){var t=e.getAttribute("is")||e.nodeName,n=Ft.get(t);if(n)return n;Ft.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Nn(i);for(var f in r)r[f].set&&n.push(f);i=Lt(i)}return n}function $r(e){R===null&&jn(),on(()=>{const t=En(e);if(typeof t=="function")return t})}const ei="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ei);const ti="/api/ext/pages";async function ni(){const e=await fetch(ti);return e.ok?e.json():(console.warn(`Failed to fetch pages data: HTTP ${e.status}`),{sites:[],recentPages:[]})}var ri=J('<div class="thumbnail-sublabel svelte-yqwgpu"> </div>'),ii=J('<button class="thumbnail-card svelte-yqwgpu"><div class="thumbnail-frame svelte-yqwgpu"><iframe loading="lazy" sandbox="allow-same-origin"></iframe></div> <div class="thumbnail-label svelte-yqwgpu"> </div> <!></button>');function vt(e,t){let n=D(!1);var r=ii(),i=I(r),s=I(i);qe(s,"tabindex",-1);let f;var l=ne(i,2),a=I(l),o=ne(l,2);{var c=d=>{var v=ri(),h=I(v);He(()=>Xe(h,t.sublabel)),X(d,v)};ke(o,d=>{t.sublabel&&d(c)})}He(()=>{qe(s,"src",t.url),qe(s,"title",t.label),f=xn(s,1,"svelte-yqwgpu",null,f,{loaded:p(n)}),Xe(a,t.label)}),Fr("click",r,function(...d){t.onclick?.apply(this,d)}),Dr("load",s,()=>H(n,!0)),X(e,r)}Ir(["click"]);var si=J('<div class="section svelte-apzsoj"><div class="section-header svelte-apzsoj"><span class="section-title svelte-apzsoj">sites</span></div> <div class="thumbnail-grid svelte-apzsoj"></div></div>'),li=J('<div class="section svelte-apzsoj"><div class="section-header svelte-apzsoj"><span class="section-title svelte-apzsoj">recently modified</span></div> <div class="thumbnail-grid svelte-apzsoj"></div></div>'),fi=J('<div class="empty svelte-apzsoj">No pages published yet.</div>'),ai=J('<div class="dashboard svelte-apzsoj"><!> <!> <!></div>');function oi(e,t){Qe(t,!0);function n(c){const d=Math.floor((Date.now()-new Date(c).getTime())/1e3);if(d<60)return"just now";const v=Math.floor(d/60);if(v<60)return`${v}m ago`;const h=Math.floor(v/60);if(h<24)return`${h}h ago`;const u=Math.floor(h/24);return u<30?`${u}d ago`:`${Math.floor(u/30)}mo ago`}var r=ai(),i=I(r);{var s=c=>{var d=si(),v=ne(I(d),2);ct(v,21,()=>t.sites,ot,(h,u)=>{{let g=le(()=>p(u).pages[0]?`/ext/pages/public/${p(u).name}/${p(u).pages[0].file}`:"about:blank");vt(h,{get url(){return p(g)},get label(){return p(u).label},onclick:()=>t.onSelectSite(p(u).name)})}}),X(c,d)};ke(i,c=>{t.sites.length>0&&c(s)})}var f=ne(i,2);{var l=c=>{var d=li(),v=ne(I(d),2);ct(v,21,()=>t.recentPages,ot,(h,u)=>{{let g=le(()=>`/ext/pages/public/${p(u).mind}/${p(u).file}`),_=le(()=>p(u).mind),w=le(()=>n(p(u).modified));vt(h,{get url(){return p(g)},get label(){return p(u).file},get sublabel(){return`${p(_)??""} · ${p(w)??""}`},onclick:()=>t.onSelectPage(p(u).mind,p(u).file)})}}),X(c,d)};ke(f,c=>{t.recentPages.length>0&&c(l)})}var a=ne(f,2);{var o=c=>{var d=fi();X(c,d)};ke(a,c=>{t.sites.length===0&&t.recentPages.length===0&&c(o)})}X(e,r),$e()}var ui=J('<div class="empty svelte-vvnkg1">No pages in this site.</div>'),ci=J('<div class="site-view svelte-vvnkg1"><div class="site-header svelte-vvnkg1"><span class="site-name svelte-vvnkg1"> </span> <span class="page-count svelte-vvnkg1"> </span></div> <div class="thumbnail-grid svelte-vvnkg1"></div> <!></div>');function vi(e,t){Qe(t,!0);function n(v){const h=Math.floor((Date.now()-new Date(v).getTime())/1e3);if(h<60)return"just now";const u=Math.floor(h/60);if(u<60)return`${u}m ago`;const g=Math.floor(u/60);if(g<24)return`${g}h ago`;const _=Math.floor(g/24);return _<30?`${_}d ago`:`${Math.floor(_/30)}mo ago`}var r=ci(),i=I(r),s=I(i),f=I(s),l=ne(s,2),a=I(l),o=ne(i,2);ct(o,21,()=>t.site.pages,ot,(v,h)=>{{let u=le(()=>`/ext/pages/public/${t.site.name}/${p(h).file}`),g=le(()=>n(p(h).modified));vt(v,{get url(){return p(u)},get label(){return p(h).file},get sublabel(){return p(g)},onclick:()=>t.onSelectPage(t.site.name,p(h).file)})}});var c=ne(o,2);{var d=v=>{var h=ui();X(v,h)};ke(c,v=>{t.site.pages.length===0&&v(d)})}He(()=>{Xe(f,t.site.label),Xe(a,`${t.site.pages.length??""} ${t.site.pages.length===1?"page":"pages"}`)}),X(e,r),$e()}var di=J('<iframe class="full-page-iframe svelte-1r8vfx3"></iframe>'),hi=J("<div><!></div>");function _i(e,t){Qe(t,!0);let n=D(fe(window.location.hash));$r(()=>{const _=()=>{H(n,window.location.hash,!0)};return window.addEventListener("hashchange",_),()=>window.removeEventListener("hashchange",_)});let r=le(()=>{const _=p(n).replace(/^#\/?/,""),w=_.match(/^mind\/([^/]+)/);if(w)return{view:"mind",name:w[1]};const b=_.match(/^([^/]+)\/(.+)$/);return b?{view:"page",name:b[1],path:b[2]}:_&&!_.includes("/")?{view:"site",name:_}:{view:"dashboard"}}),i=D(fe([])),s=D(fe([]));on(()=>{ni().then(_=>{H(i,_.sites,!0),H(s,_.recentPages,!0)})});let f=le(()=>{if(p(r).view==="site")return p(i).find(_=>_.name===p(r).name);if(p(r).view==="mind")return p(i).find(_=>_.name===p(r).name)});function l(_){window.parent.postMessage({type:"navigate",path:_},"*")}function a(_,w){l(_==="_system"?`/pages/_system/${w}`:`/minds/${_}/pages/${w}`)}function o(_){l(_==="_system"?"/pages/_system":`/minds/${_}/pages`)}var c=hi();let d;var v=I(c);{var h=_=>{var w=di();He(()=>{qe(w,"src",`/ext/pages/public/${p(r).name??""}/${p(r).path??""}`),qe(w,"title",`${p(r).name??""}/${p(r).path??""}`)}),X(_,w)},u=_=>{vi(_,{get site(){return p(f)},onSelectPage:a})},g=_=>{oi(_,{get sites(){return p(i)},get recentPages(){return p(s)},onSelectSite:o,onSelectPage:a})};ke(v,_=>{p(r).view==="page"?_(h):(p(r).view==="site"||p(r).view==="mind")&&p(f)?_(u,1):_(g,-1)})}He(()=>d=xn(c,1,"ext-app svelte-1r8vfx3",null,d,{"full-page":p(r).view==="page"})),X(e,c),$e()}Br(_i,{target:document.getElementById("app")});
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="stylesheet" href="/ext-theme.css" />
7
+ <title>Pages</title>
8
+ <script type="module" crossorigin src="/ext/pages/assets/index-tLTROSk5.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/ext/pages/assets/index-D0HyS-xQ.css">
10
+ </head>
11
+ <body>
12
+ <div id="app"></div>
13
+ </body>
14
+ </html>
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: Pages
3
+ description: This skill should be used when publishing web pages, checking page status, creating HTML pages, or managing a mind's public web presence. Covers "publish pages", "page status", "create a web page", "my website", "publish to volute.systems".
4
+ ---
5
+
6
+ # Pages
7
+
8
+ Pages let you publish HTML content to the web via volute.systems. Your pages live in `home/public/pages/` and are served locally at `/pages/<mindname>/` and can be published to `https://<system>.volute.systems/~<mindname>/`.
9
+
10
+ ## Creating pages
11
+
12
+ Create HTML files in your `home/public/pages/` directory:
13
+
14
+ ```
15
+ home/public/pages/
16
+ ├── index.html # Main page at /pages/<name>/
17
+ ├── about.html # Available at /pages/<name>/about.html
18
+ └── projects/
19
+ └── index.html # Available at /pages/<name>/projects/
20
+ ```
21
+
22
+ Pages are automatically tracked by the file watcher and appear in the web dashboard.
23
+
24
+ ## Publishing to volute.systems
25
+
26
+ Publishing requires a volute.systems account (set up via `volute systems register` or `volute systems login`).
27
+
28
+ ### API
29
+
30
+ | Method | Endpoint | Purpose |
31
+ |--------|----------|---------|
32
+ | `PUT /api/ext/pages/publish/:name` | Publish pages (`{ files: { "path": "base64content" } }`) |
33
+ | `GET /api/ext/pages/status/:name` | Check publish status (URL, file count, deploy time) |
34
+ | `GET /api/ext/pages/` | List all sites and recent pages |
35
+
36
+ To publish, collect all files from `home/public/pages/`, base64-encode their contents, and PUT them to the publish endpoint.
37
+
38
+ ### Publishing script
39
+
40
+ ```bash
41
+ #!/bin/bash
42
+ # Collect files and publish
43
+ MIND=${VOLUTE_MIND:-$(basename $PWD)}
44
+ FILES=$(find home/public/pages -type f | while read f; do
45
+ REL=${f#home/public/pages/}
46
+ CONTENT=$(base64 < "$f")
47
+ echo "\"$REL\":\"$CONTENT\""
48
+ done | paste -sd, -)
49
+ volute_fetch PUT "/api/ext/pages/publish/$MIND" "{\"files\":{$FILES}}"
50
+ ```
51
+
52
+ ## Tips
53
+
54
+ - Any HTML file in `home/public/pages/` is served locally immediately
55
+ - Subdirectories with `index.html` are served as directory pages
56
+ - Publishing uploads all files to volute.systems for public hosting
57
+ - The system name in your volute.systems URL comes from `volute systems register`
58
+ - Changes to pages trigger `page_updated` activity events
@@ -47,7 +47,7 @@ volute shared log # see recent shared history
47
47
 
48
48
  Files you edit in `shared/` are auto-committed to your branch. When you're ready to share, merge to main. Other minds get your changes by pulling. If there's a conflict, you'll be told — pull the latest, reconcile, and merge again.
49
49
 
50
- The `shared/pages/` directory can be published as the system's shared website with `volute pages publish --system`.
50
+ The `shared/pages/` directory is the system-level website. Publishing is handled via the pages extension API.
51
51
 
52
52
  ## Reference
53
53
 
@@ -14,29 +14,6 @@ if (process.env.VOLUTE_DEBUG === "1") {
14
14
  // Loaded once at startup — mind restarts on config changes
15
15
  const preset = loadTransparencyPreset();
16
16
 
17
- function truncate(str: string, maxLen = 200): string {
18
- return str.length > maxLen ? `${str.slice(0, maxLen)}...` : str;
19
- }
20
-
21
- /** Whether debug-level output is active (disables truncation). */
22
- export function isDebug(): boolean {
23
- return minLevel <= LEVELS.debug;
24
- }
25
-
26
- /** Set the minimum log level. */
27
- export function setLevel(level: LogLevel): void {
28
- if (!(level in LEVELS)) {
29
- console.error(`[logger] unknown log level "${level}", defaulting to info`);
30
- minLevel = LEVELS.info;
31
- return;
32
- }
33
- minLevel = LEVELS[level];
34
- }
35
-
36
- function shouldTruncate(): boolean {
37
- return minLevel > LEVELS.debug;
38
- }
39
-
40
17
  function emit(category: string, args: unknown[]): void {
41
18
  const message = args
42
19
  .map((a) => (a instanceof Error ? a.message : typeof a === "string" ? a : JSON.stringify(a)))
@@ -49,6 +26,16 @@ function emit(category: string, args: unknown[]): void {
49
26
  if (filtered) daemonEmit(filtered).catch(() => {});
50
27
  }
51
28
 
29
+ /** Set the minimum log level. */
30
+ export function setLevel(level: LogLevel): void {
31
+ if (!(level in LEVELS)) {
32
+ console.error(`[logger] unknown log level "${level}", defaulting to info`);
33
+ minLevel = LEVELS.info;
34
+ return;
35
+ }
36
+ minLevel = LEVELS[level];
37
+ }
38
+
52
39
  function write(level: LogLevel, category: string, ...args: unknown[]): void {
53
40
  if (LEVELS[level] < minLevel) return;
54
41
  const ts = new Date().toLocaleString();
@@ -76,32 +63,6 @@ export function error(category: string, ...args: unknown[]) {
76
63
  write("error", category, ...args);
77
64
  }
78
65
 
79
- export function logThinking(thinking: string) {
80
- log("thinking", shouldTruncate() ? truncate(thinking) : thinking);
81
- }
82
-
83
- export function logToolUse(name: string, input: unknown) {
84
- const inputStr = shouldTruncate()
85
- ? truncate(JSON.stringify(input), 100)
86
- : JSON.stringify(input, null, 2);
87
- log("tool", `${name}: ${inputStr}`);
88
- }
89
-
90
- export function logToolResult(name: string, output: string, isError?: boolean) {
91
- const prefix = isError ? "error" : "result";
92
- log("tool", `${name} ${prefix}: ${shouldTruncate() ? truncate(output) : output}`);
93
- }
94
-
95
- export function logText(text: string) {
96
- log("text", shouldTruncate() ? truncate(text) : text);
97
- }
98
-
99
- export function logMessage(direction: "in" | "out", content: string, channel?: string) {
100
- const arrow = direction === "in" ? "<<" : ">>";
101
- const channelStr = channel ? ` [${channel}]` : "";
102
- log("msg", `${arrow}${channelStr}`, shouldTruncate() ? truncate(content) : content);
103
- }
104
-
105
66
  // Prevent EPIPE on stderr from crashing the process (detached variant mode)
106
67
  process.stderr?.on?.("error", () => {});
107
68
  process.stdout?.on?.("error", () => {});
@@ -1,5 +1,5 @@
1
1
  import { formatPrefix, formatTypingSuffix } from "./format-prefix.js";
2
- import { log, logMessage } from "./logger.js";
2
+ import { log } from "./logger.js";
3
3
  import {
4
4
  type BatchConfig,
5
5
  loadRoutingConfig,
@@ -269,12 +269,6 @@ export function createRouter(options: {
269
269
  meta: ChannelMeta,
270
270
  listener?: Listener,
271
271
  ): { messageId: string; unsubscribe: () => void } {
272
- const text = content
273
- .filter((p): p is { type: "text"; text: string } => p.type === "text")
274
- .map((p) => p.text)
275
- .join(" ");
276
- logMessage("in", text, meta.channel);
277
-
278
272
  const messageId = generateMessageId();
279
273
  const noop = () => {};
280
274
  const safeListener = listener ?? noop;
@@ -303,12 +297,10 @@ export function createRouter(options: {
303
297
  meta: ChannelMeta,
304
298
  listener?: Listener,
305
299
  ): { messageId: string; unsubscribe: () => void } {
306
- // Log incoming message
307
300
  const text = content
308
301
  .filter((p): p is { type: "text"; text: string } => p.type === "text")
309
302
  .map((p) => p.text)
310
303
  .join(" ");
311
- logMessage("in", text, meta.channel);
312
304
 
313
305
  // Resolve route from config (re-read on each request for hot-reload)
314
306
  const config = options.configPath ? loadRoutingConfig(options.configPath) : {};
@@ -1,6 +1,6 @@
1
1
  import type { query } from "@anthropic-ai/claude-agent-sdk";
2
2
  import { daemonEmit, type EventType } from "./daemon-client.js";
3
- import { log, logText, logThinking, logToolUse, warn } from "./logger.js";
3
+ import { log, warn } from "./logger.js";
4
4
  import { filterEvent, loadTransparencyPreset } from "./transparency.js";
5
5
  import type { VoluteEvent } from "./types.js";
6
6
 
@@ -60,15 +60,12 @@ export async function consumeStream(
60
60
  for (const b of msg.message.content) {
61
61
  if (b.type === "thinking" && "thinking" in b && b.thinking) {
62
62
  const text = b.thinking as string;
63
- logThinking(text);
64
63
  emit(session, { type: "thinking", content: text });
65
64
  } else if (b.type === "text") {
66
65
  const text = (b as { text: string }).text;
67
- logText(text);
68
66
  emit(session, { type: "text", content: text });
69
67
  } else if (b.type === "tool_use") {
70
68
  const tb = b as { name: string; input: unknown };
71
- logToolUse(tb.name, tb.input);
72
69
  emit(session, {
73
70
  type: "tool_use",
74
71
  content: JSON.stringify(tb.input),
@@ -1,6 +1,6 @@
1
1
  import { commitFileChange } from "./auto-commit.js";
2
2
  import { daemonEmit, type EventType } from "./daemon-client.js";
3
- import { log, logText, logThinking, logToolResult, logToolUse, warn } from "./logger.js";
3
+ import { log, warn } from "./logger.js";
4
4
  import { filterEvent, loadTransparencyPreset } from "./transparency.js";
5
5
  import type { VoluteEvent } from "./types.js";
6
6
 
@@ -44,7 +44,6 @@ export function createEventHandler(session: EventSession, options: EventHandlerO
44
44
 
45
45
  function flushText() {
46
46
  if (textBuf) {
47
- logText(textBuf);
48
47
  emit(session, { type: "text", content: textBuf });
49
48
  textBuf = "";
50
49
  }
@@ -52,7 +51,6 @@ export function createEventHandler(session: EventSession, options: EventHandlerO
52
51
 
53
52
  function flushThinking() {
54
53
  if (thinkingBuf) {
55
- logThinking(thinkingBuf);
56
54
  emit(session, { type: "thinking", content: thinkingBuf });
57
55
  thinkingBuf = "";
58
56
  }
@@ -82,25 +80,15 @@ export function createEventHandler(session: EventSession, options: EventHandlerO
82
80
  if (ae.type === "text_delta") {
83
81
  if (thinkingBuf) flushThinking();
84
82
  textBuf += ae.delta;
85
- // Log complete lines as they arrive
86
- for (let nl = textBuf.indexOf("\n"); nl !== -1; nl = textBuf.indexOf("\n")) {
87
- logText(textBuf.slice(0, nl + 1));
88
- textBuf = textBuf.slice(nl + 1);
89
- }
90
83
  } else if (ae.type === "thinking_delta") {
91
84
  if (textBuf) flushText();
92
85
  thinkingBuf += ae.delta;
93
- for (let nl = thinkingBuf.indexOf("\n"); nl !== -1; nl = thinkingBuf.indexOf("\n")) {
94
- logThinking(thinkingBuf.slice(0, nl + 1));
95
- thinkingBuf = thinkingBuf.slice(nl + 1);
96
- }
97
86
  }
98
87
  }
99
88
 
100
89
  if (event.type === "tool_execution_start") {
101
90
  flushBuffers();
102
91
  toolArgs.set(event.toolCallId, event.args);
103
- logToolUse(event.toolName, event.args);
104
92
  emit(session, {
105
93
  type: "tool_use",
106
94
  content: JSON.stringify(event.args),
@@ -111,7 +99,6 @@ export function createEventHandler(session: EventSession, options: EventHandlerO
111
99
  if (event.type === "tool_execution_end") {
112
100
  const output =
113
101
  typeof event.result === "string" ? event.result : JSON.stringify(event.result);
114
- logToolResult(event.toolName, output, event.isError);
115
102
  emit(session, {
116
103
  type: "tool_result",
117
104
  content: output,