@codrihub/memora 1.3.0 → 1.3.1
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.
- package/assets/app.js +747 -670
- package/assets/index.html +4 -4
- package/assets/login.html +53 -21
- package/assets/offline.html +1 -1
- package/assets/sw.js +1 -1
- package/package.json +4 -4
package/assets/index.html
CHANGED
|
@@ -58,7 +58,7 @@ html,body{margin:0;height:100%;background:#07090e;color:#e8ecf3;overflow:hidden;
|
|
|
58
58
|
<body>
|
|
59
59
|
<div id="app">
|
|
60
60
|
<div id="splash" class="splash" role="status" aria-live="polite">
|
|
61
|
-
<svg class="splash-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
61
|
+
<svg class="splash-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy1" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy1" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy1" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy1)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy1)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy1)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy1)"/></g></svg>
|
|
62
62
|
<div class="splash-name">Memora</div>
|
|
63
63
|
<div class="splash-by">by Codrihub Tech</div>
|
|
64
64
|
<div class="splash-msg" id="splashMsg">Checking your session...</div>
|
|
@@ -74,7 +74,7 @@ html,body{margin:0;height:100%;background:#07090e;color:#e8ecf3;overflow:hidden;
|
|
|
74
74
|
<div class="side-head">
|
|
75
75
|
<div class="brand-wrap">
|
|
76
76
|
<button id="brandHome" class="brand" type="button" aria-label="Memora, open Overview" data-tip="Overview">
|
|
77
|
-
<span class="brand-tile"><svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
77
|
+
<span class="brand-tile"><svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy2" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy2" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy2" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy2)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy2)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy2)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy2)"/></g></svg></span>
|
|
78
78
|
<span class="brand-text">Memora</span>
|
|
79
79
|
</button>
|
|
80
80
|
<button id="brandVersion" class="brand-ver" type="button" title="Memora by Codrihub Tech" aria-label="Version, open Settings">
|
|
@@ -145,7 +145,7 @@ html,body{margin:0;height:100%;background:#07090e;color:#e8ecf3;overflow:hidden;
|
|
|
145
145
|
<main id="main">
|
|
146
146
|
<header id="topbar">
|
|
147
147
|
<button id="sideToggle" class="icon-btn" type="button" title="Open menu" aria-label="Open menu" aria-controls="sidebar">
|
|
148
|
-
<span class="brand-tile sm"><svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
148
|
+
<span class="brand-tile sm"><svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy3" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy3" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy3" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy3)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy3)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy3)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy3)"/></g></svg></span>
|
|
149
149
|
</button>
|
|
150
150
|
<div class="tb-title">
|
|
151
151
|
<div id="crumb" class="crumb">Brain</div>
|
|
@@ -221,6 +221,6 @@ html,body{margin:0;height:100%;background:#07090e;color:#e8ecf3;overflow:hidden;
|
|
|
221
221
|
<div id="toasts" class="toasts" role="status" aria-live="polite"></div>
|
|
222
222
|
</div>
|
|
223
223
|
</div>
|
|
224
|
-
<script src="/app.js?v=
|
|
224
|
+
<script src="/app.js?v=543bdd9d6276"></script>
|
|
225
225
|
</body>
|
|
226
226
|
</html>
|
package/assets/login.html
CHANGED
|
@@ -16,7 +16,7 @@ a();document.addEventListener('DOMContentLoaded',a);if(p==='system'&&m){try{m.ad
|
|
|
16
16
|
<meta name="color-scheme" content="dark light">
|
|
17
17
|
<meta name="theme-color" content="#0b0e14">
|
|
18
18
|
<title>Sign in - Memora</title>
|
|
19
|
-
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%221%201%2022%2022%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%
|
|
19
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%221%201%2022%2022%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22mmg70rwy4%22%20x1%3D%223%22%20y1%3D%223%22%20x2%3D%2221%22%20y2%3D%2221%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%235eead4%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2322d3ee%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22mmt70rwy4%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%2224%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%2317202e%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%230b0f17%22%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%22mmc70rwy4%22%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20r%3D%2250%25%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffffff%22%2F%3E%3Cstop%20offset%3D%22.55%22%20stop-color%3D%22%23a5f3fc%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2322d3ee%22%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22none%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%226.2%22%20fill%3D%22url(%23mmt70rwy4)%22%2F%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%226.2%22%20fill%3D%22none%22%20stroke%3D%22url(%23mmg70rwy4)%22%20stroke-opacity%3D%22.55%22%20stroke-width%3D%22.8%22%2F%3E%3Cpath%20d%3D%22M7.2%2016.8V7.4l4.8%205.1%204.8-5.1v9.4%22%20fill%3D%22none%22%20stroke%3D%22url(%23mmg70rwy4)%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Ccircle%20cx%3D%227.2%22%20cy%3D%2216.8%22%20r%3D%221.7%22%20fill%3D%22%235eead4%22%2F%3E%3Ccircle%20cx%3D%227.2%22%20cy%3D%227.4%22%20r%3D%221.7%22%20fill%3D%22%235eead4%22%2F%3E%3Ccircle%20cx%3D%2216.8%22%20cy%3D%227.4%22%20r%3D%221.7%22%20fill%3D%22%2322d3ee%22%2F%3E%3Ccircle%20cx%3D%2216.8%22%20cy%3D%2216.8%22%20r%3D%221.7%22%20fill%3D%22%2322d3ee%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.5%22%20r%3D%223%22%20fill%3D%22%2322d3ee%22%20opacity%3D%22.22%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.5%22%20r%3D%222%22%20fill%3D%22url(%23mmc70rwy4)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E">
|
|
20
20
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
21
21
|
<link rel="manifest" href="/manifest.webmanifest">
|
|
22
22
|
<style>
|
|
@@ -252,6 +252,27 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
252
252
|
.steps-h{font-size:12px;font-weight:650;color:var(--fg);margin:0 0 8px}
|
|
253
253
|
.about-name{font-size:11.5px;color:var(--muted);line-height:1.5;margin:16px 0 0;padding-top:12px;border-top:1px solid var(--line);font-style:italic}
|
|
254
254
|
|
|
255
|
+
/* ---------- welcome (no owner yet): two columns on wide screens ---------- */
|
|
256
|
+
.su-list{list-style:none;display:flex;flex-direction:column;gap:14px;margin:0}
|
|
257
|
+
.su-list>li{display:flex;gap:11px;align-items:flex-start;min-width:0}
|
|
258
|
+
.su-n{flex:none;display:grid;place-items:center;width:22px;height:22px;margin-top:1px;border-radius:50%;font-size:11.5px;font-weight:700;
|
|
259
|
+
background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent)}
|
|
260
|
+
.su-b{flex:1;min-width:0}
|
|
261
|
+
.su-b>b{display:block;font-size:13px;font-weight:650;color:var(--fg);margin-bottom:8px;line-height:1.45}
|
|
262
|
+
.su-b .note{margin-top:8px}
|
|
263
|
+
.su-b>b+.note{margin-top:-4px}
|
|
264
|
+
.su-steps .steps-h{margin-bottom:12px}
|
|
265
|
+
.su-intro .checklist{margin-bottom:0}
|
|
266
|
+
.su-steps{margin-top:18px}
|
|
267
|
+
.su-b .clirow code{white-space:normal;overflow-wrap:anywhere;overflow-x:visible}
|
|
268
|
+
@media (min-width:640px) and (max-width:879px){.card.wide{max-width:600px}}
|
|
269
|
+
@media (min-width:880px){
|
|
270
|
+
.card.wide{max-width:880px;padding:34px 36px 24px}
|
|
271
|
+
.card.wide .su-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;align-items:start}
|
|
272
|
+
.card.wide .su-steps{margin-top:0;padding-left:36px;border-left:1px solid var(--line);align-self:stretch}
|
|
273
|
+
.card.wide .su-intro .sub{margin-bottom:16px}
|
|
274
|
+
}
|
|
275
|
+
|
|
255
276
|
/* ---------- cooldown ---------- */
|
|
256
277
|
.timer{font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;font-size:34px;font-weight:700;letter-spacing:.04em;font-variant-numeric:tabular-nums;margin:2px 0 12px;color:var(--fg)}
|
|
257
278
|
.tbar{height:4px;border-radius:4px;background:var(--line);overflow:hidden;margin-bottom:14px}
|
|
@@ -288,7 +309,7 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
288
309
|
<body>
|
|
289
310
|
<main class="card splashing" id="card" aria-live="polite">
|
|
290
311
|
<div class="brand">
|
|
291
|
-
<svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
312
|
+
<svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy5" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy5" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy5" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy5)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy5)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy5)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy5)"/></g></svg>
|
|
292
313
|
<div class="brand-txt"><b>Memora</b><small>Second brain for your AI</small></div>
|
|
293
314
|
</div>
|
|
294
315
|
|
|
@@ -296,7 +317,7 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
296
317
|
|
|
297
318
|
<!-- SPLASH: shown until routing completes -->
|
|
298
319
|
<section class="view splash" id="vSplash">
|
|
299
|
-
<svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
320
|
+
<svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy6" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy6" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy6" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy6)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy6)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy6)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy6)"/></g></svg>
|
|
300
321
|
<h1 id="splashTitle">Checking this instance…</h1>
|
|
301
322
|
<ul class="checks">
|
|
302
323
|
<li id="ckServer"><span class="ci"><svg viewBox="0 0 24 24"><path d="M20 6 9 17l-5-5"/></svg></span><span>Server reachable</span><span class="cv"></span></li>
|
|
@@ -341,23 +362,34 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
341
362
|
</div>
|
|
342
363
|
</section>
|
|
343
364
|
|
|
344
|
-
<!-- NOT SET UP -->
|
|
345
|
-
<section class="view" id="vSetup" hidden>
|
|
346
|
-
<
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
<div class="
|
|
365
|
+
<!-- NOT SET UP: a wider card on wide screens, intro beside the steps -->
|
|
366
|
+
<section class="view setup" id="vSetup" hidden>
|
|
367
|
+
<div class="su-grid">
|
|
368
|
+
<div class="su-intro">
|
|
369
|
+
<h1>Welcome to Memora</h1>
|
|
370
|
+
<p class="sub">A self-hosted memory vault: your notes as plain Markdown, wired into a living brain that your AI agents read and write over MCP. What they learn stays.</p>
|
|
371
|
+
<ul class="checklist about">
|
|
372
|
+
<li><svg viewBox="0 0 24 24"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/><path d="M12 11v3M12 17h.01"/></svg><span><b>Vault</b> Your notes stay plain Markdown files, in a folder you choose</span><em></em></li>
|
|
373
|
+
<li><svg viewBox="0 0 24 24"><circle cx="6" cy="6" r="2.2"/><circle cx="18" cy="7" r="2.2"/><circle cx="12" cy="18" r="2.2"/><circle cx="12" cy="11" r="1.6"/><path d="M7.8 7.2 10.6 10M16.2 8.2 13.4 10.2M12 12.6v3.2"/></svg><span><b>Brain, Graph, Canvas</b> See how every note connects: in 3D, as a graph, or on a board</span><em></em></li>
|
|
374
|
+
<li><svg viewBox="0 0 24 24"><circle cx="8" cy="15" r="4"/><path d="m10.8 12.2 8.7-8.7M17 6l2.5 2.5M14.5 8.5l2 2"/></svg><span><b>Set up once, use everywhere</b> Claude, Cursor, ChatGPT and your own agents share one memory, each with its own key, instead of being taught the same things again</span><em></em></li>
|
|
375
|
+
<li><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg><span><b>From anywhere</b> on this machine, your local network, or the internet through a tunnel or reverse proxy</span><em></em></li>
|
|
376
|
+
</ul>
|
|
377
|
+
</div>
|
|
378
|
+
<div class="su-steps">
|
|
379
|
+
<p class="steps-h">Set it up in two steps</p>
|
|
380
|
+
<ol class="su-list">
|
|
381
|
+
<li><span class="su-n" aria-hidden="true">1</span><div class="su-b"><b>Get a one-time code on the server</b>
|
|
382
|
+
<div class="clicmd">
|
|
383
|
+
<div class="clilabel" id="setupCmdLabel">Run this command</div>
|
|
384
|
+
<div class="clirow"><code id="setupCmd">memora-cli setup --minutes 15</code><button type="button" class="clibtn" data-copy="setupCmd" aria-label="Copy command"><svg viewBox="0 0 24 24"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><span>Copy</span></button></div>
|
|
385
|
+
</div>
|
|
386
|
+
<p class="note">It prints a one-time code and the link to this page.</p></div></li>
|
|
387
|
+
<li><span class="su-n" aria-hidden="true">2</span><div class="su-b"><b>Enter the code here</b>
|
|
388
|
+
<p class="note">This page moves on by itself once the code is ready to enter.</p></div></li>
|
|
389
|
+
</ol>
|
|
390
|
+
<div class="waiting"><span class="spin"></span><span>Waiting for setup…</span></div>
|
|
391
|
+
</div>
|
|
358
392
|
</div>
|
|
359
|
-
<p class="note">2. Type <code id="tuiCmd">/guide</code> and follow the steps. This page moves on by itself.</p>
|
|
360
|
-
<div class="waiting"><span class="spin"></span><span>Waiting for setup…</span></div>
|
|
361
393
|
<p class="about-name">Memora is memory, advanced: built to remember what you and your AI learn, and to remember more the more you use it.</p>
|
|
362
394
|
</section>
|
|
363
395
|
|
|
@@ -372,7 +404,7 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
372
404
|
</div>
|
|
373
405
|
<button class="btn" id="codeBtn" type="submit" disabled><span class="spinner"></span><svg class="btn-ico" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg><span id="codeBtnTxt">Continue</span></button>
|
|
374
406
|
</form>
|
|
375
|
-
<p class="note center">Lost the code?
|
|
407
|
+
<p class="note center">Lost the code? Run <code id="codeAgain">memora-cli setup</code> on the server for a new one.</p>
|
|
376
408
|
</section>
|
|
377
409
|
|
|
378
410
|
<!-- WINDOW OPEN: ACCOUNT FORM (setup or reset) -->
|
|
@@ -458,6 +490,6 @@ h1{font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:6px;line-he
|
|
|
458
490
|
</main>
|
|
459
491
|
|
|
460
492
|
<script>
|
|
461
|
-
(()=>{const r=e=>document.querySelector(e),c=e=>r(e),U=e=>new Promise(t=>window.setTimeout(t,e)),se=()=>window.performance?performance.now():Date.now(),j={splash:"#vSplash",signin:"#vSignin",help:"#vHelp",setup:"#vSetup",code:"#vCode",form:"#vForm",notready:"#vNotReady",locked:"#vLocked",cooldown:"#vCooldown",oauth:"#vOauth"};function E(e){return e==="help"?"signin":e==="form"?"code":e}const ae=r("#alert"),me=r("#alertMsg");function d(e,t=""){me.textContent=e,ae.className="alert show"+(t?" "+t:"")}function y(){ae.className="alert"}function O(e,t){const n=e??{};return typeof n.error=="string"?n.error:typeof n.message=="string"?n.message:t}function h(e,t,n,o){e.disabled=t,e.classList.toggle("loading",t),n&&o&&(o.textContent=n)}function I(e,t={}){const n={accept:"application/json",...t.headers};return fetch(e,{credentials:"same-origin",cache:"no-store",...t,headers:n})}function D(e,t){return I(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}const pe=/^\/(?:$|node\/|(?:brain|nodes|graph|canvas|tags|activity|agents|tools|access|settings|overview|welcome|home|vault|logs|keys|docs)(?:\/|$))/;function ie(e){if(!e||typeof e!="string"||e.length>2048||/[\u0000-\u001f\u007f]/.test(e)||/%(?:0[0-9a-f]|1[0-9a-f]|7f)/i.test(e))return null;try{const t=new URL(e,location.origin);return t.origin!==location.origin||t.protocol!=="http:"&&t.protocol!=="https:"||!t.pathname.startsWith("/")||t.pathname.startsWith("//")||t.pathname.includes("\\")||t.pathname==="/login"||t.pathname==="/logout"||t.username||t.password||!pe.test(t.pathname)?null:t.pathname+t.search+t.hash}catch{return null}}function ge(){const e=new URLSearchParams(location.search);return ie(e.get("r")??e.get("next"))}const N=(()=>{const e=new URLSearchParams(location.search);return e.has("oauth")?(e.delete("oauth"),e.toString()):null})();function X(e){(/^https:\/\//.test(e)||/^http:\/\/(localhost|127\.0\.0\.1|\[::1\])[:/?]/.test(e))&&(location.href=e)}async function we(){y(),M(!0);let e;try{e=await(await I("/api/oauth/request?"+N)).json()}catch{e={ok:!1,error_description:"Could not reach the server."}}const t=r("#oaActs");if(!e.ok||!e.client){r("#oaTitle").textContent="This connection request cannot be used",r("#oaSub").textContent=e.error_description||e.error||"The request is invalid.",r("#oaList").hidden=!0,t.hidden=!e.redirect,e.redirect&&(r("#oaAllow").hidden=!0,r("#oaDeny").textContent="Back to the app",r("#oaDeny").onclick=()=>X(e.redirect)),w("oauth");return}const n=e.client.name||"An MCP client";r("#oaTitle").textContent=`Allow ${n} to use Memora?`,r("#oaSub").textContent=`${n} will connect to this vault as an agent, then return to ${e.redirect_host||"the app"}.`,r("#oaWho").textContent=e.user?`Signed in as ${e.user}`:"";const o=async(s,a)=>{h(a,!0);try{const l=await(await D("/api/oauth/approve",{query:N,allow:s})).json().catch(()=>({}));if(l.redirect)return X(l.redirect);d(O(l,"Could not finish the connection"),"warn")}catch{d("Could not reach the server","warn")}h(a,!1)};r("#oaAllow").onclick=s=>void o(!0,s.currentTarget),r("#oaDeny").onclick=s=>void o(!1,s.currentTarget),w("oauth")}function $(e){if(N!==null){we();return}const t=ge()||ie(e)||"/";t==="/login"||t===location.pathname+location.search||location.replace(t)}function ce(e){const t=Math.max(0,Math.ceil(e));return Math.floor(t/60)+":"+String(t%60).padStart(2,"0")}function q(e,t,n){if(e!==429)return null;const o=t??{},s=Number(o.retry_after??n??0);return{...o,retry_after:Number.isFinite(s)?s:0}}let le="memora-cli setup";const ve=()=>le.trim().split(/\s+/)[0]||"memora-cli";let m="splash",ee=0;const be=r("#card");async function w(e){if(e===m)return;const t=++ee,n=m;m=e;const o=r(j[n]);if(o&&!o.hidden){if(o.classList.add("leaving"),await U(150),t!==ee)return;o.classList.remove("leaving"),o.hidden=!0}Object.entries(j).forEach(([i,l])=>{const p=r(l);p.classList.remove("leaving"),i!==e&&(p.hidden=!0)}),be.classList.toggle("splashing",e==="splash"),r(j[e]).hidden=!1;const a={signin:"#u",code:"#code",form:"#su"}[e];if(a){const i=c(a);try{i.focus({preventScroll:!0})}catch{i.focus()}}ke()}let Y={};const te={password_changed:"You were signed out because the password was changed on another device. Sign in with the new password.",signed_out_remotely:"You were signed out from another device. Sign in again to continue.",expired:"Your session expired. Sign in again to continue."};let H=new URLSearchParams(location.search).get("reason");function ne(){return H&&Object.prototype.hasOwnProperty.call(te,H)?te[H]:""}async function T(){try{const e=await I("/api/auth/state"),t=await e.json().catch(()=>null),n=q(e.status,t,e.headers.get("retry-after"));if(n)return{ok:!1,limited:n};if(!e.ok||!t||typeof t!="object")return{ok:!1};const o=t;return o.setup_hint&&(le=o.setup_hint),o.signed_out&&(H=o.signed_out),Y=o,{ok:!0,s:o}}catch{return{ok:!1}}}function M(e){r("#dot").className="dot "+(e?"on":"off"),r("#footState").textContent=e?"gateway online":"gateway unreachable"}function A(e){return(e.cooldown??0)>0?"cooldown":!!(e.armed||e.locked||e.bootstrap)&&e.ready===!1?"notready":e.armed?"code":e.locked?"locked":e.bootstrap?"setup":location.hash==="#help"?"help":"signin"}function g(e,t){const n=ve();switch(y(),e){case"signin":t.ready===!1?d("The server cannot write to its vault or state folder. Run "+n+" on the server to check it.","warn"):ne()&&d(ne(),"warn");break;case"help":r("#resetCmd").textContent=n;break;case"setup":r("#setupCmd").textContent=n;break;case"code":Me(t);break;case"notready":{const o=(s,a)=>{const i=r(s);i.className=a===!1?"bad":"ok",i.querySelector("em").textContent=a===!1?"Not writable":"OK"};o("#nrVault",t.checks?.vault),o("#nrState",t.checks?.state),r("#nrCmd").textContent=n;break}case"locked":r("#lockCmd").textContent=n,r("#lockWhy").textContent=t.bootstrap?"The setup window expired before the owner account was created. Access stays on hold until setup finishes.":"The reset window expired before the new password was saved. Access stays on hold until the reset finishes.";break;case"cooldown":R(t.cooldown??60);break;default:break}w(e)}let C=null;const ye=["setup","code","form","notready","locked","help"];function ke(){const e=ye.includes(m);e&&C===null&&(C=window.setInterval(()=>void Le(),3e3)),!e&&C!==null&&(clearInterval(C),C=null)}let V=!1;async function Le(){if(!V){V=!0;try{const e=await T();if(!e.ok){e.limited?.cooldown&&W(e.limited.retry_after??60);return}M(!0);const t=e.s;(m==="code"||m==="form")&&t.armed&&typeof t.expires_in=="number"&&G(t.expires_in,t.ttl);const n=A(t);(E(n)!==E(m)||n==="notready")&&g(n,t)}finally{V=!1}}}async function de(){const e=await T();e.ok?(M(!0),g(A(e.s),e.s)):e.limited?.cooldown&&W(e.limited.retry_after??60)}let k=null,P=null;function W(e){y(),R(e),w("cooldown")}function R(e){m!=="cooldown"&&m!=="splash"&&(P=m),k!==null&&clearInterval(k);const t=Math.max(1,e),n=Date.now()+e*1e3,o=r("#cdTime"),s=r("#cdBar"),a=()=>{const i=(n-Date.now())/1e3;o.textContent=ce(i),s.style.width=Math.max(0,Math.min(100,i/t*100))+"%",i<=0&&(k!==null&&clearInterval(k),k=null,Se())};a(),k=window.setInterval(a,500)}async function Se(){const e=P;P=null;const t=await T();if(!t.ok){t.limited?.cooldown?R(t.limited.retry_after??30):e&&w(e);return}const n=A(t.s);if(n==="cooldown"){R(t.s.cooldown??30),P=e;return}e&&E(e)===E(n)?w(e):g(n,t.s)}function Z(e){e.cooldown?W(e.retry_after||60):d("Too many requests. Wait a few seconds and try again.","warn")}const Te='<path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',Ce='<path d="M9.9 5.2A10.6 10.6 0 0 1 12 5c6.4 0 10 7 10 7a18 18 0 0 1-3.2 4.1"/><path d="M6.1 6.4A18 18 0 0 0 2 12s3.6 7 10 7a10.5 10.5 0 0 0 4.3-.9"/><path d="M3 3l18 18"/><path d="M9.9 9.9a3 3 0 0 0 4.2 4.2"/>';function z(e,t){const n=r(e),o=c(t),s=n.querySelector("svg"),a=()=>{const i=o.type==="text";s&&(s.innerHTML=i?Ce:Te),n.title=i?"Hide password":"Show password",n.setAttribute("aria-label",n.title),n.style.color=i?"var(--accent-2)":""};return n.addEventListener("click",()=>{o.type=o.type==="password"?"text":"password",a();try{o.focus({preventScroll:!0})}catch{}}),a(),()=>{o.type="password",a()}}z("#eye","#p");const xe=z("#eye2","#sp"),Ee=z("#eye3","#sp2");r("#loginForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{y();const t=r("#submitBtn"),n=r("#btnTxt");h(t,!0,"Signing in...",n);try{const o=await D("/api/auth/login",{username:c("#u").value.trim(),password:c("#p").value}),s=await o.json().catch(()=>({})),a=q(o.status,s,o.headers.get("retry-after"));if(a){h(t,!1,"Sign in",n),Z(a);return}if(!o.ok){const i=o.status===401?"Wrong username or password.":o.status===503?"The server is busy. Try again in a moment.":O(s,"Sign-in failed ("+o.status+").");d(i),h(t,!1,"Sign in",n),c("#p").select();return}d("Signed in. Opening your vault...","ok"),$(s.redirect)}catch(o){d("Could not reach the server: "+o.message),h(t,!1,"Sign in",n)}})()});window.addEventListener("hashchange",()=>{E(m)==="signin"&&g(location.hash==="#help"?"help":"signin",Y)});r("#backLink").addEventListener("click",e=>{e.preventDefault(),history.pushState(null,"",location.pathname+location.search),g("signin",Y)});let x=null,ue=0,F=300,_=!1;function G(e,t){F=typeof t=="number"&&t>0?t:Math.max(F,e,1),ue=Date.now()+e*1e3,_=!1,x===null&&(x=window.setInterval(oe,1e3)),oe()}function K(){x!==null&&clearInterval(x),x=null}function oe(){const e=Math.max(0,Math.round((ue-Date.now())/1e3));document.querySelectorAll("[data-win]").forEach(t=>{const n=t.querySelector(".wtxt"),o=t.querySelector(".wbar");e<=0?(t.className="win expired",n.textContent="Window expired. Checking the server...",o.style.width="0%"):(t.className="win"+(e<=45?" warn":""),n.innerHTML="Window open, <b>"+ce(e)+"</b> left",o.style.width=Math.round(e/F*100)+"%")}),e<=0&&!_&&(_=!0,K(),r("#setBtn").disabled=!0,r("#codeBtn").disabled=!0,window.setTimeout(()=>void de(),1200))}async function he(e){K(),c("#code").value="";const t=await T(),n=t.ok?t.s:{};g(t.ok?A(n):"setup",n),d(e,"warn")}let f={mode:"bootstrap",min:10,user:null,code:""};const S=()=>f.mode==="reset"||f.mode==="reset-password",fe=e=>e.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,8);function Me(e){f={mode:e.mode||(e.bootstrap?"bootstrap":"reset"),min:e.min_password_len||10,user:null,code:""};const t=S();r("#codeTitle").textContent=t?"Enter the reset code":"Enter the setup code",r("#codeSub").textContent="Enter the "+(t?"reset":"setup")+" code shown in the server terminal. One try only: a wrong code voids it.",r("#codeLabel").textContent=t?"Reset code":"Setup code";const n=c("#code");n.value="",n.disabled=!1,r("#codeInp").classList.remove("bad"),r("#codeBtn").disabled=!0,G(typeof e.expires_in=="number"?e.expires_in:300,e.ttl)}c("#code").addEventListener("input",()=>{const e=c("#code"),t=fe(e.value);e.value=t.length>4?t.slice(0,4)+"-"+t.slice(4):t,r("#codeInp").classList.remove("bad"),r("#codeBtn").disabled=t.length!==8||_});r("#codeForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{const t=fe(c("#code").value);if(t.length!==8)return;y();const n=r("#codeBtn"),o=r("#codeBtnTxt");h(n,!0,"Checking...",o);try{const s=await D("/api/auth/verify",{code:t}),a=await s.json().catch(()=>({}));h(n,!1,"Continue",o);const i=q(s.status,a,s.headers.get("retry-after"));if(i){Z(i);return}if(!s.ok||!a.ok){const l=O(a,"Code check failed ("+s.status+").");a.burned?await he(l):(d(l),window.setTimeout(()=>void de(),1500));return}f.code=t,a.mode&&(f.mode=a.mode),f.user=a.user??null,typeof a.expires_in=="number"&&G(a.expires_in),_e(),w("form")}catch(s){h(n,!1,"Continue",o),d("Could not reach the server: "+s.message)}})()});function _e(){const e=S();r("#formTitle").textContent=e?"Reset password":"Create the owner account",r("#formSub").textContent=e?"Set a new password for the owner. Change the username to rename the account.":"Choose a username and password for this vault.",r("#setBtnTxt").textContent=e?"Save new password":"Create account",c("#su").value=e&&f.user?f.user:"",c("#sp").value="",c("#sp2").value="",["#su","#sp","#sp2"].forEach(t=>c(t).disabled=!1),xe(),Ee(),["#inp1","#inp2","#inp3"].forEach(t=>r(t).classList.remove("ok","bad")),r("#setBtn").classList.remove("loading"),J()}function Ae(e){let t=0;return e.length>=10&&t++,e.length>=14&&t++,/[A-Z]/.test(e)&&/[a-z]/.test(e)&&t++,/\d/.test(e)&&t++,/[^A-Za-z0-9]/.test(e)&&t++,Math.min(t,4)}function J(){const e=f.min,t=c("#sp").value,n=c("#sp2").value,o=r("#strength"),s=o.querySelector("i"),a=r("#rules"),i=r("#inp3");if(!t)o.classList.remove("show"),a.textContent="",a.className="rules",i.classList.remove("ok","bad");else{o.classList.add("show");const b=Ae(t);s.style.width=[15,35,60,82,100][b]+"%",s.style.background=["var(--danger)","var(--danger)","var(--warn)","var(--ok)","var(--ok)"][b];const B=t.length>=e;a.textContent=B?"Length OK ("+t.length+" characters)":"At least "+e+" characters ("+t.length+" so far)",a.className="rules "+(B?"ok":"bad"),i.classList.toggle("ok",B),i.classList.toggle("bad",!B)}const l=r("#match"),p=r("#inp2");if(!n)l.textContent="",l.className="rules",p.classList.remove("ok","bad");else{const b=n===t;l.textContent=b?"Passwords match":"Passwords do not match",l.className="rules "+(b?"ok":"bad"),p.classList.toggle("ok",b),p.classList.toggle("bad",!b)}const v=t.length>=e&&n===t&&c("#su").value.trim().length>0;r("#setBtn").disabled=!v||_}["#sp","#sp2","#su"].forEach(e=>c(e).addEventListener("input",J));r("#backToCode").addEventListener("click",e=>{e.preventDefault(),y(),c("#code").value="",r("#codeBtn").disabled=!0,w("code")});r("#setForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{y();const t=r("#setBtn"),n=r("#setBtnTxt"),o=S()?"Save new password":"Create account",s=c("#su").value.trim(),a=c("#sp").value;if(!s)return d("Username required.");if(a.length<f.min)return d("Password must be at least "+f.min+" characters.");if(a!==c("#sp2").value)return d("Passwords do not match.");h(t,!0,"Saving...",n);try{const i=await D(S()?"/api/auth/reset":"/api/auth/bootstrap",{code:f.code,username:s,password:a}),l=await i.json().catch(()=>({})),p=q(i.status,l,i.headers.get("retry-after"));if(p){h(t,!1,o,n),Z(p);return}if(!i.ok){h(t,!1,o,n),J();const v=O(l,"Failed ("+i.status+").");l.burned?await he(v):d(v);return}if(K(),!l.redirect&&S()){const v=await T();g("signin",v.ok?v.s:{}),c("#u").value=s,c("#p").value="",d("Password saved. Sign in with the new password.","ok"),window.setTimeout(()=>c("#p").focus(),260);return}d(S()?"Password saved. Opening your vault...":"Account created. Opening your vault...","ok"),$(l.redirect)}catch(i){h(t,!1,o,n),d("Could not reach the server: "+i.message)}})()});document.querySelectorAll("[data-copy]").forEach(e=>{const t=e.querySelector("span");e.addEventListener("click",()=>{(async()=>{const n=document.getElementById(e.dataset.copy||""),o=(n?.textContent||"").trim();let s=!1;try{await navigator.clipboard.writeText(o),s=!0}catch{if(n){const a=document.createRange();a.selectNodeContents(n);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(a);try{s=document.execCommand("copy")}catch{s=!1}}}t.textContent=s?"Copied":"Select",e.classList.toggle("done",s),window.setTimeout(()=>{t.textContent="Copy",e.classList.remove("done")},1500)})()})});const re=500;function u(e,t,n=""){const o=r(e);o.className=t,o.querySelector(".cv").textContent=n;const s=o.querySelector(".ci svg");s&&(s.innerHTML=t==="bad"?'<path d="M18 6 6 18M6 6l12 12"/>':'<path d="M20 6 9 17l-5-5"/>')}async function L(e){const t=e-se();t>0&&await U(t)}async function Be(){try{const e=await I("/api/auth/me");if(!e.ok)return{authenticated:!1};const t=await e.json().catch(()=>({}));return{authenticated:t.authenticated!==!1,redirect:t.redirect}}catch{return{authenticated:!1}}}function He(e){return e.armed?Pe(e)?"reset window open":"setup window open":e.locked?"on hold":e.bootstrap?"not set up":"ready"}const Pe=e=>e.mode==="reset"||e.mode==="reset-password";async function Q(){const e=se();r("#retryBtn").hidden=!0,r("#splashTitle").textContent="Checking this instance\u2026",u("#ckServer","run"),u("#ckReady",""),u("#ckAccount","");const[t,n]=await Promise.all([Be(),T()]);if(t.authenticated){u("#ckServer","ok"),u("#ckReady","ok"),u("#ckAccount","ok","signed in"),$(t.redirect);return}if(!n.ok){if(n.limited){const i=n.limited.retry_after||5;if(n.limited.cooldown){u("#ckServer","ok"),await L(e+re),W(i);return}return u("#ckServer","run","busy, retrying"),await U(Math.min(i,10)*1e3),Q()}await L(e+250),u("#ckServer","bad","no answer"),r("#splashTitle").textContent="Cannot reach the server",M(!1),r("#retryBtn").hidden=!1;return}const o=n.s;M(!0),await L(e+150),u("#ckServer","ok"),u("#ckReady","run"),await L(e+280);const s=[o.checks?.vault===!1?"vault":"",o.checks?.state===!1?"state":""].filter(Boolean),a=s.length?s.join(" + ")+" not writable":o.bootstrap?"not set up":o.vault_configured===!1?"vault not chosen":"";u("#ckReady",a?"bad":"ok",a),u("#ckAccount","run"),await L(e+400),u("#ckAccount",o.bootstrap||o.locked?"bad":"ok",He(o)),await L(e+re+60),g(A(o),o)}r("#retryBtn").addEventListener("click",()=>void Q());N!==null&&(r("#vSignin .eyebrow").textContent="Connect an AI app",r("#vSignin .sub").textContent="Sign in to let an AI app connect to this vault. You approve it on the next step.");Q();})();
|
|
493
|
+
(()=>{const r=e=>document.querySelector(e),c=e=>r(e),$=e=>new Promise(t=>window.setTimeout(t,e)),ie=()=>window.performance?performance.now():Date.now(),j={splash:"#vSplash",signin:"#vSignin",help:"#vHelp",setup:"#vSetup",code:"#vCode",form:"#vForm",notready:"#vNotReady",locked:"#vLocked",cooldown:"#vCooldown",oauth:"#vOauth"};function E(e){return e==="help"?"signin":e==="form"?"code":e}const ce=r("#alert"),pe=r("#alertMsg");function d(e,t=""){pe.textContent=e,ce.className="alert show"+(t?" "+t:"")}function y(){ce.className="alert"}function O(e,t){const n=e??{};return typeof n.error=="string"?n.error:typeof n.message=="string"?n.message:t}function h(e,t,n,o){e.disabled=t,e.classList.toggle("loading",t),n&&o&&(o.textContent=n)}function I(e,t={}){const n={accept:"application/json",...t.headers};return fetch(e,{credentials:"same-origin",cache:"no-store",...t,headers:n})}function D(e,t){return I(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}const ge=/^\/(?:$|node\/|(?:brain|nodes|graph|canvas|tags|activity|agents|tools|access|settings|overview|welcome|home|vault|logs|keys|docs)(?:\/|$))/;function le(e){if(!e||typeof e!="string"||e.length>2048||/[\u0000-\u001f\u007f]/.test(e)||/%(?:0[0-9a-f]|1[0-9a-f]|7f)/i.test(e))return null;try{const t=new URL(e,location.origin);return t.origin!==location.origin||t.protocol!=="http:"&&t.protocol!=="https:"||!t.pathname.startsWith("/")||t.pathname.startsWith("//")||t.pathname.includes("\\")||t.pathname==="/login"||t.pathname==="/logout"||t.username||t.password||!ge.test(t.pathname)?null:t.pathname+t.search+t.hash}catch{return null}}function we(){const e=new URLSearchParams(location.search);return le(e.get("r")??e.get("next"))}const N=(()=>{const e=new URLSearchParams(location.search);return e.has("oauth")?(e.delete("oauth"),e.toString()):null})();function ee(e){(/^https:\/\//.test(e)||/^http:\/\/(localhost|127\.0\.0\.1|\[::1\])[:/?]/.test(e))&&(location.href=e)}async function ve(){y(),M(!0);let e;try{e=await(await I("/api/oauth/request?"+N)).json()}catch{e={ok:!1,error_description:"Could not reach the server."}}const t=r("#oaActs");if(!e.ok||!e.client){r("#oaTitle").textContent="This connection request cannot be used",r("#oaSub").textContent=e.error_description||e.error||"The request is invalid.",r("#oaList").hidden=!0,t.hidden=!e.redirect,e.redirect&&(r("#oaAllow").hidden=!0,r("#oaDeny").textContent="Back to the app",r("#oaDeny").onclick=()=>ee(e.redirect)),w("oauth");return}const n=e.client.name||"An MCP client";r("#oaTitle").textContent=`Allow ${n} to use Memora?`,r("#oaSub").textContent=`${n} will connect to this vault as an agent, then return to ${e.redirect_host||"the app"}.`,r("#oaWho").textContent=e.user?`Signed in as ${e.user}`:"";const o=async(s,a)=>{h(a,!0);try{const l=await(await D("/api/oauth/approve",{query:N,allow:s})).json().catch(()=>({}));if(l.redirect)return ee(l.redirect);d(O(l,"Could not finish the connection"),"warn")}catch{d("Could not reach the server","warn")}h(a,!1)};r("#oaAllow").onclick=s=>void o(!0,s.currentTarget),r("#oaDeny").onclick=s=>void o(!1,s.currentTarget),w("oauth")}function Y(e){if(N!==null){ve();return}const t=we()||le(e)||"/";t==="/login"||t===location.pathname+location.search||location.replace(t)}function de(e){const t=Math.max(0,Math.ceil(e));return Math.floor(t/60)+":"+String(t%60).padStart(2,"0")}function q(e,t,n){if(e!==429)return null;const o=t??{},s=Number(o.retry_after??n??0);return{...o,retry_after:Number.isFinite(s)?s:0}}let F="memora-cli setup";const be=()=>{const e=/^(.*?\bmemora-cli(?:\.exe)?)(?=\s|$)/.exec(F.trim());return e?e[1]:F.trim().split(/\s+/)[0]||"memora-cli"},ye="setup --minutes 15";let m="splash",te=0;const ne=r("#card");async function w(e){if(e===m)return;const t=++te,n=m;m=e;const o=r(j[n]);if(o&&!o.hidden){if(o.classList.add("leaving"),await $(150),t!==te)return;o.classList.remove("leaving"),o.hidden=!0}Object.entries(j).forEach(([i,l])=>{const p=r(l);p.classList.remove("leaving"),i!==e&&(p.hidden=!0)}),ne.classList.toggle("splashing",e==="splash"),ne.classList.toggle("wide",e==="setup"),r(j[e]).hidden=!1;const a={signin:"#u",code:"#code",form:"#su"}[e];if(a){const i=c(a);try{i.focus({preventScroll:!0})}catch{i.focus()}}Le()}let Z={};const oe={password_changed:"You were signed out because the password was changed on another device. Sign in with the new password.",signed_out_remotely:"You were signed out from another device. Sign in again to continue.",expired:"Your session expired. Sign in again to continue."};let H=new URLSearchParams(location.search).get("reason");function re(){return H&&Object.prototype.hasOwnProperty.call(oe,H)?oe[H]:""}async function T(){try{const e=await I("/api/auth/state"),t=await e.json().catch(()=>null),n=q(e.status,t,e.headers.get("retry-after"));if(n)return{ok:!1,limited:n};if(!e.ok||!t||typeof t!="object")return{ok:!1};const o=t;return o.setup_hint&&(F=o.setup_hint),o.signed_out&&(H=o.signed_out),Z=o,{ok:!0,s:o}}catch{return{ok:!1}}}function M(e){r("#dot").className="dot "+(e?"on":"off"),r("#footState").textContent=e?"gateway online":"gateway unreachable"}function A(e){return(e.cooldown??0)>0?"cooldown":!!(e.armed||e.locked||e.bootstrap)&&e.ready===!1?"notready":e.armed?"code":e.locked?"locked":e.bootstrap?"setup":location.hash==="#help"?"help":"signin"}function g(e,t){const n=be();switch(y(),e){case"signin":t.ready===!1?d("The server cannot write to its vault or state folder. Run "+n+" on the server to check it.","warn"):re()&&d(re(),"warn");break;case"help":r("#resetCmd").textContent=n;break;case"setup":r("#setupCmd").textContent=n+" "+ye;break;case"code":_e(t),r("#codeAgain").textContent=n+(t.mode==="reset"||t.mode==="reset-password"?" reset-password":" setup");break;case"notready":{const o=(s,a)=>{const i=r(s);i.className=a===!1?"bad":"ok",i.querySelector("em").textContent=a===!1?"Not writable":"OK"};o("#nrVault",t.checks?.vault),o("#nrState",t.checks?.state),r("#nrCmd").textContent=n;break}case"locked":r("#lockCmd").textContent=n,r("#lockWhy").textContent=t.bootstrap?"The setup window expired before the owner account was created. Access stays on hold until setup finishes.":"The reset window expired before the new password was saved. Access stays on hold until the reset finishes.";break;case"cooldown":R(t.cooldown??60);break;default:break}w(e)}let C=null;const ke=["setup","code","form","notready","locked","help"];function Le(){const e=ke.includes(m);e&&C===null&&(C=window.setInterval(()=>void Se(),3e3)),!e&&C!==null&&(clearInterval(C),C=null)}let V=!1;async function Se(){if(!V){V=!0;try{const e=await T();if(!e.ok){e.limited?.cooldown&&W(e.limited.retry_after??60);return}M(!0);const t=e.s;(m==="code"||m==="form")&&t.armed&&typeof t.expires_in=="number"&&K(t.expires_in,t.ttl);const n=A(t);(E(n)!==E(m)||n==="notready")&&g(n,t)}finally{V=!1}}}async function ue(){const e=await T();e.ok?(M(!0),g(A(e.s),e.s)):e.limited?.cooldown&&W(e.limited.retry_after??60)}let k=null,P=null;function W(e){y(),R(e),w("cooldown")}function R(e){m!=="cooldown"&&m!=="splash"&&(P=m),k!==null&&clearInterval(k);const t=Math.max(1,e),n=Date.now()+e*1e3,o=r("#cdTime"),s=r("#cdBar"),a=()=>{const i=(n-Date.now())/1e3;o.textContent=de(i),s.style.width=Math.max(0,Math.min(100,i/t*100))+"%",i<=0&&(k!==null&&clearInterval(k),k=null,Te())};a(),k=window.setInterval(a,500)}async function Te(){const e=P;P=null;const t=await T();if(!t.ok){t.limited?.cooldown?R(t.limited.retry_after??30):e&&w(e);return}const n=A(t.s);if(n==="cooldown"){R(t.s.cooldown??30),P=e;return}e&&E(e)===E(n)?w(e):g(n,t.s)}function G(e){e.cooldown?W(e.retry_after||60):d("Too many requests. Wait a few seconds and try again.","warn")}const Ce='<path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',xe='<path d="M9.9 5.2A10.6 10.6 0 0 1 12 5c6.4 0 10 7 10 7a18 18 0 0 1-3.2 4.1"/><path d="M6.1 6.4A18 18 0 0 0 2 12s3.6 7 10 7a10.5 10.5 0 0 0 4.3-.9"/><path d="M3 3l18 18"/><path d="M9.9 9.9a3 3 0 0 0 4.2 4.2"/>';function z(e,t){const n=r(e),o=c(t),s=n.querySelector("svg"),a=()=>{const i=o.type==="text";s&&(s.innerHTML=i?xe:Ce),n.title=i?"Hide password":"Show password",n.setAttribute("aria-label",n.title),n.style.color=i?"var(--accent-2)":""};return n.addEventListener("click",()=>{o.type=o.type==="password"?"text":"password",a();try{o.focus({preventScroll:!0})}catch{}}),a(),()=>{o.type="password",a()}}z("#eye","#p");const Ee=z("#eye2","#sp"),Me=z("#eye3","#sp2");r("#loginForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{y();const t=r("#submitBtn"),n=r("#btnTxt");h(t,!0,"Signing in...",n);try{const o=await D("/api/auth/login",{username:c("#u").value.trim(),password:c("#p").value}),s=await o.json().catch(()=>({})),a=q(o.status,s,o.headers.get("retry-after"));if(a){h(t,!1,"Sign in",n),G(a);return}if(!o.ok){const i=o.status===401?"Wrong username or password.":o.status===503?"The server is busy. Try again in a moment.":O(s,"Sign-in failed ("+o.status+").");d(i),h(t,!1,"Sign in",n),c("#p").select();return}d("Signed in. Opening your vault...","ok"),Y(s.redirect)}catch(o){d("Could not reach the server: "+o.message),h(t,!1,"Sign in",n)}})()});window.addEventListener("hashchange",()=>{E(m)==="signin"&&g(location.hash==="#help"?"help":"signin",Z)});r("#backLink").addEventListener("click",e=>{e.preventDefault(),history.pushState(null,"",location.pathname+location.search),g("signin",Z)});let x=null,he=0,U=300,_=!1;function K(e,t){U=typeof t=="number"&&t>0?t:Math.max(U,e,1),he=Date.now()+e*1e3,_=!1,x===null&&(x=window.setInterval(se,1e3)),se()}function J(){x!==null&&clearInterval(x),x=null}function se(){const e=Math.max(0,Math.round((he-Date.now())/1e3));document.querySelectorAll("[data-win]").forEach(t=>{const n=t.querySelector(".wtxt"),o=t.querySelector(".wbar");e<=0?(t.className="win expired",n.textContent="Window expired. Checking the server...",o.style.width="0%"):(t.className="win"+(e<=45?" warn":""),n.innerHTML="Window open, <b>"+de(e)+"</b> left",o.style.width=Math.round(e/U*100)+"%")}),e<=0&&!_&&(_=!0,J(),r("#setBtn").disabled=!0,r("#codeBtn").disabled=!0,window.setTimeout(()=>void ue(),1200))}async function fe(e){J(),c("#code").value="";const t=await T(),n=t.ok?t.s:{};g(t.ok?A(n):"setup",n),d(e,"warn")}let f={mode:"bootstrap",min:10,user:null,code:""};const S=()=>f.mode==="reset"||f.mode==="reset-password",me=e=>e.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,8);function _e(e){f={mode:e.mode||(e.bootstrap?"bootstrap":"reset"),min:e.min_password_len||10,user:null,code:""};const t=S();r("#codeTitle").textContent=t?"Enter the reset code":"Enter the setup code",r("#codeSub").textContent="Enter the "+(t?"reset":"setup")+" code shown in the server terminal. One try only: a wrong code voids it.",r("#codeLabel").textContent=t?"Reset code":"Setup code";const n=c("#code");n.value="",n.disabled=!1,r("#codeInp").classList.remove("bad"),r("#codeBtn").disabled=!0,K(typeof e.expires_in=="number"?e.expires_in:300,e.ttl)}c("#code").addEventListener("input",()=>{const e=c("#code"),t=me(e.value);e.value=t.length>4?t.slice(0,4)+"-"+t.slice(4):t,r("#codeInp").classList.remove("bad"),r("#codeBtn").disabled=t.length!==8||_});r("#codeForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{const t=me(c("#code").value);if(t.length!==8)return;y();const n=r("#codeBtn"),o=r("#codeBtnTxt");h(n,!0,"Checking...",o);try{const s=await D("/api/auth/verify",{code:t}),a=await s.json().catch(()=>({}));h(n,!1,"Continue",o);const i=q(s.status,a,s.headers.get("retry-after"));if(i){G(i);return}if(!s.ok||!a.ok){const l=O(a,"Code check failed ("+s.status+").");a.burned?await fe(l):(d(l),window.setTimeout(()=>void ue(),1500));return}f.code=t,a.mode&&(f.mode=a.mode),f.user=a.user??null,typeof a.expires_in=="number"&&K(a.expires_in),Ae(),w("form")}catch(s){h(n,!1,"Continue",o),d("Could not reach the server: "+s.message)}})()});function Ae(){const e=S();r("#formTitle").textContent=e?"Reset password":"Create the owner account",r("#formSub").textContent=e?"Set a new password for the owner. Change the username to rename the account.":"Choose a username and password for this vault.",r("#setBtnTxt").textContent=e?"Save new password":"Create account",c("#su").value=e&&f.user?f.user:"",c("#sp").value="",c("#sp2").value="",["#su","#sp","#sp2"].forEach(t=>c(t).disabled=!1),Ee(),Me(),["#inp1","#inp2","#inp3"].forEach(t=>r(t).classList.remove("ok","bad")),r("#setBtn").classList.remove("loading"),Q()}function Be(e){let t=0;return e.length>=10&&t++,e.length>=14&&t++,/[A-Z]/.test(e)&&/[a-z]/.test(e)&&t++,/\d/.test(e)&&t++,/[^A-Za-z0-9]/.test(e)&&t++,Math.min(t,4)}function Q(){const e=f.min,t=c("#sp").value,n=c("#sp2").value,o=r("#strength"),s=o.querySelector("i"),a=r("#rules"),i=r("#inp3");if(!t)o.classList.remove("show"),a.textContent="",a.className="rules",i.classList.remove("ok","bad");else{o.classList.add("show");const b=Be(t);s.style.width=[15,35,60,82,100][b]+"%",s.style.background=["var(--danger)","var(--danger)","var(--warn)","var(--ok)","var(--ok)"][b];const B=t.length>=e;a.textContent=B?"Length OK ("+t.length+" characters)":"At least "+e+" characters ("+t.length+" so far)",a.className="rules "+(B?"ok":"bad"),i.classList.toggle("ok",B),i.classList.toggle("bad",!B)}const l=r("#match"),p=r("#inp2");if(!n)l.textContent="",l.className="rules",p.classList.remove("ok","bad");else{const b=n===t;l.textContent=b?"Passwords match":"Passwords do not match",l.className="rules "+(b?"ok":"bad"),p.classList.toggle("ok",b),p.classList.toggle("bad",!b)}const v=t.length>=e&&n===t&&c("#su").value.trim().length>0;r("#setBtn").disabled=!v||_}["#sp","#sp2","#su"].forEach(e=>c(e).addEventListener("input",Q));r("#backToCode").addEventListener("click",e=>{e.preventDefault(),y(),c("#code").value="",r("#codeBtn").disabled=!0,w("code")});r("#setForm").addEventListener("submit",e=>{e.preventDefault(),(async()=>{y();const t=r("#setBtn"),n=r("#setBtnTxt"),o=S()?"Save new password":"Create account",s=c("#su").value.trim(),a=c("#sp").value;if(!s)return d("Username required.");if(a.length<f.min)return d("Password must be at least "+f.min+" characters.");if(a!==c("#sp2").value)return d("Passwords do not match.");h(t,!0,"Saving...",n);try{const i=await D(S()?"/api/auth/reset":"/api/auth/bootstrap",{code:f.code,username:s,password:a}),l=await i.json().catch(()=>({})),p=q(i.status,l,i.headers.get("retry-after"));if(p){h(t,!1,o,n),G(p);return}if(!i.ok){h(t,!1,o,n),Q();const v=O(l,"Failed ("+i.status+").");l.burned?await fe(v):d(v);return}if(J(),!l.redirect&&S()){const v=await T();g("signin",v.ok?v.s:{}),c("#u").value=s,c("#p").value="",d("Password saved. Sign in with the new password.","ok"),window.setTimeout(()=>c("#p").focus(),260);return}d(S()?"Password saved. Opening your vault...":"Account created. Opening your vault...","ok"),Y(l.redirect)}catch(i){h(t,!1,o,n),d("Could not reach the server: "+i.message)}})()});document.querySelectorAll("[data-copy]").forEach(e=>{const t=e.querySelector("span");e.addEventListener("click",()=>{(async()=>{const n=document.getElementById(e.dataset.copy||""),o=(n?.textContent||"").trim();let s=!1;try{await navigator.clipboard.writeText(o),s=!0}catch{if(n){const a=document.createRange();a.selectNodeContents(n);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(a);try{s=document.execCommand("copy")}catch{s=!1}}}t.textContent=s?"Copied":"Select",e.classList.toggle("done",s),window.setTimeout(()=>{t.textContent="Copy",e.classList.remove("done")},1500)})()})});const ae=500;function u(e,t,n=""){const o=r(e);o.className=t,o.querySelector(".cv").textContent=n;const s=o.querySelector(".ci svg");s&&(s.innerHTML=t==="bad"?'<path d="M18 6 6 18M6 6l12 12"/>':'<path d="M20 6 9 17l-5-5"/>')}async function L(e){const t=e-ie();t>0&&await $(t)}async function He(){try{const e=await I("/api/auth/me");if(!e.ok)return{authenticated:!1};const t=await e.json().catch(()=>({}));return{authenticated:t.authenticated!==!1,redirect:t.redirect}}catch{return{authenticated:!1}}}function Pe(e){return e.armed?Ne(e)?"reset window open":"setup window open":e.locked?"on hold":e.bootstrap?"not set up":"ready"}const Ne=e=>e.mode==="reset"||e.mode==="reset-password";async function X(){const e=ie();r("#retryBtn").hidden=!0,r("#splashTitle").textContent="Checking this instance\u2026",u("#ckServer","run"),u("#ckReady",""),u("#ckAccount","");const[t,n]=await Promise.all([He(),T()]);if(t.authenticated){u("#ckServer","ok"),u("#ckReady","ok"),u("#ckAccount","ok","signed in"),Y(t.redirect);return}if(!n.ok){if(n.limited){const i=n.limited.retry_after||5;if(n.limited.cooldown){u("#ckServer","ok"),await L(e+ae),W(i);return}return u("#ckServer","run","busy, retrying"),await $(Math.min(i,10)*1e3),X()}await L(e+250),u("#ckServer","bad","no answer"),r("#splashTitle").textContent="Cannot reach the server",M(!1),r("#retryBtn").hidden=!1;return}const o=n.s;M(!0),await L(e+150),u("#ckServer","ok"),u("#ckReady","run"),await L(e+280);const s=[o.checks?.vault===!1?"vault":"",o.checks?.state===!1?"state":""].filter(Boolean),a=s.length?s.join(" + ")+" not writable":o.bootstrap?"not set up":o.vault_configured===!1?"vault not chosen":"";u("#ckReady",a?"bad":"ok",a),u("#ckAccount","run"),await L(e+400),u("#ckAccount",o.bootstrap||o.locked?"bad":"ok",Pe(o)),await L(e+ae+60),g(A(o),o)}r("#retryBtn").addEventListener("click",()=>void X());N!==null&&(r("#vSignin .eyebrow").textContent="Connect an AI app",r("#vSignin .sub").textContent="Sign in to let an AI app connect to this vault. You approve it on the next step.");X();})();
|
|
462
494
|
</script></body>
|
|
463
495
|
</html>
|
package/assets/offline.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</head>
|
|
30
30
|
<body>
|
|
31
31
|
<div class="card">
|
|
32
|
-
<svg class="mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
32
|
+
<svg class="mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmg70rwy7" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmt70rwy7" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmc70rwy7" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmt70rwy7)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmg70rwy7)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmg70rwy7)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmc70rwy7)"/></g></svg>
|
|
33
33
|
<h1>Connection lost</h1>
|
|
34
34
|
<p>This page was served from cache. Memory vault content is always fetched directly from the server, so a network connection is required to display notes.</p>
|
|
35
35
|
<button type="button" onclick="location.reload()">Try again</button>
|
package/assets/sw.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codrihub/memora",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Self-hosted memory vault for AI agents: the Memora server (HTTP, MCP, web UI) and the memora-cli console",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"memora",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"node": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@codrihub/memora-linux-x64": "1.3.
|
|
41
|
-
"@codrihub/memora-linux-arm64": "1.3.
|
|
42
|
-
"@codrihub/memora-win32-x64": "1.3.
|
|
40
|
+
"@codrihub/memora-linux-x64": "1.3.1",
|
|
41
|
+
"@codrihub/memora-linux-arm64": "1.3.1",
|
|
42
|
+
"@codrihub/memora-win32-x64": "1.3.1"
|
|
43
43
|
}
|
|
44
44
|
}
|