@ganglion/xacpx-relay 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/relay-web/assets/DashboardView-V2Sbakyn.js +288 -0
  2. package/dist/relay-web/assets/{LoginView-DvcYBGgB.js → LoginView-CjCVgxIO.js} +1 -1
  3. package/dist/relay-web/assets/{SettingsView-BSwCsnvJ.js → SettingsView-DUzMf43Z.js} +1 -1
  4. package/dist/relay-web/assets/c-BIGW1oBm.js +1 -0
  5. package/dist/relay-web/assets/cpp-BRuaLJcg.js +1 -0
  6. package/dist/relay-web/assets/csharp-COcwbKMJ.js +1 -0
  7. package/dist/relay-web/assets/css-DPfMkruS.js +1 -0
  8. package/dist/relay-web/assets/diff-D97Zzqfu.js +1 -0
  9. package/dist/relay-web/assets/dockerfile-BcOcwvcX.js +1 -0
  10. package/dist/relay-web/assets/github-dark-DHJKELXO.js +1 -0
  11. package/dist/relay-web/assets/github-light-DAi9KRSo.js +1 -0
  12. package/dist/relay-web/assets/go-CxLEBnE3.js +1 -0
  13. package/dist/relay-web/assets/graphql-ChdNCCLP.js +1 -0
  14. package/dist/relay-web/assets/html-GMplVEZG.js +1 -0
  15. package/dist/relay-web/assets/{index-Cu0pAYQ7.css → index-BkW8B5tN.css} +1 -1
  16. package/dist/relay-web/assets/{index-D94fhfTx.js → index-DV-ybEGu.js} +3 -3
  17. package/dist/relay-web/assets/java-CylS5w8V.js +1 -0
  18. package/dist/relay-web/assets/javascript-wDzz0qaB.js +1 -0
  19. package/dist/relay-web/assets/json-Cp-IABpG.js +1 -0
  20. package/dist/relay-web/assets/jsx-g9-lgVsj.js +1 -0
  21. package/dist/relay-web/assets/kotlin-BdnUsdx6.js +1 -0
  22. package/dist/relay-web/assets/make-CHLpvVh8.js +1 -0
  23. package/dist/relay-web/assets/markdown-Cvjx9yec.js +1 -0
  24. package/dist/relay-web/assets/php-Dhbhpdrm.js +1 -0
  25. package/dist/relay-web/assets/python-B6aJPvgy.js +1 -0
  26. package/dist/relay-web/assets/ruby-xesJ3fNi.js +1 -0
  27. package/dist/relay-web/assets/rust-B1yitclQ.js +1 -0
  28. package/dist/relay-web/assets/scss-OYdSNvt2.js +1 -0
  29. package/dist/relay-web/assets/shellscript-Yzrsuije.js +1 -0
  30. package/dist/relay-web/assets/shiki-DwML4nT4.js +153 -0
  31. package/dist/relay-web/assets/sql-BLtJtn59.js +1 -0
  32. package/dist/relay-web/assets/swift-D82vCrfD.js +1 -0
  33. package/dist/relay-web/assets/{theme-gh5DRisF.js → theme-DoVuVL1q.js} +1 -1
  34. package/dist/relay-web/assets/toml-vGWfd6FD.js +1 -0
  35. package/dist/relay-web/assets/tsx-COt5Ahok.js +1 -0
  36. package/dist/relay-web/assets/typescript-BPQ3VLAy.js +1 -0
  37. package/dist/relay-web/assets/vue-DVfSmUF7.js +1 -0
  38. package/dist/relay-web/assets/xml-sdJ4AIDG.js +1 -0
  39. package/dist/relay-web/assets/yaml-Buea-lGh.js +1 -0
  40. package/dist/relay-web/index.html +2 -2
  41. package/dist/relay-web/sw.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/relay-web/assets/DashboardView-BmE04TU6.js +0 -287
