volute 0.32.0 → 0.34.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.
- package/README.md +16 -0
- package/dist/{accept-74M7I4RZ.js → accept-TW6V4WI4.js} +4 -4
- package/dist/{activity-events-HETAODOK.js → activity-events-BN7V6KCC.js} +4 -4
- package/dist/{ai-service-ZIPCV3MX.js → ai-service-PSILB5WD.js} +5 -5
- package/dist/{api-client-YPKOZP2O.js → api-client-XUXOB7LI.js} +1 -1
- package/dist/api.d.ts +1198 -957
- package/dist/{archive-INXYFVCW.js → archive-C2VEMQOR.js} +4 -4
- package/dist/{auth-6DMGES3I.js → auth-ZFZXJZDQ.js} +5 -5
- package/dist/{bridge-BVCBTGPF.js → bridge-O753D5F4.js} +4 -4
- package/dist/{chat-XT4OBJBU.js → chat-BHYX7DJ4.js} +9 -9
- package/dist/{chunk-M7UL5S3Q.js → chunk-2IOP6PHB.js} +1 -1
- package/dist/{chunk-JJ7W6WSB.js → chunk-47XDEWWV.js} +5 -5
- package/dist/{chunk-RSX4OPZY.js → chunk-47ZPNLF4.js} +7 -7
- package/dist/{chunk-RPZZSXV3.js → chunk-4JSR7YO7.js} +20 -1
- package/dist/chunk-6LXAAQ43.js +22 -0
- package/dist/{chunk-TSXLLQZW.js → chunk-6OWJXUAR.js} +10 -1
- package/dist/{chunk-I5KY25PQ.js → chunk-6WAWMWR5.js} +1 -1
- package/dist/{chunk-LSGWR54X.js → chunk-7F2SW2KD.js} +2 -2
- package/dist/chunk-7KJOFUNN.js +22 -0
- package/dist/{spirit-N4W4UQRH.js → chunk-B2BVAIZ4.js} +21 -12
- package/dist/{chunk-LGB6JBHI.js → chunk-BDK73LK6.js} +5 -55
- package/dist/{chunk-IYDIE3HG.js → chunk-BFWHBQK4.js} +1 -1
- package/dist/{chunk-TDRYEPH4.js → chunk-BM474GX6.js} +4 -4
- package/dist/{chunk-R7E6CRVQ.js → chunk-BTWAGDV5.js} +1 -1
- package/dist/{chunk-WKF5FEFK.js → chunk-CVL5IGIR.js} +629 -174
- package/dist/{chunk-S6NFERDC.js → chunk-E5C7OWZ2.js} +20 -22
- package/dist/chunk-FYCALD4Q.js +23 -0
- package/dist/{chunk-SKLSMHXO.js → chunk-IS7WJ56Q.js} +1 -1
- package/dist/{chunk-2NGTS5UU.js → chunk-M3K5AARV.js} +1 -1
- package/dist/{chunk-ALEF47VT.js → chunk-MLOQKQNB.js} +1 -1
- package/dist/{chunk-D5G5YOPL.js → chunk-N3DNFPVA.js} +41 -5
- package/dist/{chunk-LRCG2JLP.js → chunk-N7BLAHNE.js} +5 -1
- package/dist/chunk-OYAKCAVY.js +29 -0
- package/dist/{chunk-UKVWJRKN.js → chunk-PLDWHR4D.js} +1 -1
- package/dist/{chunk-QBQ424EM.js → chunk-TAHX36HZ.js} +545 -246
- package/dist/chunk-U5BTYSAL.js +59 -0
- package/dist/{chunk-SX5TKJBZ.js → chunk-V45JXOWY.js} +2 -2
- package/dist/{chunk-2FLJ63GU.js → chunk-V6ZCNULL.js} +2 -2
- package/dist/{chunk-QZANELPX.js → chunk-XWXBJQBE.js} +3 -2
- package/dist/cli.js +32 -24
- package/dist/{clock-2UOZ6JPU.js → clock-3X4DSC2N.js} +38 -23
- package/dist/{cloud-sync-JN3NWKEM.js → cloud-sync-TG3TIX5H.js} +21 -17
- package/dist/{config-H2H4UIF7.js → config-OROA5DUA.js} +4 -4
- package/dist/connectors/discord-bridge.js +1 -1
- package/dist/connectors/slack-bridge.js +1 -1
- package/dist/connectors/telegram-bridge.js +1 -1
- package/dist/{conversations-3O5O6AS3.js → conversations-HL2JP5GI.js} +5 -5
- package/dist/{create-RNLNCORE.js → create-3SEKKI6P.js} +5 -5
- package/dist/{create-WBBYI6V7.js → create-UOSOQ2HN.js} +4 -4
- package/dist/daemon-client-WOAQXXBM.js +12 -0
- package/dist/{daemon-restart-NGFHFAUF.js → daemon-restart-5ABHNXJZ.js} +9 -8
- package/dist/daemon.js +2730 -1520
- package/dist/{db-RA45JBFG.js → db-PLEDCBHZ.js} +1 -1
- package/dist/db-RYX3SS2W.js +9 -0
- package/dist/{delete-QTGWEDBI.js → delete-KYOVWR23.js} +3 -3
- package/dist/delivery-manager-2BR5NZKF.js +32 -0
- package/dist/{delivery-router-FL45JL7N.js → delivery-router-D5ELDMS2.js} +4 -4
- package/dist/down-QVFN4UPK.js +15 -0
- package/dist/{env-RLYQBOOP.js → env-R34DT7XL.js} +10 -6
- package/dist/exec-DVLXKRIO.js +17 -0
- package/dist/{export-SUYRLI5Q.js → export-6ZXAXATG.js} +6 -6
- package/dist/extension-PM42QCID.js +97 -0
- package/dist/extensions-BBGVL5JC.js +38 -0
- package/dist/{files-EAMPO2SJ.js → files-VQV2VZQO.js} +5 -5
- package/dist/{import-DDUFE7AY.js → import-MK2I2T6F.js} +5 -5
- package/dist/isolation-62MKDZN3.js +22 -0
- package/dist/{join-I5QEE3LG.js → join-DGYHTJUH.js} +3 -3
- package/dist/lib-DYEZMGW7.js +6588 -0
- package/dist/{list-DW2VRTOZ.js → list-C644WTHV.js} +16 -8
- package/dist/{login-7CHPW2PN.js → login-IIGEQPHL.js} +4 -4
- package/dist/{login-RIJF2F4G.js → login-KZQLMAWE.js} +4 -4
- package/dist/{logout-5MLHZALK.js → logout-AGTZVRGP.js} +4 -4
- package/dist/{logout-UZJRGY4Z.js → logout-KD6GXIJJ.js} +4 -4
- package/dist/message-delivery-V3R6NXJP.js +42 -0
- package/dist/{mind-2B6M7Y25.js → mind-BI4EPBVZ.js} +25 -19
- package/dist/{mind-activity-tracker-NZZT2NTT.js → mind-activity-tracker-2ACNHA7B.js} +5 -5
- package/dist/mind-history-WOYFLQAI.js +264 -0
- package/dist/{mind-list-WUPMQDYQ.js → mind-list-6VPM7GUQ.js} +4 -4
- package/dist/mind-manager-MWW3BTS4.js +32 -0
- package/dist/mind-profile-WPG42U5Y.js +47 -0
- package/dist/mind-service-VIKZJK2M.js +38 -0
- package/dist/{mind-sleep-B7BHJLH7.js → mind-sleep-XDISJY74.js} +4 -4
- package/dist/{mind-status-L3EFFRPR.js → mind-status-7FTZWPZF.js} +4 -4
- package/dist/{mind-wake-GY3RFX7Y.js → mind-wake-KIIKEI3A.js} +4 -4
- package/dist/{package-PK6JUFL3.js → package-V2WHWVG6.js} +9 -5
- package/dist/{read-5AMJRO3D.js → read-H5C26YO7.js} +18 -8
- package/dist/read-stdin-PIRM6A2Y.js +8 -0
- package/dist/{register-V2JZZKFK.js → register-J27WP33N.js} +4 -4
- package/dist/{registry-PJ4S5PHQ.js → registry-UYV5S6QT.js} +3 -3
- package/dist/{reject-33HEZMZ4.js → reject-OEANJYIA.js} +4 -4
- package/dist/{restart-3UCMRUVC.js → restart-V5EGYBJG.js} +4 -4
- package/dist/{sandbox-JANNTX6U.js → sandbox-SI5HMBP3.js} +5 -5
- package/dist/scheduler-AGG3L2FO.js +32 -0
- package/dist/{schema-PA3M5ZKH.js → schema-ETMABTW4.js} +4 -2
- package/dist/seed-WNGI6PNW.js +11 -0
- package/dist/seed-check-PXTH7YXS.js +32 -0
- package/dist/seed-cmd-VENFTGS3.js +36 -0
- package/dist/{seed-ALUQ55FF.js → seed-create-663ALOKH.js} +8 -8
- package/dist/{sprout-L2GFOVF7.js → seed-sprout-EH3AGKAI.js} +24 -11
- package/dist/{send-3MI36LEF.js → send-7FUUUZZH.js} +66 -51
- package/dist/{setup-SZIARWI6.js → setup-GGMKENLN.js} +6 -4
- package/dist/{setup-WENLVPVP.js → setup-Z3DEVWV7.js} +13 -11
- package/dist/{skill-TUVOTW4Z.js → skill-DKNYJS4P.js} +12 -8
- package/dist/skills/imagegen/SKILL.md +11 -7
- package/dist/skills/imagegen/scripts/imagegen.ts +146 -25
- package/dist/skills/orientation/SKILL.md +9 -2
- package/dist/skills/plan-coordinator/SKILL.md +60 -0
- package/dist/skills/seed-nurture/SKILL.md +42 -0
- package/dist/skills/volute-mind/SKILL.md +11 -221
- package/dist/skills/volute-mind/references/extensions.md +37 -0
- package/dist/skills/volute-mind/references/integrations.md +48 -0
- package/dist/skills/volute-mind/references/routing.md +86 -0
- package/dist/skills/volute-mind/references/sleep.md +33 -0
- package/dist/skills/volute-mind/references/variants.md +31 -0
- package/dist/{skills-XNZK6P4K.js → skills-Q6VZ2UGD.js} +11 -6
- package/dist/sleep-manager-BJK2ROPX.js +36 -0
- package/dist/spirit-4JP4TY4C.js +23 -0
- package/dist/{split-STOROBYJ.js → split-3YPMS2CL.js} +3 -3
- package/dist/sprout-E3HJIV2Z.js +11 -0
- package/dist/{start-K2NCUUCG.js → start-W3TPKX4D.js} +4 -4
- package/dist/{status-TCUMUO6M.js → status-4OVFXFEJ.js} +7 -6
- package/dist/{stop-H26JZDXF.js → stop-GTT6YWYO.js} +4 -4
- package/dist/system-channel-DXD2JBOU.js +36 -0
- package/dist/system-chat-TYLOL7SX.js +36 -0
- package/dist/{systems-DHBKVYEY.js → systems-AYLO727G.js} +7 -7
- package/dist/{tailscale-XHQBZROW.js → tailscale-ZEUK7GKZ.js} +3 -3
- package/dist/{template-hash-A6VVKOXJ.js → template-hash-EJRTKE36.js} +1 -1
- package/dist/up-PA7F2CXE.js +18 -0
- package/dist/{update-QVPRF6GR.js → update-HG4LCUSG.js} +7 -6
- package/dist/{update-check-ZD6OOIYQ.js → update-check-X3YG4WVP.js} +4 -4
- package/dist/{upgrade-O4Q7WJM3.js → upgrade-YGNIDICG.js} +3 -3
- package/dist/{variant-7TGZHOU3.js → variant-MZUMRTQO.js} +1 -1
- package/dist/{version-notify-TCKWBZZG.js → version-notify-YCH4UVQ2.js} +23 -20
- package/dist/volute-config-WBKYJGYQ.js +10 -0
- package/dist/web-assets/assets/index-DiiwC-CZ.css +1 -0
- package/dist/web-assets/assets/index-d6y5b9Ij.js +75 -0
- package/dist/web-assets/ext-theme.css +48 -9
- package/dist/web-assets/index.html +2 -2
- package/drizzle/0005_meta_summaries.sql +15 -0
- package/drizzle/meta/0005_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +8 -4
- package/packages/extensions/plan/dist/ui/assets/index-CJj2gZnZ.css +1 -0
- package/packages/extensions/plan/dist/ui/assets/index-FMEJmvQz.js +61 -0
- package/packages/extensions/plan/dist/ui/index.html +14 -0
- package/packages/extensions/plan/skills/plan/SKILL.md +43 -0
- package/packages/extensions/plan/skills/plan/scripts/plan-hook.sh +37 -0
- package/templates/_base/home/VOLUTE.md +12 -19
- package/templates/_base/src/lib/context-breakdown.ts +450 -0
- package/templates/_base/src/lib/format-prefix.ts +17 -0
- package/templates/_base/src/lib/hook-loader.ts +8 -2
- package/templates/_base/src/lib/router.ts +75 -33
- package/templates/_base/src/lib/routing.ts +4 -1
- package/templates/_base/src/lib/startup.ts +16 -8
- package/templates/_base/src/lib/types.ts +2 -1
- package/templates/_base/src/lib/volute-server.ts +69 -8
- package/templates/claude/.init/CLAUDE.md +4 -10
- package/templates/claude/package.json.tmpl +1 -0
- package/templates/claude/src/agent.ts +100 -32
- package/templates/claude/src/lib/hooks/reply-instructions.ts +27 -7
- package/templates/claude/src/lib/stream-consumer.ts +40 -2
- package/templates/claude/src/server.ts +1 -0
- package/templates/codex/package.json.tmpl +1 -0
- package/templates/codex/src/agent.ts +81 -8
- package/templates/codex/src/server.ts +1 -4
- package/templates/pi/package.json.tmpl +1 -0
- package/templates/pi/src/agent.ts +115 -36
- package/templates/pi/src/lib/event-handler.ts +22 -7
- package/templates/pi/src/lib/reply-instructions-extension.ts +23 -4
- package/templates/pi/src/lib/subagents.ts +20 -17
- package/templates/pi/src/server.ts +2 -5
- package/dist/chunk-K3NQKI34.js +0 -10
- package/dist/daemon-client-6QXHZ7US.js +0 -12
- package/dist/db-F34YLV7D.js +0 -9
- package/dist/delivery-manager-SDVXFD4W.js +0 -28
- package/dist/down-TB3ESMNP.js +0 -14
- package/dist/extension-FQ5D3NCC.js +0 -174
- package/dist/extensions-GDYWQXC4.js +0 -29
- package/dist/history-FO5PHBQ5.js +0 -128
- package/dist/message-delivery-2FIM7QKO.js +0 -32
- package/dist/mind-manager-BNCMGYXW.js +0 -28
- package/dist/mind-service-AV273WT4.js +0 -34
- package/dist/sleep-manager-53DZOWW7.js +0 -32
- package/dist/system-chat-NPYFYZVI.js +0 -32
- package/dist/up-6I6BHRTO.js +0 -17
- package/dist/web-assets/assets/index-Bui7U9Uu.css +0 -1
- package/dist/web-assets/assets/index-e36DIo1b.js +0 -73
|
@@ -1,41 +1,63 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Auto-generated from @volute/ui — do not edit */
|
|
2
2
|
@import url("https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:wght@300;400;700&family=Fira+Code:wght@300;400;500;600&family=Averia+Sans+Libre:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap");
|
|
3
3
|
|
|
4
|
+
/* Design tokens — override these to create a custom theme */
|
|
4
5
|
:root {
|
|
6
|
+
/* Background layers (darkest → lightest) */
|
|
5
7
|
--bg-0: #0a0c0f;
|
|
6
8
|
--bg-1: #11141a;
|
|
7
9
|
--bg-2: #181c24;
|
|
8
10
|
--bg-3: #1f2430;
|
|
11
|
+
|
|
12
|
+
/* Borders */
|
|
9
13
|
--border: #2a3040;
|
|
10
14
|
--border-bright: #3a4560;
|
|
15
|
+
|
|
16
|
+
/* Text hierarchy */
|
|
11
17
|
--text-0: #e8ecf4;
|
|
12
18
|
--text-1: #a0aabb;
|
|
13
19
|
--text-2: #6a7588;
|
|
20
|
+
|
|
21
|
+
/* Brand */
|
|
14
22
|
--accent: #e0a860;
|
|
15
23
|
--accent-dim: #5c4428;
|
|
16
24
|
--accent-bg: rgba(224, 168, 96, 0.08);
|
|
17
25
|
--accent-border: rgba(224, 168, 96, 0.2);
|
|
26
|
+
|
|
27
|
+
/* Status colors */
|
|
18
28
|
--red: #f87171;
|
|
19
29
|
--red-dim: #7f1d1d;
|
|
30
|
+
--red-bg: rgba(248, 113, 113, 0.08);
|
|
31
|
+
--red-border: rgba(248, 113, 113, 0.2);
|
|
20
32
|
--yellow: #fbbf24;
|
|
21
33
|
--yellow-dim: #78350f;
|
|
34
|
+
--yellow-bg: rgba(251, 191, 36, 0.08);
|
|
22
35
|
--blue: #60a5fa;
|
|
36
|
+
--blue-bg: rgba(96, 165, 250, 0.08);
|
|
23
37
|
--purple: #c084fc;
|
|
24
38
|
--green: #4ade80;
|
|
39
|
+
|
|
40
|
+
/* Surfaces */
|
|
25
41
|
--overlay: rgba(0, 0, 0, 0.6);
|
|
26
|
-
--yellow-bg: rgba(251, 191, 36, 0.08);
|
|
27
|
-
--blue-bg: rgba(96, 165, 250, 0.08);
|
|
28
|
-
--red-bg: rgba(248, 113, 113, 0.08);
|
|
29
42
|
--muted-bg: rgba(106, 117, 136, 0.08);
|
|
30
|
-
--red-border: rgba(248, 113, 113, 0.2);
|
|
31
43
|
--timeline-rail: #333;
|
|
44
|
+
|
|
45
|
+
/* Typography */
|
|
32
46
|
--mono: "Fira Code", "SF Mono", monospace;
|
|
33
47
|
--sans: "Averia Sans Libre", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
34
48
|
--display: "Averia Serif Libre", Georgia, serif;
|
|
49
|
+
|
|
50
|
+
/* Radii */
|
|
35
51
|
--radius: 6px;
|
|
36
52
|
--radius-lg: 10px;
|
|
53
|
+
|
|
54
|
+
/* Z-index layers */
|
|
55
|
+
--z-dropdown: 100;
|
|
56
|
+
--z-modal: 200;
|
|
57
|
+
--z-toast: 300;
|
|
37
58
|
}
|
|
38
59
|
|
|
60
|
+
/* Base styles — shared between main app and extensions */
|
|
39
61
|
* {
|
|
40
62
|
margin: 0;
|
|
41
63
|
padding: 0;
|
|
@@ -44,6 +66,7 @@
|
|
|
44
66
|
|
|
45
67
|
html,
|
|
46
68
|
body,
|
|
69
|
+
#root,
|
|
47
70
|
#app {
|
|
48
71
|
height: 100%;
|
|
49
72
|
background: var(--bg-0);
|
|
@@ -100,14 +123,17 @@ button:focus-visible {
|
|
|
100
123
|
outline-offset: 2px;
|
|
101
124
|
}
|
|
102
125
|
|
|
126
|
+
a:focus-visible {
|
|
127
|
+
outline: 1px solid var(--accent);
|
|
128
|
+
outline-offset: 2px;
|
|
129
|
+
}
|
|
130
|
+
|
|
103
131
|
@keyframes fadeIn {
|
|
104
132
|
from {
|
|
105
133
|
opacity: 0;
|
|
106
|
-
transform: translateY(6px);
|
|
107
134
|
}
|
|
108
135
|
to {
|
|
109
136
|
opacity: 1;
|
|
110
|
-
transform: translateY(0);
|
|
111
137
|
}
|
|
112
138
|
}
|
|
113
139
|
|
|
@@ -200,6 +226,19 @@ button:focus-visible {
|
|
|
200
226
|
border-top: 1px solid var(--border);
|
|
201
227
|
margin: 12px 0;
|
|
202
228
|
}
|
|
203
|
-
|
|
204
|
-
|
|
229
|
+
|
|
230
|
+
/* Tooltip (portaled to body by use:tooltip action) */
|
|
231
|
+
.volute-tooltip {
|
|
232
|
+
position: fixed;
|
|
233
|
+
padding: 3px 8px;
|
|
234
|
+
background: var(--bg-3);
|
|
235
|
+
color: var(--text-0);
|
|
236
|
+
font-family: var(--sans);
|
|
237
|
+
font-size: 11px;
|
|
238
|
+
border-radius: var(--radius);
|
|
239
|
+
white-space: nowrap;
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
border: 1px solid var(--border);
|
|
242
|
+
z-index: 9999;
|
|
243
|
+
font-variant-numeric: tabular-nums;
|
|
205
244
|
}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:wght@300;400;700&family=Fira+Code:wght@300;400;500;600&family=Averia+Sans+Libre:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-d6y5b9Ij.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DiiwC-CZ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `summaries` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`mind` text NOT NULL,
|
|
4
|
+
`period` text NOT NULL,
|
|
5
|
+
`period_key` text NOT NULL,
|
|
6
|
+
`content` text NOT NULL,
|
|
7
|
+
`metadata` text,
|
|
8
|
+
`created_at` text NOT NULL DEFAULT (datetime('now'))
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
CREATE UNIQUE INDEX IF NOT EXISTS `idx_summaries_unique` ON `summaries` (`mind`, `period`, `period_key`);
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
CREATE INDEX IF NOT EXISTS `idx_summaries_mind_period` ON `summaries` (`mind`, `period`);
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
ALTER TABLE `turns` ADD `summary_id` integer REFERENCES `summaries`(`id`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volute",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "CLI for creating and managing self-modifying AI minds powered by the Claude Agent SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
"packages/extensions/notes/dist/ui/",
|
|
39
39
|
"packages/extensions/notes/skills/",
|
|
40
40
|
"packages/extensions/pages/dist/ui/",
|
|
41
|
-
"packages/extensions/pages/skills/"
|
|
41
|
+
"packages/extensions/pages/skills/",
|
|
42
|
+
"packages/extensions/plan/dist/ui/",
|
|
43
|
+
"packages/extensions/plan/skills/"
|
|
42
44
|
],
|
|
43
45
|
"scripts": {
|
|
44
46
|
"dev": "tsx src/cli.ts",
|
|
45
47
|
"build": "npm run build:ext && tsup && cp -r skills dist/skills && npm run build:web",
|
|
46
|
-
"build:ext": "npm run build:ui --workspace=packages/extensions/notes && npm run build:ui --workspace=packages/extensions/pages",
|
|
48
|
+
"build:ext": "npm run build:ext-theme --workspace=packages/ui && cp packages/ui/dist/ext-theme.css src/web/ui/public/ext-theme.css && npm run build:ui --workspace=packages/extensions/notes && npm run build:ui --workspace=packages/extensions/pages && npm run build:ui --workspace=packages/extensions/plan",
|
|
47
49
|
"build:web": "vite build --config src/web/ui/vite.config.ts",
|
|
48
50
|
"dev:web": "vite --config src/web/ui/vite.config.ts",
|
|
49
51
|
"test": "node --import tsx --import ./test/setup.ts --test --test-force-exit --test-concurrency=4 $(find test -name '*.test.ts' ! -name 'daemon-e2e.test.ts' | sort)",
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
"lint:fix": "biome check --write src/ test/",
|
|
54
56
|
"format": "biome format --write src/ test/",
|
|
55
57
|
"typecheck": "tsc --noEmit",
|
|
56
|
-
"typecheck:templates": "
|
|
58
|
+
"typecheck:templates": "tsx scripts/typecheck-templates.ts",
|
|
57
59
|
"lint:templates": "biome check templates/",
|
|
58
60
|
"typecheck:web": "svelte-check --tsconfig src/web/ui/tsconfig.json",
|
|
59
61
|
"prepare": "lefthook install",
|
|
@@ -75,6 +77,7 @@
|
|
|
75
77
|
"drizzle-orm": "^0.45.1",
|
|
76
78
|
"hono": "^4.11.7",
|
|
77
79
|
"libsql": "^0.5.22",
|
|
80
|
+
"replicate": "^1.4.0",
|
|
78
81
|
"telegraf": "^4.16.3",
|
|
79
82
|
"zod": "^4.3.6"
|
|
80
83
|
},
|
|
@@ -91,6 +94,7 @@
|
|
|
91
94
|
"drizzle-kit": "^0.31.8",
|
|
92
95
|
"lefthook": "^2.1.0",
|
|
93
96
|
"marked": "^17.0.1",
|
|
97
|
+
"sharp": "^0.34.5",
|
|
94
98
|
"svelte": "^5.53.0",
|
|
95
99
|
"tsup": "^8.0.0",
|
|
96
100
|
"tsx": "^4.0.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.btn.svelte-1ua3ks9{border-radius:var(--radius);font-weight:500;font-family:inherit;flex-shrink:0;cursor:pointer;border:none;transition:opacity .15s}.btn.svelte-1ua3ks9:disabled{opacity:.5;cursor:default}.sm.svelte-1ua3ks9{padding:4px 12px;font-size:12px}.md.svelte-1ua3ks9{padding:6px 14px;font-size:13px}.primary.svelte-1ua3ks9{background:var(--accent-dim);color:var(--accent)}.secondary.svelte-1ua3ks9{background:var(--bg-3);color:var(--text-2)}.secondary.svelte-1ua3ks9:hover:not(:disabled){color:var(--text-0)}.danger.svelte-1ua3ks9{background:var(--bg-3);color:var(--text-2)}.danger.svelte-1ua3ks9:hover:not(:disabled){color:var(--red)}.text.svelte-1ua3ks9{background:none;color:var(--text-2);padding-left:0;padding-right:0;text-decoration:underline}.text.svelte-1ua3ks9:hover:not(:disabled){color:var(--text-1)}.icon.svelte-1ua3ks9{padding:2px 6px;font-size:11px;background:var(--bg-3);color:var(--text-2)}.icon.svelte-1ua3ks9:hover:not(:disabled){color:var(--text-0)}.empty.svelte-v3do33{color:var(--text-2);padding:12px;text-align:center;font-size:14px}.error.svelte-1y9liqq{color:var(--red);font-size:13px;padding:4px 0}.page-shell.svelte-1ntluue{max-width:100%;min-height:100%;animation:fadeIn .2s ease both}.section-header.svelte-1uapugv{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}.section-titles.svelte-1uapugv{display:flex;align-items:baseline;gap:8px}.section-title.svelte-1uapugv{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-2)}.section-subtitle.svelte-1uapugv{font-size:12px;color:var(--text-2)}.time-picker.svelte-1qnlf5k{display:flex;align-items:center;gap:6px;padding:4px 0}.time-label.svelte-1qnlf5k{font-size:13px;color:var(--text-2);width:60px;flex-shrink:0}.time-sep.svelte-1qnlf5k{font-size:13px;color:var(--text-2)}.time-select{width:auto}.time-select.narrow{width:55px}.plan-card.svelte-1jnehi7{background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;margin-bottom:24px}.plan-title.svelte-1jnehi7{font-family:var(--display);font-size:18px;font-weight:500;color:var(--text-0);margin:0 0 8px}.plan-description.svelte-1jnehi7{color:var(--text-1);font-size:14px;line-height:1.5;margin:0 0 12px;white-space:pre-wrap}.plan-meta.svelte-1jnehi7{color:var(--text-2);font-size:12px}.log-list.svelte-1jnehi7{display:flex;flex-direction:column;gap:8px}.log-entry.svelte-1jnehi7{background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius);padding:12px}.log-header.svelte-1jnehi7{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.log-mind.svelte-1jnehi7{font-size:13px;font-weight:500;color:var(--accent)}.log-time.svelte-1jnehi7{font-size:11px;color:var(--text-2)}.log-content.svelte-1jnehi7{font-size:13px;color:var(--text-1);line-height:1.4}.empty.svelte-1jnehi7{text-align:center}.hint.svelte-1jnehi7{color:var(--text-2);font-size:12px;margin-top:8px}.hint.svelte-1jnehi7 code:where(.svelte-1jnehi7){background:var(--bg-3);padding:2px 6px;border-radius:var(--radius);font-size:11px}.plans-list.svelte-1r00j2e{display:flex;flex-direction:column;gap:6px}.plan-row.svelte-1r00j2e{background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px}.plan-row.active.svelte-1r00j2e{border-color:var(--accent-border)}.plan-info.svelte-1r00j2e{display:flex;align-items:center;gap:8px;margin-bottom:4px}.plan-title.svelte-1r00j2e{font-size:14px;font-weight:500;color:var(--text-0)}.badge.svelte-1r00j2e{font-size:10px;padding:2px 6px;border-radius:var(--radius);text-transform:uppercase;letter-spacing:.5px;font-weight:500}.badge.active.svelte-1r00j2e{background:var(--accent-dim);color:var(--accent)}.badge.completed.svelte-1r00j2e{background:var(--green-dim, var(--bg-3));color:var(--green, var(--text-2))}.badge.archived.svelte-1r00j2e{background:var(--bg-3);color:var(--text-2)}.plan-meta.svelte-1r00j2e{font-size:12px;color:var(--text-2)}.ext-app.svelte-1r8vfx3{padding:24px;max-width:100%;min-height:100%;animation:fadeIn .2s ease both}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const dl=!1;var Tr=Array.isArray,gl=Array.prototype.indexOf,Rt=Array.prototype.includes,Dn=Array.from,vl=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,_l=Object.getOwnPropertyDescriptors,ml=Object.prototype,bl=Array.prototype,Bi=Object.getPrototypeOf,fi=Object.isExtensible;const kl=()=>{};function wl(e){for(var t=0;t<e.length;t++)e[t]()}function Hi(){var e,t,n=new Promise((i,r)=>{e=i,t=r});return{promise:n,resolve:e,reject:t}}const X=2,Lt=4,Nn=8,yr=1<<24,Je=16,Ae=32,ot=64,ar=128,me=512,Y=1024,J=2048,Se=4096,ge=8192,Ee=16384,dt=32768,hi=1<<25,ut=65536,pi=1<<17,xl=1<<18,Dt=1<<19,Tl=1<<20,He=1<<25,ct=65536,or=1<<21,Er=1<<22,Ve=1<<23,Qt=Symbol("$state"),yl=Symbol(""),Be=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ji=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function El(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Al(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Sl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Rl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ll(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ol(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Cl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Il(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Dl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Nl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Pl(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ml=1,zl=2,$l=16,Fl=1,Ul=2,Z=Symbol(),Gi="http://www.w3.org/1999/xhtml",Bl="@attach";function Hl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function jl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function qi(e){return e===this.v}function Gl(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Wi(e){return!Gl(e,this.v)}let ql=!1,ve=null;function Ot(e){ve=e}function Pn(e,t=!1,n){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,r:C,l:null}}function Mn(e){var t=ve,n=t.e;if(n!==null){t.e=null;for(var i of n)ps(i)}return t.i=!0,ve=t.p,{}}function Yi(){return!0}let Et=[];function Wl(){var e=Et;Et=[],wl(e)}function Ze(e){if(Et.length===0){var t=Et;queueMicrotask(()=>{t===Et&&Wl()})}Et.push(e)}function Vi(e){var t=C;if(t===null)return S.f|=Ve,e;if((t.f&dt)===0&&(t.f&Lt)===0)throw e;Ye(e,t)}function Ye(e,t){for(;t!==null;){if((t.f&ar)!==0){if((t.f&dt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Yl=-7169;function $(e,t){e.f=e.f&Yl|t}function Ar(e){(e.f&me)!==0||e.deps===null?$(e,Y):$(e,Se)}function Zi(e){if(e!==null)for(const t of e)(t.f&X)===0||(t.f&ct)===0||(t.f^=ct,Zi(t.deps))}function Xi(e,t,n){(e.f&J)!==0?t.add(e):(e.f&Se)!==0&&n.add(e),Zi(e.deps),$(e,Y)}const $t=new Set;let z=null,Ce=null,ur=null,Qn=!1,At=null,Tn=null;var di=0;let Vl=1;class Qe{id=Vl++;current=new Map;previous=new Map;#e=new Set;#o=new Set;#t=0;#l=0;#r=null;#n=[];#i=new Set;#s=new Set;#a=new Map;is_fork=!1;#u=!1;#c(){return this.is_fork||this.#l>0}skip_effect(t){this.#a.has(t)||this.#a.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#a.get(t);if(n){this.#a.delete(t);for(var i of n.d)$(i,J),this.schedule(i);for(i of n.m)$(i,Se),this.schedule(i)}}#h(){di++>1e3&&Zl();const t=this.#n;this.#n=[],this.apply();var n=At=[],i=[],r=Tn=[];for(const o of t)try{this.#p(o,n,i)}catch(a){throw es(o),a}if(z=null,r.length>0){var s=Qe.ensure();for(const o of r)s.schedule(o)}if(At=null,Tn=null,this.#c()){this.#d(i),this.#d(n);for(const[o,a]of this.#a)Ji(o,a)}else{this.#t===0&&$t.delete(this),this.#i.clear(),this.#s.clear();for(const o of this.#e)o(this);this.#e.clear(),gi(i),gi(n),this.#r?.resolve()}var l=z;if(this.#n.length>0){const o=l??=this;o.#n.push(...this.#n.filter(a=>!o.#n.includes(a)))}l!==null&&($t.add(l),l.#h()),$t.has(this)||this.#f()}#p(t,n,i){t.f^=Y;for(var r=t.first;r!==null;){var s=r.f,l=(s&(Ae|ot))!==0,o=l&&(s&Y)!==0,a=o||(s&ge)!==0||this.#a.has(r);if(!a&&r.fn!==null){l?r.f^=Y:(s&Lt)!==0?n.push(r):sn(r)&&((s&Je)!==0&&this.#s.add(r),It(r));var u=r.first;if(u!==null){r=u;continue}}for(;r!==null;){var f=r.next;if(f!==null){r=f;break}r=r.parent}}}#d(t){for(var n=0;n<t.length;n+=1)Xi(t[n],this.#i,this.#s)}capture(t,n){n!==Z&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Ve)===0&&(this.current.set(t,t.v),Ce?.set(t,t.v))}activate(){z=this}deactivate(){z=null,Ce=null}flush(){try{if(Qn=!0,z=this,!this.#c()){for(const t of this.#i)this.#s.delete(t),$(t,J),this.schedule(t);for(const t of this.#s)$(t,Se),this.schedule(t)}this.#h()}finally{di=0,ur=null,At=null,Tn=null,Qn=!1,z=null,Ce=null,Xe.clear()}}discard(){for(const t of this.#o)t(this);this.#o.clear()}#f(){for(const a of $t){var t=a.id<this.id,n=[];for(const[u,f]of this.current){if(a.current.has(u))if(t&&f!==a.current.get(u))a.current.set(u,f);else continue;n.push(u)}if(n.length!==0){var i=[...a.current.keys()].filter(u=>!this.current.has(u));if(i.length>0){a.activate();var r=new Set,s=new Map;for(var l of n)Ki(l,i,r,s);if(a.#n.length>0){a.apply();for(var o of a.#n)a.#p(o,[],[])}a.deactivate()}}}}increment(t){this.#t+=1,t&&(this.#l+=1)}decrement(t,n){this.#t-=1,t&&(this.#l-=1),!(this.#u||n)&&(this.#u=!0,Ze(()=>{this.#u=!1,this.flush()}))}oncommit(t){this.#e.add(t)}ondiscard(t){this.#o.add(t)}settled(){return(this.#r??=Hi()).promise}static ensure(){if(z===null){const t=z=new Qe;Qn||($t.add(z),Ze(()=>{z===t&&t.flush()}))}return z}apply(){{Ce=null;return}}schedule(t){if(ur=t,t.b?.is_pending&&(t.f&(Lt|Nn|yr))!==0&&(t.f&dt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var i=n.f;if(At!==null&&n===C&&(S===null||(S.f&X)===0))return;if((i&(ot|Ae))!==0){if((i&Y)===0)return;n.f^=Y}}this.#n.push(n)}}function Zl(){try{Cl()}catch(e){Ye(e,ur)}}let Ue=null;function gi(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var i=e[n++];if((i.f&(Ee|ge))===0&&sn(i)&&(Ue=new Set,It(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&_s(i),Ue?.size>0)){Xe.clear();for(const r of Ue){if((r.f&(Ee|ge))!==0)continue;const s=[r];let l=r.parent;for(;l!==null;)Ue.has(l)&&(Ue.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const a=s[o];(a.f&(Ee|ge))===0&&It(a)}}Ue.clear()}}Ue=null}}function Ki(e,t,n,i){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const r of e.reactions){const s=r.f;(s&X)!==0?Ki(r,t,n,i):(s&(Er|Je))!==0&&(s&J)===0&&Qi(r,t,i)&&($(r,J),Sr(r))}}function Qi(e,t,n){const i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const r of e.deps){if(Rt.call(t,r))return!0;if((r.f&X)!==0&&Qi(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Sr(e){z.schedule(e)}function Ji(e,t){if(!((e.f&Ae)!==0&&(e.f&Y)!==0)){(e.f&J)!==0?t.d.push(e):(e.f&Se)!==0&&t.m.push(e),$(e,Y);for(var n=e.first;n!==null;)Ji(n,t),n=n.next}}function es(e){$(e,Y);for(var t=e.first;t!==null;)es(t),t=t.next}function Xl(e){let t=0,n=ft(0),i;return()=>{Cr()&&(A(n),ma(()=>(t===0&&(i=Ss(()=>e(()=>Jt(n)))),t+=1,()=>{Ze(()=>{t-=1,t===0&&(i?.(),i=void 0,Jt(n))})})))}}var Kl=ut|Dt;function Ql(e,t,n,i){new Jl(e,t,n,i)}class Jl{parent;is_pending=!1;transform_error;#e;#o=null;#t;#l;#r;#n=null;#i=null;#s=null;#a=null;#u=0;#c=0;#h=!1;#p=new Set;#d=new Set;#f=null;#b=Xl(()=>(this.#f=ft(this.#u),()=>{this.#f=null}));constructor(t,n,i,r){this.#e=t,this.#t=n,this.#l=s=>{var l=C;l.b=this,l.f|=ar,i(s)},this.parent=C.b,this.transform_error=r??this.parent?.transform_error??(s=>s),this.#r=zn(()=>{this.#_()},Kl)}#k(){try{this.#n=fe(()=>this.#l(this.#e))}catch(t){this.error(t)}}#w(t){const n=this.#t.failed;n&&(this.#s=fe(()=>{n(this.#e,()=>t,()=>()=>{})}))}#x(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#i=fe(()=>t(this.#e)),Ze(()=>{var n=this.#a=document.createDocumentFragment(),i=je();n.append(i),this.#n=this.#v(()=>fe(()=>this.#l(i))),this.#c===0&&(this.#e.before(n),this.#a=null,lt(this.#i,()=>{this.#i=null}),this.#g(z))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#n=fe(()=>{this.#l(this.#e)}),this.#c>0){var t=this.#a=document.createDocumentFragment();Nr(this.#n,t);const n=this.#t.pending;this.#i=fe(()=>n(this.#e))}else this.#g(z)}catch(n){this.error(n)}}#g(t){this.is_pending=!1;for(const n of this.#p)$(n,J),t.schedule(n);for(const n of this.#d)$(n,Se),t.schedule(n);this.#p.clear(),this.#d.clear()}defer_effect(t){Xi(t,this.#p,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#v(t){var n=C,i=S,r=ve;Ie(this.#r),ke(this.#r),Ot(this.#r.ctx);try{return Qe.ensure(),t()}catch(s){return Vi(s),null}finally{Ie(n),ke(i),Ot(r)}}#m(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t,n);return}this.#c+=t,this.#c===0&&(this.#g(n),this.#i&<(this.#i,()=>{this.#i=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(t,n){this.#m(t,n),this.#u+=t,!(!this.#f||this.#h)&&(this.#h=!0,Ze(()=>{this.#h=!1,this.#f&&Ct(this.#f,this.#u)}))}get_effect_pending(){return this.#b(),A(this.#f)}error(t){var n=this.#t.onerror;let i=this.#t.failed;if(!n&&!i)throw t;this.#n&&(Q(this.#n),this.#n=null),this.#i&&(Q(this.#i),this.#i=null),this.#s&&(Q(this.#s),this.#s=null);var r=!1,s=!1;const l=()=>{if(r){jl();return}r=!0,s&&Pl(),this.#s!==null&<(this.#s,()=>{this.#s=null}),this.#v(()=>{this.#_()})},o=a=>{try{s=!0,n?.(a,l),s=!1}catch(u){Ye(u,this.#r&&this.#r.parent)}i&&(this.#s=this.#v(()=>{try{return fe(()=>{var u=C;u.b=this,u.f|=ar,i(this.#e,()=>a,()=>l)})}catch(u){return Ye(u,this.#r.parent),null}}))};Ze(()=>{var a;try{a=this.transform_error(t)}catch(u){Ye(u,this.#r&&this.#r.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,u=>Ye(u,this.#r&&this.#r.parent)):o(a)})}}function ts(e,t,n,i){const r=Rr;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){i(t.map(r));return}var l=C,o=ea(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function u(d){o();try{i(d)}catch(v){(l.f&Ee)===0&&Ye(v,l)}Sn()}if(n.length===0){a.then(()=>u(t.map(r)));return}var f=ns();function p(){Promise.all(n.map(d=>ta(d))).then(d=>u([...t.map(r),...d])).catch(d=>Ye(d,l)).finally(()=>f())}a?a.then(()=>{o(),p(),Sn()}):p()}function ea(){var e=C,t=S,n=ve,i=z;return function(s=!0){Ie(e),ke(t),Ot(n),s&&(e.f&Ee)===0&&(i?.activate(),i?.apply())}}function Sn(e=!0){Ie(null),ke(null),Ot(null),e&&z?.deactivate()}function ns(){var e=C.b,t=z,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(i=!1)=>{e.update_pending_count(-1,t),t.decrement(n,i)}}function Rr(e){var t=X|J,n=S!==null&&(S.f&X)!==0?S:null;return C!==null&&(C.f|=Dt),{ctx:ve,deps:null,effects:null,equals:qi,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:n??C,ac:null}}function ta(e,t,n){let i=C;i===null&&Al();var r=void 0,s=ft(Z),l=!S,o=new Map;return _a(()=>{var a=C,u=Hi();r=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).finally(Sn)}catch(v){u.reject(v),Sn()}var f=z;if(l){if((a.f&dt)!==0)var p=ns();if(i.b.is_rendered())o.get(f)?.reject(Be),o.delete(f);else{for(const v of o.values())v.reject(Be);o.clear()}o.set(f,u)}const d=(v,h=void 0)=>{if(p){var b=h===Be;p(b)}if(!(h===Be||(a.f&Ee)!==0)){if(f.activate(),h)s.f|=Ve,Ct(s,h);else{(s.f&Ve)!==0&&(s.f^=Ve),Ct(s,v);for(const[y,_]of o){if(o.delete(y),y===f)break;_.reject(Be)}}f.deactivate()}};u.promise.then(d,v=>d(null,v||"unknown"))}),fs(()=>{for(const a of o.values())a.reject(Be)}),new Promise(a=>{function u(f){function p(){f===r?a(s):u(r)}f.then(p,p)}u(r)})}function na(e){const t=Rr(e);return ks(t),t}function ra(e){const t=Rr(e);return t.equals=Wi,t}function ia(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Q(t[n])}}function sa(e){for(var t=e.parent;t!==null;){if((t.f&X)===0)return(t.f&Ee)===0?t:null;t=t.parent}return null}function Lr(e){var t,n=C;Ie(sa(e));try{e.f&=~ct,ia(e),t=ys(e)}finally{Ie(n)}return t}function rs(e){var t=Lr(e);if(!e.equals(t)&&(e.wv=xs(),(!z?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){$(e,Y);return}ht||(Ce!==null?(Cr()||z?.is_fork)&&Ce.set(e,t):Ar(e))}function la(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Be),t.teardown=kl,t.ac=null,nn(t,0),Ir(t))}function is(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&It(t)}let cr=new Set;const Xe=new Map;let ss=!1;function ft(e,t){var n={f:0,v:e,reactions:null,equals:qi,rv:0,wv:0};return n}function ie(e,t){const n=ft(e);return ks(n),n}function aa(e,t=!1,n=!0){const i=ft(e);return t||(i.equals=Wi),i}function te(e,t,n=!1){S!==null&&(!ye||(S.f&pi)!==0)&&Yi()&&(S.f&(X|Je|Er|pi))!==0&&(be===null||!Rt.call(be,e))&&Nl();let i=n?it(t):t;return Ct(e,i,Tn)}function Ct(e,t,n=null){if(!e.equals(t)){var i=e.v;ht?Xe.set(e,t):Xe.set(e,i),e.v=t;var r=Qe.ensure();if(r.capture(e,i),(e.f&X)!==0){const s=e;(e.f&J)!==0&&Lr(s),Ar(s)}e.wv=xs(),ls(e,J,n),C!==null&&(C.f&Y)!==0&&(C.f&(Ae|ot))===0&&(_e===null?wa([e]):_e.push(e)),!r.is_fork&&cr.size>0&&!ss&&oa()}return t}function oa(){ss=!1;for(const e of cr)(e.f&Y)!==0&&$(e,Se),sn(e)&&It(e);cr.clear()}function Jt(e){te(e,e.v+1)}function ls(e,t,n){var i=e.reactions;if(i!==null)for(var r=i.length,s=0;s<r;s++){var l=i[s],o=l.f,a=(o&J)===0;if(a&&$(l,t),(o&X)!==0){var u=l;Ce?.delete(u),(o&ct)===0&&(o&me&&(l.f|=ct),ls(u,Se,n))}else if(a){var f=l;(o&Je)!==0&&Ue!==null&&Ue.add(f),n!==null?n.push(f):Sr(f)}}}function it(e){if(typeof e!="object"||e===null||Qt in e)return e;const t=Bi(e);if(t!==ml&&t!==bl)return e;var n=new Map,i=Tr(e),r=ie(0),s=at,l=o=>{if(at===s)return o();var a=S,u=at;ke(null),bi(s);var f=o();return ke(a),bi(u),f};return i&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(o,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Il();var f=n.get(a);return f===void 0?l(()=>{var p=ie(u.value);return n.set(a,p),p}):te(f,u.value,!0),!0},deleteProperty(o,a){var u=n.get(a);if(u===void 0){if(a in o){const f=l(()=>ie(Z));n.set(a,f),Jt(r)}}else te(u,Z),Jt(r);return!0},get(o,a,u){if(a===Qt)return e;var f=n.get(a),p=a in o;if(f===void 0&&(!p||Kt(o,a)?.writable)&&(f=l(()=>{var v=it(p?o[a]:Z),h=ie(v);return h}),n.set(a,f)),f!==void 0){var d=A(f);return d===Z?void 0:d}return Reflect.get(o,a,u)},getOwnPropertyDescriptor(o,a){var u=Reflect.getOwnPropertyDescriptor(o,a);if(u&&"value"in u){var f=n.get(a);f&&(u.value=A(f))}else if(u===void 0){var p=n.get(a),d=p?.v;if(p!==void 0&&d!==Z)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(o,a){if(a===Qt)return!0;var u=n.get(a),f=u!==void 0&&u.v!==Z||Reflect.has(o,a);if(u!==void 0||C!==null&&(!f||Kt(o,a)?.writable)){u===void 0&&(u=l(()=>{var d=f?it(o[a]):Z,v=ie(d);return v}),n.set(a,u));var p=A(u);if(p===Z)return!1}return f},set(o,a,u,f){var p=n.get(a),d=a in o;if(i&&a==="length")for(var v=u;v<p.v;v+=1){var h=n.get(v+"");h!==void 0?te(h,Z):v in o&&(h=l(()=>ie(Z)),n.set(v+"",h))}if(p===void 0)(!d||Kt(o,a)?.writable)&&(p=l(()=>ie(void 0)),te(p,it(u)),n.set(a,p));else{d=p.v!==Z;var b=l(()=>it(u));te(p,b)}var y=Reflect.getOwnPropertyDescriptor(o,a);if(y?.set&&y.set.call(f,u),!d){if(i&&typeof a=="string"){var _=n.get("length"),x=Number(a);Number.isInteger(x)&&x>=_.v&&te(_,x+1)}Jt(r)}return!0},ownKeys(o){A(r);var a=Reflect.ownKeys(o).filter(p=>{var d=n.get(p);return d===void 0||d.v!==Z});for(var[u,f]of n)f.v!==Z&&!(u in o)&&a.push(u);return a},setPrototypeOf(){Dl()}})}function vi(e){try{if(e!==null&&typeof e=="object"&&Qt in e)return e[Qt]}catch{}return e}function ua(e,t){return Object.is(vi(e),vi(t))}var _i,as,os,us;function ca(){if(_i===void 0){_i=window,as=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;os=Kt(t,"firstChild").get,us=Kt(t,"nextSibling").get,fi(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fi(n)&&(n.__t=void 0)}}function je(e=""){return document.createTextNode(e)}function Rn(e){return os.call(e)}function rn(e){return us.call(e)}function P(e,t){return Rn(e)}function St(e,t=!1){{var n=Rn(e);return n instanceof Comment&&n.data===""?rn(n):n}}function ue(e,t=1,n=!1){let i=e;for(;t--;)i=rn(i);return i}function fa(e){e.textContent=""}function cs(){return!1}function ha(e,t,n){return document.createElementNS(Gi,e,void 0)}function pa(e,t){if(t){const n=document.body;e.autofocus=!0,Ze(()=>{document.activeElement===n&&e.focus()})}}function Or(e){var t=S,n=C;ke(null),Ie(null);try{return e()}finally{ke(t),Ie(n)}}function da(e){C===null&&(S===null&&Ol(),Ll()),ht&&Rl()}function ga(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function De(e,t){var n=C;n!==null&&(n.f&ge)!==0&&(e|=ge);var i={ctx:ve,deps:null,nodes:null,f:e|J|me,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},r=i;if((e&Lt)!==0)At!==null?At.push(i):Qe.ensure().schedule(i);else if(t!==null){try{It(i)}catch(l){throw Q(i),l}r.deps===null&&r.teardown===null&&r.nodes===null&&r.first===r.last&&(r.f&Dt)===0&&(r=r.first,(e&Je)!==0&&(e&ut)!==0&&r!==null&&(r.f|=ut))}if(r!==null&&(r.parent=n,n!==null&&ga(r,n),S!==null&&(S.f&X)!==0&&(e&ot)===0)){var s=S;(s.effects??=[]).push(r)}return i}function Cr(){return S!==null&&!ye}function fs(e){const t=De(Nn,null);return $(t,Y),t.teardown=e,t}function hs(e){da();var t=C.f,n=!S&&(t&Ae)!==0&&(t&dt)===0;if(n){var i=ve;(i.e??=[]).push(e)}else return ps(e)}function ps(e){return De(Lt|Tl,e)}function va(e){Qe.ensure();const t=De(ot|Dt,e);return(n={})=>new Promise(i=>{n.outro?lt(t,()=>{Q(t),i(void 0)}):(Q(t),i(void 0))})}function ds(e){return De(Lt,e)}function _a(e){return De(Er|Dt,e)}function ma(e,t=0){return De(Nn|t,e)}function Ge(e,t=[],n=[],i=[]){ts(i,t,n,r=>{De(Nn,()=>e(...r.map(A)))})}function zn(e,t=0){var n=De(Je|t,e);return n}function gs(e,t=0){var n=De(yr|t,e);return n}function fe(e){return De(Ae|Dt,e)}function vs(e){var t=e.teardown;if(t!==null){const n=ht,i=S;mi(!0),ke(null);try{t.call(null)}finally{mi(n),ke(i)}}}function Ir(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const r=n.ac;r!==null&&Or(()=>{r.abort(Be)});var i=n.next;(n.f&ot)!==0?n.parent=null:Q(n,t),n=i}}function ba(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ae)===0&&Q(t),t=n}}function Q(e,t=!0){var n=!1;(t||(e.f&xl)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ka(e.nodes.start,e.nodes.end),n=!0),$(e,hi),Ir(e,t&&!n),nn(e,0);var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)s.stop();vs(e),e.f^=hi,e.f|=Ee;var r=e.parent;r!==null&&r.first!==null&&_s(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function ka(e,t){for(;e!==null;){var n=e===t?null:rn(e);e.remove(),e=n}}function _s(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function lt(e,t,n=!0){var i=[];ms(e,i,!0);var r=()=>{n&&Q(e),t&&t()},s=i.length;if(s>0){var l=()=>--s||r();for(var o of i)o.out(l)}else r()}function ms(e,t,n){if((e.f&ge)===0){e.f^=ge;var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var s=r.next,l=(r.f&ut)!==0||(r.f&Ae)!==0&&(e.f&Je)!==0;ms(r,t,l?n:!1),r=s}}}function Dr(e){bs(e,!0)}function bs(e,t){if((e.f&ge)!==0){e.f^=ge,(e.f&Y)===0&&($(e,J),Qe.ensure().schedule(e));for(var n=e.first;n!==null;){var i=n.next,r=(n.f&ut)!==0||(n.f&Ae)!==0;bs(n,r?t:!1),n=i}var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||t)&&l.in()}}function Nr(e,t){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end;n!==null;){var r=n===i?null:rn(n);t.append(n),n=r}}let yn=!1,ht=!1;function mi(e){ht=e}let S=null,ye=!1;function ke(e){S=e}let C=null;function Ie(e){C=e}let be=null;function ks(e){S!==null&&(be===null?be=[e]:be.push(e))}let ce=null,he=0,_e=null;function wa(e){_e=e}let ws=1,st=0,at=st;function bi(e){at=e}function xs(){return++ws}function sn(e){var t=e.f;if((t&J)!==0)return!0;if(t&X&&(e.f&=~ct),(t&Se)!==0){for(var n=e.deps,i=n.length,r=0;r<i;r++){var s=n[r];if(sn(s)&&rs(s),s.wv>e.wv)return!0}(t&me)!==0&&Ce===null&&$(e,Y)}return!1}function Ts(e,t,n=!0){var i=e.reactions;if(i!==null&&!(be!==null&&Rt.call(be,e)))for(var r=0;r<i.length;r++){var s=i[r];(s.f&X)!==0?Ts(s,t,!1):t===s&&(n?$(s,J):(s.f&Y)!==0&&$(s,Se),Sr(s))}}function ys(e){var t=ce,n=he,i=_e,r=S,s=be,l=ve,o=ye,a=at,u=e.f;ce=null,he=0,_e=null,S=(u&(Ae|ot))===0?e:null,be=null,Ot(e.ctx),ye=!1,at=++st,e.ac!==null&&(Or(()=>{e.ac.abort(Be)}),e.ac=null);try{e.f|=or;var f=e.fn,p=f();e.f|=dt;var d=e.deps,v=z?.is_fork;if(ce!==null){var h;if(v||nn(e,he),d!==null&&he>0)for(d.length=he+ce.length,h=0;h<ce.length;h++)d[he+h]=ce[h];else e.deps=d=ce;if(Cr()&&(e.f&me)!==0)for(h=he;h<d.length;h++)(d[h].reactions??=[]).push(e)}else!v&&d!==null&&he<d.length&&(nn(e,he),d.length=he);if(Yi()&&_e!==null&&!ye&&d!==null&&(e.f&(X|Se|J))===0)for(h=0;h<_e.length;h++)Ts(_e[h],e);if(r!==null&&r!==e){if(st++,r.deps!==null)for(let b=0;b<n;b+=1)r.deps[b].rv=st;if(t!==null)for(const b of t)b.rv=st;_e!==null&&(i===null?i=_e:i.push(..._e))}return(e.f&Ve)!==0&&(e.f^=Ve),p}catch(b){return Vi(b)}finally{e.f^=or,ce=t,he=n,_e=i,S=r,be=s,Ot(l),ye=o,at=a}}function xa(e,t){let n=t.reactions;if(n!==null){var i=gl.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}if(n===null&&(t.f&X)!==0&&(ce===null||!Rt.call(ce,t))){var s=t;(s.f&me)!==0&&(s.f^=me,s.f&=~ct),Ar(s),la(s),nn(s,0)}}function nn(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)xa(e,n[i])}function It(e){var t=e.f;if((t&Ee)===0){$(e,Y);var n=C,i=yn;C=e,yn=!0;try{(t&(Je|yr))!==0?ba(e):Ir(e),vs(e);var r=ys(e);e.teardown=typeof r=="function"?r:null,e.wv=ws;var s;dl&&ql&&(e.f&J)!==0&&e.deps}finally{yn=i,C=n}}}function A(e){var t=e.f,n=(t&X)!==0;if(S!==null&&!ye){var i=C!==null&&(C.f&Ee)!==0;if(!i&&(be===null||!Rt.call(be,e))){var r=S.deps;if((S.f&or)!==0)e.rv<st&&(e.rv=st,ce===null&&r!==null&&r[he]===e?he++:ce===null?ce=[e]:ce.push(e));else{(S.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[S]:Rt.call(s,S)||s.push(S)}}}if(ht&&Xe.has(e))return Xe.get(e);if(n){var l=e;if(ht){var o=l.v;return((l.f&Y)===0&&l.reactions!==null||As(l))&&(o=Lr(l)),Xe.set(l,o),o}var a=(l.f&me)===0&&!ye&&S!==null&&(yn||(S.f&me)!==0),u=(l.f&dt)===0;sn(l)&&(a&&(l.f|=me),rs(l)),a&&!u&&(is(l),Es(l))}if(Ce?.has(e))return Ce.get(e);if((e.f&Ve)!==0)throw e.v;return e.v}function Es(e){if(e.f|=me,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&X)!==0&&(t.f&me)===0&&(is(t),Es(t))}function As(e){if(e.v===Z)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Xe.has(t)||(t.f&X)!==0&&As(t))return!0;return!1}function Ss(e){var t=ye;try{return ye=!0,e()}finally{ye=t}}function Ta(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const ya=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ea(e){return ya.includes(e)}const Aa={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Sa(e){return e=e.toLowerCase(),Aa[e]??e}const Ra=["touchstart","touchmove"];function La(e){return Ra.includes(e)}const Vt=Symbol("events"),Rs=new Set,fr=new Set;function Oa(e,t,n,i={}){function r(s){if(i.capture||hr.call(t,s),!s.cancelBubble)return Or(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ze(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function Ca(e,t,n){(t[Vt]??={})[e]=n}function ln(e){for(var t=0;t<e.length;t++)Rs.add(e[t]);for(var n of fr)n(e)}let ki=null;function hr(e){var t=this,n=t.ownerDocument,i=e.type,r=e.composedPath?.()||[],s=r[0]||e.target;ki=e;var l=0,o=ki===e&&e[Vt];if(o){var a=r.indexOf(o);if(a!==-1&&(t===document||t===window)){e[Vt]=t;return}var u=r.indexOf(t);if(u===-1)return;a<=u&&(l=a)}if(s=r[l]||e.target,s!==t){vl(e,"currentTarget",{configurable:!0,get(){return s||n}});var f=S,p=C;ke(null),Ie(null);try{for(var d,v=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var b=s[Vt]?.[i];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(y){d?v.push(y):d=y}if(e.cancelBubble||h===t||h===null)break;s=h}if(d){for(let y of v)queueMicrotask(()=>{throw y});throw d}}finally{e[Vt]=t,delete e.currentTarget,ke(f),Ie(p)}}}const Ia=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Da(e){return Ia?.createHTML(e)??e}function Na(e){var t=ha("template");return t.innerHTML=Da(e.replaceAll("<!>","<!---->")),t.content}function Ln(e,t){var n=C;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ne(e,t){var n=(t&Fl)!==0,i=(t&Ul)!==0,r,s=!e.startsWith("<!>");return()=>{r===void 0&&(r=Na(s?e:"<!>"+e),n||(r=Rn(r)));var l=i||as?document.importNode(r,!0):r.cloneNode(!0);if(n){var o=Rn(l),a=l.lastChild;Ln(o,a)}else Ln(l,l);return l}}function Ls(e=""){{var t=je(e+"");return Ln(t,t),t}}function Os(){var e=document.createDocumentFragment(),t=document.createComment(""),n=je();return e.append(t,n),Ln(t,n),e}function H(e,t){e!==null&&e.before(t)}function de(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Pa(e,t){return Ma(e,t)}const mn=new Map;function Ma(e,{target:t,anchor:n,props:i={},events:r,context:s,intro:l=!0,transformError:o}){ca();var a=void 0,u=va(()=>{var f=n??t.appendChild(je());Ql(f,{pending:()=>{}},v=>{Pn({});var h=ve;s&&(h.c=s),r&&(i.$$events=r),a=e(v,i)||{},Mn()},o);var p=new Set,d=v=>{for(var h=0;h<v.length;h++){var b=v[h];if(!p.has(b)){p.add(b);var y=La(b);for(const R of[t,document]){var _=mn.get(R);_===void 0&&(_=new Map,mn.set(R,_));var x=_.get(b);x===void 0?(R.addEventListener(b,hr,{passive:y}),_.set(b,1)):_.set(b,x+1)}}}};return d(Dn(Rs)),fr.add(d),()=>{for(var v of p)for(const y of[t,document]){var h=mn.get(y),b=h.get(v);--b==0?(y.removeEventListener(v,hr),h.delete(v),h.size===0&&mn.delete(y)):h.set(v,b)}fr.delete(d),f!==n&&f.parentNode?.removeChild(f)}});return za.set(a,u),a}let za=new WeakMap;class Cs{anchor;#e=new Map;#o=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),i=this.#o.get(n);if(i)Dr(i),this.#l.delete(n);else{var r=this.#t.get(n);r&&(this.#o.set(n,r.effect),this.#t.delete(n),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(Q(o.effect),this.#t.delete(l))}for(const[s,l]of this.#o){if(s===n||this.#l.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();Nr(l,u),u.append(je()),this.#t.set(s,{effect:l,fragment:u})}else Q(l);this.#l.delete(s),this.#o.delete(s)};this.#r||!i?(this.#l.add(s),lt(l,o,!1)):o()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[i,r]of this.#t)n.includes(i)||(Q(r.effect),this.#t.delete(i))};ensure(t,n){var i=z,r=cs();if(n&&!this.#o.has(t)&&!this.#t.has(t))if(r){var s=document.createDocumentFragment(),l=je();s.append(l),this.#t.set(t,{effect:fe(()=>n(l)),fragment:s})}else this.#o.set(t,fe(()=>n(this.anchor)));if(this.#e.set(i,t),r){for(const[o,a]of this.#o)o===t?i.unskip_effect(a):i.skip_effect(a);for(const[o,a]of this.#t)o===t?i.unskip_effect(a.effect):i.skip_effect(a.effect);i.oncommit(this.#n),i.ondiscard(this.#i)}else this.#n(i)}}function Ke(e,t,n=!1){var i=new Cs(e),r=n?ut:0;function s(l,o){i.ensure(l,o)}zn(()=>{var l=!1;t((o,a=0)=>{l=!0,s(a,o)}),l||s(-1,null)},r)}function $a(e,t,n){for(var i=[],r=t.length,s,l=t.length,o=0;o<r;o++){let p=t[o];lt(p,()=>{if(s){if(s.pending.delete(p),s.done.add(p),s.pending.size===0){var d=e.outrogroups;pr(e,Dn(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var a=i.length===0&&n!==null;if(a){var u=n,f=u.parentNode;fa(f),f.append(u),e.items.clear()}pr(e,t,!a)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function pr(e,t,n=!0){var i;if(e.pending.size>0){i=new Set;for(const l of e.pending.values())for(const o of l)i.add(e.items.get(o).e)}for(var r=0;r<t.length;r++){var s=t[r];if(i?.has(s)){s.f|=He;const l=document.createDocumentFragment();Nr(s,l)}else Q(t[r],n)}}var wi;function Is(e,t,n,i,r,s=null){var l=e,o=new Map;{var a=e;l=a.appendChild(je())}var u=null,f=ra(()=>{var x=n();return Tr(x)?x:x==null?[]:Dn(x)}),p,d=new Map,v=!0;function h(x){(_.effect.f&Ee)===0&&(_.pending.delete(x),_.fallback=u,Fa(_,p,l,t,i),u!==null&&(p.length===0?(u.f&He)===0?Dr(u):(u.f^=He,Zt(u,null,l)):lt(u,()=>{u=null})))}function b(x){_.pending.delete(x)}var y=zn(()=>{p=A(f);for(var x=p.length,R=new Set,m=z,T=cs(),L=0;L<x;L+=1){var j=p[L],O=i(j,L),G=v?null:o.get(O);G?(G.v&&Ct(G.v,j),G.i&&Ct(G.i,L),T&&m.unskip_effect(G.e)):(G=Ua(o,v?l:wi??=je(),j,O,L,r,t,n),v||(G.e.f|=He),o.set(O,G)),R.add(O)}if(x===0&&s&&!u&&(v?u=fe(()=>s(l)):(u=fe(()=>s(wi??=je())),u.f|=He)),x>R.size&&Sl(),!v)if(d.set(m,R),T){for(const[Ne,F]of o)R.has(Ne)||m.skip_effect(F.e);m.oncommit(h),m.ondiscard(b)}else h(m);A(f)}),_={effect:y,items:o,pending:d,outrogroups:null,fallback:u};v=!1}function Ft(e){for(;e!==null&&(e.f&Ae)===0;)e=e.next;return e}function Fa(e,t,n,i,r){var s=t.length,l=e.items,o=Ft(e.effect.first),a,u=null,f=[],p=[],d,v,h,b;for(b=0;b<s;b+=1){if(d=t[b],v=r(d,b),h=l.get(v).e,e.outrogroups!==null)for(const O of e.outrogroups)O.pending.delete(h),O.done.delete(h);if((h.f&He)!==0)if(h.f^=He,h===o)Zt(h,null,n);else{var y=u?u.next:o;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),We(e,u,h),We(e,h,y),Zt(h,y,n),u=h,f=[],p=[],o=Ft(u.next);continue}if((h.f&ge)!==0&&Dr(h),h!==o){if(a!==void 0&&a.has(h)){if(f.length<p.length){var _=p[0],x;u=_.prev;var R=f[0],m=f[f.length-1];for(x=0;x<f.length;x+=1)Zt(f[x],_,n);for(x=0;x<p.length;x+=1)a.delete(p[x]);We(e,R.prev,m.next),We(e,u,R),We(e,m,_),o=_,u=m,b-=1,f=[],p=[]}else a.delete(h),Zt(h,o,n),We(e,h.prev,h.next),We(e,h,u===null?e.effect.first:u.next),We(e,u,h),u=h;continue}for(f=[],p=[];o!==null&&o!==h;)(a??=new Set).add(o),p.push(o),o=Ft(o.next);if(o===null)continue}(h.f&He)===0&&f.push(h),u=h,o=Ft(h.next)}if(e.outrogroups!==null){for(const O of e.outrogroups)O.pending.size===0&&(pr(e,Dn(O.done)),e.outrogroups?.delete(O));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||a!==void 0){var T=[];if(a!==void 0)for(h of a)(h.f&ge)===0&&T.push(h);for(;o!==null;)(o.f&ge)===0&&o!==e.fallback&&T.push(o),o=Ft(o.next);var L=T.length;if(L>0){var j=s===0?n:null;$a(e,T,j)}}}function Ua(e,t,n,i,r,s,l,o){var a=(l&Ml)!==0?(l&$l)===0?aa(n,!1,!1):ft(n):null,u=(l&zl)!==0?ft(r):null;return{v:a,i:u,e:fe(()=>(s(t,a??n,u??r,o),()=>{e.delete(i)}))}}function Zt(e,t,n){if(e.nodes)for(var i=e.nodes.start,r=e.nodes.end,s=t&&(t.f&He)===0?t.nodes.start:n;i!==null;){var l=rn(i);if(s.before(i),i===r)return;i=l}}function We(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Pr(e,t,...n){var i=new Cs(e);zn(()=>{const r=t()??null;i.ensure(r,r&&(s=>r(s,...n)))},ut)}function Ba(e,t){var n=void 0,i;gs(()=>{n!==(n=t())&&(i&&(Q(i),i=null),n&&(i=fe(()=>{ds(()=>n(e))})))})}function Ds(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ds(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Ha(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ds(e))&&(i&&(i+=" "),i+=t);return i}function ja(e){return typeof e=="object"?Ha(e):e??""}const xi=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Ga(e,t,n){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),n){for(var r of Object.keys(n))if(n[r])i=i?i+" "+r:r;else if(i.length)for(var s=r.length,l=0;(l=i.indexOf(r,l))>=0;){var o=l+s;(l===0||xi.includes(i[l-1]))&&(o===i.length||xi.includes(i[o]))?i=(l===0?"":i.substring(0,l))+i.substring(o+1):l=o}}return i===""?null:i}function Ti(e,t=!1){var n=t?" !important;":";",i="";for(var r of Object.keys(e)){var s=e[r];s!=null&&s!==""&&(i+=" "+r+": "+s+n)}return i}function Jn(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function qa(e,t){if(t){var n="",i,r;if(Array.isArray(t)?(i=t[0],r=t[1]):i=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,l=0,o=!1,a=[];i&&a.push(...Object.keys(i).map(Jn)),r&&a.push(...Object.keys(r).map(Jn));var u=0,f=-1;const b=e.length;for(var p=0;p<b;p++){var d=e[p];if(o?d==="/"&&e[p-1]==="*"&&(o=!1):s?s===d&&(s=!1):d==="/"&&e[p+1]==="*"?o=!0:d==='"'||d==="'"?s=d:d==="("?l++:d===")"&&l--,!o&&s===!1&&l===0){if(d===":"&&f===-1)f=p;else if(d===";"||p===b-1){if(f!==-1){var v=Jn(e.substring(u,f).trim());if(!a.includes(v)){d!==";"&&p++;var h=e.substring(u,p).trim();n+=" "+h+";"}}u=p+1,f=-1}}}}return i&&(n+=Ti(i)),r&&(n+=Ti(r,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function dr(e,t,n,i,r,s){var l=e.__className;if(l!==n||l===void 0){var o=Ga(n,i,s);o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o),e.__className=n}else if(s&&r!==s)for(var a in s){var u=!!s[a];(r==null||u!==!!r[a])&&e.classList.toggle(a,u)}return s}function er(e,t={},n,i){for(var r in n){var s=n[r];t[r]!==s&&(n[r]==null?e.style.removeProperty(r):e.style.setProperty(r,s,i))}}function Ns(e,t,n,i){var r=e.__style;if(r!==t){var s=qa(t,i);s==null?e.removeAttribute("style"):e.style.cssText=s,e.__style=t}else i&&(Array.isArray(i)?(er(e,n?.[0],i[0]),er(e,n?.[1],i[1],"important")):er(e,n,i));return i}function gr(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Tr(t))return Hl();for(var i of e.options)i.selected=t.includes(yi(i));return}for(i of e.options){var r=yi(i);if(ua(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Wa(e){var t=new MutationObserver(()=>{gr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),fs(()=>{t.disconnect()})}function yi(e){return"__value"in e?e.__value:e.value}const bn=Symbol("class"),Ut=Symbol("style"),Ps=Symbol("is custom element"),Ms=Symbol("is html"),Ya=ji?"option":"OPTION",Va=ji?"select":"SELECT";function Za(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ei(e,t,n,i){var r=zs(e);r[t]!==(r[t]=n)&&(t==="loading"&&(e[yl]=n),n==null?e.removeAttribute(t):typeof n!="string"&&$s(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Xa(e,t,n,i,r=!1,s=!1){var l=zs(e),o=l[Ps],a=!l[Ms],u=t||{},f=e.nodeName===Ya;for(var p in t)p in n||(n[p]=null);n.class?n.class=ja(n.class):n.class=null,n[Ut]&&(n.style??=null);var d=$s(e);for(const m in n){let T=n[m];if(f&&m==="value"&&T==null){e.value=e.__value="",u[m]=T;continue}if(m==="class"){var v=e.namespaceURI==="http://www.w3.org/1999/xhtml";dr(e,v,T,i,t?.[bn],n[bn]),u[m]=T,u[bn]=n[bn];continue}if(m==="style"){Ns(e,T,t?.[Ut],n[Ut]),u[m]=T,u[Ut]=n[Ut];continue}var h=u[m];if(!(T===h&&!(T===void 0&&e.hasAttribute(m)))){u[m]=T;var b=m[0]+m[1];if(b!=="$$")if(b==="on"){const L={},j="$$"+m;let O=m.slice(2);var y=Ea(O);if(Ta(O)&&(O=O.slice(0,-7),L.capture=!0),!y&&h){if(T!=null)continue;e.removeEventListener(O,u[j],L),u[j]=null}if(y)Ca(O,e,T),ln([O]);else if(T!=null){let G=function(Ne){u[m].call(this,Ne)};var R=G;u[j]=Oa(O,e,G,L)}}else if(m==="style")Ei(e,m,T);else if(m==="autofocus")pa(e,!!T);else if(!o&&(m==="__value"||m==="value"&&T!=null))e.value=e.__value=T;else if(m==="selected"&&f)Za(e,T);else{var _=m;a||(_=Sa(_));var x=_==="defaultValue"||_==="defaultChecked";if(T==null&&!o&&!x)if(l[m]=null,_==="value"||_==="checked"){let L=e;const j=t===void 0;if(_==="value"){let O=L.defaultValue;L.removeAttribute(_),L.defaultValue=O,L.value=L.__value=j?O:null}else{let O=L.defaultChecked;L.removeAttribute(_),L.defaultChecked=O,L.checked=j?O:!1}}else e.removeAttribute(m);else x||d.includes(_)&&(o||typeof T!="string")?(e[_]=T,_ in l&&(l[_]=Z)):typeof T!="function"&&Ei(e,_,T)}}}return u}function Ka(e,t,n=[],i=[],r=[],s,l=!1,o=!1){ts(r,n,i,a=>{var u=void 0,f={},p=e.nodeName===Va,d=!1;if(gs(()=>{var h=t(...a.map(A)),b=Xa(e,u,h,s,l,o);d&&p&&"value"in h&&gr(e,h.value);for(let _ of Object.getOwnPropertySymbols(f))h[_]||Q(f[_]);for(let _ of Object.getOwnPropertySymbols(h)){var y=h[_];_.description===Bl&&(!u||y!==u[_])&&(f[_]&&Q(f[_]),f[_]=fe(()=>Ba(e,()=>y))),b[_]=y}u=b}),p){var v=e;ds(()=>{gr(v,u.value,!0),Wa(v)})}d=!0})}function zs(e){return e.__attributes??={[Ps]:e.nodeName.includes("-"),[Ms]:e.namespaceURI===Gi}}var Ai=new Map;function $s(e){var t=e.getAttribute("is")||e.nodeName,n=Ai.get(t);if(n)return n;Ai.set(t,n=[]);for(var i,r=e,s=Element.prototype;s!==r;){i=_l(r);for(var l in i)i[l].set&&n.push(l);r=Bi(r)}return n}const Qa={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Ja(e,t,n){return new Proxy({props:e,exclude:t},Qa)}function vr(e,t,n,i){var r=i,s=!0,l=()=>(s&&(s=!1,r=i),r),o;o=e[t],o===void 0&&i!==void 0&&(o=l());var a;return a=()=>{var u=e[t];return u===void 0?l():(s=!0,u)},a}function Fs(e){ve===null&&El(),hs(()=>{const t=Ss(e);if(typeof t=="function")return t})}const eo="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(eo);var to=ne("<button><!></button>");function Us(e,t){let n=vr(t,"variant",3,"secondary"),i=vr(t,"size",3,"sm"),r=Ja(t,["$$slots","$$events","$$legacy","variant","size","children","class"]);var s=to();Ka(s,()=>({class:`btn ${n()??""} ${i()??""} ${t.class??""??""}`,...r}),void 0,void 0,void 0,"svelte-1ua3ks9");var l=P(s);Pr(l,()=>t.children),H(e,s)}ln(["click"]);var no=ne('<div class="empty svelte-v3do33"> </div>');function en(e,t){var n=no(),i=P(n);Ge(()=>de(i,t.message)),H(e,n)}var ro=ne('<div class="error svelte-1y9liqq"> </div>');function Bs(e,t){var n=Os(),i=St(n);{var r=s=>{var l=ro(),o=P(l);Ge(()=>de(o,t.message)),H(s,l)};Ke(i,s=>{t.message&&s(r)})}H(e,n)}ln(["click","keydown"]);var io=ne('<div class="page-shell svelte-1ntluue"><!></div>');function Hs(e,t){let n=vr(t,"padding",3,"24px");var i=io();let r;var s=P(i);Pr(s,()=>t.children),Ge(()=>r=Ns(i,"",r,{padding:n()})),H(e,i)}var so=ne('<span class="section-subtitle svelte-1uapugv"> </span>'),lo=ne('<div class="section-header svelte-1uapugv"><div class="section-titles svelte-1uapugv"><span class="section-title svelte-1uapugv"> </span> <!></div> <!></div>');function _r(e,t){var n=lo(),i=P(n),r=P(i),s=P(r),l=ue(r,2);{var o=f=>{var p=so(),d=P(p);Ge(()=>de(d,t.subtitle)),H(f,p)};Ke(l,f=>{t.subtitle&&f(o)})}var a=ue(i,2);{var u=f=>{var p=Os(),d=St(p);Pr(d,()=>t.action),H(f,p)};Ke(a,f=>{t.action&&f(u)})}Ge(()=>de(s,t.title)),H(e,n)}ln(["click"]);ln(["change"]);const{entries:js,setPrototypeOf:Si,isFrozen:ao,getPrototypeOf:oo,getOwnPropertyDescriptor:uo}=Object;let{freeze:le,seal:we,create:En}=Object,{apply:mr,construct:br}=typeof Reflect<"u"&&Reflect;le||(le=function(t){return t});we||(we=function(t){return t});mr||(mr=function(t,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];return t.apply(n,r)});br||(br=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return new t(...i)});const kn=ae(Array.prototype.forEach),co=ae(Array.prototype.lastIndexOf),Ri=ae(Array.prototype.pop),Bt=ae(Array.prototype.push),fo=ae(Array.prototype.splice),An=ae(String.prototype.toLowerCase),tr=ae(String.prototype.toString),nr=ae(String.prototype.match),Ht=ae(String.prototype.replace),ho=ae(String.prototype.indexOf),po=ae(String.prototype.trim),pe=ae(Object.prototype.hasOwnProperty),re=ae(RegExp.prototype.test),jt=go(TypeError);function ae(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return mr(e,t,i)}}function go(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return br(e,n)}}function E(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:An;Si&&Si(e,null);let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){const s=n(r);s!==r&&(ao(t)||(t[i]=s),r=s)}e[r]=!0}return e}function vo(e){for(let t=0;t<e.length;t++)pe(e,t)||(e[t]=null);return e}function Oe(e){const t=En(null);for(const[n,i]of js(e))pe(e,n)&&(Array.isArray(i)?t[n]=vo(i):i&&typeof i=="object"&&i.constructor===Object?t[n]=Oe(i):t[n]=i);return t}function Gt(e,t){for(;e!==null;){const i=uo(e,t);if(i){if(i.get)return ae(i.get);if(typeof i.value=="function")return ae(i.value)}e=oo(e)}function n(){return null}return n}const Li=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),rr=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ir=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_o=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),sr=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mo=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Oi=le(["#text"]),Ci=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),lr=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ii=le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wn=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bo=we(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=we(/<%[\w\W]*|[\w\W]*%>/gm),wo=we(/\$\{[\w\W]*/gm),xo=we(/^data-[\-\w.\u00B7-\uFFFF]+$/),To=we(/^aria-[\-\w]+$/),Gs=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yo=we(/^(?:\w+script|data):/i),Eo=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qs=we(/^html$/i),Ao=we(/^[a-z][.\w]*(-[.\w]+)+$/i);var Di=Object.freeze({__proto__:null,ARIA_ATTR:To,ATTR_WHITESPACE:Eo,CUSTOM_ELEMENT:Ao,DATA_ATTR:xo,DOCTYPE_NAME:qs,ERB_EXPR:ko,IS_ALLOWED_URI:Gs,IS_SCRIPT_OR_DATA:yo,MUSTACHE_EXPR:bo,TMPLIT_EXPR:wo});const qt={element:1,text:3,progressingInstruction:7,comment:8,document:9},So=function(){return typeof window>"u"?null:window},Ro=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ni=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ws(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:So();const t=w=>Ws(w);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==qt.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const i=n,r=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:o,Element:a,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:d,trustedTypes:v}=e,h=a.prototype,b=Gt(h,"cloneNode"),y=Gt(h,"remove"),_=Gt(h,"nextSibling"),x=Gt(h,"childNodes"),R=Gt(h,"parentNode");if(typeof l=="function"){const w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let m,T="";const{implementation:L,createNodeIterator:j,createDocumentFragment:O,getElementsByTagName:G}=n,{importNode:Ne}=i;let F=Ni();t.isSupported=typeof js=="function"&&typeof R=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:et,ERB_EXPR:V,TMPLIT_EXPR:Pe,DATA_ATTR:vt,ARIA_ATTR:Un,IS_SCRIPT_OR_DATA:Nt,ATTR_WHITESPACE:_t,CUSTOM_ELEMENT:on}=Di;let{IS_ALLOWED_URI:Pt}=Di,U=null;const un=E({},[...Li,...rr,...ir,...sr,...Oi]);let q=null;const cn=E({},[...Ci,...lr,...Ii,...wn]);let M=Object.seal(En(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),tt=null,mt=null;const qe=Object.seal(En(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let qr=!0,Bn=!0,Wr=!1,Yr=!0,bt=!1,fn=!0,nt=!1,Hn=!1,jn=!1,kt=!1,hn=!1,pn=!1,Vr=!0,Zr=!1;const ll="user-content-";let Gn=!0,Mt=!1,wt={},Re=null;const qn=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xr=null;const Kr=E({},["audio","video","img","source","image","track"]);let Wn=null;const Qr=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml";let xt=Me,Yn=!1,Vn=null;const al=E({},[dn,gn,Me],tr);let vn=E({},["mi","mo","mn","ms","mtext"]),_n=E({},["annotation-xml"]);const ol=E({},["title","style","font","a","script"]);let zt=null;const ul=["application/xhtml+xml","text/html"],cl="text/html";let W=null,Tt=null;const fl=n.createElement("form"),Jr=function(c){return c instanceof RegExp||c instanceof Function},Zn=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Tt&&Tt===c)){if((!c||typeof c!="object")&&(c={}),c=Oe(c),zt=ul.indexOf(c.PARSER_MEDIA_TYPE)===-1?cl:c.PARSER_MEDIA_TYPE,W=zt==="application/xhtml+xml"?tr:An,U=pe(c,"ALLOWED_TAGS")?E({},c.ALLOWED_TAGS,W):un,q=pe(c,"ALLOWED_ATTR")?E({},c.ALLOWED_ATTR,W):cn,Vn=pe(c,"ALLOWED_NAMESPACES")?E({},c.ALLOWED_NAMESPACES,tr):al,Wn=pe(c,"ADD_URI_SAFE_ATTR")?E(Oe(Qr),c.ADD_URI_SAFE_ATTR,W):Qr,Xr=pe(c,"ADD_DATA_URI_TAGS")?E(Oe(Kr),c.ADD_DATA_URI_TAGS,W):Kr,Re=pe(c,"FORBID_CONTENTS")?E({},c.FORBID_CONTENTS,W):qn,tt=pe(c,"FORBID_TAGS")?E({},c.FORBID_TAGS,W):Oe({}),mt=pe(c,"FORBID_ATTR")?E({},c.FORBID_ATTR,W):Oe({}),wt=pe(c,"USE_PROFILES")?c.USE_PROFILES:!1,qr=c.ALLOW_ARIA_ATTR!==!1,Bn=c.ALLOW_DATA_ATTR!==!1,Wr=c.ALLOW_UNKNOWN_PROTOCOLS||!1,Yr=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bt=c.SAFE_FOR_TEMPLATES||!1,fn=c.SAFE_FOR_XML!==!1,nt=c.WHOLE_DOCUMENT||!1,kt=c.RETURN_DOM||!1,hn=c.RETURN_DOM_FRAGMENT||!1,pn=c.RETURN_TRUSTED_TYPE||!1,jn=c.FORCE_BODY||!1,Vr=c.SANITIZE_DOM!==!1,Zr=c.SANITIZE_NAMED_PROPS||!1,Gn=c.KEEP_CONTENT!==!1,Mt=c.IN_PLACE||!1,Pt=c.ALLOWED_URI_REGEXP||Gs,xt=c.NAMESPACE||Me,vn=c.MATHML_TEXT_INTEGRATION_POINTS||vn,_n=c.HTML_INTEGRATION_POINTS||_n,M=c.CUSTOM_ELEMENT_HANDLING||{},c.CUSTOM_ELEMENT_HANDLING&&Jr(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=c.CUSTOM_ELEMENT_HANDLING.tagNameCheck),c.CUSTOM_ELEMENT_HANDLING&&Jr(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),bt&&(Bn=!1),hn&&(kt=!0),wt&&(U=E({},Oi),q=En(null),wt.html===!0&&(E(U,Li),E(q,Ci)),wt.svg===!0&&(E(U,rr),E(q,lr),E(q,wn)),wt.svgFilters===!0&&(E(U,ir),E(q,lr),E(q,wn)),wt.mathMl===!0&&(E(U,sr),E(q,Ii),E(q,wn))),pe(c,"ADD_TAGS")||(qe.tagCheck=null),pe(c,"ADD_ATTR")||(qe.attributeCheck=null),c.ADD_TAGS&&(typeof c.ADD_TAGS=="function"?qe.tagCheck=c.ADD_TAGS:(U===un&&(U=Oe(U)),E(U,c.ADD_TAGS,W))),c.ADD_ATTR&&(typeof c.ADD_ATTR=="function"?qe.attributeCheck=c.ADD_ATTR:(q===cn&&(q=Oe(q)),E(q,c.ADD_ATTR,W))),c.ADD_URI_SAFE_ATTR&&E(Wn,c.ADD_URI_SAFE_ATTR,W),c.FORBID_CONTENTS&&(Re===qn&&(Re=Oe(Re)),E(Re,c.FORBID_CONTENTS,W)),c.ADD_FORBID_CONTENTS&&(Re===qn&&(Re=Oe(Re)),E(Re,c.ADD_FORBID_CONTENTS,W)),Gn&&(U["#text"]=!0),nt&&E(U,["html","head","body"]),U.table&&(E(U,["tbody"]),delete tt.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw jt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');m=c.TRUSTED_TYPES_POLICY,T=m.createHTML("")}else m===void 0&&(m=Ro(v,r)),m!==null&&typeof T=="string"&&(T=m.createHTML(""));le&&le(c),Tt=c}},ei=E({},[...rr,...ir,..._o]),ti=E({},[...sr,...mo]),hl=function(c){let g=R(c);(!g||!g.tagName)&&(g={namespaceURI:xt,tagName:"template"});const k=An(c.tagName),N=An(g.tagName);return Vn[c.namespaceURI]?c.namespaceURI===gn?g.namespaceURI===Me?k==="svg":g.namespaceURI===dn?k==="svg"&&(N==="annotation-xml"||vn[N]):!!ei[k]:c.namespaceURI===dn?g.namespaceURI===Me?k==="math":g.namespaceURI===gn?k==="math"&&_n[N]:!!ti[k]:c.namespaceURI===Me?g.namespaceURI===gn&&!_n[N]||g.namespaceURI===dn&&!vn[N]?!1:!ti[k]&&(ol[k]||!ei[k]):!!(zt==="application/xhtml+xml"&&Vn[c.namespaceURI]):!1},Le=function(c){Bt(t.removed,{element:c});try{R(c).removeChild(c)}catch{y(c)}},rt=function(c,g){try{Bt(t.removed,{attribute:g.getAttributeNode(c),from:g})}catch{Bt(t.removed,{attribute:null,from:g})}if(g.removeAttribute(c),c==="is")if(kt||hn)try{Le(g)}catch{}else try{g.setAttribute(c,"")}catch{}},ni=function(c){let g=null,k=null;if(jn)c="<remove></remove>"+c;else{const B=nr(c,/^[\r\n\t ]+/);k=B&&B[0]}zt==="application/xhtml+xml"&&xt===Me&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const N=m?m.createHTML(c):c;if(xt===Me)try{g=new d().parseFromString(N,zt)}catch{}if(!g||!g.documentElement){g=L.createDocument(xt,"template",null);try{g.documentElement.innerHTML=Yn?T:N}catch{}}const ee=g.body||g.documentElement;return c&&k&&ee.insertBefore(n.createTextNode(k),ee.childNodes[0]||null),xt===Me?G.call(g,nt?"html":"body")[0]:nt?g.documentElement:ee},ri=function(c){return j.call(c.ownerDocument||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Xn=function(c){return c instanceof p&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof f)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},ii=function(c){return typeof o=="function"&&c instanceof o};function ze(w,c,g){kn(w,k=>{k.call(t,c,g,Tt)})}const si=function(c){let g=null;if(ze(F.beforeSanitizeElements,c,null),Xn(c))return Le(c),!0;const k=W(c.nodeName);if(ze(F.uponSanitizeElement,c,{tagName:k,allowedTags:U}),fn&&c.hasChildNodes()&&!ii(c.firstElementChild)&&re(/<[/\w!]/g,c.innerHTML)&&re(/<[/\w!]/g,c.textContent)||c.nodeType===qt.progressingInstruction||fn&&c.nodeType===qt.comment&&re(/<[/\w]/g,c.data))return Le(c),!0;if(!(qe.tagCheck instanceof Function&&qe.tagCheck(k))&&(!U[k]||tt[k])){if(!tt[k]&&ai(k)&&(M.tagNameCheck instanceof RegExp&&re(M.tagNameCheck,k)||M.tagNameCheck instanceof Function&&M.tagNameCheck(k)))return!1;if(Gn&&!Re[k]){const N=R(c)||c.parentNode,ee=x(c)||c.childNodes;if(ee&&N){const B=ee.length;for(let oe=B-1;oe>=0;--oe){const $e=b(ee[oe],!0);$e.__removalCount=(c.__removalCount||0)+1,N.insertBefore($e,_(c))}}}return Le(c),!0}return c instanceof a&&!hl(c)||(k==="noscript"||k==="noembed"||k==="noframes")&&re(/<\/no(script|embed|frames)/i,c.innerHTML)?(Le(c),!0):(bt&&c.nodeType===qt.text&&(g=c.textContent,kn([et,V,Pe],N=>{g=Ht(g,N," ")}),c.textContent!==g&&(Bt(t.removed,{element:c.cloneNode()}),c.textContent=g)),ze(F.afterSanitizeElements,c,null),!1)},li=function(c,g,k){if(mt[g]||Vr&&(g==="id"||g==="name")&&(k in n||k in fl))return!1;if(!(Bn&&!mt[g]&&re(vt,g))){if(!(qr&&re(Un,g))){if(!(qe.attributeCheck instanceof Function&&qe.attributeCheck(g,c))){if(!q[g]||mt[g]){if(!(ai(c)&&(M.tagNameCheck instanceof RegExp&&re(M.tagNameCheck,c)||M.tagNameCheck instanceof Function&&M.tagNameCheck(c))&&(M.attributeNameCheck instanceof RegExp&&re(M.attributeNameCheck,g)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(g,c))||g==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&re(M.tagNameCheck,k)||M.tagNameCheck instanceof Function&&M.tagNameCheck(k))))return!1}else if(!Wn[g]){if(!re(Pt,Ht(k,_t,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&c!=="script"&&ho(k,"data:")===0&&Xr[c])){if(!(Wr&&!re(Nt,Ht(k,_t,"")))){if(k)return!1}}}}}}}return!0},ai=function(c){return c!=="annotation-xml"&&nr(c,on)},oi=function(c){ze(F.beforeSanitizeAttributes,c,null);const{attributes:g}=c;if(!g||Xn(c))return;const k={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let N=g.length;for(;N--;){const ee=g[N],{name:B,namespaceURI:oe,value:$e}=ee,yt=W(B),Kn=$e;let K=B==="value"?Kn:po(Kn);if(k.attrName=yt,k.attrValue=K,k.keepAttr=!0,k.forceKeepAttr=void 0,ze(F.uponSanitizeAttribute,c,k),K=k.attrValue,Zr&&(yt==="id"||yt==="name")&&(rt(B,c),K=ll+K),fn&&re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,K)){rt(B,c);continue}if(yt==="attributename"&&nr(K,"href")){rt(B,c);continue}if(k.forceKeepAttr)continue;if(!k.keepAttr){rt(B,c);continue}if(!Yr&&re(/\/>/i,K)){rt(B,c);continue}bt&&kn([et,V,Pe],ci=>{K=Ht(K,ci," ")});const ui=W(c.nodeName);if(!li(ui,yt,K)){rt(B,c);continue}if(m&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!oe)switch(v.getAttributeType(ui,yt)){case"TrustedHTML":{K=m.createHTML(K);break}case"TrustedScriptURL":{K=m.createScriptURL(K);break}}if(K!==Kn)try{oe?c.setAttributeNS(oe,B,K):c.setAttribute(B,K),Xn(c)?Le(c):Ri(t.removed)}catch{rt(B,c)}}ze(F.afterSanitizeAttributes,c,null)},pl=function w(c){let g=null;const k=ri(c);for(ze(F.beforeSanitizeShadowDOM,c,null);g=k.nextNode();)ze(F.uponSanitizeShadowNode,g,null),si(g),oi(g),g.content instanceof s&&w(g.content);ze(F.afterSanitizeShadowDOM,c,null)};return t.sanitize=function(w){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,k=null,N=null,ee=null;if(Yn=!w,Yn&&(w="<!-->"),typeof w!="string"&&!ii(w))if(typeof w.toString=="function"){if(w=w.toString(),typeof w!="string")throw jt("dirty is not a string, aborting")}else throw jt("toString is not a function");if(!t.isSupported)return w;if(Hn||Zn(c),t.removed=[],typeof w=="string"&&(Mt=!1),Mt){if(w.nodeName){const $e=W(w.nodeName);if(!U[$e]||tt[$e])throw jt("root node is forbidden and cannot be sanitized in-place")}}else if(w instanceof o)g=ni("<!---->"),k=g.ownerDocument.importNode(w,!0),k.nodeType===qt.element&&k.nodeName==="BODY"||k.nodeName==="HTML"?g=k:g.appendChild(k);else{if(!kt&&!bt&&!nt&&w.indexOf("<")===-1)return m&&pn?m.createHTML(w):w;if(g=ni(w),!g)return kt?null:pn?T:""}g&&jn&&Le(g.firstChild);const B=ri(Mt?w:g);for(;N=B.nextNode();)si(N),oi(N),N.content instanceof s&&pl(N.content);if(Mt)return w;if(kt){if(hn)for(ee=O.call(g.ownerDocument);g.firstChild;)ee.appendChild(g.firstChild);else ee=g;return(q.shadowroot||q.shadowrootmode)&&(ee=Ne.call(i,ee,!0)),ee}let oe=nt?g.outerHTML:g.innerHTML;return nt&&U["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&re(qs,g.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
3
|
+
`+oe),bt&&kn([et,V,Pe],$e=>{oe=Ht(oe,$e," ")}),m&&pn?m.createHTML(oe):oe},t.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zn(w),Hn=!0},t.clearConfig=function(){Tt=null,Hn=!1},t.isValidAttribute=function(w,c,g){Tt||Zn({});const k=W(w),N=W(c);return li(k,N,g)},t.addHook=function(w,c){typeof c=="function"&&Bt(F[w],c)},t.removeHook=function(w,c){if(c!==void 0){const g=co(F[w],c);return g===-1?void 0:fo(F[w],g,1)[0]}return Ri(F[w])},t.removeHooks=function(w){F[w]=[]},t.removeAllHooks=function(){F=Ni()},t}Ws();function Mr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gt=Mr();function Ys(e){gt=e}var tn={exec:()=>null};function I(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(r,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(se.caret,"$1"),n=n.replace(r,l),i},getRegex:()=>new RegExp(n,t)};return i}var Lo=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Oo=/^(?:[ \t]*(?:\n|$))+/,Co=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Io=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,an=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Do=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zr=/(?:[*+-]|\d{1,9}[.)])/,Vs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zs=I(Vs).replace(/bull/g,zr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),No=I(Vs).replace(/bull/g,zr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$r=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Po=/^[^\n]+/,Fr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Mo=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zo=I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zr).getRegex(),$n="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ur=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$o=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ur).replace("tag",$n).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xs=I($r).replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),Fo=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xs).getRegex(),Br={blockquote:Fo,code:Co,def:Mo,fences:Io,heading:Do,hr:an,html:$o,lheading:Zs,list:zo,newline:Oo,paragraph:Xs,table:tn,text:Po},Pi=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),Uo={...Br,lheading:No,table:Pi,paragraph:I($r).replace("hr",an).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex()},Bo={...Br,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ur).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:tn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I($r).replace("hr",an).replace("heading",` *#{1,6} *[^
|
|
4
|
+
]`).replace("lheading",Zs).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ho=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jo=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ks=/^( {2,}|\\)\n(?!\s*$)/,Go=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fn=/[\p{P}\p{S}]/u,Hr=/[\s\p{P}\p{S}]/u,Qs=/[^\s\p{P}\p{S}]/u,qo=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Hr).getRegex(),Js=/(?!~)[\p{P}\p{S}]/u,Wo=/(?!~)[\s\p{P}\p{S}]/u,Yo=/(?:[^\s\p{P}\p{S}]|~)/u,Vo=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Lo?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),el=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Zo=I(el,"u").replace(/punct/g,Fn).getRegex(),Xo=I(el,"u").replace(/punct/g,Js).getRegex(),tl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ko=I(tl,"gu").replace(/notPunctSpace/g,Qs).replace(/punctSpace/g,Hr).replace(/punct/g,Fn).getRegex(),Qo=I(tl,"gu").replace(/notPunctSpace/g,Yo).replace(/punctSpace/g,Wo).replace(/punct/g,Js).getRegex(),Jo=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qs).replace(/punctSpace/g,Hr).replace(/punct/g,Fn).getRegex(),eu=I(/\\(punct)/,"gu").replace(/punct/g,Fn).getRegex(),tu=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),nu=I(Ur).replace("(?:-->|$)","-->").getRegex(),ru=I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",nu).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),On=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iu=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",On).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nl=I(/^!?\[(label)\]\[(ref)\]/).replace("label",On).replace("ref",Fr).getRegex(),rl=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fr).getRegex(),su=I("reflink|nolink(?!\\()","g").replace("reflink",nl).replace("nolink",rl).getRegex(),Mi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jr={_backpedal:tn,anyPunctuation:eu,autolink:tu,blockSkip:Vo,br:Ks,code:jo,del:tn,emStrongLDelim:Zo,emStrongRDelimAst:Ko,emStrongRDelimUnd:Jo,escape:Ho,link:iu,nolink:rl,punctuation:qo,reflink:nl,reflinkSearch:su,tag:ru,text:Go,url:tn},lu={...jr,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",On).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",On).getRegex()},kr={...jr,emStrongRDelimAst:Qo,emStrongLDelim:Xo,url:I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Mi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Mi).getRegex()},au={...kr,br:I(Ks).replace("{2,}","*").getRegex(),text:I(kr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Br,gfm:Uo,pedantic:Bo},Wt={normal:jr,gfm:kr,breaks:au,pedantic:lu},ou={"&":"&","<":"<",">":">",'"':""","'":"'"},zi=e=>ou[e];function Fe(e,t){if(t){if(se.escapeTest.test(e))return e.replace(se.escapeReplace,zi)}else if(se.escapeTestNoEncode.test(e))return e.replace(se.escapeReplaceNoEncode,zi);return e}function $i(e){try{e=encodeURI(e).replace(se.percentDecode,"%")}catch{return null}return e}function Fi(e,t){let n=e.replace(se.findPipe,(s,l,o)=>{let a=!1,u=l;for(;--u>=0&&o[u]==="\\";)a=!a;return a?"|":" |"}),i=n.split(se.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(se.slashPipe,"|");return i}function Yt(e,t,n){let i=e.length;if(i===0)return"";let r=0;for(;r<i&&e.charAt(i-r-1)===t;)r++;return e.slice(0,i-r)}function uu(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function Ui(e,t,n,i,r){let s=t.href,l=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:l,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,a}function cu(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
|
|
5
|
+
`).map(s=>{let l=s.match(n.other.beginningSpace);if(l===null)return s;let[o]=l;return o.length>=r.length?s.slice(r.length):s}).join(`
|
|
6
|
+
`)}var Cn=class{options;rules;lexer;constructor(e){this.options=e||gt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Yt(n,`
|
|
7
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=cu(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=Yt(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Yt(t[0],`
|
|
8
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Yt(t[0],`
|
|
9
|
+
`).split(`
|
|
10
|
+
`),i="",r="",s=[];for(;n.length>0;){let l=!1,o=[],a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))o.push(n[a]),l=!0;else if(!l)o.push(n[a]);else break;n=n.slice(a);let u=o.join(`
|
|
11
|
+
`),f=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
12
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
13
|
+
${u}`:u,r=r?`${r}
|
|
14
|
+
${f}`:f;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,s,!0),this.lexer.state.top=p,n.length===0)break;let d=s.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let v=d,h=v.raw+`
|
|
15
|
+
`+n.join(`
|
|
16
|
+
`),b=this.blockquote(h);s[s.length-1]=b,i=i.substring(0,i.length-v.raw.length)+b.raw,r=r.substring(0,r.length-v.text.length)+b.text;break}else if(d?.type==="list"){let v=d,h=v.raw+`
|
|
17
|
+
`+n.join(`
|
|
18
|
+
`),b=this.list(h);s[s.length-1]=b,i=i.substring(0,i.length-d.raw.length)+b.raw,r=r.substring(0,r.length-v.raw.length)+b.raw,n=h.substring(s.at(-1).raw.length).split(`
|
|
19
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=this.rules.other.listItemRegex(n),l=!1;for(;e;){let a=!1,u="",f="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let p=t[2].split(`
|
|
20
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=e.split(`
|
|
21
|
+
`,1)[0],v=!p.trim(),h=0;if(this.options.pedantic?(h=2,f=p.trimStart()):v?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,f=p.slice(h),h+=t[1].length),v&&this.rules.other.blankLine.test(d)&&(u+=d+`
|
|
22
|
+
`,e=e.substring(d.length+1),a=!0),!a){let b=this.rules.other.nextBulletRegex(h),y=this.rules.other.hrRegex(h),_=this.rules.other.fencesBeginRegex(h),x=this.rules.other.headingBeginRegex(h),R=this.rules.other.htmlBeginRegex(h);for(;e;){let m=e.split(`
|
|
23
|
+
`,1)[0],T;if(d=m,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),T=d):T=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||x.test(d)||R.test(d)||b.test(d)||y.test(d))break;if(T.search(this.rules.other.nonSpaceChar)>=h||!d.trim())f+=`
|
|
24
|
+
`+T.slice(h);else{if(v||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||x.test(p)||y.test(p))break;f+=`
|
|
25
|
+
`+d}!v&&!d.trim()&&(v=!0),u+=m+`
|
|
26
|
+
`,e=e.substring(m.length+1),p=T.slice(h)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),r.raw+=u}let o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a of r.items){if(this.lexer.state.top=!1,a.tokens=this.lexer.blockTokens(a.text,[]),a.task){if(a.text=a.text.replace(this.rules.other.listReplaceTask,""),a.tokens[0]?.type==="text"||a.tokens[0]?.type==="paragraph"){a.tokens[0].raw=a.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),a.tokens[0].text=a.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(a.raw);if(u){let f={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};a.checked=f.checked,r.loose?a.tokens[0]&&["paragraph","text"].includes(a.tokens[0].type)&&"tokens"in a.tokens[0]&&a.tokens[0].tokens?(a.tokens[0].raw=f.raw+a.tokens[0].raw,a.tokens[0].text=f.raw+a.tokens[0].text,a.tokens[0].tokens.unshift(f)):a.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):a.tokens.unshift(f)}}if(!r.loose){let u=a.tokens.filter(p=>p.type==="space"),f=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=f}}if(r.loose)for(let a of r.items){a.loose=!0;for(let u of a.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:i,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fi(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
27
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<n.length;l++)s.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:s.align[l]});for(let l of r)s.rows.push(Fi(l,s.header.length).map((o,a)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[a]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
28
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Yt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=uu(t[2],"()");if(s===-2)return;if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],r=s[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Ui(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[i.toLowerCase()];if(!r){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Ui(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let r=[...i[0]].length-1,s,l,o=r,a=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(i=u.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(l=[...s].length,i[3]||i[4]){o+=l;continue}else if((i[5]||i[6])&&r%3&&!((r+l)%3)){a+=l;continue}if(o-=l,o>0)continue;l=Math.min(l,l+o+a);let f=[...i[0]][0].length,p=e.slice(0,r+i.index+f+l);if(Math.min(r,l)%2){let v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,i;if(t[2]==="@")n=t[0],i="mailto:"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);n=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},xe=class wr{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||gt,this.options.tokenizer=this.options.tokenizer||new Cn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:se,block:xn.normal,inline:Wt.normal};this.options.pedantic?(n.block=xn.pedantic,n.inline=Wt.pedantic):this.options.gfm&&(n.block=xn.gfm,this.options.breaks?n.inline=Wt.breaks:n.inline=Wt.gfm),this.tokenizer.rules=n}static get rules(){return{block:xn,inline:Wt}}static lex(t,n){return new wr(n).lex(t)}static lexInline(t,n){return new wr(n).inlineTokens(t)}lex(t){t=t.replace(se.carriageReturn,`
|
|
29
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){for(this.options.pedantic&&(t=t.replace(se.tabCharGlobal," ").replace(se.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let l=n.at(-1);r.raw.length===1&&l!==void 0?l.raw+=`
|
|
30
|
+
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
31
|
+
`)?"":`
|
|
32
|
+
`)+r.raw,l.text+=`
|
|
33
|
+
`+r.text,this.inlineQueue.at(-1).src=l.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
34
|
+
`)?"":`
|
|
35
|
+
`)+r.raw,l.text+=`
|
|
36
|
+
`+r.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,o=t.slice(1),a;this.options.extensions.startBlock.forEach(u=>{a=u.call({lexer:this},o),typeof a=="number"&&a>=0&&(l=Math.min(l,a))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){let l=n.at(-1);i&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
37
|
+
`)?"":`
|
|
38
|
+
`)+r.raw,l.text+=`
|
|
39
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(r),i=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
40
|
+
`)?"":`
|
|
41
|
+
`)+r.raw,l.text+=`
|
|
42
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let i=t,r=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=r[2]?r[2].length:0,i=i.slice(0,r.index+s)+"["+"a".repeat(r[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let l=!1,o="";for(;t;){l||(o=""),l=!1;let a;if(this.options.extensions?.inline?.some(f=>(a=f.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let f=n.at(-1);a.type==="text"&&f?.type==="text"?(f.raw+=a.raw,f.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(t,i,o)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),n.push(a);continue}let u=t;if(this.options.extensions?.startInline){let f=1/0,p=t.slice(1),d;this.options.extensions.startInline.forEach(v=>{d=v.call({lexer:this},p),typeof d=="number"&&d>=0&&(f=Math.min(f,d))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(a=this.tokenizer.inlineText(u)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),l=!0;let f=n.at(-1);f?.type==="text"?(f.raw+=a.raw,f.text+=a.text):n.push(a);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},In=class{options;parser;constructor(e){this.options=e||gt}space(e){return""}code({text:e,lang:t,escaped:n}){let i=(t||"").match(se.notSpaceStart)?.[0],r=e.replace(se.endingNewline,"")+`
|
|
43
|
+
`;return i?'<pre><code class="language-'+Fe(i)+'">'+(n?r:Fe(r,!0))+`</code></pre>
|
|
44
|
+
`:"<pre><code>"+(n?r:Fe(r,!0))+`</code></pre>
|
|
45
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
46
|
+
${this.parser.parse(e)}</blockquote>
|
|
47
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
48
|
+
`}hr(e){return`<hr>
|
|
49
|
+
`}list(e){let t=e.ordered,n=e.start,i="";for(let l=0;l<e.items.length;l++){let o=e.items[l];i+=this.listitem(o)}let r=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+r+s+`>
|
|
50
|
+
`+i+"</"+r+`>
|
|
51
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
52
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
53
|
+
`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let i="";for(let r=0;r<e.rows.length;r++){let s=e.rows[r];n="";for(let l=0;l<s.length;l++)n+=this.tablecell(s[l]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
54
|
+
<thead>
|
|
55
|
+
`+t+`</thead>
|
|
56
|
+
`+i+`</table>
|
|
57
|
+
`}tablerow({text:e}){return`<tr>
|
|
58
|
+
${e}</tr>
|
|
59
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
60
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Fe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let i=this.parser.parseInline(n),r=$i(e);if(r===null)return i;e=r;let s='<a href="'+e+'"';return t&&(s+=' title="'+Fe(t)+'"'),s+=">"+i+"</a>",s}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=$i(e);if(r===null)return Fe(n);e=r;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Fe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Fe(e.text)}},Gr=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Te=class xr{options;renderer;textRenderer;constructor(t){this.options=t||gt,this.options.renderer=this.options.renderer||new In,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gr}static parse(t,n){return new xr(n).parse(t)}static parseInline(t,n){return new xr(n).parseInline(t)}parse(t){let n="";for(let i=0;i<t.length;i++){let r=t[i];if(this.options.extensions?.renderers?.[r.type]){let l=r,o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=o||"";continue}}let s=r;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){let i="";for(let r=0;r<t.length;r++){let s=t[r];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=o||"";continue}}let l=s;switch(l.type){case"escape":{i+=n.text(l);break}case"html":{i+=n.html(l);break}case"link":{i+=n.link(l);break}case"image":{i+=n.image(l);break}case"checkbox":{i+=n.checkbox(l);break}case"strong":{i+=n.strong(l);break}case"em":{i+=n.em(l);break}case"codespan":{i+=n.codespan(l);break}case"br":{i+=n.br(l);break}case"del":{i+=n.del(l);break}case"text":{i+=n.text(l);break}default:{let o='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},Xt=class{options;block;constructor(e){this.options=e||gt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?xe.lex:xe.lexInline}provideParser(){return this.block?Te.parse:Te.parseInline}},il=class{defaults=Mr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Te;Renderer=In;TextRenderer=Gr;Lexer=xe;Tokenizer=Cn;Hooks=Xt;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{let r=i;for(let s of r.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of r.rows)for(let l of s)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let r=i;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(s=>{let l=r[s].flat(1/0);n=n.concat(this.walkTokens(l,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let s=t.renderers[r.name];s?t.renderers[r.name]=function(...l){let o=r.renderer.apply(this,l);return o===!1&&(o=s.apply(this,l)),o}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[r.level];s?s.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),n.renderer){let r=this.defaults.renderer||new In(this.defaults);for(let s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let l=s,o=n.renderer[l],a=r[l];r[l]=(...u)=>{let f=o.apply(r,u);return f===!1&&(f=a.apply(r,u)),f||""}}i.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Cn(this.defaults);for(let s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let l=s,o=n.tokenizer[l],a=r[l];r[l]=(...u)=>{let f=o.apply(r,u);return f===!1&&(f=a.apply(r,u)),f}}i.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Xt;for(let s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let l=s,o=n.hooks[l],a=r[l];Xt.passThroughHooks.has(s)?r[l]=u=>{if(this.defaults.async&&Xt.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await o.call(r,u);return a.call(r,p)})();let f=o.call(r,u);return a.call(r,f)}:r[l]=(...u)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(r,u);return p===!1&&(p=await a.apply(r,u)),p})();let f=o.apply(r,u);return f===!1&&(f=a.apply(r,u)),f}}i.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(l){let o=[];return o.push(s.call(this,l)),r&&(o=o.concat(r.call(this,l))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return xe.lex(e,t??this.defaults)}parser(e,t){return Te.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},r={...this.defaults,...i},s=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(t):t,o=await(r.hooks?await r.hooks.provideLexer():e?xe.lex:xe.lexInline)(l,r),a=r.hooks?await r.hooks.processAllTokens(o):o;r.walkTokens&&await Promise.all(this.walkTokens(a,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser():e?Te.parse:Te.parseInline)(a,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(s);try{r.hooks&&(t=r.hooks.preprocess(t));let l=(r.hooks?r.hooks.provideLexer():e?xe.lex:xe.lexInline)(t,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let o=(r.hooks?r.hooks.provideParser():e?Te.parse:Te.parseInline)(l,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(l){return s(l)}}}onError(e,t){return n=>{if(n.message+=`
|
|
61
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Fe(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},pt=new il;function D(e,t){return pt.parse(e,t)}D.options=D.setOptions=function(e){return pt.setOptions(e),D.defaults=pt.defaults,Ys(D.defaults),D};D.getDefaults=Mr;D.defaults=gt;D.use=function(...e){return pt.use(...e),D.defaults=pt.defaults,Ys(D.defaults),D};D.walkTokens=function(e,t){return pt.walkTokens(e,t)};D.parseInline=pt.parseInline;D.Parser=Te;D.parser=Te.parse;D.Renderer=In;D.TextRenderer=Gr;D.Lexer=xe;D.lexer=xe.lex;D.Tokenizer=Cn;D.Hooks=Xt;D.parse=D;D.options;D.setOptions;D.use;D.walkTokens;D.parseInline;Te.parse;xe.lex;new il({breaks:!0,gfm:!0});const sl="/api/ext/plan";async function fu(){const e=await fetch(`${sl}/current`);if(!e.ok)throw new Error("Failed to load current plan");return await e.json()??null}async function hu(e){const t=new URLSearchParams;e?.status&&t.set("status",e.status),t.set("limit",String(e.limit)),e?.offset&&t.set("offset",String(e.offset));const n=t.toString(),i=await fetch(`${sl}${n?`?${n}`:""}`);if(!i.ok)throw new Error("Failed to load plans");return i.json()}var pu=ne('<div class="empty svelte-1jnehi7"><!> <p class="hint svelte-1jnehi7">The spirit can start a plan with <code class="svelte-1jnehi7">volute plan start "title" "description"</code></p></div>'),du=ne('<p class="plan-description svelte-1jnehi7"> </p>'),gu=ne('<div class="log-entry svelte-1jnehi7"><div class="log-header svelte-1jnehi7"><span class="log-mind svelte-1jnehi7"> </span> <span class="log-time svelte-1jnehi7"> </span></div> <div class="log-content svelte-1jnehi7"> </div></div>'),vu=ne('<!> <div class="log-list svelte-1jnehi7"></div>',1),_u=ne('<div class="plan-card svelte-1jnehi7"><h3 class="plan-title svelte-1jnehi7"> </h3> <!> <div class="plan-meta svelte-1jnehi7"> </div></div> <!>',1),mu=ne("<!> <!> <!>",1);function bu(e,t){Pn(t,!0);let n=ie(null),i=ie(!0),r=ie("");async function s(){try{te(n,await fu(),!0),te(r,"")}catch(a){te(r,a instanceof Error?a.message:"Failed to load plan",!0)}finally{te(i,!1)}}function l(a){return new Date(a).toLocaleString()}function o(a){const u=Date.now()-new Date(a).getTime(),f=Math.floor(u/6e4);if(f<1)return"just now";if(f<60)return`${f}m ago`;const p=Math.floor(f/60);return p<24?`${p}h ago`:`${Math.floor(p/24)}d ago`}Fs(()=>{s()}),Hs(e,{children:(a,u)=>{var f=mu(),p=St(f);_r(p,{title:"System Plan",action:x=>{Us(x,{get onclick(){return t.onViewHistory},children:(R,m)=>{var T=Ls("History");H(R,T)},$$slots:{default:!0}})}});var d=ue(p,2);Bs(d,{get message(){return A(r)}});var v=ue(d,2);{var h=_=>{en(_,{message:"Loading..."})},b=_=>{var x=pu(),R=P(x);en(R,{message:"No active plan."}),H(_,x)},y=_=>{var x=_u(),R=St(x),m=P(R),T=P(m),L=ue(m,2);{var j=V=>{var Pe=du(),vt=P(Pe);Ge(()=>de(vt,A(n).description)),H(V,Pe)};Ke(L,V=>{A(n).description&&V(j)})}var O=ue(L,2),G=P(O),Ne=ue(R,2);{var F=V=>{var Pe=vu(),vt=St(Pe);_r(vt,{title:"Progress"});var Un=ue(vt,2);Is(Un,21,()=>A(n).logs,Nt=>Nt.id,(Nt,_t)=>{var on=gu(),Pt=P(on),U=P(Pt),un=P(U),q=ue(U,2),cn=P(q),M=ue(Pt,2),tt=P(M);Ge(mt=>{de(un,A(_t).mind_name),de(cn,mt),de(tt,A(_t).content)},[()=>o(A(_t).created_at)]),H(Nt,on)}),H(V,Pe)},et=V=>{en(V,{message:"No progress logged yet."})};Ke(Ne,V=>{A(n).logs&&A(n).logs.length>0?V(F):V(et,-1)})}Ge(V=>{de(T,A(n).title),de(G,`Set by ${(A(n).set_by_display_name||A(n).set_by_username)??""} · ${V??""}`)},[()=>l(A(n).created_at)]),H(_,x)};Ke(v,_=>{A(i)?_(h):A(n)?_(y,-1):_(b,1)})}H(a,f)},$$slots:{default:!0}}),Mn()}var ku=ne('<div><div class="plan-info svelte-1r00j2e"><span class="plan-title svelte-1r00j2e"> </span> <span> </span></div> <div class="plan-meta svelte-1r00j2e"> </div></div>'),wu=ne('<div class="plans-list svelte-1r00j2e"></div>'),xu=ne("<!> <!> <!>",1);function Tu(e,t){Pn(t,!0);let n=ie(it([])),i=ie(!0),r=ie("");async function s(){try{te(n,await hu({limit:50}),!0),te(r,"")}catch(o){te(r,o instanceof Error?o.message:"Failed to load plans",!0)}finally{te(i,!1)}}function l(o){return new Date(o).toLocaleDateString()}Fs(()=>{s()}),Hs(e,{children:(o,a)=>{var u=xu(),f=St(u);_r(f,{title:"Plan History",action:_=>{Us(_,{get onclick(){return t.onBack},children:(x,R)=>{var m=Ls("← Current");H(x,m)},$$slots:{default:!0}})}});var p=ue(f,2);Bs(p,{get message(){return A(r)}});var d=ue(p,2);{var v=y=>{en(y,{message:"Loading..."})},h=y=>{en(y,{message:"No plans yet."})},b=y=>{var _=wu();Is(_,21,()=>A(n),x=>x.id,(x,R)=>{var m=ku();let T;var L=P(m),j=P(L),O=P(j),G=ue(j,2),Ne=P(G),F=ue(L,2),et=P(F);Ge(V=>{T=dr(m,1,"plan-row svelte-1r00j2e",null,T,{active:A(R).status==="active"}),de(O,A(R).title),dr(G,1,`badge ${A(R).status??""}`,"svelte-1r00j2e"),de(Ne,A(R).status),de(et,`${(A(R).set_by_display_name||A(R).set_by_username)??""} · ${V??""}`)},[()=>l(A(R).created_at)]),H(x,m)}),H(y,_)};Ke(d,y=>{A(i)?y(v):A(n).length===0?y(h,1):y(b,-1)})}H(o,u)},$$slots:{default:!0}}),Mn()}var yu=ne('<div class="ext-app svelte-1r8vfx3"><!></div>');function Eu(e,t){Pn(t,!0);let n=ie(it(window.location.hash));hs(()=>{const a=()=>{te(n,window.location.hash,!0)};return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)});let i=na(()=>A(n).replace(/^#\/?/,"")==="history"?"history":"current");var r=yu(),s=P(r);{var l=a=>{Tu(a,{onBack:()=>{window.location.hash=""}})},o=a=>{bu(a,{onViewHistory:()=>{window.location.hash="history"}})};Ke(s,a=>{A(i)==="history"?a(l):a(o,-1)})}H(e,r),Mn()}Pa(Eu,{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>Plan</title>
|
|
8
|
+
<script type="module" crossorigin src="/ext/plan/assets/index-FMEJmvQz.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/ext/plan/assets/index-CJj2gZnZ.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|