@pagelines/sdk 1.0.572 → 1.0.574
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/AgentProvider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang.js +875 -834
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/agent/AgentController.d.ts +1 -0
- package/dist/agent/schema.d.ts +8 -0
- package/dist/clients/ChatClient.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/sdkClient.js +115 -108
- package/dist/sdkClient.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Fn = Object.defineProperty;
|
|
2
2
|
var Ps = (a, t, e) => t in a ? Fn(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
3
|
var p = (a, t) => Fn(a, "name", { value: t, configurable: !0 });
|
|
4
|
-
var
|
|
5
|
-
import { defineComponent as
|
|
4
|
+
var D = (a, t, e) => Ps(a, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
+
import { defineComponent as Te, openBlock as T, createElementBlock as S, createElementVNode as w, normalizeClass as A, ref as ie, watch as It, computed as j, createCommentVNode as Z, renderSlot as on, onMounted as Lt, unref as sn, Fragment as Xe, toDisplayString as le, shallowRef as fs, onBeforeUnmount as gs, nextTick as Bs, createVNode as We, withCtx as Fs, renderList as Kt, createBlock as Un, withModifiers as At, createTextVNode as Hn, withDirectives as Us, vModelText as Hs } from "vue";
|
|
6
6
|
import { SettingsObject as js, Agent as Dt, getDefaultAvatarUrl as ms, createLogger as Gs } from "@pagelines/core";
|
|
7
7
|
import { P as Ws } from "./sdkClient.js";
|
|
8
8
|
const qs = { class: "spinner max-w-sm" }, Ys = {
|
|
9
9
|
class: "ring-circular h-full w-full origin-center",
|
|
10
10
|
viewBox: "25 25 50 50"
|
|
11
|
-
}, jn = /* @__PURE__ */
|
|
11
|
+
}, jn = /* @__PURE__ */ Te({
|
|
12
12
|
__name: "FSpinner",
|
|
13
13
|
props: {
|
|
14
14
|
width: { type: String, default: "" },
|
|
@@ -17,8 +17,8 @@ const qs = { class: "spinner max-w-sm" }, Ys = {
|
|
|
17
17
|
setup(a) {
|
|
18
18
|
return (t, e) => (T(), S("div", qs, [
|
|
19
19
|
(T(), S("svg", Ys, [
|
|
20
|
-
|
|
21
|
-
class:
|
|
20
|
+
w("circle", {
|
|
21
|
+
class: A([a.colorMode, "ring-path"]),
|
|
22
22
|
cx: "50",
|
|
23
23
|
cy: "50",
|
|
24
24
|
r: "20",
|
|
@@ -36,20 +36,20 @@ const qs = { class: "spinner max-w-sm" }, Ys = {
|
|
|
36
36
|
], Zs = 9e4, bs = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Xs = /* @__PURE__ */ new Set([...bs, "EMPTY_STREAM", "RATE_LIMIT"]), Gn = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), xn = class xn extends js {
|
|
37
37
|
constructor(e) {
|
|
38
38
|
super("AgentChatController", e);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
D(this, "isTextMode", !1);
|
|
40
|
+
D(this, "lastMessage", { hash: "", time: 0 });
|
|
41
|
+
D(this, "isConnecting", !1);
|
|
42
42
|
// Chat conversation tracking (server-managed persistence)
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
D(this, "conversationId");
|
|
44
|
+
D(this, "textState", ie({
|
|
45
45
|
isActive: !1,
|
|
46
46
|
isConnected: !1,
|
|
47
47
|
isThinking: !1,
|
|
48
48
|
connectionStatus: "disconnected"
|
|
49
49
|
}));
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
D(this, "agentMode", ie("self"));
|
|
51
|
+
D(this, "sharedMessages", ie([]));
|
|
52
|
+
D(this, "_agent");
|
|
53
53
|
this._agent = e.agent instanceof Dt ? e.agent : new Dt({ config: e.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher();
|
|
54
54
|
}
|
|
55
55
|
get chatEnabled() {
|
|
@@ -123,16 +123,17 @@ Current User:
|
|
|
123
123
|
isThinking: !1,
|
|
124
124
|
connectionStatus: "disconnected",
|
|
125
125
|
error: void 0,
|
|
126
|
-
sendBlockedReason: void 0
|
|
126
|
+
sendBlockedReason: void 0,
|
|
127
|
+
workingDescription: void 0
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
setupModeWatcher() {
|
|
130
|
-
|
|
131
|
+
It(this.agentMode, async (e, n) => {
|
|
131
132
|
this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
setupAvailabilityWatcher() {
|
|
135
|
-
|
|
136
|
+
It(() => this.chatEnabled, (e) => {
|
|
136
137
|
if (!(!this.isTextMode || this.isConnecting)) {
|
|
137
138
|
if (e) {
|
|
138
139
|
this.textState.value.isConnected || this.updateState(this.textState, {
|
|
@@ -215,76 +216,81 @@ Current User:
|
|
|
215
216
|
this.handleError(new Error("Agent handle required for chat"));
|
|
216
217
|
return;
|
|
217
218
|
}
|
|
218
|
-
this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
|
|
219
|
+
this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0, workingDescription: void 0 });
|
|
219
220
|
const l = `stream-${Date.now()}`;
|
|
220
221
|
let o = !1, h = !1;
|
|
221
|
-
const c = /* @__PURE__ */ p((
|
|
222
|
-
o || (o = !0, this.sharedMessages.value = [
|
|
222
|
+
const c = /* @__PURE__ */ p((m, _ = "assistant") => {
|
|
223
|
+
this.updateState(this.textState, { workingDescription: void 0 }), o || (o = !0, this.sharedMessages.value = [
|
|
223
224
|
...this.sharedMessages.value,
|
|
224
|
-
{ id: l, text: "", sender:
|
|
225
|
+
{ id: l, text: "", sender: _ === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
|
|
225
226
|
]);
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
}, "onDelta"),
|
|
229
|
-
h = !0, o = !0;
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
227
|
+
const L = this.sharedMessages.value, P = L[L.length - 1];
|
|
228
|
+
P?.id === l && (P.text += m, this.sharedMessages.value = [...L]);
|
|
229
|
+
}, "onDelta"), y = /* @__PURE__ */ p((m) => {
|
|
230
|
+
h = !0, o = !0, this.updateState(this.textState, { workingDescription: void 0 });
|
|
231
|
+
const _ = this.sharedMessages.value, L = _.findIndex((P) => P.id === m.id);
|
|
232
|
+
if (L >= 0)
|
|
232
233
|
this.sharedMessages.value = [
|
|
233
|
-
...
|
|
234
|
-
|
|
235
|
-
...
|
|
234
|
+
..._.slice(0, L),
|
|
235
|
+
m,
|
|
236
|
+
..._.slice(L + 1)
|
|
236
237
|
];
|
|
237
238
|
else {
|
|
238
|
-
const
|
|
239
|
-
this.sharedMessages.value =
|
|
239
|
+
const P = _[_.length - 1];
|
|
240
|
+
this.sharedMessages.value = P?.id === l ? [..._.slice(0, -1), m] : [..._, m];
|
|
240
241
|
}
|
|
241
|
-
|
|
242
|
-
}, "onMessage"),
|
|
242
|
+
m.sender === "system" && m.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : m.sender === "system" && m.issue?.code && Gn.has(m.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
|
|
243
|
+
}, "onMessage"), g = /* @__PURE__ */ p((m) => {
|
|
243
244
|
if (!o && !h) {
|
|
244
|
-
|
|
245
|
+
x("empty_stream — assistant returned no content");
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
let
|
|
250
|
-
for (const
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
}, "onDone"),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
...
|
|
265
|
-
...
|
|
248
|
+
const _ = this.sharedMessages.value, L = _[_.length - 1];
|
|
249
|
+
if (L?.id === l && L.sender === "agent" && L.text) {
|
|
250
|
+
let P = L.text;
|
|
251
|
+
for (const G of Vs)
|
|
252
|
+
G.pattern.test(P) && (console.debug(`[chat] filtered directive: ${G.label}`), P = P.replace(G.pattern, "").trim(), G.pattern.lastIndex = 0);
|
|
253
|
+
P ? P !== L.text && (L.text = P, this.sharedMessages.value = [..._]) : this.sharedMessages.value = _.slice(0, -1);
|
|
254
|
+
}
|
|
255
|
+
m && (this.conversationId = m), this.updateState(this.textState, { isThinking: !1, workingDescription: void 0 });
|
|
256
|
+
}, "onDone"), x = /* @__PURE__ */ p((m) => {
|
|
257
|
+
this.updateState(this.textState, { workingDescription: void 0 });
|
|
258
|
+
const _ = this.sharedMessages.value, L = _[_.length - 1];
|
|
259
|
+
if (L?.id === l && !L.text && (this.sharedMessages.value = _.slice(0, -1)), typeof m == "object" && m.code && m.error) {
|
|
260
|
+
const { bucket: q, actionUrl: K, actionLabel: U, help: Q } = m;
|
|
261
|
+
if (q !== void 0 || Xs.has(m.code)) {
|
|
262
|
+
const Se = q ?? (bs.has(m.code) ? "account" : "error"), Ce = {
|
|
263
|
+
code: m.code,
|
|
264
|
+
bucket: Se,
|
|
265
|
+
...U ? { actionLabel: U } : {},
|
|
266
|
+
...K ? { actionUrl: K } : {},
|
|
267
|
+
...Q ? { help: Q } : {}
|
|
266
268
|
};
|
|
267
|
-
this.addMessage(
|
|
269
|
+
this.addMessage(m.error, "system", void 0, Ce), Se === "account" ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "account" }) : Gn.has(m.code) ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "agent_deleted" }) : this.updateState(this.textState, { isThinking: !1 });
|
|
268
270
|
} else
|
|
269
|
-
this.handleError(new Error(
|
|
271
|
+
this.handleError(new Error(m.error));
|
|
270
272
|
return;
|
|
271
273
|
}
|
|
272
|
-
const
|
|
273
|
-
this.isTransientError(
|
|
274
|
-
}, "onError"),
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
const P = typeof m == "string" ? m : m.error, G = this.mapChatError(P);
|
|
275
|
+
this.isTransientError(P) ? (this.logger.warn("Chat turn failed (transient):", { raw: P, friendly: G }), this.addMessage(G, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(G), P);
|
|
276
|
+
}, "onError"), v = /* @__PURE__ */ p((m) => {
|
|
277
|
+
const _ = m.trim();
|
|
278
|
+
this.updateState(this.textState, { workingDescription: _ || void 0 });
|
|
279
|
+
}, "onStatus"), B = /* @__PURE__ */ p(() => {
|
|
280
|
+
this.updateState(this.textState, { workingDescription: void 0 });
|
|
281
|
+
}, "onWorkingEnd");
|
|
277
282
|
try {
|
|
278
|
-
const
|
|
283
|
+
const m = i ? i({
|
|
279
284
|
message: e,
|
|
280
285
|
attachments: n,
|
|
281
286
|
conversationId: this.conversationId,
|
|
282
287
|
history: this.buildHistory(),
|
|
283
288
|
onDelta: c,
|
|
284
|
-
onMessage:
|
|
285
|
-
onDone:
|
|
286
|
-
onError:
|
|
287
|
-
onStatus:
|
|
289
|
+
onMessage: y,
|
|
290
|
+
onDone: g,
|
|
291
|
+
onError: x,
|
|
292
|
+
onStatus: v,
|
|
293
|
+
onWorkingEnd: B
|
|
288
294
|
}) : s.chat.chatStreamPublic({
|
|
289
295
|
handle: this._agent.handle.value,
|
|
290
296
|
message: e,
|
|
@@ -292,17 +298,18 @@ Current User:
|
|
|
292
298
|
anonymousId: s.user.generateAnonId(),
|
|
293
299
|
context: this.getDynamicSettings().context || void 0,
|
|
294
300
|
onDelta: c,
|
|
295
|
-
onMessage:
|
|
296
|
-
onDone:
|
|
297
|
-
onError:
|
|
298
|
-
onStatus:
|
|
301
|
+
onMessage: y,
|
|
302
|
+
onDone: g,
|
|
303
|
+
onError: x,
|
|
304
|
+
onStatus: v,
|
|
305
|
+
onWorkingEnd: B
|
|
299
306
|
});
|
|
300
307
|
await Promise.race([
|
|
301
|
-
|
|
302
|
-
new Promise((
|
|
308
|
+
m,
|
|
309
|
+
new Promise((_, L) => setTimeout(() => L(new Error("timed out")), Zs))
|
|
303
310
|
]);
|
|
304
|
-
} catch (
|
|
305
|
-
|
|
311
|
+
} catch (m) {
|
|
312
|
+
x(m.message || "Something went wrong");
|
|
306
313
|
}
|
|
307
314
|
}
|
|
308
315
|
buildHistory() {
|
|
@@ -328,24 +335,24 @@ function qn(a) {
|
|
|
328
335
|
return a ? typeof a == "string" ? a : a.src || "" : "";
|
|
329
336
|
}
|
|
330
337
|
p(qn, "getImageSrc");
|
|
331
|
-
function
|
|
338
|
+
function ua(a) {
|
|
332
339
|
return qn(a.cover) || qn(a.avatar) || ms(a.name);
|
|
333
340
|
}
|
|
334
|
-
p(
|
|
341
|
+
p(ua, "getAgentAvatarUrl");
|
|
335
342
|
function Yn(a) {
|
|
336
343
|
const t = a.target;
|
|
337
344
|
t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = ms());
|
|
338
345
|
}
|
|
339
346
|
p(Yn, "handleImageError");
|
|
340
|
-
function
|
|
347
|
+
function ha(a) {
|
|
341
348
|
const { template: t, agent: e } = a;
|
|
342
349
|
return t.replace(/{name}/g, e.name || "Assistant").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
|
|
343
350
|
}
|
|
344
|
-
p(
|
|
345
|
-
const
|
|
351
|
+
p(ha, "parseButtonTemplate");
|
|
352
|
+
const Ks = {
|
|
346
353
|
key: 0,
|
|
347
354
|
class: "absolute inset-0 flex items-center justify-center"
|
|
348
|
-
},
|
|
355
|
+
}, da = /* @__PURE__ */ Te({
|
|
349
356
|
__name: "ElAgentButton",
|
|
350
357
|
props: {
|
|
351
358
|
theme: { default: "primary" },
|
|
@@ -370,27 +377,27 @@ const Qs = {
|
|
|
370
377
|
lg: "size-5"
|
|
371
378
|
})[a.size]);
|
|
372
379
|
return (i, s) => (T(), S("button", {
|
|
373
|
-
class:
|
|
380
|
+
class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
|
|
374
381
|
}, [
|
|
375
|
-
a.loading ? (T(), S("div",
|
|
376
|
-
|
|
377
|
-
])])) :
|
|
378
|
-
|
|
379
|
-
class:
|
|
382
|
+
a.loading ? (T(), S("div", Ks, [...s[0] || (s[0] = [
|
|
383
|
+
w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
|
|
384
|
+
])])) : Z("", !0),
|
|
385
|
+
w("span", {
|
|
386
|
+
class: A(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
|
|
380
387
|
}, [
|
|
381
388
|
a.icon ? (T(), S("i", {
|
|
382
389
|
key: 0,
|
|
383
|
-
class:
|
|
384
|
-
}, null, 2)) :
|
|
390
|
+
class: A([a.icon, n.value])
|
|
391
|
+
}, null, 2)) : Z("", !0),
|
|
385
392
|
on(i.$slots, "default"),
|
|
386
393
|
a.iconAfter ? (T(), S("i", {
|
|
387
394
|
key: 1,
|
|
388
|
-
class:
|
|
389
|
-
}, null, 2)) :
|
|
395
|
+
class: A([a.iconAfter, n.value])
|
|
396
|
+
}, null, 2)) : Z("", !0)
|
|
390
397
|
], 2)
|
|
391
398
|
], 2));
|
|
392
399
|
}
|
|
393
|
-
}),
|
|
400
|
+
}), Qs = ["value"], pa = /* @__PURE__ */ Te({
|
|
394
401
|
__name: "AgentInputEmail",
|
|
395
402
|
props: {
|
|
396
403
|
modelValue: { default: "" }
|
|
@@ -411,9 +418,9 @@ const Qs = {
|
|
|
411
418
|
class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
|
|
412
419
|
style: { "font-size": "16px" },
|
|
413
420
|
onInput: i[0] || (i[0] = (s) => e("update:modelValue", s.target.value))
|
|
414
|
-
}, null, 40,
|
|
421
|
+
}, null, 40, Qs));
|
|
415
422
|
}
|
|
416
|
-
}), Js = ["placeholder", "value"],
|
|
423
|
+
}), Js = ["placeholder", "value"], fa = /* @__PURE__ */ Te({
|
|
417
424
|
__name: "AgentInputOneTimeCode",
|
|
418
425
|
props: {
|
|
419
426
|
modelValue: {},
|
|
@@ -423,7 +430,7 @@ const Qs = {
|
|
|
423
430
|
emits: ["update:modelValue", "autoSubmit"],
|
|
424
431
|
setup(a, { emit: t }) {
|
|
425
432
|
const e = a, n = t, i = ie(null), s = j(() => "0".repeat(e.length));
|
|
426
|
-
|
|
433
|
+
Lt(() => {
|
|
427
434
|
e.focusFirst && !("ontouchstart" in window) && i.value?.focus();
|
|
428
435
|
});
|
|
429
436
|
function l(o) {
|
|
@@ -451,7 +458,7 @@ const Qs = {
|
|
|
451
458
|
}), ei = { class: "relative flex-shrink-0" }, ti = ["src", "alt"], ni = { class: "absolute top-1 right-1" }, si = {
|
|
452
459
|
key: 1,
|
|
453
460
|
class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
|
|
454
|
-
}, ii = { class: "min-w-0" }, ri = /* @__PURE__ */
|
|
461
|
+
}, ii = { class: "min-w-0" }, ri = /* @__PURE__ */ Te({
|
|
455
462
|
__name: "ElModeHeader",
|
|
456
463
|
props: {
|
|
457
464
|
agent: {},
|
|
@@ -461,15 +468,15 @@ const Qs = {
|
|
|
461
468
|
},
|
|
462
469
|
setup(a) {
|
|
463
470
|
return (t, e) => (T(), S("div", {
|
|
464
|
-
class:
|
|
471
|
+
class: A(["flex gap-4", [
|
|
465
472
|
a.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
|
|
466
473
|
]])
|
|
467
474
|
}, [
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
class:
|
|
475
|
+
w("div", ei, [
|
|
476
|
+
w("div", {
|
|
477
|
+
class: A(["rounded-full overflow-hidden border-white", a.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
|
|
471
478
|
}, [
|
|
472
|
-
|
|
479
|
+
w("img", {
|
|
473
480
|
src: a.agent.avatarUrl.value,
|
|
474
481
|
alt: a.agent.displayName.value,
|
|
475
482
|
class: "w-full h-full object-cover",
|
|
@@ -477,29 +484,29 @@ const Qs = {
|
|
|
477
484
|
(...n) => sn(Yn) && sn(Yn)(...n))
|
|
478
485
|
}, null, 40, ti)
|
|
479
486
|
], 2),
|
|
480
|
-
|
|
481
|
-
a.isOnline ? (T(), S(
|
|
482
|
-
e[1] || (e[1] =
|
|
487
|
+
w("div", ni, [
|
|
488
|
+
a.isOnline ? (T(), S(Xe, { key: 0 }, [
|
|
489
|
+
e[1] || (e[1] = w("div", {
|
|
483
490
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
484
491
|
style: { "animation-duration": "3s" }
|
|
485
492
|
}, null, -1)),
|
|
486
|
-
e[2] || (e[2] =
|
|
493
|
+
e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
|
|
487
494
|
], 64)) : (T(), S("div", si))
|
|
488
495
|
])
|
|
489
496
|
]),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
class:
|
|
497
|
+
w("div", ii, [
|
|
498
|
+
w("h1", {
|
|
499
|
+
class: A(["font-light text-white mb-1 truncate", [
|
|
493
500
|
a.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
|
|
494
501
|
a.layout === "horizontal" ? "text-white/95" : ""
|
|
495
502
|
]])
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
class:
|
|
503
|
+
}, le(a.agent.displayName.value), 3),
|
|
504
|
+
w("p", {
|
|
505
|
+
class: A(["font-light line-clamp-1", [
|
|
499
506
|
a.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
|
|
500
507
|
a.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
|
|
501
508
|
]])
|
|
502
|
-
},
|
|
509
|
+
}, le(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
|
|
503
510
|
])
|
|
504
511
|
], 2));
|
|
505
512
|
}
|
|
@@ -520,8 +527,8 @@ function li(a, t) {
|
|
|
520
527
|
var n, i, s, l, o = [], h = !0, c = !1;
|
|
521
528
|
try {
|
|
522
529
|
if (s = (e = e.call(a)).next, t !== 0) for (; !(h = (n = s.call(e)).done) && (o.push(n.value), o.length !== t); h = !0) ;
|
|
523
|
-
} catch (
|
|
524
|
-
c = !0, i =
|
|
530
|
+
} catch (y) {
|
|
531
|
+
c = !0, i = y;
|
|
525
532
|
} finally {
|
|
526
533
|
try {
|
|
527
534
|
if (!h && e.return != null && (l = e.return(), Object(l) !== l)) return;
|
|
@@ -550,8 +557,8 @@ function ui(a, t) {
|
|
|
550
557
|
}
|
|
551
558
|
}
|
|
552
559
|
p(ui, "_unsupportedIterableToArray");
|
|
553
|
-
const xs = Object.entries, Zn = Object.setPrototypeOf, hi = Object.isFrozen,
|
|
554
|
-
let re = Object.freeze, oe = Object.seal,
|
|
560
|
+
const xs = Object.entries, Zn = Object.setPrototypeOf, hi = Object.isFrozen, di = Object.getPrototypeOf, pi = Object.getOwnPropertyDescriptor;
|
|
561
|
+
let re = Object.freeze, oe = Object.seal, Ke = Object.create, ks = typeof Reflect < "u" && Reflect, rn = ks.apply, an = ks.construct;
|
|
555
562
|
re || (re = /* @__PURE__ */ p(function(t) {
|
|
556
563
|
return t;
|
|
557
564
|
}, "freeze"));
|
|
@@ -568,8 +575,8 @@ an || (an = /* @__PURE__ */ p(function(t) {
|
|
|
568
575
|
n[i - 1] = arguments[i];
|
|
569
576
|
return new t(...n);
|
|
570
577
|
}, "construct"));
|
|
571
|
-
const
|
|
572
|
-
function
|
|
578
|
+
const qe = X(Array.prototype.forEach), fi = X(Array.prototype.lastIndexOf), Xn = X(Array.prototype.pop), Ye = X(Array.prototype.push), gi = X(Array.prototype.splice), se = Array.isArray, dt = X(String.prototype.toLowerCase), Qt = X(String.prototype.toString), Kn = X(String.prototype.match), Ve = X(String.prototype.replace), Qn = X(String.prototype.indexOf), mi = X(String.prototype.trim), bi = X(Number.prototype.toString), xi = X(Boolean.prototype.toString), Jn = typeof BigInt > "u" ? null : X(BigInt.prototype.toString), es = typeof Symbol > "u" ? null : X(Symbol.prototype.toString), W = X(Object.prototype.hasOwnProperty), ct = X(Object.prototype.toString), ee = X(RegExp.prototype.test), ut = ki(TypeError);
|
|
579
|
+
function X(a) {
|
|
573
580
|
return function(t) {
|
|
574
581
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
575
582
|
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
@@ -577,7 +584,7 @@ function Y(a) {
|
|
|
577
584
|
return rn(a, t, n);
|
|
578
585
|
};
|
|
579
586
|
}
|
|
580
|
-
p(
|
|
587
|
+
p(X, "unapply");
|
|
581
588
|
function ki(a) {
|
|
582
589
|
return function() {
|
|
583
590
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
@@ -586,8 +593,8 @@ function ki(a) {
|
|
|
586
593
|
};
|
|
587
594
|
}
|
|
588
595
|
p(ki, "unconstruct");
|
|
589
|
-
function
|
|
590
|
-
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
596
|
+
function E(a, t) {
|
|
597
|
+
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : dt;
|
|
591
598
|
if (Zn && Zn(a, null), !se(t))
|
|
592
599
|
return a;
|
|
593
600
|
let n = t.length;
|
|
@@ -601,19 +608,19 @@ function R(a, t) {
|
|
|
601
608
|
}
|
|
602
609
|
return a;
|
|
603
610
|
}
|
|
604
|
-
p(
|
|
611
|
+
p(E, "addToSet");
|
|
605
612
|
function yi(a) {
|
|
606
613
|
for (let t = 0; t < a.length; t++)
|
|
607
|
-
|
|
614
|
+
W(a, t) || (a[t] = null);
|
|
608
615
|
return a;
|
|
609
616
|
}
|
|
610
617
|
p(yi, "cleanArray");
|
|
611
618
|
function te(a) {
|
|
612
|
-
const t =
|
|
619
|
+
const t = Ke(null);
|
|
613
620
|
for (const n of xs(a)) {
|
|
614
621
|
var e = ci(n, 2);
|
|
615
622
|
const i = e[0], s = e[1];
|
|
616
|
-
|
|
623
|
+
W(a, i) && (se(s) ? t[i] = yi(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = te(s) : t[i] = s);
|
|
617
624
|
}
|
|
618
625
|
return t;
|
|
619
626
|
}
|
|
@@ -631,55 +638,55 @@ function wi(a) {
|
|
|
631
638
|
case "symbol":
|
|
632
639
|
return es ? es(a) : "Symbol()";
|
|
633
640
|
case "undefined":
|
|
634
|
-
return
|
|
641
|
+
return ct(a);
|
|
635
642
|
case "function":
|
|
636
643
|
case "object": {
|
|
637
644
|
if (a === null)
|
|
638
|
-
return
|
|
639
|
-
const t = a, e =
|
|
645
|
+
return ct(a);
|
|
646
|
+
const t = a, e = ke(t, "toString");
|
|
640
647
|
if (typeof e == "function") {
|
|
641
648
|
const n = e(t);
|
|
642
|
-
return typeof n == "string" ? n :
|
|
649
|
+
return typeof n == "string" ? n : ct(n);
|
|
643
650
|
}
|
|
644
|
-
return
|
|
651
|
+
return ct(a);
|
|
645
652
|
}
|
|
646
653
|
default:
|
|
647
|
-
return
|
|
654
|
+
return ct(a);
|
|
648
655
|
}
|
|
649
656
|
}
|
|
650
657
|
p(wi, "stringifyValue");
|
|
651
|
-
function
|
|
658
|
+
function ke(a, t) {
|
|
652
659
|
for (; a !== null; ) {
|
|
653
|
-
const n =
|
|
660
|
+
const n = pi(a, t);
|
|
654
661
|
if (n) {
|
|
655
662
|
if (n.get)
|
|
656
|
-
return
|
|
663
|
+
return X(n.get);
|
|
657
664
|
if (typeof n.value == "function")
|
|
658
|
-
return
|
|
665
|
+
return X(n.value);
|
|
659
666
|
}
|
|
660
|
-
a =
|
|
667
|
+
a = di(a);
|
|
661
668
|
}
|
|
662
669
|
function e() {
|
|
663
670
|
return null;
|
|
664
671
|
}
|
|
665
672
|
return p(e, "fallbackValue"), e;
|
|
666
673
|
}
|
|
667
|
-
p(
|
|
674
|
+
p(ke, "lookupGetter");
|
|
668
675
|
function vi(a) {
|
|
669
676
|
try {
|
|
670
|
-
return
|
|
677
|
+
return ee(a, ""), !0;
|
|
671
678
|
} catch {
|
|
672
679
|
return !1;
|
|
673
680
|
}
|
|
674
681
|
}
|
|
675
682
|
p(vi, "isRegex");
|
|
676
|
-
const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Jt = re(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), en = re(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ti = re(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), tn = re(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Si = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ns = re(["#text"]), ss = re(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), nn = re(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), is = re(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]),
|
|
683
|
+
const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Jt = re(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), en = re(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ti = re(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), tn = re(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Si = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ns = re(["#text"]), ss = re(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), nn = re(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), is = re(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Et = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ai = oe(/{{[\w\W]*|^[\w\W]*}}/g), Ei = oe(/<%[\w\W]*|^[\w\W]*%>/g), _i = oe(/\${[\w\W]*/g), Ri = oe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ii = oe(/^aria-[\-\w]+$/), rs = oe(
|
|
677
684
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
678
685
|
// eslint-disable-line no-useless-escape
|
|
679
|
-
),
|
|
686
|
+
), Di = oe(/^(?:\w+script|data):/i), Ci = oe(
|
|
680
687
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
681
688
|
// eslint-disable-line no-control-regex
|
|
682
|
-
), Oi = oe(/^html$/i), Mi = oe(/^[a-z][.\w]*(-[.\w]+)+$/i),
|
|
689
|
+
), Oi = oe(/^html$/i), Mi = oe(/^[a-z][.\w]*(-[.\w]+)+$/i), xe = {
|
|
683
690
|
element: 1,
|
|
684
691
|
attribute: 2,
|
|
685
692
|
text: 3,
|
|
@@ -731,29 +738,29 @@ const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
731
738
|
}, "_createHooksMap");
|
|
732
739
|
function ys() {
|
|
733
740
|
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Li();
|
|
734
|
-
const t = /* @__PURE__ */ p((
|
|
735
|
-
if (t.version = "3.4.7", t.removed = [], !a || !a.document || a.document.nodeType !==
|
|
741
|
+
const t = /* @__PURE__ */ p((k) => ys(k), "DOMPurify");
|
|
742
|
+
if (t.version = "3.4.7", t.removed = [], !a || !a.document || a.document.nodeType !== xe.document || !a.Element)
|
|
736
743
|
return t.isSupported = !1, t;
|
|
737
744
|
let e = a.document;
|
|
738
745
|
const n = e, i = n.currentScript;
|
|
739
746
|
a.DocumentFragment;
|
|
740
747
|
const s = a.HTMLTemplateElement, l = a.Node, o = a.Element, h = a.NodeFilter, c = a.NamedNodeMap;
|
|
741
748
|
c === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
|
|
742
|
-
const
|
|
749
|
+
const y = a.DOMParser, g = a.trustedTypes, x = o.prototype, v = ke(x, "cloneNode"), B = ke(x, "remove"), m = ke(x, "nextSibling"), _ = ke(x, "childNodes"), L = ke(x, "parentNode"), P = ke(x, "shadowRoot"), G = ke(x, "attributes"), q = l && l.prototype ? ke(l.prototype, "nodeType") : null, K = l && l.prototype ? ke(l.prototype, "nodeName") : null;
|
|
743
750
|
if (typeof s == "function") {
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
}
|
|
747
|
-
let
|
|
748
|
-
const
|
|
749
|
-
let
|
|
750
|
-
t.isSupported = typeof xs == "function" && typeof
|
|
751
|
-
const
|
|
752
|
-
let
|
|
753
|
-
const
|
|
754
|
-
let
|
|
755
|
-
const
|
|
756
|
-
let
|
|
751
|
+
const k = e.createElement("template");
|
|
752
|
+
k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
|
|
753
|
+
}
|
|
754
|
+
let U, Q = "";
|
|
755
|
+
const pe = e, Se = pe.implementation, Ce = pe.createNodeIterator, O = pe.createDocumentFragment, gt = pe.getElementsByTagName, st = n.importNode;
|
|
756
|
+
let Y = as();
|
|
757
|
+
t.isSupported = typeof xs == "function" && typeof L == "function" && Se && Se.createHTMLDocument !== void 0;
|
|
758
|
+
const $e = Ai, Pe = Ei, Be = _i, $t = Ri, Pt = Ii, mt = Di, it = Ci, R = Mi;
|
|
759
|
+
let b = rs, d = null;
|
|
760
|
+
const $ = E({}, [...ts, ...Jt, ...en, ...tn, ...ns]);
|
|
761
|
+
let C = null;
|
|
762
|
+
const fe = E({}, [...ss, ...nn, ...is, ...Et]);
|
|
763
|
+
let H = Object.seal(Ke(null, {
|
|
757
764
|
tagNameCheck: {
|
|
758
765
|
writable: !0,
|
|
759
766
|
configurable: !1,
|
|
@@ -772,8 +779,8 @@ function ys() {
|
|
|
772
779
|
enumerable: !0,
|
|
773
780
|
value: !1
|
|
774
781
|
}
|
|
775
|
-
})),
|
|
776
|
-
const
|
|
782
|
+
})), we = null, bt = null;
|
|
783
|
+
const Ae = Object.seal(Ke(null, {
|
|
777
784
|
tagCheck: {
|
|
778
785
|
writable: !0,
|
|
779
786
|
configurable: !1,
|
|
@@ -787,70 +794,70 @@ function ys() {
|
|
|
787
794
|
value: null
|
|
788
795
|
}
|
|
789
796
|
}));
|
|
790
|
-
let kn = !0, Bt = !0, yn = !1, wn = !0,
|
|
797
|
+
let kn = !0, Bt = !0, yn = !1, wn = !0, Ee = !1, rt = !0, Oe = !1, Ft = !1, Ut = !1, Fe = !1, xt = !1, kt = !1, vn = !0, Tn = !1;
|
|
791
798
|
const Sn = "user-content-";
|
|
792
|
-
let Ht = !0,
|
|
793
|
-
const jt =
|
|
799
|
+
let Ht = !0, at = !1, Ue = {}, ge = null;
|
|
800
|
+
const jt = E({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
794
801
|
let An = null;
|
|
795
|
-
const En =
|
|
802
|
+
const En = E({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
796
803
|
let Gt = null;
|
|
797
|
-
const _n =
|
|
798
|
-
let
|
|
799
|
-
const
|
|
800
|
-
let Yt =
|
|
801
|
-
const Os =
|
|
802
|
-
let
|
|
804
|
+
const _n = E({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), yt = "http://www.w3.org/1998/Math/MathML", wt = "http://www.w3.org/2000/svg", me = "http://www.w3.org/1999/xhtml";
|
|
805
|
+
let He = me, Wt = !1, qt = null;
|
|
806
|
+
const Cs = E({}, [yt, wt, me], Qt);
|
|
807
|
+
let Yt = E({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = E({}, ["annotation-xml"]);
|
|
808
|
+
const Os = E({}, ["title", "style", "font", "a", "script"]);
|
|
809
|
+
let lt = null;
|
|
803
810
|
const Ms = ["application/xhtml+xml", "text/html"], Ls = "text/html";
|
|
804
|
-
let
|
|
811
|
+
let V = null, je = null;
|
|
805
812
|
const Ns = e.createElement("form"), Rn = /* @__PURE__ */ p(function(r) {
|
|
806
813
|
return r instanceof RegExp || r instanceof Function;
|
|
807
814
|
}, "isRegexOrFunction"), Zt = /* @__PURE__ */ p(function() {
|
|
808
815
|
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
809
|
-
if (
|
|
816
|
+
if (je && je === r)
|
|
810
817
|
return;
|
|
811
|
-
(!r || typeof r != "object") && (r = {}), r = te(r),
|
|
812
|
-
Ms.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? Ls : r.PARSER_MEDIA_TYPE,
|
|
813
|
-
const u =
|
|
814
|
-
if (
|
|
818
|
+
(!r || typeof r != "object") && (r = {}), r = te(r), lt = // eslint-disable-next-line unicorn/prefer-includes
|
|
819
|
+
Ms.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? Ls : r.PARSER_MEDIA_TYPE, V = lt === "application/xhtml+xml" ? Qt : dt, d = W(r, "ALLOWED_TAGS") && se(r.ALLOWED_TAGS) ? E({}, r.ALLOWED_TAGS, V) : $, C = W(r, "ALLOWED_ATTR") && se(r.ALLOWED_ATTR) ? E({}, r.ALLOWED_ATTR, V) : fe, qt = W(r, "ALLOWED_NAMESPACES") && se(r.ALLOWED_NAMESPACES) ? E({}, r.ALLOWED_NAMESPACES, Qt) : Cs, Gt = W(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) ? E(te(_n), r.ADD_URI_SAFE_ATTR, V) : _n, An = W(r, "ADD_DATA_URI_TAGS") && se(r.ADD_DATA_URI_TAGS) ? E(te(En), r.ADD_DATA_URI_TAGS, V) : En, ge = W(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) ? E({}, r.FORBID_CONTENTS, V) : jt, we = W(r, "FORBID_TAGS") && se(r.FORBID_TAGS) ? E({}, r.FORBID_TAGS, V) : te({}), bt = W(r, "FORBID_ATTR") && se(r.FORBID_ATTR) ? E({}, r.FORBID_ATTR, V) : te({}), Ue = W(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? te(r.USE_PROFILES) : r.USE_PROFILES : !1, kn = r.ALLOW_ARIA_ATTR !== !1, Bt = r.ALLOW_DATA_ATTR !== !1, yn = r.ALLOW_UNKNOWN_PROTOCOLS || !1, wn = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ee = r.SAFE_FOR_TEMPLATES || !1, rt = r.SAFE_FOR_XML !== !1, Oe = r.WHOLE_DOCUMENT || !1, Fe = r.RETURN_DOM || !1, xt = r.RETURN_DOM_FRAGMENT || !1, kt = r.RETURN_TRUSTED_TYPE || !1, Ut = r.FORCE_BODY || !1, vn = r.SANITIZE_DOM !== !1, Tn = r.SANITIZE_NAMED_PROPS || !1, Ht = r.KEEP_CONTENT !== !1, at = r.IN_PLACE || !1, b = vi(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : rs, He = typeof r.NAMESPACE == "string" ? r.NAMESPACE : me, Yt = W(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? te(r.MATHML_TEXT_INTEGRATION_POINTS) : E({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = W(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? te(r.HTML_INTEGRATION_POINTS) : E({}, ["annotation-xml"]);
|
|
820
|
+
const u = W(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? te(r.CUSTOM_ELEMENT_HANDLING) : Ke(null);
|
|
821
|
+
if (H = Ke(null), W(u, "tagNameCheck") && Rn(u.tagNameCheck) && (H.tagNameCheck = u.tagNameCheck), W(u, "attributeNameCheck") && Rn(u.attributeNameCheck) && (H.attributeNameCheck = u.attributeNameCheck), W(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), Ee && (Bt = !1), xt && (Fe = !0), Ue && (d = E({}, ns), C = Ke(null), Ue.html === !0 && (E(d, ts), E(C, ss)), Ue.svg === !0 && (E(d, Jt), E(C, nn), E(C, Et)), Ue.svgFilters === !0 && (E(d, en), E(C, nn), E(C, Et)), Ue.mathMl === !0 && (E(d, tn), E(C, is), E(C, Et))), Ae.tagCheck = null, Ae.attributeCheck = null, W(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? Ae.tagCheck = r.ADD_TAGS : se(r.ADD_TAGS) && (d === $ && (d = te(d)), E(d, r.ADD_TAGS, V))), W(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? Ae.attributeCheck = r.ADD_ATTR : se(r.ADD_ATTR) && (C === fe && (C = te(C)), E(C, r.ADD_ATTR, V))), W(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) && E(Gt, r.ADD_URI_SAFE_ATTR, V), W(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) && (ge === jt && (ge = te(ge)), E(ge, r.FORBID_CONTENTS, V)), W(r, "ADD_FORBID_CONTENTS") && se(r.ADD_FORBID_CONTENTS) && (ge === jt && (ge = te(ge)), E(ge, r.ADD_FORBID_CONTENTS, V)), Ht && (d["#text"] = !0), Oe && E(d, ["html", "head", "body"]), d.table && (E(d, ["tbody"]), delete we.tbody), r.TRUSTED_TYPES_POLICY) {
|
|
815
822
|
if (typeof r.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
816
|
-
throw
|
|
823
|
+
throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
817
824
|
if (typeof r.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
818
|
-
throw
|
|
819
|
-
|
|
825
|
+
throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
826
|
+
U = r.TRUSTED_TYPES_POLICY, Q = U.createHTML("");
|
|
820
827
|
} else
|
|
821
|
-
|
|
822
|
-
(
|
|
823
|
-
}, "_parseConfig"), In =
|
|
824
|
-
let u =
|
|
828
|
+
U === void 0 && (U = Ni(g, i)), U !== null && typeof Q == "string" && (Q = U.createHTML(""));
|
|
829
|
+
(Y.uponSanitizeElement.length > 0 || Y.uponSanitizeAttribute.length > 0) && d === $ && (d = te(d)), Y.uponSanitizeAttribute.length > 0 && C === fe && (C = te(C)), re && re(r), je = r;
|
|
830
|
+
}, "_parseConfig"), In = E({}, [...Jt, ...en, ...Ti]), Dn = E({}, [...tn, ...Si]), zs = /* @__PURE__ */ p(function(r) {
|
|
831
|
+
let u = L(r);
|
|
825
832
|
(!u || !u.tagName) && (u = {
|
|
826
|
-
namespaceURI:
|
|
833
|
+
namespaceURI: He,
|
|
827
834
|
tagName: "template"
|
|
828
835
|
});
|
|
829
|
-
const
|
|
830
|
-
return qt[r.namespaceURI] ? r.namespaceURI ===
|
|
836
|
+
const f = dt(r.tagName), z = dt(u.tagName);
|
|
837
|
+
return qt[r.namespaceURI] ? r.namespaceURI === wt ? u.namespaceURI === me ? f === "svg" : u.namespaceURI === yt ? f === "svg" && (z === "annotation-xml" || Yt[z]) : !!In[f] : r.namespaceURI === yt ? u.namespaceURI === me ? f === "math" : u.namespaceURI === wt ? f === "math" && Vt[z] : !!Dn[f] : r.namespaceURI === me ? u.namespaceURI === wt && !Vt[z] || u.namespaceURI === yt && !Yt[z] ? !1 : !Dn[f] && (Os[f] || !In[f]) : !!(lt === "application/xhtml+xml" && qt[r.namespaceURI]) : !1;
|
|
831
838
|
}, "_checkValidNamespace"), ce = /* @__PURE__ */ p(function(r) {
|
|
832
|
-
|
|
839
|
+
Ye(t.removed, {
|
|
833
840
|
element: r
|
|
834
841
|
});
|
|
835
842
|
try {
|
|
836
|
-
|
|
843
|
+
L(r).removeChild(r);
|
|
837
844
|
} catch {
|
|
838
|
-
|
|
845
|
+
B(r);
|
|
839
846
|
}
|
|
840
|
-
}, "_forceRemove"),
|
|
847
|
+
}, "_forceRemove"), Me = /* @__PURE__ */ p(function(r, u) {
|
|
841
848
|
try {
|
|
842
|
-
|
|
849
|
+
Ye(t.removed, {
|
|
843
850
|
attribute: u.getAttributeNode(r),
|
|
844
851
|
from: u
|
|
845
852
|
});
|
|
846
853
|
} catch {
|
|
847
|
-
|
|
854
|
+
Ye(t.removed, {
|
|
848
855
|
attribute: null,
|
|
849
856
|
from: u
|
|
850
857
|
});
|
|
851
858
|
}
|
|
852
859
|
if (u.removeAttribute(r), r === "is")
|
|
853
|
-
if (
|
|
860
|
+
if (Fe || xt)
|
|
854
861
|
try {
|
|
855
862
|
ce(u);
|
|
856
863
|
} catch {
|
|
@@ -860,32 +867,32 @@ function ys() {
|
|
|
860
867
|
u.setAttribute(r, "");
|
|
861
868
|
} catch {
|
|
862
869
|
}
|
|
863
|
-
}, "_removeAttribute"),
|
|
864
|
-
let u = null,
|
|
870
|
+
}, "_removeAttribute"), Cn = /* @__PURE__ */ p(function(r) {
|
|
871
|
+
let u = null, f = null;
|
|
865
872
|
if (Ut)
|
|
866
873
|
r = "<remove></remove>" + r;
|
|
867
874
|
else {
|
|
868
|
-
const
|
|
869
|
-
|
|
875
|
+
const F = Kn(r, /^[\r\n\t ]+/);
|
|
876
|
+
f = F && F[0];
|
|
870
877
|
}
|
|
871
|
-
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
878
|
+
lt === "application/xhtml+xml" && He === me && (r = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + r + "</body></html>");
|
|
879
|
+
const z = U ? U.createHTML(r) : r;
|
|
880
|
+
if (He === me)
|
|
874
881
|
try {
|
|
875
|
-
u = new
|
|
882
|
+
u = new y().parseFromString(z, lt);
|
|
876
883
|
} catch {
|
|
877
884
|
}
|
|
878
885
|
if (!u || !u.documentElement) {
|
|
879
|
-
u =
|
|
886
|
+
u = Se.createDocument(He, "template", null);
|
|
880
887
|
try {
|
|
881
|
-
u.documentElement.innerHTML = Wt ?
|
|
888
|
+
u.documentElement.innerHTML = Wt ? Q : z;
|
|
882
889
|
} catch {
|
|
883
890
|
}
|
|
884
891
|
}
|
|
885
|
-
const
|
|
886
|
-
return r &&
|
|
892
|
+
const I = u.body || u.documentElement;
|
|
893
|
+
return r && f && I.insertBefore(e.createTextNode(f), I.childNodes[0] || null), He === me ? gt.call(u, Oe ? "html" : "body")[0] : Oe ? u.documentElement : I;
|
|
887
894
|
}, "_initDocument"), On = /* @__PURE__ */ p(function(r) {
|
|
888
|
-
return
|
|
895
|
+
return Ce.call(
|
|
889
896
|
r.ownerDocument || r,
|
|
890
897
|
r,
|
|
891
898
|
// eslint-disable-next-line no-bitwise
|
|
@@ -894,35 +901,35 @@ function ys() {
|
|
|
894
901
|
);
|
|
895
902
|
}, "_createNodeIterator"), Mn = /* @__PURE__ */ p(function(r) {
|
|
896
903
|
r.normalize();
|
|
897
|
-
const u =
|
|
904
|
+
const u = Ce.call(
|
|
898
905
|
r.ownerDocument || r,
|
|
899
906
|
r,
|
|
900
907
|
// eslint-disable-next-line no-bitwise
|
|
901
908
|
h.SHOW_TEXT | h.SHOW_COMMENT | h.SHOW_CDATA_SECTION | h.SHOW_PROCESSING_INSTRUCTION,
|
|
902
909
|
null
|
|
903
910
|
);
|
|
904
|
-
let
|
|
905
|
-
for (;
|
|
906
|
-
let
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
}),
|
|
910
|
-
}
|
|
911
|
-
}, "_scrubTemplateExpressions"),
|
|
912
|
-
const u =
|
|
913
|
-
return typeof u != "string" ||
|
|
911
|
+
let f = u.nextNode();
|
|
912
|
+
for (; f; ) {
|
|
913
|
+
let z = f.data;
|
|
914
|
+
qe([$e, Pe, Be], (I) => {
|
|
915
|
+
z = Ve(z, I, " ");
|
|
916
|
+
}), f.data = z, f = u.nextNode();
|
|
917
|
+
}
|
|
918
|
+
}, "_scrubTemplateExpressions"), vt = /* @__PURE__ */ p(function(r) {
|
|
919
|
+
const u = K ? K(r) : null;
|
|
920
|
+
return typeof u != "string" || V(u) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
914
921
|
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
915
922
|
// makes the direct read diverge from the cached read; a clean form
|
|
916
923
|
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
917
924
|
// canonical NamedNodeMap.
|
|
918
|
-
r.attributes !==
|
|
925
|
+
r.attributes !== G(r) || typeof r.removeAttribute != "function" || typeof r.setAttribute != "function" || typeof r.namespaceURI != "string" || typeof r.insertBefore != "function" || typeof r.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
919
926
|
// returns the integer 1 for any Element regardless of realm; direct
|
|
920
927
|
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
921
928
|
// the named child element. Cheap addition — nodeType is read from
|
|
922
929
|
// an internal slot, no serialization cost — and removes a residual
|
|
923
930
|
// clobbering surface used by several mXSS / PI / comment branches
|
|
924
931
|
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
925
|
-
r.nodeType !==
|
|
932
|
+
r.nodeType !== q(r) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
926
933
|
// "childNodes" shadows the prototype getter. Direct reads of
|
|
927
934
|
// form.childNodes from a clobbered form return the named child
|
|
928
935
|
// instead of the real NodeList, so any walk that reads it directly
|
|
@@ -933,80 +940,80 @@ function ys() {
|
|
|
933
940
|
// select, etc.) regardless of whether the named child happens to
|
|
934
941
|
// carry a numeric .length, which a typeof-based probe would miss
|
|
935
942
|
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
936
|
-
r.childNodes !==
|
|
937
|
-
}, "_isClobbered"),
|
|
938
|
-
if (!
|
|
943
|
+
r.childNodes !== _(r);
|
|
944
|
+
}, "_isClobbered"), ot = /* @__PURE__ */ p(function(r) {
|
|
945
|
+
if (!q || typeof r != "object" || r === null)
|
|
939
946
|
return !1;
|
|
940
947
|
try {
|
|
941
|
-
return
|
|
948
|
+
return q(r) === xe.documentFragment;
|
|
942
949
|
} catch {
|
|
943
950
|
return !1;
|
|
944
951
|
}
|
|
945
|
-
}, "_isDocumentFragment"),
|
|
946
|
-
if (!
|
|
952
|
+
}, "_isDocumentFragment"), Tt = /* @__PURE__ */ p(function(r) {
|
|
953
|
+
if (!q || typeof r != "object" || r === null)
|
|
947
954
|
return !1;
|
|
948
955
|
try {
|
|
949
|
-
return typeof
|
|
956
|
+
return typeof q(r) == "number";
|
|
950
957
|
} catch {
|
|
951
958
|
return !1;
|
|
952
959
|
}
|
|
953
960
|
}, "_isNode");
|
|
954
|
-
function
|
|
955
|
-
|
|
956
|
-
|
|
961
|
+
function ve(k, r, u) {
|
|
962
|
+
qe(k, (f) => {
|
|
963
|
+
f.call(t, r, u, je);
|
|
957
964
|
});
|
|
958
965
|
}
|
|
959
|
-
p(
|
|
966
|
+
p(ve, "_executeHooks");
|
|
960
967
|
const Ln = /* @__PURE__ */ p(function(r) {
|
|
961
968
|
let u = null;
|
|
962
|
-
if (
|
|
969
|
+
if (ve(Y.beforeSanitizeElements, r, null), vt(r))
|
|
963
970
|
return ce(r), !0;
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
-
tagName:
|
|
967
|
-
allowedTags:
|
|
968
|
-
}),
|
|
971
|
+
const f = V(r.nodeName);
|
|
972
|
+
if (ve(Y.uponSanitizeElement, r, {
|
|
973
|
+
tagName: f,
|
|
974
|
+
allowedTags: d
|
|
975
|
+
}), rt && r.hasChildNodes() && !Tt(r.firstElementChild) && ee(/<[/\w!]/g, r.innerHTML) && ee(/<[/\w!]/g, r.textContent) || rt && r.namespaceURI === me && f === "style" && Tt(r.firstElementChild) || r.nodeType === xe.progressingInstruction || rt && r.nodeType === xe.comment && ee(/<[/\w]/g, r.data))
|
|
969
976
|
return ce(r), !0;
|
|
970
|
-
if (
|
|
971
|
-
if (!
|
|
977
|
+
if (we[f] || !(Ae.tagCheck instanceof Function && Ae.tagCheck(f)) && !d[f]) {
|
|
978
|
+
if (!we[f] && zn(f) && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, f) || H.tagNameCheck instanceof Function && H.tagNameCheck(f)))
|
|
972
979
|
return !1;
|
|
973
|
-
if (Ht && !
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
976
|
-
const
|
|
977
|
-
for (let
|
|
978
|
-
const ue =
|
|
979
|
-
|
|
980
|
+
if (Ht && !ge[f]) {
|
|
981
|
+
const I = L(r), F = _(r);
|
|
982
|
+
if (F && I) {
|
|
983
|
+
const ae = F.length;
|
|
984
|
+
for (let be = ae - 1; be >= 0; --be) {
|
|
985
|
+
const ue = v(F[be], !0);
|
|
986
|
+
I.insertBefore(ue, m(r));
|
|
980
987
|
}
|
|
981
988
|
}
|
|
982
989
|
}
|
|
983
990
|
return ce(r), !0;
|
|
984
991
|
}
|
|
985
|
-
return (
|
|
986
|
-
u =
|
|
987
|
-
}), r.textContent !== u && (
|
|
992
|
+
return (q ? q(r) : r.nodeType) === xe.element && !zs(r) || (f === "noscript" || f === "noembed" || f === "noframes") && ee(/<\/no(script|embed|frames)/i, r.innerHTML) ? (ce(r), !0) : (Ee && r.nodeType === xe.text && (u = r.textContent, qe([$e, Pe, Be], (I) => {
|
|
993
|
+
u = Ve(u, I, " ");
|
|
994
|
+
}), r.textContent !== u && (Ye(t.removed, {
|
|
988
995
|
element: r.cloneNode()
|
|
989
|
-
}), r.textContent = u)),
|
|
990
|
-
}, "_sanitizeElements"), Nn = /* @__PURE__ */ p(function(r, u,
|
|
991
|
-
if (
|
|
996
|
+
}), r.textContent = u)), ve(Y.afterSanitizeElements, r, null), !1);
|
|
997
|
+
}, "_sanitizeElements"), Nn = /* @__PURE__ */ p(function(r, u, f) {
|
|
998
|
+
if (bt[u] || vn && (u === "id" || u === "name") && (f in e || f in Ns))
|
|
992
999
|
return !1;
|
|
993
|
-
const
|
|
994
|
-
if (!(Bt && !
|
|
995
|
-
if (!(kn &&
|
|
996
|
-
if (
|
|
1000
|
+
const z = C[u] || Ae.attributeCheck instanceof Function && Ae.attributeCheck(u, r);
|
|
1001
|
+
if (!(Bt && !bt[u] && ee($t, u))) {
|
|
1002
|
+
if (!(kn && ee(Pt, u))) {
|
|
1003
|
+
if (!z || bt[u]) {
|
|
997
1004
|
if (
|
|
998
1005
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
999
1006
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1000
1007
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1001
|
-
!(zn(r) && (
|
|
1008
|
+
!(zn(r) && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)) && (H.attributeNameCheck instanceof RegExp && ee(H.attributeNameCheck, u) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(u, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1002
1009
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1003
|
-
u === "is" &&
|
|
1010
|
+
u === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, f) || H.tagNameCheck instanceof Function && H.tagNameCheck(f)))
|
|
1004
1011
|
) return !1;
|
|
1005
1012
|
} else if (!Gt[u]) {
|
|
1006
|
-
if (!
|
|
1007
|
-
if (!((u === "src" || u === "xlink:href" || u === "href") && r !== "script" &&
|
|
1008
|
-
if (!(yn && !
|
|
1009
|
-
if (
|
|
1013
|
+
if (!ee(b, Ve(f, it, ""))) {
|
|
1014
|
+
if (!((u === "src" || u === "xlink:href" || u === "href") && r !== "script" && Qn(f, "data:") === 0 && An[r])) {
|
|
1015
|
+
if (!(yn && !ee(mt, Ve(f, it, "")))) {
|
|
1016
|
+
if (f)
|
|
1010
1017
|
return !1;
|
|
1011
1018
|
}
|
|
1012
1019
|
}
|
|
@@ -1015,166 +1022,166 @@ function ys() {
|
|
|
1015
1022
|
}
|
|
1016
1023
|
}
|
|
1017
1024
|
return !0;
|
|
1018
|
-
}, "_isValidAttribute"), $s =
|
|
1019
|
-
return !$s[
|
|
1025
|
+
}, "_isValidAttribute"), $s = E({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), zn = /* @__PURE__ */ p(function(r) {
|
|
1026
|
+
return !$s[dt(r)] && ee(R, r);
|
|
1020
1027
|
}, "_isBasicCustomElement"), $n = /* @__PURE__ */ p(function(r) {
|
|
1021
|
-
|
|
1028
|
+
ve(Y.beforeSanitizeAttributes, r, null);
|
|
1022
1029
|
const u = r.attributes;
|
|
1023
|
-
if (!u ||
|
|
1030
|
+
if (!u || vt(r))
|
|
1024
1031
|
return;
|
|
1025
|
-
const
|
|
1032
|
+
const f = {
|
|
1026
1033
|
attrName: "",
|
|
1027
1034
|
attrValue: "",
|
|
1028
1035
|
keepAttr: !0,
|
|
1029
|
-
allowedAttributes:
|
|
1036
|
+
allowedAttributes: C,
|
|
1030
1037
|
forceKeepAttr: void 0
|
|
1031
1038
|
};
|
|
1032
|
-
let
|
|
1033
|
-
for (;
|
|
1034
|
-
const
|
|
1035
|
-
let
|
|
1036
|
-
if (
|
|
1037
|
-
|
|
1039
|
+
let z = u.length;
|
|
1040
|
+
for (; z--; ) {
|
|
1041
|
+
const I = u[z], F = I.name, ae = I.namespaceURI, be = I.value, ue = V(F), Xt = be;
|
|
1042
|
+
let J = F === "value" ? Xt : mi(Xt);
|
|
1043
|
+
if (f.attrName = ue, f.attrValue = J, f.keepAttr = !0, f.forceKeepAttr = void 0, ve(Y.uponSanitizeAttribute, r, f), J = f.attrValue, Tn && (ue === "id" || ue === "name") && Qn(J, Sn) !== 0 && (Me(F, r), J = Sn + J), rt && ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, J)) {
|
|
1044
|
+
Me(F, r);
|
|
1038
1045
|
continue;
|
|
1039
1046
|
}
|
|
1040
|
-
if (ue === "attributename" &&
|
|
1041
|
-
|
|
1047
|
+
if (ue === "attributename" && Kn(J, "href")) {
|
|
1048
|
+
Me(F, r);
|
|
1042
1049
|
continue;
|
|
1043
1050
|
}
|
|
1044
|
-
if (
|
|
1051
|
+
if (f.forceKeepAttr)
|
|
1045
1052
|
continue;
|
|
1046
|
-
if (!
|
|
1047
|
-
|
|
1053
|
+
if (!f.keepAttr) {
|
|
1054
|
+
Me(F, r);
|
|
1048
1055
|
continue;
|
|
1049
1056
|
}
|
|
1050
|
-
if (!wn &&
|
|
1051
|
-
|
|
1057
|
+
if (!wn && ee(/\/>/i, J)) {
|
|
1058
|
+
Me(F, r);
|
|
1052
1059
|
continue;
|
|
1053
1060
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1061
|
+
Ee && qe([$e, Pe, Be], (Bn) => {
|
|
1062
|
+
J = Ve(J, Bn, " ");
|
|
1056
1063
|
});
|
|
1057
|
-
const Pn =
|
|
1058
|
-
if (!Nn(Pn, ue,
|
|
1059
|
-
|
|
1064
|
+
const Pn = V(r.nodeName);
|
|
1065
|
+
if (!Nn(Pn, ue, J)) {
|
|
1066
|
+
Me(F, r);
|
|
1060
1067
|
continue;
|
|
1061
1068
|
}
|
|
1062
|
-
if (
|
|
1063
|
-
switch (
|
|
1069
|
+
if (U && typeof g == "object" && typeof g.getAttributeType == "function" && !ae)
|
|
1070
|
+
switch (g.getAttributeType(Pn, ue)) {
|
|
1064
1071
|
case "TrustedHTML": {
|
|
1065
|
-
|
|
1072
|
+
J = U.createHTML(J);
|
|
1066
1073
|
break;
|
|
1067
1074
|
}
|
|
1068
1075
|
case "TrustedScriptURL": {
|
|
1069
|
-
|
|
1076
|
+
J = U.createScriptURL(J);
|
|
1070
1077
|
break;
|
|
1071
1078
|
}
|
|
1072
1079
|
}
|
|
1073
|
-
if (
|
|
1080
|
+
if (J !== Xt)
|
|
1074
1081
|
try {
|
|
1075
|
-
|
|
1082
|
+
ae ? r.setAttributeNS(ae, F, J) : r.setAttribute(F, J), vt(r) ? ce(r) : Xn(t.removed);
|
|
1076
1083
|
} catch {
|
|
1077
|
-
|
|
1084
|
+
Me(F, r);
|
|
1078
1085
|
}
|
|
1079
1086
|
}
|
|
1080
|
-
|
|
1081
|
-
}, "_sanitizeAttributes"),
|
|
1087
|
+
ve(Y.afterSanitizeAttributes, r, null);
|
|
1088
|
+
}, "_sanitizeAttributes"), St = /* @__PURE__ */ p(function(r) {
|
|
1082
1089
|
let u = null;
|
|
1083
|
-
const
|
|
1084
|
-
for (
|
|
1085
|
-
if (
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
}, "_sanitizeShadowDOM"),
|
|
1091
|
-
const u =
|
|
1092
|
-
if (u ===
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
const
|
|
1097
|
-
if (!
|
|
1090
|
+
const f = On(r);
|
|
1091
|
+
for (ve(Y.beforeSanitizeShadowDOM, r, null); u = f.nextNode(); )
|
|
1092
|
+
if (ve(Y.uponSanitizeShadowNode, u, null), Ln(u), $n(u), ot(u.content) && St(u.content), (q ? q(u) : u.nodeType) === xe.element) {
|
|
1093
|
+
const I = P ? P(u) : u.shadowRoot;
|
|
1094
|
+
ot(I) && (Ge(I), St(I));
|
|
1095
|
+
}
|
|
1096
|
+
ve(Y.afterSanitizeShadowDOM, r, null);
|
|
1097
|
+
}, "_sanitizeShadowDOM"), Ge = /* @__PURE__ */ p(function(r) {
|
|
1098
|
+
const u = q ? q(r) : r.nodeType;
|
|
1099
|
+
if (u === xe.element) {
|
|
1100
|
+
const I = P ? P(r) : r.shadowRoot;
|
|
1101
|
+
ot(I) && (Ge(I), St(I));
|
|
1102
|
+
}
|
|
1103
|
+
const f = _ ? _(r) : r.childNodes;
|
|
1104
|
+
if (!f)
|
|
1098
1105
|
return;
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
|
|
1106
|
+
const z = [];
|
|
1107
|
+
qe(f, (I) => {
|
|
1108
|
+
Ye(z, I);
|
|
1102
1109
|
});
|
|
1103
|
-
for (const
|
|
1104
|
-
|
|
1105
|
-
if (u ===
|
|
1106
|
-
const
|
|
1107
|
-
if (typeof
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
+
for (const I of z)
|
|
1111
|
+
Ge(I);
|
|
1112
|
+
if (u === xe.element) {
|
|
1113
|
+
const I = K ? K(r) : null;
|
|
1114
|
+
if (typeof I == "string" && V(I) === "template") {
|
|
1115
|
+
const F = r.content;
|
|
1116
|
+
ot(F) && Ge(F);
|
|
1110
1117
|
}
|
|
1111
1118
|
}
|
|
1112
1119
|
}, "_sanitizeAttachedShadowRoots");
|
|
1113
|
-
return t.sanitize = function(
|
|
1114
|
-
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null,
|
|
1115
|
-
if (Wt = !
|
|
1116
|
-
throw
|
|
1120
|
+
return t.sanitize = function(k) {
|
|
1121
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, f = null, z = null, I = null;
|
|
1122
|
+
if (Wt = !k, Wt && (k = "<!-->"), typeof k != "string" && !Tt(k) && (k = wi(k), typeof k != "string"))
|
|
1123
|
+
throw ut("dirty is not a string, aborting");
|
|
1117
1124
|
if (!t.isSupported)
|
|
1118
|
-
return
|
|
1119
|
-
if (Ft || Zt(r), t.removed = [], typeof
|
|
1120
|
-
const
|
|
1121
|
-
if (typeof
|
|
1122
|
-
const ue =
|
|
1123
|
-
if (!
|
|
1124
|
-
throw
|
|
1125
|
-
}
|
|
1126
|
-
if (
|
|
1127
|
-
throw
|
|
1128
|
-
|
|
1129
|
-
} else if (
|
|
1130
|
-
u =
|
|
1125
|
+
return k;
|
|
1126
|
+
if (Ft || Zt(r), t.removed = [], typeof k == "string" && (at = !1), at) {
|
|
1127
|
+
const be = K ? K(k) : k.nodeName;
|
|
1128
|
+
if (typeof be == "string") {
|
|
1129
|
+
const ue = V(be);
|
|
1130
|
+
if (!d[ue] || we[ue])
|
|
1131
|
+
throw ut("root node is forbidden and cannot be sanitized in-place");
|
|
1132
|
+
}
|
|
1133
|
+
if (vt(k))
|
|
1134
|
+
throw ut("root node is clobbered and cannot be sanitized in-place");
|
|
1135
|
+
Ge(k);
|
|
1136
|
+
} else if (Tt(k))
|
|
1137
|
+
u = Cn("<!---->"), f = u.ownerDocument.importNode(k, !0), f.nodeType === xe.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? u = f : u.appendChild(f), Ge(f);
|
|
1131
1138
|
else {
|
|
1132
|
-
if (!
|
|
1133
|
-
|
|
1134
|
-
return
|
|
1135
|
-
if (u =
|
|
1136
|
-
return
|
|
1139
|
+
if (!Fe && !Ee && !Oe && // eslint-disable-next-line unicorn/prefer-includes
|
|
1140
|
+
k.indexOf("<") === -1)
|
|
1141
|
+
return U && kt ? U.createHTML(k) : k;
|
|
1142
|
+
if (u = Cn(k), !u)
|
|
1143
|
+
return Fe ? null : kt ? Q : "";
|
|
1137
1144
|
}
|
|
1138
1145
|
u && Ut && ce(u.firstChild);
|
|
1139
|
-
const
|
|
1140
|
-
for (;
|
|
1141
|
-
Ln(
|
|
1142
|
-
if (
|
|
1143
|
-
return
|
|
1144
|
-
if (
|
|
1145
|
-
if (
|
|
1146
|
-
for (
|
|
1147
|
-
|
|
1146
|
+
const F = On(at ? k : u);
|
|
1147
|
+
for (; z = F.nextNode(); )
|
|
1148
|
+
Ln(z), $n(z), ot(z.content) && St(z.content);
|
|
1149
|
+
if (at)
|
|
1150
|
+
return Ee && Mn(k), k;
|
|
1151
|
+
if (Fe) {
|
|
1152
|
+
if (Ee && Mn(u), xt)
|
|
1153
|
+
for (I = O.call(u.ownerDocument); u.firstChild; )
|
|
1154
|
+
I.appendChild(u.firstChild);
|
|
1148
1155
|
else
|
|
1149
|
-
|
|
1150
|
-
return (
|
|
1151
|
-
}
|
|
1152
|
-
let
|
|
1153
|
-
return
|
|
1154
|
-
` +
|
|
1155
|
-
|
|
1156
|
-
}),
|
|
1156
|
+
I = u;
|
|
1157
|
+
return (C.shadowroot || C.shadowrootmode) && (I = st.call(n, I, !0)), I;
|
|
1158
|
+
}
|
|
1159
|
+
let ae = Oe ? u.outerHTML : u.innerHTML;
|
|
1160
|
+
return Oe && d["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && ee(Oi, u.ownerDocument.doctype.name) && (ae = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
|
|
1161
|
+
` + ae), Ee && qe([$e, Pe, Be], (be) => {
|
|
1162
|
+
ae = Ve(ae, be, " ");
|
|
1163
|
+
}), U && kt ? U.createHTML(ae) : ae;
|
|
1157
1164
|
}, t.setConfig = function() {
|
|
1158
|
-
let
|
|
1159
|
-
Zt(
|
|
1165
|
+
let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1166
|
+
Zt(k), Ft = !0;
|
|
1160
1167
|
}, t.clearConfig = function() {
|
|
1161
|
-
|
|
1162
|
-
}, t.isValidAttribute = function(
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
return Nn(
|
|
1166
|
-
}, t.addHook = function(
|
|
1167
|
-
typeof r == "function" &&
|
|
1168
|
-
}, t.removeHook = function(
|
|
1168
|
+
je = null, Ft = !1;
|
|
1169
|
+
}, t.isValidAttribute = function(k, r, u) {
|
|
1170
|
+
je || Zt({});
|
|
1171
|
+
const f = V(k), z = V(r);
|
|
1172
|
+
return Nn(f, z, u);
|
|
1173
|
+
}, t.addHook = function(k, r) {
|
|
1174
|
+
typeof r == "function" && Ye(Y[k], r);
|
|
1175
|
+
}, t.removeHook = function(k, r) {
|
|
1169
1176
|
if (r !== void 0) {
|
|
1170
|
-
const u = fi(
|
|
1171
|
-
return u === -1 ? void 0 : gi(
|
|
1177
|
+
const u = fi(Y[k], r);
|
|
1178
|
+
return u === -1 ? void 0 : gi(Y[k], u, 1)[0];
|
|
1172
1179
|
}
|
|
1173
|
-
return Xn(
|
|
1174
|
-
}, t.removeHooks = function(
|
|
1175
|
-
|
|
1180
|
+
return Xn(Y[k]);
|
|
1181
|
+
}, t.removeHooks = function(k) {
|
|
1182
|
+
Y[k] = [];
|
|
1176
1183
|
}, t.removeAllHooks = function() {
|
|
1177
|
-
|
|
1184
|
+
Y = as();
|
|
1178
1185
|
}, t;
|
|
1179
1186
|
}
|
|
1180
1187
|
p(ys, "createDOMPurify");
|
|
@@ -1183,43 +1190,43 @@ function cn() {
|
|
|
1183
1190
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
1184
1191
|
}
|
|
1185
1192
|
p(cn, "M");
|
|
1186
|
-
var
|
|
1193
|
+
var ze = cn();
|
|
1187
1194
|
function ws(a) {
|
|
1188
|
-
|
|
1195
|
+
ze = a;
|
|
1189
1196
|
}
|
|
1190
1197
|
p(ws, "N");
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1198
|
+
var Le = { exec: /* @__PURE__ */ p(() => null, "exec") };
|
|
1199
|
+
function Ze(a) {
|
|
1193
1200
|
let t = [];
|
|
1194
1201
|
return (e) => {
|
|
1195
1202
|
let n = Math.max(0, Math.min(3, e - 1)), i = t[n];
|
|
1196
1203
|
return i || (i = a(n), t[n] = i), i;
|
|
1197
1204
|
};
|
|
1198
1205
|
}
|
|
1199
|
-
p(
|
|
1200
|
-
function
|
|
1206
|
+
p(Ze, "E");
|
|
1207
|
+
function M(a, t = "") {
|
|
1201
1208
|
let e = typeof a == "string" ? a : a.source, n = { replace: /* @__PURE__ */ p((i, s) => {
|
|
1202
1209
|
let l = typeof s == "string" ? s : s.source;
|
|
1203
1210
|
return l = l.replace(ne.caret, "$1"), e = e.replace(i, l), n;
|
|
1204
1211
|
}, "replace"), getRegex: /* @__PURE__ */ p(() => new RegExp(e, t), "getRegex") };
|
|
1205
1212
|
return n;
|
|
1206
1213
|
}
|
|
1207
|
-
p(
|
|
1214
|
+
p(M, "d");
|
|
1208
1215
|
var $i = ((a = "") => {
|
|
1209
1216
|
try {
|
|
1210
1217
|
return !!new RegExp("(?<=1)(?<!1)" + a);
|
|
1211
1218
|
} catch {
|
|
1212
1219
|
return !1;
|
|
1213
1220
|
}
|
|
1214
|
-
})(), ne = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ p((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex:
|
|
1215
|
-
]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Xi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
1216
|
-
function
|
|
1221
|
+
})(), ne = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ p((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: Ze((a) => new RegExp(`^ {0,${a}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Ze((a) => new RegExp(`^ {0,${a}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}(?:\`\`\`|~~~)`)), headingBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}#`)), htmlBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}>`)) }, Pi = /^(?:[ \t]*(?:\n|$))+/, Bi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Fi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ft = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ui = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, vs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = M(vs).replace(/bull/g, un).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Hi = M(vs).replace(/bull/g, un).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), hn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Gi = M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wi = M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), Nt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", pn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, qi = M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", pn).replace("tag", Nt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ss = M(hn).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nt).getRegex(), Yi = M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ss).getRegex(), fn = { blockquote: Yi, code: Bi, def: Gi, fences: Fi, heading: Ui, hr: ft, html: qi, lheading: Ts, list: Wi, newline: Pi, paragraph: Ss, table: Le, text: ji }, ls = M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nt).getRegex(), Vi = { ...fn, lheading: Hi, table: ls, paragraph: M(hn).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ls).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nt).getRegex() }, Zi = { ...fn, html: M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", pn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Le, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: M(hn).replace("hr", ft).replace("heading", ` *#{1,6} *[^
|
|
1222
|
+
]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Xi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, As = /^( {2,}|\\)\n(?!\s*$)/, Qi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, nt = /[\p{P}\p{S}]/u, zt = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Ji = M(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, zt).getRegex(), Es = /(?!~)[\p{P}\p{S}]/u, er = /(?!~)[\s\p{P}\p{S}]/u, tr = /(?:[^\s\p{P}\p{S}]|~)/u, nr = M(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", $i ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _s = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, sr = M(_s, "u").replace(/punct/g, nt).getRegex(), ir = M(_s, "u").replace(/punct/g, Es).getRegex(), Rs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rr = M(Rs, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), ar = M(Rs, "gu").replace(/notPunctSpace/g, tr).replace(/punctSpace/g, er).replace(/punct/g, Es).getRegex(), lr = M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), or = M(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, nt).getRegex(), cr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ur = M(cr, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), hr = M(/\\(punct)/, "gu").replace(/punct/g, nt).getRegex(), dr = M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), pr = M(pn).replace("(?:-->|$)", "-->").getRegex(), fr = M("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ct = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, gr = M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ct).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Is = M(/^!?\[(label)\]\[(ref)\]/).replace("label", Ct).replace("ref", dn).getRegex(), Ds = M(/^!?\[(ref)\](?:\[\])?/).replace("ref", dn).getRegex(), mr = M("reflink|nolink(?!\\()", "g").replace("reflink", Is).replace("nolink", Ds).getRegex(), os = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: Le, anyPunctuation: hr, autolink: dr, blockSkip: nr, br: As, code: Ki, del: Le, delLDelim: Le, delRDelim: Le, emStrongLDelim: sr, emStrongRDelimAst: rr, emStrongRDelimUnd: lr, escape: Xi, link: gr, nolink: Ds, punctuation: Ji, reflink: Is, reflinkSearch: mr, tag: fr, text: Qi, url: Le }, br = { ...mn, link: M(/^!?\[(label)\]\((.*?)\)/).replace("label", Ct).getRegex(), reflink: M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ct).getRegex() }, ln = { ...mn, emStrongRDelimAst: ar, emStrongLDelim: ir, delLDelim: or, delRDelim: ur, url: M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", os).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", os).getRegex() }, xr = { ...ln, br: M(As).replace("{2,}", "*").getRegex(), text: M(ln.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, _t = { normal: fn, gfm: Vi, pedantic: Zi }, ht = { normal: mn, gfm: ln, breaks: xr, pedantic: br }, kr = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, cs = /* @__PURE__ */ p((a) => kr[a], "ge");
|
|
1223
|
+
function ye(a, t) {
|
|
1217
1224
|
if (t) {
|
|
1218
1225
|
if (ne.escapeTest.test(a)) return a.replace(ne.escapeReplace, cs);
|
|
1219
1226
|
} else if (ne.escapeTestNoEncode.test(a)) return a.replace(ne.escapeReplaceNoEncode, cs);
|
|
1220
1227
|
return a;
|
|
1221
1228
|
}
|
|
1222
|
-
p(
|
|
1229
|
+
p(ye, "O");
|
|
1223
1230
|
function us(a) {
|
|
1224
1231
|
try {
|
|
1225
1232
|
a = encodeURI(a).replace(ne.percentDecode, "%");
|
|
@@ -1241,7 +1248,7 @@ function hs(a, t) {
|
|
|
1241
1248
|
return n;
|
|
1242
1249
|
}
|
|
1243
1250
|
p(hs, "Y");
|
|
1244
|
-
function
|
|
1251
|
+
function _e(a, t, e) {
|
|
1245
1252
|
let n = a.length;
|
|
1246
1253
|
if (n === 0) return "";
|
|
1247
1254
|
let i = 0;
|
|
@@ -1249,15 +1256,15 @@ function Ee(a, t, e) {
|
|
|
1249
1256
|
i++;
|
|
1250
1257
|
return a.slice(0, n - i);
|
|
1251
1258
|
}
|
|
1252
|
-
p(
|
|
1253
|
-
function
|
|
1259
|
+
p(_e, "$");
|
|
1260
|
+
function ds(a) {
|
|
1254
1261
|
let t = a.split(`
|
|
1255
1262
|
`), e = t.length - 1;
|
|
1256
1263
|
for (; e >= 0 && ne.blankLine.test(t[e]); ) e--;
|
|
1257
1264
|
return t.length - e <= 2 ? a : t.slice(0, e + 1).join(`
|
|
1258
1265
|
`);
|
|
1259
1266
|
}
|
|
1260
|
-
p(
|
|
1267
|
+
p(ds, "ee");
|
|
1261
1268
|
function yr(a, t) {
|
|
1262
1269
|
if (a.indexOf(t[1]) === -1) return -1;
|
|
1263
1270
|
let e = 0;
|
|
@@ -1276,13 +1283,13 @@ function wr(a, t = 0) {
|
|
|
1276
1283
|
return n;
|
|
1277
1284
|
}
|
|
1278
1285
|
p(wr, "me");
|
|
1279
|
-
function
|
|
1286
|
+
function ps(a, t, e, n, i) {
|
|
1280
1287
|
let s = t.href, l = t.title || null, o = a[1].replace(i.other.outputLinkReplace, "$1");
|
|
1281
1288
|
n.state.inLink = !0;
|
|
1282
1289
|
let h = { type: a[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
|
|
1283
1290
|
return n.state.inLink = !1, h;
|
|
1284
1291
|
}
|
|
1285
|
-
p(
|
|
1292
|
+
p(ps, "xe");
|
|
1286
1293
|
function vr(a, t, e) {
|
|
1287
1294
|
let n = a.match(e.other.indentCodeCompensation);
|
|
1288
1295
|
if (n === null) return t;
|
|
@@ -1297,12 +1304,12 @@ function vr(a, t, e) {
|
|
|
1297
1304
|
`);
|
|
1298
1305
|
}
|
|
1299
1306
|
p(vr, "st");
|
|
1300
|
-
var Qe,
|
|
1307
|
+
var Qe, Ot = (Qe = class {
|
|
1301
1308
|
constructor(t) {
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
this.options = t ||
|
|
1309
|
+
D(this, "options");
|
|
1310
|
+
D(this, "rules");
|
|
1311
|
+
D(this, "lexer");
|
|
1312
|
+
this.options = t || ze;
|
|
1306
1313
|
}
|
|
1307
1314
|
space(t) {
|
|
1308
1315
|
let e = this.rules.block.newline.exec(t);
|
|
@@ -1311,7 +1318,7 @@ var Qe, Mt = (Qe = class {
|
|
|
1311
1318
|
code(t) {
|
|
1312
1319
|
let e = this.rules.block.code.exec(t);
|
|
1313
1320
|
if (e) {
|
|
1314
|
-
let n = this.options.pedantic ? e[0] :
|
|
1321
|
+
let n = this.options.pedantic ? e[0] : ds(e[0]), i = n.replace(this.rules.other.codeRemoveIndent, "");
|
|
1315
1322
|
return { type: "code", raw: n, codeBlockStyle: "indented", text: i };
|
|
1316
1323
|
}
|
|
1317
1324
|
}
|
|
@@ -1327,22 +1334,22 @@ var Qe, Mt = (Qe = class {
|
|
|
1327
1334
|
if (e) {
|
|
1328
1335
|
let n = e[2].trim();
|
|
1329
1336
|
if (this.rules.other.endingHash.test(n)) {
|
|
1330
|
-
let i =
|
|
1337
|
+
let i = _e(n, "#");
|
|
1331
1338
|
(this.options.pedantic || !i || this.rules.other.endingSpaceChar.test(i)) && (n = i.trim());
|
|
1332
1339
|
}
|
|
1333
|
-
return { type: "heading", raw:
|
|
1340
|
+
return { type: "heading", raw: _e(e[0], `
|
|
1334
1341
|
`), depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
1335
1342
|
}
|
|
1336
1343
|
}
|
|
1337
1344
|
hr(t) {
|
|
1338
1345
|
let e = this.rules.block.hr.exec(t);
|
|
1339
|
-
if (e) return { type: "hr", raw:
|
|
1346
|
+
if (e) return { type: "hr", raw: _e(e[0], `
|
|
1340
1347
|
`) };
|
|
1341
1348
|
}
|
|
1342
1349
|
blockquote(t) {
|
|
1343
1350
|
let e = this.rules.block.blockquote.exec(t);
|
|
1344
1351
|
if (e) {
|
|
1345
|
-
let n =
|
|
1352
|
+
let n = _e(e[0], `
|
|
1346
1353
|
`).split(`
|
|
1347
1354
|
`), i = "", s = "", l = [];
|
|
1348
1355
|
for (; n.length > 0; ) {
|
|
@@ -1351,27 +1358,27 @@ var Qe, Mt = (Qe = class {
|
|
|
1351
1358
|
else if (!o) h.push(n[c]);
|
|
1352
1359
|
else break;
|
|
1353
1360
|
n = n.slice(c);
|
|
1354
|
-
let
|
|
1355
|
-
`),
|
|
1361
|
+
let y = h.join(`
|
|
1362
|
+
`), g = y.replace(this.rules.other.blockquoteSetextReplace, `
|
|
1356
1363
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
1357
1364
|
i = i ? `${i}
|
|
1358
|
-
${
|
|
1359
|
-
${
|
|
1360
|
-
let
|
|
1361
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(
|
|
1362
|
-
let
|
|
1363
|
-
if (
|
|
1364
|
-
if (
|
|
1365
|
-
let
|
|
1365
|
+
${y}` : y, s = s ? `${s}
|
|
1366
|
+
${g}` : g;
|
|
1367
|
+
let x = this.lexer.state.top;
|
|
1368
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(g, l, !0), this.lexer.state.top = x, n.length === 0) break;
|
|
1369
|
+
let v = l.at(-1);
|
|
1370
|
+
if (v?.type === "code") break;
|
|
1371
|
+
if (v?.type === "blockquote") {
|
|
1372
|
+
let B = v, m = B.raw + `
|
|
1366
1373
|
` + n.join(`
|
|
1367
|
-
`),
|
|
1368
|
-
l[l.length - 1] =
|
|
1374
|
+
`), _ = this.blockquote(m);
|
|
1375
|
+
l[l.length - 1] = _, i = i.substring(0, i.length - B.raw.length) + _.raw, s = s.substring(0, s.length - B.text.length) + _.text;
|
|
1369
1376
|
break;
|
|
1370
|
-
} else if (
|
|
1371
|
-
let
|
|
1377
|
+
} else if (v?.type === "list") {
|
|
1378
|
+
let B = v, m = B.raw + `
|
|
1372
1379
|
` + n.join(`
|
|
1373
|
-
`),
|
|
1374
|
-
l[l.length - 1] =
|
|
1380
|
+
`), _ = this.list(m);
|
|
1381
|
+
l[l.length - 1] = _, i = i.substring(0, i.length - v.raw.length) + _.raw, s = s.substring(0, s.length - B.raw.length) + _.raw, n = m.substring(l.at(-1).raw.length).split(`
|
|
1375
1382
|
`);
|
|
1376
1383
|
continue;
|
|
1377
1384
|
}
|
|
@@ -1386,31 +1393,31 @@ ${f}` : f;
|
|
|
1386
1393
|
n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
|
|
1387
1394
|
let l = this.rules.other.listItemRegex(n), o = !1;
|
|
1388
1395
|
for (; t; ) {
|
|
1389
|
-
let c = !1,
|
|
1396
|
+
let c = !1, y = "", g = "";
|
|
1390
1397
|
if (!(e = l.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
1391
|
-
|
|
1392
|
-
let
|
|
1393
|
-
`, 1)[0], e[1].length),
|
|
1394
|
-
`, 1)[0],
|
|
1395
|
-
if (this.options.pedantic ? (
|
|
1396
|
-
`, t = t.substring(
|
|
1397
|
-
let
|
|
1398
|
+
y = e[0], t = t.substring(y.length);
|
|
1399
|
+
let x = wr(e[2].split(`
|
|
1400
|
+
`, 1)[0], e[1].length), v = t.split(`
|
|
1401
|
+
`, 1)[0], B = !x.trim(), m = 0;
|
|
1402
|
+
if (this.options.pedantic ? (m = 2, g = x.trimStart()) : B ? m = e[1].length + 1 : (m = x.search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, g = x.slice(m), m += e[1].length), B && this.rules.other.blankLine.test(v) && (y += v + `
|
|
1403
|
+
`, t = t.substring(v.length + 1), c = !0), !c) {
|
|
1404
|
+
let _ = this.rules.other.nextBulletRegex(m), L = this.rules.other.hrRegex(m), P = this.rules.other.fencesBeginRegex(m), G = this.rules.other.headingBeginRegex(m), q = this.rules.other.htmlBeginRegex(m), K = this.rules.other.blockquoteBeginRegex(m);
|
|
1398
1405
|
for (; t; ) {
|
|
1399
|
-
let
|
|
1400
|
-
`, 1)[0],
|
|
1401
|
-
if (
|
|
1402
|
-
if (
|
|
1403
|
-
` +
|
|
1406
|
+
let U = t.split(`
|
|
1407
|
+
`, 1)[0], Q;
|
|
1408
|
+
if (v = U, this.options.pedantic ? (v = v.replace(this.rules.other.listReplaceNesting, " "), Q = v) : Q = v.replace(this.rules.other.tabCharGlobal, " "), P.test(v) || G.test(v) || q.test(v) || K.test(v) || _.test(v) || L.test(v)) break;
|
|
1409
|
+
if (Q.search(this.rules.other.nonSpaceChar) >= m || !v.trim()) g += `
|
|
1410
|
+
` + Q.slice(m);
|
|
1404
1411
|
else {
|
|
1405
|
-
if (
|
|
1406
|
-
|
|
1407
|
-
` +
|
|
1412
|
+
if (B || x.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(x) || G.test(x) || L.test(x)) break;
|
|
1413
|
+
g += `
|
|
1414
|
+
` + v;
|
|
1408
1415
|
}
|
|
1409
|
-
|
|
1410
|
-
`, t = t.substring(
|
|
1416
|
+
B = !v.trim(), y += U + `
|
|
1417
|
+
`, t = t.substring(U.length + 1), x = Q.slice(m);
|
|
1411
1418
|
}
|
|
1412
1419
|
}
|
|
1413
|
-
s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(
|
|
1420
|
+
s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(y) && (o = !0)), s.items.push({ type: "list_item", raw: y, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), s.raw += y;
|
|
1414
1421
|
}
|
|
1415
1422
|
let h = s.items.at(-1);
|
|
1416
1423
|
if (h) h.raw = h.raw.trimEnd(), h.text = h.text.trimEnd();
|
|
@@ -1418,27 +1425,27 @@ ${f}` : f;
|
|
|
1418
1425
|
s.raw = s.raw.trimEnd();
|
|
1419
1426
|
for (let c of s.items) {
|
|
1420
1427
|
this.lexer.state.top = !1, c.tokens = this.lexer.blockTokens(c.text, []);
|
|
1421
|
-
let
|
|
1422
|
-
if (c.task && (
|
|
1423
|
-
c.text = c.text.replace(this.rules.other.listReplaceTask, ""),
|
|
1424
|
-
for (let
|
|
1425
|
-
this.lexer.inlineQueue[
|
|
1428
|
+
let y = c.tokens[0];
|
|
1429
|
+
if (c.task && (y?.type === "text" || y?.type === "paragraph")) {
|
|
1430
|
+
c.text = c.text.replace(this.rules.other.listReplaceTask, ""), y.raw = y.raw.replace(this.rules.other.listReplaceTask, ""), y.text = y.text.replace(this.rules.other.listReplaceTask, "");
|
|
1431
|
+
for (let x = this.lexer.inlineQueue.length - 1; x >= 0; x--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)) {
|
|
1432
|
+
this.lexer.inlineQueue[x].src = this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask, "");
|
|
1426
1433
|
break;
|
|
1427
1434
|
}
|
|
1428
|
-
let
|
|
1429
|
-
if (
|
|
1430
|
-
let
|
|
1431
|
-
c.checked =
|
|
1435
|
+
let g = this.rules.other.listTaskCheckbox.exec(c.raw);
|
|
1436
|
+
if (g) {
|
|
1437
|
+
let x = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
|
|
1438
|
+
c.checked = x.checked, s.loose ? c.tokens[0] && ["paragraph", "text"].includes(c.tokens[0].type) && "tokens" in c.tokens[0] && c.tokens[0].tokens ? (c.tokens[0].raw = x.raw + c.tokens[0].raw, c.tokens[0].text = x.raw + c.tokens[0].text, c.tokens[0].tokens.unshift(x)) : c.tokens.unshift({ type: "paragraph", raw: x.raw, text: x.raw, tokens: [x] }) : c.tokens.unshift(x);
|
|
1432
1439
|
}
|
|
1433
1440
|
} else c.task && (c.task = !1);
|
|
1434
1441
|
if (!s.loose) {
|
|
1435
|
-
let
|
|
1436
|
-
s.loose =
|
|
1442
|
+
let g = c.tokens.filter((v) => v.type === "space"), x = g.length > 0 && g.some((v) => this.rules.other.anyLine.test(v.raw));
|
|
1443
|
+
s.loose = x;
|
|
1437
1444
|
}
|
|
1438
1445
|
}
|
|
1439
1446
|
if (s.loose) for (let c of s.items) {
|
|
1440
1447
|
c.loose = !0;
|
|
1441
|
-
for (let
|
|
1448
|
+
for (let y of c.tokens) y.type === "text" && (y.type = "paragraph");
|
|
1442
1449
|
}
|
|
1443
1450
|
return s;
|
|
1444
1451
|
}
|
|
@@ -1446,7 +1453,7 @@ ${f}` : f;
|
|
|
1446
1453
|
html(t) {
|
|
1447
1454
|
let e = this.rules.block.html.exec(t);
|
|
1448
1455
|
if (e) {
|
|
1449
|
-
let n =
|
|
1456
|
+
let n = ds(e[0]);
|
|
1450
1457
|
return { type: "html", block: !0, raw: n, pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: n };
|
|
1451
1458
|
}
|
|
1452
1459
|
}
|
|
@@ -1454,7 +1461,7 @@ ${f}` : f;
|
|
|
1454
1461
|
let e = this.rules.block.def.exec(t);
|
|
1455
1462
|
if (e) {
|
|
1456
1463
|
let n = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), i = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
|
|
1457
|
-
return { type: "def", tag: n, raw:
|
|
1464
|
+
return { type: "def", tag: n, raw: _e(e[0], `
|
|
1458
1465
|
`), href: i, title: s };
|
|
1459
1466
|
}
|
|
1460
1467
|
}
|
|
@@ -1462,7 +1469,7 @@ ${f}` : f;
|
|
|
1462
1469
|
let e = this.rules.block.table.exec(t);
|
|
1463
1470
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
1464
1471
|
let n = hs(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
1465
|
-
`) : [], l = { type: "table", raw:
|
|
1472
|
+
`) : [], l = { type: "table", raw: _e(e[0], `
|
|
1466
1473
|
`), header: [], align: [], rows: [] };
|
|
1467
1474
|
if (n.length === i.length) {
|
|
1468
1475
|
for (let o of i) this.rules.other.tableAlignRight.test(o) ? l.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? l.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? l.align.push("left") : l.align.push(null);
|
|
@@ -1475,7 +1482,7 @@ ${f}` : f;
|
|
|
1475
1482
|
let e = this.rules.block.lheading.exec(t);
|
|
1476
1483
|
if (e) {
|
|
1477
1484
|
let n = e[1].trim();
|
|
1478
|
-
return { type: "heading", raw:
|
|
1485
|
+
return { type: "heading", raw: _e(e[0], `
|
|
1479
1486
|
`), depth: e[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
1480
1487
|
}
|
|
1481
1488
|
}
|
|
@@ -1505,7 +1512,7 @@ ${f}` : f;
|
|
|
1505
1512
|
let n = e[2].trim();
|
|
1506
1513
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
1507
1514
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
1508
|
-
let l =
|
|
1515
|
+
let l = _e(n.slice(0, -1), "\\");
|
|
1509
1516
|
if ((n.length - l.length) % 2 === 0) return;
|
|
1510
1517
|
} else {
|
|
1511
1518
|
let l = yr(e[2], "()");
|
|
@@ -1520,7 +1527,7 @@ ${f}` : f;
|
|
|
1520
1527
|
let l = this.rules.other.pedanticHrefTitle.exec(i);
|
|
1521
1528
|
l && (i = l[1], s = l[3]);
|
|
1522
1529
|
} else s = e[3] ? e[3].slice(1, -1) : "";
|
|
1523
|
-
return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? i = i.slice(1) : i = i.slice(1, -1)),
|
|
1530
|
+
return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? i = i.slice(1) : i = i.slice(1, -1)), ps(e, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
1524
1531
|
}
|
|
1525
1532
|
}
|
|
1526
1533
|
reflink(t, e) {
|
|
@@ -1531,14 +1538,14 @@ ${f}` : f;
|
|
|
1531
1538
|
let l = n[0].charAt(0);
|
|
1532
1539
|
return { type: "text", raw: l, text: l };
|
|
1533
1540
|
}
|
|
1534
|
-
return
|
|
1541
|
+
return ps(n, s, n[0], this.lexer, this.rules);
|
|
1535
1542
|
}
|
|
1536
1543
|
}
|
|
1537
1544
|
emStrong(t, e, n = "") {
|
|
1538
1545
|
let i = this.rules.inline.emStrongLDelim.exec(t);
|
|
1539
1546
|
if (!(!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(i[1] || i[3]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
1540
|
-
let s = [...i[0]].length - 1, l, o, h = s, c = 0,
|
|
1541
|
-
for (
|
|
1547
|
+
let s = [...i[0]].length - 1, l, o, h = s, c = 0, y = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
1548
|
+
for (y.lastIndex = 0, e = e.slice(-1 * t.length + s); (i = y.exec(e)) !== null; ) {
|
|
1542
1549
|
if (l = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !l) continue;
|
|
1543
1550
|
if (o = [...l].length, i[3] || i[4]) {
|
|
1544
1551
|
h += o;
|
|
@@ -1549,13 +1556,13 @@ ${f}` : f;
|
|
|
1549
1556
|
}
|
|
1550
1557
|
if (h -= o, h > 0) continue;
|
|
1551
1558
|
o = Math.min(o, o + h + c);
|
|
1552
|
-
let
|
|
1559
|
+
let g = [...i[0]][0].length, x = t.slice(0, s + i.index + g + o);
|
|
1553
1560
|
if (Math.min(s, o) % 2) {
|
|
1554
|
-
let
|
|
1555
|
-
return { type: "em", raw:
|
|
1561
|
+
let B = x.slice(1, -1);
|
|
1562
|
+
return { type: "em", raw: x, text: B, tokens: this.lexer.inlineTokens(B) };
|
|
1556
1563
|
}
|
|
1557
|
-
let
|
|
1558
|
-
return { type: "strong", raw:
|
|
1564
|
+
let v = x.slice(2, -2);
|
|
1565
|
+
return { type: "strong", raw: x, text: v, tokens: this.lexer.inlineTokens(v) };
|
|
1559
1566
|
}
|
|
1560
1567
|
}
|
|
1561
1568
|
}
|
|
@@ -1582,8 +1589,8 @@ ${f}` : f;
|
|
|
1582
1589
|
}
|
|
1583
1590
|
if (h -= o, h > 0) continue;
|
|
1584
1591
|
o = Math.min(o, o + h);
|
|
1585
|
-
let
|
|
1586
|
-
return { type: "del", raw:
|
|
1592
|
+
let y = [...i[0]][0].length, g = t.slice(0, s + i.index + y + o), x = g.slice(s, -s);
|
|
1593
|
+
return { type: "del", raw: g, text: x, tokens: this.lexer.inlineTokens(x) };
|
|
1587
1594
|
}
|
|
1588
1595
|
}
|
|
1589
1596
|
}
|
|
@@ -1616,25 +1623,25 @@ ${f}` : f;
|
|
|
1616
1623
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
1617
1624
|
}
|
|
1618
1625
|
}
|
|
1619
|
-
}, p(Qe, "w"), Qe),
|
|
1626
|
+
}, p(Qe, "w"), Qe), Ie, he = (Ie = class {
|
|
1620
1627
|
constructor(t) {
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t ||
|
|
1627
|
-
let e = { other: ne, block:
|
|
1628
|
-
this.options.pedantic ? (e.block =
|
|
1628
|
+
D(this, "tokens");
|
|
1629
|
+
D(this, "options");
|
|
1630
|
+
D(this, "state");
|
|
1631
|
+
D(this, "inlineQueue");
|
|
1632
|
+
D(this, "tokenizer");
|
|
1633
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ze, this.options.tokenizer = this.options.tokenizer || new Ot(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
1634
|
+
let e = { other: ne, block: _t.normal, inline: ht.normal };
|
|
1635
|
+
this.options.pedantic ? (e.block = _t.pedantic, e.inline = ht.pedantic) : this.options.gfm && (e.block = _t.gfm, this.options.breaks ? e.inline = ht.breaks : e.inline = ht.gfm), this.tokenizer.rules = e;
|
|
1629
1636
|
}
|
|
1630
1637
|
static get rules() {
|
|
1631
|
-
return { block:
|
|
1638
|
+
return { block: _t, inline: ht };
|
|
1632
1639
|
}
|
|
1633
1640
|
static lex(t, e) {
|
|
1634
|
-
return new
|
|
1641
|
+
return new Ie(e).lex(t);
|
|
1635
1642
|
}
|
|
1636
1643
|
static lexInline(t, e) {
|
|
1637
|
-
return new
|
|
1644
|
+
return new Ie(e).inlineTokens(t);
|
|
1638
1645
|
}
|
|
1639
1646
|
lex(t) {
|
|
1640
1647
|
t = t.replace(ne.carriageReturn, `
|
|
@@ -1716,8 +1723,8 @@ ${f}` : f;
|
|
|
1716
1723
|
let l = t;
|
|
1717
1724
|
if (this.options.extensions?.startBlock) {
|
|
1718
1725
|
let o = 1 / 0, h = t.slice(1), c;
|
|
1719
|
-
this.options.extensions.startBlock.forEach((
|
|
1720
|
-
c =
|
|
1726
|
+
this.options.extensions.startBlock.forEach((y) => {
|
|
1727
|
+
c = y.call({ lexer: this }, h), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
|
|
1721
1728
|
}), o < 1 / 0 && o >= 0 && (l = t.substring(0, o + 1));
|
|
1722
1729
|
}
|
|
1723
1730
|
if (this.state.top && (s = this.tokenizer.paragraph(l))) {
|
|
@@ -1767,7 +1774,7 @@ ${f}` : f;
|
|
|
1767
1774
|
}
|
|
1768
1775
|
l || (o = ""), l = !1;
|
|
1769
1776
|
let c;
|
|
1770
|
-
if (this.options.extensions?.inline?.some((
|
|
1777
|
+
if (this.options.extensions?.inline?.some((g) => (c = g.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
|
|
1771
1778
|
if (c = this.tokenizer.escape(t)) {
|
|
1772
1779
|
t = t.substring(c.raw.length), e.push(c);
|
|
1773
1780
|
continue;
|
|
@@ -1782,8 +1789,8 @@ ${f}` : f;
|
|
|
1782
1789
|
}
|
|
1783
1790
|
if (c = this.tokenizer.reflink(t, this.tokens.links)) {
|
|
1784
1791
|
t = t.substring(c.raw.length);
|
|
1785
|
-
let
|
|
1786
|
-
c.type === "text" &&
|
|
1792
|
+
let g = e.at(-1);
|
|
1793
|
+
c.type === "text" && g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
|
|
1787
1794
|
continue;
|
|
1788
1795
|
}
|
|
1789
1796
|
if (c = this.tokenizer.emStrong(t, n, o)) {
|
|
@@ -1810,17 +1817,17 @@ ${f}` : f;
|
|
|
1810
1817
|
t = t.substring(c.raw.length), e.push(c);
|
|
1811
1818
|
continue;
|
|
1812
1819
|
}
|
|
1813
|
-
let
|
|
1820
|
+
let y = t;
|
|
1814
1821
|
if (this.options.extensions?.startInline) {
|
|
1815
|
-
let
|
|
1816
|
-
this.options.extensions.startInline.forEach((
|
|
1817
|
-
|
|
1818
|
-
}),
|
|
1822
|
+
let g = 1 / 0, x = t.slice(1), v;
|
|
1823
|
+
this.options.extensions.startInline.forEach((B) => {
|
|
1824
|
+
v = B.call({ lexer: this }, x), typeof v == "number" && v >= 0 && (g = Math.min(g, v));
|
|
1825
|
+
}), g < 1 / 0 && g >= 0 && (y = t.substring(0, g + 1));
|
|
1819
1826
|
}
|
|
1820
|
-
if (c = this.tokenizer.inlineText(
|
|
1827
|
+
if (c = this.tokenizer.inlineText(y)) {
|
|
1821
1828
|
t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), l = !0;
|
|
1822
|
-
let
|
|
1823
|
-
|
|
1829
|
+
let g = e.at(-1);
|
|
1830
|
+
g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
|
|
1824
1831
|
continue;
|
|
1825
1832
|
}
|
|
1826
1833
|
if (t) {
|
|
@@ -1835,11 +1842,11 @@ ${f}` : f;
|
|
|
1835
1842
|
if (this.options.silent) console.error(e);
|
|
1836
1843
|
else throw new Error(e);
|
|
1837
1844
|
}
|
|
1838
|
-
}, p(
|
|
1845
|
+
}, p(Ie, "l"), Ie), Je, Mt = (Je = class {
|
|
1839
1846
|
constructor(t) {
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
this.options = t ||
|
|
1847
|
+
D(this, "options");
|
|
1848
|
+
D(this, "parser");
|
|
1849
|
+
this.options = t || ze;
|
|
1843
1850
|
}
|
|
1844
1851
|
space(t) {
|
|
1845
1852
|
return "";
|
|
@@ -1847,8 +1854,8 @@ ${f}` : f;
|
|
|
1847
1854
|
code({ text: t, lang: e, escaped: n }) {
|
|
1848
1855
|
let i = (e || "").match(ne.notSpaceStart)?.[0], s = t.replace(ne.endingNewline, "") + `
|
|
1849
1856
|
`;
|
|
1850
|
-
return i ? '<pre><code class="language-' +
|
|
1851
|
-
` : "<pre><code>" + (n ? s :
|
|
1857
|
+
return i ? '<pre><code class="language-' + ye(i) + '">' + (n ? s : ye(s, !0)) + `</code></pre>
|
|
1858
|
+
` : "<pre><code>" + (n ? s : ye(s, !0)) + `</code></pre>
|
|
1852
1859
|
`;
|
|
1853
1860
|
}
|
|
1854
1861
|
blockquote({ tokens: t }) {
|
|
@@ -1926,7 +1933,7 @@ ${t}</tr>
|
|
|
1926
1933
|
return `<em>${this.parser.parseInline(t)}</em>`;
|
|
1927
1934
|
}
|
|
1928
1935
|
codespan({ text: t }) {
|
|
1929
|
-
return `<code>${
|
|
1936
|
+
return `<code>${ye(t, !0)}</code>`;
|
|
1930
1937
|
}
|
|
1931
1938
|
br(t) {
|
|
1932
1939
|
return "<br>";
|
|
@@ -1939,20 +1946,20 @@ ${t}</tr>
|
|
|
1939
1946
|
if (s === null) return i;
|
|
1940
1947
|
t = s;
|
|
1941
1948
|
let l = '<a href="' + t + '"';
|
|
1942
|
-
return e && (l += ' title="' +
|
|
1949
|
+
return e && (l += ' title="' + ye(e) + '"'), l += ">" + i + "</a>", l;
|
|
1943
1950
|
}
|
|
1944
1951
|
image({ href: t, title: e, text: n, tokens: i }) {
|
|
1945
1952
|
i && (n = this.parser.parseInline(i, this.parser.textRenderer));
|
|
1946
1953
|
let s = us(t);
|
|
1947
|
-
if (s === null) return
|
|
1954
|
+
if (s === null) return ye(n);
|
|
1948
1955
|
t = s;
|
|
1949
|
-
let l = `<img src="${t}" alt="${
|
|
1950
|
-
return e && (l += ` title="${
|
|
1956
|
+
let l = `<img src="${t}" alt="${ye(n)}"`;
|
|
1957
|
+
return e && (l += ` title="${ye(e)}"`), l += ">", l;
|
|
1951
1958
|
}
|
|
1952
1959
|
text(t) {
|
|
1953
|
-
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text :
|
|
1960
|
+
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ye(t.text);
|
|
1954
1961
|
}
|
|
1955
|
-
}, p(
|
|
1962
|
+
}, p(Je, "y"), Je), et, bn = (et = class {
|
|
1956
1963
|
strong({ text: t }) {
|
|
1957
1964
|
return t;
|
|
1958
1965
|
}
|
|
@@ -1983,18 +1990,18 @@ ${t}</tr>
|
|
|
1983
1990
|
checkbox({ raw: t }) {
|
|
1984
1991
|
return t;
|
|
1985
1992
|
}
|
|
1986
|
-
}, p(
|
|
1993
|
+
}, p(et, "L"), et), De, de = (De = class {
|
|
1987
1994
|
constructor(t) {
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
this.options = t ||
|
|
1995
|
+
D(this, "options");
|
|
1996
|
+
D(this, "renderer");
|
|
1997
|
+
D(this, "textRenderer");
|
|
1998
|
+
this.options = t || ze, this.options.renderer = this.options.renderer || new Mt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new bn();
|
|
1992
1999
|
}
|
|
1993
2000
|
static parse(t, e) {
|
|
1994
|
-
return new
|
|
2001
|
+
return new De(e).parse(t);
|
|
1995
2002
|
}
|
|
1996
2003
|
static parseInline(t, e) {
|
|
1997
|
-
return new
|
|
2004
|
+
return new De(e).parseInline(t);
|
|
1998
2005
|
}
|
|
1999
2006
|
parse(t) {
|
|
2000
2007
|
this.renderer.parser = this;
|
|
@@ -2134,11 +2141,11 @@ ${t}</tr>
|
|
|
2134
2141
|
}
|
|
2135
2142
|
return n;
|
|
2136
2143
|
}
|
|
2137
|
-
}, p(
|
|
2144
|
+
}, p(De, "l"), De), Re, pt = (Re = class {
|
|
2138
2145
|
constructor(t) {
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
this.options = t ||
|
|
2146
|
+
D(this, "options");
|
|
2147
|
+
D(this, "block");
|
|
2148
|
+
this.options = t || ze;
|
|
2142
2149
|
}
|
|
2143
2150
|
preprocess(t) {
|
|
2144
2151
|
return t;
|
|
@@ -2153,23 +2160,23 @@ ${t}</tr>
|
|
|
2153
2160
|
return t;
|
|
2154
2161
|
}
|
|
2155
2162
|
provideLexer(t = this.block) {
|
|
2156
|
-
return t ?
|
|
2163
|
+
return t ? he.lex : he.lexInline;
|
|
2157
2164
|
}
|
|
2158
2165
|
provideParser(t = this.block) {
|
|
2159
2166
|
return t ? de.parse : de.parseInline;
|
|
2160
2167
|
}
|
|
2161
|
-
}, p(
|
|
2168
|
+
}, p(Re, "P"), D(Re, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(Re, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Re), tt, Tr = (tt = class {
|
|
2162
2169
|
constructor(...t) {
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2170
|
+
D(this, "defaults", cn());
|
|
2171
|
+
D(this, "options", this.setOptions);
|
|
2172
|
+
D(this, "parse", this.parseMarkdown(!0));
|
|
2173
|
+
D(this, "parseInline", this.parseMarkdown(!1));
|
|
2174
|
+
D(this, "Parser", de);
|
|
2175
|
+
D(this, "Renderer", Mt);
|
|
2176
|
+
D(this, "TextRenderer", bn);
|
|
2177
|
+
D(this, "Lexer", he);
|
|
2178
|
+
D(this, "Tokenizer", Ot);
|
|
2179
|
+
D(this, "Hooks", pt);
|
|
2173
2180
|
this.use(...t);
|
|
2174
2181
|
}
|
|
2175
2182
|
walkTokens(t, e) {
|
|
@@ -2216,27 +2223,27 @@ ${t}</tr>
|
|
|
2216
2223
|
}
|
|
2217
2224
|
"childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
|
|
2218
2225
|
}), i.extensions = e), n.renderer) {
|
|
2219
|
-
let s = this.defaults.renderer || new
|
|
2226
|
+
let s = this.defaults.renderer || new Mt(this.defaults);
|
|
2220
2227
|
for (let l in n.renderer) {
|
|
2221
2228
|
if (!(l in s)) throw new Error(`renderer '${l}' does not exist`);
|
|
2222
2229
|
if (["options", "parser"].includes(l)) continue;
|
|
2223
2230
|
let o = l, h = n.renderer[o], c = s[o];
|
|
2224
|
-
s[o] = (...
|
|
2225
|
-
let
|
|
2226
|
-
return
|
|
2231
|
+
s[o] = (...y) => {
|
|
2232
|
+
let g = h.apply(s, y);
|
|
2233
|
+
return g === !1 && (g = c.apply(s, y)), g || "";
|
|
2227
2234
|
};
|
|
2228
2235
|
}
|
|
2229
2236
|
i.renderer = s;
|
|
2230
2237
|
}
|
|
2231
2238
|
if (n.tokenizer) {
|
|
2232
|
-
let s = this.defaults.tokenizer || new
|
|
2239
|
+
let s = this.defaults.tokenizer || new Ot(this.defaults);
|
|
2233
2240
|
for (let l in n.tokenizer) {
|
|
2234
2241
|
if (!(l in s)) throw new Error(`tokenizer '${l}' does not exist`);
|
|
2235
2242
|
if (["options", "rules", "lexer"].includes(l)) continue;
|
|
2236
2243
|
let o = l, h = n.tokenizer[o], c = s[o];
|
|
2237
|
-
s[o] = (...
|
|
2238
|
-
let
|
|
2239
|
-
return
|
|
2244
|
+
s[o] = (...y) => {
|
|
2245
|
+
let g = h.apply(s, y);
|
|
2246
|
+
return g === !1 && (g = c.apply(s, y)), g;
|
|
2240
2247
|
};
|
|
2241
2248
|
}
|
|
2242
2249
|
i.tokenizer = s;
|
|
@@ -2247,20 +2254,20 @@ ${t}</tr>
|
|
|
2247
2254
|
if (!(l in s)) throw new Error(`hook '${l}' does not exist`);
|
|
2248
2255
|
if (["options", "block"].includes(l)) continue;
|
|
2249
2256
|
let o = l, h = n.hooks[o], c = s[o];
|
|
2250
|
-
pt.passThroughHooks.has(l) ? s[o] = (
|
|
2257
|
+
pt.passThroughHooks.has(l) ? s[o] = (y) => {
|
|
2251
2258
|
if (this.defaults.async && pt.passThroughHooksRespectAsync.has(l)) return (async () => {
|
|
2252
|
-
let
|
|
2253
|
-
return c.call(s,
|
|
2259
|
+
let x = await h.call(s, y);
|
|
2260
|
+
return c.call(s, x);
|
|
2254
2261
|
})();
|
|
2255
|
-
let
|
|
2256
|
-
return c.call(s,
|
|
2257
|
-
} : s[o] = (...
|
|
2262
|
+
let g = h.call(s, y);
|
|
2263
|
+
return c.call(s, g);
|
|
2264
|
+
} : s[o] = (...y) => {
|
|
2258
2265
|
if (this.defaults.async) return (async () => {
|
|
2259
|
-
let
|
|
2260
|
-
return
|
|
2266
|
+
let x = await h.apply(s, y);
|
|
2267
|
+
return x === !1 && (x = await c.apply(s, y)), x;
|
|
2261
2268
|
})();
|
|
2262
|
-
let
|
|
2263
|
-
return
|
|
2269
|
+
let g = h.apply(s, y);
|
|
2270
|
+
return g === !1 && (g = c.apply(s, y)), g;
|
|
2264
2271
|
};
|
|
2265
2272
|
}
|
|
2266
2273
|
i.hooks = s;
|
|
@@ -2279,7 +2286,7 @@ ${t}</tr>
|
|
|
2279
2286
|
return this.defaults = { ...this.defaults, ...t }, this;
|
|
2280
2287
|
}
|
|
2281
2288
|
lexer(t, e) {
|
|
2282
|
-
return
|
|
2289
|
+
return he.lex(t, e ?? this.defaults);
|
|
2283
2290
|
}
|
|
2284
2291
|
parser(t, e) {
|
|
2285
2292
|
return de.parse(t, e ?? this.defaults);
|
|
@@ -2291,14 +2298,14 @@ ${t}</tr>
|
|
|
2291
2298
|
if (typeof e > "u" || e === null) return l(new Error("marked(): input parameter is undefined or null"));
|
|
2292
2299
|
if (typeof e != "string") return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
2293
2300
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
|
|
2294
|
-
let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ?
|
|
2301
|
+
let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(h) : h;
|
|
2295
2302
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
2296
|
-
let
|
|
2297
|
-
return s.hooks ? await s.hooks.postprocess(
|
|
2303
|
+
let y = await (s.hooks ? await s.hooks.provideParser(t) : t ? de.parse : de.parseInline)(c, s);
|
|
2304
|
+
return s.hooks ? await s.hooks.postprocess(y) : y;
|
|
2298
2305
|
})().catch(l);
|
|
2299
2306
|
try {
|
|
2300
2307
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
2301
|
-
let o = (s.hooks ? s.hooks.provideLexer(t) : t ?
|
|
2308
|
+
let o = (s.hooks ? s.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(e, s);
|
|
2302
2309
|
s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
|
|
2303
2310
|
let h = (s.hooks ? s.hooks.provideParser(t) : t ? de.parse : de.parseInline)(o, s);
|
|
2304
2311
|
return s.hooks && (h = s.hooks.postprocess(h)), h;
|
|
@@ -2311,37 +2318,37 @@ ${t}</tr>
|
|
|
2311
2318
|
return (n) => {
|
|
2312
2319
|
if (n.message += `
|
|
2313
2320
|
Please report this to https://github.com/markedjs/marked.`, t) {
|
|
2314
|
-
let i = "<p>An error occurred:</p><pre>" +
|
|
2321
|
+
let i = "<p>An error occurred:</p><pre>" + ye(n.message + "", !0) + "</pre>";
|
|
2315
2322
|
return e ? Promise.resolve(i) : i;
|
|
2316
2323
|
}
|
|
2317
2324
|
if (e) return Promise.reject(n);
|
|
2318
2325
|
throw n;
|
|
2319
2326
|
};
|
|
2320
2327
|
}
|
|
2321
|
-
}, p(
|
|
2328
|
+
}, p(tt, "q"), tt), Ne = new Tr();
|
|
2322
2329
|
function N(a, t) {
|
|
2323
|
-
return
|
|
2330
|
+
return Ne.parse(a, t);
|
|
2324
2331
|
}
|
|
2325
2332
|
p(N, "g");
|
|
2326
2333
|
N.options = N.setOptions = function(a) {
|
|
2327
|
-
return
|
|
2334
|
+
return Ne.setOptions(a), N.defaults = Ne.defaults, ws(N.defaults), N;
|
|
2328
2335
|
};
|
|
2329
2336
|
N.getDefaults = cn;
|
|
2330
|
-
N.defaults =
|
|
2337
|
+
N.defaults = ze;
|
|
2331
2338
|
N.use = function(...a) {
|
|
2332
|
-
return
|
|
2339
|
+
return Ne.use(...a), N.defaults = Ne.defaults, ws(N.defaults), N;
|
|
2333
2340
|
};
|
|
2334
2341
|
N.walkTokens = function(a, t) {
|
|
2335
|
-
return
|
|
2342
|
+
return Ne.walkTokens(a, t);
|
|
2336
2343
|
};
|
|
2337
|
-
N.parseInline =
|
|
2344
|
+
N.parseInline = Ne.parseInline;
|
|
2338
2345
|
N.Parser = de;
|
|
2339
2346
|
N.parser = de.parse;
|
|
2340
|
-
N.Renderer =
|
|
2347
|
+
N.Renderer = Mt;
|
|
2341
2348
|
N.TextRenderer = bn;
|
|
2342
|
-
N.Lexer =
|
|
2343
|
-
N.lexer =
|
|
2344
|
-
N.Tokenizer =
|
|
2349
|
+
N.Lexer = he;
|
|
2350
|
+
N.lexer = he.lex;
|
|
2351
|
+
N.Tokenizer = Ot;
|
|
2345
2352
|
N.Hooks = pt;
|
|
2346
2353
|
N.parse = N;
|
|
2347
2354
|
N.options;
|
|
@@ -2350,8 +2357,8 @@ N.use;
|
|
|
2350
2357
|
N.walkTokens;
|
|
2351
2358
|
N.parseInline;
|
|
2352
2359
|
de.parse;
|
|
2353
|
-
|
|
2354
|
-
const Sr = ["innerHTML"],
|
|
2360
|
+
he.lex;
|
|
2361
|
+
const Sr = ["innerHTML"], Rt = /* @__PURE__ */ Te({
|
|
2355
2362
|
__name: "ChatRichText",
|
|
2356
2363
|
props: {
|
|
2357
2364
|
text: {},
|
|
@@ -2361,7 +2368,7 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2361
2368
|
setup(a) {
|
|
2362
2369
|
const t = a, e = fs(t.text);
|
|
2363
2370
|
let n;
|
|
2364
|
-
|
|
2371
|
+
It(
|
|
2365
2372
|
[() => t.text, () => t.streaming],
|
|
2366
2373
|
([l, o]) => {
|
|
2367
2374
|
if (!o) {
|
|
@@ -2396,11 +2403,11 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2396
2403
|
return zi.sanitize(o, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
|
|
2397
2404
|
});
|
|
2398
2405
|
return (l, o) => (T(), S("div", {
|
|
2399
|
-
class:
|
|
2406
|
+
class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", a.inverted ? "chat-msg-prose-invert" : ""]),
|
|
2400
2407
|
innerHTML: s.value
|
|
2401
2408
|
}, null, 10, Sr));
|
|
2402
2409
|
}
|
|
2403
|
-
}), Ar = 80, Er = /* @__PURE__ */
|
|
2410
|
+
}), Ar = 80, Er = /* @__PURE__ */ Te({
|
|
2404
2411
|
__name: "ChatScroller",
|
|
2405
2412
|
setup(a, { expose: t }) {
|
|
2406
2413
|
const e = ie(), n = ie();
|
|
@@ -2418,7 +2425,7 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2418
2425
|
function h() {
|
|
2419
2426
|
i = !0, l();
|
|
2420
2427
|
}
|
|
2421
|
-
return p(h, "pin"), t({ pin: h }),
|
|
2428
|
+
return p(h, "pin"), t({ pin: h }), Lt(() => {
|
|
2422
2429
|
requestAnimationFrame(() => {
|
|
2423
2430
|
l(), requestAnimationFrame(l);
|
|
2424
2431
|
}), n.value && (s = new ResizeObserver(() => {
|
|
@@ -2426,13 +2433,13 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2426
2433
|
}), s.observe(n.value));
|
|
2427
2434
|
}), gs(() => {
|
|
2428
2435
|
s?.disconnect();
|
|
2429
|
-
}), (c,
|
|
2436
|
+
}), (c, y) => (T(), S("div", {
|
|
2430
2437
|
ref_key: "viewport",
|
|
2431
2438
|
ref: e,
|
|
2432
2439
|
class: "overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
2433
2440
|
onScrollPassive: o
|
|
2434
2441
|
}, [
|
|
2435
|
-
|
|
2442
|
+
w("div", {
|
|
2436
2443
|
ref_key: "content",
|
|
2437
2444
|
ref: n,
|
|
2438
2445
|
class: "flex-1 flex flex-col"
|
|
@@ -2447,29 +2454,29 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2447
2454
|
}, Ir = {
|
|
2448
2455
|
key: 0,
|
|
2449
2456
|
class: "flex flex-col items-center justify-center px-4 min-h-full"
|
|
2450
|
-
},
|
|
2457
|
+
}, Dr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Cr = ["src", "alt"], Or = ["title"], Mr = {
|
|
2451
2458
|
key: 0,
|
|
2452
2459
|
class: "flex items-center gap-3 py-3 px-2"
|
|
2453
|
-
}, Lr = ["data-issue-code", "data-issue-bucket"], Nr = { class: "max-w-[85%] min-w-0" }, zr = ["href"], $r = ["data-
|
|
2460
|
+
}, Lr = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-issue-action-label", "data-issue-action-url", "data-streaming"], Nr = { class: "max-w-[85%] min-w-0" }, zr = ["href"], $r = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Pr = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Br = {
|
|
2454
2461
|
key: 0,
|
|
2455
2462
|
class: "flex-shrink-0 size-7 @sm/chat:size-8"
|
|
2456
|
-
},
|
|
2457
|
-
key:
|
|
2463
|
+
}, Fr = ["src", "alt"], Ur = ["src", "alt"], Hr = ["src"], jr = ["href"], Gr = ["data-working-description"], Wr = { class: "truncate" }, qr = {
|
|
2464
|
+
key: 2,
|
|
2458
2465
|
"data-test": "messaging-thinking-indicator",
|
|
2459
2466
|
class: "flex gap-2 justify-start items-center mb-4"
|
|
2460
|
-
},
|
|
2467
|
+
}, Yr = ["src", "alt"], Vr = {
|
|
2461
2468
|
key: 0,
|
|
2462
2469
|
class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
2463
|
-
},
|
|
2470
|
+
}, Zr = ["src", "alt"], Xr = { class: "max-w-20 truncate" }, Kr = ["onClick"], Qr = {
|
|
2464
2471
|
key: 0,
|
|
2465
2472
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
2466
|
-
},
|
|
2473
|
+
}, Jr = ["disabled"], ea = {
|
|
2467
2474
|
key: 0,
|
|
2468
2475
|
class: "i-svg-spinners-ring-resize size-4"
|
|
2469
|
-
},
|
|
2476
|
+
}, ta = {
|
|
2470
2477
|
key: 1,
|
|
2471
2478
|
class: "i-tabler-paperclip size-5"
|
|
2472
|
-
},
|
|
2479
|
+
}, na = ["placeholder", "disabled"], sa = ["disabled"], ga = /* @__PURE__ */ Te({
|
|
2473
2480
|
__name: "ElAgentChat",
|
|
2474
2481
|
props: {
|
|
2475
2482
|
chatController: {},
|
|
@@ -2487,341 +2494,375 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2487
2494
|
org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
|
|
2488
2495
|
public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
|
|
2489
2496
|
}, e = j(() => {
|
|
2490
|
-
const
|
|
2491
|
-
return a.scope === "org" && a.scopeName && (
|
|
2497
|
+
const R = { ...t[a.scope] };
|
|
2498
|
+
return a.scope === "org" && a.scopeName && (R.label = a.scopeName, R.tooltip = `Visible to ${a.scopeName} members`), R;
|
|
2492
2499
|
}), n = ie(""), i = ie(!1), s = ie(), l = ie(), o = ie(), h = ie([]), c = ie(!1);
|
|
2493
|
-
function
|
|
2494
|
-
return
|
|
2495
|
-
}
|
|
2496
|
-
p(
|
|
2497
|
-
function
|
|
2498
|
-
return
|
|
2499
|
-
}
|
|
2500
|
-
p(
|
|
2501
|
-
function
|
|
2502
|
-
const
|
|
2503
|
-
return
|
|
2504
|
-
}
|
|
2505
|
-
p(
|
|
2506
|
-
const
|
|
2507
|
-
if (!
|
|
2508
|
-
const
|
|
2509
|
-
return
|
|
2510
|
-
}),
|
|
2511
|
-
() =>
|
|
2512
|
-
),
|
|
2513
|
-
|
|
2514
|
-
a.chatController && !
|
|
2500
|
+
function y(R) {
|
|
2501
|
+
return R ? /\[[^\]]+\]\([^)]+\)/.test(R) : !1;
|
|
2502
|
+
}
|
|
2503
|
+
p(y, "containsMarkdownLink");
|
|
2504
|
+
function g(R) {
|
|
2505
|
+
return R.sender === "system" && (!!R.issue || R.id === K.value);
|
|
2506
|
+
}
|
|
2507
|
+
p(g, "isSystemExplainerMessage");
|
|
2508
|
+
function x(R, b) {
|
|
2509
|
+
const d = R[b], $ = R[b + 1];
|
|
2510
|
+
return !$ || $.sender !== d.sender;
|
|
2511
|
+
}
|
|
2512
|
+
p(x, "shouldShowAvatar");
|
|
2513
|
+
const v = j(() => a.chatController?.textState.value), B = j(() => v.value?.isConnected ?? !1), m = j(() => v.value?.isThinking ?? !1), _ = j(() => v.value?.connectionStatus === "disconnected" && !!v.value?.error), L = j(() => v.value?.connectionStatus !== "connected" && !v.value?.error), P = j(() => v.value?.error), G = j(() => a.chatController?.sharedMessages.value ?? []), q = j(() => v.value?.workingDescription?.trim() || void 0), K = j(() => {
|
|
2514
|
+
if (!m.value) return;
|
|
2515
|
+
const R = G.value, b = R[R.length - 1];
|
|
2516
|
+
return b?.sender === "agent" || b?.sender === "system" ? b.id : void 0;
|
|
2517
|
+
}), U = j(() => !m.value || q.value ? !1 : K.value === void 0), Q = j(() => v.value?.sendBlockedReason), pe = j(() => !B.value || Q.value !== void 0), Se = j(() => _.value ? "Agent is offline" : L.value ? "Connecting..." : Q.value === "agent_deleted" ? "This assistant was deleted" : Q.value === "account" ? "Resolve the billing issue above to continue" : "Message"), Ce = j(() => (n.value.trim() || h.value.length > 0) && !pe.value && !c.value), O = j(() => a.variant === "light"), gt = j(
|
|
2518
|
+
() => O.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
|
|
2519
|
+
), st = j(() => O.value ? "text-theme-300" : "text-white/30");
|
|
2520
|
+
Lt(async () => {
|
|
2521
|
+
a.chatController && !B.value && await a.chatController.startTextConversation();
|
|
2515
2522
|
});
|
|
2516
|
-
async function
|
|
2517
|
-
const
|
|
2518
|
-
if (!
|
|
2523
|
+
async function Y() {
|
|
2524
|
+
const R = n.value.trim(), b = h.value.length > 0;
|
|
2525
|
+
if (!R && !b || !a.chatController || pe.value || c.value)
|
|
2519
2526
|
return;
|
|
2520
|
-
const
|
|
2521
|
-
n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await a.chatController.sendChatMessage(
|
|
2527
|
+
const d = n.value, $ = b ? [...h.value] : void 0;
|
|
2528
|
+
n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await a.chatController.sendChatMessage(d, $);
|
|
2522
2529
|
}
|
|
2523
|
-
p(
|
|
2524
|
-
async function
|
|
2525
|
-
|
|
2530
|
+
p(Y, "sendMessage");
|
|
2531
|
+
async function $e(R) {
|
|
2532
|
+
R.key === "Enter" && !R.shiftKey && (R.preventDefault(), await Y());
|
|
2526
2533
|
}
|
|
2527
|
-
p(
|
|
2528
|
-
function
|
|
2534
|
+
p($e, "handleKeydown");
|
|
2535
|
+
function Pe() {
|
|
2529
2536
|
l.value && (l.value.style.height = "auto", l.value.style.height = `${Math.min(l.value.scrollHeight, 150)}px`);
|
|
2530
2537
|
}
|
|
2531
|
-
p(
|
|
2532
|
-
function
|
|
2538
|
+
p(Pe, "adjustTextareaHeight"), It(n, () => Bs(() => Pe()));
|
|
2539
|
+
function Be() {
|
|
2533
2540
|
o.value?.click();
|
|
2534
2541
|
}
|
|
2535
|
-
p(
|
|
2536
|
-
async function $
|
|
2537
|
-
const
|
|
2538
|
-
if (!(!
|
|
2542
|
+
p(Be, "triggerFileInput");
|
|
2543
|
+
async function $t(R) {
|
|
2544
|
+
const b = R.target, d = b.files?.[0];
|
|
2545
|
+
if (!(!d || !a.uploadFn)) {
|
|
2539
2546
|
c.value = !0;
|
|
2540
2547
|
try {
|
|
2541
|
-
const
|
|
2542
|
-
h.value = [...h.value,
|
|
2543
|
-
} catch (
|
|
2544
|
-
const
|
|
2545
|
-
a.chatController?.notify(`Upload failed — ${
|
|
2548
|
+
const $ = await a.uploadFn(d);
|
|
2549
|
+
h.value = [...h.value, $];
|
|
2550
|
+
} catch ($) {
|
|
2551
|
+
const C = $ instanceof Error ? $.message : "Couldn't attach that file.";
|
|
2552
|
+
a.chatController?.notify(`Upload failed — ${C}`);
|
|
2546
2553
|
} finally {
|
|
2547
|
-
c.value = !1,
|
|
2554
|
+
c.value = !1, b.value = "";
|
|
2548
2555
|
}
|
|
2549
2556
|
}
|
|
2550
2557
|
}
|
|
2551
|
-
p($
|
|
2552
|
-
function Pt(
|
|
2553
|
-
h.value = h.value.filter((
|
|
2558
|
+
p($t, "handleFileSelect");
|
|
2559
|
+
function Pt(R) {
|
|
2560
|
+
h.value = h.value.filter((b, d) => d !== R);
|
|
2554
2561
|
}
|
|
2555
2562
|
p(Pt, "removeAttachment");
|
|
2556
|
-
function mt(
|
|
2557
|
-
if (
|
|
2558
|
-
const
|
|
2559
|
-
return
|
|
2563
|
+
function mt(R, b) {
|
|
2564
|
+
if (b === 0) {
|
|
2565
|
+
const we = R[b];
|
|
2566
|
+
return we?.timestamp ? it(new Date(we.timestamp)) : null;
|
|
2560
2567
|
}
|
|
2561
|
-
const
|
|
2562
|
-
if (!
|
|
2563
|
-
const
|
|
2564
|
-
return new Date(
|
|
2568
|
+
const d = R[b - 1], $ = R[b];
|
|
2569
|
+
if (!d?.timestamp || !$?.timestamp) return null;
|
|
2570
|
+
const C = new Date(d.timestamp).getTime();
|
|
2571
|
+
return new Date($.timestamp).getTime() - C > 36e5 ? it(new Date($.timestamp)) : null;
|
|
2565
2572
|
}
|
|
2566
2573
|
p(mt, "shouldShowTimeDivider");
|
|
2567
|
-
function
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2570
|
-
const
|
|
2571
|
-
if (
|
|
2572
|
-
if (
|
|
2573
|
-
const
|
|
2574
|
-
return `${
|
|
2574
|
+
function it(R) {
|
|
2575
|
+
const b = /* @__PURE__ */ new Date(), d = R.toDateString() === b.toDateString(), $ = new Date(b);
|
|
2576
|
+
$.setDate($.getDate() - 1);
|
|
2577
|
+
const C = R.toDateString() === $.toDateString(), fe = R.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
|
|
2578
|
+
if (d) return fe;
|
|
2579
|
+
if (C) return `Yesterday, ${fe}`;
|
|
2580
|
+
const H = R.getFullYear() === b.getFullYear();
|
|
2581
|
+
return `${R.toLocaleDateString("en-US", {
|
|
2575
2582
|
weekday: "long",
|
|
2576
2583
|
month: "short",
|
|
2577
2584
|
day: "numeric",
|
|
2578
|
-
...
|
|
2579
|
-
})}, ${
|
|
2585
|
+
...H ? {} : { year: "numeric" }
|
|
2586
|
+
})}, ${fe}`;
|
|
2580
2587
|
}
|
|
2581
|
-
return p(
|
|
2582
|
-
|
|
2583
|
-
|
|
2588
|
+
return p(it, "formatTimeDivider"), (R, b) => (T(), S("div", _r, [
|
|
2589
|
+
O.value ? Z("", !0) : (T(), S("div", Rr, [
|
|
2590
|
+
We(ri, {
|
|
2584
2591
|
agent: a.agent,
|
|
2585
|
-
"is-online":
|
|
2592
|
+
"is-online": B.value
|
|
2586
2593
|
}, null, 8, ["agent", "is-online"])
|
|
2587
2594
|
])),
|
|
2588
|
-
|
|
2595
|
+
_.value ? (T(), S("div", {
|
|
2589
2596
|
key: 1,
|
|
2590
|
-
class:
|
|
2597
|
+
class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", O.value ? "text-theme-400" : "text-white/60"])
|
|
2591
2598
|
}, [
|
|
2592
|
-
|
|
2593
|
-
class:
|
|
2599
|
+
w("i", {
|
|
2600
|
+
class: A(["i-heroicons-cloud-arrow-down size-8", O.value ? "text-theme-300" : "text-white/40"])
|
|
2594
2601
|
}, null, 2),
|
|
2595
|
-
|
|
2596
|
-
], 2)) :
|
|
2602
|
+
w("span", null, le(P.value), 1)
|
|
2603
|
+
], 2)) : L.value ? (T(), S("div", {
|
|
2597
2604
|
key: 2,
|
|
2598
|
-
class:
|
|
2605
|
+
class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", O.value ? "text-theme-400" : "text-theme-600"])
|
|
2599
2606
|
}, [
|
|
2600
|
-
|
|
2607
|
+
We(jn, { class: "size-4" })
|
|
2601
2608
|
], 2)) : a.setupHint ? (T(), S("div", {
|
|
2602
2609
|
key: 3,
|
|
2603
|
-
class:
|
|
2610
|
+
class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", st.value])
|
|
2604
2611
|
}, [
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
], 2)) :
|
|
2608
|
-
|
|
2612
|
+
b[9] || (b[9] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
|
|
2613
|
+
w("span", null, le(a.setupHint), 1)
|
|
2614
|
+
], 2)) : Z("", !0),
|
|
2615
|
+
We(Er, {
|
|
2609
2616
|
ref_key: "chatScroller",
|
|
2610
2617
|
ref: s,
|
|
2611
2618
|
class: "flex-1"
|
|
2612
2619
|
}, {
|
|
2613
2620
|
default: Fs(() => [
|
|
2614
|
-
|
|
2615
|
-
class:
|
|
2621
|
+
w("div", {
|
|
2622
|
+
class: A(G.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3" : "pt-4 pb-[120px] px-3 space-y-1")
|
|
2616
2623
|
}, [
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2624
|
+
G.value.length === 0 && !L.value && !_.value ? (T(), S("div", Ir, [
|
|
2625
|
+
w("div", Dr, [
|
|
2626
|
+
w("img", {
|
|
2620
2627
|
src: a.agent.avatarUrl.value,
|
|
2621
2628
|
alt: a.agent.displayName.value,
|
|
2622
|
-
class:
|
|
2623
|
-
}, null, 10,
|
|
2624
|
-
|
|
2629
|
+
class: A(["size-full rounded-full object-cover ring-1", O.value ? "ring-black/5" : "ring-white/10"])
|
|
2630
|
+
}, null, 10, Cr),
|
|
2631
|
+
B.value ? (T(), S("span", {
|
|
2625
2632
|
key: 0,
|
|
2626
|
-
class:
|
|
2627
|
-
}, [...
|
|
2628
|
-
|
|
2629
|
-
])], 2)) :
|
|
2633
|
+
class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", O.value ? "bg-white" : "bg-theme-900"])
|
|
2634
|
+
}, [...b[10] || (b[10] = [
|
|
2635
|
+
w("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
|
|
2636
|
+
])], 2)) : Z("", !0)
|
|
2630
2637
|
]),
|
|
2631
|
-
|
|
2632
|
-
class:
|
|
2633
|
-
},
|
|
2634
|
-
|
|
2635
|
-
class:
|
|
2636
|
-
},
|
|
2637
|
-
|
|
2638
|
-
class:
|
|
2638
|
+
w("div", {
|
|
2639
|
+
class: A(["text-base @sm/chat:text-lg font-semibold", O.value ? "text-theme-900" : "text-white"])
|
|
2640
|
+
}, le(a.agent.displayName.value), 3),
|
|
2641
|
+
w("p", {
|
|
2642
|
+
class: A(["mt-1 text-center text-xs @sm/chat:text-sm", st.value])
|
|
2643
|
+
}, le(a.emptyStateMessage || "Type your message to get started."), 3),
|
|
2644
|
+
w("div", {
|
|
2645
|
+
class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", O.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
2639
2646
|
title: e.value.tooltip
|
|
2640
2647
|
}, [
|
|
2641
|
-
|
|
2642
|
-
class:
|
|
2648
|
+
w("i", {
|
|
2649
|
+
class: A([e.value.icon, "size-3"])
|
|
2643
2650
|
}, null, 2),
|
|
2644
|
-
|
|
2651
|
+
w("span", null, le(e.value.label), 1)
|
|
2645
2652
|
], 10, Or)
|
|
2646
|
-
])) :
|
|
2647
|
-
(T(!0), S(
|
|
2648
|
-
key:
|
|
2653
|
+
])) : Z("", !0),
|
|
2654
|
+
(T(!0), S(Xe, null, Kt(G.value, (d, $) => (T(), S(Xe, {
|
|
2655
|
+
key: d.id
|
|
2649
2656
|
}, [
|
|
2650
|
-
mt(
|
|
2651
|
-
|
|
2652
|
-
class:
|
|
2657
|
+
mt(G.value, $) ? (T(), S("div", Mr, [
|
|
2658
|
+
w("div", {
|
|
2659
|
+
class: A(["flex-1 h-px", gt.value])
|
|
2653
2660
|
}, null, 2),
|
|
2654
|
-
|
|
2655
|
-
class:
|
|
2656
|
-
},
|
|
2657
|
-
|
|
2658
|
-
class:
|
|
2661
|
+
w("span", {
|
|
2662
|
+
class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", st.value])
|
|
2663
|
+
}, le(mt(G.value, $)), 3),
|
|
2664
|
+
w("div", {
|
|
2665
|
+
class: A(["flex-1 h-px", gt.value])
|
|
2659
2666
|
}, null, 2)
|
|
2660
|
-
])) :
|
|
2661
|
-
|
|
2667
|
+
])) : Z("", !0),
|
|
2668
|
+
g(d) ? (T(), S("div", {
|
|
2662
2669
|
key: 1,
|
|
2663
2670
|
"data-test": "messaging-system-msg",
|
|
2664
|
-
"data-
|
|
2665
|
-
"data-
|
|
2671
|
+
"data-message-id": d.id,
|
|
2672
|
+
"data-message-sender": d.sender,
|
|
2673
|
+
"data-conversation-id": d.conversationId,
|
|
2674
|
+
"data-message-sequence": d.sequence,
|
|
2675
|
+
"data-system-kind": d.systemKind,
|
|
2676
|
+
"data-issue-code": d.issue?.code,
|
|
2677
|
+
"data-issue-bucket": d.issue?.bucket,
|
|
2678
|
+
"data-issue-action-label": d.issue?.actionLabel,
|
|
2679
|
+
"data-issue-action-url": d.issue?.actionUrl,
|
|
2680
|
+
"data-streaming": d.id === K.value ? "true" : void 0,
|
|
2666
2681
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
2667
2682
|
}, [
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
class:
|
|
2683
|
+
w("div", Nr, [
|
|
2684
|
+
w("div", {
|
|
2685
|
+
class: A(["mb-1 pl-1 text-[11px] font-medium", O.value ? "text-theme-500" : "text-white/45"])
|
|
2671
2686
|
}, " System Message ", 2),
|
|
2672
|
-
|
|
2673
|
-
class:
|
|
2687
|
+
w("div", {
|
|
2688
|
+
class: A(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", O.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
|
|
2674
2689
|
}, [
|
|
2675
|
-
|
|
2690
|
+
d.text ? (T(), Un(Rt, {
|
|
2676
2691
|
key: 0,
|
|
2677
|
-
text:
|
|
2678
|
-
inverted: !
|
|
2679
|
-
streaming:
|
|
2680
|
-
onClick:
|
|
2692
|
+
text: d.text,
|
|
2693
|
+
inverted: !O.value,
|
|
2694
|
+
streaming: d.id === K.value,
|
|
2695
|
+
onClick: b[0] || (b[0] = At(() => {
|
|
2681
2696
|
}, ["stop"]))
|
|
2682
|
-
}, null, 8, ["text", "inverted", "streaming"])) :
|
|
2697
|
+
}, null, 8, ["text", "inverted", "streaming"])) : d.issue?.help ? (T(), Un(Rt, {
|
|
2683
2698
|
key: 1,
|
|
2684
|
-
text:
|
|
2685
|
-
inverted: !
|
|
2686
|
-
}, null, 8, ["text", "inverted"])) :
|
|
2687
|
-
|
|
2699
|
+
text: d.issue.help,
|
|
2700
|
+
inverted: !O.value
|
|
2701
|
+
}, null, 8, ["text", "inverted"])) : Z("", !0),
|
|
2702
|
+
d.issue?.actionUrl && !y(d.text) ? (T(), S("a", {
|
|
2688
2703
|
key: 2,
|
|
2689
|
-
href:
|
|
2704
|
+
href: d.issue.actionUrl,
|
|
2690
2705
|
"data-test": "messaging-system-msg-action",
|
|
2691
|
-
class:
|
|
2692
|
-
onClick:
|
|
2706
|
+
class: A(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", O.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
2707
|
+
onClick: b[1] || (b[1] = At(() => {
|
|
2693
2708
|
}, ["stop"]))
|
|
2694
2709
|
}, [
|
|
2695
|
-
Hn(
|
|
2696
|
-
|
|
2697
|
-
], 10, zr)) :
|
|
2710
|
+
Hn(le(d.issue.actionLabel) + " ", 1),
|
|
2711
|
+
b[11] || (b[11] = w("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
|
|
2712
|
+
], 10, zr)) : Z("", !0)
|
|
2698
2713
|
], 2)
|
|
2699
2714
|
])
|
|
2700
|
-
], 8, Lr)) :
|
|
2715
|
+
], 8, Lr)) : d.sender === "system" ? (T(), S("div", {
|
|
2701
2716
|
key: 2,
|
|
2702
2717
|
"data-test": "messaging-system-status-msg",
|
|
2703
|
-
|
|
2718
|
+
"data-message-id": d.id,
|
|
2719
|
+
"data-message-sender": d.sender,
|
|
2720
|
+
"data-conversation-id": d.conversationId,
|
|
2721
|
+
"data-message-sequence": d.sequence,
|
|
2722
|
+
"data-system-kind": d.systemKind,
|
|
2723
|
+
"data-issue-code": d.issue?.code,
|
|
2724
|
+
"data-issue-bucket": d.issue?.bucket,
|
|
2725
|
+
"data-streaming": d.id === K.value ? "true" : void 0,
|
|
2726
|
+
class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", O.value ? "text-theme-500" : "text-white/60"])
|
|
2704
2727
|
}, [
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
text:
|
|
2708
|
-
inverted: !
|
|
2709
|
-
onClick:
|
|
2728
|
+
b[12] || (b[12] = w("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
|
|
2729
|
+
We(Rt, {
|
|
2730
|
+
text: d.text,
|
|
2731
|
+
inverted: !O.value,
|
|
2732
|
+
onClick: b[2] || (b[2] = At(() => {
|
|
2710
2733
|
}, ["stop"]))
|
|
2711
2734
|
}, null, 8, ["text", "inverted"])
|
|
2712
|
-
],
|
|
2735
|
+
], 10, $r)) : (T(), S("div", {
|
|
2713
2736
|
key: 3,
|
|
2714
|
-
"data-test":
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2737
|
+
"data-test": d.sender === "agent" ? "messaging-assistant-msg" : d.sender === "user" ? "messaging-user-msg" : void 0,
|
|
2738
|
+
"data-message-id": d.id,
|
|
2739
|
+
"data-message-sender": d.sender,
|
|
2740
|
+
"data-conversation-id": d.conversationId,
|
|
2741
|
+
"data-message-sequence": d.sequence,
|
|
2742
|
+
"data-system-kind": d.systemKind,
|
|
2743
|
+
"data-streaming": d.id === K.value ? "true" : void 0,
|
|
2744
|
+
class: A(["flex gap-2 items-end", {
|
|
2745
|
+
"justify-end": d.sender === "user",
|
|
2746
|
+
"justify-start": d.sender === "agent",
|
|
2747
|
+
"mb-4": x(G.value, $)
|
|
2719
2748
|
}])
|
|
2720
2749
|
}, [
|
|
2721
|
-
|
|
2722
|
-
|
|
2750
|
+
d.sender === "agent" ? (T(), S("div", Br, [
|
|
2751
|
+
x(G.value, $) ? (T(), S("img", {
|
|
2723
2752
|
key: 0,
|
|
2724
2753
|
src: a.agent.avatarUrl.value,
|
|
2725
2754
|
alt: a.agent.displayName.value,
|
|
2726
|
-
class:
|
|
2727
|
-
}, null, 10,
|
|
2728
|
-
])) :
|
|
2729
|
-
|
|
2730
|
-
class:
|
|
2755
|
+
class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", O.value ? "ring-1 ring-black/5" : ""])
|
|
2756
|
+
}, null, 10, Fr)) : Z("", !0)
|
|
2757
|
+
])) : Z("", !0),
|
|
2758
|
+
w("div", {
|
|
2759
|
+
class: A(d.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
|
|
2731
2760
|
}, [
|
|
2732
|
-
|
|
2761
|
+
d.attachments?.length ? (T(), S("div", {
|
|
2733
2762
|
key: 0,
|
|
2734
|
-
class:
|
|
2763
|
+
class: A(["mb-1 space-y-1", d.sender === "user" ? "flex flex-col items-end" : ""])
|
|
2735
2764
|
}, [
|
|
2736
|
-
(T(!0), S(
|
|
2737
|
-
|
|
2765
|
+
(T(!0), S(Xe, null, Kt(d.attachments, (C, fe) => (T(), S(Xe, { key: fe }, [
|
|
2766
|
+
C.type === "image" ? (T(), S("img", {
|
|
2738
2767
|
key: 0,
|
|
2739
|
-
src:
|
|
2740
|
-
alt:
|
|
2768
|
+
src: C.src,
|
|
2769
|
+
alt: C.filename,
|
|
2741
2770
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
2742
|
-
}, null, 8,
|
|
2771
|
+
}, null, 8, Ur)) : C.type === "audio" ? (T(), S("audio", {
|
|
2743
2772
|
key: 1,
|
|
2744
|
-
src:
|
|
2773
|
+
src: C.src,
|
|
2745
2774
|
controls: "",
|
|
2746
2775
|
class: "max-w-full"
|
|
2747
|
-
}, null, 8,
|
|
2776
|
+
}, null, 8, Hr)) : (T(), S("a", {
|
|
2748
2777
|
key: 2,
|
|
2749
|
-
href:
|
|
2778
|
+
href: C.src,
|
|
2750
2779
|
target: "_blank",
|
|
2751
2780
|
rel: "noopener",
|
|
2752
|
-
class:
|
|
2781
|
+
class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", O.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
2753
2782
|
}, [
|
|
2754
|
-
|
|
2755
|
-
Hn(" " +
|
|
2756
|
-
], 10,
|
|
2783
|
+
b[13] || (b[13] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
|
|
2784
|
+
Hn(" " + le(C.filename), 1)
|
|
2785
|
+
], 10, jr))
|
|
2757
2786
|
], 64))), 128))
|
|
2758
|
-
], 2)) :
|
|
2759
|
-
|
|
2787
|
+
], 2)) : Z("", !0),
|
|
2788
|
+
d.text ? (T(), S("div", {
|
|
2760
2789
|
key: 1,
|
|
2761
|
-
class:
|
|
2762
|
-
|
|
2790
|
+
class: A(["rounded-2xl px-3.5 py-2", [
|
|
2791
|
+
d.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : O.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
|
|
2763
2792
|
]])
|
|
2764
2793
|
}, [
|
|
2765
|
-
|
|
2766
|
-
text:
|
|
2767
|
-
inverted:
|
|
2768
|
-
streaming:
|
|
2769
|
-
onClick:
|
|
2794
|
+
We(Rt, {
|
|
2795
|
+
text: d.text,
|
|
2796
|
+
inverted: d.sender === "user" || !O.value,
|
|
2797
|
+
streaming: d.id === K.value,
|
|
2798
|
+
onClick: b[3] || (b[3] = At(() => {
|
|
2770
2799
|
}, ["stop"]))
|
|
2771
2800
|
}, null, 8, ["text", "inverted", "streaming"])
|
|
2772
|
-
], 2)) :
|
|
2801
|
+
], 2)) : Z("", !0)
|
|
2773
2802
|
], 2)
|
|
2774
|
-
], 10,
|
|
2803
|
+
], 10, Pr))
|
|
2775
2804
|
], 64))), 128)),
|
|
2776
|
-
|
|
2777
|
-
|
|
2805
|
+
q.value ? (T(), S("div", {
|
|
2806
|
+
key: 1,
|
|
2807
|
+
"data-test": "messaging-working-state",
|
|
2808
|
+
"data-working-description": q.value,
|
|
2809
|
+
class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", O.value ? "text-theme-500" : "text-white/45"])
|
|
2810
|
+
}, [
|
|
2811
|
+
b[14] || (b[14] = w("i", {
|
|
2812
|
+
class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
|
|
2813
|
+
"aria-hidden": "true"
|
|
2814
|
+
}, null, -1)),
|
|
2815
|
+
w("span", Wr, le(q.value), 1)
|
|
2816
|
+
], 10, Gr)) : Z("", !0),
|
|
2817
|
+
U.value ? (T(), S("div", qr, [
|
|
2818
|
+
w("img", {
|
|
2778
2819
|
src: a.agent.avatarUrl.value,
|
|
2779
2820
|
alt: a.agent.displayName.value,
|
|
2780
|
-
class:
|
|
2781
|
-
}, null, 10,
|
|
2782
|
-
|
|
2783
|
-
class:
|
|
2821
|
+
class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", O.value ? "ring-1 ring-black/5" : ""])
|
|
2822
|
+
}, null, 10, Yr),
|
|
2823
|
+
w("div", {
|
|
2824
|
+
class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", O.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
|
|
2784
2825
|
}, [
|
|
2785
|
-
|
|
2786
|
-
class:
|
|
2826
|
+
w("i", {
|
|
2827
|
+
class: A(["i-svg-spinners-3-dots-bounce size-7", O.value ? "text-theme-400" : "text-white/50"])
|
|
2787
2828
|
}, null, 2)
|
|
2788
2829
|
], 2)
|
|
2789
|
-
])) :
|
|
2830
|
+
])) : Z("", !0)
|
|
2790
2831
|
], 2)
|
|
2791
2832
|
]),
|
|
2792
2833
|
_: 1
|
|
2793
2834
|
}, 512),
|
|
2794
|
-
|
|
2795
|
-
class:
|
|
2835
|
+
w("div", {
|
|
2836
|
+
class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", O.value ? "bg-gradient-to-t from-theme-50/90 via-theme-50/55 to-transparent" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
|
|
2796
2837
|
}, [
|
|
2797
|
-
h.value.length > 0 ? (T(), S("div",
|
|
2798
|
-
(T(!0), S(
|
|
2799
|
-
key:
|
|
2838
|
+
h.value.length > 0 ? (T(), S("div", Vr, [
|
|
2839
|
+
(T(!0), S(Xe, null, Kt(h.value, (d, $) => (T(), S("div", {
|
|
2840
|
+
key: $,
|
|
2800
2841
|
class: "relative shrink-0 group"
|
|
2801
2842
|
}, [
|
|
2802
|
-
|
|
2843
|
+
d.type === "image" ? (T(), S("img", {
|
|
2803
2844
|
key: 0,
|
|
2804
|
-
src:
|
|
2805
|
-
alt:
|
|
2806
|
-
class:
|
|
2807
|
-
}, null, 10,
|
|
2845
|
+
src: d.src,
|
|
2846
|
+
alt: d.filename,
|
|
2847
|
+
class: A(["size-14 rounded-xl object-cover border", O.value ? "border-black/10" : "border-white/20"])
|
|
2848
|
+
}, null, 10, Zr)) : (T(), S("div", {
|
|
2808
2849
|
key: 1,
|
|
2809
|
-
class:
|
|
2850
|
+
class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", O.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
2810
2851
|
}, [
|
|
2811
|
-
|
|
2812
|
-
|
|
2852
|
+
b[15] || (b[15] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
|
|
2853
|
+
w("span", Xr, le(d.filename), 1)
|
|
2813
2854
|
], 2)),
|
|
2814
|
-
|
|
2855
|
+
w("button", {
|
|
2815
2856
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
|
|
2816
|
-
onClick: /* @__PURE__ */ p((
|
|
2817
|
-
}, [...
|
|
2818
|
-
|
|
2819
|
-
])], 8,
|
|
2857
|
+
onClick: /* @__PURE__ */ p((C) => Pt($), "onClick")
|
|
2858
|
+
}, [...b[16] || (b[16] = [
|
|
2859
|
+
w("i", { class: "i-tabler-x size-3" }, null, -1)
|
|
2860
|
+
])], 8, Kr)
|
|
2820
2861
|
]))), 128)),
|
|
2821
|
-
c.value ? (T(), S("div",
|
|
2822
|
-
|
|
2823
|
-
])) :
|
|
2824
|
-
])) :
|
|
2862
|
+
c.value ? (T(), S("div", Qr, [
|
|
2863
|
+
We(jn, { class: "size-5" })
|
|
2864
|
+
])) : Z("", !0)
|
|
2865
|
+
])) : Z("", !0),
|
|
2825
2866
|
a.uploadFn ? (T(), S("input", {
|
|
2826
2867
|
key: 1,
|
|
2827
2868
|
ref_key: "fileInput",
|
|
@@ -2829,55 +2870,55 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2829
2870
|
type: "file",
|
|
2830
2871
|
accept: "image/*,audio/*,video/*",
|
|
2831
2872
|
class: "hidden",
|
|
2832
|
-
onChange: $
|
|
2833
|
-
}, null, 544)) :
|
|
2834
|
-
|
|
2835
|
-
class:
|
|
2873
|
+
onChange: $t
|
|
2874
|
+
}, null, 544)) : Z("", !0),
|
|
2875
|
+
w("div", {
|
|
2876
|
+
class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", O.value ? i.value ? "bg-theme-50 ring-1 ring-theme-300" : "bg-theme-25 ring-1 ring-theme-200 hover:ring-theme-300" : i.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
|
|
2836
2877
|
}, [
|
|
2837
|
-
|
|
2838
|
-
class:
|
|
2878
|
+
w("button", {
|
|
2879
|
+
class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
|
|
2839
2880
|
a.uploadFn ? "cursor-pointer" : "cursor-default",
|
|
2840
|
-
|
|
2881
|
+
O.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
|
|
2841
2882
|
c.value ? "opacity-50 pointer-events-none" : ""
|
|
2842
2883
|
]]),
|
|
2843
|
-
disabled:
|
|
2844
|
-
onClick:
|
|
2884
|
+
disabled: pe.value || c.value || !a.uploadFn,
|
|
2885
|
+
onClick: b[4] || (b[4] = (d) => a.uploadFn && Be())
|
|
2845
2886
|
}, [
|
|
2846
|
-
c.value ? (T(), S("i",
|
|
2847
|
-
], 10,
|
|
2848
|
-
Us(
|
|
2887
|
+
c.value ? (T(), S("i", ea)) : (T(), S("i", ta))
|
|
2888
|
+
], 10, Jr),
|
|
2889
|
+
Us(w("textarea", {
|
|
2849
2890
|
ref_key: "textarea",
|
|
2850
2891
|
ref: l,
|
|
2851
|
-
"onUpdate:modelValue":
|
|
2892
|
+
"onUpdate:modelValue": b[5] || (b[5] = (d) => n.value = d),
|
|
2852
2893
|
"data-test": "messaging-input",
|
|
2853
2894
|
rows: "1",
|
|
2854
2895
|
enterkeyhint: "send",
|
|
2855
|
-
placeholder:
|
|
2856
|
-
disabled:
|
|
2896
|
+
placeholder: Se.value,
|
|
2897
|
+
disabled: pe.value,
|
|
2857
2898
|
style: { fontSize: "16px", resize: "none" },
|
|
2858
|
-
class:
|
|
2859
|
-
onKeydown:
|
|
2860
|
-
onFocus:
|
|
2861
|
-
onBlur:
|
|
2862
|
-
}, null, 42,
|
|
2899
|
+
class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", O.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
|
|
2900
|
+
onKeydown: $e,
|
|
2901
|
+
onFocus: b[6] || (b[6] = (d) => i.value = !0),
|
|
2902
|
+
onBlur: b[7] || (b[7] = (d) => i.value = !1)
|
|
2903
|
+
}, null, 42, na), [
|
|
2863
2904
|
[Hs, n.value]
|
|
2864
2905
|
]),
|
|
2865
|
-
|
|
2906
|
+
w("button", {
|
|
2866
2907
|
"data-test": "messaging-send-btn",
|
|
2867
|
-
class:
|
|
2868
|
-
disabled: !
|
|
2869
|
-
onClick:
|
|
2870
|
-
}, [...
|
|
2871
|
-
|
|
2872
|
-
])], 10,
|
|
2908
|
+
class: A(["shrink-0 flex items-center justify-center rounded-full transition-transform duration-200 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", Ce.value ? "bg-primary-500 text-white hover:scale-105 active:scale-95 cursor-pointer" : O.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
|
|
2909
|
+
disabled: !Ce.value,
|
|
2910
|
+
onClick: b[8] || (b[8] = (d) => Y())
|
|
2911
|
+
}, [...b[17] || (b[17] = [
|
|
2912
|
+
w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
|
|
2913
|
+
])], 10, sa)
|
|
2873
2914
|
], 2)
|
|
2874
2915
|
], 2)
|
|
2875
2916
|
]));
|
|
2876
2917
|
}
|
|
2877
|
-
}),
|
|
2918
|
+
}), ia = { class: "agent-wrap" }, ra = {
|
|
2878
2919
|
key: 0,
|
|
2879
2920
|
class: "flex items-center justify-center h-full"
|
|
2880
|
-
},
|
|
2921
|
+
}, ma = /* @__PURE__ */ Te({
|
|
2881
2922
|
__name: "AgentWrap",
|
|
2882
2923
|
props: {
|
|
2883
2924
|
sdk: {},
|
|
@@ -2895,7 +2936,7 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2895
2936
|
isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
|
|
2896
2937
|
...e.apiBase && { apiBase: e.apiBase }
|
|
2897
2938
|
}), i = ie(!e.agent), s = fs(e.agent ? new Dt({ config: e.agent }) : void 0), l = ie();
|
|
2898
|
-
return
|
|
2939
|
+
return Lt(async () => {
|
|
2899
2940
|
if (e.agent) {
|
|
2900
2941
|
t.debug("Agent provided via props, skipping fetch", {
|
|
2901
2942
|
agentId: e.agent.agentId,
|
|
@@ -2971,9 +3012,9 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2971
3012
|
}
|
|
2972
3013
|
});
|
|
2973
3014
|
}
|
|
2974
|
-
}), (o, h) => (T(), S("div",
|
|
2975
|
-
i.value ? (T(), S("div",
|
|
2976
|
-
|
|
3015
|
+
}), (o, h) => (T(), S("div", ia, [
|
|
3016
|
+
i.value ? (T(), S("div", ra, [...h[0] || (h[0] = [
|
|
3017
|
+
w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
|
|
2977
3018
|
])])) : s.value ? on(o.$slots, "default", {
|
|
2978
3019
|
key: 1,
|
|
2979
3020
|
sdk: sn(n),
|
|
@@ -2983,21 +3024,21 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
|
|
|
2983
3024
|
buttonText: a.buttonText,
|
|
2984
3025
|
buttonIcon: a.buttonIcon,
|
|
2985
3026
|
loading: i.value
|
|
2986
|
-
}) :
|
|
3027
|
+
}) : Z("", !0)
|
|
2987
3028
|
]));
|
|
2988
3029
|
}
|
|
2989
3030
|
});
|
|
2990
3031
|
export {
|
|
2991
3032
|
Wn as A,
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
3033
|
+
ma as _,
|
|
3034
|
+
ga as a,
|
|
3035
|
+
pa as b,
|
|
3036
|
+
da as c,
|
|
3037
|
+
fa as d,
|
|
2997
3038
|
jn as e,
|
|
2998
3039
|
ri as f,
|
|
2999
|
-
|
|
3040
|
+
ua as g,
|
|
3000
3041
|
Yn as h,
|
|
3001
|
-
|
|
3042
|
+
ha as p
|
|
3002
3043
|
};
|
|
3003
3044
|
//# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map
|