@@ -0,0 +1,288 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shiki-DwML4nT4.js","assets/index-DV-ybEGu.js","assets/index-BkW8B5tN.css"])))=>i.map(i=>d[i]);
2
+ import{j as ue,k as At,r as S,l as re,A as Ou,m as Z,p as Gr,d as de,q as nt,s as Qt,c as b,a as f,n as X,t as k,x as B,f as v,F as J,y as le,g as M,h as Ae,z as G,o as d,B as zt,C as xe,T as eu,e as he,w as _e,D as Re,E as Bn,G as pu,H as tu,I as ku,J as Kr,K as je,L as Ru,M as qu,N as Zr,O as Xr,P as Yr,Q as Mt,R as gt,_ as Jr,S as Qr,b as eo,U as to}from"./index-DV-ybEGu.js";import{_ as uo}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as no}from"./theme-DoVuVL1q.js";/**
3
+ * @license lucide-vue-next v1.0.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const vs=ue("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
8
+ * @license lucide-vue-next v1.0.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */const ys=ue("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
13
+ * @license lucide-vue-next v1.0.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */const Aa=ue("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]);/**
18
+ * @license lucide-vue-next v1.0.0 - ISC
19
+ *
20
+ * This source code is licensed under the ISC license.
21
+ * See the LICENSE file in the root directory of this source tree.
22
+ */const so=ue("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
23
+ * @license lucide-vue-next v1.0.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */const Mn=ue("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
28
+ * @license lucide-vue-next v1.0.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const Un=ue("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);/**
33
+ * @license lucide-vue-next v1.0.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const ao=ue("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
38
+ * @license lucide-vue-next v1.0.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const uu=ue("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
43
+ * @license lucide-vue-next v1.0.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const at=ue("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
48
+ * @license lucide-vue-next v1.0.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const kt=ue("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
53
+ * @license lucide-vue-next v1.0.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const ro=ue("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
58
+ * @license lucide-vue-next v1.0.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const $a=ue("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
63
+ * @license lucide-vue-next v1.0.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const oo=ue("circle-stop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
68
+ * @license lucide-vue-next v1.0.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const io=ue("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
73
+ * @license lucide-vue-next v1.0.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const lo=ue("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
78
+ * @license lucide-vue-next v1.0.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Ca=ue("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
83
+ * @license lucide-vue-next v1.0.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const co=ue("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
88
+ * @license lucide-vue-next v1.0.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const fo=ue("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
93
+ * @license lucide-vue-next v1.0.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const po=ue("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
98
+ * @license lucide-vue-next v1.0.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const ho=ue("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
103
+ * @license lucide-vue-next v1.0.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const mo=ue("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/**
108
+ * @license lucide-vue-next v1.0.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const hu=ue("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
113
+ * @license lucide-vue-next v1.0.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const Nu=ue("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
118
+ * @license lucide-vue-next v1.0.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const bo=ue("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
123
+ * @license lucide-vue-next v1.0.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const zn=ue("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
128
+ * @license lucide-vue-next v1.0.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const go=ue("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
133
+ * @license lucide-vue-next v1.0.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const Ln=ue("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);/**
138
+ * @license lucide-vue-next v1.0.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const Lt=ue("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
143
+ * @license lucide-vue-next v1.0.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const Pu=ue("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
148
+ * @license lucide-vue-next v1.0.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const xo=ue("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
153
+ * @license lucide-vue-next v1.0.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const vo=ue("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);/**
158
+ * @license lucide-vue-next v1.0.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const yo=ue("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
163
+ * @license lucide-vue-next v1.0.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const ko=ue("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
168
+ * @license lucide-vue-next v1.0.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const _o=ue("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
173
+ * @license lucide-vue-next v1.0.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const wo=ue("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
178
+ * @license lucide-vue-next v1.0.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const Eo=ue("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
183
+ * @license lucide-vue-next v1.0.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const ju=ue("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
188
+ * @license lucide-vue-next v1.0.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const Ao=ue("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
193
+ * @license lucide-vue-next v1.0.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const $o=ue("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
198
+ * @license lucide-vue-next v1.0.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const Hu=ue("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
203
+ * @license lucide-vue-next v1.0.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const Co=ue("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
208
+ * @license lucide-vue-next v1.0.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const Do=ue("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
213
+ * @license lucide-vue-next v1.0.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const To=ue("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
218
+ * @license lucide-vue-next v1.0.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const So=ue("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
223
+ * @license lucide-vue-next v1.0.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const Fo=ue("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
228
+ * @license lucide-vue-next v1.0.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const mu=ue("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
233
+ * @license lucide-vue-next v1.0.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const Da=ue("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);/**
238
+ * @license lucide-vue-next v1.0.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const st=ue("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ks=1;function Io(e){let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:"invalid-json"}}return Mo(t)?t.protocolVersion!==ks?{ok:!1,error:"version-mismatch",detail:`expected protocolVersion ${ks}, got ${t.protocolVersion}`}:{ok:!0,envelope:t}:{ok:!1,error:"invalid-envelope"}}function Mo(e){if(typeof e!="object"||e===null)return!1;const t=e;return!(typeof t.protocolVersion!="number"||!Number.isInteger(t.protocolVersion)||t.kind!=="req"&&t.kind!=="res"&&t.kind!=="event"||typeof t.type!="string"||t.type.trim().length===0||t.id!==void 0&&typeof t.id!="string"||(t.kind==="req"||t.kind==="res")&&(typeof t.id!="string"||t.id.length===0))}function Zt(e){if(typeof e!="object"||e===null)return!1;const t=e.error;if(typeof t!="object"||t===null)return!1;const u=t;return typeof u.code=="string"&&typeof u.message=="string"}var zo="web.event",Lo=new Set(["instance-status","control-event","notice"]),Oo=new Set(["turn-output","turn-started","tool-event","turn-thought","plan","turn-usage","agent-commands","turn-finished","sessions-changed","workspaces-changed","scheduled-changed","orchestration-changed"]),Ro=new Set(["read","search","execute","edit","think","other"]),No=new Set(["running","success","error"]),dt=e=>typeof e=="string",Vt=e=>e===void 0||typeof e=="string",Po=e=>e===void 0||typeof e=="number";function Bo(e){switch(e.type){case"diff":return dt(e.path)&&dt(e.oldText)&&dt(e.newText);case"read":return dt(e.path)&&Vt(e.lines)&&Vt(e.preview);case"command":return dt(e.command)&&Vt(e.output)&&Po(e.exitCode);case"search":return dt(e.query)&&Vt(e.output);case"text":return dt(e.text);case"fields":return Array.isArray(e.fields)&&e.fields.every(t=>t!==null&&typeof t=="object"&&dt(t.label)&&dt(t.value))&&Vt(e.output);default:return!1}}function Uo(e){if(typeof e!="object"||e===null)return!1;const t=e;return!(typeof t.toolCallId!="string"||typeof t.toolName!="string"||typeof t.title!="string"||typeof t.kind!="string"||!Ro.has(t.kind)||typeof t.status!="string"||!No.has(t.status)||!Vt(t.error)||t.detail!==void 0&&(typeof t.detail!="object"||t.detail===null||!Bo(t.detail)))}function qo(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.type!="string"||!Oo.has(t.type)?!1:t.type==="turn-output"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.chunk=="string":t.type==="turn-finished"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.ok=="boolean":t.type==="scheduled-changed"?typeof t.chatKey=="string":t.type==="turn-started"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string":t.type==="turn-thought"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.chunk=="string":t.type==="plan"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&Array.isArray(t.entries):t.type==="turn-usage"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&typeof t.used=="number"&&typeof t.size=="number":t.type==="agent-commands"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&Array.isArray(t.commands)&&t.commands.every(u=>u!==null&&typeof u=="object"&&typeof u.name=="string"):t.type==="tool-event"?typeof t.chatKey=="string"&&typeof t.sessionAlias=="string"&&Uo(t.step):!0}var jo=new Set(["task-completion","task-progress","coordinator-message"]);function Ho(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.kind=="string"&&jo.has(t.kind)&&typeof t.text=="string"}function Wo(e){if(e.kind!=="event"||e.type!==zo)return null;const t=e.payload;if(typeof t!="object"||t===null)return null;const u=t;return typeof u.instanceId!="string"||typeof u.kind!="string"||!Lo.has(u.kind)||u.kind==="instance-status"&&typeof u.online!="boolean"||u.kind==="control-event"&&!qo(u.event)||u.kind==="notice"&&!Ho(u.notice)?null:t}function Vo(e,t){let u=null,n=!1,s=0,a=null;const r=()=>{const o=location.protocol==="https:"?"wss":"ws";u=new WebSocket(`${o}://${location.host}/ws`),u.onmessage=i=>{const l=Io(String(i.data));if(!l.ok)return;const p=Wo(l.envelope);p&&e(p)},u.onopen=()=>{s=0,t==null||t(!0)},u.onclose=()=>{t==null||t(!1),!n&&(s=Math.min(s+1,6),a=setTimeout(()=>{a=null,n||r()},250*2**(s-1)))}};return r(),()=>{n=!0,a&&(clearTimeout(a),a=null),u==null||u.close()}}function St(e){if(Zt(e))throw e.error.code==="unknown-type"?new Error("This feature needs a newer connector — rebuild and reconnect the relay channel on that instance."):new Error(e.error.message||e.error.code);return e}const pt=At("instances",()=>{const e=S([]);async function t(){const{instances:y}=await re.get("/api/instances");e.value=y.map(_=>{const D=C(_.id);return{..._,sessions:(D==null?void 0:D.sessions)??[],sessionsLoaded:(D==null?void 0:D.sessionsLoaded)??!1,agents:(D==null?void 0:D.agents)??[],workspaces:(D==null?void 0:D.workspaces)??[],agentCatalog:(D==null?void 0:D.agentCatalog)??[]}});for(const _ of e.value)_.online&&!_.sessionsLoaded&&u(_.id).catch(()=>{})}async function u(y){const{sessions:_}=await re.rpc(y,"control.sessions.list"),D=C(y);D&&(D.sessions=_,D.sessionsLoaded=!0)}async function n(y){const{workspaces:_}=await re.rpc(y,"control.workspaces.list"),D=C(y);D&&(D.workspaces=_)}async function s(y){const[{agents:_},{workspaces:D},{agents:N}]=await Promise.all([re.rpc(y,"control.agents.list"),re.rpc(y,"control.workspaces.list"),re.rpc(y,"control.agents.catalog")]),V=C(y);V&&(V.agents=_,V.workspaces=D,V.agentCatalog=N)}async function a(y){const{agents:_}=await re.rpc(y,"control.agents.catalog"),D=C(y);D&&(D.agentCatalog=_)}async function r(y,_,D){St(await re.rpc(y,"control.agents.create",{name:_,driver:D})),await s(y)}async function o(y,_){St(await re.rpc(y,"control.agents.remove",{name:_})),await s(y)}async function i(y,_){St(await re.rpc(y,"control.workspaces.remove",{name:_})),await s(y)}async function l(y,_,D,N){const{workspace:V}=St(await re.rpc(y,"control.workspaces.create",{name:_,cwd:D,description:N})),te=C(y);return te&&!te.workspaces.some(ne=>ne.name===V.name)&&(te.workspaces=[...te.workspaces,V]),V}async function p(y,_,D,N,V,te){try{St(await re.rpc(y,"control.sessions.create",{alias:_,agent:D,workspace:N,...V?{agentSessionId:V}:{},...te?{model:te}:{}}))}catch(ne){if(ne instanceof Ou&&(ne.status===504||ne.code==="timeout"))return{pending:!0};throw ne}return await u(y),{pending:!1}}async function c(y,_,D){const{sessions:N}=St(await re.rpc(y,"control.sessions.native.list",{agent:_,workspace:D}));return N}async function x(y,_,D){const N=C(y),V=((N==null?void 0:N.sessions)??[]).find(te=>te.agent===_&&te.workspace===D);if(!V)return[];try{const te=St(await re.rpc(y,"control.session.model.get",{sessionAlias:V.alias})),ne=new Set,ee=[];for(const L of[...te.current?[te.current]:[],...te.available])L&&!ne.has(L)&&(ne.add(L),ee.push(L));return ee}catch{return[]}}async function h(y,_){await re.rpc(y,"control.sessions.remove",{alias:_}),await u(y)}async function g(y,_){await re.rpc(y,"control.sessions.archive",{alias:_}),await u(y)}async function E(y,_){await re.rpc(y,"control.sessions.unarchive",{alias:_}),await u(y)}async function A(y,_){await re.patch(`/api/instances/${y}`,{name:_});const D=C(y);D&&(D.name=_)}function w(y){if(y.kind==="instance-status"){const _=C(y.instanceId);_&&(_.online=y.online,y.online&&!_.sessionsLoaded&&u(y.instanceId).catch(()=>{}))}else y.kind==="control-event"&&y.event.type==="sessions-changed"?u(y.instanceId).catch(()=>{}):y.kind==="control-event"&&y.event.type==="workspaces-changed"&&n(y.instanceId).catch(()=>{})}function C(y){return e.value.find(_=>_.id===y)}return{instances:e,loadInstances:t,loadSessions:u,loadWorkspaces:n,loadFormOptions:s,loadAgentCatalog:a,createWorkspace:l,createAgent:r,removeAgent:o,removeWorkspace:i,createSession:p,listNativeSessions:c,listModelSuggestions:x,removeSession:h,archiveSession:g,unarchiveSession:E,renameInstance:A,applyEvent:w,byId:C}}),Ta="xrelay.selectedSession";function Go(e,t){try{localStorage.setItem(Ta,JSON.stringify({instanceId:e,alias:t}))}catch{}}function Ko(){try{const e=localStorage.getItem(Ta);if(!e)return null;const t=JSON.parse(e);return typeof t.instanceId=="string"&&typeof t.alias=="string"?{instanceId:t.instanceId,alias:t.alias}:null}catch{return null}}function Zo(e,t){const u=e[e.length-1];(u==null?void 0:u.type)==="text"?u.text+=t:e.push({type:"text",text:t})}function Xo(e,t){const u=e[e.length-1];if((u==null?void 0:u.type)==="reasoning"){u.text+=t;return}t.trim()&&e.push({type:"reasoning",text:t})}function Yo(e,t){const u=e.findIndex(n=>n.type==="tool"&&n.step.toolCallId===t.toolCallId);u>=0?e[u]={type:"tool",step:t}:e.push({type:"tool",step:t})}const _s=e=>e.filter(t=>t.type==="text").map(t=>t.text).join(""),ws=e=>e.filter(t=>t.type==="tool").map(t=>t.step),Jo=e=>e.filter(t=>t.type==="reasoning").map(t=>t.text).join(""),$t=At("chat",()=>{const e=S(null),t=S(null),u=S([]),n=S({}),s=S({}),a=S({}),r=S({}),o=S(new Set),i=new Set,l=(Y,U)=>`${Y}\0${U}`;function p(Y,U){const se=l(Y,U);return n.value[se]?"working":o.value.has(se)?"unread":"idle"}function c(Y,U){var se;return((se=n.value[l(Y,U)])==null?void 0:se.startedAt)??null}const x=Z(()=>e.value&&t.value?l(e.value,t.value):null),h=Z(()=>x.value?n.value[x.value]??null:null),g=Z(()=>x.value?s.value[x.value]??null:null),E=Z(()=>x.value?a.value[x.value]??null:null),A=Z(()=>x.value?r.value[x.value]??[]:[]),w=Z(()=>h.value?_s(h.value.parts):""),C=Z(()=>h.value?ws(h.value.parts):[]),y=Z(()=>h.value!==null),_=S(!1),D=S(""),N=S(null);let V=0;function te(Y){N.value={taskId:Y,nonce:++V}}const ne=100,ee=S(!1),L=S(!1);function F(Y){let U=n.value[Y];return U||(U={parts:[],status:"working",startedAt:Date.now()},n.value[Y]=U),U}function P(Y,U,se,oe){const Ee=l(Y,U),Ie=n.value[Ee];delete n.value[Ee];const Ct=Y===e.value&&U===t.value;if(se==="error"&&Ct&&(D.value=oe??"turn-failed"),!Ie)return;const it=_s(Ie.parts),z=ws(Ie.parts),K=Jo(Ie.parts);if((it.length>0||z.length>0||K.length>0)&&Ct){const ie=z.length>0||K.length>0?{toolSteps:z,...K?{reasoning:K}:{},parts:Ie.parts}:void 0;u.value.push({instanceId:Y,sessionAlias:U,direction:"out",text:it,createdAt:new Date().toISOString(),failed:se==="error",status:se,...ie?{structured:ie}:{}})}}function O(Y,U){e.value=Y,t.value=U,Go(Y,U),u.value=[],D.value="",ee.value=!1,L.value=!1;const se=l(Y,U);if(o.value.has(se)){const oe=new Set(o.value);oe.delete(se),o.value=oe}}async function $(){if(!e.value||!t.value)return;const{messages:Y,hasMore:U}=await re.get(`/api/instances/${e.value}/sessions/${t.value}/messages?limit=${ne}`);u.value=Y,ee.value=U??!1}async function I(){var oe;if(!e.value||!t.value||L.value||!ee.value)return;const Y=(oe=u.value.find(Ee=>typeof Ee.id=="number"))==null?void 0:oe.id;if(Y===void 0)return;const U=e.value,se=t.value;L.value=!0;try{const{messages:Ee,hasMore:Ie}=await re.get(`/api/instances/${U}/sessions/${se}/messages?before=${Y}&limit=${ne}`);if(U!==e.value||se!==t.value)return;Ee.length>0&&(u.value=[...Ee,...u.value]),ee.value=Ie??!1}catch{}finally{L.value=!1}}function R(Y){for(const U of Y){const se=l(U.instanceId,U.sessionAlias);n.value[se]||i.has(se)||(n.value[se]={parts:U.parts,status:U.status,startedAt:U.startedAt})}}async function fe(){const{turns:Y}=await re.get("/api/active-turns");R(Y)}function H(Y){if(Y.kind==="instance-status"&&!Y.online){const se=`${Y.instanceId}\0`;for(const Ee of Object.keys(n.value))Ee.startsWith(se)&&delete n.value[Ee];const oe=new Set([...o.value].filter(Ee=>!Ee.startsWith(se)));oe.size!==o.value.size&&(o.value=oe);return}if(Y.kind!=="control-event")return;const U=Y.event;if(U.type==="turn-started"){const se=l(Y.instanceId,U.sessionAlias);i.delete(se),F(se);const oe=Y.instanceId===e.value&&U.sessionAlias===t.value;U.prompt&&oe&&u.value.push({instanceId:Y.instanceId,sessionAlias:U.sessionAlias,direction:"in",text:U.prompt,createdAt:new Date().toISOString(),...U.scheduled?{scheduled:U.scheduled}:{}})}else if(U.type==="turn-output"){const se=F(l(Y.instanceId,U.sessionAlias));Zo(se.parts,U.chunk),se.status="streaming"}else if(U.type==="tool-event"){const se=F(l(Y.instanceId,U.sessionAlias));Yo(se.parts,U.step)}else if(U.type==="turn-thought")Xo(F(l(Y.instanceId,U.sessionAlias)).parts,U.chunk);else if(U.type==="plan")s.value[l(Y.instanceId,U.sessionAlias)]=U.entries;else if(U.type==="turn-usage")a.value[l(Y.instanceId,U.sessionAlias)]={used:U.used,size:U.size,...U.cost?{cost:U.cost}:{},...U.breakdown?{breakdown:U.breakdown}:{}};else if(U.type==="agent-commands")r.value[l(Y.instanceId,U.sessionAlias)]=U.commands;else if(U.type==="session-history")Y.instanceId===e.value&&U.sessionAlias===t.value&&$().catch(()=>{});else if(U.type==="turn-finished"){const se=U.cancelled?"cancelled":U.ok?"done":"error",oe=Y.instanceId===e.value&&U.sessionAlias===t.value;if(i.add(l(Y.instanceId,U.sessionAlias)),P(Y.instanceId,U.sessionAlias,se,U.errorMessage),!oe&&(se==="done"||se==="error")){const Ee=l(Y.instanceId,U.sessionAlias),Ie=new Set(o.value);Ie.add(Ee),o.value=Ie}}}async function be(Y,U=[]){if(!e.value||!t.value)return;D.value="",_.value=!0;const se={instanceId:e.value,sessionAlias:t.value,direction:"in",text:Y,createdAt:new Date().toISOString(),...U.length>0?{attachments:U.map(oe=>({id:oe.id,filename:oe.fileName,mimeType:oe.mimeType,size:oe.size,kind:oe.kind,...oe.previewUrl?{previewUrl:oe.previewUrl}:{}}))}:{}};u.value.push(se);try{const oe=await re.rpc(e.value,"control.prompt",{sessionAlias:t.value,text:Y,...U.length>0?{media:U}:{}});oe&&oe.ok===!1&&(D.value=oe.errorMessage??"prompt-failed",se.failed=!0)}catch(oe){oe instanceof Ou&&(oe.status===504||oe.code==="timeout")||(D.value=oe instanceof Ou?oe.code:"send-failed",se.failed=!0)}finally{_.value=!1}}async function ve(Y){if(!Y.failed||Y.direction!=="in")return;const U=u.value.indexOf(Y);U>=0&&u.value.splice(U,1),await be(Y.text)}async function Rt(){if(!e.value||!t.value)return;const Y=e.value,U=t.value;P(Y,U,"cancelled");try{await re.rpc(Y,"control.prompt.cancel",{sessionAlias:U})}catch(se){D.value=se instanceof Ou?se.code:"cancel-failed"}}return{instanceId:e,sessionAlias:t,messages:u,streaming:w,liveTurn:h,sessionPlan:g,sessionUsage:E,sessionCommands:A,liveToolSteps:C,busy:y,unread:o,sessionAttention:p,runningSince:c,sending:_,error:D,scrollRequest:N,requestScrollToScheduled:te,hasMoreOlder:ee,loadingOlder:L,select:O,loadHistory:$,loadOlder:I,loadActiveTurns:fe,seedActiveTurns:R,applyEvent:H,send:be,resend:ve,cancel:Rt}}),_u=At("tasks",()=>{const e=S([]),t=S([]),u=S(null);async function n(p,c){const{tasks:x}=await re.rpc(p,"control.scheduled.list");e.value=x.filter(h=>h.sessionAlias===c)}async function s(p){const{tasks:c}=await re.rpc(p,"control.orchestration.list");t.value=c}async function a(p,c){u.value={instanceId:p,sessionAlias:c},await Promise.all([n(p,c).catch(()=>{e.value=[]}),s(p).catch(()=>{t.value=[]})])}async function r(p,c,x,h){await re.rpc(p,"control.scheduled.create",{sessionAlias:c,executeAt:x,message:h}),await n(p,c)}async function o(p){const c=u.value;c&&(await re.rpc(c.instanceId,"control.scheduled.cancel",{id:p}),await n(c.instanceId,c.sessionAlias))}async function i(p){const c=u.value;c&&(await re.rpc(c.instanceId,"control.orchestration.cancel",{taskId:p}),await s(c.instanceId))}function l(p){if(p.kind!=="control-event")return;const c=u.value;!c||p.instanceId!==c.instanceId||(p.event.type==="scheduled-changed"?n(c.instanceId,c.sessionAlias).catch(()=>{}):p.event.type==="orchestration-changed"&&s(c.instanceId).catch(()=>{}))}return{scheduled:e,orchestration:t,scope:u,loadScheduled:n,loadOrchestration:s,loadFor:a,createScheduled:r,cancelScheduled:o,cancelOrchestration:i,applyEvent:l}}),Es=20,Sa=At("notices",()=>{const e=S([]);let t=0;function u(s){s.kind==="notice"&&(e.value.unshift({id:++t,instanceId:s.instanceId,kind:s.notice.kind,text:s.notice.text}),e.value.length>Es&&(e.value.length=Es))}function n(s){e.value=e.value.filter(a=>a.id!==s)}return{items:e,applyEvent:u,dismiss:n}}),Fa=At("connection",()=>{const e=S(!1);function t(u){e.value=u}return{online:e,setOnline:t}});function ou(e){if(Zt(e))throw new Error(e.error.message||e.error.code);return e}const Wu=At("files",()=>{const e=S(null),t=S(null),u=S(""),n=S([]),s=S(null),a=S(null),r=S(null),o=S(!1),i=S("files"),l=S({}),p=S(null),c=S(""),x=S([]),h=S(!1),g=S(!1),E=S(!1),A=S("");function w(){t.value=null,u.value="",n.value=[],s.value=null,a.value=null,r.value=null,o.value=!1,l.value={},c.value="",x.value=[],A.value=""}async function C(F,P){e.value=F,t.value=P,s.value=null,a.value=null,r.value=null,o.value=!1,l.value={},c.value="",x.value=[],await D(""),y()}async function y(){if(!(!e.value||!t.value))try{const F=await re.rpc(e.value,"control.fs.diff",{workspace:t.value});if(Zt(F)){l.value={};return}const P={};for(const O of F.files)P[O.path]=O.status;l.value=P}catch{l.value={}}}async function _(F,P){if(!F||!P){p.value=null;return}try{const O=await re.rpc(F,"control.fs.diff",{workspace:P});if(Zt(O)){p.value=null;return}const $=typeof O.branch=="string"?O.branch:void 0,I=O.detached===!0;p.value={workspace:P,changedCount:O.files.length,...$?{branch:$}:{},...I?{detached:!0}:{}}}catch{p.value=null}}async function D(F){if(!(!e.value||!t.value)){E.value=!0,A.value="",s.value=null;try{const P=ou(await re.rpc(e.value,"control.fs.list",{workspace:t.value,path:F}));u.value=P.path,n.value=P.entries}catch(P){A.value=P instanceof Error?P.message:"list-failed"}finally{E.value=!1}}}async function N(F){const P=u.value?`${u.value}/${F.name}`:F.name;if(F.type==="dir")return D(P);if(!(!e.value||!t.value)){E.value=!0,A.value="";try{s.value=ou(await re.rpc(e.value,"control.fs.read",{workspace:t.value,path:P}))}catch(O){A.value=O instanceof Error?O.message:"read-failed"}finally{E.value=!1}}}async function V(F){if(!(!e.value||!t.value)){E.value=!0,A.value="";try{s.value=ou(await re.rpc(e.value,"control.fs.read",{workspace:t.value,path:F}))}catch(P){A.value=P instanceof Error?P.message:"read-failed"}finally{E.value=!1}}}async function te(){if(!(!e.value||!t.value)){if(i.value==="changes"){await L(r.value??void 0);return}await D(u.value),await y(),await _(e.value,t.value)}}function ne(F){const P=u.value?u.value.split("/"):[];D(P.slice(0,F+1).join("/"))}async function ee(F){if(c.value=F,!e.value||!t.value||!F.trim()){x.value=[],h.value=!1;return}g.value=!0,A.value="";try{const P=ou(await re.rpc(e.value,"control.fs.search",{workspace:t.value,query:F}));x.value=P.matches,h.value=P.truncated}catch(P){A.value=P instanceof Error?P.message:"search-failed"}finally{g.value=!1}}async function L(F){if(!(!e.value||!t.value)){E.value=!0,A.value="",r.value=F??null;try{a.value=ou(await re.rpc(e.value,"control.fs.diff",{workspace:t.value,...F?{path:F}:{}})),o.value=!1}catch(P){const O=P instanceof Error?P.message:"diff-failed";a.value=null,O==="not-a-git-repo"?o.value=!0:A.value=O}finally{E.value=!1}}}return{instanceId:e,workspace:t,path:u,entries:n,file:s,diff:a,diffPath:r,notGit:o,changed:l,gitSummary:p,tab:i,query:c,results:x,searchTruncated:h,searching:g,loading:E,error:A,reset:w,selectWorkspace:C,list:D,open:N,openFile:V,up:ne,search:ee,loadDiff:L,loadStatus:y,loadGitSummary:_,refresh:te}}),Xt=S(null);let et=null;function Qo(){return Xt}function ei(e,t=6e3){et&&clearTimeout(et),Xt.value=e,et=setTimeout(()=>{Xt.value=null,et=null},t)}function As(){const e=Xt.value;Xt.value=null,et&&(clearTimeout(et),et=null),e==null||e.action()}function $s(){Xt.value=null,et&&(clearTimeout(et),et=null)}function ti(e){const t=e.intent??4;let u=0,n=0,s=!1,a=!1,r=!1;function o(c){u=c.clientX,n=c.clientY,s=!0,a=!1,r=!1}function i(c){var g,E;if(!s)return;const x=c.clientX-u,h=c.clientY-n;if(!a){if(Math.abs(x)<t&&Math.abs(h)<t)return;a=!0,r=Math.abs(x)>Math.abs(h)}if(!r){s=!1,(g=e.onEnd)==null||g.call(e,0);return}(E=e.onMove)==null||E.call(e,x)}function l(c){var x;s&&(s=!1,(x=e.onEnd)==null||x.call(e,r?c.clientX-u:0))}function p(){var c;s&&(s=!1,(c=e.onEnd)==null||c.call(e,0))}return{handlers:{pointerdown:o,pointermove:i,pointerup:l,pointercancel:p}}}function Ia(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function mn(e,t){return Ia(`${e}-${t}`)}function bn(e,t){const u=new Set(t);if(!u.has(e))return e;for(let n=2;;n+=1){const s=`${e}-${n}`;if(!u.has(s))return s}}function Cs(e){const u=e.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??"";return Ia(u)}function Ma(){return Gr.global.locale.value}function Ds(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString(Ma(),{hour:"2-digit",minute:"2-digit"})}function qn(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString(Ma())}const ui=["data-test","aria-label","aria-expanded"],ni={key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-border bg-raised py-1 shadow-xl"},si={key:0,class:"px-3 pb-0.5 pt-1.5 text-[11px] font-medium uppercase tracking-wide text-fg-muted"},ai=["data-value","onMousedown","onMouseenter"],ri={class:"truncate"},gn=de({__name:"SelectMenu",props:{modelValue:{},groups:{},placeholder:{},dataTest:{},ariaLabel:{}},emits:["update:modelValue"],setup(e,{emit:t}){const u=e,n=t,s=S(!1),a=S(null),r=S(-1),o=Z(()=>u.groups.flatMap(w=>w.options)),i=Z(()=>{var w;return((w=o.value.find(C=>C.value===u.modelValue))==null?void 0:w.label)??""});function l(){s.value=!0;const w=o.value.findIndex(C=>C.value===u.modelValue&&!C.disabled);r.value=w>=0?w:o.value.findIndex(C=>!C.disabled)}function p(){s.value=!1}function c(){s.value?p():l()}function x(w){w.disabled||(n("update:modelValue",w.value),p())}function h(w){const C=o.value;if(!C.length)return;let y=r.value;for(let _=0;_<C.length;_++)if(y=(y+w+C.length)%C.length,!C[y].disabled){r.value=y;return}}function g(w){if(!s.value){(w.key==="Enter"||w.key===" "||w.key==="ArrowDown")&&(w.preventDefault(),l());return}if(w.key==="ArrowDown")w.preventDefault(),h(1);else if(w.key==="ArrowUp")w.preventDefault(),h(-1);else if(w.key==="Enter"||w.key===" "){w.preventDefault();const C=o.value[r.value];C&&x(C)}else w.key==="Escape"&&(w.stopPropagation(),p())}function E(w){s.value&&a.value&&!a.value.contains(w.target)&&p()}nt(()=>document.addEventListener("mousedown",E)),Qt(()=>document.removeEventListener("mousedown",E));function A(w,C){let y=0;for(let _=0;_<w;_++)y+=u.groups[_].options.length;return y+C}return(w,C)=>(d(),b("div",{ref_key:"boxEl",ref:a,class:"relative"},[f("button",{type:"button","data-test":e.dataTest,"aria-label":e.ariaLabel,"aria-expanded":s.value,class:"flex w-full items-center justify-between rounded-lg border border-border bg-bg py-2 pl-3 pr-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onClick:c,onKeydown:g},[f("span",{class:X(["truncate",i.value?"text-fg":"text-fg-muted"])},k(i.value||e.placeholder||"Select…"),3),B(v(at),{size:16,class:X(["ml-2 shrink-0 text-fg-muted transition-transform",s.value?"rotate-180":""])},null,8,["class"])],40,ui),s.value?(d(),b("ul",ni,[(d(!0),b(J,null,le(e.groups,(y,_)=>(d(),b(J,{key:_},[y.label?(d(),b("li",si,k(y.label),1)):M("",!0),(d(!0),b(J,null,le(y.options,(D,N)=>(d(),b("li",{key:D.value,"data-value":D.value,class:X(["flex items-center justify-between px-3 py-1.5 text-sm",[D.disabled?"cursor-not-allowed text-fg-muted/50":A(_,N)===r.value?"cursor-pointer bg-accent/15 text-fg":"cursor-pointer text-fg-muted hover:bg-fg/5"]]),onMousedown:Ae(V=>x(D),["prevent"]),onMouseenter:V=>!D.disabled&&(r.value=A(_,N))},[f("span",ri,k(D.label),1),D.value===e.modelValue?(d(),G(v(uu),{key:0,size:14,class:"ml-2 shrink-0 text-accent"})):M("",!0)],42,ai))),128))],64))),128))])):M("",!0)],512))}}),oi={class:"w-full max-w-md rounded-xl border border-border bg-raised shadow-xl","data-test":"new-session-dialog"},ii={class:"flex items-center justify-between border-b border-border px-5 py-3"},li={class:"text-sm font-semibold text-fg"},ci={class:"font-normal text-fg-muted"},di=["aria-label"],fi={class:"space-y-4 px-5 py-4"},pi={key:0,"data-test":"ns-pending",class:"rounded-lg bg-info/10 px-3 py-3 text-xs text-info"},hi={key:1,class:"py-6 text-center text-sm text-fg-muted"},mi={class:"block"},bi={class:"mb-1 block text-xs font-medium text-fg-muted"},gi={class:"flex gap-1"},xi={class:"block"},vi={class:"mb-1 block text-xs font-medium text-fg-muted"},yi={class:"font-normal text-fg-muted"},ki=["placeholder"],_i={class:"block"},wi={class:"mb-1 block text-xs font-medium text-fg-muted"},Ei={class:"block"},Ai={class:"mb-1 flex items-center justify-between"},$i={class:"text-xs font-medium text-fg-muted"},Ci={key:0,class:"flex gap-1"},Di=["placeholder"],Ti={key:0,class:"block"},Si={class:"mb-1 block text-xs font-medium text-fg-muted"},Fi={class:"font-normal text-fg-muted"},Ii=["aria-label"],Mi={key:0,"data-test":"ns-model-list",class:"absolute z-10 mt-1 max-h-48 w-full overflow-auto rounded-lg border border-border bg-raised py-1 shadow-xl"},zi=["onMousedown","onMouseenter"],Li={class:"truncate"},Oi={key:0,class:"ml-2 shrink-0 text-xs text-fg-muted"},Ri={key:1,class:"block"},Ni={class:"mb-1 block text-xs font-medium text-fg-muted"},Pi={key:0,"data-test":"ns-native-loading",class:"space-y-1.5"},Bi={class:"flex items-center gap-2 text-xs text-fg-muted"},Ui={key:2,"data-test":"ns-native-error",class:"rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger"},qi={class:"flex items-start gap-1.5"},ji={class:"min-w-0"},Hi={class:"break-words font-medium"},Wi={key:0,class:"mt-1 text-danger/80"},Vi={key:3,"data-test":"ns-native-empty",class:"rounded-lg bg-bg px-3 py-2 text-xs text-fg-muted"},Gi={key:2,"data-test":"ns-error",class:"rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger"},Ki={class:"flex justify-end gap-2 border-t border-border px-5 py-3"},Zi=["disabled"],Xi=de({__name:"NewSessionDialog",props:{instanceId:{},instanceName:{}},emits:["created","close"],setup(e,{emit:t}){const u=e,n=t,{t:s}=zt(),a=pt(),r=Z(()=>a.byId(u.instanceId)),o=S(""),i=S(""),l=S("new"),p=S("existing"),c=S(""),x=S(""),h=S(""),g=S([]),E=S(!1),A=S(0),w=S(null),C=Z(()=>{const z=new Set(["default"]),K=["default"];for(const W of g.value)W&&!z.has(W)&&(z.add(W),K.push(W));return K}),y=Z(()=>{const z=h.value.trim().toLowerCase();return z?C.value.filter(K=>K.toLowerCase().includes(z)):C.value});function _(){E.value=!0,A.value=0}function D(){E.value=!1}function N(z){h.value=z==="default"?"":z,D()}function V(z){if(z.key==="ArrowDown"){if(z.preventDefault(),!E.value){_();return}A.value=Math.min(A.value+1,y.value.length-1)}else z.key==="ArrowUp"?(z.preventDefault(),A.value=Math.max(A.value-1,0)):z.key==="Enter"?E.value&&A.value>=0&&A.value<y.value.length?(z.preventDefault(),N(y.value[A.value])):it():z.key==="Escape"&&E.value&&(z.stopPropagation(),D())}function te(z){E.value&&w.value&&!w.value.contains(z.target)&&D()}nt(()=>document.addEventListener("mousedown",te)),Qt(()=>document.removeEventListener("mousedown",te));const ne=S(!1),ee=S(!1),L=S(""),F=S(""),P=S(!0),O=S([]),$=S(""),I=S(!1),R=S("");nt(async()=>{var z,K,W,ge,ie,Be;try{await a.loadFormOptions(u.instanceId)}catch(We){F.value=We instanceof Error?We.message:s("session.failedLoadOptions")}finally{P.value=!1}i.value=((K=(z=r.value)==null?void 0:z.agents[0])==null?void 0:K.name)??((ge=(W=r.value)==null?void 0:W.agentCatalog.find(We=>We.installed!=="unknown"))==null?void 0:ge.driver)??"",c.value=((Be=(ie=r.value)==null?void 0:ie.workspaces[0])==null?void 0:Be.name)??""});const fe=Z(()=>{var z;return new Set((((z=r.value)==null?void 0:z.agents)??[]).map(K=>K.name))}),H=Z(()=>{var z;return(((z=r.value)==null?void 0:z.agentCatalog)??[]).filter(K=>!K.configured)}),be=Z(()=>{var W;const z=[],K=((W=r.value)==null?void 0:W.agents)??[];return K.length&&z.push({label:s("session.configured"),options:K.map(ge=>({value:ge.name,label:`${ge.name} · ${ge.driver}`}))}),H.value.length&&z.push({label:s("session.availableDrivers"),options:H.value.map(ge=>({value:ge.driver,label:ge.installed==="unknown"?s("session.cliNotDetected",{driver:ge.driver}):ge.driver,disabled:ge.installed==="unknown"}))}),z}),ve=Z(()=>{var z;return[{options:(((z=r.value)==null?void 0:z.workspaces)??[]).map(K=>({value:K.name,label:`${K.name} — ${K.cwd}`}))}]}),Rt=Z(()=>p.value==="path"?x.value.trim()?Cs(x.value):"":c.value),Y=Z(()=>Rt.value&&i.value?mn(Rt.value,i.value):s("session.autoAlias")),U=Z(()=>fe.value.has(i.value));async function se(){var z;if($.value="",O.value=[],R.value="",!(l.value!=="native"||!i.value||!c.value)){if(!U.value){R.value=s("session.pickConfiguredAgent");return}I.value=!0;try{O.value=await a.listNativeSessions(u.instanceId,i.value,c.value),$.value=((z=O.value[0])==null?void 0:z.sessionId)??""}catch(K){R.value=K instanceof Error?K.message:s("session.failedListNative")}finally{I.value=!1}}}xe([l,i,c],()=>{l.value==="native"&&(p.value="existing",se())}),xe([i,c],async()=>{g.value=[],!(!i.value||!c.value)&&(g.value=await a.listModelSuggestions(u.instanceId,i.value,c.value))});const oe=Z(()=>{const z=R.value;return z&&/auth|login|unauthor|credential|sign[\s-]?in/i.test(z)?s("session.authHint",{agent:i.value||s("session.thisAgent")}):""});function Ee(z){const K=(z.title??"").trim()||z.sessionId,W=z.sessionId.length>8?`…${z.sessionId.slice(-8)}`:z.sessionId,ge=z.updatedAt?` · ${qn(z.updatedAt)}`:"";return`${K} (${W})${ge}`}const Ie=Z(()=>[{options:O.value.map(z=>({value:z.sessionId,label:Ee(z)}))}]),Ct=Z(()=>ne.value||!i.value?!1:l.value==="native"?!!$.value:p.value==="existing"?!!c.value:!!x.value.trim());async function it(){var z,K;if(Ct.value){ne.value=!0,F.value="";try{const W=i.value,ge=(((z=r.value)==null?void 0:z.sessions)??[]).map(Ve=>Ve.alias);if(l.value==="native"){const Ve=c.value,lt=o.value.trim()||bn(mn(Ve,W),ge);if(!Ve||!lt||!$.value){F.value=s("session.pickNativeAndAlias");return}if((await a.createSession(u.instanceId,lt,W,Ve,$.value)).pending){L.value=lt,ee.value=!0;return}n("created",lt),n("close");return}let ie=c.value;if(p.value==="path"){const Ve=(((K=r.value)==null?void 0:K.workspaces)??[]).map(lt=>lt.name);ie=bn(Cs(x.value),Ve)}const Be=o.value.trim()||bn(mn(ie,W),ge);if(!ie||!Be){F.value=s("session.couldNotDeriveName");return}fe.value.has(W)||await a.createAgent(u.instanceId,W,W),p.value==="path"&&await a.createWorkspace(u.instanceId,ie,x.value.trim());const We=h.value.trim(),Ze=We&&We.toLowerCase()!=="default"?We:void 0;if((await a.createSession(u.instanceId,Be,W,ie,void 0,Ze)).pending){L.value=Be,ee.value=!0;return}n("created",Be),n("close")}catch(W){F.value=W instanceof Error?W.message:s("session.createFailed")}finally{ne.value=!1}}}return(z,K)=>(d(),G(eu,{to:"body"},[f("div",{class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:K[14]||(K[14]=Ae(W=>n("close"),["self"]))},[f("div",oi,[f("header",ii,[f("h2",li,[he(k(z.$t("session.newSession"))+" ",1),f("span",ci,"· "+k(e.instanceName),1)]),f("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":z.$t("session.close"),onClick:K[0]||(K[0]=W=>n("close"))},[B(v(st),{size:16})],8,di)]),f("div",fi,[ee.value?(d(),b("div",pi,k(z.$t("session.creating")),1)):P.value?(d(),b("div",hi,k(z.$t("session.loadingOptions")),1)):(d(),b(J,{key:2},[f("div",mi,[f("span",bi,k(z.$t("session.source")),1),f("div",gi,[f("button",{type:"button","data-test":"ns-source-new",class:X(["flex-1 rounded px-2 py-1 text-xs",l.value==="new"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:K[1]||(K[1]=W=>l.value="new")},k(z.$t("session.newSession")),3),f("button",{type:"button","data-test":"ns-source-native",class:X(["flex-1 rounded px-2 py-1 text-xs",l.value==="native"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:K[2]||(K[2]=W=>l.value="native")},k(z.$t("session.nativeSession")),3)])]),f("label",xi,[f("span",vi,[he(k(z.$t("session.sessionAlias"))+" ",1),f("span",yi,k(z.$t("session.optional")),1)]),_e(f("input",{"onUpdate:modelValue":K[3]||(K[3]=W=>o.value=W),"data-test":"ns-alias",placeholder:Y.value,class:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onKeydown:Bn(it,["enter"])},null,40,ki),[[Re,o.value]])]),f("div",_i,[f("span",wi,k(z.$t("session.agent")),1),B(gn,{modelValue:i.value,"onUpdate:modelValue":K[4]||(K[4]=W=>i.value=W),groups:be.value,"data-test":"ns-agent","aria-label":z.$t("session.agent"),placeholder:z.$t("session.selectAgent")},null,8,["modelValue","groups","aria-label","placeholder"])]),f("div",Ei,[f("div",Ai,[f("span",$i,k(z.$t("session.workspace")),1),l.value==="new"?(d(),b("div",Ci,[f("button",{type:"button","data-test":"ns-ws-mode-existing",class:X(["rounded px-2 py-0.5 text-xs",p.value==="existing"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:K[5]||(K[5]=W=>p.value="existing")},k(z.$t("session.existing")),3),f("button",{type:"button","data-test":"ns-ws-mode-path",class:X(["rounded px-2 py-0.5 text-xs",p.value==="path"?"bg-accent text-white":"bg-bg border border-border text-fg-muted hover:bg-fg/5"]),onClick:K[6]||(K[6]=W=>p.value="path")},k(z.$t("session.newPath")),3)])):M("",!0)]),p.value==="existing"?(d(),G(gn,{key:0,modelValue:c.value,"onUpdate:modelValue":K[7]||(K[7]=W=>c.value=W),groups:ve.value,"data-test":"ns-workspace","aria-label":z.$t("session.workspace"),placeholder:z.$t("session.selectWorkspace")},null,8,["modelValue","groups","aria-label","placeholder"])):_e((d(),b("input",{key:1,"onUpdate:modelValue":K[8]||(K[8]=W=>x.value=W),"data-test":"ns-ws-path",placeholder:z.$t("session.pathPlaceholder"),class:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,Di)),[[Re,x.value]])]),l.value==="new"?(d(),b("div",Ti,[f("span",Si,[he(k(z.$t("session.model"))+" ",1),f("span",Fi,k(z.$t("session.optional")),1)]),f("div",{ref_key:"modelBoxEl",ref:w,class:"relative"},[_e(f("input",{"onUpdate:modelValue":K[9]||(K[9]=W=>h.value=W),"data-test":"ns-model",placeholder:"default",autocomplete:"off",class:"w-full rounded-lg border border-border bg-bg py-2 pl-3 pr-9 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onFocus:_,onInput:_,onKeydown:V},null,544),[[Re,h.value]]),f("button",{type:"button",tabindex:"-1","aria-label":z.$t("session.toggleModelList"),class:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-1 text-fg-muted hover:text-fg",onClick:K[10]||(K[10]=W=>E.value?D():_())},[B(v(at),{size:16,class:X(["transition-transform",E.value?"rotate-180":""])},null,8,["class"])],8,Ii),E.value&&y.value.length?(d(),b("ul",Mi,[(d(!0),b(J,null,le(y.value,(W,ge)=>(d(),b("li",{key:W,class:X(["flex cursor-pointer items-center justify-between px-3 py-1.5 text-sm",ge===A.value?"bg-accent/15 text-fg":"text-fg-muted hover:bg-fg/5"]),onMousedown:Ae(ie=>N(W),["prevent"]),onMouseenter:ie=>A.value=ge},[f("span",Li,k(W),1),W==="default"?(d(),b("span",Oi,k(z.$t("session.agentDefault")),1)):M("",!0)],42,zi))),128))])):M("",!0)],512)])):M("",!0),l.value==="native"?(d(),b("div",Ri,[f("span",Ni,k(z.$t("session.nativeSession")),1),I.value?(d(),b("div",Pi,[f("div",Bi,[B(v(Lt),{size:13,class:"animate-spin motion-reduce:animate-none text-accent"}),he(" "+k(z.$t("session.listingNative")),1)]),(d(),b(J,null,le(3,W=>f("div",{key:W,class:"h-7 animate-pulse rounded-lg bg-fg/5 motion-reduce:animate-none",style:tu({width:`${92-W*12}%`})},null,4)),64))])):O.value.length?(d(),G(gn,{key:1,modelValue:$.value,"onUpdate:modelValue":K[11]||(K[11]=W=>$.value=W),groups:Ie.value,"data-test":"ns-native","aria-label":z.$t("session.nativeSession"),placeholder:z.$t("session.selectNative")},null,8,["modelValue","groups","aria-label","placeholder"])):R.value?(d(),b("div",Ui,[f("div",qi,[B(v(pu),{size:13,class:"mt-0.5 shrink-0"}),f("div",ji,[f("p",Hi,k(R.value),1),oe.value?(d(),b("p",Wi,k(oe.value),1)):M("",!0)])])])):(d(),b("p",Vi,k(z.$t("session.noNativeSessions")),1))])):M("",!0),F.value?(d(),b("p",Gi,k(F.value),1)):M("",!0)],64))]),f("footer",Ki,[ee.value?(d(),b("button",{key:0,"data-test":"ns-pending-close",class:"rounded-lg bg-accent px-4 py-1.5 text-sm font-medium text-white hover:bg-accent-hover",onClick:K[12]||(K[12]=W=>{n("created",L.value),n("close")})},k(z.$t("common.ok")),1)):(d(),b(J,{key:1},[f("button",{class:"rounded-lg px-3 py-1.5 text-sm text-fg-muted hover:bg-fg/5",onClick:K[13]||(K[13]=W=>n("close"))},k(z.$t("common.cancel")),1),f("button",{"data-test":"ns-create",disabled:!Ct.value,class:"rounded-lg bg-accent px-4 py-1.5 text-sm font-medium text-white enabled:hover:bg-accent-hover disabled:opacity-40",onClick:it},k(ne.value?z.$t("session.creatingButton"):z.$t("session.create")),9,Zi)],64))])])])]))}}),Yi={class:"space-y-3"},Ji={key:0,"data-test":"wm-error",class:"rounded bg-danger/10 px-3 py-2 text-sm text-danger"},Qi=["placeholder"],el={key:2,"data-test":"wm-empty",class:"text-sm text-fg-muted"},tl={key:3,class:"max-h-64 divide-y divide-border overflow-y-auto rounded border border-border"},ul=["title"],nl={class:"font-medium text-fg"},sl={class:"text-fg-muted"},al=["data-test","title","aria-label","disabled","onClick"],rl={key:0,class:"px-3 py-2 text-sm text-fg-muted"},ol={key:5,class:"space-y-2 rounded border border-border p-3"},il={class:"grid grid-cols-1 gap-2 sm:grid-cols-3"},ll=["placeholder"],cl=["placeholder"],dl=["placeholder"],fl={class:"flex gap-2"},pl=["disabled"],hl=de({__name:"WorkspacesManager",props:{instanceId:{}},setup(e){const t=e,u=pt(),{t:n}=zt(),s=Z(()=>u.byId(t.instanceId)),a=S(""),r=S(""),o=S(""),i=S(""),l=S(!1),p=S(!1),c=S(""),x=Z(()=>{var w;return((w=s.value)==null?void 0:w.workspaces)??[]}),h=Z(()=>x.value.length>6),g=Z(()=>{const w=c.value.trim().toLowerCase();return w?x.value.filter(C=>C.name.toLowerCase().includes(w)||(C.cwd??"").toLowerCase().includes(w)):x.value});async function E(){if(!(!a.value.trim()||!r.value.trim()||l.value)){l.value=!0,i.value="";try{await u.createWorkspace(t.instanceId,a.value.trim(),r.value.trim(),o.value.trim()||void 0),a.value="",r.value="",o.value=""}catch(w){i.value=w instanceof Error?w.message:n("workspaces.createFailed")}finally{l.value=!1}}}async function A(w){if(!(l.value||!await ku({title:n("workspaces.removeTitle"),message:n("workspaces.removeBody",{name:w}),confirmLabel:n("common.remove"),tone:"danger"}))){l.value=!0,i.value="";try{await u.removeWorkspace(t.instanceId,w)}catch(y){i.value=y instanceof Error?y.message:n("workspaces.removeFailed")}finally{l.value=!1}}}return(w,C)=>(d(),b("section",Yi,[i.value?(d(),b("p",Ji,k(i.value),1)):M("",!0),h.value?_e((d(),b("input",{key:1,"onUpdate:modelValue":C[0]||(C[0]=y=>c.value=y),"data-test":"wm-filter",placeholder:w.$t("common.filter"),class:"w-full rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,Qi)),[[Re,c.value]]):M("",!0),x.value.length?(d(),b("ul",tl,[(d(!0),b(J,null,le(g.value,y=>(d(),b("li",{key:y.name,class:"flex items-center justify-between gap-2 px-3 py-2 text-sm"},[f("span",{class:"min-w-0 truncate",title:`${y.name} — ${y.cwd}`},[f("span",nl,k(y.name),1),f("span",sl," — "+k(y.cwd),1)],8,ul),f("button",{"data-test":`wm-remove-${y.name}`,title:w.$t("workspaces.remove",{name:y.name}),"aria-label":w.$t("workspaces.removeAria",{name:y.name}),class:"grid h-7 w-7 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger disabled:opacity-50",disabled:l.value,onClick:_=>A(y.name)},[B(v(mu),{size:14})],8,al)]))),128)),g.value.length?M("",!0):(d(),b("li",rl,k(w.$t("common.noMatch")),1))])):(d(),b("p",el,k(w.$t("workspaces.empty")),1)),p.value?(d(),b("div",ol,[f("div",il,[_e(f("input",{"onUpdate:modelValue":C[2]||(C[2]=y=>a.value=y),"data-test":"wm-name",placeholder:w.$t("workspaces.namePlaceholder"),class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,ll),[[Re,a.value]]),_e(f("input",{"onUpdate:modelValue":C[3]||(C[3]=y=>r.value=y),"data-test":"wm-path",placeholder:w.$t("workspaces.pathPlaceholder"),class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,cl),[[Re,r.value]]),_e(f("input",{"onUpdate:modelValue":C[4]||(C[4]=y=>o.value=y),"data-test":"wm-desc",placeholder:w.$t("workspaces.descPlaceholder"),class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,dl),[[Re,o.value]])]),f("div",fl,[f("button",{"data-test":"wm-create",class:"rounded bg-accent px-3 py-1.5 text-sm text-white hover:bg-accent-hover disabled:opacity-50",disabled:l.value||!a.value.trim()||!r.value.trim(),onClick:E},k(w.$t("common.add")),9,pl),f("button",{type:"button","data-test":"wm-add-cancel",class:"rounded px-3 py-1.5 text-sm text-fg-muted hover:bg-fg/5 hover:text-fg",onClick:C[5]||(C[5]=y=>p.value=!1)},k(w.$t("common.cancel")),1)])])):(d(),b("button",{key:4,type:"button","data-test":"wm-add-toggle",onClick:C[1]||(C[1]=y=>p.value=!0),class:"flex items-center gap-1.5 rounded border border-dashed border-border px-3 py-1.5 text-sm text-fg-muted transition-colors hover:border-accent hover:text-fg"},[B(v(ju),{size:14}),he(" "+k(w.$t("workspaces.add")),1)]))]))}}),ml={class:"space-y-3"},bl={key:0,"data-test":"am-error",class:"rounded bg-danger/10 px-3 py-2 text-sm text-danger"},gl=["placeholder"],xl={key:2,"data-test":"am-empty",class:"text-sm text-fg-muted"},vl={key:3,class:"max-h-64 divide-y divide-border overflow-y-auto rounded border border-border"},yl=["title"],kl={class:"font-medium text-fg"},_l={class:"text-fg-muted"},wl=["data-test","title","aria-label","disabled","onClick"],El={key:0,class:"px-3 py-2 text-sm text-fg-muted"},Al={key:5,class:"space-y-2 rounded border border-border p-3"},$l={class:"grid grid-cols-1 gap-2 sm:grid-cols-2"},Cl={value:"",disabled:""},Dl=["value","disabled"],Tl=["placeholder"],Sl={class:"flex gap-2"},Fl=["disabled"],Il=de({__name:"AgentsManager",props:{instanceId:{}},setup(e){const t=e,u=pt(),{t:n}=zt(),s=Z(()=>u.byId(t.instanceId)),a=S(""),r=S(""),o=S(""),i=S(!1),l=S(!1),p=S(""),c=Z(()=>{var C;return(((C=s.value)==null?void 0:C.agentCatalog)??[]).filter(y=>!y.configured)}),x=Z(()=>{var C;return((C=s.value)==null?void 0:C.agents)??[]}),h=Z(()=>x.value.length>6),g=Z(()=>{const C=p.value.trim().toLowerCase();return C?x.value.filter(y=>y.name.toLowerCase().includes(C)||(y.driver??"").toLowerCase().includes(C)):x.value});async function E(){if(!(!a.value||i.value)){i.value=!0,o.value="";try{await u.createAgent(t.instanceId,r.value.trim()||a.value,a.value),a.value="",r.value=""}catch(C){o.value=C instanceof Error?C.message:n("agents.addFailed")}finally{i.value=!1}}}async function A(C){if(!(i.value||!await ku({title:n("agents.removeTitle"),message:n("agents.removeBody",{name:C}),confirmLabel:n("common.remove"),tone:"danger"}))){i.value=!0,o.value="";try{await u.removeAgent(t.instanceId,C)}catch(_){o.value=_ instanceof Error?_.message:n("agents.removeFailed")}finally{i.value=!1}}}function w(C){return n(C==="builtin"?"agents.builtin":C==="yes"?"agents.installed":"agents.cliNotDetected")}return(C,y)=>(d(),b("section",ml,[o.value?(d(),b("p",bl,k(o.value),1)):M("",!0),h.value?_e((d(),b("input",{key:1,"onUpdate:modelValue":y[0]||(y[0]=_=>p.value=_),"data-test":"am-filter",placeholder:C.$t("common.filter"),class:"w-full rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,gl)),[[Re,p.value]]):M("",!0),x.value.length?(d(),b("ul",vl,[(d(!0),b(J,null,le(g.value,_=>(d(),b("li",{key:_.name,class:"flex items-center justify-between gap-2 px-3 py-2 text-sm"},[f("span",{class:"min-w-0 truncate",title:`${_.name} · ${_.driver}`},[f("span",kl,k(_.name),1),f("span",_l," · "+k(_.driver),1)],8,yl),f("button",{"data-test":`am-remove-${_.name}`,title:C.$t("agents.remove",{name:_.name}),"aria-label":C.$t("agents.removeAria",{name:_.name}),class:"grid h-7 w-7 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger disabled:opacity-50",disabled:i.value,onClick:D=>A(_.name)},[B(v(mu),{size:14})],8,wl)]))),128)),g.value.length?M("",!0):(d(),b("li",El,k(C.$t("common.noMatch")),1))])):(d(),b("p",xl,k(C.$t("agents.empty")),1)),l.value?(d(),b("div",Al,[f("div",$l,[_e(f("select",{"onUpdate:modelValue":y[2]||(y[2]=_=>a.value=_),"data-test":"am-driver",class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},[f("option",Cl,k(C.$t("agents.chooseDriver")),1),(d(!0),b(J,null,le(c.value,_=>(d(),b("option",{key:_.driver,value:_.driver,disabled:_.installed==="unknown"},k(_.driver)+" ("+k(w(_.installed))+") ",9,Dl))),128))],512),[[Kr,a.value]]),_e(f("input",{"onUpdate:modelValue":y[3]||(y[3]=_=>r.value=_),"data-test":"am-name",placeholder:C.$t("agents.namePlaceholder"),class:"rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},null,8,Tl),[[Re,r.value]])]),f("div",Sl,[f("button",{"data-test":"am-add",class:"rounded bg-accent px-3 py-1.5 text-sm text-white hover:bg-accent-hover disabled:opacity-50",disabled:i.value||!a.value,onClick:E},k(C.$t("common.add")),9,Fl),f("button",{type:"button","data-test":"am-add-cancel",class:"rounded px-3 py-1.5 text-sm text-fg-muted hover:bg-fg/5 hover:text-fg",onClick:y[4]||(y[4]=_=>l.value=!1)},k(C.$t("common.cancel")),1)])])):(d(),b("button",{key:4,type:"button","data-test":"am-add-toggle",onClick:y[1]||(y[1]=_=>l.value=!0),class:"flex items-center gap-1.5 rounded border border-dashed border-border px-3 py-1.5 text-sm text-fg-muted transition-colors hover:border-accent hover:text-fg"},[B(v(ju),{size:14}),he(" "+k(C.$t("agents.add")),1)]))]))}}),Ml={class:"flex shrink-0 items-center justify-between border-b border-border px-5 py-3"},zl={id:"manage-instance-title",class:"truncate text-sm font-semibold text-fg"},Ll=["aria-label"],Ol={key:0,class:"py-6 text-center text-sm text-fg-muted"},Rl=["id","data-test","aria-selected","aria-controls","tabindex","onClick"],Nl={class:"flex-1 overflow-y-auto p-5"},Pl={key:0,id:"tabpanel-general",role:"tabpanel","aria-labelledby":"tab-general",class:"space-y-6"},Bl={class:"space-y-3"},Ul={class:"text-sm font-semibold uppercase text-fg-muted"},ql={key:0,"data-test":"rename-error",class:"rounded bg-danger/10 px-3 py-2 text-sm text-danger"},jl={class:"flex gap-2"},Hl=["placeholder"],Wl=["disabled"],Vl={class:"space-y-1"},Gl={class:"text-sm font-semibold uppercase text-fg-muted"},Kl={class:"text-sm text-fg-muted","data-test":"instance-version"},Zl={key:1,id:"tabpanel-workspaces",role:"tabpanel","aria-labelledby":"tab-workspaces"},Xl={key:2,id:"tabpanel-agents",role:"tabpanel","aria-labelledby":"tab-agents"},Yl='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',Jl=de({__name:"ManageInstanceDialog",props:{instanceId:{},instanceName:{}},emits:["close"],setup(e,{emit:t}){const u=e,n=t,s=pt(),{t:a}=zt(),r=Z(()=>{var y;return((y=s.byId(u.instanceId))==null?void 0:y.coreVersion)??null}),o=S(!0),i=["general","workspaces","agents"],l=S("general");function p(y){const _=i.indexOf(l.value);let D=_;if(y.key==="ArrowRight")D=(_+1)%i.length;else if(y.key==="ArrowLeft")D=(_-1+i.length)%i.length;else if(y.key==="Home")D=0;else if(y.key==="End")D=i.length-1;else return;y.preventDefault(),l.value=i[D],je(()=>{var N,V;(V=(N=E.value)==null?void 0:N.querySelector(`#tab-${i[D]}`))==null||V.focus()})}const c=S(u.instanceName),x=S(""),h=S(!1);async function g(){const y=c.value.trim();if(!(!y||h.value)){h.value=!0,x.value="";try{await s.renameInstance(u.instanceId,y),c.value=y}catch(_){x.value=_ instanceof Error?_.message:a("instance.renameFailed")}finally{h.value=!1}}}const E=S(null);let A=null;function w(){return E.value?Array.from(E.value.querySelectorAll(Yl)):[]}function C(y){if(y.key==="Escape"){y.preventDefault(),n("close");return}if(y.key!=="Tab")return;const _=w();if(_.length===0)return;const D=_[0],N=_[_.length-1],V=document.activeElement;y.shiftKey&&V===D?(y.preventDefault(),N.focus()):!y.shiftKey&&V===N&&(y.preventDefault(),D.focus())}return nt(async()=>{A=document.activeElement instanceof HTMLElement?document.activeElement:null,document.addEventListener("keydown",C),je(()=>{var y;(y=w()[0]??E.value)==null||y.focus()});try{await s.loadFormOptions(u.instanceId)}catch{}finally{o.value=!1}}),Qt(()=>{var y;document.removeEventListener("keydown",C),(y=A==null?void 0:A.focus)==null||y.call(A)}),(y,_)=>(d(),G(eu,{to:"body"},[f("div",{class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:_[2]||(_[2]=Ae(D=>n("close"),["self"]))},[f("div",{ref_key:"dialogEl",ref:E,tabindex:"-1",role:"dialog","aria-modal":"true","aria-labelledby":"manage-instance-title",class:"flex max-h-[85vh] w-full max-w-xl flex-col rounded-xl border border-border bg-raised shadow-xl focus:outline-none","data-test":"manage-instance-dialog"},[f("header",Ml,[f("h2",zl,k(y.$t("instance.manageTitle",{name:c.value})),1),f("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":y.$t("instance.close"),onClick:_[0]||(_[0]=D=>n("close"))},[B(v(st),{size:16})],8,Ll)]),o.value?(d(),b("div",Ol,k(y.$t("instance.dialogLoading")),1)):(d(),b(J,{key:1},[f("nav",{class:"flex shrink-0 gap-1 border-b border-border px-3 pt-2",role:"tablist",onKeydown:p},[(d(),b(J,null,le(["general","workspaces","agents"],D=>f("button",{key:D,id:`tab-${D}`,"data-test":`tab-${D}`,role:"tab","aria-selected":l.value===D,"aria-controls":`tabpanel-${D}`,tabindex:l.value===D?0:-1,class:X(["rounded-t px-3 py-1.5 text-sm font-medium transition-colors",l.value===D?"border-b-2 border-accent text-fg":"text-fg-muted hover:text-fg"]),onClick:N=>l.value=D},k(D==="general"?y.$t("instance.tabGeneral"):D==="workspaces"?y.$t("workspaces.title"):y.$t("agents.title")),11,Rl)),64))],32),f("div",Nl,[l.value==="general"?(d(),b("div",Pl,[f("section",Bl,[f("h3",Ul,k(y.$t("instance.nameLabel")),1),x.value?(d(),b("p",ql,k(x.value),1)):M("",!0),f("div",jl,[_e(f("input",{"onUpdate:modelValue":_[1]||(_[1]=D=>c.value=D),"data-test":"rename-name",placeholder:y.$t("instance.renamePlaceholder"),class:"min-w-0 flex-1 rounded border border-border bg-bg px-2 py-1 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onKeyup:Bn(g,["enter"])},null,40,Hl),[[Re,c.value]]),f("button",{"data-test":"rename-save",class:"shrink-0 rounded bg-accent px-3 py-1.5 text-sm text-white hover:bg-accent-hover disabled:opacity-50",disabled:h.value||!c.value.trim(),onClick:g},k(h.value?y.$t("instance.renameSaving"):y.$t("instance.renameSave")),9,Wl)])]),f("section",Vl,[f("h3",Gl,k(y.$t("instance.versionLabel")),1),f("p",Kl,k(r.value?y.$t("instance.coreVersion",{version:r.value}):y.$t("instance.coreVersionUnknown")),1)])])):l.value==="workspaces"?(d(),b("div",Zl,[B(hl,{"instance-id":e.instanceId},null,8,["instance-id"])])):l.value==="agents"?(d(),b("div",Xl,[B(Il,{"instance-id":e.instanceId},null,8,["instance-id"])])):M("",!0)])],64))],512)])]))}}),Ql={class:"thin-scroll flex h-full flex-1 flex-col space-y-1.5 overflow-y-auto px-2 pb-2 pt-1.5"},ec=["onClick"],tc=["title"],uc={key:2,class:"font-mono text-[10px] tabular-nums text-fg-muted"},nc={key:3,class:"text-[10px] font-medium text-fg-muted"},sc={class:"ml-2.5 mt-px space-y-px border-l border-border pl-2.5"},ac={class:"overflow-hidden rounded-md"},rc={key:0,class:"absolute bottom-1 left-0 top-1 w-[3px] rounded-full bg-accent"},oc=["onClick"],ic={key:0,"data-test":"attention-dot","data-attention":"working",class:"pulse-dot h-2 w-2 shrink-0 rounded-full bg-run-bright"},lc={key:1,"data-test":"attention-dot","data-attention":"unread",class:"h-2 w-2 shrink-0 rounded-full bg-info"},cc={key:2,"data-test":"attention-dot","data-attention":"running",class:"h-2 w-2 shrink-0 rounded-full bg-run"},dc={key:3,"data-test":"archived-badge",class:"shrink-0 rounded bg-bg px-1 py-px text-[9px] text-fg-muted"},fc={key:4,"data-test":"session-elapsed",class:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-run"},pc={key:1,"data-test":"session-actions",class:"relative mr-1 shrink-0"},hc=["aria-label","onClick"],mc=["aria-label","title","onClick"],bc=["aria-label","title","onClick"],gc=["onClick"],xc=["onClick"],vc={key:0,"data-test":"sessions-loading",class:"py-1 pl-2.5 text-[11px] text-fg-muted"},yc={key:1,"data-test":"no-sessions",class:"py-1 pl-2.5 text-[11px] text-fg-muted"},kc={class:"flex items-center gap-0.5 pb-px pl-2 pt-0.5"},_c=["title","aria-label","onClick"],wc=["title","aria-label","onClick"],Ec=de({__name:"InstanceTree",emits:["select"],setup(e,{emit:t}){const u=pt(),n=$t(),{t:s}=zt(),a=t,r=S(null),o=S(null),i=S(Date.now()),l=setInterval(()=>{i.value=Date.now()},1e3);Ru(()=>clearInterval(l));function p(F,P){const O=n.runningSince(F,P);if(O===null)return"";const $=Math.max(0,Math.floor((i.value-O)/1e3));return $<60?`${$}s`:$<3600?`${Math.floor($/60)}m`:`${Math.floor($/3600)}h`}function c(F,P){return n.instanceId===F&&n.sessionAlias===P}const x=S(new Set);function h(F){return!x.value.has(F)}function g(F){const P=new Set(x.value);P.has(F)?P.delete(F):P.add(F),x.value=P,w.value=null,h(F)&&u.loadSessions(F).catch(()=>{})}function E(F){return[...F].sort((P,O)=>Number(P.archived??!1)-Number(O.archived??!1))}const A=S(null),w=S(null),C=S(null),y=S(0);function _(){A.value=null,w.value=null}nt(()=>document.addEventListener("mousedown",_)),Ru(()=>document.removeEventListener("mousedown",_));function D(F){return F.archived?56:112}function N(F,P){const O=`${F}:${P.alias}`,$=D(P);if(C.value===O){const I=w.value===O?-$:0;return`translateX(${Math.max(-$,Math.min(0,I+y.value))}px)`}return w.value===O?`translateX(-${$}px)`:"translateX(0)"}function V(F,P){const O=`${F}:${P}`;if(w.value===O){w.value=null;return}a("select",F,P)}async function te(F,P){A.value=null,w.value=null,await u.archiveSession(F,P).catch(()=>{}),ne(F,P)}function ne(F,P){ei({message:s("instance.sessionArchivedToast",{alias:P}),actionLabel:s("instance.undo"),action:()=>{u.unarchiveSession(F,P).catch(()=>{})}})}async function ee(F,P){A.value=null,w.value=null,await ku({title:s("instance.deleteSessionTitle"),message:s("instance.deleteSessionBody",{alias:P}),confirmLabel:s("common.delete"),tone:"danger"})&&u.removeSession(F,P).catch(()=>{})}const L=Z(()=>{const F={};for(const P of u.instances)if(P.online)for(const O of P.sessions){const $=`${P.id}:${O.alias}`,I=D(O);F[$]=ti({onMove:R=>{A.value=null,C.value=$,y.value=R},onEnd:R=>{const fe=w.value===$?-I:0,H=Math.max(-I,Math.min(0,fe+R));w.value=H<=-I/2?$:null,C.value=null,y.value=0}}).handlers}return F});return(F,P)=>(d(),b("nav",Ql,[(d(!0),b(J,null,le(v(u).instances,O=>(d(),b("div",{key:O.id,class:X(O.online?"":"opacity-60")},[f("button",{class:"group flex h-7 w-full items-center gap-1.5 rounded-md px-1.5 transition-colors hover:bg-raised",onClick:$=>g(O.id)},[h(O.id)?(d(),G(v(at),{key:0,size:12,class:"shrink-0 text-fg-muted"})):(d(),G(v(kt),{key:1,size:12,class:"shrink-0 text-fg-muted"})),f("span",{class:X(["h-2 w-2 shrink-0 rounded-full",O.online?"bg-run":"bg-fg-muted"]),"data-test":"online-dot"},null,2),f("span",{class:X(["flex-1 truncate text-left text-[12.5px] font-semibold",O.online?"text-fg":"text-fg-muted"]),title:O.coreVersion?F.$t("instance.coreVersion",{version:O.coreVersion}):F.$t("instance.coreVersionUnknown")},k(O.name),11,tc),O.online?(d(),b("span",uc,k(O.sessions.length),1)):(d(),b("span",nc,k(F.$t("instance.offline")),1))],8,ec),_e(f("div",sc,[(d(!0),b(J,null,le(E(O.sessions),$=>(d(),b("div",{key:$.alias,"data-test":"session-row",class:"group relative rounded-md"},[f("div",ac,[f("div",Zr({"data-test":"swipe-track",class:["flex touch-pan-y ease-out",C.value===`${O.id}:${$.alias}`?"":"transition-transform duration-200"],style:{transform:N(O.id,$)}},Xr(O.online?L.value[`${O.id}:${$.alias}`]??{}:{})),[f("div",{class:X(["relative flex w-full shrink-0 items-center rounded-md transition-colors",c(O.id,$.alias)?"bg-accent/10":"hover:bg-raised"])},[c(O.id,$.alias)?(d(),b("span",rc)):M("",!0),f("button",{class:"flex min-w-0 flex-1 items-center gap-2 py-2 pl-2.5 pr-1.5 text-left",onClick:I=>V(O.id,$.alias)},[!$.archived&&v(n).sessionAttention(O.id,$.alias)==="working"?(d(),b("span",ic)):!$.archived&&v(n).sessionAttention(O.id,$.alias)==="unread"?(d(),b("span",lc)):!$.archived&&$.running?(d(),b("span",cc)):M("",!0),f("span",{class:X(["truncate text-[12.5px] font-medium",$.archived?"text-fg-muted":c(O.id,$.alias)?"font-semibold text-accent":"text-fg"])},k($.alias),3),f("span",{class:X(["shrink-0 rounded px-1 py-px font-mono text-[9.5px]",c(O.id,$.alias)?"bg-accent/15 text-accent":"bg-bg text-fg-muted"])},k($.agent),3),$.archived?(d(),b("span",dc,k(F.$t("instance.sessionArchivedBadge")),1)):M("",!0),!$.archived&&p(O.id,$.alias)?(d(),b("span",fc,k(p(O.id,$.alias)),1)):M("",!0)],8,oc),O.online?(d(),b("div",pc,[f("button",{"data-test":"session-menu","aria-label":F.$t("common.more"),class:"grid h-5 w-5 place-items-center rounded text-fg-muted hover:bg-raised hover:text-fg opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-100",onClick:Ae(I=>{w.value=null,A.value=A.value===`${O.id}:${$.alias}`?null:`${O.id}:${$.alias}`},["stop"])},[B(v(po),{size:13})],8,hc)])):M("",!0)],2),O.online?(d(),b(J,{key:0},[$.archived?M("",!0):(d(),b("button",{key:0,"data-test":"swipe-archive","aria-label":F.$t("instance.archiveSession"),title:F.$t("instance.archiveSession"),class:"flex w-14 shrink-0 items-center justify-center bg-warn text-white transition-colors hover:bg-warn/90",onClick:Ae(I=>te(O.id,$.alias),["stop"])},[B(v(vs),{size:16})],8,mc)),f("button",{"data-test":"swipe-delete","aria-label":F.$t("common.delete"),title:F.$t("common.delete"),class:"flex w-14 shrink-0 items-center justify-center bg-danger text-white transition-colors hover:bg-danger/90",onClick:Ae(I=>ee(O.id,$.alias),["stop"])},[B(v(mu),{size:16})],8,bc)],64)):M("",!0)],16)]),O.online&&A.value===`${O.id}:${$.alias}`?(d(),b("div",{key:0,onMousedown:P[0]||(P[0]=Ae(()=>{},["stop"])),class:"absolute right-1 top-full z-30 mt-0.5 w-32 rounded-md border border-border bg-surface py-1 shadow-lg"},[$.archived?M("",!0):(d(),b("button",{key:0,"data-test":"action-archive",class:"flex w-full items-center gap-2 px-2.5 py-1 text-left text-[12px] text-fg hover:bg-raised",onClick:Ae(I=>te(O.id,$.alias),["stop"])},[B(v(vs),{size:12}),he(k(F.$t("instance.archiveSession")),1)],8,gc)),f("button",{"data-test":"delete-session",class:"flex w-full items-center gap-2 px-2.5 py-1 text-left text-[12px] text-danger hover:bg-danger/10",onClick:Ae(I=>ee(O.id,$.alias),["stop"])},[B(v(mu),{size:12}),he(k(F.$t("common.delete")),1)],8,xc)],32)):M("",!0)]))),128)),O.online&&!O.sessionsLoaded&&!O.sessions.length?(d(),b("div",vc,k(F.$t("instance.loading")),1)):O.sessionsLoaded&&!O.sessions.length?(d(),b("div",yc,k(F.$t("instance.noSessions")),1)):M("",!0),f("div",kc,[f("button",{"data-test":"new-session",title:F.$t("instance.newSession"),"aria-label":F.$t("instance.newSession"),class:"grid h-6 w-6 place-items-center rounded text-accent transition-colors hover:bg-accent/10",onClick:$=>r.value={id:O.id,name:O.name}},[B(v(ju),{size:14})],8,_c),f("button",{"data-test":"manage-instance",title:F.$t("instance.manage"),"aria-label":F.$t("instance.manage"),class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:$=>o.value={id:O.id,name:O.name}},[B(v(Do),{size:13})],8,wc)])],512),[[qu,h(O.id)]])],2))),128)),r.value?(d(),G(Xi,{key:0,"instance-id":r.value.id,"instance-name":r.value.name,onClose:P[1]||(P[1]=O=>r.value=null),onCreated:P[2]||(P[2]=O=>r.value=null)},null,8,["instance-id","instance-name"])):M("",!0),o.value?(d(),G(Jl,{key:1,"instance-id":o.value.id,"instance-name":o.value.name,onClose:P[3]||(P[3]=O=>o.value=null)},null,8,["instance-id","instance-name"])):M("",!0)]))}});async function Ac(e,t=512){if(!e.type.startsWith("image/"))return;const u=await createImageBitmap(e,{imageOrientation:"from-image"}).catch(()=>null);if(!u)return;const n=Math.min(1,t/Math.max(u.width,u.height)),s=Math.max(1,Math.round(u.width*n)),a=Math.max(1,Math.round(u.height*n)),r=document.createElement("canvas");r.width=s,r.height=a;const o=r.getContext("2d");if(o)return o.drawImage(u,0,0,s,a),u.close(),r.toDataURL("image/jpeg",.8)}function $c(e){return new Promise((t,u)=>{const n=new FileReader;n.onload=()=>{const s=n.result;t(s.slice(s.indexOf(",")+1))},n.onerror=()=>u(n.error),n.readAsDataURL(e)})}const Cc=5,Dc=10*1024*1024,za=At("composer",()=>{const e=S(null);let t=0;function u(x,h){e.value={key:x,text:h,seq:++t}}const n=S([]),s=S(!1),a=S(null);let r="",o=0;function i(x){r=x}async function l(x){const h=r;if(h){a.value=null,s.value=!0;for(const g of x){if(n.value.length>=Cc){a.value={reason:"too-many",filename:g.name};break}if(g.size>Dc){a.value={reason:"too-large",filename:g.name};continue}const E=`local-${++o}`,A=g.type.startsWith("image/")?"image":"file",w={id:E,filename:g.name,mimeType:g.type||"application/octet-stream",size:g.size,kind:A,status:"uploading"};n.value.push(w);try{const C=await Ac(g);C&&(w.previewUrl=C);const y=await $c(g),_=await re.upload(h,{filename:g.name,content:y,mimeType:w.mimeType});w.filePath=_.path,w.id=_.id,w.size=_.size,w.status="ready"}catch{w.status="error"}}s.value=n.value.some(g=>g.status==="uploading")}}function p(x){n.value=n.value.filter(h=>h.id!==x),a.value=null}function c(){n.value=[],a.value=null}return{insertRequest:e,requestInsert:u,pending:n,uploading:s,rejection:a,bindInstance:i,addFiles:l,removeAttachment:p,clearAttachments:c}}),Ts={};function Tc(e){let t=Ts[e];if(t)return t;t=Ts[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);t.push(n)}for(let u=0;u<e.length;u++){const n=e.charCodeAt(u);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function Yt(e,t){typeof t!="string"&&(t=Yt.defaultChars);const u=Tc(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let s="";for(let a=0,r=n.length;a<r;a+=3){const o=parseInt(n.slice(a+1,a+3),16);if(o<128){s+=u[o];continue}if((o&224)===192&&a+3<r){const i=parseInt(n.slice(a+4,a+6),16);if((i&192)===128){const l=o<<6&1984|i&63;l<128?s+="��":s+=String.fromCharCode(l),a+=3;continue}}if((o&240)===224&&a+6<r){const i=parseInt(n.slice(a+4,a+6),16),l=parseInt(n.slice(a+7,a+9),16);if((i&192)===128&&(l&192)===128){const p=o<<12&61440|i<<6&4032|l&63;p<2048||p>=55296&&p<=57343?s+="���":s+=String.fromCharCode(p),a+=6;continue}}if((o&248)===240&&a+9<r){const i=parseInt(n.slice(a+4,a+6),16),l=parseInt(n.slice(a+7,a+9),16),p=parseInt(n.slice(a+10,a+12),16);if((i&192)===128&&(l&192)===128&&(p&192)===128){let c=o<<18&1835008|i<<12&258048|l<<6&4032|p&63;c<65536||c>1114111?s+="����":(c-=65536,s+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),a+=9;continue}}s+="�"}return s})}Yt.defaultChars=";/?:@&=+$,#";Yt.componentChars="";const Ss={};function Sc(e){let t=Ss[e];if(t)return t;t=Ss[e]=[];for(let u=0;u<128;u++){const n=String.fromCharCode(u);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+u.toString(16).toUpperCase()).slice(-2))}for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=e[u];return t}function wu(e,t,u){typeof t!="string"&&(u=t,t=wu.defaultChars),typeof u>"u"&&(u=!0);const n=Sc(t);let s="";for(let a=0,r=e.length;a<r;a++){const o=e.charCodeAt(a);if(u&&o===37&&a+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3))){s+=e.slice(a,a+3),a+=2;continue}if(o<128){s+=n[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&a+1<r){const i=e.charCodeAt(a+1);if(i>=56320&&i<=57343){s+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[a])}return s}wu.defaultChars=";/?:@&=+$,-_.!~*'()#";wu.componentChars="-_.!~*'()";function jn(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Bu(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Fc=/^([a-z0-9.+-]+:)/i,Ic=/:[0-9]*$/,Mc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,zc=["<",">",'"',"`"," ","\r",`
243
+ `," "],Lc=["{","}","|","\\","^","`"].concat(zc),Oc=["'"].concat(Lc),Fs=["%","/","?",";","#"].concat(Oc),Is=["/","?","#"],Rc=255,Ms=/^[+a-z0-9A-Z_-]{0,63}$/,Nc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,zs={javascript:!0,"javascript:":!0},Ls={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Hn(e,t){if(e&&e instanceof Bu)return e;const u=new Bu;return u.parse(e,t),u}Bu.prototype.parse=function(e,t){let u,n,s,a=e;if(a=a.trim(),!t&&e.split("#").length===1){const l=Mc.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let r=Fc.exec(a);if(r&&(r=r[0],u=r.toLowerCase(),this.protocol=r,a=a.substr(r.length)),(t||r||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=a.substr(0,2)==="//",s&&!(r&&zs[r])&&(a=a.substr(2),this.slashes=!0)),!zs[r]&&(s||r&&!Ls[r])){let l=-1;for(let g=0;g<Is.length;g++)n=a.indexOf(Is[g]),n!==-1&&(l===-1||n<l)&&(l=n);let p,c;l===-1?c=a.lastIndexOf("@"):c=a.lastIndexOf("@",l),c!==-1&&(p=a.slice(0,c),a=a.slice(c+1),this.auth=p),l=-1;for(let g=0;g<Fs.length;g++)n=a.indexOf(Fs[g]),n!==-1&&(l===-1||n<l)&&(l=n);l===-1&&(l=a.length),a[l-1]===":"&&l--;const x=a.slice(0,l);a=a.slice(l),this.parseHost(x),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const g=this.hostname.split(/\./);for(let E=0,A=g.length;E<A;E++){const w=g[E];if(w&&!w.match(Ms)){let C="";for(let y=0,_=w.length;y<_;y++)w.charCodeAt(y)>127?C+="x":C+=w[y];if(!C.match(Ms)){const y=g.slice(0,E),_=g.slice(E+1),D=w.match(Nc);D&&(y.push(D[1]),_.unshift(D[2])),_.length&&(a=_.join(".")+a),this.hostname=y.join(".");break}}}}this.hostname.length>Rc&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=a.indexOf("#");o!==-1&&(this.hash=a.substr(o),a=a.slice(0,o));const i=a.indexOf("?");return i!==-1&&(this.search=a.substr(i),a=a.slice(0,i)),a&&(this.pathname=a),Ls[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Bu.prototype.parseHost=function(e){let t=Ic.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Pc=Object.freeze(Object.defineProperty({__proto__:null,decode:Yt,encode:wu,format:jn,parse:Hn},Symbol.toStringTag,{value:"Module"})),La=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Oa=/[\0-\x1F\x7F-\x9F]/,Bc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Wn=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ra=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Na=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Uc=Object.freeze(Object.defineProperty({__proto__:null,Any:La,Cc:Oa,Cf:Bc,P:Wn,S:Ra,Z:Na},Symbol.toStringTag,{value:"Module"})),qc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),jc=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var xn;const Hc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wc=(xn=String.fromCodePoint)!==null&&xn!==void 0?xn:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Vc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Hc.get(e))!==null&&t!==void 0?t:e}var De;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(De||(De={}));const Gc=32;var yt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(yt||(yt={}));function On(e){return e>=De.ZERO&&e<=De.NINE}function Kc(e){return e>=De.UPPER_A&&e<=De.UPPER_F||e>=De.LOWER_A&&e<=De.LOWER_F}function Zc(e){return e>=De.UPPER_A&&e<=De.UPPER_Z||e>=De.LOWER_A&&e<=De.LOWER_Z||On(e)}function Xc(e){return e===De.EQUALS||Zc(e)}var Ce;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ce||(Ce={}));var ft;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ft||(ft={}));class Yc{constructor(t,u,n){this.decodeTree=t,this.emitCodePoint=u,this.errors=n,this.state=Ce.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ft.Strict}startEntity(t){this.decodeMode=t,this.state=Ce.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case Ce.EntityStart:return t.charCodeAt(u)===De.NUM?(this.state=Ce.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=Ce.NamedEntity,this.stateNamedEntity(t,u));case Ce.NumericStart:return this.stateNumericStart(t,u);case Ce.NumericDecimal:return this.stateNumericDecimal(t,u);case Ce.NumericHex:return this.stateNumericHex(t,u);case Ce.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|Gc)===De.LOWER_X?(this.state=Ce.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=Ce.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,n,s){if(u!==n){const a=n-u;this.result=this.result*Math.pow(s,a)+parseInt(t.substr(u,a),s),this.consumed+=a}}stateNumericHex(t,u){const n=u;for(;u<t.length;){const s=t.charCodeAt(u);if(On(s)||Kc(s))u+=1;else return this.addToNumericResult(t,n,u,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,u,16),-1}stateNumericDecimal(t,u){const n=u;for(;u<t.length;){const s=t.charCodeAt(u);if(On(s))u+=1;else return this.addToNumericResult(t,n,u,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,u,10),-1}emitNumericEntity(t,u){var n;if(this.consumed<=u)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===De.SEMI)this.consumed+=1;else if(this.decodeMode===ft.Strict)return 0;return this.emitCodePoint(Vc(this.result),this.consumed),this.errors&&(t!==De.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:n}=this;let s=n[this.treeIndex],a=(s&yt.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const r=t.charCodeAt(u);if(this.treeIndex=Jc(n,s,this.treeIndex+Math.max(1,a),r),this.treeIndex<0)return this.result===0||this.decodeMode===ft.Attribute&&(a===0||Xc(r))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],a=(s&yt.VALUE_LENGTH)>>14,a!==0){if(r===De.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ft.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:n}=this,s=(n[u]&yt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,n){const{decodeTree:s}=this;return this.emitCodePoint(u===1?s[t]&~yt.VALUE_LENGTH:s[t+1],n),u===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case Ce.NamedEntity:return this.result!==0&&(this.decodeMode!==ft.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ce.NumericDecimal:return this.emitNumericEntity(0,2);case Ce.NumericHex:return this.emitNumericEntity(0,3);case Ce.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ce.EntityStart:return 0}}}function Pa(e){let t="";const u=new Yc(e,n=>t+=Wc(n));return function(s,a){let r=0,o=0;for(;(o=s.indexOf("&",o))>=0;){t+=s.slice(r,o),u.startEntity(a);const l=u.write(s,o+1);if(l<0){r=o+u.end();break}r=o+l,o=l===0?r+1:r}const i=t+s.slice(r);return t="",i}}function Jc(e,t,u,n){const s=(t&yt.BRANCH_LENGTH)>>7,a=t&yt.JUMP_TABLE;if(s===0)return a!==0&&n===a?u:-1;if(a){const i=n-a;return i<0||i>=s?-1:e[u+i]-1}let r=u,o=r+s-1;for(;r<=o;){const i=r+o>>>1,l=e[i];if(l<n)r=i+1;else if(l>n)o=i-1;else return e[i+s]}return-1}const Ba=Pa(qc);Pa(jc);function Qc(e,t=ft.Legacy){return Ba(e,t)}function e0(e){return Ba(e,ft.Strict)}function t0(e){return Object.prototype.toString.call(e)}function Vn(e){return t0(e)==="[object String]"}const u0=Object.prototype.hasOwnProperty;function n0(e,t){return u0.call(e,t)}function Vu(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){if(u){if(typeof u!="object")throw new TypeError(u+"must be object");Object.keys(u).forEach(function(n){e[n]=u[n]})}}),e}function Ua(e,t,u){return[].concat(e.slice(0,t),u,e.slice(t+1))}function Gn(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function bu(e){if(e>65535){e-=65536;const t=55296+(e>>10),u=56320+(e&1023);return String.fromCharCode(t,u)}return String.fromCharCode(e)}const qa=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,s0=/&([a-z#][a-z0-9]{1,31});/gi,a0=new RegExp(qa.source+"|"+s0.source,"gi"),r0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function o0(e,t){if(t.charCodeAt(0)===35&&r0.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Gn(n)?bu(n):e}const u=Qc(e);return u!==e?u:e}function i0(e){return e.indexOf("\\")<0?e:e.replace(qa,"$1")}function Jt(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(a0,function(t,u,n){return u||o0(t,n)})}const l0=/[&<>"]/,c0=/[&<>"]/g,d0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function f0(e){return d0[e]}function _t(e){return l0.test(e)?e.replace(c0,f0):e}const p0=/[.?*+^$[\]\\(){}|-]/g;function h0(e){return e.replace(p0,"\\$&")}function me(e){switch(e){case 9:case 32:return!0}return!1}function gu(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ja(e){return Wn.test(e)||Ra.test(e)}function xu(e){return ja(bu(e))}function vu(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Gu(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Os(e){return e===32||e===9||e===10||e===13}function Ku(e){let t=0;for(;t<e.length&&Os(e.charCodeAt(t));t++);let u=e.length-1;for(;u>=t&&Os(e.charCodeAt(u));u--);return e.slice(t,u+1)}const m0={mdurl:Pc,ucmicro:Uc},b0=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Ua,asciiTrim:Ku,assign:Vu,escapeHtml:_t,escapeRE:h0,fromCodePoint:bu,has:n0,isMdAsciiPunct:vu,isPunctChar:ja,isPunctCharCode:xu,isSpace:me,isString:Vn,isValidEntityCode:Gn,isWhiteSpace:gu,lib:m0,normalizeReference:Gu,unescapeAll:Jt,unescapeMd:i0},Symbol.toStringTag,{value:"Module"}));function g0(e,t,u){let n,s,a,r;const o=e.posMax,i=e.pos;for(e.pos=t+1,n=1;e.pos<o;){if(a=e.src.charCodeAt(e.pos),a===93&&(n--,n===0)){s=!0;break}if(r=e.pos,e.md.inline.skipToken(e),a===91){if(r===e.pos-1)n++;else if(u)return e.pos=i,-1}}let l=-1;return s&&(l=e.pos),e.pos=i,l}function x0(e,t,u){let n,s=t;const a={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<u;){if(n=e.charCodeAt(s),n===10||n===60)return a;if(n===62)return a.pos=s+1,a.str=Jt(e.slice(t+1,s)),a.ok=!0,a;if(n===92&&s+1<u){s+=2;continue}s++}return a}let r=0;for(;s<u&&(n=e.charCodeAt(s),!(n===32||n<32||n===127));){if(n===92&&s+1<u){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(n===40&&(r++,r>32))return a;if(n===41){if(r===0)break;r--}s++}return t===s||r!==0||(a.str=Jt(e.slice(t,s)),a.pos=s,a.ok=!0),a}function v0(e,t,u,n){let s,a=t;const r={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)r.str=n.str,r.marker=n.marker;else{if(a>=u)return r;let o=e.charCodeAt(a);if(o!==34&&o!==39&&o!==40)return r;t++,a++,o===40&&(o=41),r.marker=o}for(;a<u;){if(s=e.charCodeAt(a),s===r.marker)return r.pos=a+1,r.str+=Jt(e.slice(t,a)),r.ok=!0,r;if(s===40&&r.marker===41)return r;s===92&&a+1<u&&a++,a++}return r.can_continue=!0,r.str+=Jt(e.slice(t,a)),r}const y0=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:x0,parseLinkLabel:g0,parseLinkTitle:v0},Symbol.toStringTag,{value:"Module"})),rt={};rt.code_inline=function(e,t,u,n,s){const a=e[t];return"<code"+s.renderAttrs(a)+">"+_t(a.content)+"</code>"};rt.code_block=function(e,t,u,n,s){const a=e[t];return"<pre"+s.renderAttrs(a)+"><code>"+_t(e[t].content)+`</code></pre>
244
+ `};rt.fence=function(e,t,u,n,s){const a=e[t],r=a.info?Jt(a.info).trim():"";let o="",i="";if(r){const p=r.split(/(\s+)/g);o=p[0],i=p.slice(2).join("")}let l;if(u.highlight?l=u.highlight(a.content,o,i)||_t(a.content):l=_t(a.content),l.indexOf("<pre")===0)return l+`
245
+ `;if(r){const p=a.attrIndex("class"),c=a.attrs?a.attrs.slice():[];p<0?c.push(["class",u.langPrefix+o]):(c[p]=c[p].slice(),c[p][1]+=" "+u.langPrefix+o);const x={attrs:c};return`<pre><code${s.renderAttrs(x)}>${l}</code></pre>
246
+ `}return`<pre><code${s.renderAttrs(a)}>${l}</code></pre>
247
+ `};rt.image=function(e,t,u,n,s){const a=e[t];return a.attrs[a.attrIndex("alt")][1]=s.renderInlineAsText(a.children,u,n),s.renderToken(e,t,u)};rt.hardbreak=function(e,t,u){return u.xhtmlOut?`<br />
248
+ `:`<br>
249
+ `};rt.softbreak=function(e,t,u){return u.breaks?u.xhtmlOut?`<br />
250
+ `:`<br>
251
+ `:`
252
+ `};rt.text=function(e,t){return _t(e[t].content)};rt.html_block=function(e,t){return e[t].content};rt.html_inline=function(e,t){return e[t].content};function nu(){this.rules=Vu({},rt)}nu.prototype.renderAttrs=function(t){let u,n,s;if(!t.attrs)return"";for(s="",u=0,n=t.attrs.length;u<n;u++)s+=" "+_t(t.attrs[u][0])+'="'+_t(t.attrs[u][1])+'"';return s};nu.prototype.renderToken=function(t,u,n){const s=t[u];let a="";if(s.hidden)return"";s.block&&s.nesting!==-1&&u&&t[u-1].hidden&&(a+=`
253
+ `),a+=(s.nesting===-1?"</":"<")+s.tag,a+=this.renderAttrs(s),s.nesting===0&&n.xhtmlOut&&(a+=" /");let r=!1;if(s.block&&(r=!0,s.nesting===1&&u+1<t.length)){const o=t[u+1];(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===s.tag)&&(r=!1)}return a+=r?`>
254
+ `:">",a};nu.prototype.renderInline=function(e,t,u){let n="";const s=this.rules;for(let a=0,r=e.length;a<r;a++){const o=e[a].type;typeof s[o]<"u"?n+=s[o](e,a,t,u,this):n+=this.renderToken(e,a,t)}return n};nu.prototype.renderInlineAsText=function(e,t,u){let n="";for(let s=0,a=e.length;s<a;s++)switch(e[s].type){case"text":n+=e[s].content;break;case"image":n+=this.renderInlineAsText(e[s].children,t,u);break;case"html_inline":case"html_block":n+=e[s].content;break;case"softbreak":case"hardbreak":n+=`
255
+ `;break}return n};nu.prototype.render=function(e,t,u){let n="";const s=this.rules;for(let a=0,r=e.length;a<r;a++){const o=e[a].type;o==="inline"?n+=this.renderInline(e[a].children,t,u):typeof s[o]<"u"?n+=s[o](e,a,t,u,this):n+=this.renderToken(e,a,t,u)}return n};function Pe(){this.__rules__=[],this.__cache__=null}Pe.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Pe.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(u){u.enabled&&u.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(u){e.__cache__[u]=[],e.__rules__.forEach(function(n){n.enabled&&(u&&n.alt.indexOf(u)<0||e.__cache__[u].push(n.fn))})})};Pe.prototype.at=function(e,t,u){const n=this.__find__(e),s=u||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=s.alt||[],this.__cache__=null};Pe.prototype.before=function(e,t,u,n){const s=this.__find__(e),a=n||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:u,alt:a.alt||[]}),this.__cache__=null};Pe.prototype.after=function(e,t,u,n){const s=this.__find__(e),a=n||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:u,alt:a.alt||[]}),this.__cache__=null};Pe.prototype.push=function(e,t,u){const n=u||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Pe.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const s=this.__find__(n);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[s].enabled=!0,u.push(n)},this),this.__cache__=null,u};Pe.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(u){u.enabled=!1}),this.enable(e,t)};Pe.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(n){const s=this.__find__(n);if(s<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[s].enabled=!1,u.push(n)},this),this.__cache__=null,u};Pe.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Ke(e,t,u){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=u,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Ke.prototype.attrIndex=function(t){if(!this.attrs)return-1;const u=this.attrs;for(let n=0,s=u.length;n<s;n++)if(u[n][0]===t)return n;return-1};Ke.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Ke.prototype.attrSet=function(t,u){const n=this.attrIndex(t),s=[t,u];n<0?this.attrPush(s):this.attrs[n]=s};Ke.prototype.attrGet=function(t){const u=this.attrIndex(t);let n=null;return u>=0&&(n=this.attrs[u][1]),n};Ke.prototype.attrJoin=function(t,u){const n=this.attrIndex(t);n<0?this.attrPush([t,u]):this.attrs[n][1]=this.attrs[n][1]+" "+u};function Ha(e,t,u){this.src=e,this.env=u,this.tokens=[],this.inlineMode=!1,this.md=t}Ha.prototype.Token=Ke;const k0=/\r\n?|\n/g,_0=/\0/g;function w0(e){let t;t=e.src.replace(k0,`
256
+ `),t=t.replace(_0,"�"),e.src=t}function E0(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function A0(e){const t=e.tokens;for(let u=0,n=t.length;u<n;u++){const s=t[u];s.type==="inline"&&e.md.inline.parse(s.content,e.md,e.env,s.children)}}function $0(e){return/^<a[>\s]/i.test(e)}function C0(e){return/^<\/a\s*>/i.test(e)}function D0(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,n=t.length;u<n;u++){if(t[u].type!=="inline"||!e.md.linkify.pretest(t[u].content))continue;let s=t[u].children,a=0;for(let r=s.length-1;r>=0;r--){const o=s[r];if(o.type==="link_close"){for(r--;s[r].level!==o.level&&s[r].type!=="link_open";)r--;continue}if(o.type==="html_inline"&&($0(o.content)&&a>0&&a--,C0(o.content)&&a++),!(a>0)&&o.type==="text"&&e.md.linkify.test(o.content)){const i=o.content;let l=e.md.linkify.match(i);const p=[];let c=o.level,x=0;l.length>0&&l[0].index===0&&r>0&&s[r-1].type==="text_special"&&(l=l.slice(1));for(let h=0;h<l.length;h++){const g=l[h].url,E=e.md.normalizeLink(g);if(!e.md.validateLink(E))continue;let A=l[h].text;l[h].schema?l[h].schema==="mailto:"&&!/^mailto:/i.test(A)?A=e.md.normalizeLinkText("mailto:"+A).replace(/^mailto:/,""):A=e.md.normalizeLinkText(A):A=e.md.normalizeLinkText("http://"+A).replace(/^http:\/\//,"");const w=l[h].index;if(w>x){const D=new e.Token("text","",0);D.content=i.slice(x,w),D.level=c,p.push(D)}const C=new e.Token("link_open","a",1);C.attrs=[["href",E]],C.level=c++,C.markup="linkify",C.info="auto",p.push(C);const y=new e.Token("text","",0);y.content=A,y.level=c,p.push(y);const _=new e.Token("link_close","a",-1);_.level=--c,_.markup="linkify",_.info="auto",p.push(_),x=l[h].lastIndex}if(x<i.length){const h=new e.Token("text","",0);h.content=i.slice(x),h.level=c,p.push(h)}t[u].children=s=Ua(s,r,p)}}}}const Wa=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,T0=/\((c|tm|r)\)/i,S0=/\((c|tm|r)\)/ig,F0={c:"©",r:"®",tm:"™"};function I0(e,t){return F0[t.toLowerCase()]}function M0(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&(n.content=n.content.replace(S0,I0)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function z0(e){let t=0;for(let u=e.length-1;u>=0;u--){const n=e[u];n.type==="text"&&!t&&Wa.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function L0(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(T0.test(e.tokens[t].content)&&M0(e.tokens[t].children),Wa.test(e.tokens[t].content)&&z0(e.tokens[t].children))}const O0=/['"]/,Rs=/['"]/g,Ns="’";function Mu(e,t,u,n){e[t]||(e[t]=[]),e[t].push({pos:u,ch:n})}function R0(e,t){let u="",n=0;t.sort((s,a)=>s.pos-a.pos);for(let s=0;s<t.length;s++){const a=t[s];u+=e.slice(n,a.pos)+a.ch,n=a.pos+1}return u+e.slice(n)}function N0(e,t){let u;const n=[],s={};for(let a=0;a<e.length;a++){const r=e[a],o=e[a].level;for(u=n.length-1;u>=0&&!(n[u].level<=o);u--);if(n.length=u+1,r.type!=="text")continue;const i=r.content;let l=0;const p=i.length;e:for(;l<p;){Rs.lastIndex=l;const c=Rs.exec(i);if(!c)break;let x=!0,h=!0;l=c.index+1;const g=c[0]==="'";let E=32;if(c.index-1>=0)E=i.charCodeAt(c.index-1);else for(u=a-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){E=e[u].content.charCodeAt(e[u].content.length-1);break}let A=32;if(l<p)A=i.charCodeAt(l);else for(u=a+1;u<e.length&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u++)if(e[u].content){A=e[u].content.charCodeAt(0);break}const w=vu(E)||xu(E),C=vu(A)||xu(A),y=gu(E),_=gu(A);if(_?x=!1:C&&(y||w||(x=!1)),y?h=!1:w&&(_||C||(h=!1)),A===34&&c[0]==='"'&&E>=48&&E<=57&&(h=x=!1),x&&h&&(x=w,h=C),!x&&!h){g&&Mu(s,a,c.index,Ns);continue}if(h)for(u=n.length-1;u>=0;u--){let D=n[u];if(n[u].level<o)break;if(D.single===g&&n[u].level===o){D=n[u];let N,V;g?(N=t.md.options.quotes[2],V=t.md.options.quotes[3]):(N=t.md.options.quotes[0],V=t.md.options.quotes[1]),Mu(s,a,c.index,V),Mu(s,D.token,D.pos,N),n.length=u;continue e}}x?n.push({token:a,pos:c.index,single:g,level:o}):h&&g&&Mu(s,a,c.index,Ns)}}Object.keys(s).forEach(function(a){e[a].content=R0(e[a].content,s[a])})}function P0(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!O0.test(e.tokens[t].content)||N0(e.tokens[t].children,e)}function B0(e){let t,u;const n=e.tokens,s=n.length;for(let a=0;a<s;a++){if(n[a].type!=="inline")continue;const r=n[a].children,o=r.length;for(t=0;t<o;t++)r[t].type==="text_special"&&(r[t].type="text");for(t=u=0;t<o;t++)r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==u&&(r[u]=r[t]),u++);t!==u&&(r.length=u)}}const vn=[["normalize",w0],["block",E0],["inline",A0],["linkify",D0],["replacements",L0],["smartquotes",P0],["text_join",B0]];function Kn(){this.ruler=new Pe;for(let e=0;e<vn.length;e++)this.ruler.push(vn[e][0],vn[e][1])}Kn.prototype.process=function(e){const t=this.ruler.getRules("");for(let u=0,n=t.length;u<n;u++)t[u](e)};Kn.prototype.State=Ha;function ot(e,t,u,n){this.src=e,this.md=t,this.env=u,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const s=this.src;for(let a=0,r=0,o=0,i=0,l=s.length,p=!1;r<l;r++){const c=s.charCodeAt(r);if(!p)if(me(c)){o++,c===9?i+=4-i%4:i++;continue}else p=!0;(c===10||r===l-1)&&(c!==10&&r++,this.bMarks.push(a),this.eMarks.push(r),this.tShift.push(o),this.sCount.push(i),this.bsCount.push(0),p=!1,o=0,i=0,a=r+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ot.prototype.push=function(e,t,u){const n=new Ke(e,t,u);return n.block=!0,u<0&&this.level--,n.level=this.level,u>0&&this.level++,this.tokens.push(n),n};ot.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};ot.prototype.skipEmptyLines=function(t){for(let u=this.lineMax;t<u&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};ot.prototype.skipSpaces=function(t){for(let u=this.src.length;t<u;t++){const n=this.src.charCodeAt(t);if(!me(n))break}return t};ot.prototype.skipSpacesBack=function(t,u){if(t<=u)return t;for(;t>u;)if(!me(this.src.charCodeAt(--t)))return t+1;return t};ot.prototype.skipChars=function(t,u){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===u;t++);return t};ot.prototype.skipCharsBack=function(t,u,n){if(t<=n)return t;for(;t>n;)if(u!==this.src.charCodeAt(--t))return t+1;return t};ot.prototype.getLines=function(t,u,n,s){if(t>=u)return"";const a=new Array(u-t);for(let r=0,o=t;o<u;o++,r++){let i=0;const l=this.bMarks[o];let p=l,c;for(o+1<u||s?c=this.eMarks[o]+1:c=this.eMarks[o];p<c&&i<n;){const x=this.src.charCodeAt(p);if(me(x))x===9?i+=4-(i+this.bsCount[o])%4:i++;else if(p-l<this.tShift[o])i++;else break;p++}i>n?a[r]=new Array(i-n+1).join(" ")+this.src.slice(p,c):a[r]=this.src.slice(p,c)}return a.join("")};ot.prototype.Token=Ke;const U0=65536;function yn(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(u,n)}function Ps(e){const t=[],u=e.length;let n=0,s=e.charCodeAt(n),a=!1,r=0,o="";for(;n<u;)s===124&&(a?(o+=e.substring(r,n-1),r=n):(t.push(o+e.substring(r,n)),o="",r=n+1)),a=s===92,n++,s=e.charCodeAt(n);return t.push(o+e.substring(r)),t}function q0(e,t,u,n){if(t+2>u)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let a=e.bMarks[s]+e.tShift[s];if(a>=e.eMarks[s])return!1;const r=e.src.charCodeAt(a++);if(r!==124&&r!==45&&r!==58||a>=e.eMarks[s])return!1;const o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58&&!me(o)||r===45&&me(o))return!1;for(;a<e.eMarks[s];){const _=e.src.charCodeAt(a);if(_!==124&&_!==45&&_!==58&&!me(_))return!1;a++}let i=yn(e,t+1),l=i.split("|");const p=[];for(let _=0;_<l.length;_++){const D=l[_].trim();if(!D){if(_===0||_===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(D))return!1;D.charCodeAt(D.length-1)===58?p.push(D.charCodeAt(0)===58?"center":"right"):D.charCodeAt(0)===58?p.push("left"):p.push("")}if(i=yn(e,t).trim(),i.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=Ps(i),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const c=l.length;if(c===0||c!==p.length)return!1;if(n)return!0;const x=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),g=e.push("table_open","table",1),E=[t,0];g.map=E;const A=e.push("thead_open","thead",1);A.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let _=0;_<l.length;_++){const D=e.push("th_open","th",1);p[_]&&(D.attrs=[["style","text-align:"+p[_]]]);const N=e.push("inline","",0);N.content=l[_].trim(),N.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let C,y=0;for(s=t+2;s<u&&!(e.sCount[s]<e.blkIndent);s++){let _=!1;for(let N=0,V=h.length;N<V;N++)if(h[N](e,s,u,!0)){_=!0;break}if(_||(i=yn(e,s).trim(),!i)||e.sCount[s]-e.blkIndent>=4||(l=Ps(i),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),y+=c-l.length,y>U0))break;if(s===t+2){const N=e.push("tbody_open","tbody",1);N.map=C=[t+2,0]}const D=e.push("tr_open","tr",1);D.map=[s,s+1];for(let N=0;N<c;N++){const V=e.push("td_open","td",1);p[N]&&(V.attrs=[["style","text-align:"+p[N]]]);const te=e.push("inline","",0);te.content=l[N]?l[N].trim():"",te.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return C&&(e.push("tbody_close","tbody",-1),C[1]=s),e.push("table_close","table",-1),E[1]=s,e.parentType=x,e.line=s,!0}function j0(e,t,u){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,s=n;for(;n<u;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,s=n;continue}break}e.line=s;const a=e.push("code_block","code",0);return a.content=e.getLines(t,s,4+e.blkIndent,!1)+`
257
+ `,a.map=[t,e.line],!0}function H0(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>a)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let o=s;s=e.skipChars(s,r);let i=s-o;if(i<3)return!1;const l=e.src.slice(o,s),p=e.src.slice(s,a);if(r===96&&p.indexOf(String.fromCharCode(r))>=0)return!1;if(n)return!0;let c=t,x=!1;for(;c++,!(c>=u||(s=o=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],s<a&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(s)===r&&!(e.sCount[c]-e.blkIndent>=4)&&(s=e.skipChars(s,r),!(s-o<i)&&(s=e.skipSpaces(s),!(s<a)))){x=!0;break}i=e.sCount[t],e.line=c+(x?1:0);const h=e.push("fence","code",0);return h.info=p,h.content=e.getLines(t+1,c,i,!0),h.markup=l,h.map=[t,e.line],!0}function W0(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];const r=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==62)return!1;if(n)return!0;const o=[],i=[],l=[],p=[],c=e.md.block.ruler.getRules("blockquote"),x=e.parentType;e.parentType="blockquote";let h=!1,g;for(g=t;g<u;g++){const y=e.sCount[g]<e.blkIndent;if(s=e.bMarks[g]+e.tShift[g],a=e.eMarks[g],s>=a)break;if(e.src.charCodeAt(s++)===62&&!y){let D=e.sCount[g]+1,N,V;e.src.charCodeAt(s)===32?(s++,D++,V=!1,N=!0):e.src.charCodeAt(s)===9?(N=!0,(e.bsCount[g]+D)%4===3?(s++,D++,V=!1):V=!0):N=!1;let te=D;for(o.push(e.bMarks[g]),e.bMarks[g]=s;s<a;){const ne=e.src.charCodeAt(s);if(me(ne))ne===9?te+=4-(te+e.bsCount[g]+(V?1:0))%4:te++;else break;s++}h=s>=a,i.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(N?1:0),l.push(e.sCount[g]),e.sCount[g]=te-D,p.push(e.tShift[g]),e.tShift[g]=s-e.bMarks[g];continue}if(h)break;let _=!1;for(let D=0,N=c.length;D<N;D++)if(c[D](e,g,u,!0)){_=!0;break}if(_){e.lineMax=g,e.blkIndent!==0&&(o.push(e.bMarks[g]),i.push(e.bsCount[g]),p.push(e.tShift[g]),l.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}o.push(e.bMarks[g]),i.push(e.bsCount[g]),p.push(e.tShift[g]),l.push(e.sCount[g]),e.sCount[g]=-1}const E=e.blkIndent;e.blkIndent=0;const A=e.push("blockquote_open","blockquote",1);A.markup=">";const w=[t,0];A.map=w,e.md.block.tokenize(e,t,g);const C=e.push("blockquote_close","blockquote",-1);C.markup=">",e.lineMax=r,e.parentType=x,w[1]=e.line;for(let y=0;y<p.length;y++)e.bMarks[y+t]=o[y],e.tShift[y+t]=p[y],e.sCount[y+t]=l[y],e.bsCount[y+t]=i[y];return e.blkIndent=E,!0}function V0(e,t,u,n){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(a++);if(r!==42&&r!==45&&r!==95)return!1;let o=1;for(;a<s;){const l=e.src.charCodeAt(a++);if(l!==r&&!me(l))return!1;l===r&&o++}if(o<3)return!1;if(n)return!0;e.line=t+1;const i=e.push("hr","hr",0);return i.map=[t,e.line],i.markup=Array(o+1).join(String.fromCharCode(r)),!0}function Bs(e,t){const u=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(n++);if(s!==42&&s!==45&&s!==43)return-1;if(n<u){const a=e.src.charCodeAt(n);if(!me(a))return-1}return n}function Us(e,t){const u=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let s=u;if(s+1>=n)return-1;let a=e.src.charCodeAt(s++);if(a<48||a>57)return-1;for(;;){if(s>=n)return-1;if(a=e.src.charCodeAt(s++),a>=48&&a<=57){if(s-u>=10)return-1;continue}if(a===41||a===46)break;return-1}return s<n&&(a=e.src.charCodeAt(s),!me(a))?-1:s}function G0(e,t){const u=e.level+2;for(let n=t+2,s=e.tokens.length-2;n<s;n++)e.tokens[n].level===u&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function K0(e,t,u,n){let s,a,r,o,i=t,l=!0;if(e.sCount[i]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[i]-e.listIndent>=4&&e.sCount[i]<e.blkIndent)return!1;let p=!1;n&&e.parentType==="paragraph"&&e.sCount[i]>=e.blkIndent&&(p=!0);let c,x,h;if((h=Us(e,i))>=0){if(c=!0,r=e.bMarks[i]+e.tShift[i],x=Number(e.src.slice(r,h-1)),p&&x!==1)return!1}else if((h=Bs(e,i))>=0)c=!1;else return!1;if(p&&e.skipSpaces(h)>=e.eMarks[i])return!1;if(n)return!0;const g=e.src.charCodeAt(h-1),E=e.tokens.length;c?(o=e.push("ordered_list_open","ol",1),x!==1&&(o.attrs=[["start",x]])):o=e.push("bullet_list_open","ul",1);const A=[i,0];o.map=A,o.markup=String.fromCharCode(g);let w=!1;const C=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";i<u;){a=h,s=e.eMarks[i];const _=e.sCount[i]+h-(e.bMarks[i]+e.tShift[i]);let D=_;for(;a<s;){const $=e.src.charCodeAt(a);if($===9)D+=4-(D+e.bsCount[i])%4;else if($===32)D++;else break;a++}const N=a;let V;N>=s?V=1:V=D-_,V>4&&(V=1);const te=_+V;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(g);const ne=[i,0];o.map=ne,c&&(o.info=e.src.slice(r,h-1));const ee=e.tight,L=e.tShift[i],F=e.sCount[i],P=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=te,e.tight=!0,e.tShift[i]=N-e.bMarks[i],e.sCount[i]=D,N>=s&&e.isEmpty(i+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,i,u,!0),(!e.tight||w)&&(l=!1),w=e.line-i>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=P,e.tShift[i]=L,e.sCount[i]=F,e.tight=ee,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(g),i=e.line,ne[1]=i,i>=u||e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)break;let O=!1;for(let $=0,I=C.length;$<I;$++)if(C[$](e,i,u,!0)){O=!0;break}if(O)break;if(c){if(h=Us(e,i),h<0)break;r=e.bMarks[i]+e.tShift[i]}else if(h=Bs(e,i),h<0)break;if(g!==e.src.charCodeAt(h-1))break}return c?o=e.push("ordered_list_close","ol",-1):o=e.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(g),A[1]=i,e.line=i,e.parentType=y,l&&G0(e,E),!0}function Z0(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],r=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function o(C){const y=e.lineMax;if(C>=y||e.isEmpty(C))return null;let _=!1;if(e.sCount[C]-e.blkIndent>3&&(_=!0),e.sCount[C]<0&&(_=!0),!_){const V=e.md.block.ruler.getRules("reference"),te=e.parentType;e.parentType="reference";let ne=!1;for(let ee=0,L=V.length;ee<L;ee++)if(V[ee](e,C,y,!0)){ne=!0;break}if(e.parentType=te,ne)return null}const D=e.bMarks[C]+e.tShift[C],N=e.eMarks[C];return e.src.slice(D,N+1)}let i=e.src.slice(s,a+1);a=i.length;let l=-1;for(s=1;s<a;s++){const C=i.charCodeAt(s);if(C===91)return!1;if(C===93){l=s;break}else if(C===10){const y=o(r);y!==null&&(i+=y,a=i.length,r++)}else if(C===92&&(s++,s<a&&i.charCodeAt(s)===10)){const y=o(r);y!==null&&(i+=y,a=i.length,r++)}}if(l<0||i.charCodeAt(l+1)!==58)return!1;for(s=l+2;s<a;s++){const C=i.charCodeAt(s);if(C===10){const y=o(r);y!==null&&(i+=y,a=i.length,r++)}else if(!me(C))break}const p=e.md.helpers.parseLinkDestination(i,s,a);if(!p.ok)return!1;const c=e.md.normalizeLink(p.str);if(!e.md.validateLink(c))return!1;s=p.pos;const x=s,h=r,g=s;for(;s<a;s++){const C=i.charCodeAt(s);if(C===10){const y=o(r);y!==null&&(i+=y,a=i.length,r++)}else if(!me(C))break}let E=e.md.helpers.parseLinkTitle(i,s,a);for(;E.can_continue;){const C=o(r);if(C===null)break;i+=C,s=a,a=i.length,r++,E=e.md.helpers.parseLinkTitle(i,s,a,E)}let A;for(s<a&&g!==s&&E.ok?(A=E.str,s=E.pos):(A="",s=x,r=h);s<a;){const C=i.charCodeAt(s);if(!me(C))break;s++}if(s<a&&i.charCodeAt(s)!==10&&A)for(A="",s=x,r=h;s<a;){const C=i.charCodeAt(s);if(!me(C))break;s++}if(s<a&&i.charCodeAt(s)!==10)return!1;const w=Gu(i.slice(1,l));return w?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:A,href:c}),e.line=r),!0):!1}const X0=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Y0="[a-zA-Z_:][a-zA-Z0-9:._-]*",J0="[^\"'=<>`\\x00-\\x20]+",Q0="'[^']*'",ed='"[^"]*"',td="(?:"+J0+"|"+Q0+"|"+ed+")",ud="(?:\\s+"+Y0+"(?:\\s*=\\s*"+td+")?)",Va="<[A-Za-z][A-Za-z0-9\\-]*"+ud+"*\\s*\\/?>",Ga="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",nd="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",sd="<[?][\\s\\S]*?[?]>",ad="<![A-Za-z][^>]*>",rd="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",od=new RegExp("^(?:"+Va+"|"+Ga+"|"+nd+"|"+sd+"|"+ad+"|"+rd+")"),id=new RegExp("^(?:"+Va+"|"+Ga+")"),Ft=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+X0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(id.source+"\\s*$"),/^$/,!1]];function ld(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,a),o=0;for(;o<Ft.length&&!Ft[o][0].test(r);o++);if(o===Ft.length)return!1;if(n)return Ft[o][2];let i=t+1;const l=Ft[o][1].test("");if(!Ft[o][1].test(r)){for(;i<u&&!(e.sCount[i]<e.blkIndent&&(l||!e.isEmpty(i)));i++)if(s=e.bMarks[i]+e.tShift[i],a=e.eMarks[i],r=e.src.slice(s,a),Ft[o][1].test(r)){r.length!==0&&i++;break}}e.line=i;const p=e.push("html_block","",0);return p.map=[t,i],p.content=e.getLines(t,i,e.blkIndent,!0),!0}function cd(e,t,u,n){let s=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.src.charCodeAt(s);if(r!==35||s>=a)return!1;let o=1;for(r=e.src.charCodeAt(++s);r===35&&s<a&&o<=6;)o++,r=e.src.charCodeAt(++s);if(o>6||s<a&&!me(r))return!1;if(n)return!0;a=e.skipSpacesBack(a,s);const i=e.skipCharsBack(a,35,s);i>s&&me(e.src.charCodeAt(i-1))&&(a=i),e.line=t+1;const l=e.push("heading_open","h"+String(o),1);l.markup="########".slice(0,o),l.map=[t,e.line];const p=e.push("inline","",0);p.content=Ku(e.src.slice(s,a)),p.map=[t,e.line],p.children=[];const c=e.push("heading_close","h"+String(o),-1);return c.markup="########".slice(0,o),!0}function dd(e,t,u){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const s=e.parentType;e.parentType="paragraph";let a=0,r,o=t+1;for(;o<u&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]>=e.blkIndent){let h=e.bMarks[o]+e.tShift[o];const g=e.eMarks[o];if(h<g&&(r=e.src.charCodeAt(h),(r===45||r===61)&&(h=e.skipChars(h,r),h=e.skipSpaces(h),h>=g))){a=r===61?1:2;break}}if(e.sCount[o]<0)continue;let x=!1;for(let h=0,g=n.length;h<g;h++)if(n[h](e,o,u,!0)){x=!0;break}if(x)break}if(!a)return e.parentType=s,!1;const i=Ku(e.getLines(t,o,e.blkIndent,!1));e.line=o+1;const l=e.push("heading_open","h"+String(a),1);l.markup=String.fromCharCode(r),l.map=[t,e.line];const p=e.push("inline","",0);p.content=i,p.map=[t,e.line-1],p.children=[];const c=e.push("heading_close","h"+String(a),-1);return c.markup=String.fromCharCode(r),e.parentType=s,!0}function fd(e,t,u){const n=e.md.block.ruler.getRules("paragraph"),s=e.parentType;let a=t+1;for(e.parentType="paragraph";a<u&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let l=!1;for(let p=0,c=n.length;p<c;p++)if(n[p](e,a,u,!0)){l=!0;break}if(l)break}const r=Ku(e.getLines(t,a,e.blkIndent,!1));e.line=a;const o=e.push("paragraph_open","p",1);o.map=[t,e.line];const i=e.push("inline","",0);return i.content=r,i.map=[t,e.line],i.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}const zu=[["table",q0,["paragraph","reference"]],["code",j0],["fence",H0,["paragraph","reference","blockquote","list"]],["blockquote",W0,["paragraph","reference","blockquote","list"]],["hr",V0,["paragraph","reference","blockquote","list"]],["list",K0,["paragraph","reference","blockquote"]],["reference",Z0],["html_block",ld,["paragraph","reference","blockquote"]],["heading",cd,["paragraph","reference","blockquote"]],["lheading",dd],["paragraph",fd]];function Zu(){this.ruler=new Pe;for(let e=0;e<zu.length;e++)this.ruler.push(zu[e][0],zu[e][1],{alt:(zu[e][2]||[]).slice()})}Zu.prototype.tokenize=function(e,t,u){const n=this.ruler.getRules(""),s=n.length,a=e.md.options.maxNesting;let r=t,o=!1;for(;r<u&&(e.line=r=e.skipEmptyLines(r),!(r>=u||e.sCount[r]<e.blkIndent));){if(e.level>=a){e.line=u;break}const i=e.line;let l=!1;for(let p=0;p<s;p++)if(l=n[p](e,r,u,!1),l){if(i>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!o,e.isEmpty(e.line-1)&&(o=!0),r=e.line,r<u&&e.isEmpty(r)&&(o=!0,r++,e.line=r)}};Zu.prototype.parse=function(e,t,u,n){if(!e)return;const s=new this.State(e,t,u,n);this.tokenize(s,s.line,s.lineMax)};Zu.prototype.State=ot;function Eu(e,t,u,n){this.src=e,this.env=u,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Eu.prototype.pushPending=function(){const e=new Ke("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Eu.prototype.push=function(e,t,u){this.pending&&this.pushPending();const n=new Ke(e,t,u);let s=null;return u<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,u>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n};Eu.prototype.scanDelims=function(e,t){const u=this.posMax,n=this.src.charCodeAt(e);let s;if(e===0)s=32;else if(e===1)s=this.src.charCodeAt(0),(s&63488)===55296&&(s=65533);else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){const A=this.src.charCodeAt(e-2);s=(A&64512)===55296?65536+(A-55296<<10)+(s-56320):65533}else(s&64512)===55296&&(s=65533);let a=e;for(;a<u&&this.src.charCodeAt(a)===n;)a++;const r=a-e;let o=a<u?this.src.charCodeAt(a):32;if((o&64512)===55296){const A=this.src.charCodeAt(a+1);o=(A&64512)===56320?65536+(o-55296<<10)+(A-56320):65533}else(o&64512)===56320&&(o=65533);const i=vu(s)||xu(s),l=vu(o)||xu(o),p=gu(s),c=gu(o),x=!c&&(!l||p||i),h=!p&&(!i||c||l);return{can_open:x&&(t||!h||i),can_close:h&&(t||!x||l),length:r}};Eu.prototype.Token=Ke;function pd(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function hd(e,t){let u=e.pos;for(;u<e.posMax&&!pd(e.src.charCodeAt(u));)u++;return u===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,u)),e.pos=u,!0)}const md=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function bd(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const u=e.pos,n=e.posMax;if(u+3>n||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const s=e.pending.match(md);if(!s)return!1;const a=s[1],r=e.md.linkify.matchAtStart(e.src.slice(u-a.length));if(!r)return!1;let o=r.url;if(o.length<=a.length)return!1;let i=o.length;for(;i>0&&o.charCodeAt(i-1)===42;)i--;i!==o.length&&(o=o.slice(0,i));const l=e.md.normalizeLink(o);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);const p=e.push("link_open","a",1);p.attrs=[["href",l]],p.markup="linkify",p.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(o);const x=e.push("link_close","a",-1);x.markup="linkify",x.info="auto"}return e.pos+=o.length-a.length,!0}function gd(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const n=e.pending.length-1,s=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let a=n-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u<s&&me(e.src.charCodeAt(u));)u++;return e.pos=u,!0}const Zn=[];for(let e=0;e<256;e++)Zn.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Zn[e.charCodeAt(0)]=1});function xd(e,t){let u=e.pos;const n=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=n))return!1;let s=e.src.charCodeAt(u);if(s===10){for(t||e.push("hardbreak","br",0),u++;u<n&&(s=e.src.charCodeAt(u),!!me(s));)u++;return e.pos=u,!0}let a=e.src[u];if(s>=55296&&s<=56319&&u+1<n){const o=e.src.charCodeAt(u+1);o>=56320&&o<=57343&&(a+=e.src[u+1],u++)}const r="\\"+a;if(!t){const o=e.push("text_special","",0);s<256&&Zn[s]!==0?o.content=a:o.content=r,o.markup=r,o.info="escape"}return e.pos=u+1,!0}function vd(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const s=u;u++;const a=e.posMax;for(;u<a&&e.src.charCodeAt(u)===96;)u++;const r=e.src.slice(s,u),o=r.length;if(e.backticksScanned&&(e.backticks[o]||0)<=s)return t||(e.pending+=r),e.pos+=o,!0;let i=u,l;for(;(l=e.src.indexOf("`",i))!==-1;){for(i=l+1;i<a&&e.src.charCodeAt(i)===96;)i++;const p=i-l;if(p===o){if(!t){const c=e.push("code_inline","code",0);c.markup=r,c.content=e.src.slice(u,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=i,!0}e.backticks[p]=l}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=o,!0}function yd(e,t){const u=e.pos,n=e.src.charCodeAt(u);if(t||n!==126)return!1;const s=e.scanDelims(e.pos,!0);let a=s.length;const r=String.fromCharCode(n);if(a<2)return!1;let o;a%2&&(o=e.push("text","",0),o.content=r,a--);for(let i=0;i<a;i+=2)o=e.push("text","",0),o.content=r+r,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function qs(e,t){let u;const n=[],s=t.length;for(let a=0;a<s;a++){const r=t[a];if(r.marker!==126||r.end===-1)continue;const o=t[r.end];u=e.tokens[r.token],u.type="s_open",u.tag="s",u.nesting=1,u.markup="~~",u.content="",u=e.tokens[o.token],u.type="s_close",u.tag="s",u.nesting=-1,u.markup="~~",u.content="",e.tokens[o.token-1].type==="text"&&e.tokens[o.token-1].content==="~"&&n.push(o.token-1)}for(;n.length;){const a=n.pop();let r=a+1;for(;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,a!==r&&(u=e.tokens[r],e.tokens[r]=e.tokens[a],e.tokens[a]=u)}}function kd(e){const t=e.tokens_meta,u=e.tokens_meta.length;qs(e,e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&qs(e,t[n].delimiters)}const Ka={tokenize:yd,postProcess:kd};function _d(e,t){const u=e.pos,n=e.src.charCodeAt(u);if(t||n!==95&&n!==42)return!1;const s=e.scanDelims(e.pos,n===42);for(let a=0;a<s.length;a++){const r=e.push("text","",0);r.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function js(e,t){const u=t.length;for(let n=u-1;n>=0;n--){const s=t[n];if(s.marker!==95&&s.marker!==42||s.end===-1)continue;const a=t[s.end],r=n>0&&t[n-1].end===s.end+1&&t[n-1].marker===s.marker&&t[n-1].token===s.token-1&&t[s.end+1].token===a.token+1,o=String.fromCharCode(s.marker),i=e.tokens[s.token];i.type=r?"strong_open":"em_open",i.tag=r?"strong":"em",i.nesting=1,i.markup=r?o+o:o,i.content="";const l=e.tokens[a.token];l.type=r?"strong_close":"em_close",l.tag=r?"strong":"em",l.nesting=-1,l.markup=r?o+o:o,l.content="",r&&(e.tokens[t[n-1].token].content="",e.tokens[t[s.end+1].token].content="",n--)}}function wd(e){const t=e.tokens_meta,u=e.tokens_meta.length;js(e,e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&js(e,t[n].delimiters)}const Za={tokenize:_d,postProcess:wd};function Ed(e,t){let u,n,s,a,r="",o="",i=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const p=e.pos,c=e.posMax,x=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let g=h+1;if(g<c&&e.src.charCodeAt(g)===40){for(l=!1,g++;g<c&&(u=e.src.charCodeAt(g),!(!me(u)&&u!==10));g++);if(g>=c)return!1;if(i=g,s=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),s.ok){for(r=e.md.normalizeLink(s.str),e.md.validateLink(r)?g=s.pos:r="",i=g;g<c&&(u=e.src.charCodeAt(g),!(!me(u)&&u!==10));g++);if(s=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<c&&i!==g&&s.ok)for(o=s.str,g=s.pos;g<c&&(u=e.src.charCodeAt(g),!(!me(u)&&u!==10));g++);}(g>=c||e.src.charCodeAt(g)!==41)&&(l=!0),g++}if(l){if(typeof e.env.references>"u")return!1;if(g<c&&e.src.charCodeAt(g)===91?(i=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?n=e.src.slice(i,g++):g=h+1):g=h+1,n||(n=e.src.slice(x,h)),a=e.env.references[Gu(n)],!a)return e.pos=p,!1;r=a.href,o=a.title}if(!t){e.pos=x,e.posMax=h;const E=e.push("link_open","a",1),A=[["href",r]];E.attrs=A,o&&A.push(["title",o]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=c,!0}function Ad(e,t){let u,n,s,a,r,o,i,l,p="";const c=e.pos,x=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(a=g+1,a<x&&e.src.charCodeAt(a)===40){for(a++;a<x&&(u=e.src.charCodeAt(a),!(!me(u)&&u!==10));a++);if(a>=x)return!1;for(l=a,o=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),o.ok&&(p=e.md.normalizeLink(o.str),e.md.validateLink(p)?a=o.pos:p=""),l=a;a<x&&(u=e.src.charCodeAt(a),!(!me(u)&&u!==10));a++);if(o=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<x&&l!==a&&o.ok)for(i=o.str,a=o.pos;a<x&&(u=e.src.charCodeAt(a),!(!me(u)&&u!==10));a++);else i="";if(a>=x||e.src.charCodeAt(a)!==41)return e.pos=c,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a<x&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?s=e.src.slice(l,a++):a=g+1):a=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[Gu(s)],!r)return e.pos=c,!1;p=r.href,i=r.title}if(!t){n=e.src.slice(h,g);const E=[];e.md.inline.parse(n,e.md,e.env,E);const A=e.push("image","img",0),w=[["src",p],["alt",""]];A.attrs=w,A.children=E,A.content=n,i&&w.push(["title",i])}return e.pos=a,e.posMax=x,!0}const $d=/^([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])?)*)$/,Cd=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Dd(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const n=e.pos,s=e.posMax;for(;;){if(++u>=s)return!1;const r=e.src.charCodeAt(u);if(r===60)return!1;if(r===62)break}const a=e.src.slice(n+1,u);if(Cd.test(a)){const r=e.md.normalizeLink(a);if(!e.md.validateLink(r))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",r]],o.markup="autolink",o.info="auto";const i=e.push("text","",0);i.content=e.md.normalizeLinkText(a);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=a.length+2,!0}if($d.test(a)){const r=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(r))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",r]],o.markup="autolink",o.info="auto";const i=e.push("text","",0);i.content=e.md.normalizeLinkText(a);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=a.length+2,!0}return!1}function Td(e){return/^<a[>\s]/i.test(e)}function Sd(e){return/^<\/a\s*>/i.test(e)}function Fd(e){const t=e|32;return t>=97&&t<=122}function Id(e,t){if(!e.md.options.html)return!1;const u=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=u)return!1;const s=e.src.charCodeAt(n+1);if(s!==33&&s!==63&&s!==47&&!Fd(s))return!1;const a=e.src.slice(n).match(od);if(!a)return!1;if(!t){const r=e.push("html_inline","",0);r.content=a[0],Td(r.content)&&e.linkLevel++,Sd(r.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}const Md=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,zd=/^&([a-z][a-z0-9]{1,31});/i;function Ld(e,t){const u=e.pos,n=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=n)return!1;if(e.src.charCodeAt(u+1)===35){const a=e.src.slice(u).match(Md);if(a){if(!t){const r=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),o=e.push("text_special","",0);o.content=Gn(r)?bu(r):bu(65533),o.markup=a[0],o.info="entity"}return e.pos+=a[0].length,!0}}else{const a=e.src.slice(u).match(zd);if(a){const r=e0(a[0]);if(r!==a[0]){if(!t){const o=e.push("text_special","",0);o.content=r,o.markup=a[0],o.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function Hs(e){const t={},u=e.length;if(!u)return;let n=0,s=-2;const a=[];for(let r=0;r<u;r++){const o=e[r];if(a.push(0),(e[n].marker!==o.marker||s!==o.token-1)&&(n=r),s=o.token,o.length=o.length||0,!o.close)continue;t.hasOwnProperty(o.marker)||(t[o.marker]=[-1,-1,-1,-1,-1,-1]);const i=t[o.marker][(o.open?3:0)+o.length%3];let l=n-a[n]-1,p=l;for(;l>i;l-=a[l]+1){const c=e[l];if(c.marker===o.marker&&c.open&&c.end<0){let x=!1;if((c.close||o.open)&&(c.length+o.length)%3===0&&(c.length%3!==0||o.length%3!==0)&&(x=!0),!x){const h=l>0&&!e[l-1].open?a[l-1]+1:0;a[r]=r-l+h,a[l]=h,o.open=!1,c.end=r,c.close=!1,p=-1,s=-2;break}}}p!==-1&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=p)}}function Od(e){const t=e.tokens_meta,u=e.tokens_meta.length;Hs(e.delimiters);for(let n=0;n<u;n++)t[n]&&t[n].delimiters&&Hs(t[n].delimiters)}function Rd(e){let t,u,n=0;const s=e.tokens,a=e.tokens.length;for(t=u=0;t<a;t++)s[t].nesting<0&&n--,s[t].level=n,s[t].nesting>0&&n++,s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==u&&(s[u]=s[t]),u++);t!==u&&(s.length=u)}const kn=[["text",hd],["linkify",bd],["newline",gd],["escape",xd],["backticks",vd],["strikethrough",Ka.tokenize],["emphasis",Za.tokenize],["link",Ed],["image",Ad],["autolink",Dd],["html_inline",Id],["entity",Ld]],_n=[["balance_pairs",Od],["strikethrough",Ka.postProcess],["emphasis",Za.postProcess],["fragments_join",Rd]];function Au(){this.ruler=new Pe;for(let e=0;e<kn.length;e++)this.ruler.push(kn[e][0],kn[e][1]);this.ruler2=new Pe;for(let e=0;e<_n.length;e++)this.ruler2.push(_n[e][0],_n[e][1])}Au.prototype.skipToken=function(e){const t=e.pos,u=this.ruler.getRules(""),n=u.length,s=e.md.options.maxNesting,a=e.cache;if(typeof a[t]<"u"){e.pos=a[t];return}let r=!1;if(e.level<s){for(let o=0;o<n;o++)if(e.level++,r=u[o](e,!0),e.level--,r){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;r||e.pos++,a[t]=e.pos};Au.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,n=e.posMax,s=e.md.options.maxNesting;for(;e.pos<n;){const a=e.pos;let r=!1;if(e.level<s){for(let o=0;o<u;o++)if(r=t[o](e,!1),r){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Au.prototype.parse=function(e,t,u,n){const s=new this.State(e,t,u,n);this.tokenize(s);const a=this.ruler2.getRules(""),r=a.length;for(let o=0;o<r;o++)a[o](s)};Au.prototype.State=Eu;function Nd(e){const t={};e=e||{},t.src_Any=La.source,t.src_Cc=Oa.source,t.src_Z=Na.source,t.src_P=Wn.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const u="[><|]";return t.src_pseudo_letter="(?:(?!"+u+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+u+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+u+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Rn(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(n){e[n]=u[n]})}),e}function Xu(e){return Object.prototype.toString.call(e)}function Pd(e){return Xu(e)==="[object String]"}function Bd(e){return Xu(e)==="[object Object]"}function Ud(e){return Xu(e)==="[object RegExp]"}function Ws(e){return Xu(e)==="[object Function]"}function qd(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Xa={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function jd(e){return Object.keys(e||{}).reduce(function(t,u){return t||Xa.hasOwnProperty(u)},!1)}const Hd={"http:":{validate:function(e,t,u){const n=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(n)?n.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const n=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const n=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(n)?n.match(u.re.mailto)[0].length:0}}},Wd="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Vd="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Gd(e){return function(t,u){const n=t.slice(u);return e.test(n)?n.match(e)[0].length:0}}function Vs(){return function(e,t){t.normalize(e)}}function Uu(e){const t=e.re=Nd(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(Wd),u.push(t.src_xn),t.src_tlds=u.join("|");function n(o){return o.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function a(o,i){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+i)}Object.keys(e.__schemas__).forEach(function(o){const i=e.__schemas__[o];if(i===null)return;const l={validate:null,link:null};if(e.__compiled__[o]=l,Bd(i)){Ud(i.validate)?l.validate=Gd(i.validate):Ws(i.validate)?l.validate=i.validate:a(o,i),Ws(i.normalize)?l.normalize=i.normalize:i.normalize?a(o,i):l.normalize=Vs();return}if(Pd(i)){s.push(o);return}a(o,i)}),s.forEach(function(o){e.__compiled__[e.__schemas__[o]]&&(e.__compiled__[o].validate=e.__compiled__[e.__schemas__[o]].validate,e.__compiled__[o].normalize=e.__compiled__[e.__schemas__[o]].normalize)}),e.__compiled__[""]={validate:null,normalize:Vs()};const r=Object.keys(e.__compiled__).filter(function(o){return o.length>0&&e.__compiled__[o]}).map(qd).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+r+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+r+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function Ya(e,t,u,n){const s=e.slice(u,n);this.schema=t.toLowerCase(),this.index=u,this.lastIndex=n,this.raw=s,this.text=s,this.url=s}function Ue(e,t){if(!(this instanceof Ue))return new Ue(e,t);t||jd(e)&&(t=e,e={}),this.__opts__=Rn({},Xa,t),this.__schemas__=Rn({},Hd,e),this.__compiled__={},this.__tlds__=Vd,this.__tlds_replaced__=!1,this.re={},Uu(this)}Ue.prototype.add=function(t,u){return this.__schemas__[t]=u,Uu(this),this};Ue.prototype.set=function(t){return this.__opts__=Rn(this.__opts__,t),this};Ue.prototype.test=function(t){if(!t.length)return!1;let u,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(u=n.exec(t))!==null;)if(this.testSchemaAt(t,u[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Ue.prototype.pretest=function(t){return this.re.pretest.test(t)};Ue.prototype.testSchemaAt=function(t,u,n){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,n,this):0};Ue.prototype.match=function(t){const u=[],n=[],s=[],a=[];let r,o,i;function l(x,h){return x?h?x.index!==h.index?x.index<h.index?x:h:x.lastIndex>=h.lastIndex?x:h:x:h}if(!t.length)return null;if(this.re.schema_test.test(t))for(i=this.re.schema_search,i.lastIndex=0;(r=i.exec(t))!==null;)o=this.testSchemaAt(t,r[2],i.lastIndex),o&&n.push({schema:r[2],index:r.index+r[1].length,lastIndex:r.index+r[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(i=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,i.lastIndex=0;(r=i.exec(t))!==null;)s.push({schema:"",index:r.index+r[1].length,lastIndex:r.index+r[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(i=this.re.email_fuzzy_global,i.lastIndex=0;(r=i.exec(t))!==null;)a.push({schema:"mailto:",index:r.index+r[1].length,lastIndex:r.index+r[0].length});const p=[0,0,0];let c=0;for(;;){const x=[n[p[0]],a[p[1]],s[p[2]]],h=l(l(x[0],x[1]),x[2]);if(!h)break;if(h===x[0]?p[0]++:h===x[1]?p[1]++:p[2]++,h.index<c)continue;const g=new Ya(t,h.schema,h.index,h.lastIndex);this.__compiled__[g.schema].normalize(g,this),u.push(g),c=h.lastIndex}return u.length?u:null};Ue.prototype.matchAtStart=function(t){if(!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const n=this.testSchemaAt(t,u[2],u[0].length);if(!n)return null;const s=new Ya(t,u[2],u.index+u[1].length,u.index+u[0].length+n);return this.__compiled__[s.schema].normalize(s,this),s};Ue.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,s,a){return n!==a[s-1]}).reverse(),Uu(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Uu(this),this)};Ue.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Ue.prototype.onCompile=function(){};const Kt=2147483647,tt=36,Xn=1,yu=26,Kd=38,Zd=700,Ja=72,Qa=128,er="-",Xd=/^xn--/,Yd=/[^\0-\x7F]/,Jd=/[\x2E\u3002\uFF0E\uFF61]/g,Qd={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},wn=tt-Xn,ut=Math.floor,En=String.fromCharCode;function xt(e){throw new RangeError(Qd[e])}function ef(e,t){const u=[];let n=e.length;for(;n--;)u[n]=t(e[n]);return u}function tr(e,t){const u=e.split("@");let n="";u.length>1&&(n=u[0]+"@",e=u[1]),e=e.replace(Jd,".");const s=e.split("."),a=ef(s,t).join(".");return n+a}function ur(e){const t=[];let u=0;const n=e.length;for(;u<n;){const s=e.charCodeAt(u++);if(s>=55296&&s<=56319&&u<n){const a=e.charCodeAt(u++);(a&64512)==56320?t.push(((s&1023)<<10)+(a&1023)+65536):(t.push(s),u--)}else t.push(s)}return t}const tf=e=>String.fromCodePoint(...e),uf=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:tt},Gs=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},nr=function(e,t,u){let n=0;for(e=u?ut(e/Zd):e>>1,e+=ut(e/t);e>wn*yu>>1;n+=tt)e=ut(e/wn);return ut(n+(wn+1)*e/(e+Kd))},sr=function(e){const t=[],u=e.length;let n=0,s=Qa,a=Ja,r=e.lastIndexOf(er);r<0&&(r=0);for(let o=0;o<r;++o)e.charCodeAt(o)>=128&&xt("not-basic"),t.push(e.charCodeAt(o));for(let o=r>0?r+1:0;o<u;){const i=n;for(let p=1,c=tt;;c+=tt){o>=u&&xt("invalid-input");const x=uf(e.charCodeAt(o++));x>=tt&&xt("invalid-input"),x>ut((Kt-n)/p)&&xt("overflow"),n+=x*p;const h=c<=a?Xn:c>=a+yu?yu:c-a;if(x<h)break;const g=tt-h;p>ut(Kt/g)&&xt("overflow"),p*=g}const l=t.length+1;a=nr(n-i,l,i==0),ut(n/l)>Kt-s&&xt("overflow"),s+=ut(n/l),n%=l,t.splice(n++,0,s)}return String.fromCodePoint(...t)},ar=function(e){const t=[];e=ur(e);const u=e.length;let n=Qa,s=0,a=Ja;for(const i of e)i<128&&t.push(En(i));const r=t.length;let o=r;for(r&&t.push(er);o<u;){let i=Kt;for(const p of e)p>=n&&p<i&&(i=p);const l=o+1;i-n>ut((Kt-s)/l)&&xt("overflow"),s+=(i-n)*l,n=i;for(const p of e)if(p<n&&++s>Kt&&xt("overflow"),p===n){let c=s;for(let x=tt;;x+=tt){const h=x<=a?Xn:x>=a+yu?yu:x-a;if(c<h)break;const g=c-h,E=tt-h;t.push(En(Gs(h+g%E,0))),c=ut(g/E)}t.push(En(Gs(c,0))),a=nr(s,l,o===r),s=0,++o}++s,++n}return t.join("")},nf=function(e){return tr(e,function(t){return Xd.test(t)?sr(t.slice(4).toLowerCase()):t})},sf=function(e){return tr(e,function(t){return Yd.test(t)?"xn--"+ar(t):t})},rr={version:"2.3.1",ucs2:{decode:ur,encode:tf},decode:sr,encode:ar,toASCII:sf,toUnicode:nf},af={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},rf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},of={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},lf={default:af,zero:rf,commonmark:of},cf=/^(vbscript|javascript|file|data):/,df=/^data:image\/(gif|png|jpeg|webp);/;function ff(e){const t=e.trim().toLowerCase();return cf.test(t)?df.test(t):!0}const or=["http:","https:","mailto:"];function pf(e){const t=Hn(e,!0);if(t.hostname&&(!t.protocol||or.indexOf(t.protocol)>=0))try{t.hostname=rr.toASCII(t.hostname)}catch{}return wu(jn(t))}function hf(e){const t=Hn(e,!0);if(t.hostname&&(!t.protocol||or.indexOf(t.protocol)>=0))try{t.hostname=rr.toUnicode(t.hostname)}catch{}return Yt(jn(t),Yt.defaultChars+"%")}function He(e,t){if(!(this instanceof He))return new He(e,t);t||Vn(e)||(t=e||{},e="default"),this.inline=new Au,this.block=new Zu,this.core=new Kn,this.renderer=new nu,this.linkify=new Ue,this.validateLink=ff,this.normalizeLink=pf,this.normalizeLinkText=hf,this.utils=b0,this.helpers=Vu({},y0),this.options={},this.configure(e),t&&this.set(t)}He.prototype.set=function(e){return Vu(this.options,e),this};He.prototype.configure=function(e){const t=this;if(Vn(e)){const u=e;if(e=lf[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};He.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){u=u.concat(this[s].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(s){return u.indexOf(s)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};He.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){u=u.concat(this[s].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(s){return u.indexOf(s)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};He.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};He.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};He.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};He.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};He.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.4.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.10/LICENSE */function Ks(e,t){(t==null||t>e.length)&&(t=e.length);for(var u=0,n=Array(t);u<t;u++)n[u]=e[u];return n}function mf(e){if(Array.isArray(e))return e}function bf(e,t){var u=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(u!=null){var n,s,a,r,o=[],i=!0,l=!1;try{if(a=(u=u.call(e)).next,t!==0)for(;!(i=(n=a.call(u)).done)&&(o.push(n.value),o.length!==t);i=!0);}catch(p){l=!0,s=p}finally{try{if(!i&&u.return!=null&&(r=u.return(),Object(r)!==r))return}finally{if(l)throw s}}return o}}function gf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
258
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xf(e,t){return mf(e)||bf(e,t)||vf(e,t)||gf()}function vf(e,t){if(e){if(typeof e=="string")return Ks(e,t);var u={}.toString.call(e).slice(8,-1);return u==="Object"&&e.constructor&&(u=e.constructor.name),u==="Map"||u==="Set"?Array.from(e):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Ks(e,t):void 0}}const ir=Object.entries,Zs=Object.setPrototypeOf,yf=Object.isFrozen,kf=Object.getPrototypeOf,_f=Object.getOwnPropertyDescriptor;let Se=Object.freeze,Fe=Object.seal,Gt=Object.create,lr=typeof Reflect<"u"&&Reflect,Nn=lr.apply,Pn=lr.construct;Se||(Se=function(t){return t});Fe||(Fe=function(t){return t});Nn||(Nn=function(t,u){for(var n=arguments.length,s=new Array(n>2?n-2:0),a=2;a<n;a++)s[a-2]=arguments[a];return t.apply(u,s)});Pn||(Pn=function(t){for(var u=arguments.length,n=new Array(u>1?u-1:0),s=1;s<u;s++)n[s-1]=arguments[s];return new t(...n)});const iu=we(Array.prototype.forEach),wf=we(Array.prototype.lastIndexOf),Xs=we(Array.prototype.pop),jt=we(Array.prototype.push),Ef=we(Array.prototype.splice),vt=Array.isArray,du=we(String.prototype.toLowerCase),An=we(String.prototype.toString),Ys=we(String.prototype.match),lu=we(String.prototype.replace),Js=we(String.prototype.indexOf),Af=we(String.prototype.trim),$f=we(Number.prototype.toString),Cf=we(Boolean.prototype.toString),Qs=typeof BigInt>"u"?null:we(BigInt.prototype.toString),ea=typeof Symbol>"u"?null:we(Symbol.prototype.toString),Oe=we(Object.prototype.hasOwnProperty),cu=we(Object.prototype.toString),Te=we(RegExp.prototype.test),It=Df(TypeError);function we(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var u=arguments.length,n=new Array(u>1?u-1:0),s=1;s<u;s++)n[s-1]=arguments[s];return Nn(e,t,n)}}function Df(e){return function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];return Pn(e,u)}}function ce(e,t){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:du;if(Zs&&Zs(e,null),!vt(t))return e;let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const a=u(s);a!==s&&(yf(t)||(t[n]=a),s=a)}e[s]=!0}return e}function Tf(e){for(let t=0;t<e.length;t++)Oe(e,t)||(e[t]=null);return e}function Le(e){const t=Gt(null);for(const n of ir(e)){var u=xf(n,2);const s=u[0],a=u[1];Oe(e,s)&&(vt(a)?t[s]=Tf(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Le(a):t[s]=a)}return t}function Sf(e){switch(typeof e){case"string":return e;case"number":return $f(e);case"boolean":return Cf(e);case"bigint":return Qs?Qs(e):"0";case"symbol":return ea?ea(e):"Symbol()";case"undefined":return cu(e);case"function":case"object":{if(e===null)return cu(e);const t=e,u=Qe(t,"toString");if(typeof u=="function"){const n=u(t);return typeof n=="string"?n:cu(n)}return cu(e)}default:return cu(e)}}function Qe(e,t){for(;e!==null;){const n=_f(e,t);if(n){if(n.get)return we(n.get);if(typeof n.value=="function")return we(n.value)}e=kf(e)}function u(){return null}return u}function Ff(e){try{return Te(e,""),!0}catch{return!1}}const ta=Se(["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"]),$n=Se(["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"]),Cn=Se(["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"]),If=Se(["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"]),Dn=Se(["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"]),Mf=Se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ua=Se(["#text"]),na=Se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Tn=Se(["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"]),sa=Se(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Lu=Se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zf=Fe(/{{[\w\W]*|^[\w\W]*}}/g),Lf=Fe(/<%[\w\W]*|^[\w\W]*%>/g),Of=Fe(/\${[\w\W]*/g),Rf=Fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nf=Fe(/^aria-[\-\w]+$/),aa=Fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pf=Fe(/^(?:\w+script|data):/i),Bf=Fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Uf=Fe(/^html$/i),qf=Fe(/^[a-z][.\w]*(-[.\w]+)+$/i),ra=Fe(/<[/\w!]/g),jf=Fe(/<[/\w]/g),Hf=Fe(/<\/no(script|embed|frames)/i),Wf=Fe(/\/>/i),Je={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Vf=function(){return typeof window>"u"?null:window},Gf=function(t,u){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";u&&u.hasAttribute(s)&&(n=u.getAttribute(s));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},oa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},bt=function(t,u,n,s){return Oe(t,u)&&vt(t[u])?ce(s.base?Le(s.base):{},t[u],s.transform):n};function cr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vf();const t=j=>cr(j);if(t.version="3.4.10",t.removed=[],!e||!e.document||e.document.nodeType!==Je.document||!e.Element)return t.isSupported=!1,t;let u=e.document;const n=u,s=n.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,r=e.Node,o=e.Element,i=e.NodeFilter,l=e.NamedNodeMap;l===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,c=e.trustedTypes,x=o.prototype,h=Qe(x,"cloneNode"),g=Qe(x,"remove"),E=Qe(x,"nextSibling"),A=Qe(x,"childNodes"),w=Qe(x,"parentNode"),C=Qe(x,"shadowRoot"),y=Qe(x,"attributes"),_=r&&r.prototype?Qe(r.prototype,"nodeType"):null,D=r&&r.prototype?Qe(r.prototype,"nodeName"):null;if(typeof a=="function"){const j=u.createElement("template");j.content&&j.content.ownerDocument&&(u=j.content.ownerDocument)}let N,V="",te,ne=!1,ee=0;const L=function(){if(ee>0)throw It('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(m){L(),ee++;try{return N.createHTML(m)}finally{ee--}},P=function(m){L(),ee++;try{return N.createScriptURL(m)}finally{ee--}},O=function(){return ne||(te=Gf(c,s),ne=!0),te},$=u,I=$.implementation,R=$.createNodeIterator,fe=$.createDocumentFragment,H=$.getElementsByTagName,be=n.importNode;let ve=oa();t.isSupported=typeof ir=="function"&&typeof w=="function"&&I&&I.createHTMLDocument!==void 0;const Rt=zf,Y=Lf,U=Of,se=Rf,oe=Nf,Ee=Pf,Ie=Bf,Ct=qf;let it=aa,z=null;const K=ce({},[...ta,...$n,...Cn,...Dn,...ua]);let W=null;const ge=ce({},[...na,...Tn,...sa,...Lu]);let ie=Object.seal(Gt(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}})),Be=null,We=null;const Ze=Object.seal(Gt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ju=!0,Ve=!0,lt=!1,Qu=!0,ht=!1,su=!0,Dt=!1,en=!1,tn=!1,Nt=!1,$u=!1,Cu=!1,ts=!0,us=!1;const ns="user-content-";let un=!0,nn=!1,Pt={},Xe=null;const sn=ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ss=null;const as=ce({},["audio","video","img","source","image","track"]);let an=null;const rs=ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Du="http://www.w3.org/1998/Math/MathML",Tu="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml";let Bt=Ye,rn=!1,on=null;const Fr=ce({},[Du,Tu,Ye],An),os=Se(["mi","mo","mn","ms","mtext"]);let ln=ce({},os);const is=Se(["annotation-xml"]);let cn=ce({},is);const Ir=ce({},["title","style","font","a","script"]);let au=null;const Mr=["application/xhtml+xml","text/html"],zr="text/html";let ye=null,Ut=null;const Lr=u.createElement("form"),ls=function(m){return m instanceof RegExp||m instanceof Function},dn=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ut&&Ut===m)return;(!m||typeof m!="object")&&(m={}),m=Le(m),au=Mr.indexOf(m.PARSER_MEDIA_TYPE)===-1?zr:m.PARSER_MEDIA_TYPE,ye=au==="application/xhtml+xml"?An:du,z=bt(m,"ALLOWED_TAGS",K,{transform:ye}),W=bt(m,"ALLOWED_ATTR",ge,{transform:ye}),on=bt(m,"ALLOWED_NAMESPACES",Fr,{transform:An}),an=bt(m,"ADD_URI_SAFE_ATTR",rs,{transform:ye,base:rs}),ss=bt(m,"ADD_DATA_URI_TAGS",as,{transform:ye,base:as}),Xe=bt(m,"FORBID_CONTENTS",sn,{transform:ye}),Be=bt(m,"FORBID_TAGS",Le({}),{transform:ye}),We=bt(m,"FORBID_ATTR",Le({}),{transform:ye}),Pt=Oe(m,"USE_PROFILES")?m.USE_PROFILES&&typeof m.USE_PROFILES=="object"?Le(m.USE_PROFILES):m.USE_PROFILES:!1,Ju=m.ALLOW_ARIA_ATTR!==!1,Ve=m.ALLOW_DATA_ATTR!==!1,lt=m.ALLOW_UNKNOWN_PROTOCOLS||!1,Qu=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=m.SAFE_FOR_TEMPLATES||!1,su=m.SAFE_FOR_XML!==!1,Dt=m.WHOLE_DOCUMENT||!1,Nt=m.RETURN_DOM||!1,$u=m.RETURN_DOM_FRAGMENT||!1,Cu=m.RETURN_TRUSTED_TYPE||!1,tn=m.FORCE_BODY||!1,ts=m.SANITIZE_DOM!==!1,us=m.SANITIZE_NAMED_PROPS||!1,un=m.KEEP_CONTENT!==!1,nn=m.IN_PLACE||!1,it=Ff(m.ALLOWED_URI_REGEXP)?m.ALLOWED_URI_REGEXP:aa,Bt=typeof m.NAMESPACE=="string"?m.NAMESPACE:Ye,ln=Oe(m,"MATHML_TEXT_INTEGRATION_POINTS")&&m.MATHML_TEXT_INTEGRATION_POINTS&&typeof m.MATHML_TEXT_INTEGRATION_POINTS=="object"?Le(m.MATHML_TEXT_INTEGRATION_POINTS):ce({},os),cn=Oe(m,"HTML_INTEGRATION_POINTS")&&m.HTML_INTEGRATION_POINTS&&typeof m.HTML_INTEGRATION_POINTS=="object"?Le(m.HTML_INTEGRATION_POINTS):ce({},is);const T=Oe(m,"CUSTOM_ELEMENT_HANDLING")&&m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING=="object"?Le(m.CUSTOM_ELEMENT_HANDLING):Gt(null);if(ie=Gt(null),Oe(T,"tagNameCheck")&&ls(T.tagNameCheck)&&(ie.tagNameCheck=T.tagNameCheck),Oe(T,"attributeNameCheck")&&ls(T.attributeNameCheck)&&(ie.attributeNameCheck=T.attributeNameCheck),Oe(T,"allowCustomizedBuiltInElements")&&typeof T.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=T.allowCustomizedBuiltInElements),Fe(ie),ht&&(Ve=!1),$u&&(Nt=!0),Pt&&(z=ce({},ua),W=Gt(null),Pt.html===!0&&(ce(z,ta),ce(W,na)),Pt.svg===!0&&(ce(z,$n),ce(W,Tn),ce(W,Lu)),Pt.svgFilters===!0&&(ce(z,Cn),ce(W,Tn),ce(W,Lu)),Pt.mathMl===!0&&(ce(z,Dn),ce(W,sa),ce(W,Lu))),Ze.tagCheck=null,Ze.attributeCheck=null,Oe(m,"ADD_TAGS")&&(typeof m.ADD_TAGS=="function"?Ze.tagCheck=m.ADD_TAGS:vt(m.ADD_TAGS)&&(z===K&&(z=Le(z)),ce(z,m.ADD_TAGS,ye))),Oe(m,"ADD_ATTR")&&(typeof m.ADD_ATTR=="function"?Ze.attributeCheck=m.ADD_ATTR:vt(m.ADD_ATTR)&&(W===ge&&(W=Le(W)),ce(W,m.ADD_ATTR,ye))),Oe(m,"ADD_URI_SAFE_ATTR")&&vt(m.ADD_URI_SAFE_ATTR)&&ce(an,m.ADD_URI_SAFE_ATTR,ye),Oe(m,"FORBID_CONTENTS")&&vt(m.FORBID_CONTENTS)&&(Xe===sn&&(Xe=Le(Xe)),ce(Xe,m.FORBID_CONTENTS,ye)),Oe(m,"ADD_FORBID_CONTENTS")&&vt(m.ADD_FORBID_CONTENTS)&&(Xe===sn&&(Xe=Le(Xe)),ce(Xe,m.ADD_FORBID_CONTENTS,ye)),un&&(z["#text"]=!0),Dt&&ce(z,["html","head","body"]),z.table&&(ce(z,["tbody"]),delete Be.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const q=N;N=m.TRUSTED_TYPES_POLICY;try{V=F("")}catch(Q){throw N=q,Q}}else m.TRUSTED_TYPES_POLICY===null?(N=void 0,V=""):(N===void 0&&(N=O()),N&&typeof V=="string"&&(V=F("")));(ve.uponSanitizeElement.length>0||ve.uponSanitizeAttribute.length>0)&&z===K&&(z=Le(z)),ve.uponSanitizeAttribute.length>0&&W===ge&&(W=Le(W)),Se&&Se(m),Ut=m},cs=ce({},[...$n,...Cn,...If]),ds=ce({},[...Dn,...Mf]),Or=function(m,T,q){return T.namespaceURI===Ye?m==="svg":T.namespaceURI===Du?m==="svg"&&(q==="annotation-xml"||ln[q]):!!cs[m]},Rr=function(m,T,q){return T.namespaceURI===Ye?m==="math":T.namespaceURI===Tu?m==="math"&&cn[q]:!!ds[m]},Nr=function(m,T,q){return T.namespaceURI===Tu&&!cn[q]||T.namespaceURI===Du&&!ln[q]?!1:!ds[m]&&(Ir[m]||!cs[m])},Pr=function(m){let T=w(m);(!T||!T.tagName)&&(T={namespaceURI:Bt,tagName:"template"});const q=du(m.tagName),Q=du(T.tagName);return on[m.namespaceURI]?m.namespaceURI===Tu?Or(q,T,Q):m.namespaceURI===Du?Rr(q,T,Q):m.namespaceURI===Ye?Nr(q,T,Q):!!(au==="application/xhtml+xml"&&on[m.namespaceURI]):!1},mt=function(m){jt(t.removed,{element:m});try{w(m).removeChild(m)}catch{if(g(m),!w(m))throw It("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fs=function(m){const T=A(m);if(T){const Q=[];iu(T,ae=>{jt(Q,ae)}),iu(Q,ae=>{try{g(ae)}catch{}})}const q=y(m);if(q)for(let Q=q.length-1;Q>=0;--Q){const ae=q[Q],pe=ae&&ae.name;if(typeof pe=="string")try{m.removeAttribute(pe)}catch{}}},Tt=function(m,T){try{jt(t.removed,{attribute:T.getAttributeNode(m),from:T})}catch{jt(t.removed,{attribute:null,from:T})}if(T.removeAttribute(m),m==="is")if(Nt||$u)try{mt(T)}catch{}else try{T.setAttribute(m,"")}catch{}},Br=function(m){const T=y(m);if(T)for(let q=T.length-1;q>=0;--q){const Q=T[q],ae=Q&&Q.name;if(!(typeof ae!="string"||W[ye(ae)]))try{m.removeAttribute(ae)}catch{}}},Ur=function(m){const T=[m];for(;T.length>0;){const q=T.pop();(_?_(q):q.nodeType)===Je.element&&Br(q);const ae=A(q);if(ae)for(let pe=ae.length-1;pe>=0;--pe)T.push(ae[pe])}},ps=function(m){let T=null,q=null;if(tn)m="<remove></remove>"+m;else{const pe=Ys(m,/^[\r\n\t ]+/);q=pe&&pe[0]}au==="application/xhtml+xml"&&Bt===Ye&&(m='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+m+"</body></html>");const Q=N?F(m):m;if(Bt===Ye)try{T=new p().parseFromString(Q,au)}catch{}if(!T||!T.documentElement){T=I.createDocument(Bt,"template",null);try{T.documentElement.innerHTML=rn?V:Q}catch{}}const ae=T.body||T.documentElement;return m&&q&&ae.insertBefore(u.createTextNode(q),ae.childNodes[0]||null),Bt===Ye?H.call(T,Dt?"html":"body")[0]:Dt?T.documentElement:ae},hs=function(m){return R.call(m.ownerDocument||m,m,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},Su=function(m){return m=lu(m,Rt," "),m=lu(m,Y," "),m=lu(m,U," "),m},fn=function(m){var T;m.normalize();const q=R.call(m.ownerDocument||m,m,i.SHOW_TEXT|i.SHOW_COMMENT|i.SHOW_CDATA_SECTION|i.SHOW_PROCESSING_INSTRUCTION,null);let Q=q.nextNode();for(;Q;)Q.data=Su(Q.data),Q=q.nextNode();const ae=(T=m.querySelectorAll)===null||T===void 0?void 0:T.call(m,"template");ae&&iu(ae,pe=>{qt(pe.content)&&fn(pe.content)})},Fu=function(m){const T=D?D(m):null;return typeof T!="string"||ye(T)!=="form"?!1:typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||m.attributes!==y(m)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function"||m.nodeType!==_(m)||m.childNodes!==A(m)},qt=function(m){if(!_||typeof m!="object"||m===null)return!1;try{return _(m)===Je.documentFragment}catch{return!1}},ru=function(m){if(!_||typeof m!="object"||m===null)return!1;try{return typeof _(m)=="number"}catch{return!1}};function ct(j,m,T){j.length!==0&&iu(j,q=>{q.call(t,m,T,Ut)})}const qr=function(m,T){return!!(su&&m.hasChildNodes()&&!ru(m.firstElementChild)&&Te(ra,m.textContent)&&Te(ra,m.innerHTML)||su&&m.namespaceURI===Ye&&T==="style"&&ru(m.firstElementChild)||m.nodeType===Je.processingInstruction||su&&m.nodeType===Je.comment&&Te(jf,m.data))},jr=function(m,T){if(!Be[T]&&gs(T)&&(ie.tagNameCheck instanceof RegExp&&Te(ie.tagNameCheck,T)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(T)))return!1;if(un&&!Xe[T]){const q=w(m),Q=A(m);if(Q&&q){const ae=Q.length;for(let pe=ae-1;pe>=0;--pe){const $e=nn?Q[pe]:h(Q[pe],!0);q.insertBefore($e,E(m))}}}return mt(m),!0},ms=function(m){if(ct(ve.beforeSanitizeElements,m,null),Fu(m))return mt(m),!0;const T=ye(D?D(m):m.nodeName);if(ct(ve.uponSanitizeElement,m,{tagName:T,allowedTags:z}),qr(m,T))return mt(m),!0;if(Be[T]||!(Ze.tagCheck instanceof Function&&Ze.tagCheck(T))&&!z[T])return jr(m,T);if((_?_(m):m.nodeType)===Je.element&&!Pr(m)||(T==="noscript"||T==="noembed"||T==="noframes")&&Te(Hf,m.innerHTML))return mt(m),!0;if(ht&&m.nodeType===Je.text){const Q=Su(m.textContent);m.textContent!==Q&&(jt(t.removed,{element:m.cloneNode()}),m.textContent=Q)}return ct(ve.afterSanitizeElements,m,null),!1},bs=function(m,T,q){if(We[T]||ts&&(T==="id"||T==="name")&&(q in u||q in Lr))return!1;const Q=W[T]||Ze.attributeCheck instanceof Function&&Ze.attributeCheck(T,m);if(!(Ve&&Te(se,T))){if(!(Ju&&Te(oe,T))){if(Q){if(!an[T]){if(!Te(it,lu(q,Ie,""))){if(!((T==="src"||T==="xlink:href"||T==="href")&&m!=="script"&&Js(q,"data:")===0&&ss[m])){if(!(lt&&!Te(Ee,lu(q,Ie,"")))){if(q)return!1}}}}}else if(!(gs(m)&&(ie.tagNameCheck instanceof RegExp&&Te(ie.tagNameCheck,m)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(m))&&(ie.attributeNameCheck instanceof RegExp&&Te(ie.attributeNameCheck,T)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(T,m))||T==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&Te(ie.tagNameCheck,q)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(q))))return!1}}return!0},Hr=ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),gs=function(m){return!Hr[du(m)]&&Te(Ct,m)},Wr=function(m,T,q,Q){if(N&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!q)switch(c.getAttributeType(m,T)){case"TrustedHTML":return F(Q);case"TrustedScriptURL":return P(Q)}return Q},Vr=function(m,T,q,Q){try{q?m.setAttributeNS(q,T,Q):m.setAttribute(T,Q),Fu(m)?mt(m):Xs(t.removed)}catch{Tt(T,m)}},xs=function(m){ct(ve.beforeSanitizeAttributes,m,null);const T=m.attributes;if(!T||Fu(m))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let Q=T.length;const ae=ye(m.nodeName);for(;Q--;){const pe=T[Q],$e=pe.name,ke=pe.namespaceURI,qe=pe.value,Ge=ye($e),hn=qe;let Me=$e==="value"?hn:Af(hn);if(q.attrName=Ge,q.attrValue=Me,q.keepAttr=!0,q.forceKeepAttr=void 0,ct(ve.uponSanitizeAttribute,m,q),Me=q.attrValue,us&&(Ge==="id"||Ge==="name")&&Js(Me,ns)!==0&&(Tt($e,m),Me=ns+Me),su&&Te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Me)){Tt($e,m);continue}if(Ge==="attributename"&&Ys(Me,"href")){Tt($e,m);continue}if(!q.forceKeepAttr){if(!q.keepAttr){Tt($e,m);continue}if(!Qu&&Te(Wf,Me)){Tt($e,m);continue}if(ht&&(Me=Su(Me)),!bs(ae,Ge,Me)){Tt($e,m);continue}Me=Wr(ae,Ge,ke,Me),Me!==hn&&Vr(m,$e,ke,Me)}}ct(ve.afterSanitizeAttributes,m,null)},Iu=function(m){let T=null;const q=hs(m);for(ct(ve.beforeSanitizeShadowDOM,m,null);T=q.nextNode();)if(ct(ve.uponSanitizeShadowNode,T,null),ms(T),xs(T),qt(T.content)&&Iu(T.content),(_?_(T):T.nodeType)===Je.element){const ae=C(T);qt(ae)&&(pn(ae),Iu(ae))}ct(ve.afterSanitizeShadowDOM,m,null)},pn=function(m){const T=[{node:m,shadow:null}];for(;T.length>0;){const q=T.pop();if(q.shadow){Iu(q.shadow);continue}const Q=q.node,pe=(_?_(Q):Q.nodeType)===Je.element,$e=A(Q);if($e)for(let ke=$e.length-1;ke>=0;--ke)T.push({node:$e[ke],shadow:null});if(pe){const ke=D?D(Q):null;if(typeof ke=="string"&&ye(ke)==="template"){const qe=Q.content;qt(qe)&&T.push({node:qe,shadow:null})}}if(pe){const ke=C(Q);qt(ke)&&T.push({node:null,shadow:ke},{node:ke,shadow:null})}}};return t.sanitize=function(j){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=null,q=null,Q=null,ae=null;if(rn=!j,rn&&(j="<!-->"),typeof j!="string"&&!ru(j)&&(j=Sf(j),typeof j!="string"))throw It("dirty is not a string, aborting");if(!t.isSupported)return j;en||dn(m),t.removed=[];const pe=nn&&typeof j!="string"&&ru(j);if(pe){const qe=D?D(j):j.nodeName;if(typeof qe=="string"){const Ge=ye(qe);if(!z[Ge]||Be[Ge])throw It("root node is forbidden and cannot be sanitized in-place")}if(Fu(j))throw It("root node is clobbered and cannot be sanitized in-place");try{pn(j)}catch(Ge){throw fs(j),Ge}}else if(ru(j))T=ps("<!---->"),q=T.ownerDocument.importNode(j,!0),q.nodeType===Je.element&&q.nodeName==="BODY"||q.nodeName==="HTML"?T=q:T.appendChild(q),pn(q);else{if(!Nt&&!ht&&!Dt&&j.indexOf("<")===-1)return N&&Cu?F(j):j;if(T=ps(j),!T)return Nt?null:Cu?V:""}T&&tn&&mt(T.firstChild);const $e=hs(pe?j:T);try{for(;Q=$e.nextNode();)ms(Q),xs(Q),qt(Q.content)&&Iu(Q.content)}catch(qe){throw pe&&fs(j),qe}if(pe)return iu(t.removed,qe=>{qe.element&&Ur(qe.element)}),ht&&fn(j),j;if(Nt){if(ht&&fn(T),$u)for(ae=fe.call(T.ownerDocument);T.firstChild;)ae.appendChild(T.firstChild);else ae=T;return(W.shadowroot||W.shadowrootmode)&&(ae=be.call(n,ae,!0)),ae}let ke=Dt?T.outerHTML:T.innerHTML;return Dt&&z["!doctype"]&&T.ownerDocument&&T.ownerDocument.doctype&&T.ownerDocument.doctype.name&&Te(Uf,T.ownerDocument.doctype.name)&&(ke="<!DOCTYPE "+T.ownerDocument.doctype.name+`>
259
+ `+ke),ht&&(ke=Su(ke)),N&&Cu?F(ke):ke},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dn(j),en=!0},t.clearConfig=function(){Ut=null,en=!1,N=te,V=""},t.isValidAttribute=function(j,m,T){Ut||dn({});const q=ye(j),Q=ye(m);return bs(q,Q,T)},t.addHook=function(j,m){typeof m=="function"&&jt(ve[j],m)},t.removeHook=function(j,m){if(m!==void 0){const T=wf(ve[j],m);return T===-1?void 0:Ef(ve[j],T,1)[0]}return Xs(ve[j])},t.removeHooks=function(j){ve[j]=[]},t.removeAllHooks=function(){ve=oa()},t}var dr=cr(),Kf=Object.defineProperty,Zf=Object.defineProperties,Xf=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,Yf=Object.prototype.hasOwnProperty,Jf=Object.prototype.propertyIsEnumerable,la=(e,t,u)=>t in e?Kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,fr=(e,t)=>{for(var u in t||(t={}))Yf.call(t,u)&&la(e,u,t[u]);if(ia)for(var u of ia(t))Jf.call(t,u)&&la(e,u,t[u]);return e},pr=(e,t)=>Zf(e,Xf(t)),Ne=(e,t)=>{let u=!1,n=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){n=!n,s+=2;continue}!n&&e[s]==="`"&&(u=!u)}return u||n},Qf=(e,t)=>{let u=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return u||n||s},e1=e=>{let t=0;for(let u=0;u<e.length;u+=1){if(e[u]==="\\"&&u+1<e.length&&e[u+1]==="`"){u+=1;continue}e[u]==="`"&&!Qf(e,u)&&(t+=1)}return t},wt=(e,t)=>{let u=!1,n=!1,s=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){n=!n,a+=2;continue}if(!n&&e[a]==="`")if(u){if(s<t&&t<a)return!0;u=!1,s=-1}else u=!0,s=a}return!1},t1=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,u1=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(t1,(t,u,n,s)=>Ne(e,s)?t:`${u}\\>${n}`),n1=/(\*\*)([^*]*\*?)$/,s1=/(__)([^_]*?)$/,a1=/(\*\*\*)([^*]*?)$/,r1=/(\*)([^*]*?)$/,o1=/(_)([^_]*?)$/,i1=/(`)([^`]*?)$/,l1=/(~~)([^~]*?)$/,Ot=/^[\s_~*`]*$/,hr=/^[\s]*[-*+][\s]+$/,c1=/[\p{L}\p{N}_]/u,d1=/^```[^`\n]*```?$/,f1=/^\*{4,}$/,p1=/(__)([^_]+)_$/,h1=/(~~)([^~]+)~$/,ca=/~~/g,Et=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:c1.test(e)},m1=(e,t)=>{let u=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")u+=1;else if(e[n]==="["&&(u-=1,u===0))return n;return-1},mr=(e,t)=>{let u=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")u+=1;else if(e[n]==="]"&&(u-=1,u===0))return n;return-1},Yu=(e,t)=>{let u=!1,n=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(n=!n,s+=1,u=!1):n||(u=!u))}return u||n},b1=(e,t)=>{for(let u=t;u<e.length;u+=1){if(e[u]===")")return!0;if(e[u]===`
260
+ `)return!1}return!1},br=(e,t)=>{for(let u=t-1;u>=0;u-=1){if(e[u]===")")return!1;if(e[u]==="(")return u>0&&e[u-1]==="]"?b1(e,t):!1;if(e[u]===`
261
+ `)return!1}return!1},g1=(e,t)=>{for(let u=t-1;u>=0;u-=1){if(e[u]===">")return!1;if(e[u]==="<"){let n=u+1<e.length?e[u+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[u]===`
262
+ `)return!1}return!1},Yn=(e,t,u)=>{let n=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
263
+ `){n=i+1;break}let s=e.length;for(let i=t;i<e.length;i+=1)if(e[i]===`
264
+ `){s=i;break}let a=e.substring(n,s),r=0,o=!1;for(let i of a)if(i===u)r+=1;else if(i!==" "&&i!==" "){o=!0;break}return r>=3&&!o},x1=(e,t,u,n)=>u==="\\"||e.includes("$")&&Yu(e,t)?!0:u!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(u==="*"||u&&n&&Et(u)&&Et(n)||(!u||u===" "||u===" "||u===`
265
+ `)&&(!n||n===" "||n===" "||n===`
266
+ `)),gr=e=>{let t=0,u=!1,n=e.length;for(let s=0;s<n;s+=1){if(e[s]==="`"&&s+2<n&&e[s+1]==="`"&&e[s+2]==="`"){u=!u,s+=2;continue}if(u||e[s]!=="*")continue;let a=s>0?e[s-1]:"",r=s<n-1?e[s+1]:"";x1(e,s,a,r)||(t+=1)}return t},v1=(e,t,u,n)=>!!(u==="\\"||e.includes("$")&&Yu(e,t)||br(e,t)||g1(e,t)||u==="_"||n==="_"||u&&n&&Et(u)&&Et(n)),y1=e=>{let t=0,u=!1,n=e.length;for(let s=0;s<n;s+=1){if(e[s]==="`"&&s+2<n&&e[s+1]==="`"&&e[s+2]==="`"){u=!u,s+=2;continue}if(u||e[s]!=="_")continue;let a=s>0?e[s-1]:"",r=s<n-1?e[s+1]:"";v1(e,s,a,r)||(t+=1)}return t},k1=e=>{let t=0,u=0,n=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){u>=3&&(t+=Math.floor(u/3)),u=0,n=!n,s+=2;continue}n||(e[s]==="*"?u+=1:(u>=3&&(t+=Math.floor(u/3)),u=0))}return u>=3&&(t+=Math.floor(u/3)),t},Jn=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){u=!u,n+=2;continue}u||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1)}return t},da=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){u=!u,n+=2;continue}u||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1)}return t},_1=(e,t,u)=>{if(!t||Ot.test(t))return!0;let n=e.substring(0,u).lastIndexOf(`
267
+ `),s=n===-1?0:n+1,a=e.substring(s,u);return hr.test(a)&&t.includes(`
268
+ `)?!0:Yn(e,u,"*")},w1=e=>{let t=e.match(n1);if(!t)return e;let u=t[2],n=e.lastIndexOf(t[1]);return Ne(e,n)||wt(e,n)||_1(e,u,n)?e:Jn(e)%2===1?u.endsWith("*")?`${e}*`:`${e}**`:e},E1=(e,t,u)=>{if(!t||Ot.test(t))return!0;let n=e.substring(0,u).lastIndexOf(`
269
+ `),s=n===-1?0:n+1,a=e.substring(s,u);return hr.test(a)&&t.includes(`
270
+ `)?!0:Yn(e,u,"_")},A1=e=>{let t=e.match(s1);if(!t){let s=e.match(p1);if(s){let a=e.lastIndexOf(s[1]);if(!(Ne(e,a)||wt(e,a))&&da(e)%2===1)return`${e}_`}return e}let u=t[2],n=e.lastIndexOf(t[1]);return Ne(e,n)||wt(e,n)||E1(e,u,n)?e:da(e)%2===1?`${e}__`:e},$1=e=>{let t=!1;for(let u=0;u<e.length;u+=1){if(e[u]==="`"&&u+2<e.length&&e[u+1]==="`"&&e[u+2]==="`"){t=!t,u+=2;continue}if(!t&&e[u]==="*"&&e[u-1]!=="*"&&e[u+1]!=="*"&&e[u-1]!=="\\"&&!Yu(e,u)){let n=u>0?e[u-1]:"",s=u<e.length-1?e[u+1]:"";if((!n||n===" "||n===" "||n===`
271
+ `)&&(!s||s===" "||s===" "||s===`
272
+ `)||n&&s&&Et(n)&&Et(s))continue;return u}}return-1},C1=e=>{if(!e.match(r1))return e;let t=$1(e);if(t===-1||Ne(e,t)||wt(e,t))return e;let u=e.substring(t+1);return!u||Ot.test(u)?e:gr(e)%2===1?`${e}*`:e},xr=e=>{let t=!1;for(let u=0;u<e.length;u+=1){if(e[u]==="`"&&u+2<e.length&&e[u+1]==="`"&&e[u+2]==="`"){t=!t,u+=2;continue}if(!t&&e[u]==="_"&&e[u-1]!=="_"&&e[u+1]!=="_"&&e[u-1]!=="\\"&&!Yu(e,u)&&!br(e,u)){let n=u>0?e[u-1]:"",s=u<e.length-1?e[u+1]:"";if(n&&s&&Et(n)&&Et(s))continue;return u}}return-1},D1=e=>{let t=e.length;for(;t>0&&e[t-1]===`
273
+ `;)t-=1;if(t<e.length){let u=e.slice(0,t),n=e.slice(t);return`${u}_${n}`}return`${e}_`},T1=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Jn(t)%2!==1)return null;let u=t.indexOf("**"),n=xr(t);return u!==-1&&n!==-1&&u<n?`${t}_**`:null},S1=e=>{if(!e.match(o1))return e;let t=xr(e);if(t===-1)return e;let u=e.substring(t+1);if(!u||Ot.test(u)||Ne(e,t)||wt(e,t))return e;if(y1(e)%2===1){let n=T1(e);return n!==null?n:D1(e)}return e},F1=e=>{let t=Jn(e),u=gr(e);return t%2===0&&u%2===0},I1=(e,t,u)=>!t||Ot.test(t)||Ne(e,u)||wt(e,u)?!0:Yn(e,u,"*"),M1=e=>{if(f1.test(e))return e;let t=e.match(a1);if(!t)return e;let u=t[2],n=e.lastIndexOf(t[1]);return I1(e,u,n)?e:k1(e)%2===1?F1(e)?e:`${e}***`:e},z1=/<[a-zA-Z/][^>]*$/,L1=e=>{let t=e.match(z1);return!t||t.index===void 0||Ne(e,t.index)?e:e.substring(0,t.index).trimEnd()},O1=e=>!e.match(d1)||e.includes(`
274
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,R1=e=>(e.match(/```/g)||[]).length%2===1,N1=e=>{let t=O1(e);if(t!==null)return t;let u=e.match(i1);if(u&&!R1(e)){let n=u[2];if(!n||Ot.test(n))return e;if(e1(e)%2===1)return`${e}\``}return e},vr=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",P1=e=>{let t=0,u=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!vr(e,n)&&(u=!u),!u&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},B1=e=>{let t=0,u=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!vr(e,n)){u=!u;continue}!u&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1)}return t},U1=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
275
+ `,t)!==-1&&!e.endsWith(`
276
+ `)?`${e}
277
+ $$`:`${e}$$`},q1=e=>P1(e)%2===0?e:U1(e),j1=e=>B1(e)%2===1?`${e}$`:e,H1=(e,t,u)=>{if(e.substring(t+2).includes(")"))return null;let n=m1(e,t);if(n===-1||Ne(e,n))return null;let s=n>0&&e[n-1]==="!",a=s?n-1:n,r=e.substring(0,a);if(s)return r;let o=e.substring(n+1,t);return u==="text-only"?`${r}${o}`:`${r}[${o}](streamdown:incomplete-link)`},fa=(e,t)=>{for(let u=0;u<t;u++)if(e[u]==="["&&!Ne(e,u)){if(u>0&&e[u-1]==="!")continue;let n=mr(e,u);if(n===-1)return u;if(n+1<e.length&&e[n+1]==="("){let s=e.indexOf(")",n+2);s!==-1&&(u=s)}}return t},W1=(e,t,u)=>{let n=t>0&&e[t-1]==="!",s=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,s);if(n)return a;if(u==="text-only"){let r=fa(e,t);return e.substring(0,r)+e.substring(r+1)}return`${e}](streamdown:incomplete-link)`}if(mr(e,t)===-1){let a=e.substring(0,s);if(n)return a;if(u==="text-only"){let r=fa(e,t);return e.substring(0,r)+e.substring(r+1)}return`${e}](streamdown:incomplete-link)`}return null},yr=(e,t="protocol")=>{let u=e.lastIndexOf("](");if(u!==-1&&!Ne(e,u)){let n=H1(e,u,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Ne(e,n)){let s=W1(e,n,t);if(s!==null)return s}return e},V1=/^-{1,2}$/,G1=/^[\s]*-{1,2}[\s]+$/,K1=/^={1,2}$/,Z1=/^[\s]*={1,2}[\s]+$/,X1=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
278
+ `);if(t===-1)return e;let u=e.substring(t+1),n=e.substring(0,t),s=u.trim();if(V1.test(s)&&!u.match(G1)){let a=n.split(`
279
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(K1.test(s)&&!u.match(Z1)){let a=n.split(`
280
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Y1=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),J1=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Y1,(t,u)=>Ne(e,u)?t:"\\~"),Q1=e=>{var t,u;let n=e.match(l1);if(n){let s=n[2];if(!s||Ot.test(s))return e;let a=e.lastIndexOf(n[1]);if(Ne(e,a)||wt(e,a))return e;if(((t=e.match(ca))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(h1);if(s){let a=e.lastIndexOf(s[0].slice(0,2));if(Ne(e,a)||wt(e,a))return e;if(((u=e.match(ca))==null?void 0:u.length)%2===1)return`${e}~`}}return e},Sn=e=>e!==!1,ep=e=>e===!0,ze={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},tp=[{handler:{name:"singleTilde",handle:J1,priority:ze.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:u1,priority:ze.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:L1,priority:ze.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:X1,priority:ze.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:yr,priority:ze.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:M1,priority:ze.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:w1,priority:ze.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:A1,priority:ze.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:C1,priority:ze.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:S1,priority:ze.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:N1,priority:ze.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Q1,priority:ze.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:q1,priority:ze.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:j1,priority:ze.INLINE_KATEX},optionKey:"inlineKatex"}],up=e=>{var t;let u=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return tp.filter(({handler:n,optionKey:s})=>n.name==="links"?Sn(e==null?void 0:e.links)||Sn(e==null?void 0:e.images):n.name==="inlineKatex"?ep(e==null?void 0:e.inlineKatex):Sn(e==null?void 0:e[s])).map(({handler:n,earlyReturn:s})=>n.name==="links"?{handler:pr(fr({},n),{handle:a=>yr(a,u)}),earlyReturn:u==="protocol"?s:void 0}:{handler:n,earlyReturn:s})},np=(e,t)=>{var u;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=up(t),a=((u=t==null?void 0:t.handlers)!=null?u:[]).map(o=>{var i;return{handler:pr(fr({},o),{priority:(i=o.priority)!=null?i:ze.DEFAULT}),earlyReturn:void 0}}),r=[...s,...a].sort((o,i)=>{var l,p;return((l=o.handler.priority)!=null?l:0)-((p=i.handler.priority)!=null?p:0)});for(let{handler:o,earlyReturn:i}of r)if(n=o.handle(n),i!=null&&i(n))return n;return n},sp=np;function fu(e){return e.trim().startsWith("|")}function ap(e){return/^(?: {4,}|\t)/.test(e)}function kr(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function pa(e){if(!fu(e))return!1;const t=kr(e);return t.length===0?!1:t.every(u=>/^\s*:?-+:?\s*$/.test(u))}function rp(e){return"| "+Array(e).fill("---").join(" | ")+" |"}function op(e){if(e==="")return"";const t=e.split(`
281
+ `),u=[];let n=!1;for(let s=0;s<t.length;s++){const a=t[s];if(/^\s*(```|~~~)/.test(a)){n=!n,u.push(a);continue}if(n){u.push(a);continue}const r=u.length>0?u[u.length-1]:null,o=r!==null&&fu(r);if(fu(a)&&!ap(a)&&!o&&!pa(a)){const i=s+1<t.length?t[s+1]:null;if(i!==null&&fu(i)&&pa(i)){u.length>0&&u[u.length-1].trim()!==""&&u.push(""),u.push(a);continue}if(i!==null&&fu(i)){u.length>0&&u[u.length-1].trim()!==""&&u.push(""),u.push(a),u.push(rp(kr(a).length));continue}u.push(a);continue}u.push(a)}return u.join(`
282
+ `)}const Qn=new He({html:!1,linkify:!0,breaks:!0});Qn.renderer.rules.table_open=()=>'<div class="md-table-wrap"><table>';Qn.renderer.rules.table_close=()=>"</table></div>";dr.addHook("afterSanitizeAttributes",e=>{e.nodeName==="A"&&e.hasAttribute("href")&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer nofollow"))});function ip(e,t={}){const u=t.streaming?sp(e):e,n=op(u),s=Qn.render(n);return dr.sanitize(s)}const lp=["innerHTML"],_r=de({__name:"StreamMarkdown",props:{text:{},streaming:{type:Boolean}},setup(e){const t=e,u=Z(()=>ip(t.text,{streaming:t.streaming}));return(n,s)=>(d(),b("div",{class:"stream-md text-sm",innerHTML:u.value},null,8,lp))}}),Ht=de({__name:"ExpandableBlock",props:{maxPx:{default:200}},setup(e){const t=e,u=S(!1),n=S(!1),s=S(null);let a=null;function r(){const o=s.value;o&&(n.value=o.scrollHeight>t.maxPx+8)}return nt(()=>{je(r),typeof ResizeObserver<"u"&&s.value&&(a=new ResizeObserver(()=>r()),a.observe(s.value))}),Qt(()=>a==null?void 0:a.disconnect()),xe(u,()=>{u.value||je(r)}),(o,i)=>(d(),b("div",null,[f("div",{ref_key:"inner",ref:s,"data-test":"clamp-inner",class:X(!u.value&&n.value?"overflow-hidden":""),style:tu(!u.value&&n.value?{maxHeight:e.maxPx+"px"}:void 0)},[Yr(o.$slots,"default")],6),n.value?(d(),b("button",{key:0,type:"button","data-test":"expand-toggle",class:"mt-1 inline-flex items-center gap-1 text-[10.5px] font-medium text-accent hover:underline",onClick:i[0]||(i[0]=l=>u.value=!u.value)},[(d(),G(Mt(u.value?v(ro):v(at)),{size:12})),he(" "+k(u.value?"Show less":"Show more"),1)])):M("",!0)]))}}),cp={class:"mt-1 space-y-1 text-xs"},dp={class:"flex min-w-0 items-center gap-2 font-mono text-fg-muted"},fp={class:"inline-flex min-w-0 items-center gap-1"},pp={class:"truncate"},hp={"data-test":"diff-stats",class:"ml-auto flex shrink-0 items-center gap-2 font-mono text-[10px]"},mp={key:0,class:"text-run"},bp={key:1,class:"text-danger"},gp={class:"overflow-x-auto rounded bg-bg p-2 font-mono"},xp={"data-test":"cmd-command",class:"break-all font-mono text-fg"},vp={"data-test":"cmd-output",class:"overflow-x-auto rounded bg-raised p-2 font-mono text-fg whitespace-pre-wrap"},yp={key:1,class:"text-fg-muted"},kp={"data-test":"read-path",class:"flex min-w-0 items-center gap-1 font-mono text-fg"},_p={class:"truncate"},wp={key:0,class:"ml-2 shrink-0 text-fg-muted"},Ep={class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},Ap={"data-test":"search-query",class:"flex min-w-0 items-center gap-1 font-mono text-fg"},$p={class:"truncate"},Cp={"data-test":"search-output",class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},Dp={class:"grid grid-cols-[auto,1fr] gap-x-3 gap-y-1"},Tp={class:"text-fg-muted"},Sp=["data-test"],Fp={class:"overflow-x-auto rounded bg-bg p-2 font-mono text-fg-muted whitespace-pre-wrap"},Ip={"data-test":"tool-text",class:"whitespace-pre-wrap text-fg-muted"},wr=de({__name:"ToolDetail",props:{detail:{}},setup(e){const t=e,u=Z(()=>t.detail.type!=="diff"?{del:[],add:[]}:{del:t.detail.oldText.split(`
283
+ `),add:t.detail.newText.split(`
284
+ `)}),n=Z(()=>({add:u.value.add.filter(s=>s.length>0).length,del:u.value.del.filter(s=>s.length>0).length}));return(s,a)=>(d(),b("div",cp,[e.detail.type==="diff"?(d(),b(J,{key:0},[f("div",dp,[f("span",fp,[B(v(Nu),{size:14,class:"shrink-0"}),f("span",pp,k(e.detail.path),1)]),f("span",hp,[n.value.add?(d(),b("span",mp,"+"+k(n.value.add),1)):M("",!0),n.value.del?(d(),b("span",bp,"−"+k(n.value.del),1)):M("",!0)])]),B(Ht,null,{default:gt(()=>[f("div",gp,[(d(!0),b(J,null,le(u.value.del,(r,o)=>(d(),b("div",{key:"d"+o,"data-test":"diff-del",class:"whitespace-pre text-danger"},"- "+k(r),1))),128)),(d(!0),b(J,null,le(u.value.add,(r,o)=>(d(),b("div",{key:"a"+o,"data-test":"diff-add",class:"whitespace-pre text-run"},"+ "+k(r),1))),128))])]),_:1})],64)):e.detail.type==="command"?(d(),b(J,{key:1},[f("div",xp,"$ "+k(e.detail.command),1),e.detail.output?(d(),G(Ht,{key:0},{default:gt(()=>[f("pre",vp,k(e.detail.output),1)]),_:1})):M("",!0),e.detail.exitCode!==void 0?(d(),b("div",yp,"exit "+k(e.detail.exitCode),1)):M("",!0)],64)):e.detail.type==="read"?(d(),b(J,{key:2},[f("div",kp,[B(v(Nu),{size:14,class:"shrink-0"}),f("span",_p,k(e.detail.path),1),e.detail.lines?(d(),b("span",wp,k(e.detail.lines),1)):M("",!0)]),e.detail.preview?(d(),G(Ht,{key:0},{default:gt(()=>[f("pre",Ep,k(e.detail.preview),1)]),_:1})):M("",!0)],64)):e.detail.type==="search"?(d(),b(J,{key:3},[f("div",Ap,[B(v(Hu),{size:14,class:"shrink-0"}),f("span",$p,k(e.detail.query),1)]),e.detail.output?(d(),G(Ht,{key:0},{default:gt(()=>[f("pre",Cp,k(e.detail.output),1)]),_:1})):M("",!0)],64)):e.detail.type==="fields"?(d(),b(J,{key:4},[f("dl",Dp,[(d(!0),b(J,null,le(e.detail.fields,r=>(d(),b(J,{key:r.label},[f("dt",Tp,k(r.label),1),f("dd",{"data-test":"field-"+r.label,class:"font-mono text-fg break-all"},k(r.value),9,Sp)],64))),128))]),e.detail.output?(d(),G(Ht,{key:0},{default:gt(()=>[f("pre",Fp,k(e.detail.output),1)]),_:1})):M("",!0)],64)):e.detail.type==="text"?(d(),G(Ht,{key:5},{default:gt(()=>[f("p",Ip,k(e.detail.text),1)]),_:1})):M("",!0)]))}}),Mp=de({__name:"FueDot",props:{pulsing:{type:Boolean,default:!0}},setup(e){return(t,u)=>(d(),b("span",{"data-test":"fue-dot",class:X(["inline-block h-2 w-2 rounded-full bg-accent",e.pulsing?"animate-pulse motion-reduce:animate-none":""]),"aria-hidden":"true"},null,2))}}),Wt=8;function Er(e,t,u,n=Wt){const s=e.top+e.height+n,a=e.top-t.height-n,r=u.height-(e.top+e.height),o=e.top,p=s+t.height>u.height-Wt&&o>r?"above":"below",c=p==="above"?Math.max(Wt,a):s,x=e.left+e.width/2-t.width/2,h=Math.max(Wt,u.width-t.width-Wt),g=Math.min(Math.max(Wt,x),h);return{top:c,left:g,placement:p}}const zp={class:"flex items-center gap-2 font-medium text-fg"},Lp={class:"mt-1 text-xs text-fg-muted"},Op={class:"mt-2 flex justify-end"},Rp=de({__name:"FueCallout",props:{title:{},body:{},anchor:{}},emits:["dismiss"],setup(e,{emit:t}){const u=e,n=t,s=S(null),a=S({visibility:"hidden"});function r(){const i=s.value;if(!i)return;const l={width:i.offsetWidth||256,height:i.offsetHeight||96},p={width:window.innerWidth,height:window.innerHeight};if(u.anchor){const c=Er(u.anchor,l,p);a.value={top:`${c.top}px`,left:`${c.left}px`,visibility:"visible"}}else a.value={top:`${Math.max(8,p.height/2-l.height/2)}px`,left:`${Math.max(8,p.width/2-l.width/2)}px`,visibility:"visible"}}function o(i){i.key==="Escape"&&n("dismiss")}return nt(()=>{r(),window.addEventListener("keydown",o),window.addEventListener("resize",r)}),Qt(()=>{window.removeEventListener("keydown",o),window.removeEventListener("resize",r)}),(i,l)=>(d(),G(eu,{to:"body"},[f("div",{ref_key:"card",ref:s,"data-test":"fue-callout",class:"fixed z-50 w-64 rounded-lg border border-border bg-raised p-3 text-sm shadow-lg",style:tu(a.value),role:"dialog"},[f("p",zp,[l[1]||(l[1]=f("span",{class:"inline-block h-2 w-2 rounded-full bg-accent","aria-hidden":"true"},null,-1)),he(" "+k(e.title),1)]),f("p",Lp,k(e.body),1),f("div",Op,[f("button",{"data-test":"fue-dismiss",type:"button",class:"rounded bg-accent px-2 py-1 text-xs font-medium text-white hover:bg-accent-hover",onClick:l[0]||(l[0]=p=>n("dismiss"))},k(i.$t("fue.gotIt")),1)])],4)]))}}),Ar="xacpx.fue.v1.";function Np(e){try{return localStorage.getItem(Ar+e)==="1"}catch{return!1}}function Pp(e){try{localStorage.setItem(Ar+e,"1")}catch{}}function Bp(e){const t=S(Np(e)?"acknowledged":"unseen");function u(){t.value==="unseen"&&(t.value="engaging")}function n(){t.value="acknowledged",Pp(e)}return{status:t,engage:u,dismiss:n}}const es={read:so,search:Hu,execute:So,edit:Eo,think:Un,other:Da},Up={running:Lt,success:uu,error:st},qp=["read","search","execute","edit","think","other"],jp=["running","success","error"],ha=5;function Hp(e){const t=new Map,u=new Map;for(const n of e)t.set(n.kind,(t.get(n.kind)??0)+1),u.set(n.status,(u.get(n.status)??0)+1);return{kinds:qp.filter(n=>t.has(n)).map(n=>({icon:es[n],count:t.get(n),label:n})),statuses:jp.filter(n=>u.has(n)).map(n=>({icon:Up[n],count:u.get(n),label:n}))}}const Wp={class:"overflow-hidden rounded-lg border border-border bg-surface text-xs shadow-e1"},Vp={class:"inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-fg-muted"},Gp={key:3,"data-test":"tool-count",class:"font-mono text-[10.5px] text-fg-muted"},Kp={"data-test":"tool-summary",class:"ml-1 flex items-center gap-1.5 text-[10.5px] text-fg-muted"},Zp=["data-test"],Xp={class:"tabular-nums"},Yp={key:0,class:"text-fg-muted"},Jp=["data-test"],Qp={class:"tabular-nums"},eh={key:1,class:"space-y-1 border-t border-border px-3 pb-2.5 pt-2"},th=["onClick"],uh={class:"truncate font-mono text-[11px] text-fg"},nh={key:0,class:"ml-auto font-mono text-[10.5px] text-fg-muted"},sh={key:0,class:"px-2 pb-2 pt-1"},ah=de({__name:"ToolCallPanel",props:{steps:{}},setup(e){const t=e,u=S(t.steps.length<=ha),n=S(new Set);function s(h){n.value.has(h)?n.value.delete(h):n.value.add(h),n.value=new Set(n.value)}const a=Z(()=>Hp(t.steps)),r=Bp("tool-group-collapse"),o=Z(()=>t.steps.length>ha),i=Z(()=>o.value&&r.status.value!=="acknowledged"),l=S(null),p=S(null);function c(){var h;if(u.value=!u.value,i.value){const g=(h=l.value)==null?void 0:h.getBoundingClientRect();g&&(p.value={top:g.top,left:g.left,width:g.width,height:g.height}),r.engage()}}function x(h){return h===void 0?"":h>=1e3?`${(h/1e3).toFixed(1)}s`:`${h}ms`}return(h,g)=>(d(),b("div",Wp,[f("button",{ref_key:"header",ref:l,type:"button",class:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-bg",onClick:c},[u.value?(d(),G(v(at),{key:0,size:13,class:"text-fg-muted"})):(d(),G(v(kt),{key:1,size:13,class:"text-fg-muted"})),f("span",Vp,[B(v(Da),{size:13}),he(" "+k(h.$t("tools.toolSteps")),1)]),i.value?(d(),G(Mp,{key:2,pulsing:v(r).status.value==="unseen"},null,8,["pulsing"])):(d(),b("span",Gp,k(e.steps.length),1)),f("span",Kp,[(d(!0),b(J,null,le(a.value.kinds,E=>(d(),b("span",{key:"k"+E.label,"data-test":"sum-"+E.label,class:"inline-flex items-center gap-0.5"},[(d(),G(Mt(E.icon),{size:11})),f("span",Xp,k(E.count),1)],8,Zp))),128)),a.value.statuses.length?(d(),b("span",Yp,"·")):M("",!0),(d(!0),b(J,null,le(a.value.statuses,E=>(d(),b("span",{key:"s"+E.label,"data-test":"sum-"+E.label,class:X(["inline-flex items-center gap-0.5",E.label==="success"?"text-run":E.label==="error"?"text-danger":"text-fg-muted"])},[(d(),G(Mt(E.icon),{size:11,class:X(E.label==="running"?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])),f("span",Qp,k(E.count),1)],10,Jp))),128))])],512),v(r).status.value==="engaging"?(d(),G(Rp,{key:0,title:h.$t("tools.collapsed"),body:h.$t("tools.collapsedBody"),anchor:p.value,onDismiss:g[0]||(g[0]=E=>v(r).dismiss())},null,8,["title","body","anchor"])):M("",!0),u.value?(d(),b("ul",eh,[(d(!0),b(J,null,le(e.steps,E=>(d(),b("li",{key:E.toolCallId},[f("button",{type:"button","data-test":"tool-row",class:"flex w-full items-center gap-2 rounded text-left text-[12px] hover:bg-fg/5",onClick:A=>s(E.toolCallId)},[f("span",{class:X(["grid h-4 w-4 shrink-0 place-items-center rounded-full",E.status==="success"?"bg-run/15":E.status==="running"?"bg-accent/15":"bg-danger/15"])},[E.status==="success"?(d(),G(v(uu),{key:0,"data-test":"step-status-success",size:9,class:"text-run"})):E.status==="running"?(d(),G(v(Lt),{key:1,"data-test":"step-status-running",size:9,class:"animate-spin motion-reduce:animate-none text-accent"})):(d(),G(v(pu),{key:2,"data-test":"step-status-error",size:9,class:"text-danger"}))],2),(d(),G(Mt(v(es)[E.kind]),{size:12,class:"shrink-0 text-fg-muted"})),f("span",uh,k(E.title),1),E.durationMs!==void 0?(d(),b("span",nh,k(x(E.durationMs)),1)):M("",!0)],8,th),n.value.has(E.toolCallId)&&E.detail?(d(),b("div",sh,[B(wr,{detail:E.detail},null,8,["detail"])])):M("",!0)]))),128))])):M("",!0)]))}}),rh={class:"overflow-hidden rounded-lg border border-border bg-surface text-xs shadow-e1"},oh={key:2,"data-test":"reasoning-shimmer",class:"ml-1 inline-block h-1.5 w-1.5 animate-pulse motion-reduce:animate-none rounded-full bg-fg-muted","aria-hidden":"true"},ih={key:0,"data-test":"reasoning-body",class:"whitespace-pre-wrap border-t border-border px-3 pb-2.5 pt-2 text-[12px] leading-relaxed text-fg-muted"},$r=de({__name:"ReasoningPanel",props:{reasoning:{},defaultOpen:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){const u=S(e.defaultOpen??!1),n=Z(()=>u.value);return(s,a)=>(d(),b("div",rh,[f("button",{type:"button",class:"flex w-full items-center gap-1.5 px-3 py-2 text-left text-fg-muted",onClick:a[0]||(a[0]=r=>u.value=!u.value)},[n.value?(d(),G(v(at),{key:0,size:13})):(d(),G(v(kt),{key:1,size:13})),B(v(Un),{size:13,class:X(e.streaming?"text-accent":"")},null,8,["class"]),f("span",{class:X(["text-[12px] font-medium",e.streaming?"shimmer-text":""])},k(e.streaming?s.$t("reasoning.reasoningStreaming"):s.$t("reasoning.reasoning")),3),e.streaming?(d(),b("span",oh)):M("",!0)]),n.value?(d(),b("p",ih,k(e.reasoning),1)):M("",!0)]))}}),lh={class:"truncate font-mono text-[11.5px] text-fg"},ch={class:"ml-auto flex shrink-0 items-center gap-2"},dh={key:0,class:"font-mono text-[10.5px] text-fg-muted"},fh={key:0,class:"border-t border-border px-3 pb-2.5 pt-2"},ph={key:0,"data-test":"tool-step-error",class:"mb-1.5 flex items-start gap-1.5 rounded bg-danger/10 px-2 py-1.5 text-danger"},hh={class:"whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed"},mh=de({__name:"ToolStepCard",props:{step:{}},setup(e){const t=S(!0);function u(n){return n===void 0?"":n>=1e3?`${(n/1e3).toFixed(1)}s`:`${n}ms`}return(n,s)=>(d(),b("div",{"data-test":"tool-step-card",class:X(["overflow-hidden rounded-lg border bg-surface text-xs shadow-e1",e.step.status==="error"?"border-danger/40":"border-border"])},[f("button",{type:"button","data-test":"tool-step-header",class:"flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-bg",onClick:s[0]||(s[0]=a=>t.value=!t.value)},[t.value?(d(),G(v(at),{key:0,size:13,class:"text-fg-muted"})):(d(),G(v(kt),{key:1,size:13,class:"text-fg-muted"})),(d(),G(Mt(v(es)[e.step.kind]),{size:13,class:"shrink-0 text-fg-muted"})),f("span",lh,k(e.step.title),1),f("span",ch,[e.step.durationMs!==void 0?(d(),b("span",dh,k(u(e.step.durationMs)),1)):M("",!0),e.step.status==="success"?(d(),G(v(uu),{key:1,"data-test":"step-status-success",size:13,class:"text-run"})):e.step.status==="running"?(d(),G(v(Lt),{key:2,"data-test":"step-status-running",size:13,class:"animate-spin motion-reduce:animate-none text-accent"})):(d(),G(v(pu),{key:3,"data-test":"step-status-error",size:13,class:"text-danger"}))])]),t.value?(d(),b("div",fh,[e.step.status==="error"&&e.step.error?(d(),b("div",ph,[B(v(pu),{size:13,class:"mt-0.5 shrink-0"}),f("span",hh,k(e.step.error),1)])):M("",!0),e.step.detail?(d(),G(wr,{key:1,detail:e.step.detail},null,8,["detail"])):M("",!0)])):M("",!0)],2))}}),bh={class:"space-y-2.5"},ma=de({__name:"TurnParts",props:{parts:{},streaming:{type:Boolean}},setup(e){const t=e,u=n=>t.streaming===!0&&n===t.parts.length-1;return(n,s)=>(d(),b("div",bh,[(d(!0),b(J,null,le(e.parts,(a,r)=>(d(),b(J,{key:r},[a.type==="reasoning"&&a.text.trim()?(d(),G($r,{key:0,reasoning:a.text,streaming:u(r),"default-open":!1},null,8,["reasoning","streaming"])):a.type==="tool"?(d(),G(mh,{key:1,step:a.step},null,8,["step"])):(d(),G(_r,{key:2,text:a.text,streaming:u(r),class:X(["text-[14px] leading-relaxed text-fg",u(r)?"caret":""])},null,8,["text","streaming","class"]))],64))),128))]))}}),gh=["aria-label","title"],Cr=de({__name:"CopyButton",props:{text:{}},setup(e){const t=e,u=S(!1);let n=null;async function s(){try{await navigator.clipboard.writeText(t.text)}catch{const a=document.createElement("textarea");a.value=t.text,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();try{document.execCommand("copy")}catch{}document.body.removeChild(a)}u.value=!0,n&&clearTimeout(n),n=setTimeout(()=>u.value=!1,1200)}return(a,r)=>(d(),b("button",{"data-test":"copy-button",type:"button","aria-label":a.$t("copy.copy"),title:u.value?a.$t("copy.copied"):a.$t("copy.copy"),class:"rounded p-1 leading-none text-fg-muted hover:bg-fg/5 hover:text-fg",onClick:Ae(s,["stop"])},[u.value?(d(),G(v(uu),{key:0,size:14,class:"text-run"})):(d(),G(v(co),{key:1,size:14}))],8,gh))}}),xh={class:"mt-1 flex flex-wrap gap-2"},vh=["src","alt"],yh={key:1,"data-test":"att-file",class:"flex items-center gap-2 rounded-lg border border-border bg-surface px-3 py-2 text-[13px]"},kh={class:"max-w-[180px] truncate"},_h={class:"text-fg-muted"},wh=de({__name:"MessageAttachments",props:{attachments:{}},setup(e){function t(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(0)} KB`:`${(u/1024/1024).toFixed(1)} MB`}return(u,n)=>(d(),b("div",xh,[(d(!0),b(J,null,le(e.attachments,s=>(d(),b(J,{key:s.id},[s.kind==="image"&&s.previewUrl?(d(),b("img",{key:0,"data-test":"att-image",src:s.previewUrl,alt:s.filename,class:"max-h-40 max-w-[200px] rounded-lg border border-border object-cover"},null,8,vh)):(d(),b("div",yh,[B(v(hu),{size:16,class:"shrink-0 text-fg-muted"}),f("span",kh,k(s.filename),1),f("span",_h,k(t(s.size)),1)]))],64))),128))]))}}),Eh={class:"relative flex-1 overflow-hidden"},Ah={class:"mx-auto max-w-3xl space-y-5"},$h={key:0,"data-test":"loading-older",class:"flex justify-center py-1 text-[11px] text-fg-muted"},Ch=["data-scheduled-task"],Dh={class:"flex max-w-[80%] flex-col items-end"},Th=["title"],Sh={class:"whitespace-pre-wrap text-[14px] leading-relaxed text-fg"},Fh={key:1,class:"mt-1 flex items-center gap-2"},Ih={"data-test":"msg-failed",class:"text-xs text-danger"},Mh=["title","onClick"],zh={key:1,class:"cv-row group flex gap-2.5"},Lh={class:"mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-lg border border-border bg-surface"},Oh={"data-test":"msg-actions",class:"flex items-center gap-1.5 pt-0.5 text-fg-muted"},Rh={key:1,"data-test":"msg-time",class:"font-mono text-[10.5px] tabular-nums"},Nh={key:2,"data-test":"msg-cancelled",class:"inline-flex items-center gap-1 text-[11px] text-warn"},Ph={key:3,"data-test":"msg-failed",class:"text-[11px] text-danger"},Bh={key:1,class:"flex gap-2.5"},Uh={class:"mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-lg border border-border bg-surface"},qh={"data-test":"msg-streaming",class:"min-w-0 flex-1"},jh=48,Hh=240,Wh=de({__name:"MessageList",props:{messages:{},liveTurn:{},hasMoreOlder:{type:Boolean},loadingOlder:{type:Boolean},sessionKey:{},scrollToScheduled:{}},emits:["resend","loadOlder"],setup(e,{emit:t}){const u=e,n=t;function s(c){var x;return c.scheduled??((x=c.structured)==null?void 0:x.scheduled)}const a=S(null),r=S(!0);let o=null;function i(){const c=a.value;c&&(r.value=c.scrollHeight-c.scrollTop-c.clientHeight<=jh,c.scrollTop<=Hh&&u.hasMoreOlder&&!u.loadingOlder&&o===null&&(o=c.scrollHeight-c.scrollTop,n("loadOlder")))}xe(()=>u.loadingOlder,(c,x)=>{if(!(x&&!c)||o===null)return;const h=o;o=null,je(()=>{const g=a.value;g&&(g.scrollTop=g.scrollHeight-h)})});let l=0;function p(c=!1){const x=a.value;if(!x||(typeof x.scrollTo=="function"?x.scrollTo({top:x.scrollHeight,behavior:c?"smooth":"auto"}):x.scrollTop=x.scrollHeight,r.value=!0,c||typeof requestAnimationFrame!="function"))return;l&&cancelAnimationFrame(l);let h=0;const g=()=>{l=0;const E=a.value;E&&(E.scrollHeight-E.scrollTop-E.clientHeight>1&&(E.scrollTop=E.scrollHeight),++h<4&&(l=requestAnimationFrame(g)))};l=requestAnimationFrame(g)}return xe(()=>u.sessionKey,()=>{r.value=!0,o=null,je(()=>p(!1))}),xe(()=>{var c;return(c=u.scrollToScheduled)==null?void 0:c.nonce},()=>{var x;const c=(x=u.scrollToScheduled)==null?void 0:x.taskId;c&&je(()=>{var g;const h=(g=a.value)==null?void 0:g.querySelector(`[data-scheduled-task="${c}"]`);h&&typeof h.scrollIntoView=="function"&&(h.scrollIntoView({behavior:"smooth",block:"center"}),r.value=!1)})}),xe(()=>{const c=u.liveTurn,x=c==null?void 0:c.parts[c.parts.length-1],h=x?x.type==="tool"?x.step.status:x.text.length:0;return[u.messages.length,(c==null?void 0:c.parts.length)??0,h]},()=>{r.value&&je(()=>p(!1))}),(c,x)=>(d(),b("div",Eh,[f("div",{ref_key:"scroller",ref:a,"data-test":"msg-scroller",class:"thin-scroll h-full overflow-y-auto px-3 py-4 lg:px-5 lg:py-5",onScroll:i},[f("div",Ah,[e.loadingOlder?(d(),b("div",$h,[B(v(Lt),{size:13,class:"animate-spin motion-reduce:animate-none"})])):M("",!0),(d(!0),b(J,null,le(e.messages,(h,g)=>{var E,A,w,C,y,_,D,N;return d(),b(J,{key:h.id!==void 0?`p${h.id}`:`o${h.createdAt}:${g}`},[h.direction==="in"?(d(),b("div",{key:0,class:"cv-row flex justify-end","data-scheduled-task":(E=s(h))==null?void 0:E.taskId},[f("div",Dh,[s(h)?(d(),b("span",{key:0,"data-test":"msg-scheduled-badge",class:"mb-1 inline-flex items-center gap-1 rounded-full bg-accent/10 px-2 py-0.5 text-[10.5px] font-medium text-accent",title:`${c.$t("chat.scheduledFor")} ${v(qn)(s(h).executeAt)}`},[B(v(Ca),{size:11}),he(k(c.$t("chat.scheduled")),1)],8,Th)):M("",!0),f("div",{"data-test":"msg-in",class:X(["rounded-2xl rounded-tr-md border border-accent/15 bg-accent/10 px-3.5 py-2",h.failed?"ring-1 ring-danger":""])},[f("p",Sh,k(h.text),1),(A=h.attachments)!=null&&A.length?(d(),G(wh,{key:0,attachments:h.attachments},null,8,["attachments"])):M("",!0)],2),h.failed?(d(),b("div",Fh,[f("span",Ih,k(c.$t("chat.failedToSend")),1),f("button",{type:"button","data-test":"msg-resend",class:"inline-flex items-center gap-1 text-xs font-medium text-accent hover:opacity-80",title:c.$t("chat.resendThis"),onClick:V=>n("resend",h)},[B(v($o),{size:12}),he(k(c.$t("chat.resend")),1)],8,Mh)])):M("",!0)])],8,Ch)):(d(),b("div",zh,[f("div",Lh,[B(v(Mn),{size:13,class:"text-accent"})]),f("div",{"data-test":"msg-out",class:X(["min-w-0 flex-1 space-y-2.5",h.failed?"rounded-lg ring-1 ring-danger":""])},[(C=(w=h.structured)==null?void 0:w.parts)!=null&&C.length?(d(),G(ma,{key:0,parts:h.structured.parts},null,8,["parts"])):(d(),b(J,{key:1},[(_=(y=h.structured)==null?void 0:y.toolSteps)!=null&&_.length?(d(),G(ah,{key:0,steps:h.structured.toolSteps},null,8,["steps"])):M("",!0),(N=(D=h.structured)==null?void 0:D.reasoning)!=null&&N.trim()?(d(),G($r,{key:1,reasoning:h.structured.reasoning,"default-open":!1},null,8,["reasoning"])):M("",!0),h.text?(d(),G(_r,{key:2,text:h.text,class:"text-[14px] leading-relaxed text-fg"},null,8,["text"])):M("",!0)],64)),f("div",Oh,[h.text?(d(),G(Cr,{key:0,text:h.text},null,8,["text"])):M("",!0),v(Ds)(h.createdAt)?(d(),b("span",Rh,k(v(Ds)(h.createdAt)),1)):M("",!0),h.status==="cancelled"?(d(),b("span",Nh,[B(v(oo),{size:12}),he(" "+k(c.$t("chat.stopped")),1)])):M("",!0),h.failed?(d(),b("span",Ph,k(c.$t("chat.failed")),1)):M("",!0)])],2)]))],64)}),128)),e.liveTurn&&e.liveTurn.parts.length?(d(),b("div",Bh,[f("div",Uh,[B(v(Mn),{size:13,class:"text-accent"})]),f("div",qh,[B(ma,{parts:e.liveTurn.parts,streaming:!0},null,8,["parts"])])])):M("",!0)])],544),_e(f("button",{"data-test":"jump-latest",type:"button",class:"absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full border border-border bg-raised px-3 py-1 text-xs text-fg-muted shadow hover:bg-fg/5",onClick:x[0]||(x[0]=h=>p(!0))},k(c.$t("chat.jumpLatest")),513),[[qu,!r.value]])]))}}),Vh=uo(Wh,[["__scopeId","data-v-a7278286"]]),Dr="xacpx.composer-drafts.v1";function Tr(){try{const e=sessionStorage.getItem(Dr);return e?JSON.parse(e):{}}catch{return{}}}function Gh(e){try{sessionStorage.setItem(Dr,JSON.stringify(e))}catch{}}function ba(e){return e?Tr()[e]??"":""}function ga(e,t){if(!e)return;const u=Tr();t?u[e]=t:delete u[e],Gh(u)}const Kh={class:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-fg-muted"},Zh={class:"flex items-baseline justify-between tabular-nums"},Xh={class:"text-fg"},Yh={class:"text-fg-muted"},Jh={class:"mb-1 mt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-muted"},Qh={class:"space-y-0.5"},e2={key:0,class:"flex justify-between tabular-nums"},t2={class:"text-fg-muted"},u2={class:"text-fg"},n2={class:"mb-1 mt-3 text-[11px] font-semibold uppercase tracking-wide text-fg-muted"},s2={class:"flex justify-between tabular-nums"},a2={class:"text-fg-muted"},r2={class:"text-fg"},o2=de({__name:"UsagePopover",props:{used:{},size:{},pct:{},cost:{},breakdown:{},anchor:{}},emits:["dismiss"],setup(e,{emit:t}){const u=e,n=t,s=S(null),a=S({visibility:"hidden"}),r=[{key:"inputTokens",label:"chat.usage.input"},{key:"outputTokens",label:"chat.usage.output"},{key:"cachedReadTokens",label:"chat.usage.cacheRead"},{key:"cachedWriteTokens",label:"chat.usage.cacheWrite"},{key:"thoughtTokens",label:"chat.usage.thinking"},{key:"totalTokens",label:"chat.usage.total"}];function o(x){return typeof x=="number"?x.toLocaleString():null}function i(){var g,E;const x=(g=u.cost)==null?void 0:g.amount;if(typeof x!="number")return null;const h=(E=u.cost)==null?void 0:E.currency;try{if(h)return new Intl.NumberFormat(void 0,{style:"currency",currency:h,maximumFractionDigits:4}).format(x)}catch{}return h?`${x} ${h}`:String(x)}function l(){const x=s.value;if(!x)return;const h={width:x.offsetWidth||240,height:x.offsetHeight||160},g={width:window.innerWidth,height:window.innerHeight};if(u.anchor){const E=Er(u.anchor,h,g);a.value={top:`${E.top}px`,left:`${E.left}px`,visibility:"visible"}}else a.value={top:`${Math.max(8,g.height/2-h.height/2)}px`,left:`${Math.max(8,g.width/2-h.width/2)}px`,visibility:"visible"}}function p(x){x.key==="Escape"&&n("dismiss")}function c(x){s.value&&!s.value.contains(x.target)&&n("dismiss")}return nt(()=>{l(),window.addEventListener("keydown",p),window.addEventListener("resize",l),setTimeout(()=>document.addEventListener("pointerdown",c),0)}),Qt(()=>{window.removeEventListener("keydown",p),window.removeEventListener("resize",l),document.removeEventListener("pointerdown",c)}),(x,h)=>(d(),G(eu,{to:"body"},[f("div",{ref_key:"card",ref:s,"data-test":"usage-popover",class:"fixed z-[60] w-60 rounded-lg border border-border bg-raised p-3 text-sm shadow-e2",style:tu(a.value),role:"dialog"},[f("p",Kh,k(x.$t("chat.usage.contextWindow")),1),f("div",Zh,[f("span",Xh,k(e.used.toLocaleString())+" / "+k(e.size.toLocaleString()),1),f("span",Yh,k(e.pct)+"%",1)]),e.breakdown?(d(),b(J,{key:0},[f("p",Jh,k(x.$t("chat.usage.tokens")),1),f("dl",Qh,[(d(),b(J,null,le(r,g=>(d(),b(J,{key:g.key},[o(e.breakdown[g.key])!==null?(d(),b("div",e2,[f("dt",t2,k(x.$t(g.label)),1),f("dd",u2,k(o(e.breakdown[g.key])),1)])):M("",!0)],64))),64))])],64)):M("",!0),i()!==null?(d(),b(J,{key:1},[f("p",n2,k(x.$t("chat.usage.cost")),1),f("div",s2,[f("span",a2,k(x.$t("chat.usage.cumulative")),1),f("span",r2,k(i()),1)])],64)):M("",!0)],4)]))}}),i2=At("session-controls",()=>{const e=S(void 0),t=S([]),u=S(!1),n=S("");function s(){e.value=void 0,t.value=[],n.value=""}async function a(o,i){if(!o||!i){s();return}u.value=!0,n.value="";try{const l=await re.rpc(o,"control.session.model.get",{sessionAlias:i});if(Zt(l)){s();return}e.value=typeof l.current=="string"?l.current:void 0,t.value=Array.isArray(l.available)?l.available:[]}catch{s()}finally{u.value=!1}}async function r(o,i,l){n.value="";const p=e.value;e.value=l;try{const c=await re.rpc(o,"control.session.model.set",{sessionAlias:i,modelId:l});return Zt(c)?(e.value=p,n.value=c.error.message,!1):!0}catch(c){return e.value=p,n.value=c instanceof Error?c.message:"set-failed",!1}}return{current:e,available:t,loading:u,error:n,reset:s,loadModel:a,setModel:r}}),l2={class:"rounded-lg border border-border bg-surface shadow-e2 focus-within:border-accent/50 transition-colors"},c2={key:0,class:"flex flex-wrap gap-2 px-2.5 pt-2.5 pb-1"},d2=["src","alt"],f2={class:"max-w-[120px] truncate text-fg"},p2={key:1,class:"text-fg-muted"},h2={key:2,class:"text-danger font-semibold"},m2=["title","onClick"],b2={key:1,"data-test":"attach-rejected",class:"block px-3 pt-2 text-xs text-danger"},g2={key:2,"data-test":"cmd-menu",role:"listbox",class:"mx-2.5 mt-2 max-h-56 overflow-auto rounded-md border border-border bg-raised py-1 shadow-e2"},x2=["aria-selected","onMousedown","onMouseenter"],v2={class:"shrink-0 font-medium text-fg"},y2={key:0,class:"truncate text-fg-muted"},k2=["placeholder"],_2={class:"flex items-center justify-between px-2.5 pb-2.5 pt-0.5"},w2={key:0,class:"relative flex items-center gap-2"},E2=["disabled"],A2={class:"font-mono text-[11.5px] font-medium text-fg"},$2={key:0,"data-test":"model-menu",class:"absolute bottom-full left-0 z-10 mb-1 max-h-48 min-w-40 overflow-y-auto rounded-lg border border-border bg-raised shadow-lg"},C2=["onClick"],D2={class:"font-mono"},T2={key:1,"data-test":"model-error",class:"text-xs text-danger"},S2=["title"],F2={class:"relative h-1 w-8 shrink-0 overflow-hidden rounded-full bg-border"},I2={class:"shrink-0 text-[11.5px] font-medium tabular-nums text-fg-muted"},M2={key:1},z2={class:"flex items-center gap-1.5"},L2=["title"],O2=["disabled"],R2=de({__name:"PromptInput",props:{busy:{type:Boolean},draftKey:{},instanceId:{},sessionAlias:{}},emits:["send","cancel"],setup(e,{emit:t}){const u=e,n=t,s=za(),a=i2(),r=$t(),o=Z(()=>{const $=r.sessionUsage;if(!$||$.size<=0)return null;const I=Math.min(100,Math.round($.used/$.size*100)),R=I>=90?"danger":I>=75?"warn":"accent";return{used:$.used,size:$.size,pct:I,tone:R,cost:$.cost,breakdown:$.breakdown}}),i=S(!1),l=S(null);function p($){const I=$.currentTarget.getBoundingClientRect();l.value={top:I.top,left:I.left,width:I.width,height:I.height},i.value=!i.value}const c=S(!1);xe(()=>[u.instanceId,u.sessionAlias],([$,I])=>{a.loadModel($??null,I??null),c.value=!1},{immediate:!0});async function x($){c.value=!1,u.instanceId&&u.sessionAlias&&await a.setModel(u.instanceId,u.sessionAlias,$)}const h=S(ba(u.draftKey??"")),g=S(null),E=S(null),A=S(!1),w=S(0),C=Z(()=>{const $=h.value;return!$.startsWith("/")||$.includes(`
285
+ `)||$.slice(1).includes(" ")?null:$.slice(1).toLowerCase()}),y=Z(()=>{const $=C.value;return $===null?[]:r.sessionCommands.filter(I=>I.name.toLowerCase().startsWith($)).slice(0,8)});xe(y,$=>{A.value=$.length>0,w.value=0});function _($){h.value=`/${$} `,A.value=!1,je(()=>{var I;return(I=g.value)==null?void 0:I.focus()})}function D(){var $;($=E.value)==null||$.click()}async function N($){const I=$.target;I.files&&await s.addFiles(Array.from(I.files)),I.value=""}async function V($){var R;const I=Array.from(((R=$.clipboardData)==null?void 0:R.files)??[]);I.length>0&&($.preventDefault(),await s.addFiles(I))}async function te($){var R;const I=Array.from(((R=$.dataTransfer)==null?void 0:R.files)??[]);I.length>0&&($.preventDefault(),await s.addFiles(I))}xe(h,$=>ga(u.draftKey??"",$)),xe(()=>u.draftKey,($,I)=>{I&&ga(I,h.value),h.value=ba($??"")}),xe(()=>s.insertRequest,$=>{!$||$.key!==(u.draftKey??"")||(h.value=h.value.trim()?`${h.value.trimEnd()} ${$.text}`:$.text,je(()=>{var I;return(I=g.value)==null?void 0:I.focus()}))});const ne=S([]);let ee=-1;function L(){if(u.busy||s.uploading)return;const $=h.value.trim(),I=s.pending.filter(fe=>fe.status==="ready");if(!$&&I.length===0)return;const R=I.map(fe=>({id:fe.id,filePath:fe.filePath,fileName:fe.filename,mimeType:fe.mimeType,kind:fe.kind,size:fe.size,...fe.previewUrl?{previewUrl:fe.previewUrl}:{}}));n("send",$,R),s.clearAttachments(),$&&ne.value[ne.value.length-1]!==$&&ne.value.push($),ee=-1,h.value=""}function F($){if(ne.value.length!==0){if($===-1)ee=ee===-1?ne.value.length-1:Math.max(0,ee-1);else{if(ee===-1)return;if(ee=ee+1,ee>=ne.value.length){ee=-1,h.value="";return}}h.value=ne.value[ee]}}function P($){var R,fe;if($.isComposing)return;if(A.value&&y.value.length>0){if($.key==="ArrowDown"){w.value=(w.value+1)%y.value.length,$.preventDefault();return}if($.key==="ArrowUp"){w.value=(w.value-1+y.value.length)%y.value.length,$.preventDefault();return}if($.key==="Enter"||$.key==="Tab"){const H=y.value[w.value];H&&_(H.name),$.preventDefault();return}if($.key==="Escape"){A.value=!1,$.preventDefault();return}}if($.key==="Escape"){u.busy&&(n("cancel"),$.preventDefault());return}if($.key==="Enter"&&!$.shiftKey){L(),$.preventDefault();return}const I=(((R=g.value)==null?void 0:R.selectionStart)??0)===0&&(((fe=g.value)==null?void 0:fe.selectionEnd)??0)===0;if($.key==="ArrowUp"&&I){F(-1),$.preventDefault();return}if($.key==="ArrowDown"&&ee!==-1&&I){F(1),$.preventDefault();return}}function O(){ee=-1}return($,I)=>(d(),b("form",{class:"relative border-t border-border px-0 py-3 lg:p-3",onSubmit:Ae(L,["prevent"]),onDrop:Ae(te,["prevent"]),onDragover:I[4]||(I[4]=Ae(()=>{},["prevent"]))},[f("input",{ref_key:"fileInput",ref:E,type:"file",multiple:"",class:"hidden","data-test":"attach-input",onChange:N},null,544),f("div",l2,[v(s).pending.length?(d(),b("div",c2,[(d(!0),b(J,null,le(v(s).pending,R=>(d(),b("div",{key:R.id,class:"flex items-center gap-1.5 rounded-md border border-border bg-raised px-2 py-1 text-[12px]"},[R.previewUrl?(d(),b("img",{key:0,src:R.previewUrl,class:"h-6 w-6 rounded object-cover",alt:R.filename},null,8,d2)):M("",!0),f("span",f2,k(R.filename),1),R.status==="uploading"?(d(),b("span",p2,"…")):R.status==="error"?(d(),b("span",h2,"!")):M("",!0),f("button",{type:"button",title:$.$t("chat.attach.remove"),class:"text-fg-muted hover:text-fg transition-colors",onClick:fe=>v(s).removeAttachment(R.id)},[B(v(st),{size:12})],8,m2)]))),128))])):M("",!0),v(s).rejection?(d(),b("span",b2,k(v(s).rejection.reason==="too-many"?$.$t("chat.attach.tooMany"):$.$t("chat.attach.tooLarge",{name:v(s).rejection.filename})),1)):M("",!0),A.value&&y.value.length?(d(),b("ul",g2,[(d(!0),b(J,null,le(y.value,(R,fe)=>(d(),b("li",{key:R.name,"data-test":"cmd-item",role:"option","aria-selected":fe===w.value,class:X(["flex cursor-pointer items-baseline gap-2 px-3 py-1.5 text-[13px]",fe===w.value?"bg-accent/10":""]),onMousedown:Ae(H=>_(R.name),["prevent"]),onMouseenter:H=>w.value=fe},[f("span",v2,"/"+k(R.name),1),R.description?(d(),b("span",y2,k(R.description),1)):M("",!0)],42,x2))),128))])):M("",!0),_e(f("textarea",{ref_key:"textarea",ref:g,"onUpdate:modelValue":I[0]||(I[0]=R=>h.value=R),rows:"2",class:"w-full resize-none bg-transparent px-3.5 pt-2.5 pb-1 text-[16px] lg:text-[14px] leading-relaxed text-fg placeholder:text-fg-muted focus:outline-none",placeholder:e.busy?$.$t("chat.working"):$.$t("chat.message"),onInput:O,onKeydown:P,onPaste:V},null,40,k2),[[Re,h.value]]),f("div",_2,[e.instanceId&&e.sessionAlias?(d(),b("div",w2,[f("button",{type:"button","data-test":"model-chip",class:"flex items-center gap-1.5 px-1.5 py-1 rounded-md text-fg-muted hover:bg-raised transition-colors disabled:opacity-60",disabled:!v(a).available.length,onClick:I[1]||(I[1]=R=>c.value=!c.value)},[B(v(Un),{size:14,class:"text-accent"}),f("span",A2,k(v(a).current||$.$t("chat.model")),1),v(a).available.length?(d(),G(v(at),{key:0,size:13})):M("",!0)],8,E2),c.value&&v(a).available.length?(d(),b("ul",$2,[(d(!0),b(J,null,le(v(a).available,R=>(d(),b("li",{key:R},[f("button",{type:"button","data-test":"model-option",class:X(["flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",R===v(a).current?"bg-accent/10 text-accent":"hover:bg-fg/10 text-fg-muted"]),onClick:fe=>x(R)},[f("span",D2,k(R),1),R===v(a).current?(d(),G(v(uu),{key:0,size:14,class:"ml-auto"})):M("",!0)],10,C2)]))),128))])):M("",!0),v(a).error?(d(),b("span",T2,k(v(a).error),1)):M("",!0),o.value?(d(),b("button",{key:2,type:"button","data-test":"context-meter",class:"flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded pl-0.5 hover:opacity-80",title:$.$t("chat.contextUsage",{used:o.value.used.toLocaleString(),size:o.value.size.toLocaleString()}),onClick:p},[B(v(go),{size:13,class:X(["shrink-0",o.value.tone==="danger"?"text-danger":o.value.tone==="warn"?"text-warn":"text-accent"])},null,8,["class"]),f("span",F2,[f("span",{class:X(["absolute inset-y-0 left-0 rounded-full",o.value.tone==="danger"?"bg-danger":o.value.tone==="warn"?"bg-warn":"bg-accent"]),style:tu({width:o.value.pct+"%"})},null,6)]),f("span",I2,k(o.value.pct)+"%",1)],8,S2)):M("",!0),o.value&&i.value?(d(),G(o2,{key:3,used:o.value.used,size:o.value.size,pct:o.value.pct,cost:o.value.cost,breakdown:o.value.breakdown,anchor:l.value,onDismiss:I[2]||(I[2]=R=>i.value=!1)},null,8,["used","size","pct","cost","breakdown","anchor"])):M("",!0)])):(d(),b("span",M2)),f("div",z2,[f("button",{type:"button","data-test":"attach-btn",title:$.$t("chat.attach.add"),class:"flex items-center gap-1.5 px-1.5 py-1 rounded-md text-fg-muted hover:bg-raised transition-colors",onClick:D},[B(v(wo),{size:15})],8,L2),e.busy?(d(),b("button",{key:0,type:"button","data-test":"composer-stop",class:"flex items-center gap-1.5 pl-3 pr-2.5 py-1.5 rounded-md bg-danger text-white text-[12.5px] font-semibold hover:opacity-90 transition-all",onClick:I[3]||(I[3]=R=>n("cancel"))},k($.$t("chat.stop")),1)):(d(),b("button",{key:1,type:"submit","data-test":"composer-send",disabled:v(s).uploading||!h.value.trim()&&!v(s).pending.filter(R=>R.status==="ready").length,class:"flex items-center gap-1.5 pl-3 pr-2.5 py-1.5 rounded-md bg-accent text-white text-[12.5px] font-semibold shadow-e1 hover:bg-accent-hover hover:shadow-e2 transition-all disabled:bg-fg/10 disabled:text-fg-muted disabled:shadow-none"},[he(k($.$t("chat.send"))+" ",1),B(v(Co),{size:14})],8,O2))])])])],32))}}),N2={key:0,"data-test":"plan-panel",class:"rounded-md border border-border bg-surface p-2 text-sm"},P2=["aria-expanded","aria-label"],B2={class:"ml-auto font-mono tabular-nums"},U2=["data-test"],q2=de({__name:"PlanPanel",props:{entries:{},active:{type:Boolean,default:void 0}},setup(e){const t=e,u=S(t.active??!0),n=S(null),s=Z(()=>t.entries.filter(l=>l.status==="completed").length),a=Z(()=>{let l=-1;return t.entries.forEach((p,c)=>{p.status==="in_progress"&&(l=c)}),l>=0?l:(t.entries.forEach((p,c)=>{p.status==="completed"&&(l=c)}),l>=0?l:t.entries.length-1)}),r=l=>l==="completed"?$a:l==="in_progress"?Lt:lo,o=l=>l==="completed"?"text-run":l==="in_progress"?"text-accent":"text-fg-muted";async function i(){var c;if(!u.value)return;await je();const l=n.value;if(!l)return;const p=l.children[a.value];(c=p==null?void 0:p.scrollIntoView)==null||c.call(p,{block:"nearest"})}return xe(()=>t.entries,i,{flush:"post"}),xe(u,i),xe(()=>t.active,l=>{l!==void 0&&(u.value=l)}),(l,p)=>e.entries.length?(d(),b("div",N2,[f("button",{type:"button","data-test":"plan-toggle","aria-expanded":u.value,"aria-controls":"plan-list","aria-label":l.$t("plan.togglePlan"),class:"mb-1 flex w-full items-center gap-1.5 text-xs font-semibold uppercase text-fg-muted hover:text-fg transition-colors",onClick:p[0]||(p[0]=c=>u.value=!u.value)},[u.value?(d(),G(v(at),{key:0,size:12,class:"shrink-0"})):(d(),G(v(kt),{key:1,size:12,class:"shrink-0"})),he(" "+k(l.$t("plan.title"))+" ",1),f("span",B2,k(s.value)+"/"+k(e.entries.length),1)],8,P2),_e(f("ul",{id:"plan-list",ref_key:"listEl",ref:n,class:"max-h-48 overflow-y-auto thin-scroll space-y-0.5"},[(d(!0),b(J,null,le(e.entries,(c,x)=>(d(),b("li",{key:x,"data-test":x===a.value?"plan-active":void 0,class:"flex items-start gap-1.5"},[(d(),G(Mt(r(c.status)),{size:13,class:X([o(c.status),"mt-0.5 shrink-0",c.status==="in_progress"?"animate-spin motion-reduce:animate-none":""])},null,8,["class"])),f("span",{class:X(["min-w-0",c.status==="completed"?"text-fg-muted line-through":"text-fg"])},k(c.content),3)],8,U2))),128))],512),[[qu,u.value]])])):M("",!0)}}),j2={class:"flex h-full flex-1 flex-col"},H2={key:0,class:"flex flex-1 items-center justify-center text-fg-muted"},W2={class:"shrink-0 flex min-h-11 lg:h-11 items-center gap-2.5 border-b border-border bg-surface/60 px-3 lg:px-5 py-1.5 lg:py-0 backdrop-blur-md"},V2={class:"hidden lg:block text-[14px] font-semibold tracking-tight text-fg"},G2={key:0,class:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden"},K2=["title"],Z2={class:"min-w-0 truncate"},X2={key:1,"data-test":"ctx-chip-instance",class:"flex min-w-0 max-w-[9rem] items-center gap-1 whitespace-nowrap rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted"},Y2={class:"min-w-0 truncate"},J2={key:2,"data-test":"ctx-chip-agent",class:"flex min-w-0 max-w-[9rem] items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted"},Q2={class:"min-w-0 truncate"},em=["title"],tm={key:0,class:"min-w-0 truncate font-mono"},um={key:1,class:"shrink-0 italic"},nm={class:"shrink-0 text-warn"},sm={key:0,"data-test":"chat-error",class:"bg-danger/10 px-4 py-1 text-xs text-danger"},am={class:"shrink-0 space-y-2 bg-gradient-to-t from-bg to-transparent px-2 lg:px-5 pb-[max(1rem,env(safe-area-inset-bottom))] pt-1.5"},rm={key:0,"data-test":"turn-hud",class:"flex items-center gap-2 rounded-lg border border-run/20 bg-run/8 px-3 py-1.5"},om={class:"text-[12px] font-semibold text-run"},im={class:"font-mono text-[12px] font-semibold tabular-nums text-run"},lm={key:0,class:"text-[11.5px] text-fg-muted"},cm=de({__name:"ChatPane",emits:["show-files"],setup(e,{emit:t}){const u=t,n=$t(),s=pt(),a=Wu(),r=za();function o(A,w=[]){n.send(A,w)}xe(()=>n.instanceId,A=>{A&&r.bindInstance(A)},{immediate:!0}),xe(()=>[n.instanceId,n.sessionAlias],([A,w],C)=>{C&&(A!==C[0]||w!==C[1])&&r.clearAttachments()});const i=Z(()=>n.instanceId?s.byId(n.instanceId):void 0),l=Z(()=>{var A;return(A=i.value)==null?void 0:A.sessions.find(w=>w.alias===n.sessionAlias)});xe(()=>{var A;return[n.instanceId,(A=l.value)==null?void 0:A.workspace]},([A,w])=>{A&&w?a.loadGitSummary(A,w):a.gitSummary=null},{immediate:!0});const p=S(Date.now()),c=setInterval(()=>{p.value=Date.now()},1e3);Ru(()=>clearInterval(c));const x=Z(()=>{if(!n.liveTurn)return"";const A=Math.max(0,Math.floor((p.value-n.liveTurn.startedAt)/1e3));return`${Math.floor(A/60)}:${String(A%60).padStart(2,"0")}`}),h=Z(()=>n.liveToolSteps.filter(A=>A.status==="running").length),g=["Working","Thinking","Pondering","Cogitating","Reasoning","Computing","Churning","Crunching","Percolating","Noodling","Mulling","Brewing","Processing","Deliberating","Ruminating","Synthesizing","Wrangling","Tinkering"],E=Z(()=>{if(!n.liveTurn)return g[0];const A=Math.max(0,Math.floor((p.value-n.liveTurn.startedAt)/1e3));return g[Math.floor(A/10)%g.length]});return(A,w)=>{var C,y,_,D;return d(),b("div",j2,[v(n).sessionAlias?(d(),b(J,{key:1},[f("div",W2,[f("h1",V2,k(v(n).sessionAlias),1),l.value||i.value?(d(),b("div",G2,[(C=l.value)!=null&&C.workspace?(d(),b("button",{key:0,"data-test":"ctx-chip-workspace",class:"flex min-w-0 max-w-[10rem] items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted hover:bg-fg/5",title:A.$t("chat.browseFiles"),onClick:w[0]||(w[0]=N=>u("show-files"))},[B(v(zn),{size:11,class:"shrink-0 text-warn"}),f("span",Z2,k(l.value.workspace),1)],8,K2)):M("",!0),(y=i.value)!=null&&y.name?(d(),b("span",X2,[w[4]||(w[4]=f("span",{class:"shrink-0 font-mono text-accent"},"@",-1)),f("span",Y2,k(i.value.name),1)])):M("",!0),(_=l.value)!=null&&_.agent?(d(),b("span",J2,[B(v(Mn),{size:11,class:"shrink-0 text-accent"}),f("span",Q2,k(l.value.agent),1)])):M("",!0),v(a).gitSummary?(d(),b("button",{key:3,"data-test":"git-summary",class:"flex min-w-0 max-w-[13rem] items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-surface py-0.5 pl-1.5 pr-2 text-[10.5px] font-medium text-fg-muted hover:bg-fg/5",title:v(a).gitSummary.branch||A.$t("chat.viewChanges"),onClick:w[1]||(w[1]=N=>{v(a).tab="changes",u("show-files")})},[B(v(Ln),{size:11,class:"shrink-0 text-warn"}),v(a).gitSummary.branch?(d(),b("span",tm,k(v(a).gitSummary.branch),1)):v(a).gitSummary.detached?(d(),b("span",um,k(A.$t("files.detached")),1)):M("",!0),w[5]||(w[5]=f("span",{class:"h-1 w-1 shrink-0 rounded-full bg-warn","aria-hidden":"true"},null,-1)),f("span",nm,k(v(a).gitSummary.changedCount)+" "+k(A.$t("chat.changed")),1)],8,em)):M("",!0)])):M("",!0)]),v(n).error?(d(),b("div",sm,[he(k(v(n).error)+" ",1),f("button",{class:"ml-2 text-danger underline",onClick:w[2]||(w[2]=N=>v(n).error="")},k(A.$t("common.dismiss")),1)])):M("",!0),B(Vh,{messages:v(n).messages,"live-turn":v(n).liveTurn,"session-key":`${v(n).instanceId}\0${v(n).sessionAlias}`,"scroll-to-scheduled":v(n).scrollRequest,"has-more-older":v(n).hasMoreOlder,"loading-older":v(n).loadingOlder,onResend:v(n).resend,onLoadOlder:v(n).loadOlder},null,8,["messages","live-turn","session-key","scroll-to-scheduled","has-more-older","loading-older","onResend","onLoadOlder"]),f("div",am,[v(n).busy?(d(),b("div",rm,[w[6]||(w[6]=f("span",{class:"h-2 w-2 rounded-full bg-run pulse-dot","aria-hidden":"true"},null,-1)),f("span",om,k(E.value)+"…",1),f("span",im,k(x.value),1),h.value>0?(d(),b("span",lm,"· "+k(h.value)+" "+k(h.value===1?A.$t("chat.tool"):A.$t("chat.tools")),1)):M("",!0),w[7]||(w[7]=f("span",{class:"flex-1"},null,-1)),f("button",{"data-test":"cancel-turn",class:"flex items-center gap-1.5 text-[11.5px] font-medium text-danger transition-opacity hover:opacity-80",onClick:w[3]||(w[3]=(...N)=>v(n).cancel&&v(n).cancel(...N))},[B(v(st),{size:13}),he(k(A.$t("common.cancel")),1)])])):M("",!0),(D=v(n).sessionPlan)!=null&&D.length?(d(),G(q2,{key:1,entries:v(n).sessionPlan,active:v(n).busy},null,8,["entries","active"])):M("",!0),B(R2,{busy:v(n).busy,"draft-key":`${v(n).instanceId}\0${v(n).sessionAlias}`,"instance-id":v(n).instanceId,"session-alias":v(n).sessionAlias,onSend:o,onCancel:v(n).cancel},null,8,["busy","draft-key","instance-id","session-alias","onCancel"])])],64)):(d(),b("div",H2,k(A.$t("chat.selectSession")),1))])}}}),dm=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/;function fm(e){const t=[];let u=0,n=0,s=0,a=0,r=!1;for(const o of e.split(`
286
+ `)){const i=dm.exec(o);if(i){s=Number(i[1]),a=Number(i[2]),r=!0,t.push({type:"hunk",oldNo:null,newNo:null,text:i[3].trim()});continue}if(!r)continue;const l=o[0];if(l==="+"){if(o.startsWith("+++"))continue;t.push({type:"add",oldNo:null,newNo:a,text:o.slice(1)}),a++,u++}else if(l==="-"){if(o.startsWith("---"))continue;t.push({type:"del",oldNo:s,newNo:null,text:o.slice(1)}),s++,n++}else l===" "&&(t.push({type:"context",oldNo:s,newNo:a,text:o.slice(1)}),s++,a++)}return{rows:t,add:u,del:n}}const pm={class:"flex h-full flex-1 flex-col bg-bg","data-test":"file-viewer-center"},hm={class:"flex h-11 shrink-0 items-center gap-2 border-b border-border bg-surface/60 px-3 backdrop-blur-md"},mm=["aria-label"],bm=["aria-label"],gm={class:"truncate font-mono text-[12.5px] text-fg"},xm={class:"shrink-0 text-[11px] text-fg-muted"},vm={key:0,class:"shrink-0 rounded bg-warn/10 px-1 text-[10.5px] text-warn"},ym={key:1,class:"shrink-0 rounded bg-fg/5 px-1 text-[10.5px] text-fg-muted"},km={class:"truncate font-mono text-[12.5px] text-fg"},_m={class:"ml-auto flex shrink-0 items-center gap-1"},wm=["aria-label"],Em={class:"min-h-0 flex-1 overflow-auto thin-scroll"},Am={key:0,"data-test":"fv-file-body"},$m=["innerHTML"],Cm={key:1,class:"overflow-x-auto p-4 font-mono text-[12.5px] leading-relaxed text-fg whitespace-pre"},Dm={key:1,"data-test":"fv-file-body",class:"overflow-x-auto p-4 font-mono text-[12.5px] leading-relaxed text-fg whitespace-pre"},Tm={key:2,class:"p-6 text-sm text-fg-muted"},Sm={key:0,"data-test":"fv-diff-body",class:"font-mono text-[12.5px] leading-relaxed"},Fm={class:"sticky left-0 w-12 shrink-0 select-none border-r border-border bg-surface px-2 text-right tabular-nums text-fg-muted/70"},Im={class:"w-12 shrink-0 select-none border-r border-border bg-surface px-2 text-right tabular-nums text-fg-muted/70"},Mm={key:1,class:"p-6 text-sm text-fg-muted"},zm={key:2,class:"px-4 py-1 text-xs text-warn"},xa=5e3,Lm=de({__name:"FileViewer",emits:["back","close"],setup(e,{emit:t}){const u=t,n=Wu(),s=Z(()=>{const l=n.file;return!l||l.binary?[]:l.content.split(`
287
+ `)}),a=S("");let r=null;xe(()=>{var l,p,c;return[(l=n.file)==null?void 0:l.path,(p=n.file)==null?void 0:p.content,(c=n.file)==null?void 0:c.binary]},([l,p,c])=>{if(r&&clearTimeout(r),a.value="",!n.file||c||p===void 0||s.value.length>xa)return;const x=p;r=setTimeout(()=>{(async()=>{var A;const{resolveLang:h,highlightToHtml:g}=await Jr(async()=>{const{resolveLang:w,highlightToHtml:C}=await import("./shiki-DwML4nT4.js");return{resolveLang:w,highlightToHtml:C}},__vite__mapDeps([0,1,2])),E=await g(x,h(l));((A=n.file)==null?void 0:A.content)===x&&(a.value=E)})()},150)},{immediate:!0});const o=Z(()=>{var l;return(l=n.diff)!=null&&l.diff?fm(n.diff.diff):null});function i(l){return l===void 0?"":l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/1024/1024).toFixed(1)} MB`}return(l,p)=>(d(),b("div",pm,[f("div",hm,[f("button",{"data-test":"fv-back-list","aria-label":l.$t("files.backToList"),class:"flex lg:hidden items-center gap-1.5 rounded-md px-2 py-1 text-[12px] font-medium text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:p[0]||(p[0]=c=>u("back"))},[B(v(ys),{size:14}),he(k(l.$t("files.title")),1)],8,mm),f("button",{"data-test":"fv-back","aria-label":l.$t("files.back"),class:"hidden lg:flex items-center gap-1.5 rounded-md px-2 py-1 text-[12px] font-medium text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:p[1]||(p[1]=c=>u("close"))},[B(v(ys),{size:14}),he(k(l.$t("files.back")),1)],8,bm),p[3]||(p[3]=f("span",{class:"h-4 w-px bg-border","aria-hidden":"true"},null,-1)),v(n).file?(d(),b(J,{key:0},[B(v(hu),{size:14,class:"shrink-0 text-accent"}),f("span",gm,k(v(n).file.path),1),f("span",xm,k(i(v(n).file.size)),1),v(n).file.truncated?(d(),b("span",vm,k(l.$t("files.truncated")),1)):M("",!0),v(n).file.binary?(d(),b("span",ym,k(l.$t("files.binary")),1)):M("",!0)],64)):v(n).diffPath?(d(),b(J,{key:1},[B(v(mo),{size:14,class:"shrink-0 text-accent"}),f("span",km,k(v(n).diffPath),1)],64)):M("",!0),f("div",_m,[v(n).file&&!v(n).file.binary?(d(),G(Cr,{key:0,text:v(n).file.content},null,8,["text"])):M("",!0),f("button",{"data-test":"fv-close","aria-label":l.$t("files.closeFile"),class:"grid h-7 w-7 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:hidden",onClick:p[2]||(p[2]=c=>u("close"))},[B(v(st),{size:16})],8,wm)])]),f("div",Em,[v(n).file?(d(),b(J,{key:0},[!v(n).file.binary&&s.value.length<=xa?(d(),b("div",Am,[a.value?(d(),b("div",{key:0,innerHTML:a.value},null,8,$m)):(d(),b("pre",Cm,k(v(n).file.content),1))])):v(n).file.binary?(d(),b("div",Tm,k(l.$t("files.binaryNotShown")),1)):(d(),b("pre",Dm,k(v(n).file.content),1))],64)):v(n).diffPath&&v(n).diff?(d(),b(J,{key:1},[o.value&&o.value.rows.length?(d(),b("div",Sm,[(d(!0),b(J,null,le(o.value.rows,(c,x)=>(d(),b("div",{key:x,"data-test":"fv-diff-row",class:X(["flex",c.type==="add"?"bg-run/10":c.type==="del"?"bg-danger/10":c.type==="hunk"?"bg-info/5":""])},[f("span",Fm,k(c.oldNo??""),1),f("span",Im,k(c.newNo??""),1),f("span",{class:X(["w-4 shrink-0 select-none text-center",c.type==="add"?"text-run":c.type==="del"?"text-danger":"text-fg-muted/40"])},k(c.type==="add"?"+":c.type==="del"?"-":""),3),f("span",{class:X(["whitespace-pre px-2",c.type==="hunk"?"text-info":"text-fg"])},k(c.text),3)],2))),128))])):(d(),b("div",Mm,k(l.$t("files.noDiffContent")),1)),v(n).diff.truncated?(d(),b("div",zm,k(l.$t("files.diffTruncated")),1)):M("",!0)],64)):M("",!0)])]))}}),Om={"data-test":"scheduled-item",class:"rounded-md border border-border bg-bg text-sm"},Rm={class:"flex items-center gap-1 px-2 py-1.5"},Nm=["data-test"],Pm=["data-test"],Bm={class:"min-w-0 flex-1 truncate text-[12.5px] text-fg"},Um={class:"flex shrink-0 items-center gap-0.5"},qm=["title","aria-label"],jm=["title","aria-label"],Hm=["data-test"],Wm={class:"whitespace-pre-wrap text-[12.5px] text-fg"},Vm={class:"font-mono text-[10.5px] tabular-nums text-fg-muted"},Gm=["data-test"],va=de({__name:"ScheduledTaskRow",props:{task:{}},emits:["view"],setup(e,{emit:t}){const u=e,n=t,{t:s}=zt(),a=_u(),r=$t(),o=S(!1);function i(c){switch(c){case"pending":return{label:s("tasks.statusUpcoming"),cls:"text-fg-muted",icon:Ca};case"triggering":return{label:s("tasks.statusRunning"),cls:"text-run",icon:Lt,spin:!0};case"executed":return{label:s("tasks.statusDone"),cls:"text-run",icon:$a};case"failed":return{label:s("tasks.statusFailed"),cls:"text-danger",icon:io};case"missed":return{label:s("tasks.statusMissed"),cls:"text-warn",icon:pu};case"cancelled":return{label:s("tasks.statusCancelled"),cls:"text-fg-muted",icon:Aa}}}function l(){r.requestScrollToScheduled(u.task.id),n("view")}async function p(c){await ku({title:s("tasks.cancelScheduledTitle"),message:s("tasks.cancelScheduledBody"),confirmLabel:s("tasks.cancelTask"),cancelLabel:s("tasks.keep"),tone:"danger"})&&await a.cancelScheduled(c)}return(c,x)=>(d(),b("li",Om,[f("div",Rm,[f("button",{type:"button","data-test":`scheduled-toggle-${e.task.id}`,class:"flex min-w-0 flex-1 items-center gap-1.5 text-left cursor-pointer",onClick:x[0]||(x[0]=h=>o.value=!o.value)},[B(v(kt),{size:12,class:X(["shrink-0 text-fg-muted transition-transform",o.value?"rotate-90":""])},null,8,["class"]),f("span",{"data-test":`scheduled-status-${e.task.id}`,class:X(["inline-flex shrink-0 items-center gap-1 text-[11px] font-medium",i(e.task.status).cls])},[(d(),G(Mt(i(e.task.status).icon),{size:12,class:X(i(e.task.status).spin?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])),he(" "+k(i(e.task.status).label),1)],10,Pm),f("span",Bm,k(e.task.message),1)],8,Nm),f("span",Um,[e.task.status==="executed"?(d(),b("button",{key:0,"data-test":"view-scheduled",title:c.$t("tasks.viewRunTitle"),"aria-label":c.$t("tasks.viewRun"),class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-accent/15 hover:text-accent",onClick:l},[B(v(ho),{size:13})],8,qm)):M("",!0),e.task.status==="pending"?(d(),b("button",{key:1,"data-test":"cancel-scheduled",title:c.$t("tasks.cancelScheduled"),"aria-label":c.$t("tasks.cancelScheduled"),class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger",onClick:x[1]||(x[1]=h=>p(e.task.id))},[B(v(mu),{size:13})],8,jm)):M("",!0)])]),o.value?(d(),b("div",{key:0,"data-test":`scheduled-detail-${e.task.id}`,class:"space-y-1 border-t border-border px-2 py-1.5"},[f("p",Wm,k(e.task.message),1),f("p",Vm,k(v(qn)(e.task.executeAt)),1),e.task.status==="failed"&&e.task.lastError?(d(),b("p",{key:0,"data-test":`scheduled-error-${e.task.id}`,class:"rounded bg-danger/10 px-2 py-1 text-[11px] text-danger"},k(e.task.lastError),9,Gm)):M("",!0)],8,Hm)):M("",!0)]))}}),Km={class:"shrink-0 border-b border-border bg-surface p-3"},Zm={class:"mb-2 flex items-center gap-1.5"},Xm={class:"text-xs font-semibold uppercase tracking-wide text-fg-muted"},Ym={key:0,class:"rounded-full bg-bg px-1.5 font-mono text-[10px] tabular-nums text-fg-muted"},Jm=["title","aria-label"],Qm={class:"space-y-1"},eb={key:0,class:"rounded-md border border-dashed border-border px-2 py-2 text-center text-[11px] text-fg-muted"},tb={class:"flex flex-col gap-1"},ub={class:"text-[10px] font-semibold uppercase tracking-wide text-fg-muted"},nb={class:"flex flex-col gap-1"},sb={class:"text-[10px] font-semibold uppercase tracking-wide text-fg-muted"},ab=["placeholder"],rb={class:"flex items-center gap-1.5 pt-0.5"},ob=["disabled"],ib=["aria-label"],lb={class:"flex items-center justify-between border-b border-border px-4 py-3"},cb={class:"text-sm font-semibold text-fg"},db=["aria-label"],fb={class:"flex-1 space-y-1 overflow-y-auto p-3"},ya=3,pb=de({__name:"ScheduledTasks",setup(e){const t=_u(),u=$t(),n=S(""),s=S(""),a=S(!1),r=Z(()=>t.scheduled.slice(0,ya)),o=Z(()=>Math.max(0,t.scheduled.length-ya)),i=S(!1);async function l(){if(!u.instanceId||!u.sessionAlias||!n.value||!s.value)return;const p=new Date(n.value).toISOString();await t.createScheduled(u.instanceId,u.sessionAlias,p,s.value),n.value="",s.value="",a.value=!1}return(p,c)=>(d(),b("div",Km,[f("div",Zm,[B(v(ao),{size:13,class:"shrink-0 text-fg-muted"}),f("h3",Xm,k(p.$t("tasks.scheduled")),1),v(t).scheduled.length?(d(),b("span",Ym,k(v(t).scheduled.length),1)):M("",!0),f("button",{type:"button","data-test":"scheduled-compose-toggle",title:p.$t("tasks.newScheduled"),"aria-label":p.$t("tasks.newScheduled"),class:X(["ml-auto grid h-6 w-6 place-items-center rounded-md transition-colors hover:bg-raised hover:text-fg",a.value?"bg-raised text-fg":"text-fg-muted"]),onClick:c[0]||(c[0]=x=>a.value=!a.value)},[B(v(ju),{size:14,class:X(["transition-transform",a.value?"rotate-45":""])},null,8,["class"])],10,Jm)]),f("ul",Qm,[(d(!0),b(J,null,le(r.value,x=>(d(),G(va,{key:x.id,task:x},null,8,["task"]))),128)),v(t).scheduled.length===0?(d(),b("li",eb,k(p.$t("tasks.noScheduled")),1)):M("",!0)]),o.value>0?(d(),b("button",{key:0,type:"button","data-test":"scheduled-view-all",class:"mt-1.5 flex w-full items-center justify-center gap-1 rounded-md border border-border bg-bg px-2 py-1 text-[11px] font-medium text-fg-muted transition-colors hover:bg-accent/10 hover:text-accent",onClick:c[1]||(c[1]=x=>i.value=!0)},[he(k(p.$t("tasks.viewAll",{count:v(t).scheduled.length}))+" ",1),B(v(at),{size:12})])):M("",!0),a.value?(d(),b("form",{key:1,"data-test":"scheduled-composer",class:"mt-2 space-y-2 rounded-lg border border-border bg-bg p-2.5",onSubmit:Ae(l,["prevent"])},[f("label",tb,[f("span",ub,k(p.$t("tasks.whenLabel")),1),_e(f("input",{"onUpdate:modelValue":c[2]||(c[2]=x=>n.value=x),type:"datetime-local",class:"w-full rounded-md border border-border bg-surface px-2 py-1 text-xs text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"},null,512),[[Re,n.value]])]),f("label",nb,[f("span",sb,k(p.$t("tasks.messageLabel")),1),_e(f("input",{"onUpdate:modelValue":c[3]||(c[3]=x=>s.value=x),placeholder:p.$t("tasks.messagePlaceholder"),class:"w-full rounded-md border border-border bg-surface px-2 py-1 text-xs text-fg placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"},null,8,ab),[[Re,s.value]])]),f("div",rb,[f("button",{type:"submit",disabled:!n.value||!s.value,class:"flex-1 rounded-md bg-accent px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-accent-hover disabled:cursor-not-allowed disabled:opacity-40"},k(p.$t("tasks.schedule")),9,ob),f("button",{type:"button",class:"rounded-md border border-border px-2 py-1 text-xs text-fg-muted transition-colors hover:bg-raised hover:text-fg",onClick:c[4]||(c[4]=x=>a.value=!1)},k(p.$t("common.cancel")),1)])],32)):M("",!0),(d(),G(eu,{to:"body"},[B(Qr,{"enter-active-class":"transition-opacity duration-200 ease-out motion-reduce:transition-none","enter-from-class":"opacity-0","leave-active-class":"transition-opacity duration-150 ease-in motion-reduce:transition-none","leave-to-class":"opacity-0"},{default:gt(()=>[i.value?(d(),b("div",{key:0,"data-test":"scheduled-drawer",class:"fixed inset-0 z-50 flex justify-end bg-black/50",onClick:c[7]||(c[7]=Ae(x=>i.value=!1,["self"])),onKeydown:c[8]||(c[8]=Bn(x=>i.value=!1,["esc"]))},[f("aside",{class:"flex h-full w-full max-w-md flex-col border-l border-border bg-raised shadow-xl",role:"dialog","aria-label":p.$t("tasks.allScheduled")},[f("header",lb,[f("h2",cb,k(p.$t("tasks.scheduledCount",{count:v(t).scheduled.length})),1),f("button",{class:"rounded p-1 text-fg-muted hover:bg-fg/5 hover:text-fg","aria-label":p.$t("tasks.close"),"data-test":"scheduled-drawer-close",onClick:c[5]||(c[5]=x=>i.value=!1)},[B(v(st),{size:16})],8,db)]),f("ul",fb,[(d(!0),b(J,null,le(v(t).scheduled,x=>(d(),G(va,{key:x.id,task:x,onView:c[6]||(c[6]=h=>i.value=!1)},null,8,["task"]))),128))])],8,ib)],32)):M("",!0)]),_:1})]))]))}}),hb={class:"flex min-h-0 flex-col bg-surface"},mb={class:"shrink-0 px-3 pt-3 pb-2 text-xs font-semibold uppercase text-fg-muted"},bb={class:"min-h-0 flex-1 space-y-1 overflow-y-auto thin-scroll px-3 pb-3"},gb={class:"flex min-w-0 items-center gap-1.5"},xb={class:"truncate"},vb=["title","aria-label","onClick"],yb={key:0,class:"text-xs text-fg-muted"},kb={key:1,class:"pt-0.5 text-center text-[10.5px] text-fg-muted"},Fn=10,_b=de({__name:"OrchestrationTasks",setup(e){const{t}=zt(),u=_u(),n=Z(()=>[...u.orchestration].sort((r,o)=>o.createdAt.localeCompare(r.createdAt)).slice(0,Fn));async function s(r){await ku({title:t("tasks.cancelTitle"),message:t("tasks.cancelBody"),confirmLabel:t("tasks.cancelConfirm"),cancelLabel:t("tasks.keepRunning"),tone:"danger"})&&await u.cancelOrchestration(r)}function a(r){const o=r.toLowerCase();return o.includes("run")||o.includes("active")?"text-run":o.includes("fail")||o.includes("error")||o.includes("cancel")?"text-danger":o.includes("wait")||o.includes("pending")||o.includes("block")?"text-warn":"text-fg-muted"}return(r,o)=>(d(),b("div",hb,[f("h3",mb,k(r.$t("tasks.orchestration")),1),f("ul",bb,[(d(!0),b(J,null,le(n.value,i=>(d(),b("li",{key:i.taskId,class:"flex items-center justify-between text-sm text-fg"},[f("span",gb,[B(v(Pu),{size:14,class:"shrink-0 text-fg-muted"}),f("span",xb,[he(k(i.task)+" ",1),f("span",{class:X(["text-xs",a(i.status)])},"("+k(i.status)+")",3)])]),f("button",{"data-test":"cancel-orchestration",title:r.$t("tasks.cancelTask"),"aria-label":r.$t("tasks.cancelOrchestrationAria"),class:"ml-2 grid h-6 w-6 shrink-0 place-items-center rounded text-fg-muted transition-colors hover:bg-danger/15 hover:text-danger",onClick:l=>s(i.taskId)},[B(v(Aa),{size:13})],8,vb)]))),128)),v(u).orchestration.length===0?(d(),b("li",yb,k(r.$t("tasks.noOrchestration")),1)):M("",!0),v(u).orchestration.length>Fn?(d(),b("li",kb,k(r.$t("tasks.moreOrchestration",{count:v(u).orchestration.length-Fn})),1)):M("",!0)])]))}}),wb={key:0,class:"flex h-full flex-col"},Eb={key:1,class:"p-4 text-sm text-fg-muted"},Ab=de({__name:"TaskPanel",setup(e){const t=$t(),u=_u();return xe(()=>[t.instanceId,t.sessionAlias],([n,s])=>{n&&s&&u.loadFor(n,s)},{immediate:!0}),(n,s)=>v(t).instanceId&&v(t).sessionAlias?(d(),b("div",wb,[B(pb),B(_b,{class:"min-h-0 flex-1"})])):(d(),b("div",Eb,k(n.$t("taskPanel.noSession")),1))}});function $b(e){const t=[],u=[],n=[];for(const s of e){if(s.status==="??"){n.push(s);continue}const a=s.status[0]??" ",r=s.status[1]??" ";a!==" "&&a!=="?"&&t.push(s),r!==" "&&r!=="?"&&u.push(s)}return{staged:t,changes:u,untracked:n}}function In(e){const t=e.lastIndexOf("/");return t<0?{dir:"",name:e}:{dir:e.slice(0,t+1),name:e.slice(t+1)}}const Cb={class:"flex h-full flex-col bg-surface text-sm text-fg-muted"},Db={key:0,class:"flex flex-1 items-center justify-center p-4 text-center text-xs text-fg-muted"},Tb={class:"flex shrink-0 items-center gap-2 border-b border-border p-2"},Sb=["title"],Fb={class:"truncate font-medium"},Ib={class:"flex shrink-0 items-center gap-1"},Mb=["title","aria-label","disabled"],zb={key:0,"data-test":"files-error",class:"shrink-0 bg-danger/10 px-2 py-1 text-xs text-danger"},Lb={key:1,class:"flex min-h-0 flex-1 flex-col"},Ob={class:"flex shrink-0 items-center gap-1 border-b border-border px-2 py-1"},Rb=["placeholder"],Nb=["aria-label"],Pb={key:0,"data-test":"fs-results",class:"min-h-0 flex-1 overflow-y-auto thin-scroll"},Bb={class:"p-2.5 text-[11px] font-mono leading-5 space-y-px"},Ub=["onClick"],qb={class:"truncate font-sans text-[12px] text-fg-muted"},jb={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},Hb={key:0,class:"px-2.5 pb-1 text-xs text-warn"},Wb={class:"flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-2.5 py-1.5 font-mono text-[11px] text-fg-muted"},Vb=["title","aria-label","disabled"],Gb=["onClick"],Kb={class:"min-h-0 flex-1 overflow-y-auto thin-scroll p-2.5 text-[11px] font-mono leading-5 space-y-px"},Zb=["onClick"],Xb={key:1,class:"w-[11px] shrink-0"},Yb=["title"],Jb={key:5,class:"shrink-0 font-mono text-[10.5px] text-fg-muted tabular-nums"},Qb={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},eg={key:2,class:"flex min-h-0 flex-1 flex-col"},tg={class:"shrink-0 border-b border-border"},ug={key:0,"data-test":"changes-branch",class:"truncate font-mono text-[11.5px] font-medium text-fg"},ng={key:1,"data-test":"changes-branch",class:"truncate font-mono text-[11.5px] italic text-fg-muted"},sg={key:2,class:"text-[10.5px] font-semibold uppercase tracking-wider text-fg-muted"},ag={key:3,"data-test":"worktree-linked",class:"shrink-0 rounded-full border border-accent/30 bg-accent/10 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wide text-accent"},rg={key:4,class:"flex shrink-0 items-center gap-1.5 font-mono text-[10.5px] tabular-nums"},og={class:"text-fg-muted"},ig={class:"text-run"},lg={class:"text-danger"},cg=["title"],dg={class:"truncate font-mono",dir:"rtl"},fg={class:"min-h-0 flex-1 overflow-y-auto thin-scroll p-2.5 space-y-2"},pg=["onClick"],hg={class:"text-fg-muted/60"},mg={class:"space-y-px pt-0.5"},bg=["title","onClick"],gg={class:"flex min-w-0 flex-1 items-baseline truncate font-mono text-[11px]"},xg={key:0,class:"truncate text-fg-muted/70"},vg={key:0,class:"px-1.5 py-1 text-xs text-fg-muted"},yg={key:1,"data-test":"changes-not-git",class:"flex min-h-0 flex-1 flex-col items-center justify-center gap-1.5 p-6 text-center text-xs text-fg-muted"},kg={class:"text-[11px] text-fg-muted/70"},_g={key:2,class:"p-3 text-xs text-fg-muted"},wg={key:3,class:"shrink-0 border-t border-border px-3 py-1 text-xs text-fg-muted"},ka="xacpx.changes.collapsed",Eg=de({__name:"FilesPanel",props:{instanceId:{}},setup(e){const t=e,u=Wu(),n=pt(),s=$t(),a=Z(()=>u.path?u.path.split("/"):[]),r=Z(()=>a.value.length===0);function o(){r.value||u.up(a.value.length-2)}const i=Z(()=>{var F;const L=t.instanceId?n.byId(t.instanceId):void 0;return((F=L==null?void 0:L.sessions.find(P=>P.alias===s.sessionAlias))==null?void 0:F.workspace)??null}),l=Z(()=>{const L=u.diff;return L?{branch:L.branch,detached:L.detached===!0,worktree:L.worktree}:null}),p=Z(()=>{const L=u.diff;if(!L)return null;let F=0,P=0;for(const O of L.diff?L.diff.split(`
288
+ `):[])O.startsWith("+")&&!O.startsWith("+++")?F++:O.startsWith("-")&&!O.startsWith("---")&&P++;return{fileCount:L.files.length,add:F,del:P}}),c=Z(()=>{var F;const L=$b(((F=u.diff)==null?void 0:F.files)??[]);return[{key:"staged",items:L.staged},{key:"changes",items:L.changes},{key:"untracked",items:L.untracked}].filter(P=>P.items.length)}),x=S(h());function h(){try{return JSON.parse(localStorage.getItem(ka)??"{}")}catch{return{}}}function g(L){x.value={...x.value,[L]:!x.value[L]};try{localStorage.setItem(ka,JSON.stringify(x.value))}catch{}}const E=S("");let A=null;function w(){A&&clearTimeout(A),A=setTimeout(()=>void u.search(E.value),250)}function C(){E.value="",u.search("")}function y(L){return L===void 0?"":L<1024?`${L} B`:L<1024*1024?`${(L/1024).toFixed(1)} KB`:`${(L/1024/1024).toFixed(1)} MB`}function _(L){return u.path?`${u.path}/${L}`:L}function D(L){const F=L.trim();return F.includes("?")?{label:"U",cls:"text-warn",dot:"bg-warn"}:F.includes("A")?{label:"A",cls:"text-run",dot:"bg-run"}:F.includes("D")?{label:"D",cls:"text-danger",dot:"bg-danger"}:F.includes("R")?{label:"R",cls:"text-accent",dot:"bg-accent"}:F.includes("M")?{label:"M",cls:"text-info",dot:"bg-warn"}:{label:F[0]??"•",cls:"text-fg-muted",dot:"bg-warn"}}function N(L){const F=_(L.name);if(L.type==="file"){const O=u.changed[F];return O?D(O):null}const P=`${F}/`;return Object.keys(u.changed).some(O=>O.startsWith(P))?{label:"•",cls:"text-warn",dot:"bg-warn"}:null}function V(L){return!!u.file&&u.file.path===_(L)}function te(L){L.type==="file"&&(u.diffPath=null),u.open(L)}function ne(L){u.diffPath=null,u.openFile(L)}function ee(L){u.file=null,u.loadDiff(L)}return xe(()=>[t.instanceId,i.value],async([L,F])=>{var O,$,I;if(u.reset(),E.value="",!L)return;u.instanceId=L,await n.loadWorkspaces(L).catch(()=>{});const P=F??((I=($=(O=n.byId(L))==null?void 0:O.workspaces)==null?void 0:$[0])==null?void 0:I.name);P&&u.selectWorkspace(L,P)},{immediate:!0}),xe(()=>u.tab,L=>{L==="changes"&&!u.diff&&u.loadDiff()}),(L,F)=>{var P,O,$,I,R,fe;return d(),b("div",Cb,[e.instanceId?(d(),b(J,{key:1},[f("div",Tb,[f("div",{"data-test":"ws-label",class:"flex min-w-0 flex-1 items-center gap-1.5 text-xs text-fg",title:v(u).workspace??""},[B(v(zn),{size:13,class:"shrink-0 text-warn"}),f("span",Fb,k(v(u).workspace??"—"),1)],8,Sb),f("div",Ib,[f("button",{"data-test":"refresh-files",title:L.$t("files.refresh"),"aria-label":L.$t("files.refresh"),class:"grid h-6 w-6 place-items-center rounded text-fg-muted transition-colors hover:bg-raised hover:text-fg disabled:opacity-50",disabled:v(u).loading,onClick:F[0]||(F[0]=H=>v(u).refresh())},[B(v(Ao),{size:13,class:X(v(u).loading?"animate-spin motion-reduce:animate-none":"")},null,8,["class"])],8,Mb),f("button",{"data-test":"tab-files",class:X(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",v(u).tab==="files"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:F[1]||(F[1]=H=>v(u).tab="files")},[B(v(hu),{size:13}),he(k(L.$t("files.title")),1)],2),f("button",{"data-test":"tab-changes",class:X(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",v(u).tab==="changes"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:F[2]||(F[2]=H=>v(u).tab="changes")},[B(v(Pu),{size:13}),he(k(L.$t("files.changes")),1)],2)])]),v(u).error?(d(),b("div",zb,k(v(u).error),1)):M("",!0),v(u).tab==="files"?(d(),b("div",Lb,[f("div",Ob,[_e(f("input",{"onUpdate:modelValue":F[3]||(F[3]=H=>E.value=H),"data-test":"fs-search",placeholder:L.$t("files.searchPlaceholder"),class:"min-w-0 flex-1 rounded border border-border bg-bg px-2 py-1 text-xs text-fg placeholder:text-fg-muted",onInput:w},null,40,Rb),[[Re,E.value]]),E.value?(d(),b("button",{key:0,"aria-label":L.$t("files.clearSearch"),class:"text-fg-muted hover:text-fg",onClick:C},[B(v(st),{size:14})],8,Nb)):M("",!0)]),v(u).query.trim()?(d(),b("div",Pb,[f("ul",Bb,[(d(!0),b(J,null,le(v(u).results,H=>(d(),b("li",{key:H},[f("button",{"data-test":"fs-result",class:"flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left hover:bg-raised cursor-pointer",onClick:be=>ne(H)},[B(v(Nu),{size:13,class:"shrink-0 text-fg-muted"}),f("span",qb,k(H),1)],8,Ub)]))),128)),!v(u).results.length&&!v(u).searching?(d(),b("li",jb,k(L.$t("palette.noMatches")),1)):M("",!0)]),v(u).searchTruncated?(d(),b("div",Hb,k(L.$t("files.showingFirstMatches")),1)):M("",!0)])):(d(),b(J,{key:1},[f("div",Wb,[f("button",{"data-test":"fs-up",title:L.$t("files.upOneLevel"),"aria-label":L.$t("files.upOneLevel"),class:"grid h-5 w-5 shrink-0 place-items-center rounded text-fg-muted hover:bg-raised hover:text-fg disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-fg-muted",disabled:r.value||v(u).loading,onClick:o},[B(v(fo),{size:13})],8,Vb),f("button",{class:"hover:text-fg",onClick:F[4]||(F[4]=H=>v(u).up(-1))},k(v(u).workspace??L.$t("files.root")),1),(d(!0),b(J,null,le(a.value,(H,be)=>(d(),b(J,{key:be},[F[5]||(F[5]=f("span",null,"/",-1)),f("button",{class:"hover:text-fg",onClick:ve=>v(u).up(be)},k(H),9,Gb)],64))),128))]),f("ul",Kb,[(d(!0),b(J,null,le(v(u).entries,H=>(d(),b("li",{key:H.name},[f("button",{"data-test":"fs-entry",class:X(["flex w-full items-center gap-1.5 rounded-md px-1.5 py-1 text-left cursor-pointer",V(H.name)?"bg-accent/15":N(H)?"bg-accent/10":"hover:bg-raised"]),onClick:be=>te(H)},[H.type==="dir"?(d(),G(v(kt),{key:0,size:11,class:"shrink-0 text-fg-muted"})):(d(),b("span",Xb)),H.type==="dir"?(d(),G(v(zn),{key:2,size:13,class:X(["shrink-0",N(H)?"text-accent":"text-fg-muted"])},null,8,["class"])):(d(),G(v(Nu),{key:3,size:13,class:X(["shrink-0",V(H.name)||N(H)?"text-accent":"text-fg-muted"])},null,8,["class"])),f("span",{class:X(["flex-1 truncate font-sans text-[12px]",V(H.name)||N(H)?"text-accent font-medium":H.type==="dir"?"text-fg font-medium":"text-fg-muted"])},k(H.name),3),N(H)?(d(),b("span",{key:4,"data-test":"fs-status",class:X(["w-1.5 h-1.5 shrink-0 rounded-full",N(H).dot]),title:`${N(H).label} — ${v(u).changed[_(H.name)]||L.$t("files.containsChanges")}`},null,10,Yb)):M("",!0),H.type==="file"&&!N(H)?(d(),b("span",Jb,k(y(H.size)),1)):M("",!0)],10,Zb)]))),128)),!v(u).entries.length&&!v(u).loading?(d(),b("li",Qb,k(L.$t("files.emptyDirectory")),1)):M("",!0)])],64))])):(d(),b("div",eg,[v(u).diff?(d(),b(J,{key:0},[f("div",tg,[f("div",{"data-test":"changes-summary",class:X(["flex items-center gap-1.5 px-2.5 pt-2",(P=l.value)!=null&&P.worktree?"pb-1":"pb-2"])},[B(v(Ln),{size:12,class:"shrink-0 text-accent"}),(O=l.value)!=null&&O.branch?(d(),b("span",ug,k(l.value.branch),1)):($=l.value)!=null&&$.detached?(d(),b("span",ng,k(L.$t("files.detached")),1)):(d(),b("span",sg,k(L.$t("files.changes")),1)),(R=(I=l.value)==null?void 0:I.worktree)!=null&&R.linked?(d(),b("span",ag,k(L.$t("files.linked")),1)):M("",!0),F[6]||(F[6]=f("span",{class:"flex-1"},null,-1)),p.value?(d(),b("div",rg,[f("span",og,k(p.value.fileCount)+" "+k(L.$t("files.filesCount")),1),f("span",ig,"+"+k(p.value.add),1),f("span",lg,"−"+k(p.value.del),1)])):M("",!0)],2),(fe=l.value)!=null&&fe.worktree?(d(),b("div",{key:0,"data-test":"worktree-path",class:"flex items-center gap-1.5 px-2.5 pb-2 text-[10px] text-fg-muted",title:`${L.$t("files.worktree")}: ${l.value.worktree.root}`},[B(v(bo),{size:11,class:"shrink-0 opacity-70"}),f("span",dg,k(l.value.worktree.root),1)],8,cg)):M("",!0)]),f("div",fg,[(d(!0),b(J,null,le(c.value,H=>(d(),b("div",{key:H.key,"data-test":"change-group"},[f("button",{class:"flex w-full items-center gap-1.5 px-1 py-0.5 text-[10.5px] font-semibold uppercase tracking-wider text-fg-muted transition-colors hover:text-fg",onClick:be=>g(H.key)},[B(v(kt),{size:11,class:X(["shrink-0 transition-transform",x.value[H.key]?"":"rotate-90"])},null,8,["class"]),f("span",null,k(L.$t(`files.${H.key}`)),1),f("span",hg,k(H.items.length),1)],8,pg),_e(f("ul",mg,[(d(!0),b(J,null,le(H.items,be=>(d(),b("li",{key:be.path},[f("button",{"data-test":"diff-file",title:be.path,class:X(["flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left cursor-pointer",v(u).diffPath===be.path?"bg-accent/10":"hover:bg-raised"]),onClick:ve=>ee(be.path)},[f("span",{class:X(["w-3 shrink-0 text-center font-mono text-[10.5px] uppercase",D(be.status).cls])},k(D(be.status).label),3),f("span",gg,[v(In)(be.path).dir?(d(),b("span",xg,k(v(In)(be.path).dir),1)):M("",!0),f("span",{class:X(["shrink-0",v(u).diffPath===be.path?"text-accent":"text-fg"])},k(v(In)(be.path).name),3)])],10,bg)]))),128))],512),[[qu,!x.value[H.key]]])]))),128)),c.value.length?M("",!0):(d(),b("div",vg,k(L.$t("files.noChanges")),1))])],64)):v(u).notGit?(d(),b("div",yg,[B(v(Ln),{size:20,class:"text-fg-muted/60"}),f("span",null,k(L.$t("files.notGitRepo")),1),f("span",kg,k(L.$t("files.notGitRepoBody")),1)])):v(u).loading?M("",!0):(d(),b("div",_g,k(L.$t("files.noDiffLoaded")),1))])),v(u).loading?(d(),b("div",wg,k(L.$t("files.loading")),1)):M("",!0)],64)):(d(),b("div",Db,k(L.$t("files.selectToBrowse")),1))])}}}),Ag={class:"pointer-events-none fixed bottom-4 right-4 z-50 flex w-72 flex-col gap-2","aria-live":"polite"},$g={class:"flex items-start justify-between gap-2"},Cg=["aria-label","onClick"],Dg=de({__name:"NoticeToast",setup(e){const t=Sa();function u(n){const s=n.toLowerCase();return s.includes("fail")||s.includes("error")?"text-danger":s.includes("complet")||s.includes("done")||s.includes("success")?"text-run":"text-info"}return(n,s)=>(d(),b("div",Ag,[(d(!0),b(J,null,le(v(t).items.slice(0,4),a=>(d(),b("div",{key:a.id,"data-test":"notice",class:"pointer-events-auto rounded border border-border bg-raised px-3 py-2 text-sm text-fg shadow-lg"},[f("div",$g,[f("span",null,[f("span",{class:X(["text-xs uppercase",u(a.kind)])},k(a.kind),3),s[0]||(s[0]=f("br",null,null,-1)),he(k(a.text),1)]),f("button",{class:"text-xs text-fg-muted hover:text-fg","aria-label":n.$t("common.dismissNotice"),onClick:r=>v(t).dismiss(a.id)},"×",8,Cg)])]))),128))]))}}),Tg={key:0,"data-test":"action-toast",class:"fixed bottom-[calc(1rem+env(safe-area-inset-bottom))] left-1/2 z-50 flex -translate-x-1/2 items-center gap-3 rounded-lg border border-border bg-surface px-3 py-2 text-sm text-fg shadow-lg"},Sg=["aria-label"],Fg=de({__name:"ActionToast",setup(e){const t=Qo();return(u,n)=>(d(),G(eu,{to:"body"},[v(t)?(d(),b("div",Tg,[f("span",null,k(v(t).message),1),f("button",{"data-test":"toast-action",class:"font-medium text-accent hover:underline",onClick:n[0]||(n[0]=(...s)=>v(As)&&v(As)(...s))},k(v(t).actionLabel),1),f("button",{class:"text-fg-muted hover:text-fg","aria-label":u.$t("common.dismiss"),onClick:n[1]||(n[1]=(...s)=>v($s)&&v($s)(...s))},"×",8,Sg)])):M("",!0)]))}}),Ig=["title"],Mg=de({__name:"ConnectionBadge",setup(e){const t=Fa();return(u,n)=>(d(),b("div",{"data-test":"conn-badge",class:X(["inline-flex items-center gap-1.5 rounded-full border border-border px-2 py-0.5 text-xs",v(t).online?"text-run":"text-danger"]),title:v(t).online?u.$t("connection.online"):u.$t("connection.reconnecting")},[f("span",{class:X(["h-2 w-2 rounded-full",v(t).online?"bg-run":"bg-danger"]),"aria-hidden":"true"},null,2),f("span",null,k(v(t).online?u.$t("connection.online"):u.$t("connection.reconnecting")),1)],10,Ig))}}),zg={class:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-raised shadow-xl"},Lg={class:"flex items-center gap-2 border-b border-border px-4 py-3"},Og=["placeholder"],Rg={class:"max-h-80 overflow-y-auto py-1 text-sm"},Ng=["onMouseenter","onClick"],Pg={class:"font-medium"},Bg={class:"truncate text-xs text-fg-muted"},Ug={key:0,class:"px-4 py-3 text-xs text-fg-muted"},qg=de({__name:"CommandPalette",emits:["close","select-session"],setup(e,{emit:t}){const u=t,n=pt(),s=S(""),a=S(null),r=S(0),o=Z(()=>n.instances.flatMap(h=>h.sessions.map(g=>({label:g.alias,sub:`${h.name} · ${g.agent}`,instanceId:h.id,alias:g.alias}))));function i(h,g){return g?`${h.label} ${h.sub}`.toLowerCase().includes(g.toLowerCase()):!0}const l=Z(()=>{const h=s.value.trim();return o.value.filter(g=>i(g,h))});function p(){r.value>=l.value.length&&(r.value=Math.max(0,l.value.length-1))}function c(h){u("select-session",h.instanceId,h.alias),u("close")}function x(h){if(h.key==="Escape"){u("close");return}if(h.key==="ArrowDown")h.preventDefault(),r.value=Math.min(r.value+1,l.value.length-1);else if(h.key==="ArrowUp")h.preventDefault(),r.value=Math.max(r.value-1,0);else if(h.key==="Enter"){h.preventDefault();const g=l.value[r.value];g&&c(g)}}return nt(()=>void je(()=>{var h;return(h=a.value)==null?void 0:h.focus()})),(h,g)=>(d(),b("div",{class:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-24","data-test":"command-palette",onClick:g[2]||(g[2]=Ae(E=>u("close"),["self"]))},[f("div",zg,[f("div",Lg,[B(v(Hu),{size:16,class:"shrink-0 text-fg-muted"}),_e(f("input",{ref_key:"input",ref:a,"onUpdate:modelValue":g[0]||(g[0]=E=>s.value=E),"data-test":"palette-input",placeholder:h.$t("palette.placeholder"),class:"w-full bg-transparent text-sm text-fg placeholder:text-fg-muted outline-none",onInput:g[1]||(g[1]=E=>{r.value=0,p()}),onKeydown:x},null,40,Og),[[Re,s.value]])]),f("ul",Rg,[(d(!0),b(J,null,le(l.value,(E,A)=>(d(),b("li",{key:`${E.instanceId}:${E.alias}:${A}`},[f("button",{"data-test":"palette-row",class:X(["flex w-full items-center gap-2 px-4 py-1.5 text-left",A===r.value?"bg-accent/10 text-accent":"text-fg hover:bg-fg/5"]),onMouseenter:w=>r.value=A,onClick:w=>c(E)},[B(v(vo),{size:14,class:"shrink-0"}),f("span",Pg,k(E.label),1),f("span",Bg,k(E.sub),1)],42,Ng)]))),128)),l.value.length?M("",!0):(d(),b("li",Ug,k(h.$t("palette.noMatches")),1))])])]))}}),jg={class:"flex items-center gap-2 select-none"},Hg=de({__name:"BrandLogo",setup(e){return(t,u)=>(d(),b("div",jg,[...u[0]||(u[0]=[eo('<svg data-test="brand-x" width="22" height="22" viewBox="0 0 24 24" fill="none" aria-hidden="true"><defs><linearGradient id="xacpxBrand" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop stop-color="#4F9BF5"></stop><stop offset="1" stop-color="#69D689"></stop></linearGradient></defs><path d="M5 5 L19 19 M19 5 L5 19" stroke="url(#xacpxBrand)" stroke-width="3.2" stroke-linecap="round"></path></svg><span class="text-[15px] font-semibold tracking-tight text-fg">xacpx</span><span class="text-fg-muted text-xs">· relay</span>',3)])]))}});function Wg(e){const t=e.edgeZone??30,u=e.threshold??45,n=e.viewportWidth??(()=>window.innerWidth);let s=0,a=0,r=null;function o(h){var g,E;return((g=h.touches)==null?void 0:g[0])??((E=h.changedTouches)==null?void 0:E[0])??null}function i(h){var g,E;return((g=h.changedTouches)==null?void 0:g[0])??((E=h.touches)==null?void 0:E[0])??null}function l(h){const g=h.target;return!!(g&&typeof g.closest=="function"&&g.closest("[data-drawer]"))}function p(h){var E;if(r=null,!e.isEnabled()||(((E=h.touches)==null?void 0:E.length)??0)>1)return;const g=o(h);if(g){if(s=g.clientX,a=g.clientY,e.isLeftOpen()||e.isRightOpen()){if(l(h))return;r=e.isLeftOpen()?"close-left":"close-right";return}s<=t?r="open-left":s>=n()-t&&(r="open-right")}}function c(h){const g=r;if(r=null,!g)return;const E=i(h);if(!E)return;const A=E.clientX-s,w=E.clientY-a;Math.abs(A)<u||Math.abs(A)<=Math.abs(w)||(g==="open-left"&&A>0?e.openLeft():g==="open-right"&&A<0?e.openRight():g==="close-left"&&A<0?e.closeLeft():g==="close-right"&&A>0&&e.closeRight())}function x(){r=null}return{onTouchStart:p,onTouchEnd:c,onTouchCancel:x}}function Sr(e,t,u,n,s){let a=u;return s!=null&&n!=null&&(a=Math.min(a,Math.floor(n*s))),a<t&&(a=t),e<t?t:e>a?a:Math.round(e)}function Vg(e){const t=e.viewportWidth??(()=>window.innerWidth),u=e.target??window;let n=0,s=0,a=!1;function r(p){const c=e.side==="right"?n-p:p-n,x=Sr(s+c,e.min,e.max,t(),e.maxViewportFraction);e.setWidth(x)}function o(p){a&&r(p.clientX)}function i(){var p;a&&(a=!1,u.removeEventListener("pointermove",o),u.removeEventListener("pointerup",i),u.removeEventListener("pointercancel",i),(p=e.onDragEnd)==null||p.call(e))}function l(p){var c;e.isEnabled()&&(a=!0,n=p.clientX,s=e.getWidth(),u.addEventListener("pointermove",o),u.addEventListener("pointerup",i),u.addEventListener("pointercancel",i),(c=e.onDragStart)==null||c.call(e))}return{onPointerDown:l}}const Gg={class:"sticky top-0 z-30 flex h-[calc(2.75rem+env(safe-area-inset-top))] shrink-0 items-center justify-between border-b border-border bg-surface/80 px-3 pt-[env(safe-area-inset-top)] backdrop-blur-xl"},Kg={class:"flex items-center gap-2"},Zg={class:"flex items-center gap-1.5"},Xg=["aria-label"],Yg={class:"hidden flex-1 text-[12.5px] text-fg-muted sm:inline"},Jg=["aria-label"],Qg={class:"flex items-center gap-2 border-b border-border bg-surface px-2 py-1.5 lg:hidden"},e3=["aria-label"],t3={class:"min-w-0 flex-1 truncate text-center text-sm font-medium"},u3={class:"flex shrink-0 items-center gap-0.5"},n3=["aria-label","title"],s3=["aria-label","title"],a3={class:"flex flex-1 overflow-hidden"},r3={class:"flex h-9 shrink-0 items-center justify-between px-3 text-xs"},o3={class:"font-semibold uppercase tracking-wider text-fg-muted"},i3={class:"flex items-center gap-2"},l3=["aria-label","title"],c3=["aria-label"],d3=["aria-label","title"],f3={"data-test":"column",class:"relative flex min-w-0 flex-1 flex-col"},p3=["title"],h3={class:"flex h-9 shrink-0 items-center gap-1 border-b border-border px-2.5"},m3=["aria-label"],b3={class:"min-h-0 flex-1 overflow-hidden"},_a=240,wa=560,g3=296,Ea=.5,k3=de({__name:"DashboardView",setup(e){const t=no(),u=pt(),n=$t(),s=Wu(),a=_u(),r=Sa(),o=Fa();let i=null;const l=S(!1),p=S(!1),c=S("tasks");function x(){l.value=!1,p.value=!1}function h(I){c.value=I,p.value=!0}const g=Wg({isEnabled:()=>typeof window<"u"&&window.innerWidth<1024,isLeftOpen:()=>l.value,isRightOpen:()=>p.value,openLeft:()=>{l.value=!0},openRight:()=>{p.value=!0},closeLeft:()=>{l.value=!1},closeRight:()=>{p.value=!1}});function E(){ne(),h("files")}const A=S(localStorage.getItem("xacpx.leftCollapsed")==="1");xe(A,I=>localStorage.setItem("xacpx.leftCollapsed",I?"1":"0"));function w(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(min-width: 1024px)").matches}const C=S(w()),y=S(Sr(Number(localStorage.getItem("xacpx.rightWidth"))||g3,_a,wa,typeof window<"u"?window.innerWidth:void 0,Ea)),_=S(!1);xe(y,I=>localStorage.setItem("xacpx.rightWidth",String(I)));const D=Vg({side:"right",getWidth:()=>y.value,setWidth:I=>{y.value=I},min:_a,max:wa,maxViewportFraction:Ea,isEnabled:()=>C.value,onDragStart:()=>{_.value=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},onDragEnd:()=>{_.value=!1,document.body.style.cursor="",document.body.style.userSelect=""}});let N=null;function V(I){C.value=I.matches}const te=Z(()=>!!(s.file||s.diffPath));function ne(){s.file=null,s.diffPath=null}xe(te,I=>{I&&(p.value=!1)});const ee=S(!1);function L(I){(I.metaKey||I.ctrlKey)&&I.key.toLowerCase()==="k"&&(I.preventDefault(),ee.value=!ee.value)}function F(I,R){n.select(I,R),n.loadHistory().catch(()=>{}),l.value=!1}let P=!1;async function O(){await u.loadInstances().catch(()=>{}),await n.loadActiveTurns().catch(()=>{}),n.instanceId&&n.sessionAlias&&(await u.loadSessions(n.instanceId).catch(()=>{}),await n.loadHistory().catch(()=>{}),await a.loadFor(n.instanceId,n.sessionAlias).catch(()=>{}))}function $(I){o.setOnline(I),I&&(P&&O(),P=!0)}return nt(async()=>{window.addEventListener("keydown",L),typeof window.matchMedia=="function"&&(N=window.matchMedia("(min-width: 1024px)"),C.value=N.matches,N.addEventListener("change",V)),await u.loadInstances(),i=Vo(R=>{u.applyEvent(R),n.applyEvent(R),a.applyEvent(R),r.applyEvent(R)},$),await n.loadActiveTurns().catch(()=>{});const I=Ko();I&&u.byId(I.instanceId)&&F(I.instanceId,I.alias)}),Ru(()=>{window.removeEventListener("keydown",L),N==null||N.removeEventListener("change",V),i==null||i()}),(I,R)=>{const fe=to("router-link");return d(),b("div",{class:"flex h-dvh flex-col bg-bg text-fg",onTouchstartPassive:R[15]||(R[15]=(...H)=>v(g).onTouchStart&&v(g).onTouchStart(...H)),onTouchendPassive:R[16]||(R[16]=(...H)=>v(g).onTouchEnd&&v(g).onTouchEnd(...H)),onTouchcancelPassive:R[17]||(R[17]=(...H)=>v(g).onTouchCancel&&v(g).onTouchCancel(...H))},[f("header",Gg,[f("div",Kg,[B(Hg),B(Mg)]),f("div",Zg,[f("button",{"data-test":"global-search","aria-label":I.$t("nav.search"),class:"group flex h-7 items-center gap-2 rounded-lg border border-border bg-bg px-2.5 text-left transition-colors hover:border-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:w-64",onClick:R[0]||(R[0]=H=>ee.value=!0)},[B(v(Hu),{size:14,class:"text-fg-muted"}),f("span",Yg,k(I.$t("nav.searchPlaceholder")),1),R[18]||(R[18]=f("kbd",{class:"hidden rounded border border-border bg-raised px-1.5 py-0.5 font-mono text-[10px] text-fg-muted sm:inline"},"⌘K",-1))],8,Xg),f("button",{"data-test":"theme-toggle","aria-label":v(t).mode==="dark"?I.$t("nav.toLight"):I.$t("nav.toDark"),class:"grid h-7 w-7 place-items-center rounded-lg border border-border text-fg-muted transition-colors hover:bg-raised focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onClick:R[1]||(R[1]=H=>v(t).toggle())},[v(t).mode==="dark"?(d(),G(v(yo),{key:0,size:15})):(d(),G(v(Fo),{key:1,size:15}))],8,Jg),B(fe,{to:"/settings","data-test":"settings-link","aria-label":I.$t("nav.settings"),class:"grid h-7 w-7 place-items-center rounded-lg border border-border text-fg-muted transition-colors hover:bg-raised focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"},{default:gt(()=>[B(v(To),{size:15})]),_:1},8,["aria-label"])])]),f("div",Qg,[f("button",{"data-test":"open-instances","aria-label":I.$t("nav.openInstances"),class:"rounded p-1 leading-none text-fg-muted hover:bg-fg/5",onClick:R[2]||(R[2]=H=>l.value=!0)},[B(v(xo),{size:20})],8,e3),f("span",t3,k(v(n).sessionAlias??"xacpx relay"),1),f("div",u3,[f("button",{"data-test":"open-files","aria-label":I.$t("nav.openFiles"),title:I.$t("nav.files"),class:"grid h-8 w-8 place-items-center rounded text-fg-muted hover:bg-fg/5",onClick:R[3]||(R[3]=H=>h("files"))},[B(v(hu),{size:18})],8,n3),f("button",{"data-test":"open-tasks","aria-label":I.$t("nav.openTasks"),title:I.$t("nav.tasks"),class:"grid h-8 w-8 place-items-center rounded text-fg-muted hover:bg-fg/5",onClick:R[4]||(R[4]=H=>h("tasks"))},[B(v(Pu),{size:18})],8,s3)])]),f("div",a3,[l.value||p.value?(d(),b("div",{key:0,"data-test":"drawer-backdrop",class:"fixed inset-0 z-30 bg-black/30 lg:hidden",onClick:x})):M("",!0),f("div",{"data-test":"column","data-drawer":"left",class:X(["fixed inset-y-0 left-0 z-40 flex w-72 max-w-[85%] shrink-0 transform flex-col border-r border-border bg-surface shadow-lg transition-[transform,width] pt-[env(safe-area-inset-top)] lg:static lg:z-auto lg:max-w-none lg:translate-x-0 lg:transform-none lg:shadow-none lg:pt-0",[l.value?"translate-x-0":"-translate-x-full",A.value?"lg:w-0 lg:min-w-0 lg:overflow-hidden lg:border-r-0":"lg:w-[248px]"]])},[f("div",r3,[f("span",o3,k(I.$t("nav.instances")),1),f("div",i3,[f("button",{"data-test":"toggle-left","aria-label":I.$t("nav.hideSidebar"),title:I.$t("nav.hideSidebar"),class:"hidden h-6 w-6 place-items-center rounded-md text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:grid",onClick:R[5]||(R[5]=H=>A.value=!0)},[B(v(ko),{size:15})],8,l3),f("button",{"data-test":"close-instances","aria-label":I.$t("nav.closeInstances"),class:"text-fg-muted hover:text-fg lg:hidden",onClick:R[6]||(R[6]=H=>l.value=!1)},[B(v(st),{size:18})],8,c3)])]),B(Ec,{onSelect:F})],2),A.value?(d(),b("button",{key:1,"data-test":"expand-left","aria-label":I.$t("nav.showSidebar"),title:I.$t("nav.showSidebar"),class:"hidden w-5 shrink-0 items-center justify-center border-r border-border bg-surface/60 text-fg-muted transition-colors hover:bg-raised hover:text-fg lg:flex",onClick:R[7]||(R[7]=H=>A.value=!1)},[B(v(_o),{size:15})],8,d3)):M("",!0),f("div",f3,[B(cm,{class:"absolute inset-0",inert:te.value,onShowFiles:R[8]||(R[8]=H=>c.value="files")},null,8,["inert"]),te.value?(d(),G(Lm,{key:0,class:"absolute inset-0 z-10",onBack:E,onClose:ne})):M("",!0)]),f("div",{"data-test":"column","data-drawer":"right",class:X(["fixed inset-y-0 right-0 z-40 flex w-72 max-w-[85%] shrink-0 transform flex-col overflow-hidden border-l border-border bg-surface shadow-lg transition-transform pt-[env(safe-area-inset-top)] lg:relative lg:z-auto lg:w-[296px] lg:max-w-none lg:translate-x-0 lg:transform-none lg:shadow-none lg:pt-0",p.value?"translate-x-0":"translate-x-full"]),style:tu(C.value?{width:y.value+"px"}:void 0)},[f("div",{"data-test":"right-resize","aria-hidden":"true",title:I.$t("nav.resizePanel"),class:X(["absolute inset-y-0 left-0 z-20 hidden w-1.5 cursor-col-resize touch-none select-none transition-colors lg:block",_.value?"bg-accent/50":"hover:bg-accent/30"]),onPointerdown:R[9]||(R[9]=Ae((...H)=>v(D).onPointerDown&&v(D).onPointerDown(...H),["prevent"]))},null,42,p3),f("div",h3,[f("button",{"data-test":"right-tab-files",class:X(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",c.value==="files"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:R[10]||(R[10]=H=>c.value="files")},[B(v(hu),{size:13}),he(k(I.$t("nav.files")),1)],2),f("button",{"data-test":"right-tab-tasks",class:X(["flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11.5px] transition-colors cursor-pointer",c.value==="tasks"?"bg-accent/10 text-accent font-semibold":"text-fg-muted font-medium hover:bg-raised"]),onClick:R[11]||(R[11]=H=>c.value="tasks")},[B(v(Pu),{size:13}),he(k(I.$t("nav.tasks")),1)],2),f("button",{"data-test":"close-tasks","aria-label":I.$t("nav.closeTasks"),class:"ml-auto text-fg-muted hover:text-fg lg:hidden",onClick:R[12]||(R[12]=H=>p.value=!1)},[B(v(st),{size:18})],8,m3)]),f("div",b3,[c.value==="tasks"?(d(),G(Ab,{key:0})):(d(),G(Eg,{key:1,"instance-id":v(n).instanceId},null,8,["instance-id"]))])],6)]),B(Dg),B(Fg),ee.value?(d(),G(qg,{key:0,onClose:R[13]||(R[13]=H=>ee.value=!1),onSelectSession:R[14]||(R[14]=(H,be)=>{F(H,be),ee.value=!1})})):M("",!0)],32)}}});export{k3 as default};