@elia-assistant/chatui 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as e, i as t, n, r } from "./chunks/i18n-CGlsSoQa.js";
2
- import { n as i, r as a, t as o } from "./chunks/settingsStore-Bqlj_GzJ.js";
1
+ import { a as e, i as t, n, r } from "./chunks/i18n-DyWy7n71.js";
2
+ import { n as i, r as a, t as o } from "./chunks/settingsStore-BRK5844w.js";
3
3
  import { useChatStore as s } from "./chat-store.js";
4
4
  import { Children as c, Fragment as l, cloneElement as u, createContext as d, createElement as f, isValidElement as p, useCallback as m, useContext as h, useEffect as g, useMemo as _, useRef as v, useState as y, useSyncExternalStore as b } from "react";
5
5
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
@@ -38,8 +38,8 @@ var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescr
38
38
  track: !0,
39
39
  wbr: !0
40
40
  };
41
- })))()), te = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
42
- function F(e) {
41
+ })))()), F = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
42
+ function I(e) {
43
43
  var t = {
44
44
  type: "tag",
45
45
  name: "",
@@ -54,27 +54,27 @@ function F(e) {
54
54
  comment: r === -1 ? "" : e.slice(4, r)
55
55
  };
56
56
  }
57
- for (var i = new RegExp(te), a = null; (a = i.exec(e)) !== null;) if (a[0].trim()) if (a[1]) {
57
+ for (var i = new RegExp(F), a = null; (a = i.exec(e)) !== null;) if (a[0].trim()) if (a[1]) {
58
58
  var o = a[1].trim(), s = [o, ""];
59
59
  o.indexOf("=") > -1 && (s = o.split("=")), t.attrs[s[0]] = s[1], i.lastIndex--;
60
60
  } else a[2] && (t.attrs[a[2]] = a[3].trim().substring(1, a[3].length - 1));
61
61
  return t;
62
62
  }
63
- var ne = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, re = /^\s*$/, ie = Object.create(null);
64
- function ae(e, t) {
63
+ var te = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, ne = /^\s*$/, re = Object.create(null);
64
+ function ie(e, t) {
65
65
  switch (t.type) {
66
66
  case "text": return e + t.content;
67
67
  case "tag": return e += "<" + t.name + (t.attrs ? function(e) {
68
68
  var t = [];
69
69
  for (var n in e) t.push(n + "=\"" + e[n] + "\"");
70
70
  return t.length ? " " + t.join(" ") : "";
71
- }(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ae, "") + "</" + t.name + ">";
71
+ }(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ie, "") + "</" + t.name + ">";
72
72
  case "comment": return e + "<!--" + t.comment + "-->";
73
73
  }
74
74
  }
75
- var oe = {
75
+ var ae = {
76
76
  parse: function(e, t) {
77
- t ||= {}, t.components ||= ie;
77
+ t ||= {}, t.components ||= re;
78
78
  var n, r = [], i = [], a = -1, o = !1;
79
79
  if (e.indexOf("<") !== 0) {
80
80
  var s = e.indexOf("<");
@@ -83,23 +83,23 @@ var oe = {
83
83
  content: s === -1 ? e : e.substring(0, s)
84
84
  });
85
85
  }
86
- return e.replace(ne, function(s, c) {
86
+ return e.replace(te, function(s, c) {
87
87
  if (o) {
88
88
  if (s !== "</" + n.name + ">") return;
89
89
  o = !1;
90
90
  }
91
91
  var l, u = s.charAt(1) !== "/", d = s.startsWith("<!--"), f = c + s.length, p = e.charAt(f);
92
92
  if (d) {
93
- var m = F(s);
93
+ var m = I(s);
94
94
  return a < 0 ? (r.push(m), r) : ((l = i[a]).children.push(m), r);
95
95
  }
96
- if (u && (a++, (n = F(s)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !p || p === "<" || n.children.push({
96
+ if (u && (a++, (n = I(s)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !p || p === "<" || n.children.push({
97
97
  type: "text",
98
98
  content: e.slice(f, e.indexOf("<", f))
99
99
  }), a === 0 && r.push(n), (l = i[a - 1]) && l.children.push(n), i[a] = n), (!u || n.voidElement) && (a > -1 && (n.voidElement || n.name === s.slice(2, -1)) && (a--, n = a === -1 ? r : i[a]), !o && p !== "<" && p)) {
100
100
  l = a === -1 ? r : i[a].children;
101
101
  var h = e.indexOf("<", f), g = e.slice(f, h === -1 ? void 0 : h);
102
- re.test(g) && (g = " "), (h > -1 && a + l.length >= 0 || g !== " ") && l.push({
102
+ ne.test(g) && (g = " "), (h > -1 && a + l.length >= 0 || g !== " ") && l.push({
103
103
  type: "text",
104
104
  content: g
105
105
  });
@@ -108,19 +108,19 @@ var oe = {
108
108
  },
109
109
  stringify: function(e) {
110
110
  return e.reduce(function(e, t) {
111
- return e + ae("", t);
111
+ return e + ie("", t);
112
112
  }, "");
113
113
  }
114
- }, se = (e, t, n, r) => {
114
+ }, oe = (e, t, n, r) => {
115
115
  let i = [n, {
116
116
  code: t,
117
117
  ...r || {}
118
118
  }];
119
119
  if (e?.services?.logger?.forward) return e.services.logger.forward(i, "warn", "react-i18next::", !0);
120
- I(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), e?.services?.logger?.warn ? e.services.logger.warn(...i) : console?.warn && console.warn(...i);
121
- }, ce = {}, le = (e, t, n, r) => {
122
- I(n) && ce[n] || (I(n) && (ce[n] = /* @__PURE__ */ new Date()), se(e, t, n, r));
123
- }, ue = (e, t) => () => {
120
+ L(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), e?.services?.logger?.warn ? e.services.logger.warn(...i) : console?.warn && console.warn(...i);
121
+ }, se = {}, ce = (e, t, n, r) => {
122
+ L(n) && se[n] || (L(n) && (se[n] = /* @__PURE__ */ new Date()), oe(e, t, n, r));
123
+ }, le = (e, t) => () => {
124
124
  if (e.isInitialized) t();
125
125
  else {
126
126
  let n = () => {
@@ -130,46 +130,46 @@ var oe = {
130
130
  };
131
131
  e.on("initialized", n);
132
132
  }
133
- }, de = (e, t, n) => {
134
- e.loadNamespaces(t, ue(e, n));
135
- }, fe = (e, t, n, r) => {
136
- if (I(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return de(e, n, r);
133
+ }, ue = (e, t, n) => {
134
+ e.loadNamespaces(t, le(e, n));
135
+ }, de = (e, t, n, r) => {
136
+ if (L(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return ue(e, n, r);
137
137
  n.forEach((t) => {
138
138
  e.options.ns.indexOf(t) < 0 && e.options.ns.push(t);
139
- }), e.loadLanguages(t, ue(e, r));
140
- }, pe = (e, t, n = {}) => !t.languages || !t.languages.length ? (le(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", { languages: t.languages }), !0) : t.hasLoadedNamespace(e, {
139
+ }), e.loadLanguages(t, le(e, r));
140
+ }, fe = (e, t, n = {}) => !t.languages || !t.languages.length ? (ce(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", { languages: t.languages }), !0) : t.hasLoadedNamespace(e, {
141
141
  lng: n.lng,
142
142
  precheck: (t, r) => {
143
143
  if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && t.services.backendConnector.backend && t.isLanguageChangingTo && !r(t.isLanguageChangingTo, e)) return !1;
144
144
  }
145
- }), I = (e) => typeof e == "string", me = (e) => typeof e == "object" && !!e, he = (e, t) => {
145
+ }), L = (e) => typeof e == "string", pe = (e) => typeof e == "object" && !!e, me = (e, t) => {
146
146
  if (!e) return !1;
147
147
  let n = e.props?.children ?? e.children;
148
148
  return t ? n.length > 0 : !!n;
149
- }, ge = (e) => {
149
+ }, he = (e) => {
150
150
  if (!e) return [];
151
151
  let t = e.props?.children ?? e.children;
152
- return e.props?.i18nIsDynamicList ? ve(t) : t;
153
- }, _e = (e) => Array.isArray(e) && e.every(p), ve = (e) => Array.isArray(e) ? e : [e], ye = (e, t) => {
152
+ return e.props?.i18nIsDynamicList ? _e(t) : t;
153
+ }, ge = (e) => Array.isArray(e) && e.every(p), _e = (e) => Array.isArray(e) ? e : [e], ve = (e, t) => {
154
154
  let n = { ...t };
155
155
  return n.props = {
156
156
  ...t.props,
157
157
  ...e.props
158
158
  }, n;
159
- }, be = (e) => {
159
+ }, ye = (e) => {
160
160
  let t = {};
161
161
  if (!e) return t;
162
162
  let n = (e) => {
163
- ve(e).forEach((e) => {
164
- I(e) || (he(e) ? n(ge(e)) : me(e) && !p(e) && Object.assign(t, e));
163
+ _e(e).forEach((e) => {
164
+ L(e) || (me(e) ? n(he(e)) : pe(e) && !p(e) && Object.assign(t, e));
165
165
  });
166
166
  };
167
167
  return n(e), t;
168
- }, xe = (e, t, n, r) => {
168
+ }, be = (e, t, n, r) => {
169
169
  if (!e) return "";
170
- let i = "", a = ve(e), o = t?.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
170
+ let i = "", a = _e(e), o = t?.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
171
171
  return a.forEach((e, a) => {
172
- if (I(e)) {
172
+ if (L(e)) {
173
173
  i += `${e}`;
174
174
  return;
175
175
  }
@@ -183,37 +183,37 @@ var oe = {
183
183
  i += `<${a}></${a}>`;
184
184
  return;
185
185
  }
186
- if (u && l === 1 && I(d)) {
186
+ if (u && l === 1 && L(d)) {
187
187
  i += `<${c}>${d}</${c}>`;
188
188
  return;
189
189
  }
190
- let f = xe(d, t, n, r);
190
+ let f = be(d, t, n, r);
191
191
  i += `<${a}>${f}</${a}>`;
192
192
  return;
193
193
  }
194
194
  if (e === null) {
195
- se(n, "TRANS_NULL_VALUE", "Passed in a null value as child", { i18nKey: r });
195
+ oe(n, "TRANS_NULL_VALUE", "Passed in a null value as child", { i18nKey: r });
196
196
  return;
197
197
  }
198
- if (me(e)) {
198
+ if (pe(e)) {
199
199
  let { format: t, ...a } = e, o = Object.keys(a);
200
200
  if (o.length === 1) {
201
201
  let e = t ? `${o[0]}, ${t}` : o[0];
202
202
  i += `{{${e}}}`;
203
203
  return;
204
204
  }
205
- se(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
205
+ oe(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
206
206
  i18nKey: r,
207
207
  child: e
208
208
  });
209
209
  return;
210
210
  }
211
- se(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
211
+ oe(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
212
212
  i18nKey: r,
213
213
  child: e
214
214
  });
215
215
  }), i;
216
- }, Se = (e, t = [], n = {}) => {
216
+ }, xe = (e, t = [], n = {}) => {
217
217
  if (!e) return e;
218
218
  let r = Object.keys(n), i = [...t, ...r], a = "", o = 0;
219
219
  for (; o < e.length;) if (e[o] === "<") {
@@ -232,22 +232,22 @@ var oe = {
232
232
  t || (a += "&lt;", o += 1);
233
233
  } else a += e[o], o += 1;
234
234
  return a;
235
- }, Ce = (e, n, i, a, o, s, l) => {
235
+ }, Se = (e, n, i, a, o, s, l) => {
236
236
  if (i === "") return [];
237
237
  let d = o.transKeepBasicHtmlNodesFor || [], m = i && new RegExp(d.map((e) => `<${e}`).join("|")).test(i);
238
238
  if (!e && !n && !m && !l) return [i];
239
239
  let h = n ?? {}, g = (e) => {
240
- ve(e).forEach((e) => {
241
- I(e) || (he(e) ? g(ge(e)) : me(e) && !p(e) && Object.assign(h, e));
240
+ _e(e).forEach((e) => {
241
+ L(e) || (me(e) ? g(he(e)) : pe(e) && !p(e) && Object.assign(h, e));
242
242
  });
243
243
  };
244
244
  g(e);
245
- let _ = Se(i, d, h), v = oe.parse(`<0>${_}</0>`), y = {
245
+ let _ = xe(i, d, h), v = ae.parse(`<0>${_}</0>`), y = {
246
246
  ...h,
247
247
  ...s
248
248
  }, b = (e, t, n) => {
249
- let r = ge(e), i = S(r, t.children, n);
250
- return _e(r) && i.length === 0 || e.props?.i18nIsDynamicList ? r : i;
249
+ let r = he(e), i = S(r, t.children, n);
250
+ return ge(r) && i.length === 0 || e.props?.i18nIsDynamicList ? r : i;
251
251
  }, x = (e, t, n, r, i) => {
252
252
  e.dummy ? (e.children = t, n.push(u(e, { key: r }, i ? void 0 : t))) : n.push(...c.map([e], (e) => {
253
253
  let n = "data-i18n-is-dynamic-list", a = {
@@ -259,8 +259,8 @@ var oe = {
259
259
  }), u(e, a, i ? null : t);
260
260
  }));
261
261
  }, S = (e, i, s) => {
262
- let c = ve(e);
263
- return ve(i).reduce((e, i, u) => {
262
+ let c = _e(e);
263
+ return _e(i).reduce((e, i, u) => {
264
264
  let h = i.children?.[0]?.content && a.services.interpolator.interpolate(i.children[0].content, y, a.language);
265
265
  if (i.type === "tag") {
266
266
  let r = c[parseInt(i.name, 10)];
@@ -268,13 +268,13 @@ var oe = {
268
268
  let g = { ...i.attrs };
269
269
  l && Object.keys(g).forEach((e) => {
270
270
  let n = g[e];
271
- I(n) && (g[e] = t(n));
271
+ L(n) && (g[e] = t(n));
272
272
  });
273
- let _ = Object.keys(g).length === 0 ? r : ye({ props: g }, r), v = p(_), C = v && he(i, !0) && !i.voidElement, w = m && me(_) && _.dummy && !v, T = me(n) && Object.hasOwnProperty.call(n, i.name);
274
- if (I(_)) {
273
+ let _ = Object.keys(g).length === 0 ? r : ve({ props: g }, r), v = p(_), C = v && me(i, !0) && !i.voidElement, w = m && pe(_) && _.dummy && !v, T = pe(n) && Object.hasOwnProperty.call(n, i.name);
274
+ if (L(_)) {
275
275
  let t = a.services.interpolator.interpolate(_, y, a.language);
276
276
  e.push(t);
277
- } else if (he(_) || C) x(_, b(_, i, s), e, u);
277
+ } else if (me(_) || C) x(_, b(_, i, s), e, u);
278
278
  else if (w) x(_, S(c, i.children, s), e, u);
279
279
  else if (Number.isNaN(parseFloat(i.name))) if (T) x(_, b(_, i, s), e, u, i.voidElement);
280
280
  else if (o.transSupportBasicHtmlNodes && d.indexOf(i.name) > -1) if (i.voidElement) e.push(f(i.name, { key: `${i.name}-${u}` }));
@@ -287,7 +287,7 @@ var oe = {
287
287
  let t = S(c, i.children, s);
288
288
  e.push(`<${i.name}>${t}</${i.name}>`);
289
289
  }
290
- else if (me(_) && !v) {
290
+ else if (pe(_) && !v) {
291
291
  let t = i.children[0] ? h : null;
292
292
  t && e.push(t);
293
293
  } else x(_, h, e, u, i.children.length !== 1 || !h);
@@ -298,31 +298,31 @@ var oe = {
298
298
  return e;
299
299
  }, []);
300
300
  };
301
- return ge(S([{
301
+ return he(S([{
302
302
  dummy: !0,
303
303
  children: e || []
304
- }], v, ve(e || []))[0]);
305
- }, we = (e, t, n) => {
304
+ }], v, _e(e || []))[0]);
305
+ }, Ce = (e, t, n) => {
306
306
  let r = e.key || t, i = u(e, { key: r });
307
307
  if (!i.props || !i.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0) return i;
308
308
  function a() {
309
309
  return f(l, null, i);
310
310
  }
311
311
  return f(a, { key: r });
312
- }, Te = (e, t) => e.map((e, n) => we(e, n, t)), Ee = (e, t) => {
312
+ }, we = (e, t) => e.map((e, n) => Ce(e, n, t)), Te = (e, t) => {
313
313
  let n = {};
314
314
  return Object.keys(e).forEach((r) => {
315
- Object.assign(n, { [r]: we(e[r], r, t) });
315
+ Object.assign(n, { [r]: Ce(e[r], r, t) });
316
316
  }), n;
317
- }, De = (e, t, n, r) => e ? Array.isArray(e) ? Te(e, t) : me(e) ? Ee(e, t) : (le(n, "TRANS_INVALID_COMPONENTS", "<Trans /> \"components\" prop expects an object or array", { i18nKey: r }), null) : null, Oe = (e) => !me(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((e, t) => e && Number.isNaN(Number.parseFloat(t)), !0);
318
- function ke({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions: c = {}, values: l, defaults: u, components: d, ns: p, i18n: m, t: h, shouldUnescape: g, ..._ }) {
317
+ }, Ee = (e, t, n, r) => e ? Array.isArray(e) ? we(e, t) : pe(e) ? Te(e, t) : (ce(n, "TRANS_INVALID_COMPONENTS", "<Trans /> \"components\" prop expects an object or array", { i18nKey: r }), null) : null, De = (e) => !pe(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((e, t) => e && Number.isNaN(Number.parseFloat(t)), !0);
318
+ function Oe({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions: c = {}, values: l, defaults: u, components: d, ns: p, i18n: m, t: h, shouldUnescape: g, ..._ }) {
319
319
  let v = m || n();
320
- if (!v) return le(v, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", { i18nKey: o }), t;
320
+ if (!v) return ce(v, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", { i18nKey: o }), t;
321
321
  let y = h || v.t.bind(v) || ((e) => e), b = {
322
322
  ...r(),
323
323
  ...v.options?.react
324
324
  }, x = p || y.ns || v.options?.defaultNS;
325
- x = I(x) ? [x] : x || ["translation"];
325
+ x = L(x) ? [x] : x || ["translation"];
326
326
  let { transDefaultProps: S } = b, C = S?.tOptions ? {
327
327
  ...S.tOptions,
328
328
  ...c
@@ -332,12 +332,12 @@ function ke({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions
332
332
  } : l, E = S?.components ? {
333
333
  ...S.components,
334
334
  ...d
335
- } : d, D = xe(t, b, v, o), O = u || C?.defaultValue || D || b.transEmptyNodeValue || (typeof o == "function" ? e(o) : o), { hashTransKey: k } = b, A = o || (k ? k(D || O) : D || O);
335
+ } : d, D = be(t, b, v, o), O = u || C?.defaultValue || D || b.transEmptyNodeValue || (typeof o == "function" ? e(o) : o), { hashTransKey: k } = b, A = o || (k ? k(D || O) : D || O);
336
336
  l = v.options?.interpolation?.defaultVariables ? T && Object.keys(T).length > 0 ? {
337
337
  ...T,
338
338
  ...v.options.interpolation.defaultVariables
339
339
  } : { ...v.options.interpolation.defaultVariables } : T;
340
- let j = be(t);
340
+ let j = ye(t);
341
341
  j && typeof j.count == "number" && i === void 0 && (i = j.count);
342
342
  let M = l || i !== void 0 && !v.options?.interpolation?.alwaysFormat || !t ? C.interpolation : { interpolation: {
343
343
  ...C.interpolation,
@@ -353,14 +353,14 @@ function ke({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions
353
353
  ns: x
354
354
  }, P = A ? y(A, N) : O;
355
355
  P === A && O && (P = O);
356
- let ee = De(E, P, v, o), te = ee || t, F = null;
357
- Oe(ee) && (F = ee, te = t);
358
- let ne = Ce(te, F, P, v, b, N, w), re = a ?? b.defaultTransParent;
359
- return re ? f(re, _, ne) : ne;
356
+ let ee = Ee(E, P, v, o), F = ee || t, I = null;
357
+ De(ee) && (I = ee, F = t);
358
+ let te = Se(F, I, P, v, b, N, w), ne = a ?? b.defaultTransParent;
359
+ return ne ? f(ne, _, te) : te;
360
360
  }
361
361
  //#endregion
362
362
  //#region node_modules/react-i18next/dist/es/context.js
363
- var Ae = d(), je = class {
363
+ var ke = d(), Ae = class {
364
364
  constructor() {
365
365
  this.usedNamespaces = {};
366
366
  }
@@ -375,9 +375,9 @@ var Ae = d(), je = class {
375
375
  };
376
376
  //#endregion
377
377
  //#region node_modules/react-i18next/dist/es/Trans.js
378
- function Me({ children: e, count: t, parent: r, i18nKey: i, context: a, tOptions: o = {}, values: s, defaults: c, components: l, ns: u, i18n: d, t: f, shouldUnescape: p, ...m }) {
379
- let { i18n: g, defaultNS: _ } = h(Ae) || {}, v = d || g || n(), y = f || v?.t.bind(v);
380
- return ke({
378
+ function je({ children: e, count: t, parent: r, i18nKey: i, context: a, tOptions: o = {}, values: s, defaults: c, components: l, ns: u, i18n: d, t: f, shouldUnescape: p, ...m }) {
379
+ let { i18n: g, defaultNS: _ } = h(ke) || {}, v = d || g || n(), y = f || v?.t.bind(v);
380
+ return Oe({
381
381
  children: e,
382
382
  count: t,
383
383
  parent: r,
@@ -394,10 +394,10 @@ function Me({ children: e, count: t, parent: r, i18nKey: i, context: a, tOptions
394
394
  ...m
395
395
  });
396
396
  }
397
- var Ne = {
397
+ var Me = {
398
398
  t: (e, t) => {
399
- if (I(t)) return t;
400
- if (me(t) && I(t.defaultValue)) return t.defaultValue;
399
+ if (L(t)) return t;
400
+ if (pe(t) && L(t.defaultValue)) return t.defaultValue;
401
401
  if (typeof e == "function") return "";
402
402
  if (Array.isArray(e)) {
403
403
  let t = e[e.length - 1];
@@ -406,17 +406,17 @@ var Ne = {
406
406
  return e;
407
407
  },
408
408
  ready: !1
409
- }, Pe = () => () => {}, Fe = (e, t = {}) => {
410
- let { i18n: i } = t, { i18n: a, defaultNS: o } = h(Ae) || {}, s = i || a || n();
411
- s && !s.reportNamespaces && (s.reportNamespaces = new je()), s || le(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
409
+ }, Ne = () => () => {}, Pe = (e, t = {}) => {
410
+ let { i18n: i } = t, { i18n: a, defaultNS: o } = h(ke) || {}, s = i || a || n();
411
+ s && !s.reportNamespaces && (s.reportNamespaces = new Ae()), s || ce(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
412
412
  let c = _(() => ({
413
413
  ...r(),
414
414
  ...s?.options?.react,
415
415
  ...t
416
- }), [s, t]), { useSuspense: l, keyPrefix: u } = c, d = e || o || s?.options?.defaultNS, f = I(d) ? [d] : d || ["translation"], p = _(() => f, f);
416
+ }), [s, t]), { useSuspense: l, keyPrefix: u } = c, d = e || o || s?.options?.defaultNS, f = L(d) ? [d] : d || ["translation"], p = _(() => f, f);
417
417
  s?.reportNamespaces?.addUsedNamespaces?.(p);
418
418
  let x = v(0), S = m((e) => {
419
- if (!s) return Pe;
419
+ if (!s) return Ne;
420
420
  let { bindI18n: t, bindI18nStore: n } = c, r = () => {
421
421
  x.current += 1, e();
422
422
  };
@@ -424,8 +424,8 @@ var Ne = {
424
424
  t && t.split(" ").forEach((e) => s.off(e, r)), n && n.split(" ").forEach((e) => s.store.off(e, r));
425
425
  };
426
426
  }, [s, c]), C = v(), w = m(() => {
427
- if (!s) return Ne;
428
- let e = !!(s.isInitialized || s.initializedStoreOnce) && p.every((e) => pe(e, s, c)), n = t.lng || s.language, r = x.current, i = C.current;
427
+ if (!s) return Me;
428
+ let e = !!(s.isInitialized || s.initializedStoreOnce) && p.every((e) => fe(e, s, c)), n = t.lng || s.language, r = x.current, i = C.current;
429
429
  if (i && i.ready === e && i.lng === n && i.keyPrefix === u && i.revision === r) return i;
430
430
  let a = {
431
431
  t: s.getFixedT(n, c.nsMode === "fallback" ? p : p[0], u),
@@ -445,7 +445,7 @@ var Ne = {
445
445
  g(() => {
446
446
  if (s && !O && !l) {
447
447
  let e = () => E((e) => e + 1);
448
- t.lng ? fe(s, t.lng, p, e) : de(s, p, e);
448
+ t.lng ? de(s, t.lng, p, e) : ue(s, p, e);
449
449
  }
450
450
  }, [
451
451
  s,
@@ -471,7 +471,7 @@ var Ne = {
471
471
  }, N = _(() => {
472
472
  let e = k, t = e?.language, n = e;
473
473
  e && (A.current && A.current.__original === e && j.current === t ? n = A.current : (n = M(e), A.current = n, j.current = t));
474
- let r = !O && !l ? (...e) => (le(s, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), D(...e)) : D, i = [
474
+ let r = !O && !l ? (...e) => (ce(s, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), D(...e)) : D, i = [
475
475
  r,
476
476
  n,
477
477
  O
@@ -487,36 +487,40 @@ var Ne = {
487
487
  ]);
488
488
  if (s && l && !O) throw new Promise((e) => {
489
489
  let n = () => e();
490
- t.lng ? fe(s, t.lng, p, n) : de(s, p, n);
490
+ t.lng ? de(s, t.lng, p, n) : ue(s, p, n);
491
491
  });
492
492
  return N;
493
493
  };
494
494
  //#endregion
495
495
  //#region src/hooks/useTheme.ts
496
- function Ie() {
497
- let e = o((e) => e.activeTheme), t = o((e) => e.setTheme);
496
+ function Fe({ elementRef: e } = {}) {
497
+ let t = o((e) => e.activeTheme), n = o((e) => e.setTheme), r = o((e) => e.config.cssVars);
498
498
  return g(() => {
499
- let t = i(e);
500
- document.documentElement.dataset.theme = t.id;
501
- }, [e]), {
502
- activeTheme: e,
503
- setTheme: t
499
+ let n = i(t), a = e?.current;
500
+ if (a && (a.dataset.theme = n.id, r)) for (let [e, t] of Object.entries(r)) a.style.setProperty(e, t);
501
+ }, [
502
+ t,
503
+ e,
504
+ r
505
+ ]), {
506
+ activeTheme: t,
507
+ setTheme: n
504
508
  };
505
509
  }
506
510
  //#endregion
507
511
  //#region src/hooks/useCta.ts
508
- function Le() {
512
+ function Ie() {
509
513
  try {
510
514
  let e = new AudioContext(), t = e.createOscillator(), n = e.createGain();
511
515
  t.connect(n), n.connect(e.destination), t.type = "sine", t.frequency.setValueAtTime(880, e.currentTime), t.frequency.setValueAtTime(1047, e.currentTime + .08), t.frequency.setValueAtTime(1319, e.currentTime + .16), n.gain.setValueAtTime(.15, e.currentTime), n.gain.exponentialRampToValueAtTime(.01, e.currentTime + .4), t.start(e.currentTime), t.stop(e.currentTime + .4);
512
516
  } catch {}
513
517
  }
514
- function Re(e, t, n) {
518
+ function Le(e, t, n) {
515
519
  let [r, i] = y(!1), a = v(!1), o = n && (e.showCta ?? !0), s = e.ctaDelay ?? 5e3, c = e.ctaSound ?? !0, l = e.i18n?.[t]?.ctaText ?? e.i18n?.en?.ctaText ?? e.ctaText ?? "Hi! How can I help you today?", u = m(() => i(!1), []);
516
520
  return g(() => {
517
521
  if (!o || a.current) return;
518
522
  let e = setTimeout(() => {
519
- a.current = !0, i(!0), c && Le();
523
+ a.current = !0, i(!0), c && Ie();
520
524
  }, s);
521
525
  return () => clearTimeout(e);
522
526
  }, [
@@ -531,7 +535,7 @@ function Re(e, t, n) {
531
535
  }
532
536
  //#endregion
533
537
  //#region src/hooks/useAgentStream.ts
534
- function ze() {
538
+ function Re() {
535
539
  let e = o((e) => e.config), t = s((e) => e.activeSessionId), n = s((e) => e.addMessage), r = s((e) => e.setAwaitingAgentReply), i = s((e) => e.setToken);
536
540
  g(() => {
537
541
  let a = e.agentStream;
@@ -577,8 +581,8 @@ function ze() {
577
581
  }
578
582
  //#endregion
579
583
  //#region src/components/Sidebar.tsx
580
- function Be({ onOpenSettings: e }) {
581
- let { t } = Fe(), n = s((e) => e.sessions), r = s((e) => e.activeSessionId), i = s((e) => e.createSession), a = s((e) => e.setActiveSession), c = s((e) => e.deleteSession), l = o((e) => e.config.hideSettings ?? !1), [u, d] = y(null);
584
+ function ze({ onOpenSettings: e }) {
585
+ let { t } = Pe(), n = s((e) => e.sessions), r = s((e) => e.activeSessionId), i = s((e) => e.createSession), a = s((e) => e.setActiveSession), c = s((e) => e.deleteSession), l = o((e) => e.config.hideSettings ?? !1), [u, d] = y(null);
582
586
  return /* @__PURE__ */ C("aside", {
583
587
  className: "flex flex-col h-full w-64 flex-shrink-0 border-r",
584
588
  style: {
@@ -684,14 +688,14 @@ function Be({ onOpenSettings: e }) {
684
688
  }
685
689
  //#endregion
686
690
  //#region src/lib/n8nClient.ts
687
- var Ve = class extends Error {
691
+ var Be = class extends Error {
688
692
  status;
689
693
  retryable;
690
694
  constructor(e, t, n = !1) {
691
695
  super(e), this.name = "N8nApiError", this.status = t, this.retryable = n;
692
696
  }
693
- }, He = 2, Ue = [500, 1500];
694
- async function We(e, t, n, r, i, a) {
697
+ }, Ve = 2, He = [500, 1500];
698
+ async function Ue(e, t, n, r, i, a) {
695
699
  let o = e.chatInputKey ?? "chatInput", s = e.chatSessionKey ?? "sessionId", c = e.webhookConfig?.method ?? "POST", l = {
696
700
  "Content-Type": "application/json",
697
701
  ...e.webhookConfig?.headers
@@ -704,8 +708,8 @@ async function We(e, t, n, r, i, a) {
704
708
  }, d = e.streaming && a !== void 0;
705
709
  d && (l.Accept = "text/event-stream");
706
710
  let f;
707
- for (let t = 0; t <= He; t++) {
708
- t > 0 && await qe((f instanceof Ve && f.status === 429 ? Ke(f) : null) ?? Ue[t - 1] ?? 4e3);
711
+ for (let t = 0; t <= Ve; t++) {
712
+ t > 0 && await Ke((f instanceof Be && f.status === 429 ? Ge(f) : null) ?? He[t - 1] ?? 4e3);
709
713
  try {
710
714
  let t;
711
715
  try {
@@ -715,13 +719,13 @@ async function We(e, t, n, r, i, a) {
715
719
  body: c === "GET" ? void 0 : JSON.stringify(u)
716
720
  });
717
721
  } catch (e) {
718
- throw new Ve(`Network error: ${e instanceof Error ? e.message : String(e)}`, void 0, !0);
722
+ throw new Be(`Network error: ${e instanceof Error ? e.message : String(e)}`, void 0, !0);
719
723
  }
720
724
  if (!t.ok) {
721
- let e = Ge(t.status), n = t.headers.get("Retry-After"), r = new Ve(`Webhook returned ${t.status}`, t.status, e);
725
+ let e = We(t.status), n = t.headers.get("Retry-After"), r = new Be(`Webhook returned ${t.status}`, t.status, e);
722
726
  throw n && (r.retryAfter = n), r;
723
727
  }
724
- if (d && t.body) return await Je(t.body, a);
728
+ if (d && t.body) return await qe(t.body, a);
725
729
  let n = await t.text();
726
730
  if (!n) return "";
727
731
  try {
@@ -731,15 +735,15 @@ async function We(e, t, n, r, i, a) {
731
735
  return "";
732
736
  }
733
737
  } catch (e) {
734
- if (f = e, !(e instanceof Ve && e.retryable) || t === He) throw e;
738
+ if (f = e, !(e instanceof Be && e.retryable) || t === Ve) throw e;
735
739
  }
736
740
  }
737
741
  throw f;
738
742
  }
739
- function Ge(e) {
743
+ function We(e) {
740
744
  return e === 408 || e === 429 || e === 502 || e === 503 || e === 504;
741
745
  }
742
- function Ke(e) {
746
+ function Ge(e) {
743
747
  let t = e.retryAfter;
744
748
  if (!t) return null;
745
749
  let n = Number(t);
@@ -747,10 +751,10 @@ function Ke(e) {
747
751
  let r = Date.parse(t);
748
752
  return Number.isNaN(r) ? null : Math.max(0, Math.min(r - Date.now(), 1e4));
749
753
  }
750
- function qe(e) {
754
+ function Ke(e) {
751
755
  return new Promise((t) => setTimeout(t, e));
752
756
  }
753
- async function Je(e, t) {
757
+ async function qe(e, t) {
754
758
  let n = e.getReader(), r = new TextDecoder(), i = "", a = "";
755
759
  for (;;) {
756
760
  let { done: e, value: o } = await n.read();
@@ -771,23 +775,23 @@ async function Je(e, t) {
771
775
  }
772
776
  //#endregion
773
777
  //#region src/hooks/useChat.ts
774
- function Ye() {
778
+ function Je() {
775
779
  return Math.random().toString(36).slice(2) + Date.now().toString(36);
776
780
  }
777
- function Xe() {
781
+ function Ye() {
778
782
  let { activeSessionId: e, addMessage: t, appendToLastBot: n, removeLastBotIfEmpty: r, setStreaming: i, setAwaitingAgentReply: a, updateMessageStatus: c, createSession: l } = s(), u = o((e) => e.config), d = o((e) => e.language), f = s((e) => e.isStreaming), p = m(async (e, o, l, f) => {
779
783
  c(l, o, "sending"), i(!0), t(l, {
780
- id: Ye(),
784
+ id: Je(),
781
785
  role: "bot",
782
786
  content: "",
783
787
  ts: Date.now()
784
788
  });
785
789
  try {
786
- if (u.streaming) await We(u, l, e, d, f, (e) => {
790
+ if (u.streaming) await Ue(u, l, e, d, f, (e) => {
787
791
  n(l, e);
788
792
  });
789
793
  else {
790
- let t = await We(u, l, e, d, f);
794
+ let t = await Ue(u, l, e, d, f);
791
795
  t && n(l, t);
792
796
  }
793
797
  let t = s.getState().messages[l]?.slice(-1)[0];
@@ -812,7 +816,7 @@ function Xe() {
812
816
  let i = r && r.length > 0;
813
817
  if (!u.webhookUrl || !n.trim() && !i) return;
814
818
  let a = e ?? l(), o = n.trim(), s = {
815
- id: Ye(),
819
+ id: Je(),
816
820
  role: "user",
817
821
  content: o,
818
822
  ts: Date.now(),
@@ -838,143 +842,143 @@ function Xe() {
838
842
  }
839
843
  //#endregion
840
844
  //#region node_modules/comma-separated-tokens/index.js
841
- function Ze(e, t) {
845
+ function Xe(e, t) {
842
846
  let n = t || {};
843
847
  return (e[e.length - 1] === "" ? [...e, ""] : e).join((n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")).trim();
844
848
  }
845
849
  //#endregion
846
850
  //#region node_modules/estree-util-is-identifier-name/lib/index.js
847
- var Qe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, $e = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, et = {};
848
- function tt(e, t) {
849
- return ((t || et).jsx ? $e : Qe).test(e);
851
+ var Ze = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Qe = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, $e = {};
852
+ function et(e, t) {
853
+ return ((t || $e).jsx ? Qe : Ze).test(e);
850
854
  }
851
855
  //#endregion
852
856
  //#region node_modules/hast-util-whitespace/lib/index.js
853
- var nt = /[ \t\n\f\r]/g;
854
- function rt(e) {
855
- return typeof e == "object" ? e.type === "text" ? it(e.value) : !1 : it(e);
857
+ var tt = /[ \t\n\f\r]/g;
858
+ function nt(e) {
859
+ return typeof e == "object" ? e.type === "text" ? rt(e.value) : !1 : rt(e);
856
860
  }
857
- function it(e) {
858
- return e.replace(nt, "") === "";
861
+ function rt(e) {
862
+ return e.replace(tt, "") === "";
859
863
  }
860
864
  //#endregion
861
865
  //#region node_modules/property-information/lib/util/schema.js
862
- var at = class {
866
+ var it = class {
863
867
  constructor(e, t, n) {
864
868
  this.normal = t, this.property = e, n && (this.space = n);
865
869
  }
866
870
  };
867
- at.prototype.normal = {}, at.prototype.property = {}, at.prototype.space = void 0;
871
+ it.prototype.normal = {}, it.prototype.property = {}, it.prototype.space = void 0;
868
872
  //#endregion
869
873
  //#region node_modules/property-information/lib/util/merge.js
870
- function ot(e, t) {
874
+ function at(e, t) {
871
875
  let n = {}, r = {};
872
876
  for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
873
- return new at(n, r, t);
877
+ return new it(n, r, t);
874
878
  }
875
879
  //#endregion
876
880
  //#region node_modules/property-information/lib/normalize.js
877
- function st(e) {
881
+ function ot(e) {
878
882
  return e.toLowerCase();
879
883
  }
880
884
  //#endregion
881
885
  //#region node_modules/property-information/lib/util/info.js
882
- var L = class {
886
+ var R = class {
883
887
  constructor(e, t) {
884
888
  this.attribute = t, this.property = e;
885
889
  }
886
890
  };
887
- L.prototype.attribute = "", L.prototype.booleanish = !1, L.prototype.boolean = !1, L.prototype.commaOrSpaceSeparated = !1, L.prototype.commaSeparated = !1, L.prototype.defined = !1, L.prototype.mustUseProperty = !1, L.prototype.number = !1, L.prototype.overloadedBoolean = !1, L.prototype.property = "", L.prototype.spaceSeparated = !1, L.prototype.space = void 0;
891
+ R.prototype.attribute = "", R.prototype.booleanish = !1, R.prototype.boolean = !1, R.prototype.commaOrSpaceSeparated = !1, R.prototype.commaSeparated = !1, R.prototype.defined = !1, R.prototype.mustUseProperty = !1, R.prototype.number = !1, R.prototype.overloadedBoolean = !1, R.prototype.property = "", R.prototype.spaceSeparated = !1, R.prototype.space = void 0;
888
892
  //#endregion
889
893
  //#region node_modules/property-information/lib/util/types.js
890
- var ct = /* @__PURE__ */ M({
891
- boolean: () => R,
892
- booleanish: () => z,
893
- commaOrSpaceSeparated: () => H,
894
- commaSeparated: () => dt,
895
- number: () => B,
896
- overloadedBoolean: () => ut,
897
- spaceSeparated: () => V
898
- }), lt = 0, R = ft(), z = ft(), ut = ft(), B = ft(), V = ft(), dt = ft(), H = ft();
899
- function ft() {
900
- return 2 ** ++lt;
894
+ var st = /* @__PURE__ */ M({
895
+ boolean: () => z,
896
+ booleanish: () => B,
897
+ commaOrSpaceSeparated: () => U,
898
+ commaSeparated: () => ut,
899
+ number: () => V,
900
+ overloadedBoolean: () => lt,
901
+ spaceSeparated: () => H
902
+ }), ct = 0, z = dt(), B = dt(), lt = dt(), V = dt(), H = dt(), ut = dt(), U = dt();
903
+ function dt() {
904
+ return 2 ** ++ct;
901
905
  }
902
906
  //#endregion
903
907
  //#region node_modules/property-information/lib/util/defined-info.js
904
- var pt = Object.keys(ct), mt = class extends L {
908
+ var ft = Object.keys(st), pt = class extends R {
905
909
  constructor(e, t, n, r) {
906
910
  let i = -1;
907
- if (super(e, t), ht(this, "space", r), typeof n == "number") for (; ++i < pt.length;) {
908
- let e = pt[i];
909
- ht(this, pt[i], (n & ct[e]) === ct[e]);
911
+ if (super(e, t), mt(this, "space", r), typeof n == "number") for (; ++i < ft.length;) {
912
+ let e = ft[i];
913
+ mt(this, ft[i], (n & st[e]) === st[e]);
910
914
  }
911
915
  }
912
916
  };
913
- mt.prototype.defined = !0;
914
- function ht(e, t, n) {
917
+ pt.prototype.defined = !0;
918
+ function mt(e, t, n) {
915
919
  n && (e[t] = n);
916
920
  }
917
921
  //#endregion
918
922
  //#region node_modules/property-information/lib/util/create.js
919
- function gt(e) {
923
+ function ht(e) {
920
924
  let t = {}, n = {};
921
925
  for (let [r, i] of Object.entries(e.properties)) {
922
- let a = new mt(r, e.transform(e.attributes || {}, r), i, e.space);
923
- e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[st(r)] = r, n[st(a.attribute)] = r;
926
+ let a = new pt(r, e.transform(e.attributes || {}, r), i, e.space);
927
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[ot(r)] = r, n[ot(a.attribute)] = r;
924
928
  }
925
- return new at(t, n, e.space);
929
+ return new it(t, n, e.space);
926
930
  }
927
931
  //#endregion
928
932
  //#region node_modules/property-information/lib/aria.js
929
- var _t = gt({
933
+ var gt = ht({
930
934
  properties: {
931
935
  ariaActiveDescendant: null,
932
- ariaAtomic: z,
936
+ ariaAtomic: B,
933
937
  ariaAutoComplete: null,
934
- ariaBusy: z,
935
- ariaChecked: z,
936
- ariaColCount: B,
937
- ariaColIndex: B,
938
- ariaColSpan: B,
939
- ariaControls: V,
938
+ ariaBusy: B,
939
+ ariaChecked: B,
940
+ ariaColCount: V,
941
+ ariaColIndex: V,
942
+ ariaColSpan: V,
943
+ ariaControls: H,
940
944
  ariaCurrent: null,
941
- ariaDescribedBy: V,
945
+ ariaDescribedBy: H,
942
946
  ariaDetails: null,
943
- ariaDisabled: z,
944
- ariaDropEffect: V,
947
+ ariaDisabled: B,
948
+ ariaDropEffect: H,
945
949
  ariaErrorMessage: null,
946
- ariaExpanded: z,
947
- ariaFlowTo: V,
948
- ariaGrabbed: z,
950
+ ariaExpanded: B,
951
+ ariaFlowTo: H,
952
+ ariaGrabbed: B,
949
953
  ariaHasPopup: null,
950
- ariaHidden: z,
954
+ ariaHidden: B,
951
955
  ariaInvalid: null,
952
956
  ariaKeyShortcuts: null,
953
957
  ariaLabel: null,
954
- ariaLabelledBy: V,
955
- ariaLevel: B,
958
+ ariaLabelledBy: H,
959
+ ariaLevel: V,
956
960
  ariaLive: null,
957
- ariaModal: z,
958
- ariaMultiLine: z,
959
- ariaMultiSelectable: z,
961
+ ariaModal: B,
962
+ ariaMultiLine: B,
963
+ ariaMultiSelectable: B,
960
964
  ariaOrientation: null,
961
- ariaOwns: V,
965
+ ariaOwns: H,
962
966
  ariaPlaceholder: null,
963
- ariaPosInSet: B,
964
- ariaPressed: z,
965
- ariaReadOnly: z,
967
+ ariaPosInSet: V,
968
+ ariaPressed: B,
969
+ ariaReadOnly: B,
966
970
  ariaRelevant: null,
967
- ariaRequired: z,
968
- ariaRoleDescription: V,
969
- ariaRowCount: B,
970
- ariaRowIndex: B,
971
- ariaRowSpan: B,
972
- ariaSelected: z,
973
- ariaSetSize: B,
971
+ ariaRequired: B,
972
+ ariaRoleDescription: H,
973
+ ariaRowCount: V,
974
+ ariaRowIndex: V,
975
+ ariaRowSpan: V,
976
+ ariaSelected: B,
977
+ ariaSetSize: V,
974
978
  ariaSort: null,
975
- ariaValueMax: B,
976
- ariaValueMin: B,
977
- ariaValueNow: B,
979
+ ariaValueMax: V,
980
+ ariaValueMin: V,
981
+ ariaValueNow: V,
978
982
  ariaValueText: null,
979
983
  role: null
980
984
  },
@@ -984,17 +988,17 @@ var _t = gt({
984
988
  });
985
989
  //#endregion
986
990
  //#region node_modules/property-information/lib/util/case-sensitive-transform.js
987
- function vt(e, t) {
991
+ function _t(e, t) {
988
992
  return t in e ? e[t] : t;
989
993
  }
990
994
  //#endregion
991
995
  //#region node_modules/property-information/lib/util/case-insensitive-transform.js
992
- function yt(e, t) {
993
- return vt(e, t.toLowerCase());
996
+ function vt(e, t) {
997
+ return _t(e, t.toLowerCase());
994
998
  }
995
999
  //#endregion
996
1000
  //#region node_modules/property-information/lib/html.js
997
- var bt = gt({
1001
+ var yt = ht({
998
1002
  attributes: {
999
1003
  acceptcharset: "accept-charset",
1000
1004
  classname: "class",
@@ -1009,45 +1013,45 @@ var bt = gt({
1009
1013
  ],
1010
1014
  properties: {
1011
1015
  abbr: null,
1012
- accept: dt,
1013
- acceptCharset: V,
1014
- accessKey: V,
1016
+ accept: ut,
1017
+ acceptCharset: H,
1018
+ accessKey: H,
1015
1019
  action: null,
1016
1020
  allow: null,
1017
- allowFullScreen: R,
1018
- allowPaymentRequest: R,
1019
- allowUserMedia: R,
1021
+ allowFullScreen: z,
1022
+ allowPaymentRequest: z,
1023
+ allowUserMedia: z,
1020
1024
  alt: null,
1021
1025
  as: null,
1022
- async: R,
1026
+ async: z,
1023
1027
  autoCapitalize: null,
1024
- autoComplete: V,
1025
- autoFocus: R,
1026
- autoPlay: R,
1027
- blocking: V,
1028
+ autoComplete: H,
1029
+ autoFocus: z,
1030
+ autoPlay: z,
1031
+ blocking: H,
1028
1032
  capture: null,
1029
1033
  charSet: null,
1030
- checked: R,
1034
+ checked: z,
1031
1035
  cite: null,
1032
- className: V,
1033
- cols: B,
1036
+ className: H,
1037
+ cols: V,
1034
1038
  colSpan: null,
1035
1039
  content: null,
1036
- contentEditable: z,
1037
- controls: R,
1038
- controlsList: V,
1039
- coords: B | dt,
1040
+ contentEditable: B,
1041
+ controls: z,
1042
+ controlsList: H,
1043
+ coords: V | ut,
1040
1044
  crossOrigin: null,
1041
1045
  data: null,
1042
1046
  dateTime: null,
1043
1047
  decoding: null,
1044
- default: R,
1045
- defer: R,
1048
+ default: z,
1049
+ defer: z,
1046
1050
  dir: null,
1047
1051
  dirName: null,
1048
- disabled: R,
1049
- download: ut,
1050
- draggable: z,
1052
+ disabled: z,
1053
+ download: lt,
1054
+ draggable: B,
1051
1055
  encType: null,
1052
1056
  enterKeyHint: null,
1053
1057
  fetchPriority: null,
@@ -1055,50 +1059,50 @@ var bt = gt({
1055
1059
  formAction: null,
1056
1060
  formEncType: null,
1057
1061
  formMethod: null,
1058
- formNoValidate: R,
1062
+ formNoValidate: z,
1059
1063
  formTarget: null,
1060
- headers: V,
1061
- height: B,
1062
- hidden: ut,
1063
- high: B,
1064
+ headers: H,
1065
+ height: V,
1066
+ hidden: lt,
1067
+ high: V,
1064
1068
  href: null,
1065
1069
  hrefLang: null,
1066
- htmlFor: V,
1067
- httpEquiv: V,
1070
+ htmlFor: H,
1071
+ httpEquiv: H,
1068
1072
  id: null,
1069
1073
  imageSizes: null,
1070
1074
  imageSrcSet: null,
1071
- inert: R,
1075
+ inert: z,
1072
1076
  inputMode: null,
1073
1077
  integrity: null,
1074
1078
  is: null,
1075
- isMap: R,
1079
+ isMap: z,
1076
1080
  itemId: null,
1077
- itemProp: V,
1078
- itemRef: V,
1079
- itemScope: R,
1080
- itemType: V,
1081
+ itemProp: H,
1082
+ itemRef: H,
1083
+ itemScope: z,
1084
+ itemType: H,
1081
1085
  kind: null,
1082
1086
  label: null,
1083
1087
  lang: null,
1084
1088
  language: null,
1085
1089
  list: null,
1086
1090
  loading: null,
1087
- loop: R,
1088
- low: B,
1091
+ loop: z,
1092
+ low: V,
1089
1093
  manifest: null,
1090
1094
  max: null,
1091
- maxLength: B,
1095
+ maxLength: V,
1092
1096
  media: null,
1093
1097
  method: null,
1094
1098
  min: null,
1095
- minLength: B,
1096
- multiple: R,
1097
- muted: R,
1099
+ minLength: V,
1100
+ multiple: z,
1101
+ muted: z,
1098
1102
  name: null,
1099
1103
  nonce: null,
1100
- noModule: R,
1101
- noValidate: R,
1104
+ noModule: z,
1105
+ noValidate: z,
1102
1106
  onAbort: null,
1103
1107
  onAfterPrint: null,
1104
1108
  onAuxClick: null,
@@ -1187,65 +1191,65 @@ var bt = gt({
1187
1191
  onVolumeChange: null,
1188
1192
  onWaiting: null,
1189
1193
  onWheel: null,
1190
- open: R,
1191
- optimum: B,
1194
+ open: z,
1195
+ optimum: V,
1192
1196
  pattern: null,
1193
- ping: V,
1197
+ ping: H,
1194
1198
  placeholder: null,
1195
- playsInline: R,
1199
+ playsInline: z,
1196
1200
  popover: null,
1197
1201
  popoverTarget: null,
1198
1202
  popoverTargetAction: null,
1199
1203
  poster: null,
1200
1204
  preload: null,
1201
- readOnly: R,
1205
+ readOnly: z,
1202
1206
  referrerPolicy: null,
1203
- rel: V,
1204
- required: R,
1205
- reversed: R,
1206
- rows: B,
1207
- rowSpan: B,
1208
- sandbox: V,
1207
+ rel: H,
1208
+ required: z,
1209
+ reversed: z,
1210
+ rows: V,
1211
+ rowSpan: V,
1212
+ sandbox: H,
1209
1213
  scope: null,
1210
- scoped: R,
1211
- seamless: R,
1212
- selected: R,
1213
- shadowRootClonable: R,
1214
- shadowRootDelegatesFocus: R,
1214
+ scoped: z,
1215
+ seamless: z,
1216
+ selected: z,
1217
+ shadowRootClonable: z,
1218
+ shadowRootDelegatesFocus: z,
1215
1219
  shadowRootMode: null,
1216
1220
  shape: null,
1217
- size: B,
1221
+ size: V,
1218
1222
  sizes: null,
1219
1223
  slot: null,
1220
- span: B,
1221
- spellCheck: z,
1224
+ span: V,
1225
+ spellCheck: B,
1222
1226
  src: null,
1223
1227
  srcDoc: null,
1224
1228
  srcLang: null,
1225
1229
  srcSet: null,
1226
- start: B,
1230
+ start: V,
1227
1231
  step: null,
1228
1232
  style: null,
1229
- tabIndex: B,
1233
+ tabIndex: V,
1230
1234
  target: null,
1231
1235
  title: null,
1232
1236
  translate: null,
1233
1237
  type: null,
1234
- typeMustMatch: R,
1238
+ typeMustMatch: z,
1235
1239
  useMap: null,
1236
- value: z,
1237
- width: B,
1240
+ value: B,
1241
+ width: V,
1238
1242
  wrap: null,
1239
1243
  writingSuggestions: null,
1240
1244
  align: null,
1241
1245
  aLink: null,
1242
- archive: V,
1246
+ archive: H,
1243
1247
  axis: null,
1244
1248
  background: null,
1245
1249
  bgColor: null,
1246
- border: B,
1250
+ border: V,
1247
1251
  borderColor: null,
1248
- bottomMargin: B,
1252
+ bottomMargin: V,
1249
1253
  cellPadding: null,
1250
1254
  cellSpacing: null,
1251
1255
  char: null,
@@ -1256,54 +1260,54 @@ var bt = gt({
1256
1260
  codeBase: null,
1257
1261
  codeType: null,
1258
1262
  color: null,
1259
- compact: R,
1260
- declare: R,
1263
+ compact: z,
1264
+ declare: z,
1261
1265
  event: null,
1262
1266
  face: null,
1263
1267
  frame: null,
1264
1268
  frameBorder: null,
1265
- hSpace: B,
1266
- leftMargin: B,
1269
+ hSpace: V,
1270
+ leftMargin: V,
1267
1271
  link: null,
1268
1272
  longDesc: null,
1269
1273
  lowSrc: null,
1270
- marginHeight: B,
1271
- marginWidth: B,
1272
- noResize: R,
1273
- noHref: R,
1274
- noShade: R,
1275
- noWrap: R,
1274
+ marginHeight: V,
1275
+ marginWidth: V,
1276
+ noResize: z,
1277
+ noHref: z,
1278
+ noShade: z,
1279
+ noWrap: z,
1276
1280
  object: null,
1277
1281
  profile: null,
1278
1282
  prompt: null,
1279
1283
  rev: null,
1280
- rightMargin: B,
1284
+ rightMargin: V,
1281
1285
  rules: null,
1282
1286
  scheme: null,
1283
- scrolling: z,
1287
+ scrolling: B,
1284
1288
  standby: null,
1285
1289
  summary: null,
1286
1290
  text: null,
1287
- topMargin: B,
1291
+ topMargin: V,
1288
1292
  valueType: null,
1289
1293
  version: null,
1290
1294
  vAlign: null,
1291
1295
  vLink: null,
1292
- vSpace: B,
1296
+ vSpace: V,
1293
1297
  allowTransparency: null,
1294
1298
  autoCorrect: null,
1295
1299
  autoSave: null,
1296
- disablePictureInPicture: R,
1297
- disableRemotePlayback: R,
1300
+ disablePictureInPicture: z,
1301
+ disableRemotePlayback: z,
1298
1302
  prefix: null,
1299
1303
  property: null,
1300
- results: B,
1304
+ results: V,
1301
1305
  security: null,
1302
1306
  unselectable: null
1303
1307
  },
1304
1308
  space: "html",
1305
- transform: yt
1306
- }), xt = gt({
1309
+ transform: vt
1310
+ }), bt = ht({
1307
1311
  attributes: {
1308
1312
  accentHeight: "accent-height",
1309
1313
  alignmentBaseline: "alignment-baseline",
@@ -1479,29 +1483,29 @@ var bt = gt({
1479
1483
  timelineBegin: "timelinebegin"
1480
1484
  },
1481
1485
  properties: {
1482
- about: H,
1483
- accentHeight: B,
1486
+ about: U,
1487
+ accentHeight: V,
1484
1488
  accumulate: null,
1485
1489
  additive: null,
1486
1490
  alignmentBaseline: null,
1487
- alphabetic: B,
1488
- amplitude: B,
1491
+ alphabetic: V,
1492
+ amplitude: V,
1489
1493
  arabicForm: null,
1490
- ascent: B,
1494
+ ascent: V,
1491
1495
  attributeName: null,
1492
1496
  attributeType: null,
1493
- azimuth: B,
1497
+ azimuth: V,
1494
1498
  bandwidth: null,
1495
1499
  baselineShift: null,
1496
1500
  baseFrequency: null,
1497
1501
  baseProfile: null,
1498
1502
  bbox: null,
1499
1503
  begin: null,
1500
- bias: B,
1504
+ bias: V,
1501
1505
  by: null,
1502
1506
  calcMode: null,
1503
- capHeight: B,
1504
- className: V,
1507
+ capHeight: V,
1508
+ className: H,
1505
1509
  clip: null,
1506
1510
  clipPath: null,
1507
1511
  clipPathUnits: null,
@@ -1521,26 +1525,26 @@ var bt = gt({
1521
1525
  d: null,
1522
1526
  dataType: null,
1523
1527
  defaultAction: null,
1524
- descent: B,
1525
- diffuseConstant: B,
1528
+ descent: V,
1529
+ diffuseConstant: V,
1526
1530
  direction: null,
1527
1531
  display: null,
1528
1532
  dur: null,
1529
- divisor: B,
1533
+ divisor: V,
1530
1534
  dominantBaseline: null,
1531
- download: R,
1535
+ download: z,
1532
1536
  dx: null,
1533
1537
  dy: null,
1534
1538
  edgeMode: null,
1535
1539
  editable: null,
1536
- elevation: B,
1540
+ elevation: V,
1537
1541
  enableBackground: null,
1538
1542
  end: null,
1539
1543
  event: null,
1540
- exponent: B,
1544
+ exponent: V,
1541
1545
  externalResourcesRequired: null,
1542
1546
  fill: null,
1543
- fillOpacity: B,
1547
+ fillOpacity: V,
1544
1548
  fillRule: null,
1545
1549
  filter: null,
1546
1550
  filterRes: null,
@@ -1561,37 +1565,37 @@ var bt = gt({
1561
1565
  from: null,
1562
1566
  fx: null,
1563
1567
  fy: null,
1564
- g1: dt,
1565
- g2: dt,
1566
- glyphName: dt,
1568
+ g1: ut,
1569
+ g2: ut,
1570
+ glyphName: ut,
1567
1571
  glyphOrientationHorizontal: null,
1568
1572
  glyphOrientationVertical: null,
1569
1573
  glyphRef: null,
1570
1574
  gradientTransform: null,
1571
1575
  gradientUnits: null,
1572
1576
  handler: null,
1573
- hanging: B,
1577
+ hanging: V,
1574
1578
  hatchContentUnits: null,
1575
1579
  hatchUnits: null,
1576
1580
  height: null,
1577
1581
  href: null,
1578
1582
  hrefLang: null,
1579
- horizAdvX: B,
1580
- horizOriginX: B,
1581
- horizOriginY: B,
1583
+ horizAdvX: V,
1584
+ horizOriginX: V,
1585
+ horizOriginY: V,
1582
1586
  id: null,
1583
- ideographic: B,
1587
+ ideographic: V,
1584
1588
  imageRendering: null,
1585
1589
  initialVisibility: null,
1586
1590
  in: null,
1587
1591
  in2: null,
1588
- intercept: B,
1589
- k: B,
1590
- k1: B,
1591
- k2: B,
1592
- k3: B,
1593
- k4: B,
1594
- kernelMatrix: H,
1592
+ intercept: V,
1593
+ k: V,
1594
+ k1: V,
1595
+ k2: V,
1596
+ k3: V,
1597
+ k4: V,
1598
+ kernelMatrix: U,
1595
1599
  kernelUnitLength: null,
1596
1600
  keyPoints: null,
1597
1601
  keySplines: null,
@@ -1601,7 +1605,7 @@ var bt = gt({
1601
1605
  lengthAdjust: null,
1602
1606
  letterSpacing: null,
1603
1607
  lightingColor: null,
1604
- limitingConeAngle: B,
1608
+ limitingConeAngle: V,
1605
1609
  local: null,
1606
1610
  markerEnd: null,
1607
1611
  markerMid: null,
@@ -1617,7 +1621,7 @@ var bt = gt({
1617
1621
  media: null,
1618
1622
  mediaCharacterEncoding: null,
1619
1623
  mediaContentEncodings: null,
1620
- mediaSize: B,
1624
+ mediaSize: V,
1621
1625
  mediaTime: null,
1622
1626
  method: null,
1623
1627
  min: null,
@@ -1723,43 +1727,43 @@ var bt = gt({
1723
1727
  origin: null,
1724
1728
  overflow: null,
1725
1729
  overlay: null,
1726
- overlinePosition: B,
1727
- overlineThickness: B,
1730
+ overlinePosition: V,
1731
+ overlineThickness: V,
1728
1732
  paintOrder: null,
1729
1733
  panose1: null,
1730
1734
  path: null,
1731
- pathLength: B,
1735
+ pathLength: V,
1732
1736
  patternContentUnits: null,
1733
1737
  patternTransform: null,
1734
1738
  patternUnits: null,
1735
1739
  phase: null,
1736
- ping: V,
1740
+ ping: H,
1737
1741
  pitch: null,
1738
1742
  playbackOrder: null,
1739
1743
  pointerEvents: null,
1740
1744
  points: null,
1741
- pointsAtX: B,
1742
- pointsAtY: B,
1743
- pointsAtZ: B,
1745
+ pointsAtX: V,
1746
+ pointsAtY: V,
1747
+ pointsAtZ: V,
1744
1748
  preserveAlpha: null,
1745
1749
  preserveAspectRatio: null,
1746
1750
  primitiveUnits: null,
1747
1751
  propagate: null,
1748
- property: H,
1752
+ property: U,
1749
1753
  r: null,
1750
1754
  radius: null,
1751
1755
  referrerPolicy: null,
1752
1756
  refX: null,
1753
1757
  refY: null,
1754
- rel: H,
1755
- rev: H,
1758
+ rel: U,
1759
+ rev: U,
1756
1760
  renderingIntent: null,
1757
1761
  repeatCount: null,
1758
1762
  repeatDur: null,
1759
- requiredExtensions: H,
1760
- requiredFeatures: H,
1761
- requiredFonts: H,
1762
- requiredFormats: H,
1763
+ requiredExtensions: U,
1764
+ requiredFeatures: U,
1765
+ requiredFonts: U,
1766
+ requiredFormats: U,
1763
1767
  resource: null,
1764
1768
  restart: null,
1765
1769
  result: null,
@@ -1772,8 +1776,8 @@ var bt = gt({
1772
1776
  side: null,
1773
1777
  slope: null,
1774
1778
  snapshotTime: null,
1775
- specularConstant: B,
1776
- specularExponent: B,
1779
+ specularConstant: V,
1780
+ specularExponent: V,
1777
1781
  spreadMethod: null,
1778
1782
  spacing: null,
1779
1783
  startOffset: null,
@@ -1783,30 +1787,30 @@ var bt = gt({
1783
1787
  stitchTiles: null,
1784
1788
  stopColor: null,
1785
1789
  stopOpacity: null,
1786
- strikethroughPosition: B,
1787
- strikethroughThickness: B,
1790
+ strikethroughPosition: V,
1791
+ strikethroughThickness: V,
1788
1792
  string: null,
1789
1793
  stroke: null,
1790
- strokeDashArray: H,
1794
+ strokeDashArray: U,
1791
1795
  strokeDashOffset: null,
1792
1796
  strokeLineCap: null,
1793
1797
  strokeLineJoin: null,
1794
- strokeMiterLimit: B,
1795
- strokeOpacity: B,
1798
+ strokeMiterLimit: V,
1799
+ strokeOpacity: V,
1796
1800
  strokeWidth: null,
1797
1801
  style: null,
1798
- surfaceScale: B,
1802
+ surfaceScale: V,
1799
1803
  syncBehavior: null,
1800
1804
  syncBehaviorDefault: null,
1801
1805
  syncMaster: null,
1802
1806
  syncTolerance: null,
1803
1807
  syncToleranceDefault: null,
1804
- systemLanguage: H,
1805
- tabIndex: B,
1808
+ systemLanguage: U,
1809
+ tabIndex: V,
1806
1810
  tableValues: null,
1807
1811
  target: null,
1808
- targetX: B,
1809
- targetY: B,
1812
+ targetX: V,
1813
+ targetY: V,
1810
1814
  textAnchor: null,
1811
1815
  textDecoration: null,
1812
1816
  textRendering: null,
@@ -1815,28 +1819,28 @@ var bt = gt({
1815
1819
  title: null,
1816
1820
  transformBehavior: null,
1817
1821
  type: null,
1818
- typeOf: H,
1822
+ typeOf: U,
1819
1823
  to: null,
1820
1824
  transform: null,
1821
1825
  transformOrigin: null,
1822
1826
  u1: null,
1823
1827
  u2: null,
1824
- underlinePosition: B,
1825
- underlineThickness: B,
1828
+ underlinePosition: V,
1829
+ underlineThickness: V,
1826
1830
  unicode: null,
1827
1831
  unicodeBidi: null,
1828
1832
  unicodeRange: null,
1829
- unitsPerEm: B,
1833
+ unitsPerEm: V,
1830
1834
  values: null,
1831
- vAlphabetic: B,
1832
- vMathematical: B,
1835
+ vAlphabetic: V,
1836
+ vMathematical: V,
1833
1837
  vectorEffect: null,
1834
- vHanging: B,
1835
- vIdeographic: B,
1838
+ vHanging: V,
1839
+ vIdeographic: V,
1836
1840
  version: null,
1837
- vertAdvY: B,
1838
- vertOriginX: B,
1839
- vertOriginY: B,
1841
+ vertAdvY: V,
1842
+ vertOriginX: V,
1843
+ vertOriginY: V,
1840
1844
  viewBox: null,
1841
1845
  viewTarget: null,
1842
1846
  visibility: null,
@@ -1848,7 +1852,7 @@ var bt = gt({
1848
1852
  x1: null,
1849
1853
  x2: null,
1850
1854
  xChannelSelector: null,
1851
- xHeight: B,
1855
+ xHeight: V,
1852
1856
  y: null,
1853
1857
  y1: null,
1854
1858
  y2: null,
@@ -1857,8 +1861,8 @@ var bt = gt({
1857
1861
  zoomAndPan: null
1858
1862
  },
1859
1863
  space: "svg",
1860
- transform: vt
1861
- }), St = gt({
1864
+ transform: _t
1865
+ }), xt = ht({
1862
1866
  properties: {
1863
1867
  xLinkActuate: null,
1864
1868
  xLinkArcRole: null,
@@ -1872,15 +1876,15 @@ var bt = gt({
1872
1876
  transform(e, t) {
1873
1877
  return "xlink:" + t.slice(5).toLowerCase();
1874
1878
  }
1875
- }), Ct = gt({
1879
+ }), St = ht({
1876
1880
  attributes: { xmlnsxlink: "xmlns:xlink" },
1877
1881
  properties: {
1878
1882
  xmlnsXLink: null,
1879
1883
  xmlns: null
1880
1884
  },
1881
1885
  space: "xmlns",
1882
- transform: yt
1883
- }), wt = gt({
1886
+ transform: vt
1887
+ }), Ct = ht({
1884
1888
  properties: {
1885
1889
  xmlBase: null,
1886
1890
  xmlLang: null,
@@ -1890,7 +1894,7 @@ var bt = gt({
1890
1894
  transform(e, t) {
1891
1895
  return "xml:" + t.slice(3).toLowerCase();
1892
1896
  }
1893
- }), Tt = {
1897
+ }), wt = {
1894
1898
  classId: "classID",
1895
1899
  dataType: "datatype",
1896
1900
  itemId: "itemID",
@@ -1908,54 +1912,54 @@ var bt = gt({
1908
1912
  xLinkTitle: "xlinkTitle",
1909
1913
  xLinkType: "xlinkType",
1910
1914
  xmlnsXLink: "xmlnsXlink"
1911
- }, Et = /[A-Z]/g, Dt = /-[a-z]/g, Ot = /^data[-\w.:]+$/i;
1912
- function kt(e, t) {
1913
- let n = st(t), r = t, i = L;
1915
+ }, Tt = /[A-Z]/g, Et = /-[a-z]/g, Dt = /^data[-\w.:]+$/i;
1916
+ function Ot(e, t) {
1917
+ let n = ot(t), r = t, i = R;
1914
1918
  if (n in e.normal) return e.property[e.normal[n]];
1915
- if (n.length > 4 && n.slice(0, 4) === "data" && Ot.test(t)) {
1919
+ if (n.length > 4 && n.slice(0, 4) === "data" && Dt.test(t)) {
1916
1920
  if (t.charAt(4) === "-") {
1917
- let e = t.slice(5).replace(Dt, jt);
1921
+ let e = t.slice(5).replace(Et, At);
1918
1922
  r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
1919
1923
  } else {
1920
1924
  let e = t.slice(4);
1921
- if (!Dt.test(e)) {
1922
- let n = e.replace(Et, At);
1925
+ if (!Et.test(e)) {
1926
+ let n = e.replace(Tt, kt);
1923
1927
  n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
1924
1928
  }
1925
1929
  }
1926
- i = mt;
1930
+ i = pt;
1927
1931
  }
1928
1932
  return new i(r, t);
1929
1933
  }
1930
- function At(e) {
1934
+ function kt(e) {
1931
1935
  return "-" + e.toLowerCase();
1932
1936
  }
1933
- function jt(e) {
1937
+ function At(e) {
1934
1938
  return e.charAt(1).toUpperCase();
1935
1939
  }
1936
1940
  //#endregion
1937
1941
  //#region node_modules/property-information/index.js
1938
- var Mt = ot([
1939
- _t,
1940
- bt,
1942
+ var jt = at([
1943
+ gt,
1944
+ yt,
1945
+ xt,
1941
1946
  St,
1942
- Ct,
1943
- wt
1944
- ], "html"), Nt = ot([
1945
- _t,
1947
+ Ct
1948
+ ], "html"), Mt = at([
1949
+ gt,
1950
+ bt,
1946
1951
  xt,
1947
1952
  St,
1948
- Ct,
1949
- wt
1953
+ Ct
1950
1954
  ], "svg");
1951
1955
  //#endregion
1952
1956
  //#region node_modules/space-separated-tokens/index.js
1953
- function Pt(e) {
1957
+ function Nt(e) {
1954
1958
  return e.join(" ").trim();
1955
1959
  }
1956
1960
  //#endregion
1957
1961
  //#region node_modules/inline-style-parser/cjs/index.js
1958
- var Ft = /* @__PURE__ */ j(((e, t) => {
1962
+ var Pt = /* @__PURE__ */ j(((e, t) => {
1959
1963
  var n = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, r = /\n/g, i = /^\s*/, a = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, c = /^[;\s]*/, l = /^\s+|\s+$/g, u = "\n", d = "/", f = "*", p = "", m = "comment", h = "declaration";
1960
1964
  function g(e, t) {
1961
1965
  if (typeof e != "string") throw TypeError("First argument must be a string");
@@ -2039,12 +2043,12 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
2039
2043
  return e ? e.replace(l, p) : p;
2040
2044
  }
2041
2045
  t.exports = g;
2042
- })), It = /* @__PURE__ */ j(((e) => {
2046
+ })), Ft = /* @__PURE__ */ j(((e) => {
2043
2047
  var t = e && e.__importDefault || function(e) {
2044
2048
  return e && e.__esModule ? e : { default: e };
2045
2049
  };
2046
2050
  Object.defineProperty(e, "__esModule", { value: !0 }), e.default = r;
2047
- var n = t(Ft());
2051
+ var n = t(Pt());
2048
2052
  function r(e, t) {
2049
2053
  let r = null;
2050
2054
  if (!e || typeof e != "string") return r;
@@ -2055,7 +2059,7 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
2055
2059
  a ? t(n, i, e) : i && (r ||= {}, r[n] = i);
2056
2060
  }), r;
2057
2061
  }
2058
- })), Lt = /* @__PURE__ */ j(((e) => {
2062
+ })), It = /* @__PURE__ */ j(((e) => {
2059
2063
  Object.defineProperty(e, "__esModule", { value: !0 }), e.camelCase = void 0;
2060
2064
  var t = /^--[a-zA-Z0-9_-]+$/, n = /-([a-z])/g, r = /^[^-]+$/, i = /^-(webkit|moz|ms|o|khtml)-/, a = /^-(ms)-/, o = function(e) {
2061
2065
  return !e || r.test(e) || t.test(e);
@@ -2067,10 +2071,10 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
2067
2071
  e.camelCase = function(e, t) {
2068
2072
  return t === void 0 && (t = {}), o(e) ? e : (e = e.toLowerCase(), e = t.reactCompat ? e.replace(a, c) : e.replace(i, c), e.replace(n, s));
2069
2073
  };
2070
- })), Rt = /* @__PURE__ */ j(((e, t) => {
2074
+ })), Lt = /* @__PURE__ */ j(((e, t) => {
2071
2075
  var n = (e && e.__importDefault || function(e) {
2072
2076
  return e && e.__esModule ? e : { default: e };
2073
- })(It()), r = Lt();
2077
+ })(Ft()), r = It();
2074
2078
  function i(e, t) {
2075
2079
  var i = {};
2076
2080
  return !e || typeof e != "string" || (0, n.default)(e, function(e, n) {
@@ -2078,8 +2082,8 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
2078
2082
  }), i;
2079
2083
  }
2080
2084
  i.default = i, t.exports = i;
2081
- })), zt = Vt("end"), Bt = Vt("start");
2082
- function Vt(e) {
2085
+ })), Rt = Bt("end"), zt = Bt("start");
2086
+ function Bt(e) {
2083
2087
  return t;
2084
2088
  function t(t) {
2085
2089
  let n = t && t.position && t.position[e] || {};
@@ -2090,8 +2094,8 @@ function Vt(e) {
2090
2094
  };
2091
2095
  }
2092
2096
  }
2093
- function Ht(e) {
2094
- let t = Bt(e), n = zt(e);
2097
+ function Vt(e) {
2098
+ let t = zt(e), n = Rt(e);
2095
2099
  if (t && n) return {
2096
2100
  start: t,
2097
2101
  end: n
@@ -2099,21 +2103,21 @@ function Ht(e) {
2099
2103
  }
2100
2104
  //#endregion
2101
2105
  //#region node_modules/unist-util-stringify-position/lib/index.js
2106
+ function Ht(e) {
2107
+ return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Wt(e.position) : "start" in e || "end" in e ? Wt(e) : "line" in e || "column" in e ? Ut(e) : "";
2108
+ }
2102
2109
  function Ut(e) {
2103
- return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Gt(e.position) : "start" in e || "end" in e ? Gt(e) : "line" in e || "column" in e ? Wt(e) : "";
2110
+ return Gt(e && e.line) + ":" + Gt(e && e.column);
2104
2111
  }
2105
2112
  function Wt(e) {
2106
- return Kt(e && e.line) + ":" + Kt(e && e.column);
2113
+ return Ut(e && e.start) + "-" + Ut(e && e.end);
2107
2114
  }
2108
2115
  function Gt(e) {
2109
- return Wt(e && e.start) + "-" + Wt(e && e.end);
2110
- }
2111
- function Kt(e) {
2112
2116
  return e && typeof e == "number" ? e : 1;
2113
2117
  }
2114
2118
  //#endregion
2115
2119
  //#region node_modules/vfile-message/lib/index.js
2116
- var U = class extends Error {
2120
+ var W = class extends Error {
2117
2121
  constructor(e, t, n) {
2118
2122
  super(), typeof t == "string" && (n = t, t = void 0);
2119
2123
  let r = "", i = {}, a = !1;
@@ -2129,29 +2133,29 @@ var U = class extends Error {
2129
2133
  e && (i.place = e.position);
2130
2134
  }
2131
2135
  let o = i.place && "start" in i.place ? i.place.start : i.place;
2132
- this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file = "", this.message = r, this.line = o ? o.line : void 0, this.name = Ut(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = a && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
2136
+ this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file = "", this.message = r, this.line = o ? o.line : void 0, this.name = Ht(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = a && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
2133
2137
  }
2134
2138
  };
2135
- U.prototype.file = "", U.prototype.name = "", U.prototype.reason = "", U.prototype.message = "", U.prototype.stack = "", U.prototype.column = void 0, U.prototype.line = void 0, U.prototype.ancestors = void 0, U.prototype.cause = void 0, U.prototype.fatal = void 0, U.prototype.place = void 0, U.prototype.ruleId = void 0, U.prototype.source = void 0;
2139
+ W.prototype.file = "", W.prototype.name = "", W.prototype.reason = "", W.prototype.message = "", W.prototype.stack = "", W.prototype.column = void 0, W.prototype.line = void 0, W.prototype.ancestors = void 0, W.prototype.cause = void 0, W.prototype.fatal = void 0, W.prototype.place = void 0, W.prototype.ruleId = void 0, W.prototype.source = void 0;
2136
2140
  //#endregion
2137
2141
  //#region node_modules/hast-util-to-jsx-runtime/lib/index.js
2138
- var qt = /* @__PURE__ */ P(Rt(), 1), Jt = {}.hasOwnProperty, Yt = /* @__PURE__ */ new Map(), Xt = /[A-Z]/g, Zt = new Set([
2142
+ var Kt = /* @__PURE__ */ P(Lt(), 1), qt = {}.hasOwnProperty, Jt = /* @__PURE__ */ new Map(), Yt = /[A-Z]/g, Xt = new Set([
2139
2143
  "table",
2140
2144
  "tbody",
2141
2145
  "thead",
2142
2146
  "tfoot",
2143
2147
  "tr"
2144
- ]), Qt = new Set(["td", "th"]), $t = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
2145
- function en(e, t) {
2148
+ ]), Zt = new Set(["td", "th"]), Qt = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
2149
+ function $t(e, t) {
2146
2150
  if (!t || t.Fragment === void 0) throw TypeError("Expected `Fragment` in options");
2147
2151
  let n = t.filePath || void 0, r;
2148
2152
  if (t.development) {
2149
2153
  if (typeof t.jsxDEV != "function") throw TypeError("Expected `jsxDEV` in options when `development: true`");
2150
- r = fn(n, t.jsxDEV);
2154
+ r = dn(n, t.jsxDEV);
2151
2155
  } else {
2152
2156
  if (typeof t.jsx != "function") throw TypeError("Expected `jsx` in production options");
2153
2157
  if (typeof t.jsxs != "function") throw TypeError("Expected `jsxs` in production options");
2154
- r = dn(n, t.jsx, t.jsxs);
2158
+ r = un(n, t.jsx, t.jsxs);
2155
2159
  }
2156
2160
  let i = {
2157
2161
  Fragment: t.Fragment,
@@ -2164,72 +2168,72 @@ function en(e, t) {
2164
2168
  ignoreInvalidStyle: t.ignoreInvalidStyle || !1,
2165
2169
  passKeys: t.passKeys !== !1,
2166
2170
  passNode: t.passNode || !1,
2167
- schema: t.space === "svg" ? Nt : Mt,
2171
+ schema: t.space === "svg" ? Mt : jt,
2168
2172
  stylePropertyNameCase: t.stylePropertyNameCase || "dom",
2169
2173
  tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
2170
- }, a = tn(i, e, void 0);
2174
+ }, a = en(i, e, void 0);
2171
2175
  return a && typeof a != "string" ? a : i.create(e, i.Fragment, { children: a || void 0 }, void 0);
2172
2176
  }
2177
+ function en(e, t, n) {
2178
+ if (t.type === "element") return tn(e, t, n);
2179
+ if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return nn(e, t);
2180
+ if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return an(e, t, n);
2181
+ if (t.type === "mdxjsEsm") return rn(e, t);
2182
+ if (t.type === "root") return on(e, t, n);
2183
+ if (t.type === "text") return sn(e, t);
2184
+ }
2173
2185
  function tn(e, t, n) {
2174
- if (t.type === "element") return nn(e, t, n);
2175
- if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return rn(e, t);
2176
- if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return on(e, t, n);
2177
- if (t.type === "mdxjsEsm") return an(e, t);
2178
- if (t.type === "root") return sn(e, t, n);
2179
- if (t.type === "text") return cn(e, t);
2180
- }
2181
- function nn(e, t, n) {
2182
2186
  let r = e.schema, i = r;
2183
- t.tagName.toLowerCase() === "svg" && r.space === "html" && (i = Nt, e.schema = i), e.ancestors.push(t);
2184
- let a = vn(e, t.tagName, !1), o = pn(e, t), s = hn(e, t);
2185
- return Zt.has(t.tagName) && (s = s.filter(function(e) {
2186
- return typeof e == "string" ? !rt(e) : !0;
2187
- })), ln(e, o, a, t), un(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
2187
+ t.tagName.toLowerCase() === "svg" && r.space === "html" && (i = Mt, e.schema = i), e.ancestors.push(t);
2188
+ let a = _n(e, t.tagName, !1), o = fn(e, t), s = mn(e, t);
2189
+ return Xt.has(t.tagName) && (s = s.filter(function(e) {
2190
+ return typeof e == "string" ? !nt(e) : !0;
2191
+ })), cn(e, o, a, t), ln(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
2188
2192
  }
2189
- function rn(e, t) {
2193
+ function nn(e, t) {
2190
2194
  if (t.data && t.data.estree && e.evaluater) {
2191
2195
  let n = t.data.estree.body[0];
2192
2196
  return n.type, e.evaluater.evaluateExpression(n.expression);
2193
2197
  }
2194
- yn(e, t.position);
2198
+ vn(e, t.position);
2195
2199
  }
2196
- function an(e, t) {
2200
+ function rn(e, t) {
2197
2201
  if (t.data && t.data.estree && e.evaluater) return e.evaluater.evaluateProgram(t.data.estree);
2198
- yn(e, t.position);
2202
+ vn(e, t.position);
2199
2203
  }
2200
- function on(e, t, n) {
2204
+ function an(e, t, n) {
2201
2205
  let r = e.schema, i = r;
2202
- t.name === "svg" && r.space === "html" && (i = Nt, e.schema = i), e.ancestors.push(t);
2203
- let a = t.name === null ? e.Fragment : vn(e, t.name, !0), o = mn(e, t), s = hn(e, t);
2204
- return ln(e, o, a, t), un(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
2206
+ t.name === "svg" && r.space === "html" && (i = Mt, e.schema = i), e.ancestors.push(t);
2207
+ let a = t.name === null ? e.Fragment : _n(e, t.name, !0), o = pn(e, t), s = mn(e, t);
2208
+ return cn(e, o, a, t), ln(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
2205
2209
  }
2206
- function sn(e, t, n) {
2210
+ function on(e, t, n) {
2207
2211
  let r = {};
2208
- return un(r, hn(e, t)), e.create(t, e.Fragment, r, n);
2212
+ return ln(r, mn(e, t)), e.create(t, e.Fragment, r, n);
2209
2213
  }
2210
- function cn(e, t) {
2214
+ function sn(e, t) {
2211
2215
  return t.value;
2212
2216
  }
2213
- function ln(e, t, n, r) {
2217
+ function cn(e, t, n, r) {
2214
2218
  typeof n != "string" && n !== e.Fragment && e.passNode && (t.node = r);
2215
2219
  }
2216
- function un(e, t) {
2220
+ function ln(e, t) {
2217
2221
  if (t.length > 0) {
2218
2222
  let n = t.length > 1 ? t : t[0];
2219
2223
  n && (e.children = n);
2220
2224
  }
2221
2225
  }
2222
- function dn(e, t, n) {
2226
+ function un(e, t, n) {
2223
2227
  return r;
2224
2228
  function r(e, r, i, a) {
2225
2229
  let o = Array.isArray(i.children) ? n : t;
2226
2230
  return a ? o(r, i, a) : o(r, i);
2227
2231
  }
2228
2232
  }
2229
- function fn(e, t) {
2233
+ function dn(e, t) {
2230
2234
  return n;
2231
2235
  function n(n, r, i, a) {
2232
- let o = Array.isArray(i.children), s = Bt(n);
2236
+ let o = Array.isArray(i.children), s = zt(n);
2233
2237
  return t(r, i, a, o, {
2234
2238
  columnNumber: s ? s.column - 1 : void 0,
2235
2239
  fileName: e,
@@ -2237,13 +2241,13 @@ function fn(e, t) {
2237
2241
  }, void 0);
2238
2242
  }
2239
2243
  }
2240
- function pn(e, t) {
2244
+ function fn(e, t) {
2241
2245
  let n = {}, r, i;
2242
- for (i in t.properties) if (i !== "children" && Jt.call(t.properties, i)) {
2243
- let a = gn(e, i, t.properties[i]);
2246
+ for (i in t.properties) if (i !== "children" && qt.call(t.properties, i)) {
2247
+ let a = hn(e, i, t.properties[i]);
2244
2248
  if (a) {
2245
2249
  let [i, o] = a;
2246
- e.tableCellAlignToStyle && i === "align" && typeof o == "string" && Qt.has(t.tagName) ? r = o : n[i] = o;
2250
+ e.tableCellAlignToStyle && i === "align" && typeof o == "string" && Zt.has(t.tagName) ? r = o : n[i] = o;
2247
2251
  }
2248
2252
  }
2249
2253
  if (r) {
@@ -2252,7 +2256,7 @@ function pn(e, t) {
2252
2256
  }
2253
2257
  return n;
2254
2258
  }
2255
- function mn(e, t) {
2259
+ function pn(e, t) {
2256
2260
  let n = {};
2257
2261
  for (let r of t.attributes) if (r.type === "mdxJsxExpressionAttribute") if (r.data && r.data.estree && e.evaluater) {
2258
2262
  let t = r.data.estree.body[0];
@@ -2261,20 +2265,20 @@ function mn(e, t) {
2261
2265
  i.type;
2262
2266
  let a = i.properties[0];
2263
2267
  a.type, Object.assign(n, e.evaluater.evaluateExpression(a.argument));
2264
- } else yn(e, t.position);
2268
+ } else vn(e, t.position);
2265
2269
  else {
2266
2270
  let i = r.name, a;
2267
2271
  if (r.value && typeof r.value == "object") if (r.value.data && r.value.data.estree && e.evaluater) {
2268
2272
  let t = r.value.data.estree.body[0];
2269
2273
  t.type, a = e.evaluater.evaluateExpression(t.expression);
2270
- } else yn(e, t.position);
2274
+ } else vn(e, t.position);
2271
2275
  else a = r.value === null ? !0 : r.value;
2272
2276
  n[i] = a;
2273
2277
  }
2274
2278
  return n;
2275
2279
  }
2276
- function hn(e, t) {
2277
- let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() : Yt;
2280
+ function mn(e, t) {
2281
+ let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() : Jt;
2278
2282
  for (; ++r < t.children.length;) {
2279
2283
  let a = t.children[r], o;
2280
2284
  if (e.passKeys) {
@@ -2284,36 +2288,36 @@ function hn(e, t) {
2284
2288
  o = e + "-" + t, i.set(e, t + 1);
2285
2289
  }
2286
2290
  }
2287
- let s = tn(e, a, o);
2291
+ let s = en(e, a, o);
2288
2292
  s !== void 0 && n.push(s);
2289
2293
  }
2290
2294
  return n;
2291
2295
  }
2292
- function gn(e, t, n) {
2293
- let r = kt(e.schema, t);
2296
+ function hn(e, t, n) {
2297
+ let r = Ot(e.schema, t);
2294
2298
  if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
2295
- if (Array.isArray(n) && (n = r.commaSeparated ? Ze(n) : Pt(n)), r.property === "style") {
2296
- let t = typeof n == "object" ? n : _n(e, String(n));
2297
- return e.stylePropertyNameCase === "css" && (t = bn(t)), ["style", t];
2299
+ if (Array.isArray(n) && (n = r.commaSeparated ? Xe(n) : Nt(n)), r.property === "style") {
2300
+ let t = typeof n == "object" ? n : gn(e, String(n));
2301
+ return e.stylePropertyNameCase === "css" && (t = yn(t)), ["style", t];
2298
2302
  }
2299
- return [e.elementAttributeNameCase === "react" && r.space ? Tt[r.property] || r.property : r.attribute, n];
2303
+ return [e.elementAttributeNameCase === "react" && r.space ? wt[r.property] || r.property : r.attribute, n];
2300
2304
  }
2301
2305
  }
2302
- function _n(e, t) {
2306
+ function gn(e, t) {
2303
2307
  try {
2304
- return (0, qt.default)(t, { reactCompat: !0 });
2308
+ return (0, Kt.default)(t, { reactCompat: !0 });
2305
2309
  } catch (t) {
2306
2310
  if (e.ignoreInvalidStyle) return {};
2307
- let n = t, r = new U("Cannot parse `style` attribute", {
2311
+ let n = t, r = new W("Cannot parse `style` attribute", {
2308
2312
  ancestors: e.ancestors,
2309
2313
  cause: n,
2310
2314
  ruleId: "style",
2311
2315
  source: "hast-util-to-jsx-runtime"
2312
2316
  });
2313
- throw r.file = e.filePath || void 0, r.url = $t + "#cannot-parse-style-attribute", r;
2317
+ throw r.file = e.filePath || void 0, r.url = Qt + "#cannot-parse-style-attribute", r;
2314
2318
  }
2315
2319
  }
2316
- function vn(e, t, n) {
2320
+ function _n(e, t, n) {
2317
2321
  let r;
2318
2322
  if (!n) r = {
2319
2323
  type: "Literal",
@@ -2322,7 +2326,7 @@ function vn(e, t, n) {
2322
2326
  else if (t.includes(".")) {
2323
2327
  let e = t.split("."), n = -1, i;
2324
2328
  for (; ++n < e.length;) {
2325
- let t = tt(e[n]) ? {
2329
+ let t = et(e[n]) ? {
2326
2330
  type: "Identifier",
2327
2331
  name: e[n]
2328
2332
  } : {
@@ -2338,7 +2342,7 @@ function vn(e, t, n) {
2338
2342
  } : t;
2339
2343
  }
2340
2344
  r = i;
2341
- } else r = tt(t) && !/^[a-z]/.test(t) ? {
2345
+ } else r = et(t) && !/^[a-z]/.test(t) ? {
2342
2346
  type: "Identifier",
2343
2347
  name: t
2344
2348
  } : {
@@ -2347,35 +2351,35 @@ function vn(e, t, n) {
2347
2351
  };
2348
2352
  if (r.type === "Literal") {
2349
2353
  let t = r.value;
2350
- return Jt.call(e.components, t) ? e.components[t] : t;
2354
+ return qt.call(e.components, t) ? e.components[t] : t;
2351
2355
  }
2352
2356
  if (e.evaluater) return e.evaluater.evaluateExpression(r);
2353
- yn(e);
2357
+ vn(e);
2354
2358
  }
2355
- function yn(e, t) {
2356
- let n = new U("Cannot handle MDX estrees without `createEvaluater`", {
2359
+ function vn(e, t) {
2360
+ let n = new W("Cannot handle MDX estrees without `createEvaluater`", {
2357
2361
  ancestors: e.ancestors,
2358
2362
  place: t,
2359
2363
  ruleId: "mdx-estree",
2360
2364
  source: "hast-util-to-jsx-runtime"
2361
2365
  });
2362
- throw n.file = e.filePath || void 0, n.url = $t + "#cannot-handle-mdx-estrees-without-createevaluater", n;
2366
+ throw n.file = e.filePath || void 0, n.url = Qt + "#cannot-handle-mdx-estrees-without-createevaluater", n;
2363
2367
  }
2364
- function bn(e) {
2368
+ function yn(e) {
2365
2369
  let t = {}, n;
2366
- for (n in e) Jt.call(e, n) && (t[xn(n)] = e[n]);
2370
+ for (n in e) qt.call(e, n) && (t[bn(n)] = e[n]);
2367
2371
  return t;
2368
2372
  }
2369
- function xn(e) {
2370
- let t = e.replace(Xt, Sn);
2373
+ function bn(e) {
2374
+ let t = e.replace(Yt, xn);
2371
2375
  return t.slice(0, 3) === "ms-" && (t = "-" + t), t;
2372
2376
  }
2373
- function Sn(e) {
2377
+ function xn(e) {
2374
2378
  return "-" + e.toLowerCase();
2375
2379
  }
2376
2380
  //#endregion
2377
2381
  //#region node_modules/html-url-attributes/lib/index.js
2378
- var Cn = {
2382
+ var Sn = {
2379
2383
  action: ["form"],
2380
2384
  cite: [
2381
2385
  "blockquote",
@@ -2407,45 +2411,45 @@ var Cn = {
2407
2411
  "track",
2408
2412
  "video"
2409
2413
  ]
2410
- }, wn = {};
2411
- function Tn(e, t) {
2412
- let n = t || wn;
2413
- return En(e, typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, typeof n.includeHtml == "boolean" ? n.includeHtml : !0);
2414
+ }, Cn = {};
2415
+ function wn(e, t) {
2416
+ let n = t || Cn;
2417
+ return Tn(e, typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, typeof n.includeHtml == "boolean" ? n.includeHtml : !0);
2414
2418
  }
2415
- function En(e, t, n) {
2416
- if (On(e)) {
2419
+ function Tn(e, t, n) {
2420
+ if (Dn(e)) {
2417
2421
  if ("value" in e) return e.type === "html" && !n ? "" : e.value;
2418
2422
  if (t && "alt" in e && e.alt) return e.alt;
2419
- if ("children" in e) return Dn(e.children, t, n);
2423
+ if ("children" in e) return En(e.children, t, n);
2420
2424
  }
2421
- return Array.isArray(e) ? Dn(e, t, n) : "";
2425
+ return Array.isArray(e) ? En(e, t, n) : "";
2422
2426
  }
2423
- function Dn(e, t, n) {
2427
+ function En(e, t, n) {
2424
2428
  let r = [], i = -1;
2425
- for (; ++i < e.length;) r[i] = En(e[i], t, n);
2429
+ for (; ++i < e.length;) r[i] = Tn(e[i], t, n);
2426
2430
  return r.join("");
2427
2431
  }
2428
- function On(e) {
2432
+ function Dn(e) {
2429
2433
  return !!(e && typeof e == "object");
2430
2434
  }
2431
2435
  //#endregion
2432
2436
  //#region node_modules/decode-named-character-reference/index.dom.js
2433
- var kn = document.createElement("i");
2434
- function An(e) {
2437
+ var On = document.createElement("i");
2438
+ function kn(e) {
2435
2439
  let t = "&" + e + ";";
2436
- kn.innerHTML = t;
2437
- let n = kn.textContent;
2440
+ On.innerHTML = t;
2441
+ let n = On.textContent;
2438
2442
  return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n;
2439
2443
  }
2440
2444
  //#endregion
2441
2445
  //#region node_modules/micromark-util-chunked/index.js
2442
- function W(e, t, n, r) {
2446
+ function G(e, t, n, r) {
2443
2447
  let i = e.length, a = 0, o;
2444
2448
  if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
2445
2449
  else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
2446
2450
  }
2447
- function G(e, t) {
2448
- return e.length > 0 ? (W(e, e.length, 0, t), e) : t;
2451
+ function An(e, t) {
2452
+ return e.length > 0 ? (G(e, e.length, 0, t), e) : t;
2449
2453
  }
2450
2454
  //#endregion
2451
2455
  //#region node_modules/micromark-util-combine-extensions/index.js
@@ -2469,7 +2473,7 @@ function Nn(e, t) {
2469
2473
  function Pn(e, t) {
2470
2474
  let n = -1, r = [];
2471
2475
  for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
2472
- W(e, 0, 0, r);
2476
+ G(e, 0, 0, r);
2473
2477
  }
2474
2478
  //#endregion
2475
2479
  //#region node_modules/micromark-util-decode-numeric-character-reference/index.js
@@ -2588,7 +2592,7 @@ function Xn(e) {
2588
2592
  _(r);
2589
2593
  let s = n;
2590
2594
  for (; s < t.events.length;) t.events[s][1].end = { ...o }, s++;
2591
- return W(t.events, a + 1, 0, t.events.slice(n)), t.events.length = s, l(e);
2595
+ return G(t.events, a + 1, 0, t.events.slice(n)), t.events.length = s, l(e);
2592
2596
  }
2593
2597
  return s(e);
2594
2598
  }
@@ -2644,7 +2648,7 @@ function Xn(e) {
2644
2648
  s = !0;
2645
2649
  }
2646
2650
  for (_(r), e = n; e < t.events.length;) t.events[e][1].end = { ...c }, e++;
2647
- W(t.events, a + 1, 0, t.events.slice(n)), t.events.length = e;
2651
+ G(t.events, a + 1, 0, t.events.slice(n)), t.events.length = e;
2648
2652
  }
2649
2653
  }
2650
2654
  function _(r) {
@@ -2708,7 +2712,7 @@ function tr(e, t) {
2708
2712
  type: c > 1 ? "strong" : "emphasis",
2709
2713
  start: { ...o.start },
2710
2714
  end: { ...s.end }
2711
- }, e[r][1].end = { ...o.start }, e[n][1].start = { ...s.end }, l = [], e[r][1].end.offset - e[r][1].start.offset && (l = G(l, [[
2715
+ }, e[r][1].end = { ...o.start }, e[n][1].start = { ...s.end }, l = [], e[r][1].end.offset - e[r][1].start.offset && (l = An(l, [[
2712
2716
  "enter",
2713
2717
  e[r][1],
2714
2718
  t
@@ -2716,7 +2720,7 @@ function tr(e, t) {
2716
2720
  "exit",
2717
2721
  e[r][1],
2718
2722
  t
2719
- ]])), l = G(l, [
2723
+ ]])), l = An(l, [
2720
2724
  [
2721
2725
  "enter",
2722
2726
  i,
@@ -2737,7 +2741,7 @@ function tr(e, t) {
2737
2741
  a,
2738
2742
  t
2739
2743
  ]
2740
- ]), l = G(l, $n(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), l = G(l, [
2744
+ ]), l = An(l, $n(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), l = An(l, [
2741
2745
  [
2742
2746
  "exit",
2743
2747
  a,
@@ -2758,7 +2762,7 @@ function tr(e, t) {
2758
2762
  i,
2759
2763
  t
2760
2764
  ]
2761
- ]), e[n][1].end.offset - e[n][1].start.offset ? (u = 2, l = G(l, [[
2765
+ ]), e[n][1].end.offset - e[n][1].start.offset ? (u = 2, l = An(l, [[
2762
2766
  "enter",
2763
2767
  e[n][1],
2764
2768
  t
@@ -2766,7 +2770,7 @@ function tr(e, t) {
2766
2770
  "exit",
2767
2771
  e[n][1],
2768
2772
  t
2769
- ]])) : u = 0, W(e, r - 1, n - r + 3, l), n = r + l.length - u - 2;
2773
+ ]])) : u = 0, G(e, r - 1, n - r + 3, l), n = r + l.length - u - 2;
2770
2774
  break;
2771
2775
  }
2772
2776
  }
@@ -2915,7 +2919,7 @@ function hr(e, t, n) {
2915
2919
  function u(s) {
2916
2920
  if (s === 59 && i) {
2917
2921
  let i = e.exit("characterReferenceValue");
2918
- return o === q && !An(r.sliceSerialize(i)) ? n(s) : (e.enter("characterReferenceMarker"), e.consume(s), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
2922
+ return o === q && !kn(r.sliceSerialize(i)) ? n(s) : (e.enter("characterReferenceMarker"), e.consume(s), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
2919
2923
  }
2920
2924
  return o(s) && i++ < a ? (e.consume(s), u) : n(s);
2921
2925
  }
@@ -3157,7 +3161,7 @@ function Ar(e) {
3157
3161
  i && (r[1].end = { ...u.get(i)[1].start }, s = u.slice(i, n), s.unshift(r), u.splice(i, n - i + 1, s));
3158
3162
  }
3159
3163
  }
3160
- return W(e, 0, Infinity, u.slice(0)), !l;
3164
+ return G(e, 0, Infinity, u.slice(0)), !l;
3161
3165
  }
3162
3166
  function jr(e, t) {
3163
3167
  let n = e.get(t)[1], r = e.get(t)[2], i = t - 1, a = [], o = n._tokenizer;
@@ -3375,7 +3379,7 @@ function Jr(e, t) {
3375
3379
  start: e[r][1].start,
3376
3380
  end: e[n][1].end,
3377
3381
  contentType: "text"
3378
- }, W(e, r, n - r + 1, [
3382
+ }, G(e, r, n - r + 1, [
3379
3383
  [
3380
3384
  "enter",
3381
3385
  i,
@@ -3454,13 +3458,13 @@ function ni(e, t, n) {
3454
3458
  return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(t), d;
3455
3459
  }
3456
3460
  function d(s) {
3457
- return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : te) : K(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
3461
+ return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : F) : K(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
3458
3462
  }
3459
3463
  function f(a) {
3460
- return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : K(a) ? (e.consume(a), i = 4, r.interrupt ? t : te) : n(a);
3464
+ return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : K(a) ? (e.consume(a), i = 4, r.interrupt ? t : F) : n(a);
3461
3465
  }
3462
3466
  function p(i) {
3463
- return i === 45 ? (e.consume(i), r.interrupt ? t : te) : n(i);
3467
+ return i === 45 ? (e.consume(i), r.interrupt ? t : F) : n(i);
3464
3468
  }
3465
3469
  function m(i) {
3466
3470
  return i === "CDATA[".charCodeAt(s++) ? (e.consume(i), s === 6 ? r.interrupt ? t : O : m) : n(i);
@@ -3509,10 +3513,10 @@ function ni(e, t, n) {
3509
3513
  return t === null || J(t) ? O(t) : X(t) ? (e.consume(t), D) : n(t);
3510
3514
  }
3511
3515
  function O(t) {
3512
- return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t), F) : t === 63 && i === 3 ? (e.consume(t), te) : t === 93 && i === 5 ? (e.consume(t), ee) : J(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check($r, ne, k)(t)) : t === null || J(t) ? (e.exit("htmlFlowData"), k(t)) : (e.consume(t), O);
3516
+ return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t), I) : t === 63 && i === 3 ? (e.consume(t), F) : t === 93 && i === 5 ? (e.consume(t), ee) : J(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check($r, te, k)(t)) : t === null || J(t) ? (e.exit("htmlFlowData"), k(t)) : (e.consume(t), O);
3513
3517
  }
3514
3518
  function k(t) {
3515
- return e.check(ei, A, ne)(t);
3519
+ return e.check(ei, A, te)(t);
3516
3520
  }
3517
3521
  function A(t) {
3518
3522
  return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), j;
@@ -3521,7 +3525,7 @@ function ni(e, t, n) {
3521
3525
  return t === null || J(t) ? k(t) : (e.enter("htmlFlowData"), O(t));
3522
3526
  }
3523
3527
  function M(t) {
3524
- return t === 45 ? (e.consume(t), te) : O(t);
3528
+ return t === 45 ? (e.consume(t), F) : O(t);
3525
3529
  }
3526
3530
  function N(t) {
3527
3531
  return t === 47 ? (e.consume(t), o = "", P) : O(t);
@@ -3529,20 +3533,20 @@ function ni(e, t, n) {
3529
3533
  function P(t) {
3530
3534
  if (t === 62) {
3531
3535
  let n = o.toLowerCase();
3532
- return Zr.includes(n) ? (e.consume(t), F) : O(t);
3536
+ return Zr.includes(n) ? (e.consume(t), I) : O(t);
3533
3537
  }
3534
3538
  return K(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), P) : O(t);
3535
3539
  }
3536
3540
  function ee(t) {
3537
- return t === 93 ? (e.consume(t), te) : O(t);
3538
- }
3539
- function te(t) {
3540
- return t === 62 ? (e.consume(t), F) : t === 45 && i === 2 ? (e.consume(t), te) : O(t);
3541
+ return t === 93 ? (e.consume(t), F) : O(t);
3541
3542
  }
3542
3543
  function F(t) {
3543
- return t === null || J(t) ? (e.exit("htmlFlowData"), ne(t)) : (e.consume(t), F);
3544
+ return t === 62 ? (e.consume(t), I) : t === 45 && i === 2 ? (e.consume(t), F) : O(t);
3545
+ }
3546
+ function I(t) {
3547
+ return t === null || J(t) ? (e.exit("htmlFlowData"), te(t)) : (e.consume(t), I);
3544
3548
  }
3545
- function ne(n) {
3549
+ function te(n) {
3546
3550
  return e.exit("htmlFlow"), t(n);
3547
3551
  }
3548
3552
  }
@@ -3676,7 +3680,7 @@ function di(e) {
3676
3680
  r.type = "data", t += e;
3677
3681
  }
3678
3682
  }
3679
- return e.length !== n.length && W(e, 0, e.length, n), e;
3683
+ return e.length !== n.length && G(e, 0, e.length, n), e;
3680
3684
  }
3681
3685
  function fi(e, t) {
3682
3686
  let n = e.length, r = 0, i, a, o, s;
@@ -3710,11 +3714,11 @@ function fi(e, t) {
3710
3714
  "enter",
3711
3715
  l,
3712
3716
  t
3713
- ]], s = G(s, e.slice(a + 1, a + r + 3)), s = G(s, [[
3717
+ ]], s = An(s, e.slice(a + 1, a + r + 3)), s = An(s, [[
3714
3718
  "enter",
3715
3719
  u,
3716
3720
  t
3717
- ]]), s = G(s, $n(t.parser.constructs.insideSpan.null, e.slice(a + r + 4, o - 3), t)), s = G(s, [
3721
+ ]]), s = An(s, $n(t.parser.constructs.insideSpan.null, e.slice(a + r + 4, o - 3), t)), s = An(s, [
3718
3722
  [
3719
3723
  "exit",
3720
3724
  u,
@@ -3727,11 +3731,11 @@ function fi(e, t) {
3727
3731
  l,
3728
3732
  t
3729
3733
  ]
3730
- ]), s = G(s, e.slice(o + 1)), s = G(s, [[
3734
+ ]), s = An(s, e.slice(o + 1)), s = An(s, [[
3731
3735
  "exit",
3732
3736
  c,
3733
3737
  t
3734
- ]]), W(e, a, e.length, s), e;
3738
+ ]]), G(e, a, e.length, s), e;
3735
3739
  }
3736
3740
  function pi(e, t, n) {
3737
3741
  let r = this, i = r.events.length, a, o;
@@ -4203,7 +4207,7 @@ function $i(e, t, n) {
4203
4207
  }, u = t.tokenize.call(l, c);
4204
4208
  return t.resolveAll && a.push(t), l;
4205
4209
  function d(e) {
4206
- return o = G(o, e), g(), o[o.length - 1] === null ? (w(t, 0), l.events = $n(a, l.events, l), l.events) : [];
4210
+ return o = An(o, e), g(), o[o.length - 1] === null ? (w(t, 0), l.events = $n(a, l.events, l), l.events) : [];
4207
4211
  }
4208
4212
  function f(e, t) {
4209
4213
  return ta(p(e), t);
@@ -4290,7 +4294,7 @@ function $i(e, t, n) {
4290
4294
  }
4291
4295
  }
4292
4296
  function w(e, t) {
4293
- e.resolveAll && !a.includes(e) && a.push(e), e.resolve && W(l.events, t, l.events.length - t, e.resolve(l.events.slice(t), l)), e.resolveTo && (l.events = e.resolveTo(l.events, l));
4297
+ e.resolveAll && !a.includes(e) && a.push(e), e.resolve && G(l.events, t, l.events.length - t, e.resolve(l.events.slice(t), l)), e.resolveTo && (l.events = e.resolveTo(l.events, l));
4294
4298
  }
4295
4299
  function T() {
4296
4300
  let e = m(), t = l.previous, n = l.currentConstruct, i = l.events.length, a = Array.from(s);
@@ -4416,7 +4420,7 @@ function ca(e, t, n) {
4416
4420
  let e = n.charCodeAt(1), t = e === 120 || e === 88;
4417
4421
  return Fn(n.slice(t ? 2 : 1), t ? 16 : 10);
4418
4422
  }
4419
- return An(n) || e;
4423
+ return kn(n) || e;
4420
4424
  }
4421
4425
  //#endregion
4422
4426
  //#region node_modules/mdast-util-from-markdown/lib/index.js
@@ -4435,60 +4439,60 @@ function da(e) {
4435
4439
  "strong"
4436
4440
  ],
4437
4441
  enter: {
4438
- autolink: a(ve),
4442
+ autolink: a(_e),
4439
4443
  autolinkProtocol: T,
4440
4444
  autolinkEmail: T,
4441
- atxHeading: a(me),
4442
- blockQuote: a(ue),
4445
+ atxHeading: a(pe),
4446
+ blockQuote: a(le),
4443
4447
  characterEscape: T,
4444
4448
  characterReference: T,
4445
- codeFenced: a(de),
4449
+ codeFenced: a(ue),
4446
4450
  codeFencedFenceInfo: o,
4447
4451
  codeFencedFenceMeta: o,
4448
- codeIndented: a(de, o),
4449
- codeText: a(fe, o),
4452
+ codeIndented: a(ue, o),
4453
+ codeText: a(de, o),
4450
4454
  codeTextData: T,
4451
4455
  data: T,
4452
4456
  codeFlowValue: T,
4453
- definition: a(pe),
4457
+ definition: a(fe),
4454
4458
  definitionDestinationString: o,
4455
4459
  definitionLabelString: o,
4456
4460
  definitionTitleString: o,
4457
- emphasis: a(I),
4458
- hardBreakEscape: a(he),
4459
- hardBreakTrailing: a(he),
4460
- htmlFlow: a(ge, o),
4461
+ emphasis: a(L),
4462
+ hardBreakEscape: a(me),
4463
+ hardBreakTrailing: a(me),
4464
+ htmlFlow: a(he, o),
4461
4465
  htmlFlowData: T,
4462
- htmlText: a(ge, o),
4466
+ htmlText: a(he, o),
4463
4467
  htmlTextData: T,
4464
- image: a(_e),
4468
+ image: a(ge),
4465
4469
  label: o,
4466
- link: a(ve),
4467
- listItem: a(be),
4470
+ link: a(_e),
4471
+ listItem: a(ye),
4468
4472
  listItemValue: f,
4469
- listOrdered: a(ye, d),
4470
- listUnordered: a(ye),
4471
- paragraph: a(xe),
4472
- reference: re,
4473
+ listOrdered: a(ve, d),
4474
+ listUnordered: a(ve),
4475
+ paragraph: a(be),
4476
+ reference: ne,
4473
4477
  referenceString: o,
4474
4478
  resourceDestinationString: o,
4475
4479
  resourceTitleString: o,
4476
- setextHeading: a(me),
4477
- strong: a(Se),
4478
- thematicBreak: a(we)
4480
+ setextHeading: a(pe),
4481
+ strong: a(xe),
4482
+ thematicBreak: a(Ce)
4479
4483
  },
4480
4484
  exit: {
4481
4485
  atxHeading: c(),
4482
4486
  atxHeadingSequence: x,
4483
4487
  autolink: c(),
4484
- autolinkEmail: le,
4485
- autolinkProtocol: ce,
4488
+ autolinkEmail: ce,
4489
+ autolinkProtocol: se,
4486
4490
  blockQuote: c(),
4487
4491
  characterEscapeValue: E,
4488
- characterReferenceMarkerHexadecimal: ae,
4489
- characterReferenceMarkerNumeric: ae,
4490
- characterReferenceValue: oe,
4491
- characterReference: se,
4492
+ characterReferenceMarkerHexadecimal: ie,
4493
+ characterReferenceMarkerNumeric: ie,
4494
+ characterReferenceValue: ae,
4495
+ characterReference: oe,
4492
4496
  codeFenced: c(g),
4493
4497
  codeFencedFence: h,
4494
4498
  codeFencedFenceInfo: p,
@@ -4518,10 +4522,10 @@ function da(e) {
4518
4522
  listOrdered: c(),
4519
4523
  listUnordered: c(),
4520
4524
  paragraph: c(),
4521
- referenceString: ie,
4522
- resourceDestinationString: te,
4523
- resourceTitleString: F,
4524
- resource: ne,
4525
+ referenceString: re,
4526
+ resourceDestinationString: F,
4527
+ resourceTitleString: I,
4528
+ resource: te,
4525
4529
  setextHeading: c(w),
4526
4530
  setextHeadingLineSequence: C,
4527
4531
  setextHeadingText: S,
@@ -4649,14 +4653,14 @@ function da(e) {
4649
4653
  function l(e, t) {
4650
4654
  let n = this.stack.pop(), r = this.tokenStack.pop();
4651
4655
  if (r) r[0].type !== e.type && (t ? t.call(this, e, r[0]) : (r[1] || ha).call(this, e, r[0]));
4652
- else throw Error("Cannot close `" + e.type + "` (" + Ut({
4656
+ else throw Error("Cannot close `" + e.type + "` (" + Ht({
4653
4657
  start: e.start,
4654
4658
  end: e.end
4655
4659
  }) + "): it’s not open");
4656
4660
  n.position.end = fa(e.end);
4657
4661
  }
4658
4662
  function u() {
4659
- return Tn(this.stack.pop());
4663
+ return wn(this.stack.pop());
4660
4664
  }
4661
4665
  function d() {
4662
4666
  this.data.expectingFirstListItemValue = !0;
@@ -4714,7 +4718,7 @@ function da(e) {
4714
4718
  }
4715
4719
  function T(e) {
4716
4720
  let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
4717
- (!n || n.type !== "text") && (n = Ce(), n.position = {
4721
+ (!n || n.type !== "text") && (n = Se(), n.position = {
4718
4722
  start: fa(e.start),
4719
4723
  end: void 0
4720
4724
  }, t.push(n)), this.stack.push(n);
@@ -4771,54 +4775,54 @@ function da(e) {
4771
4775
  let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1];
4772
4776
  this.data.inReference = !0, n.type === "link" ? n.children = e.children : n.alt = t;
4773
4777
  }
4774
- function te() {
4778
+ function F() {
4775
4779
  let e = this.resume(), t = this.stack[this.stack.length - 1];
4776
4780
  t.url = e;
4777
4781
  }
4778
- function F() {
4782
+ function I() {
4779
4783
  let e = this.resume(), t = this.stack[this.stack.length - 1];
4780
4784
  t.title = e;
4781
4785
  }
4782
- function ne() {
4786
+ function te() {
4783
4787
  this.data.inReference = void 0;
4784
4788
  }
4785
- function re() {
4789
+ function ne() {
4786
4790
  this.data.referenceType = "collapsed";
4787
4791
  }
4788
- function ie(e) {
4792
+ function re(e) {
4789
4793
  let t = this.resume(), n = this.stack[this.stack.length - 1];
4790
4794
  n.label = t, n.identifier = In(this.sliceSerialize(e)).toLowerCase(), this.data.referenceType = "full";
4791
4795
  }
4792
- function ae(e) {
4796
+ function ie(e) {
4793
4797
  this.data.characterReferenceType = e.type;
4794
4798
  }
4795
- function oe(e) {
4799
+ function ae(e) {
4796
4800
  let t = this.sliceSerialize(e), n = this.data.characterReferenceType, r;
4797
- n ? (r = Fn(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = An(t);
4801
+ n ? (r = Fn(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = kn(t);
4798
4802
  let i = this.stack[this.stack.length - 1];
4799
4803
  i.value += r;
4800
4804
  }
4801
- function se(e) {
4805
+ function oe(e) {
4802
4806
  let t = this.stack.pop();
4803
4807
  t.position.end = fa(e.end);
4804
4808
  }
4805
- function ce(e) {
4809
+ function se(e) {
4806
4810
  E.call(this, e);
4807
4811
  let t = this.stack[this.stack.length - 1];
4808
4812
  t.url = this.sliceSerialize(e);
4809
4813
  }
4810
- function le(e) {
4814
+ function ce(e) {
4811
4815
  E.call(this, e);
4812
4816
  let t = this.stack[this.stack.length - 1];
4813
4817
  t.url = "mailto:" + this.sliceSerialize(e);
4814
4818
  }
4815
- function ue() {
4819
+ function le() {
4816
4820
  return {
4817
4821
  type: "blockquote",
4818
4822
  children: []
4819
4823
  };
4820
4824
  }
4821
- function de() {
4825
+ function ue() {
4822
4826
  return {
4823
4827
  type: "code",
4824
4828
  lang: null,
@@ -4826,13 +4830,13 @@ function da(e) {
4826
4830
  value: ""
4827
4831
  };
4828
4832
  }
4829
- function fe() {
4833
+ function de() {
4830
4834
  return {
4831
4835
  type: "inlineCode",
4832
4836
  value: ""
4833
4837
  };
4834
4838
  }
4835
- function pe() {
4839
+ function fe() {
4836
4840
  return {
4837
4841
  type: "definition",
4838
4842
  identifier: "",
@@ -4841,29 +4845,29 @@ function da(e) {
4841
4845
  url: ""
4842
4846
  };
4843
4847
  }
4844
- function I() {
4848
+ function L() {
4845
4849
  return {
4846
4850
  type: "emphasis",
4847
4851
  children: []
4848
4852
  };
4849
4853
  }
4850
- function me() {
4854
+ function pe() {
4851
4855
  return {
4852
4856
  type: "heading",
4853
4857
  depth: 0,
4854
4858
  children: []
4855
4859
  };
4856
4860
  }
4857
- function he() {
4861
+ function me() {
4858
4862
  return { type: "break" };
4859
4863
  }
4860
- function ge() {
4864
+ function he() {
4861
4865
  return {
4862
4866
  type: "html",
4863
4867
  value: ""
4864
4868
  };
4865
4869
  }
4866
- function _e() {
4870
+ function ge() {
4867
4871
  return {
4868
4872
  type: "image",
4869
4873
  title: null,
@@ -4871,7 +4875,7 @@ function da(e) {
4871
4875
  alt: null
4872
4876
  };
4873
4877
  }
4874
- function ve() {
4878
+ function _e() {
4875
4879
  return {
4876
4880
  type: "link",
4877
4881
  title: null,
@@ -4879,7 +4883,7 @@ function da(e) {
4879
4883
  children: []
4880
4884
  };
4881
4885
  }
4882
- function ye(e) {
4886
+ function ve(e) {
4883
4887
  return {
4884
4888
  type: "list",
4885
4889
  ordered: e.type === "listOrdered",
@@ -4888,7 +4892,7 @@ function da(e) {
4888
4892
  children: []
4889
4893
  };
4890
4894
  }
4891
- function be(e) {
4895
+ function ye(e) {
4892
4896
  return {
4893
4897
  type: "listItem",
4894
4898
  spread: e._spread,
@@ -4896,25 +4900,25 @@ function da(e) {
4896
4900
  children: []
4897
4901
  };
4898
4902
  }
4899
- function xe() {
4903
+ function be() {
4900
4904
  return {
4901
4905
  type: "paragraph",
4902
4906
  children: []
4903
4907
  };
4904
4908
  }
4905
- function Se() {
4909
+ function xe() {
4906
4910
  return {
4907
4911
  type: "strong",
4908
4912
  children: []
4909
4913
  };
4910
4914
  }
4911
- function Ce() {
4915
+ function Se() {
4912
4916
  return {
4913
4917
  type: "text",
4914
4918
  value: ""
4915
4919
  };
4916
4920
  }
4917
- function we() {
4921
+ function Ce() {
4918
4922
  return { type: "thematicBreak" };
4919
4923
  }
4920
4924
  }
@@ -4954,13 +4958,13 @@ function ma(e, t) {
4954
4958
  }
4955
4959
  }
4956
4960
  function ha(e, t) {
4957
- throw Error(e ? "Cannot close `" + e.type + "` (" + Ut({
4961
+ throw Error(e ? "Cannot close `" + e.type + "` (" + Ht({
4958
4962
  start: e.start,
4959
4963
  end: e.end
4960
- }) + "): a different token (`" + t.type + "`, " + Ut({
4964
+ }) + "): a different token (`" + t.type + "`, " + Ht({
4961
4965
  start: t.start,
4962
4966
  end: t.end
4963
- }) + ") is open" : "Cannot close document, a token (`" + t.type + "`, " + Ut({
4967
+ }) + ") is open" : "Cannot close document, a token (`" + t.type + "`, " + Ht({
4964
4968
  start: t.start,
4965
4969
  end: t.end
4966
4970
  }) + ") is still open");
@@ -5318,7 +5322,7 @@ function Ra(e, t) {
5318
5322
  tagName: "tbody",
5319
5323
  properties: {},
5320
5324
  children: e.wrap(n, !0)
5321
- }, a = Bt(t.children[1]), o = zt(t.children[t.children.length - 1]);
5325
+ }, a = zt(t.children[1]), o = Rt(t.children[t.children.length - 1]);
5322
5326
  a && o && (r.position = {
5323
5327
  start: a,
5324
5328
  end: o
@@ -5826,7 +5830,7 @@ function wo(e, t) {
5826
5830
  }
5827
5831
  }
5828
5832
  function To(e, t) {
5829
- e.position && (t.position = Ht(e));
5833
+ e.position && (t.position = Vt(e));
5830
5834
  }
5831
5835
  function Eo(e, t) {
5832
5836
  let n = t;
@@ -6203,7 +6207,7 @@ var Xo = [
6203
6207
  return r.fatal = void 0, r;
6204
6208
  }
6205
6209
  message(e, t, n) {
6206
- let r = new U(e, t, n);
6210
+ let r = new W(e, t, n);
6207
6211
  return this.path && (r.name = this.path + ":" + r.name, r.file = this.path), r.fatal = !1, this.messages.push(r), r;
6208
6212
  }
6209
6213
  toString(e) {
@@ -6478,7 +6482,7 @@ function Ss(e, t) {
6478
6482
  tagName: "div",
6479
6483
  properties: { className: t.className },
6480
6484
  children: e.type === "root" ? e.children : [e]
6481
- }), xo(e, l), en(e, {
6485
+ }), xo(e, l), $t(e, {
6482
6486
  Fragment: x,
6483
6487
  components: i,
6484
6488
  ignoreInvalidStyle: !0,
@@ -6494,8 +6498,8 @@ function Ss(e, t) {
6494
6498
  }, t;
6495
6499
  if (e.type === "element") {
6496
6500
  let t;
6497
- for (t in Cn) if (Object.hasOwn(Cn, t) && Object.hasOwn(e.properties, t)) {
6498
- let n = e.properties[t], r = Cn[t];
6501
+ for (t in Sn) if (Object.hasOwn(Sn, t) && Object.hasOwn(e.properties, t)) {
6502
+ let n = e.properties[t], r = Sn[t];
6499
6503
  (r === null || r.includes(e.tagName)) && (e.properties[t] = c(String(n || ""), t, e));
6500
6504
  }
6501
6505
  }
@@ -7090,7 +7094,7 @@ function Pc(e, t) {
7090
7094
  let n = !1;
7091
7095
  return xo(e, function(e) {
7092
7096
  if ("value" in e && /\r?\n|\r/.test(e.value) || e.type === "break") return n = !0, !1;
7093
- }), !!((!e.depth || e.depth < 3) && Tn(e) && (t.options.setext || n));
7097
+ }), !!((!e.depth || e.depth < 3) && wn(e) && (t.options.setext || n));
7094
7098
  }
7095
7099
  //#endregion
7096
7100
  //#region node_modules/mdast-util-to-markdown/lib/handle/heading.js
@@ -7191,7 +7195,7 @@ function Uc() {
7191
7195
  //#endregion
7192
7196
  //#region node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
7193
7197
  function Wc(e, t) {
7194
- let n = Tn(e);
7198
+ let n = wn(e);
7195
7199
  return !!(!t.options.resourceLink && e.url && !e.title && e.children && e.children.length === 1 && e.children[0].type === "text" && (n === e.url || "mailto:" + n === e.url) && /^[a-z][a-z+.-]+:/i.test(e.url) && !/[\0- <>\u007F]/.test(e.url));
7196
7200
  }
7197
7201
  //#endregion
@@ -8047,7 +8051,7 @@ function su(e) {
8047
8051
  t
8048
8052
  ]
8049
8053
  ], s = t.parser.constructs.insideSpan.null;
8050
- s && W(o, o.length, 0, $n(s, e.slice(r + 1, n), t)), W(o, o.length, 0, [
8054
+ s && G(o, o.length, 0, $n(s, e.slice(r + 1, n), t)), G(o, o.length, 0, [
8051
8055
  [
8052
8056
  "exit",
8053
8057
  a,
@@ -8068,7 +8072,7 @@ function su(e) {
8068
8072
  i,
8069
8073
  t
8070
8074
  ]
8071
- ]), W(e, r - 1, n - r + 3, o), n = r + o.length - 2;
8075
+ ]), G(e, r - 1, n - r + 3, o), n = r + o.length - 2;
8072
8076
  break;
8073
8077
  }
8074
8078
  }
@@ -8446,7 +8450,7 @@ function Ou(e) {
8446
8450
  }).format(new Date(e));
8447
8451
  }
8448
8452
  function ku({ message: e, onRetry: t }) {
8449
- let { t: n } = Fe(), r = e.role === "user", i = r && e.status === "failed", a = r && e.status === "sending";
8453
+ let { t: n } = Pe(), r = e.role === "user", i = r && e.status === "failed", a = r && e.status === "sending";
8450
8454
  return /* @__PURE__ */ C("div", {
8451
8455
  className: `flex gap-3 ${r ? "flex-row-reverse" : "flex-row"} items-end mb-4`,
8452
8456
  children: [r ? /* @__PURE__ */ S("div", {
@@ -8621,8 +8625,7 @@ function Au() {
8621
8625
  }
8622
8626
  //#endregion
8623
8627
  //#region src/components/InputArea.tsx
8624
- var ju = "ELIA AI Assistant", Mu = "https://www.elia-asistent.com";
8625
- async function Nu(e, t) {
8628
+ async function ju(e, t) {
8626
8629
  let n = e.agentStream;
8627
8630
  if (!n || !n.apiBaseUrl || !n.tenantId) return null;
8628
8631
  let r = s.getState().tokens?.[t];
@@ -8643,8 +8646,8 @@ async function Nu(e, t) {
8643
8646
  return null;
8644
8647
  }
8645
8648
  }
8646
- function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8647
- let [i, a] = y(""), [c, l] = y([]), [u, d] = y(!1), [f, p] = y(null), h = v(null), g = o((e) => e.config), _ = s((e) => e.activeSessionId), b = g.poweredByLabel ?? ju, x = g.poweredByUrl ?? Mu, w = g.poweredByHide ?? !1, T = m(() => {
8649
+ function Mu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8650
+ let [i, a] = y(""), [c, l] = y([]), [u, d] = y(!1), [f, p] = y(null), h = v(null), g = o((e) => e.config), _ = s((e) => e.activeSessionId), b = m(() => {
8648
8651
  let n = i.trim(), r = c.length > 0;
8649
8652
  !n && !r || t || u || (e(n, c), a(""), l([]), p(null), h.current && (h.current.style.height = "auto"));
8650
8653
  }, [
@@ -8653,9 +8656,9 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8653
8656
  u,
8654
8657
  c,
8655
8658
  e
8656
- ]), E = m((e) => {
8657
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), T());
8658
- }, [T]), D = m((e) => {
8659
+ ]), x = m((e) => {
8660
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), b());
8661
+ }, [b]), w = m((e) => {
8659
8662
  a(e.target.value);
8660
8663
  let t = e.target;
8661
8664
  t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 180)}px`;
@@ -8768,7 +8771,7 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8768
8771
  p(`File type not allowed. Allowed types: ${r}`), e.target.value = "";
8769
8772
  return;
8770
8773
  }
8771
- let i = await Nu(g, _ ?? s.getState().createSession());
8774
+ let i = await ju(g, _ ?? s.getState().createSession());
8772
8775
  if (!i) {
8773
8776
  p("Unable to authenticate file upload."), e.target.value = "";
8774
8777
  return;
@@ -8808,8 +8811,8 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8808
8811
  /* @__PURE__ */ S("textarea", {
8809
8812
  ref: h,
8810
8813
  value: i,
8811
- onChange: D,
8812
- onKeyDown: E,
8814
+ onChange: w,
8815
+ onKeyDown: x,
8813
8816
  placeholder: n ?? "Type a message… (Enter to send, Shift+Enter for newline)",
8814
8817
  disabled: t,
8815
8818
  rows: 1,
@@ -8822,7 +8825,7 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8822
8825
  }
8823
8826
  }),
8824
8827
  /* @__PURE__ */ S("button", {
8825
- onClick: T,
8828
+ onClick: b,
8826
8829
  disabled: t || u || !i.trim() && c.length === 0,
8827
8830
  className: "flex-shrink-0 w-[42px] h-[42px] rounded-xl flex items-center justify-center transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
8828
8831
  style: {
@@ -8841,13 +8844,13 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8841
8844
  })
8842
8845
  ]
8843
8846
  }),
8844
- !w && /* @__PURE__ */ S("div", {
8847
+ /* @__PURE__ */ S("div", {
8845
8848
  className: "text-center text-[11px] pb-2 px-3 text-fg-muted",
8846
- children: /* @__PURE__ */ S(Me, {
8849
+ children: /* @__PURE__ */ S(je, {
8847
8850
  i18nKey: "footer.poweredBy",
8848
- values: { label: b },
8851
+ values: { label: "ELIA AI Assistant" },
8849
8852
  components: { a: /* @__PURE__ */ S("a", {
8850
- href: x,
8853
+ href: "https://www.elia-asistent.com",
8851
8854
  target: "_blank",
8852
8855
  rel: "noopener noreferrer",
8853
8856
  className: "hover:underline",
@@ -8860,7 +8863,7 @@ function Pu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
8860
8863
  }
8861
8864
  //#endregion
8862
8865
  //#region src/components/Tabs.tsx
8863
- function Fu({ tabs: e, activeId: t, onChange: n }) {
8866
+ function Nu({ tabs: e, activeId: t, onChange: n }) {
8864
8867
  return /* @__PURE__ */ S("div", {
8865
8868
  className: "flex gap-1 px-3 pt-3 pb-2 flex-shrink-0 border-b",
8866
8869
  style: {
@@ -8879,11 +8882,11 @@ function Fu({ tabs: e, activeId: t, onChange: n }) {
8879
8882
  color: "var(--t-fg-secondary)",
8880
8883
  border: "1px solid transparent"
8881
8884
  },
8882
- children: [e.icon && /* @__PURE__ */ S(Iu, { name: e.icon }), /* @__PURE__ */ S("span", { children: e.label })]
8885
+ children: [e.icon && /* @__PURE__ */ S(Pu, { name: e.icon }), /* @__PURE__ */ S("span", { children: e.label })]
8883
8886
  }, e.id))
8884
8887
  });
8885
8888
  }
8886
- function Iu({ name: e }) {
8889
+ function Pu({ name: e }) {
8887
8890
  let t = {
8888
8891
  width: 14,
8889
8892
  height: 14,
@@ -8911,7 +8914,7 @@ function Iu({ name: e }) {
8911
8914
  }
8912
8915
  //#endregion
8913
8916
  //#region src/hooks/useFeedJson.ts
8914
- function Lu(e, t) {
8917
+ function Fu(e, t) {
8915
8918
  let [n, r] = y(() => e ? {
8916
8919
  data: [],
8917
8920
  loading: !0,
@@ -8957,20 +8960,20 @@ function Lu(e, t) {
8957
8960
  }
8958
8961
  //#endregion
8959
8962
  //#region src/components/NotificationsTab.tsx
8960
- function Ru({ feedUrl: e, inlineItems: t }) {
8961
- let { t: n } = Fe(), { data: r, loading: i, error: a } = Lu(e, t);
8962
- return i ? /* @__PURE__ */ S(Hu, {
8963
+ function Iu({ feedUrl: e, inlineItems: t }) {
8964
+ let { t: n } = Pe(), { data: r, loading: i, error: a } = Fu(e, t);
8965
+ return i ? /* @__PURE__ */ S(Bu, {
8963
8966
  text: n("tabs.loading"),
8964
8967
  muted: !0
8965
- }) : a ? /* @__PURE__ */ S(Hu, { text: `${n("tabs.error")} (${a})` }) : r.length === 0 ? /* @__PURE__ */ S(Hu, {
8968
+ }) : a ? /* @__PURE__ */ S(Bu, { text: `${n("tabs.error")} (${a})` }) : r.length === 0 ? /* @__PURE__ */ S(Bu, {
8966
8969
  text: n("tabs.empty.notifications"),
8967
8970
  muted: !0
8968
8971
  }) : /* @__PURE__ */ S("div", {
8969
8972
  className: "flex-1 overflow-y-auto px-4 py-3 space-y-3",
8970
- children: r.map((e, t) => /* @__PURE__ */ S(zu, { item: e }, e.id ?? t))
8973
+ children: r.map((e, t) => /* @__PURE__ */ S(Lu, { item: e }, e.id ?? t))
8971
8974
  });
8972
8975
  }
8973
- function zu({ item: e }) {
8976
+ function Lu({ item: e }) {
8974
8977
  return /* @__PURE__ */ C("div", {
8975
8978
  className: "rounded-xl px-4 py-3",
8976
8979
  style: {
@@ -8983,7 +8986,7 @@ function zu({ item: e }) {
8983
8986
  children: [/* @__PURE__ */ S("h3", {
8984
8987
  className: "flex-1 text-sm font-semibold text-fg-primary",
8985
8988
  children: e.title
8986
- }), e.tags?.map((e, t) => /* @__PURE__ */ S(Bu, { tag: e }, t))]
8989
+ }), e.tags?.map((e, t) => /* @__PURE__ */ S(Ru, { tag: e }, t))]
8987
8990
  }),
8988
8991
  /* @__PURE__ */ S("p", {
8989
8992
  className: "text-sm text-fg-secondary leading-relaxed whitespace-pre-line",
@@ -9013,15 +9016,15 @@ function zu({ item: e }) {
9013
9016
  ]
9014
9017
  });
9015
9018
  }
9016
- function Bu({ tag: e }) {
9019
+ function Ru({ tag: e }) {
9017
9020
  let t = typeof e == "string" ? e : e.label;
9018
9021
  return /* @__PURE__ */ S("span", {
9019
9022
  className: "inline-block px-2 py-0.5 rounded-md text-[11px] font-medium flex-shrink-0",
9020
- style: Vu(typeof e == "string" ? "neutral" : e.variant ?? "neutral"),
9023
+ style: zu(typeof e == "string" ? "neutral" : e.variant ?? "neutral"),
9021
9024
  children: t
9022
9025
  });
9023
9026
  }
9024
- function Vu(e) {
9027
+ function zu(e) {
9025
9028
  switch (e) {
9026
9029
  case "success": return {
9027
9030
  background: "rgba(34, 197, 94, 0.15)",
@@ -9041,7 +9044,7 @@ function Vu(e) {
9041
9044
  };
9042
9045
  }
9043
9046
  }
9044
- function Hu({ text: e, muted: t }) {
9047
+ function Bu({ text: e, muted: t }) {
9045
9048
  return /* @__PURE__ */ S("div", {
9046
9049
  className: "flex-1 flex items-center justify-center px-4 py-12 text-sm text-center",
9047
9050
  style: { color: t ? "var(--t-fg-muted)" : "var(--t-fg-secondary)" },
@@ -9050,37 +9053,37 @@ function Hu({ text: e, muted: t }) {
9050
9053
  }
9051
9054
  //#endregion
9052
9055
  //#region src/components/FaqTab.tsx
9053
- function Uu({ feedUrl: e, inlineItems: t }) {
9054
- let { t: n } = Fe(), { data: r, loading: i, error: a } = Lu(e, t), [o, s] = y(""), [c, l] = y(null), u = _(() => {
9056
+ function Vu({ feedUrl: e, inlineItems: t }) {
9057
+ let { t: n } = Pe(), { data: r, loading: i, error: a } = Fu(e, t), [o, s] = y(""), [c, l] = y(null), u = _(() => {
9055
9058
  let e = o.trim().toLowerCase();
9056
9059
  return e ? r.filter((t) => `${t.question} ${t.answer} ${t.category ?? ""}`.toLowerCase().includes(e)) : r;
9057
9060
  }, [r, o]);
9058
9061
  return i ? /* @__PURE__ */ C("div", {
9059
9062
  className: "flex-1 flex flex-col",
9060
- children: [/* @__PURE__ */ S(Wu, {
9063
+ children: [/* @__PURE__ */ S(Hu, {
9061
9064
  value: o,
9062
9065
  onChange: s,
9063
9066
  placeholder: n("tabs.faqSearch")
9064
- }), /* @__PURE__ */ S(Ku, {
9067
+ }), /* @__PURE__ */ S(Wu, {
9065
9068
  text: n("tabs.loading"),
9066
9069
  muted: !0
9067
9070
  })]
9068
9071
  }) : a ? /* @__PURE__ */ C("div", {
9069
9072
  className: "flex-1 flex flex-col",
9070
- children: [/* @__PURE__ */ S(Wu, {
9073
+ children: [/* @__PURE__ */ S(Hu, {
9071
9074
  value: o,
9072
9075
  onChange: s,
9073
9076
  placeholder: n("tabs.faqSearch")
9074
- }), /* @__PURE__ */ S(Ku, { text: `${n("tabs.error")} (${a})` })]
9077
+ }), /* @__PURE__ */ S(Wu, { text: `${n("tabs.error")} (${a})` })]
9075
9078
  }) : /* @__PURE__ */ C("div", {
9076
9079
  className: "flex-1 flex flex-col min-h-0",
9077
- children: [/* @__PURE__ */ S(Wu, {
9080
+ children: [/* @__PURE__ */ S(Hu, {
9078
9081
  value: o,
9079
9082
  onChange: s,
9080
9083
  placeholder: n("tabs.faqSearch")
9081
9084
  }), /* @__PURE__ */ S("div", {
9082
9085
  className: "flex-1 overflow-y-auto px-4 py-3 space-y-2",
9083
- children: u.length === 0 ? /* @__PURE__ */ S(Ku, {
9086
+ children: u.length === 0 ? /* @__PURE__ */ S(Wu, {
9084
9087
  text: n("tabs.empty.faq"),
9085
9088
  muted: !0
9086
9089
  }) : u.map((e, t) => {
@@ -9097,7 +9100,7 @@ function Uu({ feedUrl: e, inlineItems: t }) {
9097
9100
  children: [/* @__PURE__ */ S("span", {
9098
9101
  className: "flex-1 text-sm font-semibold text-fg-primary",
9099
9102
  children: e.question
9100
- }), /* @__PURE__ */ S(Gu, { open: r })]
9103
+ }), /* @__PURE__ */ S(Uu, { open: r })]
9101
9104
  }), r && /* @__PURE__ */ C("div", {
9102
9105
  className: "px-4 pb-3 text-sm text-fg-secondary leading-relaxed whitespace-pre-line",
9103
9106
  style: {
@@ -9121,7 +9124,7 @@ function Uu({ feedUrl: e, inlineItems: t }) {
9121
9124
  })]
9122
9125
  });
9123
9126
  }
9124
- function Wu({ value: e, onChange: t, placeholder: n }) {
9127
+ function Hu({ value: e, onChange: t, placeholder: n }) {
9125
9128
  return /* @__PURE__ */ S("div", {
9126
9129
  className: "px-4 pt-3 pb-2 flex-shrink-0",
9127
9130
  style: { background: "var(--t-bg-base)" },
@@ -9157,7 +9160,7 @@ function Wu({ value: e, onChange: t, placeholder: n }) {
9157
9160
  })
9158
9161
  });
9159
9162
  }
9160
- function Gu({ open: e }) {
9163
+ function Uu({ open: e }) {
9161
9164
  return /* @__PURE__ */ S("svg", {
9162
9165
  width: "16",
9163
9166
  height: "16",
@@ -9177,7 +9180,7 @@ function Gu({ open: e }) {
9177
9180
  children: /* @__PURE__ */ S("path", { d: "m6 9 6 6 6-6" })
9178
9181
  });
9179
9182
  }
9180
- function Ku({ text: e, muted: t }) {
9183
+ function Wu({ text: e, muted: t }) {
9181
9184
  return /* @__PURE__ */ S("div", {
9182
9185
  className: "flex-1 flex items-center justify-center px-4 py-12 text-sm text-center",
9183
9186
  style: { color: t ? "var(--t-fg-muted)" : "var(--t-fg-secondary)" },
@@ -9186,30 +9189,31 @@ function Ku({ text: e, muted: t }) {
9186
9189
  }
9187
9190
  //#endregion
9188
9191
  //#region src/components/ChatView.tsx
9189
- function qu({ onOpenSettings: e, onClose: t }) {
9190
- let { t: n } = Fe(), r = s((e) => e.activeSessionId), i = s((e) => r ? e.messages[r] ?? [] : []), a = s((e) => e.createSession), c = s((e) => e.isStreaming), l = s((e) => r ? !!e.awaitingAgentReply[r] : !1), u = o((e) => e.config), d = o((e) => e.language), f = u.hideSettings ?? !1, { send: p, retry: m } = Xe(), h = v(null), _ = u.i18n?.[d] ?? u.i18n?.en ?? {}, b = _.initialMessages ?? u.initialMessages ?? [], w = _.botName ?? u.botName ?? n("header.assistant"), T = u.tabs, E = T?.notifications, D = T?.help, O = !!(E?.feedUrl || E?.items?.length || D?.feedUrl || D?.items?.length), k = O ? [
9191
- E?.feedUrl || E?.items?.length ? {
9192
+ function Gu({ onOpenSettings: e, onClose: t }) {
9193
+ let { t: n } = Pe(), r = s((e) => e.activeSessionId), i = s((e) => r ? e.messages[r] ?? [] : []), a = s((e) => e.createSession), c = s((e) => e.isStreaming), l = s((e) => r ? !!e.awaitingAgentReply[r] : !1), u = o((e) => e.config), d = o((e) => e.language), f = u.hideSettings ?? !1, { send: p, retry: m } = Ye(), h = v(null), _ = v(!0), b = v(0), w = u.i18n?.[d] ?? u.i18n?.en ?? {}, T = w.initialMessages ?? u.initialMessages ?? [], E = w.botName ?? u.botName ?? n("header.assistant"), D = u.tabs, O = D?.notifications, k = D?.help, A = !!(O?.feedUrl || O?.items?.length || k?.feedUrl || k?.items?.length), j = A ? [
9194
+ O?.feedUrl || O?.items?.length ? {
9192
9195
  id: "notifications",
9193
- label: _.tabs?.notifications?.title ?? T?.notifications?.title ?? n("tabs.notifications"),
9196
+ label: w.tabs?.notifications?.title ?? D?.notifications?.title ?? n("tabs.notifications"),
9194
9197
  icon: "bulb"
9195
9198
  } : null,
9196
- D?.feedUrl || D?.items?.length ? {
9199
+ k?.feedUrl || k?.items?.length ? {
9197
9200
  id: "help",
9198
- label: _.tabs?.help?.title ?? T?.help?.title ?? n("tabs.help"),
9201
+ label: w.tabs?.help?.title ?? D?.help?.title ?? n("tabs.help"),
9199
9202
  icon: "book"
9200
9203
  } : null,
9201
9204
  {
9202
9205
  id: "chat",
9203
- label: _.tabs?.chat?.title ?? T?.chat?.title ?? n("tabs.chat"),
9206
+ label: w.tabs?.chat?.title ?? D?.chat?.title ?? n("tabs.chat"),
9204
9207
  icon: "chat"
9205
9208
  }
9206
- ].filter((e) => e !== null) : [], [A, j] = y("chat");
9209
+ ].filter((e) => e !== null) : [], [M, N] = y("chat");
9207
9210
  g(() => {
9208
9211
  r || a();
9209
9212
  }, [r, a]), g(() => {
9210
- h.current?.scrollIntoView({ behavior: "smooth" });
9213
+ let e = i.length;
9214
+ _.current ? (h.current?.scrollIntoView({ behavior: "auto" }), _.current = !1) : (e > b.current || c) && h.current?.scrollIntoView({ behavior: "smooth" }), b.current = e;
9211
9215
  }, [i, c]);
9212
- let M = u.showWelcomeScreen && i.length === 0 && !c, N = _.welcomeSubtitle ?? n("welcome.subtitle"), P = !O || A === "chat";
9216
+ let P = T.length > 0, ee = u.showWelcomeScreen && i.length === 0 && !c && !P, F = w.welcomeSubtitle ?? n("welcome.subtitle"), I = !A || M === "chat";
9213
9217
  return /* @__PURE__ */ C("div", {
9214
9218
  className: "flex flex-col h-full min-w-0",
9215
9219
  children: [
@@ -9236,7 +9240,7 @@ function qu({ onOpenSettings: e, onClose: t }) {
9236
9240
  }),
9237
9241
  /* @__PURE__ */ S("span", {
9238
9242
  className: "text-sm font-semibold text-fg-primary",
9239
- children: w
9243
+ children: E
9240
9244
  }),
9241
9245
  u.webhookUrl ? /* @__PURE__ */ C("span", {
9242
9246
  className: "text-xs text-fg-muted",
@@ -9252,35 +9256,35 @@ function qu({ onOpenSettings: e, onClose: t }) {
9252
9256
  onClick: e,
9253
9257
  className: "w-8 h-8 rounded-lg flex items-center justify-center text-fg-secondary hover:text-fg-primary hover:bg-bg-surface transition-colors",
9254
9258
  title: n("sidebar.settings"),
9255
- children: /* @__PURE__ */ S(Yu, {})
9259
+ children: /* @__PURE__ */ S(qu, {})
9256
9260
  }), t && /* @__PURE__ */ S("button", {
9257
9261
  onClick: t,
9258
9262
  className: "w-8 h-8 rounded-lg flex items-center justify-center text-fg-secondary hover:text-fg-primary hover:bg-bg-surface transition-colors",
9259
9263
  "aria-label": "Close chat",
9260
- children: /* @__PURE__ */ S(Xu, {})
9264
+ children: /* @__PURE__ */ S(Ju, {})
9261
9265
  })]
9262
9266
  })]
9263
9267
  }),
9264
- O && /* @__PURE__ */ S(Fu, {
9265
- tabs: k,
9266
- activeId: A,
9267
- onChange: (e) => j(e)
9268
+ A && /* @__PURE__ */ S(Nu, {
9269
+ tabs: j,
9270
+ activeId: M,
9271
+ onChange: (e) => N(e)
9268
9272
  }),
9269
- O && A === "notifications" && /* @__PURE__ */ S(Ru, {
9270
- feedUrl: E?.feedUrl,
9271
- inlineItems: E?.items
9273
+ A && M === "notifications" && /* @__PURE__ */ S(Iu, {
9274
+ feedUrl: O?.feedUrl,
9275
+ inlineItems: O?.items
9272
9276
  }),
9273
- O && A === "help" && /* @__PURE__ */ S(Uu, {
9274
- feedUrl: D?.feedUrl,
9275
- inlineItems: D?.items
9277
+ A && M === "help" && /* @__PURE__ */ S(Vu, {
9278
+ feedUrl: k?.feedUrl,
9279
+ inlineItems: k?.items
9276
9280
  }),
9277
- P && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
9281
+ I && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
9278
9282
  className: "flex-1 overflow-y-auto px-4 py-4",
9279
- children: [M ? /* @__PURE__ */ S(Ju, {
9280
- botName: w,
9281
- subtitle: N
9283
+ children: [ee ? /* @__PURE__ */ S(Ku, {
9284
+ botName: E,
9285
+ subtitle: F
9282
9286
  }) : /* @__PURE__ */ C(x, { children: [
9283
- i.length === 0 && b.map((e, t) => /* @__PURE__ */ S(ku, { message: {
9287
+ i.length === 0 && T.map((e, t) => /* @__PURE__ */ S(ku, { message: {
9284
9288
  id: String(t),
9285
9289
  role: "bot",
9286
9290
  content: e,
@@ -9292,7 +9296,7 @@ function qu({ onOpenSettings: e, onClose: t }) {
9292
9296
  }, e.id)),
9293
9297
  (c && i[i.length - 1]?.role === "bot" && i[i.length - 1]?.content === "" || l) && /* @__PURE__ */ S(Au, {})
9294
9298
  ] }), /* @__PURE__ */ S("div", { ref: h })]
9295
- }), /* @__PURE__ */ S(Pu, {
9299
+ }), /* @__PURE__ */ S(Mu, {
9296
9300
  onSend: p,
9297
9301
  disabled: c || !u.webhookUrl,
9298
9302
  placeholder: u.webhookUrl ? n("input.placeholder") : n("input.placeholderUnconfigured"),
@@ -9301,7 +9305,7 @@ function qu({ onOpenSettings: e, onClose: t }) {
9301
9305
  ]
9302
9306
  });
9303
9307
  }
9304
- function Ju({ botName: e, subtitle: t }) {
9308
+ function Ku({ botName: e, subtitle: t }) {
9305
9309
  return /* @__PURE__ */ C("div", {
9306
9310
  className: "flex flex-col items-center justify-center h-full gap-4 text-center px-8",
9307
9311
  children: [/* @__PURE__ */ S("div", {
@@ -9315,12 +9319,12 @@ function Ju({ botName: e, subtitle: t }) {
9315
9319
  className: "text-lg font-semibold text-fg-primary mb-1",
9316
9320
  children: e
9317
9321
  }), /* @__PURE__ */ S("p", {
9318
- className: "text-sm text-fg-secondary",
9322
+ className: "text-sm text-fg-secondary whitespace-pre-line",
9319
9323
  children: t
9320
9324
  })] })]
9321
9325
  });
9322
9326
  }
9323
- function Yu() {
9327
+ function qu() {
9324
9328
  return /* @__PURE__ */ C("svg", {
9325
9329
  width: "16",
9326
9330
  height: "16",
@@ -9335,7 +9339,7 @@ function Yu() {
9335
9339
  }), /* @__PURE__ */ S("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })]
9336
9340
  });
9337
9341
  }
9338
- function Xu() {
9342
+ function Ju() {
9339
9343
  return /* @__PURE__ */ S("svg", {
9340
9344
  width: "16",
9341
9345
  height: "16",
@@ -9348,8 +9352,8 @@ function Xu() {
9348
9352
  }
9349
9353
  //#endregion
9350
9354
  //#region src/components/ThemePicker.tsx
9351
- function Zu() {
9352
- let { activeTheme: e, setTheme: t } = Ie();
9355
+ function Yu() {
9356
+ let { activeTheme: e, setTheme: t } = Fe();
9353
9357
  return /* @__PURE__ */ S("div", {
9354
9358
  className: "flex flex-wrap gap-2 p-3",
9355
9359
  children: a.map((n) => /* @__PURE__ */ S("button", {
@@ -9366,7 +9370,7 @@ function Zu() {
9366
9370
  }
9367
9371
  //#endregion
9368
9372
  //#region src/components/SettingsModal.tsx
9369
- var Qu = 500 * 1024, $u = [
9373
+ var Xu = [
9370
9374
  {
9371
9375
  code: "en",
9372
9376
  label: "EN - English"
@@ -9400,8 +9404,8 @@ var Qu = 500 * 1024, $u = [
9400
9404
  label: "ES - Spanish"
9401
9405
  }
9402
9406
  ];
9403
- function ed({ onClose: e }) {
9404
- let { t } = Fe(), { config: n, setConfig: r, language: i, setLanguage: a, activeTheme: s } = o(), [c, l] = y({ ...n }), [u, d] = y(""), [f, p] = y(() => {
9407
+ function Zu({ onClose: e }) {
9408
+ let { t } = Pe(), { config: n, setConfig: r, language: i, setLanguage: a, activeTheme: s } = o(), [c, l] = y({ ...n }), [u, d] = y(""), [f, p] = y(() => {
9405
9409
  try {
9406
9410
  return JSON.stringify(c.metadata ?? {}, null, 2);
9407
9411
  } catch {
@@ -9453,7 +9457,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9453
9457
  [e]: {}
9454
9458
  }
9455
9459
  })), O(e), A(""), M(!1));
9456
- }, [k, E]), te = m(() => {
9460
+ }, [k, E]), F = m(() => {
9457
9461
  let t, n = f.trim();
9458
9462
  if (n && n !== "{}") try {
9459
9463
  t = JSON.parse(n), d("");
@@ -9470,7 +9474,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9470
9474
  f,
9471
9475
  r,
9472
9476
  e
9473
- ]), F = N(D);
9477
+ ]), I = N(D);
9474
9478
  return /* @__PURE__ */ C("div", {
9475
9479
  className: "fixed inset-0 z-50 flex items-center justify-center p-4",
9476
9480
  style: { background: "rgba(0,0,0,0.6)" },
@@ -9509,7 +9513,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9509
9513
  className: "px-6 py-5 space-y-3 overflow-y-auto flex-1",
9510
9514
  children: [/* @__PURE__ */ S("p", {
9511
9515
  className: "text-xs text-fg-secondary leading-relaxed",
9512
- children: /* @__PURE__ */ S(Me, {
9516
+ children: /* @__PURE__ */ S(je, {
9513
9517
  i18nKey: "settings.exportHint",
9514
9518
  components: { code: /* @__PURE__ */ S("code", {}) }
9515
9519
  })
@@ -9555,7 +9559,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9555
9559
  }),
9556
9560
  /* @__PURE__ */ S($, {
9557
9561
  label: t("settings.theme") ?? "Theme",
9558
- children: /* @__PURE__ */ S(Zu, {})
9562
+ children: /* @__PURE__ */ S(Yu, {})
9559
9563
  }),
9560
9564
  /* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
9561
9565
  /* @__PURE__ */ S($, {
@@ -9610,7 +9614,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9610
9614
  }),
9611
9615
  /* @__PURE__ */ S($, {
9612
9616
  label: t("settings.botAvatar"),
9613
- children: /* @__PURE__ */ S(nd, {
9617
+ children: /* @__PURE__ */ S($u, {
9614
9618
  value: c.botAvatar,
9615
9619
  onChange: (e) => l((t) => ({
9616
9620
  ...t,
@@ -9619,6 +9623,17 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9619
9623
  shape: "circle"
9620
9624
  })
9621
9625
  }),
9626
+ /* @__PURE__ */ S($, {
9627
+ label: t("settings.toggleButtonIcon"),
9628
+ children: /* @__PURE__ */ S($u, {
9629
+ value: c.toggleButtonIcon,
9630
+ onChange: (e) => l((t) => ({
9631
+ ...t,
9632
+ toggleButtonIcon: e
9633
+ })),
9634
+ shape: "circle"
9635
+ })
9636
+ }),
9622
9637
  /* @__PURE__ */ S($, {
9623
9638
  label: t("settings.metadata"),
9624
9639
  error: u,
@@ -9684,7 +9699,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9684
9699
  /* @__PURE__ */ C("div", {
9685
9700
  className: "space-y-2",
9686
9701
  children: [
9687
- /* @__PURE__ */ S(td, {
9702
+ /* @__PURE__ */ S(Qu, {
9688
9703
  label: t("settings.streaming"),
9689
9704
  checked: c.streaming ?? !1,
9690
9705
  onChange: (e) => l((t) => ({
@@ -9692,7 +9707,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9692
9707
  streaming: e
9693
9708
  }))
9694
9709
  }),
9695
- /* @__PURE__ */ S(td, {
9710
+ /* @__PURE__ */ S(Qu, {
9696
9711
  label: t("settings.welcomeScreen"),
9697
9712
  checked: c.showWelcomeScreen ?? !0,
9698
9713
  onChange: (e) => l((t) => ({
@@ -9700,21 +9715,27 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9700
9715
  showWelcomeScreen: e
9701
9716
  }))
9702
9717
  }),
9703
- /* @__PURE__ */ S(td, {
9704
- label: t("settings.sidebar"),
9705
- checked: c.showSidebar ?? !1,
9706
- onChange: (e) => l((t) => ({
9707
- ...t,
9708
- showSidebar: e
9709
- }))
9710
- }),
9711
- /* @__PURE__ */ S(td, {
9718
+ /* @__PURE__ */ S(Qu, {
9712
9719
  label: t("settings.fileUploads"),
9713
9720
  checked: c.allowFileUploads ?? !1,
9714
9721
  onChange: (e) => l((t) => ({
9715
9722
  ...t,
9716
- allowFileUploads: e
9723
+ allowFileUploads: e,
9724
+ allowedFileExtensions: e ? t.allowedFileExtensions ?? ".pdf,.docx,.png,.jpg,.jpeg" : t.allowedFileExtensions
9717
9725
  }))
9726
+ }),
9727
+ c.allowFileUploads && /* @__PURE__ */ S($, {
9728
+ label: t("settings.allowedFileExtensions"),
9729
+ children: /* @__PURE__ */ S("input", {
9730
+ type: "text",
9731
+ value: c.allowedFileExtensions ?? "",
9732
+ onChange: (e) => l((t) => ({
9733
+ ...t,
9734
+ allowedFileExtensions: e.target.value
9735
+ })),
9736
+ placeholder: ".pdf,.docx,.png,.jpg,.jpeg",
9737
+ className: "input-field text-xs"
9738
+ })
9718
9739
  })
9719
9740
  ]
9720
9741
  }),
@@ -9746,7 +9767,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9746
9767
  (c.mode === "fullscreen" || c.mode === "mixed") && /* @__PURE__ */ C("div", {
9747
9768
  className: "space-y-3 pl-3 border-l-2",
9748
9769
  style: { borderColor: "var(--t-accent)" },
9749
- children: [/* @__PURE__ */ S(td, {
9770
+ children: [/* @__PURE__ */ S(Qu, {
9750
9771
  label: t("settings.fullscreenSheet"),
9751
9772
  checked: c.fullscreenSheet ?? !1,
9752
9773
  onChange: (e) => l((t) => ({
@@ -9875,7 +9896,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9875
9896
  className: "space-y-3 pl-3 border-l-2",
9876
9897
  style: { borderColor: "var(--t-accent)" },
9877
9898
  children: [
9878
- /* @__PURE__ */ S(td, {
9899
+ /* @__PURE__ */ S(Qu, {
9879
9900
  label: t("settings.cta"),
9880
9901
  checked: c.showCta ?? !0,
9881
9902
  onChange: (e) => l((t) => ({
@@ -9883,7 +9904,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9883
9904
  showCta: e
9884
9905
  }))
9885
9906
  }),
9886
- /* @__PURE__ */ S(td, {
9907
+ /* @__PURE__ */ S(Qu, {
9887
9908
  label: t("settings.ctaSound"),
9888
9909
  checked: c.ctaSound ?? !0,
9889
9910
  onChange: (e) => l((t) => ({
@@ -9904,56 +9925,10 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9904
9925
  min: 0,
9905
9926
  step: 500
9906
9927
  })
9907
- }),
9908
- /* @__PURE__ */ S($, {
9909
- label: t("settings.toggleButtonIcon"),
9910
- children: /* @__PURE__ */ S(nd, {
9911
- value: c.toggleButtonIcon,
9912
- onChange: (e) => l((t) => ({
9913
- ...t,
9914
- toggleButtonIcon: e
9915
- })),
9916
- shape: "circle"
9917
- })
9918
9928
  })
9919
9929
  ]
9920
9930
  }),
9921
9931
  /* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
9922
- /* @__PURE__ */ S(td, {
9923
- label: t("settings.poweredByHide"),
9924
- checked: c.poweredByHide ?? !1,
9925
- onChange: (e) => l((t) => ({
9926
- ...t,
9927
- poweredByHide: e
9928
- }))
9929
- }),
9930
- !c.poweredByHide && /* @__PURE__ */ C("div", {
9931
- className: "grid grid-cols-2 gap-3",
9932
- children: [/* @__PURE__ */ S($, {
9933
- label: t("settings.poweredByLabel"),
9934
- children: /* @__PURE__ */ S("input", {
9935
- value: c.poweredByLabel ?? "",
9936
- onChange: (e) => l((t) => ({
9937
- ...t,
9938
- poweredByLabel: e.target.value || void 0
9939
- })),
9940
- placeholder: "ELIA AI Assistant",
9941
- className: "input-field"
9942
- })
9943
- }), /* @__PURE__ */ S($, {
9944
- label: t("settings.poweredByUrl"),
9945
- children: /* @__PURE__ */ S("input", {
9946
- type: "url",
9947
- value: c.poweredByUrl ?? "",
9948
- onChange: (e) => l((t) => ({
9949
- ...t,
9950
- poweredByUrl: e.target.value || void 0
9951
- })),
9952
- placeholder: "https://www.elia-asistent.com",
9953
- className: "input-field"
9954
- })
9955
- })]
9956
- }),
9957
9932
  /* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
9958
9933
  /* @__PURE__ */ C("div", { children: [
9959
9934
  /* @__PURE__ */ S("p", {
@@ -9986,7 +9961,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
9986
9961
  value: "",
9987
9962
  children: "Pick…"
9988
9963
  }),
9989
- $u.filter((e) => !E.includes(e.code)).map((e) => /* @__PURE__ */ S("option", {
9964
+ Xu.filter((e) => !E.includes(e.code)).map((e) => /* @__PURE__ */ S("option", {
9990
9965
  value: e.code,
9991
9966
  children: e.label
9992
9967
  }, e.code)),
@@ -10029,7 +10004,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
10029
10004
  /* @__PURE__ */ S($, {
10030
10005
  label: t("settings.botNameOverride"),
10031
10006
  children: /* @__PURE__ */ S("input", {
10032
- value: F.botName ?? "",
10007
+ value: I.botName ?? "",
10033
10008
  onChange: (e) => P(D, { botName: e.target.value || void 0 }),
10034
10009
  placeholder: c.botName ?? "Assistant",
10035
10010
  className: "input-field"
@@ -10038,7 +10013,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
10038
10013
  /* @__PURE__ */ S($, {
10039
10014
  label: t("settings.welcomeSubtitle"),
10040
10015
  children: /* @__PURE__ */ S("input", {
10041
- value: F.welcomeSubtitle ?? "",
10016
+ value: I.welcomeSubtitle ?? "",
10042
10017
  onChange: (e) => P(D, { welcomeSubtitle: e.target.value || void 0 }),
10043
10018
  placeholder: t("welcome.subtitle"),
10044
10019
  className: "input-field"
@@ -10047,7 +10022,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
10047
10022
  /* @__PURE__ */ S($, {
10048
10023
  label: t("settings.initialMessages"),
10049
10024
  children: /* @__PURE__ */ S("textarea", {
10050
- value: (F.initialMessages ?? []).join("\n"),
10025
+ value: (I.initialMessages ?? []).join("\n"),
10051
10026
  onChange: (e) => P(D, { initialMessages: e.target.value ? e.target.value.split("\n").filter(Boolean) : [] }),
10052
10027
  rows: 4,
10053
10028
  className: "input-field resize-none text-sm",
@@ -10057,7 +10032,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
10057
10032
  c.mode === "window" && /* @__PURE__ */ S($, {
10058
10033
  label: t("settings.ctaTextLabel"),
10059
10034
  children: /* @__PURE__ */ S("input", {
10060
- value: F.ctaText ?? "",
10035
+ value: I.ctaText ?? "",
10061
10036
  onChange: (e) => P(D, { ctaText: e.target.value || void 0 }),
10062
10037
  placeholder: c.ctaText ?? "Hi! How can I help you today?",
10063
10038
  className: "input-field"
@@ -10094,7 +10069,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
10094
10069
  className: "px-4 py-2 rounded-lg text-sm text-fg-secondary hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
10095
10070
  children: t("settings.cancel")
10096
10071
  }), /* @__PURE__ */ S("button", {
10097
- onClick: te,
10072
+ onClick: F,
10098
10073
  className: "px-4 py-2 rounded-lg text-sm font-medium transition-colors",
10099
10074
  style: {
10100
10075
  background: "var(--t-accent)",
@@ -10127,7 +10102,7 @@ function $({ label: e, required: t, error: n, children: r }) {
10127
10102
  ]
10128
10103
  });
10129
10104
  }
10130
- function td({ label: e, checked: t, onChange: n }) {
10105
+ function Qu({ label: e, checked: t, onChange: n }) {
10131
10106
  return /* @__PURE__ */ C("label", {
10132
10107
  className: "flex items-center gap-3 cursor-pointer select-none",
10133
10108
  children: [/* @__PURE__ */ S("div", {
@@ -10144,44 +10119,28 @@ function td({ label: e, checked: t, onChange: n }) {
10144
10119
  })]
10145
10120
  });
10146
10121
  }
10147
- function nd({ value: e, onChange: t, shape: n }) {
10148
- let { t: r } = Fe(), i = v(null), [a, o] = y(""), s = Eu(e), c = n === "circle" ? "rounded-full" : "rounded-lg", l = (e) => {
10149
- if (!e.type.startsWith("image/")) {
10150
- o(r("settings.avatarErrorType"));
10151
- return;
10152
- }
10153
- if (e.size > Qu) {
10154
- o(r("settings.avatarErrorSize"));
10155
- return;
10156
- }
10157
- let n = new FileReader();
10158
- n.onload = (e) => {
10159
- let n = e.target?.result;
10160
- typeof n == "string" && (t(n), o(""));
10161
- }, n.readAsDataURL(e);
10162
- };
10122
+ function $u({ value: e, onChange: t, shape: n }) {
10123
+ let { t: r } = Pe(), i = Eu(e), a = n === "circle" ? "rounded-full" : "rounded-lg";
10163
10124
  return /* @__PURE__ */ C("div", {
10164
10125
  className: "space-y-3",
10165
10126
  children: [
10166
10127
  /* @__PURE__ */ C("div", {
10167
10128
  className: "flex items-center gap-3",
10168
10129
  children: [/* @__PURE__ */ S("div", {
10169
- className: `w-14 h-14 ${c} overflow-hidden flex items-center justify-center text-xs`,
10130
+ className: `w-14 h-14 ${a} overflow-hidden flex items-center justify-center text-xs`,
10170
10131
  style: {
10171
10132
  background: "var(--t-bg-surface2)",
10172
10133
  color: "var(--t-fg-muted)",
10173
10134
  border: "1px solid var(--t-bg-border)"
10174
10135
  },
10175
- children: s ? /* @__PURE__ */ S("img", {
10176
- src: s,
10136
+ children: i ? /* @__PURE__ */ S("img", {
10137
+ src: i,
10177
10138
  alt: "",
10178
10139
  className: "w-full h-full object-cover"
10179
10140
  }) : r("settings.avatarNone")
10180
10141
  }), e && /* @__PURE__ */ S("button", {
10181
10142
  type: "button",
10182
- onClick: () => {
10183
- t(void 0), o("");
10184
- },
10143
+ onClick: () => t(void 0),
10185
10144
  className: "px-2 py-1 rounded-lg text-xs text-fg-muted hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
10186
10145
  children: r("settings.avatarClear")
10187
10146
  })]
@@ -10192,10 +10151,8 @@ function nd({ value: e, onChange: t, shape: n }) {
10192
10151
  let r = e === n;
10193
10152
  return /* @__PURE__ */ S("button", {
10194
10153
  type: "button",
10195
- onClick: () => {
10196
- t(n), o("");
10197
- },
10198
- className: `${c} overflow-hidden transition-transform hover:scale-105`,
10154
+ onClick: () => t(n),
10155
+ className: `${a} overflow-hidden transition-transform hover:scale-105`,
10199
10156
  style: {
10200
10157
  outline: r ? "2px solid var(--t-accent)" : "1px solid var(--t-bg-border)",
10201
10158
  outlineOffset: r ? "1px" : "0"
@@ -10209,50 +10166,21 @@ function nd({ value: e, onChange: t, shape: n }) {
10209
10166
  }, n);
10210
10167
  })
10211
10168
  }),
10212
- /* @__PURE__ */ C("div", {
10213
- className: "flex items-center gap-2",
10214
- children: [
10215
- /* @__PURE__ */ S("button", {
10216
- type: "button",
10217
- onClick: () => i.current?.click(),
10218
- className: "px-3 py-1.5 rounded-lg text-xs transition-colors",
10219
- style: {
10220
- background: "var(--t-bg-surface2)",
10221
- color: "var(--t-fg-secondary)"
10222
- },
10223
- children: r("settings.avatarUpload")
10224
- }),
10225
- /* @__PURE__ */ S("input", {
10226
- ref: i,
10227
- type: "file",
10228
- accept: "image/*",
10229
- className: "hidden",
10230
- onChange: (e) => {
10231
- let t = e.target.files?.[0];
10232
- t && l(t), e.target.value = "";
10233
- }
10234
- }),
10235
- /* @__PURE__ */ S("input", {
10236
- type: "url",
10237
- placeholder: r("settings.avatarUrlPlaceholder"),
10238
- value: e && !(e in wu) && !e.startsWith("data:") ? e : "",
10239
- onChange: (e) => {
10240
- t(e.target.value.trim() || void 0), o("");
10241
- },
10242
- className: "input-field flex-1 text-xs"
10243
- })
10244
- ]
10245
- }),
10246
- a && /* @__PURE__ */ S("p", {
10247
- className: "text-xs text-red-400",
10248
- children: a
10169
+ /* @__PURE__ */ S("input", {
10170
+ type: "url",
10171
+ placeholder: r("settings.avatarUrlPlaceholder"),
10172
+ value: e && !(e in wu) && !e.startsWith("data:") ? e : "",
10173
+ onChange: (e) => {
10174
+ t(e.target.value.trim() || void 0);
10175
+ },
10176
+ className: "input-field w-full text-xs"
10249
10177
  })
10250
10178
  ]
10251
10179
  });
10252
10180
  }
10253
10181
  //#endregion
10254
10182
  //#region src/components/CtaPopup.tsx
10255
- function rd({ text: e, onDismiss: t }) {
10183
+ function ed({ text: e, onDismiss: t }) {
10256
10184
  return /* @__PURE__ */ C("div", {
10257
10185
  className: "absolute bottom-2 right-0 mb-2 w-64 cta-bubble rounded-2xl px-4 py-3 shadow-xl text-sm",
10258
10186
  style: {
@@ -10266,51 +10194,52 @@ function rd({ text: e, onDismiss: t }) {
10266
10194
  "aria-label": "Dismiss",
10267
10195
  children: "×"
10268
10196
  }), /* @__PURE__ */ S("p", {
10269
- className: "pr-5 leading-snug",
10197
+ className: "pr-5 leading-snug whitespace-pre-line",
10270
10198
  children: e
10271
10199
  })]
10272
10200
  });
10273
10201
  }
10274
10202
  //#endregion
10275
10203
  //#region src/App.tsx
10276
- function id() {
10204
+ function td() {
10277
10205
  let e = "(min-width: 768px) and (min-height: 600px)", [t, n] = y(() => window.matchMedia(e).matches);
10278
10206
  return g(() => {
10279
10207
  let t = window.matchMedia(e), r = () => n(t.matches);
10280
10208
  return t.addEventListener("change", r), () => t.removeEventListener("change", r);
10281
10209
  }, []), t;
10282
10210
  }
10283
- function ad() {
10284
- Ie(), ze();
10285
- let e = o((e) => e.config), t = s((e) => e.activeSessionId), n = s((e) => e.createSession), [r, i] = y(!1), [a, c] = y(!1), l = o((e) => e.language), u = id(), d = e.mode === "window" || e.mode === "mixed" && u, f = e.mode === "fullscreen" && !e.fullscreenSheet, [p, m] = y(f), h = !d && (e.showSidebar ?? !1), _ = e.hideSettings ?? !1, { showCta: v, ctaText: b, dismiss: w } = Re(e, l, !f), T = () => {
10286
- _ || i(!0);
10211
+ function nd() {
10212
+ let e = v(null);
10213
+ Fe({ elementRef: e }), Re();
10214
+ let t = o((e) => e.config), n = s((e) => e.activeSessionId), r = s((e) => e.createSession), [i, a] = y(!1), [c, l] = y(!1), u = o((e) => e.language), d = td(), f = t.mode === "window" || t.mode === "mixed" && d, [p, m] = y(!1), h = !f, _ = t.hideSettings ?? !1, { showCta: b, ctaText: w, dismiss: T } = Le(t, u, !0), E = () => {
10215
+ _ || a(!0);
10287
10216
  };
10288
10217
  g(() => {
10289
- t || n();
10290
- }, [t, n]);
10291
- let E = () => m(!1), D = () => {
10292
- w(), m(!0);
10293
- }, O = /* @__PURE__ */ C("div", {
10218
+ n || r();
10219
+ }, [n, r]);
10220
+ let D = () => m(!1), O = () => {
10221
+ T(), m(!0);
10222
+ }, k = /* @__PURE__ */ C("div", {
10294
10223
  className: "flex h-full w-full",
10295
10224
  style: { background: "var(--t-bg-base)" },
10296
10225
  children: [
10297
- a && h && /* @__PURE__ */ S("div", {
10226
+ c && h && /* @__PURE__ */ S("div", {
10298
10227
  className: "fixed inset-0 z-30 bg-black/50 md:hidden",
10299
- onClick: () => c(!1)
10228
+ onClick: () => l(!1)
10300
10229
  }),
10301
10230
  h && /* @__PURE__ */ S("div", {
10302
10231
  className: `
10303
10232
  fixed md:relative inset-y-0 left-0 z-40
10304
10233
  transition-transform md:translate-x-0
10305
- ${a ? "translate-x-0" : "-translate-x-full"}
10234
+ ${c ? "translate-x-0" : "-translate-x-full"}
10306
10235
  `,
10307
- children: /* @__PURE__ */ S(Be, { onOpenSettings: T })
10236
+ children: /* @__PURE__ */ S(ze, { onOpenSettings: E })
10308
10237
  }),
10309
10238
  /* @__PURE__ */ C("div", {
10310
10239
  className: "flex-1 flex flex-col min-w-0 h-full",
10311
10240
  children: [h && /* @__PURE__ */ S("button", {
10312
10241
  className: "md:hidden absolute top-3 left-3 z-20 w-8 h-8 flex items-center justify-center text-fg-secondary",
10313
- onClick: () => c((e) => !e),
10242
+ onClick: () => l((e) => !e),
10314
10243
  children: /* @__PURE__ */ S("svg", {
10315
10244
  width: "20",
10316
10245
  height: "20",
@@ -10320,83 +10249,87 @@ function ad() {
10320
10249
  strokeWidth: "2",
10321
10250
  children: /* @__PURE__ */ S("path", { d: "M3 12h18M3 6h18M3 18h18" })
10322
10251
  })
10323
- }), /* @__PURE__ */ S(qu, {
10324
- onOpenSettings: T,
10325
- onClose: f ? void 0 : E
10252
+ }), /* @__PURE__ */ S(Gu, {
10253
+ onOpenSettings: E,
10254
+ onClose: D
10326
10255
  })]
10327
10256
  })
10328
10257
  ]
10329
10258
  });
10330
- if (d) return /* @__PURE__ */ C(x, { children: [
10331
- p && /* @__PURE__ */ S("div", {
10332
- className: "fixed bottom-4 right-4 z-50 w-[380px] rounded-2xl shadow-2xl overflow-hidden flex flex-col",
10259
+ if (f) return /* @__PURE__ */ C("div", {
10260
+ className: "chat-ui",
10261
+ ref: e,
10262
+ children: [
10263
+ p && /* @__PURE__ */ S("div", {
10264
+ className: "fixed bottom-4 right-4 z-50 w-[380px] rounded-2xl shadow-2xl overflow-hidden flex flex-col",
10265
+ style: {
10266
+ border: "1px solid var(--t-bg-border)",
10267
+ background: "var(--t-bg-base)",
10268
+ height: "min(560px, calc(100vh - 32px))"
10269
+ },
10270
+ children: /* @__PURE__ */ S(Gu, {
10271
+ onOpenSettings: E,
10272
+ onClose: D
10273
+ })
10274
+ }),
10275
+ b && !p && /* @__PURE__ */ S("div", {
10276
+ className: "fixed bottom-20 right-4 z-50",
10277
+ children: /* @__PURE__ */ S(ed, {
10278
+ text: w,
10279
+ onDismiss: T
10280
+ })
10281
+ }),
10282
+ !p && /* @__PURE__ */ S(rd, {
10283
+ open: !1,
10284
+ iconSrc: Eu(t.toggleButtonIcon),
10285
+ onClick: O
10286
+ }),
10287
+ !_ && i && /* @__PURE__ */ S(Zu, { onClose: () => a(!1) })
10288
+ ]
10289
+ });
10290
+ let A = t.fullscreenSheetHeight ?? "75vh", j = t.fullscreenSheet === !0;
10291
+ return /* @__PURE__ */ C("div", {
10292
+ className: "chat-ui",
10293
+ ref: e,
10294
+ children: [p ? j ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
10295
+ className: "fixed inset-0 z-40 pointer-events-none",
10296
+ style: { background: "rgba(0, 0, 0, 0.4)" }
10297
+ }), /* @__PURE__ */ C("div", {
10298
+ className: "fixed inset-x-0 bottom-0 z-50 flex flex-col overflow-hidden",
10333
10299
  style: {
10334
- border: "1px solid var(--t-bg-border)",
10300
+ height: A,
10301
+ borderTopLeftRadius: "20px",
10302
+ borderTopRightRadius: "20px",
10335
10303
  background: "var(--t-bg-base)",
10336
- height: "min(560px, calc(100vh - 32px))"
10304
+ boxShadow: "0 -8px 32px rgba(0, 0, 0, 0.18)"
10337
10305
  },
10338
- children: /* @__PURE__ */ S(qu, {
10339
- onOpenSettings: T,
10340
- onClose: E
10341
- })
10342
- }),
10343
- v && !p && /* @__PURE__ */ S("div", {
10306
+ children: [/* @__PURE__ */ S("div", {
10307
+ className: "flex justify-center pt-2 pb-1 flex-shrink-0",
10308
+ children: /* @__PURE__ */ S("div", {
10309
+ className: "w-10 h-1 rounded-full",
10310
+ style: { background: "var(--t-bg-border)" }
10311
+ })
10312
+ }), /* @__PURE__ */ S("div", {
10313
+ className: "flex-1 min-h-0",
10314
+ children: k
10315
+ })]
10316
+ })] }) : /* @__PURE__ */ S("div", {
10317
+ className: "fixed inset-0 z-50",
10318
+ children: k
10319
+ }) : /* @__PURE__ */ C(x, { children: [b && /* @__PURE__ */ S("div", {
10344
10320
  className: "fixed bottom-20 right-4 z-50",
10345
- children: /* @__PURE__ */ S(rd, {
10346
- text: b,
10347
- onDismiss: w
10321
+ children: /* @__PURE__ */ S(ed, {
10322
+ text: w,
10323
+ onDismiss: T
10348
10324
  })
10349
- }),
10350
- !p && /* @__PURE__ */ S(od, {
10325
+ }), /* @__PURE__ */ S(rd, {
10351
10326
  open: !1,
10352
- iconSrc: Eu(e.toggleButtonIcon),
10353
- onClick: D
10354
- }),
10355
- !_ && r && /* @__PURE__ */ S(ed, { onClose: () => i(!1) })
10356
- ] });
10357
- if (f) return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
10358
- className: "fixed inset-0 z-30",
10359
- children: O
10360
- }), !_ && r && /* @__PURE__ */ S(ed, { onClose: () => i(!1) })] });
10361
- let k = e.fullscreenSheetHeight ?? "75vh", A = e.fullscreenSheet === !0;
10362
- return /* @__PURE__ */ C(x, { children: [p ? A ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
10363
- className: "fixed inset-0 z-40 pointer-events-none",
10364
- style: { background: "rgba(0, 0, 0, 0.4)" }
10365
- }), /* @__PURE__ */ C("div", {
10366
- className: "fixed inset-x-0 bottom-0 z-50 flex flex-col overflow-hidden",
10367
- style: {
10368
- height: k,
10369
- borderTopLeftRadius: "20px",
10370
- borderTopRightRadius: "20px",
10371
- background: "var(--t-bg-base)",
10372
- boxShadow: "0 -8px 32px rgba(0, 0, 0, 0.18)"
10373
- },
10374
- children: [/* @__PURE__ */ S("div", {
10375
- className: "flex justify-center pt-2 pb-1 flex-shrink-0",
10376
- children: /* @__PURE__ */ S("div", {
10377
- className: "w-10 h-1 rounded-full",
10378
- style: { background: "var(--t-bg-border)" }
10379
- })
10380
- }), /* @__PURE__ */ S("div", {
10381
- className: "flex-1 min-h-0",
10382
- children: O
10383
- })]
10384
- })] }) : /* @__PURE__ */ S("div", {
10385
- className: "fixed inset-0 z-50",
10386
- children: O
10387
- }) : /* @__PURE__ */ C(x, { children: [v && /* @__PURE__ */ S("div", {
10388
- className: "fixed bottom-20 right-4 z-50",
10389
- children: /* @__PURE__ */ S(rd, {
10390
- text: b,
10391
- onDismiss: w
10392
- })
10393
- }), /* @__PURE__ */ S(od, {
10394
- open: !1,
10395
- iconSrc: Eu(e.toggleButtonIcon),
10396
- onClick: D
10397
- })] }), !_ && r && /* @__PURE__ */ S(ed, { onClose: () => i(!1) })] });
10327
+ iconSrc: Eu(t.toggleButtonIcon),
10328
+ onClick: O
10329
+ })] }), !_ && i && /* @__PURE__ */ S(Zu, { onClose: () => a(!1) })]
10330
+ });
10398
10331
  }
10399
- function od({ open: e, iconSrc: t, onClick: n }) {
10332
+ function rd({ open: e, iconSrc: t, onClick: n }) {
10400
10333
  return /* @__PURE__ */ S("button", {
10401
10334
  className: "fixed bottom-4 right-4 z-50 w-14 h-14 rounded-full shadow-lg flex items-center justify-center transition-transform hover:scale-105 overflow-hidden",
10402
10335
  style: {
@@ -10430,17 +10363,17 @@ function od({ open: e, iconSrc: t, onClick: n }) {
10430
10363
  }
10431
10364
  //#endregion
10432
10365
  //#region src/createChat.ts
10433
- function sd(e) {
10366
+ function id(e) {
10434
10367
  let { target: t, language: n, ...r } = e, i = typeof t == "string" ? document.querySelector(t) : t;
10435
10368
  if (!i) throw Error(`[chatui] createChat: target "${String(t)}" not found`);
10436
10369
  let a = o.getState();
10437
10370
  a.setConfig(r), r.theme && a.setTheme(r.theme), n && a.setLanguage(n);
10438
10371
  let s = w(i);
10439
- return s.render(f(ad)), { unmount() {
10372
+ return s.render(f(nd)), { unmount() {
10440
10373
  s.unmount();
10441
10374
  } };
10442
10375
  }
10443
10376
  //#endregion
10444
- export { ad as App, sd as createChat };
10377
+ export { nd as App, id as createChat };
10445
10378
 
10446
10379
  //# sourceMappingURL=index.js.map