@pagelines/sdk 1.0.175 → 1.0.176
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-BcA-vKJA.js → AgentProvider.vue_vue_type_script_setup_true_lang-B44BDgFU.js} +2 -2
- package/dist/{AgentProvider.vue_vue_type_script_setup_true_lang-BcA-vKJA.js.map → AgentProvider.vue_vue_type_script_setup_true_lang-B44BDgFU.js.map} +1 -1
- package/dist/{AgentWidgetInline-CDZ4ifAG.js → AgentWidgetInline-b18G4d9H.js} +2 -2
- package/dist/{AgentWidgetInline-CDZ4ifAG.js.map → AgentWidgetInline-b18G4d9H.js.map} +1 -1
- package/dist/{AgentWidgetModal-DEOFJAGX.js → AgentWidgetModal-BeNIGtLh.js} +2 -2
- package/dist/{AgentWidgetModal-DEOFJAGX.js.map → AgentWidgetModal-BeNIGtLh.js.map} +1 -1
- package/dist/{AgentWidgetPopup-BvjHKgNn.js → AgentWidgetPopup-aZcXa7Bs.js} +29 -29
- package/dist/AgentWidgetPopup-aZcXa7Bs.js.map +1 -0
- package/dist/{AgentWrap.vue_vue_type_script_setup_true_lang-DKVTVwEy.js → AgentWrap.vue_vue_type_script_setup_true_lang-CeEcZnMh.js} +553 -589
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang-CeEcZnMh.js.map +1 -0
- package/dist/agent/utils.d.ts +2 -3
- package/dist/agent.js +52 -52
- package/dist/agent.js.map +1 -1
- package/dist/sdk.css +1 -1
- package/dist/widget.js +3 -3
- package/package.json +2 -2
- package/dist/AgentWidgetPopup-BvjHKgNn.js.map +0 -1
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang-DKVTVwEy.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (n, t) =>
|
|
4
|
-
var R = (n, t, e) =>
|
|
5
|
-
import { defineComponent as se, createElementBlock as v, openBlock as b, createElementVNode as p, normalizeClass as _, ref as W, watch as Be, createBlock as me, TransitionGroup as
|
|
1
|
+
var sn = Object.defineProperty;
|
|
2
|
+
var Ss = (n, t, e) => t in n ? sn(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var i = (n, t) => sn(n, "name", { value: t, configurable: !0 });
|
|
4
|
+
var R = (n, t, e) => Ss(n, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
+
import { defineComponent as se, createElementBlock as v, openBlock as b, createElementVNode as p, normalizeClass as _, ref as W, watch as Be, createBlock as me, TransitionGroup as zn, withCtx as Se, renderSlot as ht, computed as U, createCommentVNode as $, onMounted as Et, Fragment as Ae, renderList as Ct, withDirectives as Ln, vModelText as Dn, toDisplayString as Z, createVNode as J, withKeys as Ts, createTextVNode as Tt, unref as ne, resolveDynamicComponent as Es, nextTick as cr, Transition as on, withModifiers as kr, normalizeStyle as $n, shallowRef as Cs, onUnmounted as Rs } from "vue";
|
|
6
6
|
import { S as it } from "./socialPlatforms-Ck-b3SnQ.js";
|
|
7
|
-
import { S as
|
|
8
|
-
|
|
7
|
+
import { S as On, c as Is, P as Ms } from "./sdkClient--jt-zUDx.js";
|
|
8
|
+
import { getDefaultAvatarUrl as Xt } from "@pagelines/types";
|
|
9
|
+
const _s = { class: "spinner max-w-sm" }, zs = {
|
|
9
10
|
class: "ring-circular h-full w-full origin-center",
|
|
10
11
|
viewBox: "25 25 50 50"
|
|
11
12
|
}, Er = /* @__PURE__ */ se({
|
|
@@ -15,8 +16,8 @@ const Ls = { class: "spinner max-w-sm" }, Ds = {
|
|
|
15
16
|
colorMode: { type: String, default: "primary" }
|
|
16
17
|
},
|
|
17
18
|
setup(n) {
|
|
18
|
-
return (t, e) => (b(), v("div",
|
|
19
|
-
(b(), v("svg",
|
|
19
|
+
return (t, e) => (b(), v("div", _s, [
|
|
20
|
+
(b(), v("svg", zs, [
|
|
20
21
|
p("circle", {
|
|
21
22
|
class: _([n.colorMode, "ring-path"]),
|
|
22
23
|
cx: "50",
|
|
@@ -30,7 +31,7 @@ const Ls = { class: "spinner max-w-sm" }, Ds = {
|
|
|
30
31
|
]))
|
|
31
32
|
]));
|
|
32
33
|
}
|
|
33
|
-
}),
|
|
34
|
+
}), an = {
|
|
34
35
|
green: {
|
|
35
36
|
50: "oklch(98.2% 0.018 155.826)",
|
|
36
37
|
100: "oklch(96.2% 0.044 156.743)",
|
|
@@ -162,11 +163,11 @@ const Ls = { class: "spinner max-w-sm" }, Ds = {
|
|
|
162
163
|
950: "oklch(29.3% 0.066 243.157)"
|
|
163
164
|
}
|
|
164
165
|
};
|
|
165
|
-
function
|
|
166
|
-
return
|
|
166
|
+
function Ls(n) {
|
|
167
|
+
return an[n] || an.blue;
|
|
167
168
|
}
|
|
168
|
-
i(
|
|
169
|
-
const
|
|
169
|
+
i(Ls, "getColorSchemeOklch");
|
|
170
|
+
const Pn = [
|
|
170
171
|
{
|
|
171
172
|
mode: "self",
|
|
172
173
|
label: "Overview",
|
|
@@ -187,7 +188,7 @@ const Bn = [
|
|
|
187
188
|
label: "About",
|
|
188
189
|
icon: "i-tabler-user-circle"
|
|
189
190
|
}
|
|
190
|
-
],
|
|
191
|
+
], Ds = 256, $s = 0.8, Os = 50, El = {
|
|
191
192
|
bars: 64,
|
|
192
193
|
barWidth: 3,
|
|
193
194
|
barSpacing: 1,
|
|
@@ -200,7 +201,7 @@ const Bn = [
|
|
|
200
201
|
// ms to hold peaks
|
|
201
202
|
PEAK_DECAY_STIFFNESS: 0.12,
|
|
202
203
|
PEAK_DECAY_DAMPING: 0.15
|
|
203
|
-
},
|
|
204
|
+
}, Cl = [
|
|
204
205
|
// Low fundamentals
|
|
205
206
|
85,
|
|
206
207
|
100,
|
|
@@ -274,7 +275,7 @@ const Bn = [
|
|
|
274
275
|
7500,
|
|
275
276
|
8e3,
|
|
276
277
|
8500
|
|
277
|
-
],
|
|
278
|
+
], Br = class Br extends On {
|
|
278
279
|
constructor(e) {
|
|
279
280
|
super("ClientAudio", e);
|
|
280
281
|
R(this, "audioContext");
|
|
@@ -388,7 +389,7 @@ const Bn = [
|
|
|
388
389
|
if (!this.stream)
|
|
389
390
|
throw new Error("No audio stream available");
|
|
390
391
|
try {
|
|
391
|
-
this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.microphone = this.audioContext.createMediaStreamSource(this.stream), this.analyser.fftSize =
|
|
392
|
+
this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.microphone = this.audioContext.createMediaStreamSource(this.stream), this.analyser.fftSize = Ds, this.analyser.smoothingTimeConstant = $s, this.microphone.connect(this.analyser), this.logger.info("Audio analysis setup complete", {
|
|
392
393
|
fftSize: this.analyser.fftSize,
|
|
393
394
|
frequencyBinCount: this.analyser.frequencyBinCount,
|
|
394
395
|
sampleRate: this.audioContext.sampleRate
|
|
@@ -440,7 +441,7 @@ const Bn = [
|
|
|
440
441
|
this.logger.error("Async error in audio level monitoring:", l);
|
|
441
442
|
});
|
|
442
443
|
}, "intervalWrapper");
|
|
443
|
-
this.audioLevelInterval = window.setInterval(a,
|
|
444
|
+
this.audioLevelInterval = window.setInterval(a, Os);
|
|
444
445
|
}
|
|
445
446
|
/**
|
|
446
447
|
* Stop monitoring audio levels
|
|
@@ -487,57 +488,22 @@ const Bn = [
|
|
|
487
488
|
await this.stopMicrophone(), this.visibilityChangeHandler && typeof document < "u" && (document.removeEventListener("visibilitychange", this.visibilityChangeHandler), this.visibilityChangeHandler = void 0), this.logger.info("Audio resources cleaned up");
|
|
488
489
|
}
|
|
489
490
|
};
|
|
490
|
-
i(
|
|
491
|
-
let xr =
|
|
492
|
-
|
|
493
|
-
["#6366f1", "#8b5cf6"],
|
|
494
|
-
["#3b82f6", "#06b6d4"],
|
|
495
|
-
["#10b981", "#34d399"],
|
|
496
|
-
["#f59e0b", "#f97316"],
|
|
497
|
-
["#ef4444", "#f97316"],
|
|
498
|
-
["#ec4899", "#8b5cf6"],
|
|
499
|
-
["#14b8a6", "#3b82f6"],
|
|
500
|
-
["#8b5cf6", "#ec4899"]
|
|
501
|
-
];
|
|
502
|
-
function Bs(n) {
|
|
503
|
-
let t = 0;
|
|
504
|
-
for (let e = 0; e < n.length; e++)
|
|
505
|
-
t = (t << 5) - t + n.charCodeAt(e), t |= 0;
|
|
506
|
-
return Math.abs(t);
|
|
507
|
-
}
|
|
508
|
-
i(Bs, "hashName");
|
|
509
|
-
function Cr(n) {
|
|
510
|
-
const t = n ? n[0].toUpperCase() : "?", e = n ? Bs(n) : 0, [r, s] = cn[e % cn.length], o = [
|
|
511
|
-
'<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">',
|
|
512
|
-
'<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1">',
|
|
513
|
-
`<stop offset="0%" stop-color="${r}"/>`,
|
|
514
|
-
`<stop offset="100%" stop-color="${s}"/>`,
|
|
515
|
-
"</linearGradient></defs>",
|
|
516
|
-
'<rect width="80" height="80" fill="url(#g)"/>',
|
|
517
|
-
`<text x="40" y="40" text-anchor="middle" dominant-baseline="central" fill="white" font-family="system-ui,-apple-system,sans-serif" font-size="36" font-weight="600">${t}</text>`,
|
|
518
|
-
"</svg>"
|
|
519
|
-
].join("");
|
|
520
|
-
return `data:image/svg+xml;base64,${btoa(o)}`;
|
|
521
|
-
}
|
|
522
|
-
i(Cr, "getDefaultAvatarUrl");
|
|
523
|
-
function un(n) {
|
|
491
|
+
i(Br, "ClientAudio");
|
|
492
|
+
let xr = Br;
|
|
493
|
+
function ln(n) {
|
|
524
494
|
return n ? typeof n == "string" ? n : n.src || "" : "";
|
|
525
495
|
}
|
|
526
|
-
i(
|
|
496
|
+
i(ln, "getImageSrc");
|
|
527
497
|
function Vt(n) {
|
|
528
|
-
return
|
|
498
|
+
return ln(n.cover) || ln(n.avatar) || Xt(n.name);
|
|
529
499
|
}
|
|
530
500
|
i(Vt, "getAgentAvatarUrl");
|
|
531
|
-
function
|
|
532
|
-
return Cr(n);
|
|
533
|
-
}
|
|
534
|
-
i(Et, "getFallbackAvatarDataUrl");
|
|
535
|
-
function Wt(n) {
|
|
501
|
+
function jt(n) {
|
|
536
502
|
const t = n.target;
|
|
537
|
-
t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src =
|
|
503
|
+
t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Xt());
|
|
538
504
|
}
|
|
539
|
-
i(
|
|
540
|
-
function
|
|
505
|
+
i(jt, "handleImageError");
|
|
506
|
+
function Ps(n) {
|
|
541
507
|
const { message: t, source: e } = n;
|
|
542
508
|
if (!t)
|
|
543
509
|
return null;
|
|
@@ -565,18 +531,18 @@ function Us(n) {
|
|
|
565
531
|
}
|
|
566
532
|
return null;
|
|
567
533
|
}
|
|
568
|
-
i(
|
|
569
|
-
function
|
|
534
|
+
i(Ps, "parseVoiceMessage");
|
|
535
|
+
function Rl(n) {
|
|
570
536
|
const { name: t, context: e } = n;
|
|
571
537
|
return e === "welcome" ? `Welcome! I'm ${t}, your AI agent. I'm here to help you understand how I can represent you and assist with your daily tasks. What would you like to know about how I work?` : e === "onboarding" ? `Hi! I'm ${t}, your newly created AI agent. I can handle conversations, answer questions about your expertise, and represent you professionally. Ready to see what I can do?` : `Hello! I'm ${t}. How can I help you today?`;
|
|
572
538
|
}
|
|
573
|
-
i(
|
|
574
|
-
function
|
|
539
|
+
i(Rl, "generateFirstMessage");
|
|
540
|
+
function Ns(n) {
|
|
575
541
|
const { template: t, agent: e } = n;
|
|
576
542
|
return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
|
|
577
543
|
}
|
|
578
|
-
i(
|
|
579
|
-
const
|
|
544
|
+
i(Ns, "parseButtonTemplate");
|
|
545
|
+
const Ur = class Ur extends On {
|
|
580
546
|
constructor(e) {
|
|
581
547
|
super("AgentController", e);
|
|
582
548
|
R(this, "conversation");
|
|
@@ -696,7 +662,7 @@ Current User:
|
|
|
696
662
|
});
|
|
697
663
|
}
|
|
698
664
|
handleMessage(e, r) {
|
|
699
|
-
const s =
|
|
665
|
+
const s = Ps(e);
|
|
700
666
|
s && (r && s.sender === "user" && this.logger.info("User transcription received", { text: s.text }), this.addMessage(s.text, s.sender), !r && s.sender === "agent" && this.updateState(this.textState, { isThinking: !1 }));
|
|
701
667
|
}
|
|
702
668
|
handleError(e, r) {
|
|
@@ -834,16 +800,16 @@ Current User:
|
|
|
834
800
|
this.sessionId = void 0, this.conversationStartTime = void 0;
|
|
835
801
|
}
|
|
836
802
|
};
|
|
837
|
-
i(
|
|
838
|
-
let vr =
|
|
839
|
-
const
|
|
803
|
+
i(Ur, "AgentController");
|
|
804
|
+
let vr = Ur;
|
|
805
|
+
const Bs = /* @__PURE__ */ se({
|
|
840
806
|
__name: "EffectTransitionList",
|
|
841
807
|
props: {
|
|
842
808
|
disabled: { type: Boolean, default: !1 },
|
|
843
809
|
mode: { default: "block" }
|
|
844
810
|
},
|
|
845
811
|
setup(n) {
|
|
846
|
-
return (t, e) => (b(), me(
|
|
812
|
+
return (t, e) => (b(), me(zn, {
|
|
847
813
|
name: n.disabled ? "" : "nlist"
|
|
848
814
|
}, {
|
|
849
815
|
default: Se(() => [
|
|
@@ -852,10 +818,10 @@ const Hs = /* @__PURE__ */ se({
|
|
|
852
818
|
_: 3
|
|
853
819
|
}, 8, ["name"]));
|
|
854
820
|
}
|
|
855
|
-
}),
|
|
821
|
+
}), Us = {
|
|
856
822
|
key: 0,
|
|
857
823
|
class: "absolute inset-0 flex items-center justify-center"
|
|
858
|
-
},
|
|
824
|
+
}, Nn = /* @__PURE__ */ se({
|
|
859
825
|
__name: "ElAgentButton",
|
|
860
826
|
props: {
|
|
861
827
|
theme: { default: "primary" },
|
|
@@ -882,7 +848,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
882
848
|
return (s, o) => (b(), v("button", {
|
|
883
849
|
class: _(["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]])
|
|
884
850
|
}, [
|
|
885
|
-
n.loading ? (b(), v("div",
|
|
851
|
+
n.loading ? (b(), v("div", Us, [...o[0] || (o[0] = [
|
|
886
852
|
p("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
|
|
887
853
|
])])) : $("", !0),
|
|
888
854
|
p("span", {
|
|
@@ -900,7 +866,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
900
866
|
], 2)
|
|
901
867
|
], 2));
|
|
902
868
|
}
|
|
903
|
-
}),
|
|
869
|
+
}), Fs = ["value"], Hs = /* @__PURE__ */ se({
|
|
904
870
|
__name: "AgentInputEmail",
|
|
905
871
|
props: {
|
|
906
872
|
modelValue: { default: "" }
|
|
@@ -916,9 +882,9 @@ const Hs = /* @__PURE__ */ se({
|
|
|
916
882
|
class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-all",
|
|
917
883
|
style: { "font-size": "16px" },
|
|
918
884
|
onInput: s[0] || (s[0] = (o) => e("update:modelValue", o.target.value))
|
|
919
|
-
}, null, 40,
|
|
885
|
+
}, null, 40, Fs));
|
|
920
886
|
}
|
|
921
|
-
}),
|
|
887
|
+
}), Vs = { class: "flex gap-1.5 justify-center" }, Gs = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], js = /* @__PURE__ */ se({
|
|
922
888
|
__name: "AgentInputOneTimeCode",
|
|
923
889
|
props: {
|
|
924
890
|
modelValue: {},
|
|
@@ -928,7 +894,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
928
894
|
emits: ["update:modelValue", "autoSubmit"],
|
|
929
895
|
setup(n, { emit: t }) {
|
|
930
896
|
const e = n, r = t, s = W([]), o = W(Array.from({ length: e.length }).fill("")), a = W(!1);
|
|
931
|
-
|
|
897
|
+
Et(() => {
|
|
932
898
|
e.modelValue && (o.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
|
|
933
899
|
}), Be(() => e.modelValue, (g) => {
|
|
934
900
|
o.value = g ? g.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
|
|
@@ -969,8 +935,8 @@ const Hs = /* @__PURE__ */ se({
|
|
|
969
935
|
for (let f = g; f < e.length; f++)
|
|
970
936
|
o.value[f] = "";
|
|
971
937
|
}
|
|
972
|
-
return i(h, "onFocus"), (g, f) => (b(), v("div",
|
|
973
|
-
(b(!0), v(Ae, null,
|
|
938
|
+
return i(h, "onFocus"), (g, f) => (b(), v("div", Vs, [
|
|
939
|
+
(b(!0), v(Ae, null, Ct(n.length, (k) => Ln((b(), v("input", {
|
|
974
940
|
key: k,
|
|
975
941
|
ref_for: !0,
|
|
976
942
|
ref: /* @__PURE__ */ i((M) => s.value[k - 1] = M, "ref"),
|
|
@@ -985,21 +951,21 @@ const Hs = /* @__PURE__ */ se({
|
|
|
985
951
|
onKeydown: /* @__PURE__ */ i((M) => d(k - 1, M), "onKeydown"),
|
|
986
952
|
onPaste: /* @__PURE__ */ i((M) => l(k - 1, M), "onPaste"),
|
|
987
953
|
onFocus: /* @__PURE__ */ i((M) => h(k - 1), "onFocus")
|
|
988
|
-
}, null, 40,
|
|
989
|
-
[
|
|
954
|
+
}, null, 40, Gs)), [
|
|
955
|
+
[Dn, o.value[k - 1]]
|
|
990
956
|
])), 128))
|
|
991
957
|
]));
|
|
992
958
|
}
|
|
993
|
-
}),
|
|
959
|
+
}), Ws = ["data-test-mode"], qs = { class: "w-full max-w-xs space-y-12" }, Ys = {
|
|
994
960
|
key: 0,
|
|
995
961
|
class: "text-xs text-theme-400 text-center"
|
|
996
|
-
},
|
|
962
|
+
}, Zs = { class: "text-base font-light text-white text-center" }, Xs = { class: "space-y-6 relative" }, Ks = {
|
|
997
963
|
key: "email-field",
|
|
998
964
|
class: "w-full"
|
|
999
|
-
},
|
|
965
|
+
}, Qs = {
|
|
1000
966
|
key: "code-field",
|
|
1001
967
|
class: "w-full"
|
|
1002
|
-
},
|
|
968
|
+
}, cn = /* @__PURE__ */ se({
|
|
1003
969
|
__name: "ElAuthGate",
|
|
1004
970
|
props: {
|
|
1005
971
|
sdk: {}
|
|
@@ -1042,21 +1008,21 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1042
1008
|
"data-test-mode": e.value,
|
|
1043
1009
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
1044
1010
|
}, [
|
|
1045
|
-
p("div",
|
|
1046
|
-
n.sdk.error.value ? (b(), v("p",
|
|
1047
|
-
p("h3",
|
|
1048
|
-
p("div",
|
|
1049
|
-
|
|
1011
|
+
p("div", qs, [
|
|
1012
|
+
n.sdk.error.value ? (b(), v("p", Ys, Z(n.sdk.error.value), 1)) : $("", !0),
|
|
1013
|
+
p("h3", Zs, Z(o.value.title), 1),
|
|
1014
|
+
p("div", Xs, [
|
|
1015
|
+
J(Bs, null, {
|
|
1050
1016
|
default: Se(() => [
|
|
1051
|
-
e.value === "email" ? (b(), v("div",
|
|
1052
|
-
|
|
1017
|
+
e.value === "email" ? (b(), v("div", Ks, [
|
|
1018
|
+
J(Hs, {
|
|
1053
1019
|
modelValue: t.value.email,
|
|
1054
1020
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => t.value.email = c),
|
|
1055
1021
|
"data-test": "auth-email-input",
|
|
1056
|
-
onKeyup:
|
|
1022
|
+
onKeyup: Ts(o.value.action, ["enter"])
|
|
1057
1023
|
}, null, 8, ["modelValue", "onKeyup"])
|
|
1058
|
-
])) : (b(), v("div",
|
|
1059
|
-
|
|
1024
|
+
])) : (b(), v("div", Qs, [
|
|
1025
|
+
J(js, {
|
|
1060
1026
|
modelValue: t.value.code,
|
|
1061
1027
|
"onUpdate:modelValue": l[1] || (l[1] = (c) => t.value.code = c),
|
|
1062
1028
|
length: 6,
|
|
@@ -1069,7 +1035,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1069
1035
|
key: o.value.button.label,
|
|
1070
1036
|
class: "space-y-4 w-full"
|
|
1071
1037
|
}, [
|
|
1072
|
-
|
|
1038
|
+
J(Nn, {
|
|
1073
1039
|
theme: "primary",
|
|
1074
1040
|
size: "md",
|
|
1075
1041
|
class: "w-full",
|
|
@@ -1094,12 +1060,12 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1094
1060
|
})
|
|
1095
1061
|
])
|
|
1096
1062
|
])
|
|
1097
|
-
], 8,
|
|
1063
|
+
], 8, Ws));
|
|
1098
1064
|
}
|
|
1099
|
-
}),
|
|
1065
|
+
}), Js = { class: "relative flex-shrink-0" }, eo = ["src", "alt"], to = {
|
|
1100
1066
|
key: 0,
|
|
1101
1067
|
class: "absolute top-1 right-1"
|
|
1102
|
-
},
|
|
1068
|
+
}, ro = { class: "min-w-0" }, Cr = /* @__PURE__ */ se({
|
|
1103
1069
|
__name: "ElModeHeader",
|
|
1104
1070
|
props: {
|
|
1105
1071
|
agent: {},
|
|
@@ -1109,14 +1075,14 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1109
1075
|
},
|
|
1110
1076
|
setup(n) {
|
|
1111
1077
|
function t() {
|
|
1112
|
-
return n.agent.avatar?.src ||
|
|
1078
|
+
return n.agent.avatar?.src || Xt(n.agent.name);
|
|
1113
1079
|
}
|
|
1114
1080
|
return i(t, "getAvatarSrc"), (e, r) => (b(), v("div", {
|
|
1115
1081
|
class: _(["flex gap-4", [
|
|
1116
1082
|
n.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
|
|
1117
1083
|
]])
|
|
1118
1084
|
}, [
|
|
1119
|
-
p("div",
|
|
1085
|
+
p("div", Js, [
|
|
1120
1086
|
p("div", {
|
|
1121
1087
|
class: _(["rounded-full overflow-hidden border-white", n.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
|
|
1122
1088
|
}, [
|
|
@@ -1125,10 +1091,10 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1125
1091
|
alt: n.agent.name,
|
|
1126
1092
|
class: "w-full h-full object-cover",
|
|
1127
1093
|
onError: r[0] || (r[0] = //@ts-ignore
|
|
1128
|
-
(...s) =>
|
|
1129
|
-
}, null, 40,
|
|
1094
|
+
(...s) => ne(jt) && ne(jt)(...s))
|
|
1095
|
+
}, null, 40, eo)
|
|
1130
1096
|
], 2),
|
|
1131
|
-
n.showOnlineIndicator ? (b(), v("div",
|
|
1097
|
+
n.showOnlineIndicator ? (b(), v("div", to, [...r[1] || (r[1] = [
|
|
1132
1098
|
p("div", {
|
|
1133
1099
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
1134
1100
|
style: { "animation-duration": "3s" }
|
|
@@ -1136,7 +1102,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1136
1102
|
p("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1)
|
|
1137
1103
|
])])) : $("", !0)
|
|
1138
1104
|
]),
|
|
1139
|
-
p("div",
|
|
1105
|
+
p("div", ro, [
|
|
1140
1106
|
p("h1", {
|
|
1141
1107
|
class: _(["font-light text-white mb-1 truncate", [
|
|
1142
1108
|
n.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
|
|
@@ -1152,114 +1118,114 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1152
1118
|
])
|
|
1153
1119
|
], 2));
|
|
1154
1120
|
}
|
|
1155
|
-
}),
|
|
1121
|
+
}), no = /* @__PURE__ */ i((n, t) => {
|
|
1156
1122
|
const e = new Array(n.length + t.length);
|
|
1157
1123
|
for (let r = 0; r < n.length; r++)
|
|
1158
1124
|
e[r] = n[r];
|
|
1159
1125
|
for (let r = 0; r < t.length; r++)
|
|
1160
1126
|
e[n.length + r] = t[r];
|
|
1161
1127
|
return e;
|
|
1162
|
-
}, "concatArrays"),
|
|
1128
|
+
}, "concatArrays"), so = /* @__PURE__ */ i((n, t) => ({
|
|
1163
1129
|
classGroupId: n,
|
|
1164
1130
|
validator: t
|
|
1165
|
-
}), "createClassValidatorObject"),
|
|
1131
|
+
}), "createClassValidatorObject"), Bn = /* @__PURE__ */ i((n = /* @__PURE__ */ new Map(), t = null, e) => ({
|
|
1166
1132
|
nextPart: n,
|
|
1167
1133
|
validators: t,
|
|
1168
1134
|
classGroupId: e
|
|
1169
|
-
}), "createClassPartObject"),
|
|
1170
|
-
const t =
|
|
1135
|
+
}), "createClassPartObject"), Wt = "-", un = [], oo = "arbitrary..", ao = /* @__PURE__ */ i((n) => {
|
|
1136
|
+
const t = lo(n), {
|
|
1171
1137
|
conflictingClassGroups: e,
|
|
1172
1138
|
conflictingClassGroupModifiers: r
|
|
1173
1139
|
} = n;
|
|
1174
1140
|
return {
|
|
1175
1141
|
getClassGroupId: /* @__PURE__ */ i((a) => {
|
|
1176
1142
|
if (a.startsWith("[") && a.endsWith("]"))
|
|
1177
|
-
return
|
|
1178
|
-
const l = a.split(
|
|
1179
|
-
return
|
|
1143
|
+
return io(a);
|
|
1144
|
+
const l = a.split(Wt), c = l[0] === "" && l.length > 1 ? 1 : 0;
|
|
1145
|
+
return Un(l, c, t);
|
|
1180
1146
|
}, "getClassGroupId"),
|
|
1181
1147
|
getConflictingClassGroupIds: /* @__PURE__ */ i((a, l) => {
|
|
1182
1148
|
if (l) {
|
|
1183
1149
|
const c = r[a], d = e[a];
|
|
1184
|
-
return c ? d ?
|
|
1150
|
+
return c ? d ? no(d, c) : c : d || un;
|
|
1185
1151
|
}
|
|
1186
|
-
return e[a] ||
|
|
1152
|
+
return e[a] || un;
|
|
1187
1153
|
}, "getConflictingClassGroupIds")
|
|
1188
1154
|
};
|
|
1189
|
-
}, "createClassGroupUtils"),
|
|
1155
|
+
}, "createClassGroupUtils"), Un = /* @__PURE__ */ i((n, t, e) => {
|
|
1190
1156
|
if (n.length - t === 0)
|
|
1191
1157
|
return e.classGroupId;
|
|
1192
1158
|
const s = n[t], o = e.nextPart.get(s);
|
|
1193
1159
|
if (o) {
|
|
1194
|
-
const d =
|
|
1160
|
+
const d = Un(n, t + 1, o);
|
|
1195
1161
|
if (d) return d;
|
|
1196
1162
|
}
|
|
1197
1163
|
const a = e.validators;
|
|
1198
1164
|
if (a === null)
|
|
1199
1165
|
return;
|
|
1200
|
-
const l = t === 0 ? n.join(
|
|
1166
|
+
const l = t === 0 ? n.join(Wt) : n.slice(t).join(Wt), c = a.length;
|
|
1201
1167
|
for (let d = 0; d < c; d++) {
|
|
1202
1168
|
const h = a[d];
|
|
1203
1169
|
if (h.validator(l))
|
|
1204
1170
|
return h.classGroupId;
|
|
1205
1171
|
}
|
|
1206
|
-
}, "getGroupRecursive"),
|
|
1172
|
+
}, "getGroupRecursive"), io = /* @__PURE__ */ i((n) => n.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
1207
1173
|
const t = n.slice(1, -1), e = t.indexOf(":"), r = t.slice(0, e);
|
|
1208
|
-
return r ?
|
|
1209
|
-
})(), "getGroupIdForArbitraryProperty"),
|
|
1174
|
+
return r ? oo + r : void 0;
|
|
1175
|
+
})(), "getGroupIdForArbitraryProperty"), lo = /* @__PURE__ */ i((n) => {
|
|
1210
1176
|
const {
|
|
1211
1177
|
theme: t,
|
|
1212
1178
|
classGroups: e
|
|
1213
1179
|
} = n;
|
|
1214
|
-
return
|
|
1215
|
-
}, "createClassMap"),
|
|
1216
|
-
const e =
|
|
1180
|
+
return co(e, t);
|
|
1181
|
+
}, "createClassMap"), co = /* @__PURE__ */ i((n, t) => {
|
|
1182
|
+
const e = Bn();
|
|
1217
1183
|
for (const r in n) {
|
|
1218
1184
|
const s = n[r];
|
|
1219
|
-
|
|
1185
|
+
Rr(s, e, r, t);
|
|
1220
1186
|
}
|
|
1221
1187
|
return e;
|
|
1222
|
-
}, "processClassGroups"),
|
|
1188
|
+
}, "processClassGroups"), Rr = /* @__PURE__ */ i((n, t, e, r) => {
|
|
1223
1189
|
const s = n.length;
|
|
1224
1190
|
for (let o = 0; o < s; o++) {
|
|
1225
1191
|
const a = n[o];
|
|
1226
|
-
|
|
1192
|
+
uo(a, t, e, r);
|
|
1227
1193
|
}
|
|
1228
|
-
}, "processClassesRecursively"),
|
|
1194
|
+
}, "processClassesRecursively"), uo = /* @__PURE__ */ i((n, t, e, r) => {
|
|
1229
1195
|
if (typeof n == "string") {
|
|
1230
|
-
|
|
1196
|
+
ho(n, t, e);
|
|
1231
1197
|
return;
|
|
1232
1198
|
}
|
|
1233
1199
|
if (typeof n == "function") {
|
|
1234
|
-
|
|
1200
|
+
go(n, t, e, r);
|
|
1235
1201
|
return;
|
|
1236
1202
|
}
|
|
1237
|
-
|
|
1238
|
-
}, "processClassDefinition"),
|
|
1239
|
-
const r = n === "" ? t :
|
|
1203
|
+
po(n, t, e, r);
|
|
1204
|
+
}, "processClassDefinition"), ho = /* @__PURE__ */ i((n, t, e) => {
|
|
1205
|
+
const r = n === "" ? t : Fn(t, n);
|
|
1240
1206
|
r.classGroupId = e;
|
|
1241
|
-
}, "processStringDefinition"),
|
|
1242
|
-
if (
|
|
1243
|
-
|
|
1207
|
+
}, "processStringDefinition"), go = /* @__PURE__ */ i((n, t, e, r) => {
|
|
1208
|
+
if (fo(n)) {
|
|
1209
|
+
Rr(n(r), t, e, r);
|
|
1244
1210
|
return;
|
|
1245
1211
|
}
|
|
1246
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
1247
|
-
}, "processFunctionDefinition"),
|
|
1212
|
+
t.validators === null && (t.validators = []), t.validators.push(so(e, n));
|
|
1213
|
+
}, "processFunctionDefinition"), po = /* @__PURE__ */ i((n, t, e, r) => {
|
|
1248
1214
|
const s = Object.entries(n), o = s.length;
|
|
1249
1215
|
for (let a = 0; a < o; a++) {
|
|
1250
1216
|
const [l, c] = s[a];
|
|
1251
|
-
|
|
1217
|
+
Rr(c, Fn(t, l), e, r);
|
|
1252
1218
|
}
|
|
1253
|
-
}, "processObjectDefinition"),
|
|
1219
|
+
}, "processObjectDefinition"), Fn = /* @__PURE__ */ i((n, t) => {
|
|
1254
1220
|
let e = n;
|
|
1255
|
-
const r = t.split(
|
|
1221
|
+
const r = t.split(Wt), s = r.length;
|
|
1256
1222
|
for (let o = 0; o < s; o++) {
|
|
1257
1223
|
const a = r[o];
|
|
1258
1224
|
let l = e.nextPart.get(a);
|
|
1259
|
-
l || (l =
|
|
1225
|
+
l || (l = Bn(), e.nextPart.set(a, l)), e = l;
|
|
1260
1226
|
}
|
|
1261
1227
|
return e;
|
|
1262
|
-
}, "getPart"),
|
|
1228
|
+
}, "getPart"), fo = /* @__PURE__ */ i((n) => "isThemeGetter" in n && n.isThemeGetter === !0, "isThemeGetter"), mo = /* @__PURE__ */ i((n) => {
|
|
1263
1229
|
if (n < 1)
|
|
1264
1230
|
return {
|
|
1265
1231
|
get: /* @__PURE__ */ i(() => {
|
|
@@ -1283,13 +1249,13 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1283
1249
|
o in e ? e[o] = a : s(o, a);
|
|
1284
1250
|
}
|
|
1285
1251
|
};
|
|
1286
|
-
}, "createLruCache"), yr = "!",
|
|
1252
|
+
}, "createLruCache"), yr = "!", dn = ":", bo = [], hn = /* @__PURE__ */ i((n, t, e, r, s) => ({
|
|
1287
1253
|
modifiers: n,
|
|
1288
1254
|
hasImportantModifier: t,
|
|
1289
1255
|
baseClassName: e,
|
|
1290
1256
|
maybePostfixModifierPosition: r,
|
|
1291
1257
|
isExternal: s
|
|
1292
|
-
}), "createResultObject"),
|
|
1258
|
+
}), "createResultObject"), ko = /* @__PURE__ */ i((n) => {
|
|
1293
1259
|
const {
|
|
1294
1260
|
prefix: t,
|
|
1295
1261
|
experimentalParseClassName: e
|
|
@@ -1301,7 +1267,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1301
1267
|
for (let E = 0; E < h; E++) {
|
|
1302
1268
|
const N = s[E];
|
|
1303
1269
|
if (a === 0 && l === 0) {
|
|
1304
|
-
if (N ===
|
|
1270
|
+
if (N === dn) {
|
|
1305
1271
|
o.push(s.slice(c, E)), c = E + 1;
|
|
1306
1272
|
continue;
|
|
1307
1273
|
}
|
|
@@ -1322,11 +1288,11 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1322
1288
|
g.startsWith(yr) && (f = g.slice(1), k = !0)
|
|
1323
1289
|
);
|
|
1324
1290
|
const M = d && d > c ? d - c : void 0;
|
|
1325
|
-
return
|
|
1291
|
+
return hn(o, k, f, M);
|
|
1326
1292
|
}, "parseClassName");
|
|
1327
1293
|
if (t) {
|
|
1328
|
-
const s = t +
|
|
1329
|
-
r = /* @__PURE__ */ i((a) => a.startsWith(s) ? o(a.slice(s.length)) :
|
|
1294
|
+
const s = t + dn, o = r;
|
|
1295
|
+
r = /* @__PURE__ */ i((a) => a.startsWith(s) ? o(a.slice(s.length)) : hn(bo, !1, a, void 0, !0), "parseClassName");
|
|
1330
1296
|
}
|
|
1331
1297
|
if (e) {
|
|
1332
1298
|
const s = r;
|
|
@@ -1336,7 +1302,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1336
1302
|
}), "parseClassName");
|
|
1337
1303
|
}
|
|
1338
1304
|
return r;
|
|
1339
|
-
}, "createParseClassName"),
|
|
1305
|
+
}, "createParseClassName"), xo = /* @__PURE__ */ i((n) => {
|
|
1340
1306
|
const t = /* @__PURE__ */ new Map();
|
|
1341
1307
|
return n.orderSensitiveModifiers.forEach((e, r) => {
|
|
1342
1308
|
t.set(e, 1e6 + r);
|
|
@@ -1349,18 +1315,18 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1349
1315
|
}
|
|
1350
1316
|
return s.length > 0 && (s.sort(), r.push(...s)), r;
|
|
1351
1317
|
};
|
|
1352
|
-
}, "createSortModifiers"),
|
|
1353
|
-
cache:
|
|
1354
|
-
parseClassName:
|
|
1355
|
-
sortModifiers:
|
|
1356
|
-
...
|
|
1357
|
-
}), "createConfigUtils"),
|
|
1318
|
+
}, "createSortModifiers"), vo = /* @__PURE__ */ i((n) => ({
|
|
1319
|
+
cache: mo(n.cacheSize),
|
|
1320
|
+
parseClassName: ko(n),
|
|
1321
|
+
sortModifiers: xo(n),
|
|
1322
|
+
...ao(n)
|
|
1323
|
+
}), "createConfigUtils"), yo = /\s+/, wo = /* @__PURE__ */ i((n, t) => {
|
|
1358
1324
|
const {
|
|
1359
1325
|
parseClassName: e,
|
|
1360
1326
|
getClassGroupId: r,
|
|
1361
1327
|
getConflictingClassGroupIds: s,
|
|
1362
1328
|
sortModifiers: o
|
|
1363
|
-
} = t, a = [], l = n.trim().split(
|
|
1329
|
+
} = t, a = [], l = n.trim().split(yo);
|
|
1364
1330
|
let c = "";
|
|
1365
1331
|
for (let d = l.length - 1; d >= 0; d -= 1) {
|
|
1366
1332
|
const h = l[d], {
|
|
@@ -1392,52 +1358,52 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1392
1358
|
a.push(w);
|
|
1393
1359
|
const B = s(X, N);
|
|
1394
1360
|
for (let H = 0; H < B.length; ++H) {
|
|
1395
|
-
const
|
|
1396
|
-
a.push(x +
|
|
1361
|
+
const ee = B[H];
|
|
1362
|
+
a.push(x + ee);
|
|
1397
1363
|
}
|
|
1398
1364
|
c = h + (c.length > 0 ? " " + c : c);
|
|
1399
1365
|
}
|
|
1400
1366
|
return c;
|
|
1401
|
-
}, "mergeClassList"),
|
|
1367
|
+
}, "mergeClassList"), Ao = /* @__PURE__ */ i((...n) => {
|
|
1402
1368
|
let t = 0, e, r, s = "";
|
|
1403
1369
|
for (; t < n.length; )
|
|
1404
|
-
(e = n[t++]) && (r =
|
|
1370
|
+
(e = n[t++]) && (r = Hn(e)) && (s && (s += " "), s += r);
|
|
1405
1371
|
return s;
|
|
1406
|
-
}, "twJoin"),
|
|
1372
|
+
}, "twJoin"), Hn = /* @__PURE__ */ i((n) => {
|
|
1407
1373
|
if (typeof n == "string")
|
|
1408
1374
|
return n;
|
|
1409
1375
|
let t, e = "";
|
|
1410
1376
|
for (let r = 0; r < n.length; r++)
|
|
1411
|
-
n[r] && (t =
|
|
1377
|
+
n[r] && (t = Hn(n[r])) && (e && (e += " "), e += t);
|
|
1412
1378
|
return e;
|
|
1413
|
-
}, "toValue"),
|
|
1379
|
+
}, "toValue"), So = /* @__PURE__ */ i((n, ...t) => {
|
|
1414
1380
|
let e, r, s, o;
|
|
1415
1381
|
const a = /* @__PURE__ */ i((c) => {
|
|
1416
1382
|
const d = t.reduce((h, g) => g(h), n());
|
|
1417
|
-
return e =
|
|
1383
|
+
return e = vo(d), r = e.cache.get, s = e.cache.set, o = l, l(c);
|
|
1418
1384
|
}, "initTailwindMerge"), l = /* @__PURE__ */ i((c) => {
|
|
1419
1385
|
const d = r(c);
|
|
1420
1386
|
if (d)
|
|
1421
1387
|
return d;
|
|
1422
|
-
const h =
|
|
1388
|
+
const h = wo(c, e);
|
|
1423
1389
|
return s(c, h), h;
|
|
1424
1390
|
}, "tailwindMerge");
|
|
1425
|
-
return o = a, (...c) => o(
|
|
1426
|
-
}, "createTailwindMerge"),
|
|
1427
|
-
const t = /* @__PURE__ */ i((e) => e[n] ||
|
|
1391
|
+
return o = a, (...c) => o(Ao(...c));
|
|
1392
|
+
}, "createTailwindMerge"), To = [], Q = /* @__PURE__ */ i((n) => {
|
|
1393
|
+
const t = /* @__PURE__ */ i((e) => e[n] || To, "themeGetter");
|
|
1428
1394
|
return t.isThemeGetter = !0, t;
|
|
1429
|
-
}, "fromTheme"),
|
|
1395
|
+
}, "fromTheme"), Vn = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Gn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Eo = /^\d+\/\d+$/, Co = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ro = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Io = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Mo = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _o = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, at = /* @__PURE__ */ i((n) => Eo.test(n), "isFraction"), L = /* @__PURE__ */ i((n) => !!n && !Number.isNaN(Number(n)), "isNumber"), $e = /* @__PURE__ */ i((n) => !!n && Number.isInteger(Number(n)), "isInteger"), ur = /* @__PURE__ */ i((n) => n.endsWith("%") && L(n.slice(0, -1)), "isPercent"), Me = /* @__PURE__ */ i((n) => Co.test(n), "isTshirtSize"), jn = /* @__PURE__ */ i(() => !0, "isAny"), zo = /* @__PURE__ */ i((n) => (
|
|
1430
1396
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1431
1397
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1432
1398
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1433
|
-
|
|
1434
|
-
), "isLengthOnly"),
|
|
1435
|
-
const r =
|
|
1399
|
+
Ro.test(n) && !Io.test(n)
|
|
1400
|
+
), "isLengthOnly"), Ir = /* @__PURE__ */ i(() => !1, "isNever"), Lo = /* @__PURE__ */ i((n) => Mo.test(n), "isShadow"), Do = /* @__PURE__ */ i((n) => _o.test(n), "isImage"), $o = /* @__PURE__ */ i((n) => !A(n) && !S(n), "isAnyNonArbitrary"), Oo = /* @__PURE__ */ i((n) => Ue(n, Yn, Ir), "isArbitrarySize"), A = /* @__PURE__ */ i((n) => Vn.test(n), "isArbitraryValue"), We = /* @__PURE__ */ i((n) => Ue(n, Zn, zo), "isArbitraryLength"), gn = /* @__PURE__ */ i((n) => Ue(n, Go, L), "isArbitraryNumber"), Po = /* @__PURE__ */ i((n) => Ue(n, Kn, jn), "isArbitraryWeight"), No = /* @__PURE__ */ i((n) => Ue(n, Xn, Ir), "isArbitraryFamilyName"), pn = /* @__PURE__ */ i((n) => Ue(n, Wn, Ir), "isArbitraryPosition"), Bo = /* @__PURE__ */ i((n) => Ue(n, qn, Do), "isArbitraryImage"), Nt = /* @__PURE__ */ i((n) => Ue(n, Qn, Lo), "isArbitraryShadow"), S = /* @__PURE__ */ i((n) => Gn.test(n), "isArbitraryVariable"), mt = /* @__PURE__ */ i((n) => Ze(n, Zn), "isArbitraryVariableLength"), Uo = /* @__PURE__ */ i((n) => Ze(n, Xn), "isArbitraryVariableFamilyName"), fn = /* @__PURE__ */ i((n) => Ze(n, Wn), "isArbitraryVariablePosition"), Fo = /* @__PURE__ */ i((n) => Ze(n, Yn), "isArbitraryVariableSize"), Ho = /* @__PURE__ */ i((n) => Ze(n, qn), "isArbitraryVariableImage"), Bt = /* @__PURE__ */ i((n) => Ze(n, Qn, !0), "isArbitraryVariableShadow"), Vo = /* @__PURE__ */ i((n) => Ze(n, Kn, !0), "isArbitraryVariableWeight"), Ue = /* @__PURE__ */ i((n, t, e) => {
|
|
1401
|
+
const r = Vn.exec(n);
|
|
1436
1402
|
return r ? r[1] ? t(r[1]) : e(r[2]) : !1;
|
|
1437
1403
|
}, "getIsArbitraryValue"), Ze = /* @__PURE__ */ i((n, t, e = !1) => {
|
|
1438
|
-
const r =
|
|
1404
|
+
const r = Gn.exec(n);
|
|
1439
1405
|
return r ? r[1] ? t(r[1]) : e : !1;
|
|
1440
|
-
}, "getIsArbitraryVariable"),
|
|
1406
|
+
}, "getIsArbitraryVariable"), Wn = /* @__PURE__ */ i((n) => n === "position" || n === "percentage", "isLabelPosition"), qn = /* @__PURE__ */ i((n) => n === "image" || n === "url", "isLabelImage"), Yn = /* @__PURE__ */ i((n) => n === "length" || n === "size" || n === "bg-size", "isLabelSize"), Zn = /* @__PURE__ */ i((n) => n === "length", "isLabelLength"), Go = /* @__PURE__ */ i((n) => n === "number", "isLabelNumber"), Xn = /* @__PURE__ */ i((n) => n === "family-name", "isLabelFamilyName"), Kn = /* @__PURE__ */ i((n) => n === "number" || n === "weight", "isLabelWeight"), Qn = /* @__PURE__ */ i((n) => n === "shadow", "isLabelShadow"), jo = /* @__PURE__ */ i(() => {
|
|
1441
1407
|
const n = Q("color"), t = Q("font"), e = Q("text"), r = Q("font-weight"), s = Q("tracking"), o = Q("leading"), a = Q("breakpoint"), l = Q("container"), c = Q("spacing"), d = Q("radius"), h = Q("shadow"), g = Q("inset-shadow"), f = Q("text-shadow"), k = Q("drop-shadow"), M = Q("blur"), E = Q("perspective"), N = Q("aspect"), X = Q("ease"), y = Q("animate"), x = /* @__PURE__ */ i(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), w = /* @__PURE__ */ i(() => [
|
|
1442
1408
|
"center",
|
|
1443
1409
|
"top",
|
|
@@ -1456,13 +1422,13 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1456
1422
|
"bottom-left",
|
|
1457
1423
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1458
1424
|
"left-bottom"
|
|
1459
|
-
], "scalePosition"), B = /* @__PURE__ */ i(() => [...w(), S, A], "scalePositionWithArbitrary"), H = /* @__PURE__ */ i(() => ["auto", "hidden", "clip", "visible", "scroll"], "scaleOverflow"),
|
|
1425
|
+
], "scalePosition"), B = /* @__PURE__ */ i(() => [...w(), S, A], "scalePositionWithArbitrary"), H = /* @__PURE__ */ i(() => ["auto", "hidden", "clip", "visible", "scroll"], "scaleOverflow"), ee = /* @__PURE__ */ i(() => ["auto", "contain", "none"], "scaleOverscroll"), z = /* @__PURE__ */ i(() => [S, A, c], "scaleUnambiguousSpacing"), ie = /* @__PURE__ */ i(() => [at, "full", "auto", ...z()], "scaleInset"), It = /* @__PURE__ */ i(() => [$e, "none", "subgrid", S, A], "scaleGridTemplateColsRows"), te = /* @__PURE__ */ i(() => ["auto", {
|
|
1460
1426
|
span: ["full", $e, S, A]
|
|
1461
|
-
}, $e, S, A], "scaleGridColRowStartAndEnd"), _e = /* @__PURE__ */ i(() => [$e, "auto", S, A], "scaleGridColRowStartOrEnd"), Ke = /* @__PURE__ */ i(() => ["auto", "min", "max", "fr", S, A], "scaleGridAutoColsRows"), Fe = /* @__PURE__ */ i(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), ze = /* @__PURE__ */ i(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), pe = /* @__PURE__ */ i(() => ["auto", ...z()], "scaleMargin"), Te = /* @__PURE__ */ i(() => [at, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...z()], "scaleSizing"), I = /* @__PURE__ */ i(() => [n, S, A], "scaleColor"),
|
|
1427
|
+
}, $e, S, A], "scaleGridColRowStartAndEnd"), _e = /* @__PURE__ */ i(() => [$e, "auto", S, A], "scaleGridColRowStartOrEnd"), Ke = /* @__PURE__ */ i(() => ["auto", "min", "max", "fr", S, A], "scaleGridAutoColsRows"), Fe = /* @__PURE__ */ i(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), ze = /* @__PURE__ */ i(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), pe = /* @__PURE__ */ i(() => ["auto", ...z()], "scaleMargin"), Te = /* @__PURE__ */ i(() => [at, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...z()], "scaleSizing"), I = /* @__PURE__ */ i(() => [n, S, A], "scaleColor"), Mt = /* @__PURE__ */ i(() => [...w(), fn, pn, {
|
|
1462
1428
|
position: [S, A]
|
|
1463
1429
|
}], "scaleBgPosition"), gt = /* @__PURE__ */ i(() => ["no-repeat", {
|
|
1464
1430
|
repeat: ["", "x", "y", "space", "round"]
|
|
1465
|
-
}], "scaleBgRepeat"), q = /* @__PURE__ */ i(() => ["auto", "cover", "contain",
|
|
1431
|
+
}], "scaleBgRepeat"), q = /* @__PURE__ */ i(() => ["auto", "cover", "contain", Fo, Oo, {
|
|
1466
1432
|
size: [S, A]
|
|
1467
1433
|
}], "scaleBgSize"), Qe = /* @__PURE__ */ i(() => [ur, mt, We], "scaleGradientStopPosition"), P = /* @__PURE__ */ i(() => [
|
|
1468
1434
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -1472,14 +1438,14 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1472
1438
|
d,
|
|
1473
1439
|
S,
|
|
1474
1440
|
A
|
|
1475
|
-
], "scaleRadius"), oe = /* @__PURE__ */ i(() => ["", L, mt, We], "scaleBorderWidth"),
|
|
1441
|
+
], "scaleRadius"), oe = /* @__PURE__ */ i(() => ["", L, mt, We], "scaleBorderWidth"), V = /* @__PURE__ */ i(() => ["solid", "dashed", "dotted", "double"], "scaleLineStyle"), Le = /* @__PURE__ */ i(() => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], "scaleBlendMode"), j = /* @__PURE__ */ i(() => [L, ur, fn, pn], "scaleMaskImagePosition"), Ee = /* @__PURE__ */ i(() => [
|
|
1476
1442
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1477
1443
|
"",
|
|
1478
1444
|
"none",
|
|
1479
1445
|
M,
|
|
1480
1446
|
S,
|
|
1481
1447
|
A
|
|
1482
|
-
], "scaleBlur"), He = /* @__PURE__ */ i(() => ["none", L, S, A], "scaleRotate"), De = /* @__PURE__ */ i(() => ["none", L, S, A], "scaleScale"), Je = /* @__PURE__ */ i(() => [L, S, A], "scaleSkew"),
|
|
1448
|
+
], "scaleBlur"), He = /* @__PURE__ */ i(() => ["none", L, S, A], "scaleRotate"), De = /* @__PURE__ */ i(() => ["none", L, S, A], "scaleScale"), Je = /* @__PURE__ */ i(() => [L, S, A], "scaleSkew"), Ve = /* @__PURE__ */ i(() => [at, "full", ...z()], "scaleTranslate");
|
|
1483
1449
|
return {
|
|
1484
1450
|
cacheSize: 500,
|
|
1485
1451
|
theme: {
|
|
@@ -1487,11 +1453,11 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1487
1453
|
aspect: ["video"],
|
|
1488
1454
|
blur: [Me],
|
|
1489
1455
|
breakpoint: [Me],
|
|
1490
|
-
color: [
|
|
1456
|
+
color: [jn],
|
|
1491
1457
|
container: [Me],
|
|
1492
1458
|
"drop-shadow": [Me],
|
|
1493
1459
|
ease: ["in", "out", "in-out"],
|
|
1494
|
-
font: [
|
|
1460
|
+
font: [$o],
|
|
1495
1461
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
1496
1462
|
"inset-shadow": [Me],
|
|
1497
1463
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -1631,21 +1597,21 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1631
1597
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1632
1598
|
*/
|
|
1633
1599
|
overscroll: [{
|
|
1634
|
-
overscroll:
|
|
1600
|
+
overscroll: ee()
|
|
1635
1601
|
}],
|
|
1636
1602
|
/**
|
|
1637
1603
|
* Overscroll Behavior X
|
|
1638
1604
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1639
1605
|
*/
|
|
1640
1606
|
"overscroll-x": [{
|
|
1641
|
-
"overscroll-x":
|
|
1607
|
+
"overscroll-x": ee()
|
|
1642
1608
|
}],
|
|
1643
1609
|
/**
|
|
1644
1610
|
* Overscroll Behavior Y
|
|
1645
1611
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1646
1612
|
*/
|
|
1647
1613
|
"overscroll-y": [{
|
|
1648
|
-
"overscroll-y":
|
|
1614
|
+
"overscroll-y": ee()
|
|
1649
1615
|
}],
|
|
1650
1616
|
/**
|
|
1651
1617
|
* Position
|
|
@@ -1784,14 +1750,14 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1784
1750
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1785
1751
|
*/
|
|
1786
1752
|
"grid-cols": [{
|
|
1787
|
-
"grid-cols":
|
|
1753
|
+
"grid-cols": It()
|
|
1788
1754
|
}],
|
|
1789
1755
|
/**
|
|
1790
1756
|
* Grid Column Start / End
|
|
1791
1757
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1792
1758
|
*/
|
|
1793
1759
|
"col-start-end": [{
|
|
1794
|
-
col:
|
|
1760
|
+
col: te()
|
|
1795
1761
|
}],
|
|
1796
1762
|
/**
|
|
1797
1763
|
* Grid Column Start
|
|
@@ -1812,14 +1778,14 @@ const Hs = /* @__PURE__ */ se({
|
|
|
1812
1778
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1813
1779
|
*/
|
|
1814
1780
|
"grid-rows": [{
|
|
1815
|
-
"grid-rows":
|
|
1781
|
+
"grid-rows": It()
|
|
1816
1782
|
}],
|
|
1817
1783
|
/**
|
|
1818
1784
|
* Grid Row Start / End
|
|
1819
1785
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1820
1786
|
*/
|
|
1821
1787
|
"row-start-end": [{
|
|
1822
|
-
row:
|
|
1788
|
+
row: te()
|
|
1823
1789
|
}],
|
|
1824
1790
|
/**
|
|
1825
1791
|
* Grid Row Start
|
|
@@ -2189,7 +2155,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2189
2155
|
* @see https://tailwindcss.com/docs/font-weight
|
|
2190
2156
|
*/
|
|
2191
2157
|
"font-weight": [{
|
|
2192
|
-
font: [r,
|
|
2158
|
+
font: [r, Vo, Po]
|
|
2193
2159
|
}],
|
|
2194
2160
|
/**
|
|
2195
2161
|
* Font Stretch
|
|
@@ -2203,7 +2169,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2203
2169
|
* @see https://tailwindcss.com/docs/font-family
|
|
2204
2170
|
*/
|
|
2205
2171
|
"font-family": [{
|
|
2206
|
-
font: [
|
|
2172
|
+
font: [Uo, No, t]
|
|
2207
2173
|
}],
|
|
2208
2174
|
/**
|
|
2209
2175
|
* Font Variant Numeric
|
|
@@ -2247,7 +2213,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2247
2213
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
2248
2214
|
*/
|
|
2249
2215
|
"line-clamp": [{
|
|
2250
|
-
"line-clamp": [L, "none", S,
|
|
2216
|
+
"line-clamp": [L, "none", S, gn]
|
|
2251
2217
|
}],
|
|
2252
2218
|
/**
|
|
2253
2219
|
* Line Height
|
|
@@ -2313,7 +2279,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2313
2279
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
2314
2280
|
*/
|
|
2315
2281
|
"text-decoration-style": [{
|
|
2316
|
-
decoration: [...
|
|
2282
|
+
decoration: [...V(), "wavy"]
|
|
2317
2283
|
}],
|
|
2318
2284
|
/**
|
|
2319
2285
|
* Text Decoration Thickness
|
|
@@ -2431,7 +2397,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2431
2397
|
* @see https://tailwindcss.com/docs/background-position
|
|
2432
2398
|
*/
|
|
2433
2399
|
"bg-position": [{
|
|
2434
|
-
bg:
|
|
2400
|
+
bg: Mt()
|
|
2435
2401
|
}],
|
|
2436
2402
|
/**
|
|
2437
2403
|
* Background Repeat
|
|
@@ -2458,7 +2424,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2458
2424
|
}, $e, S, A],
|
|
2459
2425
|
radial: ["", S, A],
|
|
2460
2426
|
conic: [$e, S, A]
|
|
2461
|
-
},
|
|
2427
|
+
}, Ho, Bo]
|
|
2462
2428
|
}],
|
|
2463
2429
|
/**
|
|
2464
2430
|
* Background Color
|
|
@@ -2709,14 +2675,14 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2709
2675
|
* @see https://tailwindcss.com/docs/border-style
|
|
2710
2676
|
*/
|
|
2711
2677
|
"border-style": [{
|
|
2712
|
-
border: [...
|
|
2678
|
+
border: [...V(), "hidden", "none"]
|
|
2713
2679
|
}],
|
|
2714
2680
|
/**
|
|
2715
2681
|
* Divide Style
|
|
2716
2682
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2717
2683
|
*/
|
|
2718
2684
|
"divide-style": [{
|
|
2719
|
-
divide: [...
|
|
2685
|
+
divide: [...V(), "hidden", "none"]
|
|
2720
2686
|
}],
|
|
2721
2687
|
/**
|
|
2722
2688
|
* Border Color
|
|
@@ -2793,7 +2759,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2793
2759
|
* @see https://tailwindcss.com/docs/outline-style
|
|
2794
2760
|
*/
|
|
2795
2761
|
"outline-style": [{
|
|
2796
|
-
outline: [...
|
|
2762
|
+
outline: [...V(), "none", "hidden"]
|
|
2797
2763
|
}],
|
|
2798
2764
|
/**
|
|
2799
2765
|
* Outline Offset
|
|
@@ -2829,8 +2795,8 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2829
2795
|
"",
|
|
2830
2796
|
"none",
|
|
2831
2797
|
h,
|
|
2832
|
-
|
|
2833
|
-
|
|
2798
|
+
Bt,
|
|
2799
|
+
Nt
|
|
2834
2800
|
]
|
|
2835
2801
|
}],
|
|
2836
2802
|
/**
|
|
@@ -2845,7 +2811,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2845
2811
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2846
2812
|
*/
|
|
2847
2813
|
"inset-shadow": [{
|
|
2848
|
-
"inset-shadow": ["none", g,
|
|
2814
|
+
"inset-shadow": ["none", g, Bt, Nt]
|
|
2849
2815
|
}],
|
|
2850
2816
|
/**
|
|
2851
2817
|
* Inset Box Shadow Color
|
|
@@ -2912,7 +2878,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
2912
2878
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
2913
2879
|
*/
|
|
2914
2880
|
"text-shadow": [{
|
|
2915
|
-
"text-shadow": ["none", f,
|
|
2881
|
+
"text-shadow": ["none", f, Bt, Nt]
|
|
2916
2882
|
}],
|
|
2917
2883
|
/**
|
|
2918
2884
|
* Text Shadow Color
|
|
@@ -3108,7 +3074,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
3108
3074
|
* @see https://tailwindcss.com/docs/mask-position
|
|
3109
3075
|
*/
|
|
3110
3076
|
"mask-position": [{
|
|
3111
|
-
mask:
|
|
3077
|
+
mask: Mt()
|
|
3112
3078
|
}],
|
|
3113
3079
|
/**
|
|
3114
3080
|
* Mask Repeat
|
|
@@ -3185,8 +3151,8 @@ const Hs = /* @__PURE__ */ se({
|
|
|
3185
3151
|
"",
|
|
3186
3152
|
"none",
|
|
3187
3153
|
k,
|
|
3188
|
-
|
|
3189
|
-
|
|
3154
|
+
Bt,
|
|
3155
|
+
Nt
|
|
3190
3156
|
]
|
|
3191
3157
|
}],
|
|
3192
3158
|
/**
|
|
@@ -3529,28 +3495,28 @@ const Hs = /* @__PURE__ */ se({
|
|
|
3529
3495
|
* @see https://tailwindcss.com/docs/translate
|
|
3530
3496
|
*/
|
|
3531
3497
|
translate: [{
|
|
3532
|
-
translate:
|
|
3498
|
+
translate: Ve()
|
|
3533
3499
|
}],
|
|
3534
3500
|
/**
|
|
3535
3501
|
* Translate X
|
|
3536
3502
|
* @see https://tailwindcss.com/docs/translate
|
|
3537
3503
|
*/
|
|
3538
3504
|
"translate-x": [{
|
|
3539
|
-
"translate-x":
|
|
3505
|
+
"translate-x": Ve()
|
|
3540
3506
|
}],
|
|
3541
3507
|
/**
|
|
3542
3508
|
* Translate Y
|
|
3543
3509
|
* @see https://tailwindcss.com/docs/translate
|
|
3544
3510
|
*/
|
|
3545
3511
|
"translate-y": [{
|
|
3546
|
-
"translate-y":
|
|
3512
|
+
"translate-y": Ve()
|
|
3547
3513
|
}],
|
|
3548
3514
|
/**
|
|
3549
3515
|
* Translate Z
|
|
3550
3516
|
* @see https://tailwindcss.com/docs/translate
|
|
3551
3517
|
*/
|
|
3552
3518
|
"translate-z": [{
|
|
3553
|
-
"translate-z":
|
|
3519
|
+
"translate-z": Ve()
|
|
3554
3520
|
}],
|
|
3555
3521
|
/**
|
|
3556
3522
|
* Translate None
|
|
@@ -3832,7 +3798,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
3832
3798
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
3833
3799
|
*/
|
|
3834
3800
|
"stroke-w": [{
|
|
3835
|
-
stroke: [L, mt, We,
|
|
3801
|
+
stroke: [L, mt, We, gn]
|
|
3836
3802
|
}],
|
|
3837
3803
|
/**
|
|
3838
3804
|
* Stroke
|
|
@@ -3907,7 +3873,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
3907
3873
|
},
|
|
3908
3874
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
3909
3875
|
};
|
|
3910
|
-
}, "getDefaultConfig"),
|
|
3876
|
+
}, "getDefaultConfig"), Wo = /* @__PURE__ */ So(jo), mn = {
|
|
3911
3877
|
default: {
|
|
3912
3878
|
solid: {
|
|
3913
3879
|
base: "bg-theme-0 dark:bg-theme-700/40 text-theme-600 dark:text-theme-50",
|
|
@@ -4193,10 +4159,10 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4193
4159
|
icon: "text-red-600 dark:text-red-400"
|
|
4194
4160
|
}
|
|
4195
4161
|
}
|
|
4196
|
-
},
|
|
4162
|
+
}, qo = {
|
|
4197
4163
|
key: 0,
|
|
4198
4164
|
class: "absolute inset-0 flex items-center justify-center"
|
|
4199
|
-
},
|
|
4165
|
+
}, bn = /* @__PURE__ */ se({
|
|
4200
4166
|
__name: "FButton",
|
|
4201
4167
|
props: {
|
|
4202
4168
|
theme: { default: "default" },
|
|
@@ -4220,7 +4186,7 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4220
4186
|
lg: "size-5",
|
|
4221
4187
|
xl: "size-6"
|
|
4222
4188
|
})[n.size]), o = U(() => {
|
|
4223
|
-
const c =
|
|
4189
|
+
const c = mn[n.theme]?.[n.design] || mn.default[n.design];
|
|
4224
4190
|
return c || console.warn(`FButton: No theme configuration found for theme "${n.theme}" and design "${n.design}". Falling back to default solid theme.`), c || { base: "", border: "", hover: "", icon: "" };
|
|
4225
4191
|
}), a = U(() => {
|
|
4226
4192
|
const c = "relative inline-flex items-center justify-center gap-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer", d = {
|
|
@@ -4245,19 +4211,19 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4245
4211
|
n.disabled ? "" : f.hover,
|
|
4246
4212
|
k
|
|
4247
4213
|
].filter(Boolean).join(" ");
|
|
4248
|
-
return
|
|
4214
|
+
return Wo(M, n.class);
|
|
4249
4215
|
}), l = U(() => ({
|
|
4250
4216
|
design: o.value.icon || ""
|
|
4251
4217
|
}));
|
|
4252
|
-
return (c, d) => (b(), me(
|
|
4218
|
+
return (c, d) => (b(), me(Es(r.value), {
|
|
4253
4219
|
href: n.disabled ? void 0 : n.href,
|
|
4254
4220
|
disabled: n.disabled || void 0,
|
|
4255
4221
|
"aria-disabled": n.disabled || void 0,
|
|
4256
4222
|
class: _(a.value)
|
|
4257
4223
|
}, {
|
|
4258
4224
|
default: Se(() => [
|
|
4259
|
-
n.loading ? (b(), v("div",
|
|
4260
|
-
|
|
4225
|
+
n.loading ? (b(), v("div", qo, [
|
|
4226
|
+
J(Er, {
|
|
4261
4227
|
class: _(s.value)
|
|
4262
4228
|
}, null, 8, ["class"])
|
|
4263
4229
|
])) : $("", !0),
|
|
@@ -4278,41 +4244,41 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4278
4244
|
_: 3
|
|
4279
4245
|
}, 8, ["href", "disabled", "aria-disabled", "class"]));
|
|
4280
4246
|
}
|
|
4281
|
-
}),
|
|
4247
|
+
}), Yo = { class: "flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative" }, Zo = { class: "flex-1 space-y-6 pb-12" }, Xo = {
|
|
4282
4248
|
key: 0,
|
|
4283
4249
|
class: "text-sm bg-white/10 backdrop-blur-sm rounded-2xl p-4 border border-white/20 space-y-3"
|
|
4284
|
-
},
|
|
4250
|
+
}, Ko = ["innerHTML"], Qo = {
|
|
4285
4251
|
key: 1,
|
|
4286
4252
|
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
4287
|
-
},
|
|
4253
|
+
}, Jo = { class: "text-sm text-white/70 leading-relaxed" }, ea = {
|
|
4288
4254
|
key: 2,
|
|
4289
4255
|
class: "space-y-3"
|
|
4290
|
-
},
|
|
4256
|
+
}, ta = {
|
|
4291
4257
|
key: 3,
|
|
4292
4258
|
class: "space-y-3"
|
|
4293
|
-
},
|
|
4259
|
+
}, ra = { class: "grid grid-cols-2 gap-3" }, na = /* @__PURE__ */ se({
|
|
4294
4260
|
__name: "ElAgentAbout",
|
|
4295
4261
|
props: {
|
|
4296
4262
|
agent: {}
|
|
4297
4263
|
},
|
|
4298
4264
|
setup(n) {
|
|
4299
|
-
return (t, e) => (b(), v("div",
|
|
4300
|
-
|
|
4301
|
-
p("div",
|
|
4302
|
-
n.agent.summary ? (b(), v("div",
|
|
4265
|
+
return (t, e) => (b(), v("div", Yo, [
|
|
4266
|
+
J(Cr, { agent: n.agent }, null, 8, ["agent"]),
|
|
4267
|
+
p("div", Zo, [
|
|
4268
|
+
n.agent.summary ? (b(), v("div", Xo, [
|
|
4303
4269
|
e[0] || (e[0] = p("h3", { class: "font-medium text-white/50" }, " About ", -1)),
|
|
4304
4270
|
p("div", {
|
|
4305
4271
|
class: "text-white/70 leading-relaxed",
|
|
4306
4272
|
innerHTML: n.agent.summary
|
|
4307
|
-
}, null, 8,
|
|
4273
|
+
}, null, 8, Ko)
|
|
4308
4274
|
])) : $("", !0),
|
|
4309
|
-
n.agent.entityType === "company" ? (b(), v("div",
|
|
4275
|
+
n.agent.entityType === "company" ? (b(), v("div", Qo, [
|
|
4310
4276
|
e[1] || (e[1] = p("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Company Info ", -1)),
|
|
4311
|
-
p("p",
|
|
4277
|
+
p("p", Jo, " This is a company agent representing " + Z(n.agent.name) + ". ", 1)
|
|
4312
4278
|
])) : $("", !0),
|
|
4313
|
-
n.agent.email ? (b(), v("div",
|
|
4279
|
+
n.agent.email ? (b(), v("div", ea, [
|
|
4314
4280
|
e[3] || (e[3] = p("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)),
|
|
4315
|
-
|
|
4281
|
+
J(bn, {
|
|
4316
4282
|
design: "ghost",
|
|
4317
4283
|
theme: "default",
|
|
4318
4284
|
size: "sm",
|
|
@@ -4327,21 +4293,21 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4327
4293
|
_: 1
|
|
4328
4294
|
}, 8, ["href"])
|
|
4329
4295
|
])) : $("", !0),
|
|
4330
|
-
n.agent.accounts && n.agent.accounts.length > 0 ? (b(), v("div",
|
|
4296
|
+
n.agent.accounts && n.agent.accounts.length > 0 ? (b(), v("div", ta, [
|
|
4331
4297
|
e[4] || (e[4] = p("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)),
|
|
4332
|
-
p("div",
|
|
4333
|
-
(b(!0), v(Ae, null,
|
|
4298
|
+
p("div", ra, [
|
|
4299
|
+
(b(!0), v(Ae, null, Ct(n.agent.accounts, (r) => (b(), me(bn, {
|
|
4334
4300
|
key: `${r.platform}-${r.handle}`,
|
|
4335
4301
|
design: "ghost",
|
|
4336
4302
|
theme: "default",
|
|
4337
4303
|
size: "md",
|
|
4338
4304
|
class: "bg-white/10 hover:bg-white/20 border border-white/20 text-white/80",
|
|
4339
|
-
icon:
|
|
4340
|
-
href:
|
|
4305
|
+
icon: ne(it)[r.platform].icon,
|
|
4306
|
+
href: ne(it)[r.platform].getUrl(r.handle),
|
|
4341
4307
|
target: "_blank"
|
|
4342
4308
|
}, {
|
|
4343
4309
|
default: Se(() => [
|
|
4344
|
-
Tt(Z(
|
|
4310
|
+
Tt(Z(ne(it)[r.platform].label), 1)
|
|
4345
4311
|
]),
|
|
4346
4312
|
_: 2
|
|
4347
4313
|
}, 1032, ["icon", "href"]))), 128))
|
|
@@ -4352,11 +4318,11 @@ const Hs = /* @__PURE__ */ se({
|
|
|
4352
4318
|
}
|
|
4353
4319
|
});
|
|
4354
4320
|
const {
|
|
4355
|
-
entries:
|
|
4356
|
-
setPrototypeOf:
|
|
4357
|
-
isFrozen:
|
|
4358
|
-
getPrototypeOf:
|
|
4359
|
-
getOwnPropertyDescriptor:
|
|
4321
|
+
entries: Jn,
|
|
4322
|
+
setPrototypeOf: kn,
|
|
4323
|
+
isFrozen: sa,
|
|
4324
|
+
getPrototypeOf: oa,
|
|
4325
|
+
getOwnPropertyDescriptor: aa
|
|
4360
4326
|
} = Object;
|
|
4361
4327
|
let {
|
|
4362
4328
|
freeze: ue,
|
|
@@ -4382,7 +4348,7 @@ Sr || (Sr = /* @__PURE__ */ i(function(t) {
|
|
|
4382
4348
|
r[s - 1] = arguments[s];
|
|
4383
4349
|
return new t(...r);
|
|
4384
4350
|
}, "construct"));
|
|
4385
|
-
const
|
|
4351
|
+
const Ut = de(Array.prototype.forEach), ia = de(Array.prototype.lastIndexOf), xn = de(Array.prototype.pop), bt = de(Array.prototype.push), la = de(Array.prototype.splice), Gt = de(String.prototype.toLowerCase), dr = de(String.prototype.toString), hr = de(String.prototype.match), kt = de(String.prototype.replace), ca = de(String.prototype.indexOf), ua = de(String.prototype.trim), fe = de(Object.prototype.hasOwnProperty), le = de(RegExp.prototype.test), xt = da(TypeError);
|
|
4386
4352
|
function de(n) {
|
|
4387
4353
|
return function(t) {
|
|
4388
4354
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -4392,52 +4358,52 @@ function de(n) {
|
|
|
4392
4358
|
};
|
|
4393
4359
|
}
|
|
4394
4360
|
i(de, "unapply");
|
|
4395
|
-
function
|
|
4361
|
+
function da(n) {
|
|
4396
4362
|
return function() {
|
|
4397
4363
|
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
|
|
4398
4364
|
e[r] = arguments[r];
|
|
4399
4365
|
return Sr(n, e);
|
|
4400
4366
|
};
|
|
4401
4367
|
}
|
|
4402
|
-
i(
|
|
4368
|
+
i(da, "unconstruct");
|
|
4403
4369
|
function D(n, t) {
|
|
4404
|
-
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
4405
|
-
|
|
4370
|
+
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Gt;
|
|
4371
|
+
kn && kn(n, null);
|
|
4406
4372
|
let r = t.length;
|
|
4407
4373
|
for (; r--; ) {
|
|
4408
4374
|
let s = t[r];
|
|
4409
4375
|
if (typeof s == "string") {
|
|
4410
4376
|
const o = e(s);
|
|
4411
|
-
o !== s && (
|
|
4377
|
+
o !== s && (sa(t) || (t[r] = o), s = o);
|
|
4412
4378
|
}
|
|
4413
4379
|
n[s] = !0;
|
|
4414
4380
|
}
|
|
4415
4381
|
return n;
|
|
4416
4382
|
}
|
|
4417
4383
|
i(D, "addToSet");
|
|
4418
|
-
function
|
|
4384
|
+
function ha(n) {
|
|
4419
4385
|
for (let t = 0; t < n.length; t++)
|
|
4420
4386
|
fe(n, t) || (n[t] = null);
|
|
4421
4387
|
return n;
|
|
4422
4388
|
}
|
|
4423
|
-
i(
|
|
4389
|
+
i(ha, "cleanArray");
|
|
4424
4390
|
function ye(n) {
|
|
4425
4391
|
const t = wr(null);
|
|
4426
|
-
for (const [e, r] of
|
|
4427
|
-
fe(n, e) && (Array.isArray(r) ? t[e] =
|
|
4392
|
+
for (const [e, r] of Jn(n))
|
|
4393
|
+
fe(n, e) && (Array.isArray(r) ? t[e] = ha(r) : r && typeof r == "object" && r.constructor === Object ? t[e] = ye(r) : t[e] = r);
|
|
4428
4394
|
return t;
|
|
4429
4395
|
}
|
|
4430
4396
|
i(ye, "clone");
|
|
4431
4397
|
function vt(n, t) {
|
|
4432
4398
|
for (; n !== null; ) {
|
|
4433
|
-
const r =
|
|
4399
|
+
const r = aa(n, t);
|
|
4434
4400
|
if (r) {
|
|
4435
4401
|
if (r.get)
|
|
4436
4402
|
return de(r.get);
|
|
4437
4403
|
if (typeof r.value == "function")
|
|
4438
4404
|
return de(r.value);
|
|
4439
4405
|
}
|
|
4440
|
-
n =
|
|
4406
|
+
n = oa(n);
|
|
4441
4407
|
}
|
|
4442
4408
|
function e() {
|
|
4443
4409
|
return null;
|
|
@@ -4445,25 +4411,25 @@ function vt(n, t) {
|
|
|
4445
4411
|
return i(e, "fallbackValue"), e;
|
|
4446
4412
|
}
|
|
4447
4413
|
i(vt, "lookupGetter");
|
|
4448
|
-
const
|
|
4414
|
+
const vn = ue(["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"]), gr = ue(["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"]), pr = ue(["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"]), ga = ue(["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"]), fr = ue(["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"]), pa = ue(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), yn = ue(["#text"]), wn = ue(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), mr = ue(["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"]), An = ue(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ft = ue(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), fa = ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ma = ge(/<%[\w\W]*|[\w\W]*%>/gm), ba = ge(/\$\{[\w\W]*/gm), ka = ge(/^data-[\-\w.\u00B7-\uFFFF]+$/), xa = ge(/^aria-[\-\w]+$/), es = ge(
|
|
4449
4415
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
4450
4416
|
// eslint-disable-line no-useless-escape
|
|
4451
|
-
),
|
|
4417
|
+
), va = ge(/^(?:\w+script|data):/i), ya = ge(
|
|
4452
4418
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
4453
4419
|
// eslint-disable-line no-control-regex
|
|
4454
|
-
),
|
|
4455
|
-
var
|
|
4420
|
+
), ts = ge(/^html$/i), wa = ge(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
4421
|
+
var Sn = /* @__PURE__ */ Object.freeze({
|
|
4456
4422
|
__proto__: null,
|
|
4457
|
-
ARIA_ATTR:
|
|
4458
|
-
ATTR_WHITESPACE:
|
|
4459
|
-
CUSTOM_ELEMENT:
|
|
4460
|
-
DATA_ATTR:
|
|
4461
|
-
DOCTYPE_NAME:
|
|
4462
|
-
ERB_EXPR:
|
|
4463
|
-
IS_ALLOWED_URI:
|
|
4464
|
-
IS_SCRIPT_OR_DATA:
|
|
4465
|
-
MUSTACHE_EXPR:
|
|
4466
|
-
TMPLIT_EXPR:
|
|
4423
|
+
ARIA_ATTR: xa,
|
|
4424
|
+
ATTR_WHITESPACE: ya,
|
|
4425
|
+
CUSTOM_ELEMENT: wa,
|
|
4426
|
+
DATA_ATTR: ka,
|
|
4427
|
+
DOCTYPE_NAME: ts,
|
|
4428
|
+
ERB_EXPR: ma,
|
|
4429
|
+
IS_ALLOWED_URI: es,
|
|
4430
|
+
IS_SCRIPT_OR_DATA: va,
|
|
4431
|
+
MUSTACHE_EXPR: fa,
|
|
4432
|
+
TMPLIT_EXPR: ba
|
|
4467
4433
|
});
|
|
4468
4434
|
const yt = {
|
|
4469
4435
|
element: 1,
|
|
@@ -4472,9 +4438,9 @@ const yt = {
|
|
|
4472
4438
|
progressingInstruction: 7,
|
|
4473
4439
|
comment: 8,
|
|
4474
4440
|
document: 9
|
|
4475
|
-
},
|
|
4441
|
+
}, Aa = /* @__PURE__ */ i(function() {
|
|
4476
4442
|
return typeof window > "u" ? null : window;
|
|
4477
|
-
}, "getGlobal"),
|
|
4443
|
+
}, "getGlobal"), Sa = /* @__PURE__ */ i(function(t, e) {
|
|
4478
4444
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
4479
4445
|
return null;
|
|
4480
4446
|
let r = null;
|
|
@@ -4493,7 +4459,7 @@ const yt = {
|
|
|
4493
4459
|
} catch {
|
|
4494
4460
|
return console.warn("TrustedTypes policy " + o + " could not be created."), null;
|
|
4495
4461
|
}
|
|
4496
|
-
}, "_createTrustedTypesPolicy"),
|
|
4462
|
+
}, "_createTrustedTypesPolicy"), Tn = /* @__PURE__ */ i(function() {
|
|
4497
4463
|
return {
|
|
4498
4464
|
afterSanitizeAttributes: [],
|
|
4499
4465
|
afterSanitizeElements: [],
|
|
@@ -4506,9 +4472,9 @@ const yt = {
|
|
|
4506
4472
|
uponSanitizeShadowNode: []
|
|
4507
4473
|
};
|
|
4508
4474
|
}, "_createHooksMap");
|
|
4509
|
-
function
|
|
4510
|
-
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
4511
|
-
const t = /* @__PURE__ */ i((C) =>
|
|
4475
|
+
function rs() {
|
|
4476
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Aa();
|
|
4477
|
+
const t = /* @__PURE__ */ i((C) => rs(C), "DOMPurify");
|
|
4512
4478
|
if (t.version = "3.3.1", t.removed = [], !n || !n.document || n.document.nodeType !== yt.document || !n.Element)
|
|
4513
4479
|
return t.isSupported = !1, t;
|
|
4514
4480
|
let {
|
|
@@ -4532,14 +4498,14 @@ function ss() {
|
|
|
4532
4498
|
let w, B = "";
|
|
4533
4499
|
const {
|
|
4534
4500
|
implementation: H,
|
|
4535
|
-
createNodeIterator:
|
|
4501
|
+
createNodeIterator: ee,
|
|
4536
4502
|
createDocumentFragment: z,
|
|
4537
4503
|
getElementsByTagName: ie
|
|
4538
4504
|
} = e, {
|
|
4539
|
-
importNode:
|
|
4505
|
+
importNode: It
|
|
4540
4506
|
} = r;
|
|
4541
|
-
let
|
|
4542
|
-
t.isSupported = typeof
|
|
4507
|
+
let te = Tn();
|
|
4508
|
+
t.isSupported = typeof Jn == "function" && typeof x == "function" && H && H.createHTMLDocument !== void 0;
|
|
4543
4509
|
const {
|
|
4544
4510
|
MUSTACHE_EXPR: _e,
|
|
4545
4511
|
ERB_EXPR: Ke,
|
|
@@ -4548,15 +4514,15 @@ function ss() {
|
|
|
4548
4514
|
ARIA_ATTR: pe,
|
|
4549
4515
|
IS_SCRIPT_OR_DATA: Te,
|
|
4550
4516
|
ATTR_WHITESPACE: I,
|
|
4551
|
-
CUSTOM_ELEMENT:
|
|
4552
|
-
} =
|
|
4517
|
+
CUSTOM_ELEMENT: Mt
|
|
4518
|
+
} = Sn;
|
|
4553
4519
|
let {
|
|
4554
4520
|
IS_ALLOWED_URI: gt
|
|
4555
|
-
} =
|
|
4556
|
-
const Qe = D({}, [...
|
|
4521
|
+
} = Sn, q = null;
|
|
4522
|
+
const Qe = D({}, [...vn, ...gr, ...pr, ...fr, ...yn]);
|
|
4557
4523
|
let P = null;
|
|
4558
|
-
const oe = D({}, [...
|
|
4559
|
-
let
|
|
4524
|
+
const oe = D({}, [...wn, ...mr, ...An, ...Ft]);
|
|
4525
|
+
let V = Object.seal(wr(null, {
|
|
4560
4526
|
tagNameCheck: {
|
|
4561
4527
|
writable: !0,
|
|
4562
4528
|
configurable: !1,
|
|
@@ -4590,45 +4556,45 @@ function ss() {
|
|
|
4590
4556
|
value: null
|
|
4591
4557
|
}
|
|
4592
4558
|
}));
|
|
4593
|
-
let He = !0, De = !0, Je = !1,
|
|
4594
|
-
const
|
|
4559
|
+
let He = !0, De = !0, Je = !1, Ve = !0, et = !1, _t = !0, Ge = !1, Jt = !1, er = !1, tt = !1, zt = !1, Lt = !1, Fr = !0, Hr = !1;
|
|
4560
|
+
const ms = "user-content-";
|
|
4595
4561
|
let tr = !0, pt = !1, rt = {}, xe = null;
|
|
4596
4562
|
const rr = D({}, ["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"]);
|
|
4597
4563
|
let Vr = null;
|
|
4598
|
-
const
|
|
4564
|
+
const Gr = D({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4599
4565
|
let nr = null;
|
|
4600
|
-
const
|
|
4566
|
+
const jr = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Dt = "http://www.w3.org/1998/Math/MathML", $t = "http://www.w3.org/2000/svg", Ce = "http://www.w3.org/1999/xhtml";
|
|
4601
4567
|
let nt = Ce, sr = !1, or = null;
|
|
4602
|
-
const
|
|
4603
|
-
let
|
|
4604
|
-
const
|
|
4568
|
+
const bs = D({}, [Dt, $t, Ce], dr);
|
|
4569
|
+
let Ot = D({}, ["mi", "mo", "mn", "ms", "mtext"]), Pt = D({}, ["annotation-xml"]);
|
|
4570
|
+
const ks = D({}, ["title", "style", "font", "a", "script"]);
|
|
4605
4571
|
let ft = null;
|
|
4606
|
-
const
|
|
4572
|
+
const xs = ["application/xhtml+xml", "text/html"], vs = "text/html";
|
|
4607
4573
|
let K = null, st = null;
|
|
4608
|
-
const
|
|
4574
|
+
const ys = e.createElement("form"), Wr = /* @__PURE__ */ i(function(u) {
|
|
4609
4575
|
return u instanceof RegExp || u instanceof Function;
|
|
4610
4576
|
}, "isRegexOrFunction"), ar = /* @__PURE__ */ i(function() {
|
|
4611
4577
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4612
4578
|
if (!(st && st === u)) {
|
|
4613
4579
|
if ((!u || typeof u != "object") && (u = {}), u = ye(u), ft = // eslint-disable-next-line unicorn/prefer-includes
|
|
4614
|
-
|
|
4580
|
+
xs.indexOf(u.PARSER_MEDIA_TYPE) === -1 ? vs : u.PARSER_MEDIA_TYPE, K = ft === "application/xhtml+xml" ? dr : Gt, q = fe(u, "ALLOWED_TAGS") ? D({}, u.ALLOWED_TAGS, K) : Qe, P = fe(u, "ALLOWED_ATTR") ? D({}, u.ALLOWED_ATTR, K) : oe, or = fe(u, "ALLOWED_NAMESPACES") ? D({}, u.ALLOWED_NAMESPACES, dr) : bs, nr = fe(u, "ADD_URI_SAFE_ATTR") ? D(ye(jr), u.ADD_URI_SAFE_ATTR, K) : jr, Vr = fe(u, "ADD_DATA_URI_TAGS") ? D(ye(Gr), u.ADD_DATA_URI_TAGS, K) : Gr, xe = fe(u, "FORBID_CONTENTS") ? D({}, u.FORBID_CONTENTS, K) : rr, Le = fe(u, "FORBID_TAGS") ? D({}, u.FORBID_TAGS, K) : ye({}), j = fe(u, "FORBID_ATTR") ? D({}, u.FORBID_ATTR, K) : ye({}), rt = fe(u, "USE_PROFILES") ? u.USE_PROFILES : !1, He = u.ALLOW_ARIA_ATTR !== !1, De = u.ALLOW_DATA_ATTR !== !1, Je = u.ALLOW_UNKNOWN_PROTOCOLS || !1, Ve = u.ALLOW_SELF_CLOSE_IN_ATTR !== !1, et = u.SAFE_FOR_TEMPLATES || !1, _t = u.SAFE_FOR_XML !== !1, Ge = u.WHOLE_DOCUMENT || !1, tt = u.RETURN_DOM || !1, zt = u.RETURN_DOM_FRAGMENT || !1, Lt = u.RETURN_TRUSTED_TYPE || !1, er = u.FORCE_BODY || !1, Fr = u.SANITIZE_DOM !== !1, Hr = u.SANITIZE_NAMED_PROPS || !1, tr = u.KEEP_CONTENT !== !1, pt = u.IN_PLACE || !1, gt = u.ALLOWED_URI_REGEXP || es, nt = u.NAMESPACE || Ce, Ot = u.MATHML_TEXT_INTEGRATION_POINTS || Ot, Pt = u.HTML_INTEGRATION_POINTS || Pt, V = u.CUSTOM_ELEMENT_HANDLING || {}, u.CUSTOM_ELEMENT_HANDLING && Wr(u.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (V.tagNameCheck = u.CUSTOM_ELEMENT_HANDLING.tagNameCheck), u.CUSTOM_ELEMENT_HANDLING && Wr(u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (V.attributeNameCheck = u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), u.CUSTOM_ELEMENT_HANDLING && typeof u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (V.allowCustomizedBuiltInElements = u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), et && (De = !1), zt && (tt = !0), rt && (q = D({}, yn), P = [], rt.html === !0 && (D(q, vn), D(P, wn)), rt.svg === !0 && (D(q, gr), D(P, mr), D(P, Ft)), rt.svgFilters === !0 && (D(q, pr), D(P, mr), D(P, Ft)), rt.mathMl === !0 && (D(q, fr), D(P, An), D(P, Ft))), u.ADD_TAGS && (typeof u.ADD_TAGS == "function" ? Ee.tagCheck = u.ADD_TAGS : (q === Qe && (q = ye(q)), D(q, u.ADD_TAGS, K))), u.ADD_ATTR && (typeof u.ADD_ATTR == "function" ? Ee.attributeCheck = u.ADD_ATTR : (P === oe && (P = ye(P)), D(P, u.ADD_ATTR, K))), u.ADD_URI_SAFE_ATTR && D(nr, u.ADD_URI_SAFE_ATTR, K), u.FORBID_CONTENTS && (xe === rr && (xe = ye(xe)), D(xe, u.FORBID_CONTENTS, K)), u.ADD_FORBID_CONTENTS && (xe === rr && (xe = ye(xe)), D(xe, u.ADD_FORBID_CONTENTS, K)), tr && (q["#text"] = !0), Ge && D(q, ["html", "head", "body"]), q.table && (D(q, ["tbody"]), delete Le.tbody), u.TRUSTED_TYPES_POLICY) {
|
|
4615
4581
|
if (typeof u.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4616
4582
|
throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4617
4583
|
if (typeof u.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4618
4584
|
throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4619
4585
|
w = u.TRUSTED_TYPES_POLICY, B = w.createHTML("");
|
|
4620
4586
|
} else
|
|
4621
|
-
w === void 0 && (w =
|
|
4587
|
+
w === void 0 && (w = Sa(k, s)), w !== null && typeof B == "string" && (B = w.createHTML(""));
|
|
4622
4588
|
ue && ue(u), st = u;
|
|
4623
4589
|
}
|
|
4624
|
-
}, "_parseConfig"),
|
|
4590
|
+
}, "_parseConfig"), qr = D({}, [...gr, ...pr, ...ga]), Yr = D({}, [...fr, ...pa]), ws = /* @__PURE__ */ i(function(u) {
|
|
4625
4591
|
let m = x(u);
|
|
4626
4592
|
(!m || !m.tagName) && (m = {
|
|
4627
4593
|
namespaceURI: nt,
|
|
4628
4594
|
tagName: "template"
|
|
4629
4595
|
});
|
|
4630
|
-
const T =
|
|
4631
|
-
return or[u.namespaceURI] ? u.namespaceURI ===
|
|
4596
|
+
const T = Gt(u.tagName), G = Gt(m.tagName);
|
|
4597
|
+
return or[u.namespaceURI] ? u.namespaceURI === $t ? m.namespaceURI === Ce ? T === "svg" : m.namespaceURI === Dt ? T === "svg" && (G === "annotation-xml" || Ot[G]) : !!qr[T] : u.namespaceURI === Dt ? m.namespaceURI === Ce ? T === "math" : m.namespaceURI === $t ? T === "math" && Pt[G] : !!Yr[T] : u.namespaceURI === Ce ? m.namespaceURI === $t && !Pt[G] || m.namespaceURI === Dt && !Ot[G] ? !1 : !Yr[T] && (ks[T] || !qr[T]) : !!(ft === "application/xhtml+xml" && or[u.namespaceURI]) : !1;
|
|
4632
4598
|
}, "_checkValidNamespace"), ve = /* @__PURE__ */ i(function(u) {
|
|
4633
4599
|
bt(t.removed, {
|
|
4634
4600
|
element: u
|
|
@@ -4651,7 +4617,7 @@ function ss() {
|
|
|
4651
4617
|
});
|
|
4652
4618
|
}
|
|
4653
4619
|
if (m.removeAttribute(u), u === "is")
|
|
4654
|
-
if (tt ||
|
|
4620
|
+
if (tt || zt)
|
|
4655
4621
|
try {
|
|
4656
4622
|
ve(m);
|
|
4657
4623
|
} catch {
|
|
@@ -4661,7 +4627,7 @@ function ss() {
|
|
|
4661
4627
|
m.setAttribute(u, "");
|
|
4662
4628
|
} catch {
|
|
4663
4629
|
}
|
|
4664
|
-
}, "_removeAttribute"),
|
|
4630
|
+
}, "_removeAttribute"), Zr = /* @__PURE__ */ i(function(u) {
|
|
4665
4631
|
let m = null, T = null;
|
|
4666
4632
|
if (er)
|
|
4667
4633
|
u = "<remove></remove>" + u;
|
|
@@ -4670,23 +4636,23 @@ function ss() {
|
|
|
4670
4636
|
T = Y && Y[0];
|
|
4671
4637
|
}
|
|
4672
4638
|
ft === "application/xhtml+xml" && nt === Ce && (u = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + u + "</body></html>");
|
|
4673
|
-
const
|
|
4639
|
+
const G = w ? w.createHTML(u) : u;
|
|
4674
4640
|
if (nt === Ce)
|
|
4675
4641
|
try {
|
|
4676
|
-
m = new f().parseFromString(
|
|
4642
|
+
m = new f().parseFromString(G, ft);
|
|
4677
4643
|
} catch {
|
|
4678
4644
|
}
|
|
4679
4645
|
if (!m || !m.documentElement) {
|
|
4680
4646
|
m = H.createDocument(nt, "template", null);
|
|
4681
4647
|
try {
|
|
4682
|
-
m.documentElement.innerHTML = sr ? B :
|
|
4648
|
+
m.documentElement.innerHTML = sr ? B : G;
|
|
4683
4649
|
} catch {
|
|
4684
4650
|
}
|
|
4685
4651
|
}
|
|
4686
4652
|
const ae = m.body || m.documentElement;
|
|
4687
|
-
return u && T && ae.insertBefore(e.createTextNode(T), ae.childNodes[0] || null), nt === Ce ? ie.call(m,
|
|
4688
|
-
}, "_initDocument"),
|
|
4689
|
-
return
|
|
4653
|
+
return u && T && ae.insertBefore(e.createTextNode(T), ae.childNodes[0] || null), nt === Ce ? ie.call(m, Ge ? "html" : "body")[0] : Ge ? m.documentElement : ae;
|
|
4654
|
+
}, "_initDocument"), Xr = /* @__PURE__ */ i(function(u) {
|
|
4655
|
+
return ee.call(
|
|
4690
4656
|
u.ownerDocument || u,
|
|
4691
4657
|
u,
|
|
4692
4658
|
// eslint-disable-next-line no-bitwise
|
|
@@ -4695,47 +4661,47 @@ function ss() {
|
|
|
4695
4661
|
);
|
|
4696
4662
|
}, "_createNodeIterator"), ir = /* @__PURE__ */ i(function(u) {
|
|
4697
4663
|
return u instanceof g && (typeof u.nodeName != "string" || typeof u.textContent != "string" || typeof u.removeChild != "function" || !(u.attributes instanceof h) || typeof u.removeAttribute != "function" || typeof u.setAttribute != "function" || typeof u.namespaceURI != "string" || typeof u.insertBefore != "function" || typeof u.hasChildNodes != "function");
|
|
4698
|
-
}, "_isClobbered"),
|
|
4664
|
+
}, "_isClobbered"), Kr = /* @__PURE__ */ i(function(u) {
|
|
4699
4665
|
return typeof l == "function" && u instanceof l;
|
|
4700
4666
|
}, "_isNode");
|
|
4701
4667
|
function Re(C, u, m) {
|
|
4702
|
-
|
|
4668
|
+
Ut(C, (T) => {
|
|
4703
4669
|
T.call(t, u, m, st);
|
|
4704
4670
|
});
|
|
4705
4671
|
}
|
|
4706
4672
|
i(Re, "_executeHooks");
|
|
4707
|
-
const
|
|
4673
|
+
const Qr = /* @__PURE__ */ i(function(u) {
|
|
4708
4674
|
let m = null;
|
|
4709
|
-
if (Re(
|
|
4675
|
+
if (Re(te.beforeSanitizeElements, u, null), ir(u))
|
|
4710
4676
|
return ve(u), !0;
|
|
4711
4677
|
const T = K(u.nodeName);
|
|
4712
|
-
if (Re(
|
|
4678
|
+
if (Re(te.uponSanitizeElement, u, {
|
|
4713
4679
|
tagName: T,
|
|
4714
4680
|
allowedTags: q
|
|
4715
|
-
}),
|
|
4681
|
+
}), _t && u.hasChildNodes() && !Kr(u.firstElementChild) && le(/<[/\w!]/g, u.innerHTML) && le(/<[/\w!]/g, u.textContent) || u.nodeType === yt.progressingInstruction || _t && u.nodeType === yt.comment && le(/<[/\w]/g, u.data))
|
|
4716
4682
|
return ve(u), !0;
|
|
4717
4683
|
if (!(Ee.tagCheck instanceof Function && Ee.tagCheck(T)) && (!q[T] || Le[T])) {
|
|
4718
|
-
if (!Le[T] &&
|
|
4684
|
+
if (!Le[T] && en(T) && (V.tagNameCheck instanceof RegExp && le(V.tagNameCheck, T) || V.tagNameCheck instanceof Function && V.tagNameCheck(T)))
|
|
4719
4685
|
return !1;
|
|
4720
4686
|
if (tr && !xe[T]) {
|
|
4721
|
-
const
|
|
4722
|
-
if (ae &&
|
|
4687
|
+
const G = x(u) || u.parentNode, ae = y(u) || u.childNodes;
|
|
4688
|
+
if (ae && G) {
|
|
4723
4689
|
const Y = ae.length;
|
|
4724
4690
|
for (let he = Y - 1; he >= 0; --he) {
|
|
4725
4691
|
const Ie = E(ae[he], !0);
|
|
4726
|
-
Ie.__removalCount = (u.__removalCount || 0) + 1,
|
|
4692
|
+
Ie.__removalCount = (u.__removalCount || 0) + 1, G.insertBefore(Ie, X(u));
|
|
4727
4693
|
}
|
|
4728
4694
|
}
|
|
4729
4695
|
}
|
|
4730
4696
|
return ve(u), !0;
|
|
4731
4697
|
}
|
|
4732
|
-
return u instanceof c && !
|
|
4733
|
-
m = kt(m,
|
|
4698
|
+
return u instanceof c && !ws(u) || (T === "noscript" || T === "noembed" || T === "noframes") && le(/<\/no(script|embed|frames)/i, u.innerHTML) ? (ve(u), !0) : (et && u.nodeType === yt.text && (m = u.textContent, Ut([_e, Ke, Fe], (G) => {
|
|
4699
|
+
m = kt(m, G, " ");
|
|
4734
4700
|
}), u.textContent !== m && (bt(t.removed, {
|
|
4735
4701
|
element: u.cloneNode()
|
|
4736
|
-
}), u.textContent = m)), Re(
|
|
4737
|
-
}, "_sanitizeElements"),
|
|
4738
|
-
if (
|
|
4702
|
+
}), u.textContent = m)), Re(te.afterSanitizeElements, u, null), !1);
|
|
4703
|
+
}, "_sanitizeElements"), Jr = /* @__PURE__ */ i(function(u, m, T) {
|
|
4704
|
+
if (Fr && (m === "id" || m === "name") && (T in e || T in ys))
|
|
4739
4705
|
return !1;
|
|
4740
4706
|
if (!(De && !j[m] && le(ze, m))) {
|
|
4741
4707
|
if (!(He && le(pe, m))) {
|
|
@@ -4745,13 +4711,13 @@ function ss() {
|
|
|
4745
4711
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
4746
4712
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4747
4713
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
4748
|
-
!(
|
|
4714
|
+
!(en(u) && (V.tagNameCheck instanceof RegExp && le(V.tagNameCheck, u) || V.tagNameCheck instanceof Function && V.tagNameCheck(u)) && (V.attributeNameCheck instanceof RegExp && le(V.attributeNameCheck, m) || V.attributeNameCheck instanceof Function && V.attributeNameCheck(m, u)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
4749
4715
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4750
|
-
m === "is" &&
|
|
4716
|
+
m === "is" && V.allowCustomizedBuiltInElements && (V.tagNameCheck instanceof RegExp && le(V.tagNameCheck, T) || V.tagNameCheck instanceof Function && V.tagNameCheck(T)))
|
|
4751
4717
|
) return !1;
|
|
4752
4718
|
} else if (!nr[m]) {
|
|
4753
4719
|
if (!le(gt, kt(T, I, ""))) {
|
|
4754
|
-
if (!((m === "src" || m === "xlink:href" || m === "href") && u !== "script" &&
|
|
4720
|
+
if (!((m === "src" || m === "xlink:href" || m === "href") && u !== "script" && ca(T, "data:") === 0 && Vr[u])) {
|
|
4755
4721
|
if (!(Je && !le(Te, kt(T, I, "")))) {
|
|
4756
4722
|
if (T)
|
|
4757
4723
|
return !1;
|
|
@@ -4763,10 +4729,10 @@ function ss() {
|
|
|
4763
4729
|
}
|
|
4764
4730
|
}
|
|
4765
4731
|
return !0;
|
|
4766
|
-
}, "_isValidAttribute"),
|
|
4767
|
-
return u !== "annotation-xml" && hr(u,
|
|
4768
|
-
}, "_isBasicCustomElement"),
|
|
4769
|
-
Re(
|
|
4732
|
+
}, "_isValidAttribute"), en = /* @__PURE__ */ i(function(u) {
|
|
4733
|
+
return u !== "annotation-xml" && hr(u, Mt);
|
|
4734
|
+
}, "_isBasicCustomElement"), tn = /* @__PURE__ */ i(function(u) {
|
|
4735
|
+
Re(te.beforeSanitizeAttributes, u, null);
|
|
4770
4736
|
const {
|
|
4771
4737
|
attributes: m
|
|
4772
4738
|
} = u;
|
|
@@ -4779,19 +4745,19 @@ function ss() {
|
|
|
4779
4745
|
allowedAttributes: P,
|
|
4780
4746
|
forceKeepAttr: void 0
|
|
4781
4747
|
};
|
|
4782
|
-
let
|
|
4783
|
-
for (;
|
|
4784
|
-
const ae = m[
|
|
4748
|
+
let G = m.length;
|
|
4749
|
+
for (; G--; ) {
|
|
4750
|
+
const ae = m[G], {
|
|
4785
4751
|
name: Y,
|
|
4786
4752
|
namespaceURI: he,
|
|
4787
4753
|
value: Ie
|
|
4788
4754
|
} = ae, ot = K(Y), lr = Ie;
|
|
4789
|
-
let
|
|
4790
|
-
if (T.attrName = ot, T.attrValue =
|
|
4755
|
+
let re = Y === "value" ? lr : ua(lr);
|
|
4756
|
+
if (T.attrName = ot, T.attrValue = re, T.keepAttr = !0, T.forceKeepAttr = void 0, Re(te.uponSanitizeAttribute, u, T), re = T.attrValue, Hr && (ot === "id" || ot === "name") && (je(Y, u), re = ms + re), _t && le(/((--!?|])>)|<\/(style|title|textarea)/i, re)) {
|
|
4791
4757
|
je(Y, u);
|
|
4792
4758
|
continue;
|
|
4793
4759
|
}
|
|
4794
|
-
if (ot === "attributename" && hr(
|
|
4760
|
+
if (ot === "attributename" && hr(re, "href")) {
|
|
4795
4761
|
je(Y, u);
|
|
4796
4762
|
continue;
|
|
4797
4763
|
}
|
|
@@ -4801,47 +4767,47 @@ function ss() {
|
|
|
4801
4767
|
je(Y, u);
|
|
4802
4768
|
continue;
|
|
4803
4769
|
}
|
|
4804
|
-
if (!
|
|
4770
|
+
if (!Ve && le(/\/>/i, re)) {
|
|
4805
4771
|
je(Y, u);
|
|
4806
4772
|
continue;
|
|
4807
4773
|
}
|
|
4808
|
-
et &&
|
|
4809
|
-
|
|
4774
|
+
et && Ut([_e, Ke, Fe], (nn) => {
|
|
4775
|
+
re = kt(re, nn, " ");
|
|
4810
4776
|
});
|
|
4811
|
-
const
|
|
4812
|
-
if (!
|
|
4777
|
+
const rn = K(u.nodeName);
|
|
4778
|
+
if (!Jr(rn, ot, re)) {
|
|
4813
4779
|
je(Y, u);
|
|
4814
4780
|
continue;
|
|
4815
4781
|
}
|
|
4816
4782
|
if (w && typeof k == "object" && typeof k.getAttributeType == "function" && !he)
|
|
4817
|
-
switch (k.getAttributeType(
|
|
4783
|
+
switch (k.getAttributeType(rn, ot)) {
|
|
4818
4784
|
case "TrustedHTML": {
|
|
4819
|
-
|
|
4785
|
+
re = w.createHTML(re);
|
|
4820
4786
|
break;
|
|
4821
4787
|
}
|
|
4822
4788
|
case "TrustedScriptURL": {
|
|
4823
|
-
|
|
4789
|
+
re = w.createScriptURL(re);
|
|
4824
4790
|
break;
|
|
4825
4791
|
}
|
|
4826
4792
|
}
|
|
4827
|
-
if (
|
|
4793
|
+
if (re !== lr)
|
|
4828
4794
|
try {
|
|
4829
|
-
he ? u.setAttributeNS(he, Y,
|
|
4795
|
+
he ? u.setAttributeNS(he, Y, re) : u.setAttribute(Y, re), ir(u) ? ve(u) : xn(t.removed);
|
|
4830
4796
|
} catch {
|
|
4831
4797
|
je(Y, u);
|
|
4832
4798
|
}
|
|
4833
4799
|
}
|
|
4834
|
-
Re(
|
|
4835
|
-
}, "_sanitizeAttributes"),
|
|
4800
|
+
Re(te.afterSanitizeAttributes, u, null);
|
|
4801
|
+
}, "_sanitizeAttributes"), As = /* @__PURE__ */ i(function C(u) {
|
|
4836
4802
|
let m = null;
|
|
4837
|
-
const T =
|
|
4838
|
-
for (Re(
|
|
4839
|
-
Re(
|
|
4840
|
-
Re(
|
|
4803
|
+
const T = Xr(u);
|
|
4804
|
+
for (Re(te.beforeSanitizeShadowDOM, u, null); m = T.nextNode(); )
|
|
4805
|
+
Re(te.uponSanitizeShadowNode, m, null), Qr(m), tn(m), m.content instanceof o && C(m.content);
|
|
4806
|
+
Re(te.afterSanitizeShadowDOM, u, null);
|
|
4841
4807
|
}, "_sanitizeShadowDOM");
|
|
4842
4808
|
return t.sanitize = function(C) {
|
|
4843
|
-
let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = null, T = null,
|
|
4844
|
-
if (sr = !C, sr && (C = "<!-->"), typeof C != "string" && !
|
|
4809
|
+
let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = null, T = null, G = null, ae = null;
|
|
4810
|
+
if (sr = !C, sr && (C = "<!-->"), typeof C != "string" && !Kr(C))
|
|
4845
4811
|
if (typeof C.toString == "function") {
|
|
4846
4812
|
if (C = C.toString(), typeof C != "string")
|
|
4847
4813
|
throw xt("dirty is not a string, aborting");
|
|
@@ -4856,33 +4822,33 @@ function ss() {
|
|
|
4856
4822
|
throw xt("root node is forbidden and cannot be sanitized in-place");
|
|
4857
4823
|
}
|
|
4858
4824
|
} else if (C instanceof l)
|
|
4859
|
-
m =
|
|
4825
|
+
m = Zr("<!---->"), T = m.ownerDocument.importNode(C, !0), T.nodeType === yt.element && T.nodeName === "BODY" || T.nodeName === "HTML" ? m = T : m.appendChild(T);
|
|
4860
4826
|
else {
|
|
4861
|
-
if (!tt && !et && !
|
|
4827
|
+
if (!tt && !et && !Ge && // eslint-disable-next-line unicorn/prefer-includes
|
|
4862
4828
|
C.indexOf("<") === -1)
|
|
4863
|
-
return w &&
|
|
4864
|
-
if (m =
|
|
4865
|
-
return tt ? null :
|
|
4829
|
+
return w && Lt ? w.createHTML(C) : C;
|
|
4830
|
+
if (m = Zr(C), !m)
|
|
4831
|
+
return tt ? null : Lt ? B : "";
|
|
4866
4832
|
}
|
|
4867
4833
|
m && er && ve(m.firstChild);
|
|
4868
|
-
const Y =
|
|
4869
|
-
for (;
|
|
4870
|
-
|
|
4834
|
+
const Y = Xr(pt ? C : m);
|
|
4835
|
+
for (; G = Y.nextNode(); )
|
|
4836
|
+
Qr(G), tn(G), G.content instanceof o && As(G.content);
|
|
4871
4837
|
if (pt)
|
|
4872
4838
|
return C;
|
|
4873
4839
|
if (tt) {
|
|
4874
|
-
if (
|
|
4840
|
+
if (zt)
|
|
4875
4841
|
for (ae = z.call(m.ownerDocument); m.firstChild; )
|
|
4876
4842
|
ae.appendChild(m.firstChild);
|
|
4877
4843
|
else
|
|
4878
4844
|
ae = m;
|
|
4879
|
-
return (P.shadowroot || P.shadowrootmode) && (ae =
|
|
4845
|
+
return (P.shadowroot || P.shadowrootmode) && (ae = It.call(r, ae, !0)), ae;
|
|
4880
4846
|
}
|
|
4881
|
-
let he =
|
|
4882
|
-
return
|
|
4883
|
-
` + he), et &&
|
|
4847
|
+
let he = Ge ? m.outerHTML : m.innerHTML;
|
|
4848
|
+
return Ge && q["!doctype"] && m.ownerDocument && m.ownerDocument.doctype && m.ownerDocument.doctype.name && le(ts, m.ownerDocument.doctype.name) && (he = "<!DOCTYPE " + m.ownerDocument.doctype.name + `>
|
|
4849
|
+
` + he), et && Ut([_e, Ke, Fe], (Ie) => {
|
|
4884
4850
|
he = kt(he, Ie, " ");
|
|
4885
|
-
}), w &&
|
|
4851
|
+
}), w && Lt ? w.createHTML(he) : he;
|
|
4886
4852
|
}, t.setConfig = function() {
|
|
4887
4853
|
let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4888
4854
|
ar(C), Jt = !0;
|
|
@@ -4890,33 +4856,33 @@ function ss() {
|
|
|
4890
4856
|
st = null, Jt = !1;
|
|
4891
4857
|
}, t.isValidAttribute = function(C, u, m) {
|
|
4892
4858
|
st || ar({});
|
|
4893
|
-
const T = K(C),
|
|
4894
|
-
return
|
|
4859
|
+
const T = K(C), G = K(u);
|
|
4860
|
+
return Jr(T, G, m);
|
|
4895
4861
|
}, t.addHook = function(C, u) {
|
|
4896
|
-
typeof u == "function" && bt(
|
|
4862
|
+
typeof u == "function" && bt(te[C], u);
|
|
4897
4863
|
}, t.removeHook = function(C, u) {
|
|
4898
4864
|
if (u !== void 0) {
|
|
4899
|
-
const m =
|
|
4900
|
-
return m === -1 ? void 0 :
|
|
4865
|
+
const m = ia(te[C], u);
|
|
4866
|
+
return m === -1 ? void 0 : la(te[C], m, 1)[0];
|
|
4901
4867
|
}
|
|
4902
|
-
return
|
|
4868
|
+
return xn(te[C]);
|
|
4903
4869
|
}, t.removeHooks = function(C) {
|
|
4904
|
-
|
|
4870
|
+
te[C] = [];
|
|
4905
4871
|
}, t.removeAllHooks = function() {
|
|
4906
|
-
|
|
4872
|
+
te = Tn();
|
|
4907
4873
|
}, t;
|
|
4908
4874
|
}
|
|
4909
|
-
i(
|
|
4910
|
-
var
|
|
4911
|
-
function
|
|
4875
|
+
i(rs, "createDOMPurify");
|
|
4876
|
+
var Ta = rs();
|
|
4877
|
+
function Mr() {
|
|
4912
4878
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
4913
4879
|
}
|
|
4914
|
-
i(
|
|
4915
|
-
var Xe =
|
|
4916
|
-
function
|
|
4880
|
+
i(Mr, "M");
|
|
4881
|
+
var Xe = Mr();
|
|
4882
|
+
function ns(n) {
|
|
4917
4883
|
Xe = n;
|
|
4918
4884
|
}
|
|
4919
|
-
i(
|
|
4885
|
+
i(ns, "H");
|
|
4920
4886
|
var qe = { exec: /* @__PURE__ */ i(() => null, "exec") };
|
|
4921
4887
|
function O(n, t = "") {
|
|
4922
4888
|
let e = typeof n == "string" ? n : n.source, r = { replace: /* @__PURE__ */ i((s, o) => {
|
|
@@ -4926,22 +4892,22 @@ function O(n, t = "") {
|
|
|
4926
4892
|
return r;
|
|
4927
4893
|
}
|
|
4928
4894
|
i(O, "k");
|
|
4929
|
-
var
|
|
4895
|
+
var Ea = (() => {
|
|
4930
4896
|
try {
|
|
4931
4897
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
4932
4898
|
} catch {
|
|
4933
4899
|
return !1;
|
|
4934
4900
|
}
|
|
4935
|
-
})(), ce = { 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, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ i((n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}>`), "blockquoteBeginRegex") },
|
|
4936
|
-
]`).replace("lheading",
|
|
4901
|
+
})(), ce = { 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, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ i((n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ i((n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}>`), "blockquoteBeginRegex") }, Ca = /^(?:[ \t]*(?:\n|$))+/, Ra = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ia = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Rt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ma = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, _r = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ss = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, os = O(ss).replace(/bull/g, _r).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(), _a = O(ss).replace(/bull/g, _r).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(), zr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, za = /^[^\n]+/, Lr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, La = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Lr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Da = O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, _r).getRegex(), Kt = "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", Dr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $a = O("^ {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", Dr).replace("tag", Kt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = O(zr).replace("hr", Rt).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", Kt).getRegex(), Oa = O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), $r = { blockquote: Oa, code: Ra, def: La, fences: Ia, heading: Ma, hr: Rt, html: $a, lheading: os, list: Da, newline: Ca, paragraph: as, table: qe, text: za }, En = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Rt).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", Kt).getRegex(), Pa = { ...$r, lheading: _a, table: En, paragraph: O(zr).replace("hr", Rt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", En).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", Kt).getRegex() }, Na = { ...$r, html: O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Dr).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: qe, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: O(zr).replace("hr", Rt).replace("heading", ` *#{1,6} *[^
|
|
4902
|
+
]`).replace("lheading", os).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ba = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ua = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, is = /^( {2,}|\\)\n(?!\s*$)/, Fa = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Qt = /[\p{P}\p{S}]/u, Or = /[\s\p{P}\p{S}]/u, ls = /[^\s\p{P}\p{S}]/u, Ha = O(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Or).getRegex(), cs = /(?!~)[\p{P}\p{S}]/u, Va = /(?!~)[\s\p{P}\p{S}]/u, Ga = /(?:[^\s\p{P}\p{S}]|~)/u, us = /(?![*_])[\p{P}\p{S}]/u, ja = /(?![*_])[\s\p{P}\p{S}]/u, Wa = /(?:[^\s\p{P}\p{S}]|[*_])/u, qa = O(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ea ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ds = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ya = O(ds, "u").replace(/punct/g, Qt).getRegex(), Za = O(ds, "u").replace(/punct/g, cs).getRegex(), hs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Xa = O(hs, "gu").replace(/notPunctSpace/g, ls).replace(/punctSpace/g, Or).replace(/punct/g, Qt).getRegex(), Ka = O(hs, "gu").replace(/notPunctSpace/g, Ga).replace(/punctSpace/g, Va).replace(/punct/g, cs).getRegex(), Qa = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ls).replace(/punctSpace/g, Or).replace(/punct/g, Qt).getRegex(), Ja = O(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, us).getRegex(), ei = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ti = O(ei, "gu").replace(/notPunctSpace/g, Wa).replace(/punctSpace/g, ja).replace(/punct/g, us).getRegex(), ri = O(/\\(punct)/, "gu").replace(/punct/g, Qt).getRegex(), ni = O(/^<(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(), si = O(Dr).replace("(?:-->|$)", "-->").getRegex(), oi = O("^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", si).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), qt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, ai = O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", qt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), gs = O(/^!?\[(label)\]\[(ref)\]/).replace("label", qt).replace("ref", Lr).getRegex(), ps = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", Lr).getRegex(), ii = O("reflink|nolink(?!\\()", "g").replace("reflink", gs).replace("nolink", ps).getRegex(), Cn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Pr = { _backpedal: qe, anyPunctuation: ri, autolink: ni, blockSkip: qa, br: is, code: Ua, del: qe, delLDelim: qe, delRDelim: qe, emStrongLDelim: Ya, emStrongRDelimAst: Xa, emStrongRDelimUnd: Qa, escape: Ba, link: ai, nolink: ps, punctuation: Ha, reflink: gs, reflinkSearch: ii, tag: oi, text: Fa, url: qe }, li = { ...Pr, link: O(/^!?\[(label)\]\((.*?)\)/).replace("label", qt).getRegex(), reflink: O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", qt).getRegex() }, Tr = { ...Pr, emStrongRDelimAst: Ka, emStrongLDelim: Za, delLDelim: Ja, delRDelim: ti, url: O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Cn).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: O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Cn).getRegex() }, ci = { ...Tr, br: O(is).replace("{2,}", "*").getRegex(), text: O(Tr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ht = { normal: $r, gfm: Pa, pedantic: Na }, wt = { normal: Pr, gfm: Tr, breaks: ci, pedantic: li }, ui = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Rn = /* @__PURE__ */ i((n) => ui[n], "de");
|
|
4937
4903
|
function we(n, t) {
|
|
4938
4904
|
if (t) {
|
|
4939
|
-
if (ce.escapeTest.test(n)) return n.replace(ce.escapeReplace,
|
|
4940
|
-
} else if (ce.escapeTestNoEncode.test(n)) return n.replace(ce.escapeReplaceNoEncode,
|
|
4905
|
+
if (ce.escapeTest.test(n)) return n.replace(ce.escapeReplace, Rn);
|
|
4906
|
+
} else if (ce.escapeTestNoEncode.test(n)) return n.replace(ce.escapeReplaceNoEncode, Rn);
|
|
4941
4907
|
return n;
|
|
4942
4908
|
}
|
|
4943
4909
|
i(we, "O");
|
|
4944
|
-
function
|
|
4910
|
+
function In(n) {
|
|
4945
4911
|
try {
|
|
4946
4912
|
n = encodeURI(n).replace(ce.percentDecode, "%");
|
|
4947
4913
|
} catch {
|
|
@@ -4949,8 +4915,8 @@ function _n(n) {
|
|
|
4949
4915
|
}
|
|
4950
4916
|
return n;
|
|
4951
4917
|
}
|
|
4952
|
-
i(
|
|
4953
|
-
function
|
|
4918
|
+
i(In, "X");
|
|
4919
|
+
function Mn(n, t) {
|
|
4954
4920
|
let e = n.replace(ce.findPipe, (o, a, l) => {
|
|
4955
4921
|
let c = !1, d = a;
|
|
4956
4922
|
for (; --d >= 0 && l[d] === "\\"; ) c = !c;
|
|
@@ -4961,7 +4927,7 @@ function zn(n, t) {
|
|
|
4961
4927
|
for (; s < r.length; s++) r[s] = r[s].trim().replace(ce.slashPipe, "|");
|
|
4962
4928
|
return r;
|
|
4963
4929
|
}
|
|
4964
|
-
i(
|
|
4930
|
+
i(Mn, "J");
|
|
4965
4931
|
function At(n, t, e) {
|
|
4966
4932
|
let r = n.length;
|
|
4967
4933
|
if (r === 0) return "";
|
|
@@ -4971,7 +4937,7 @@ function At(n, t, e) {
|
|
|
4971
4937
|
return n.slice(0, r - s);
|
|
4972
4938
|
}
|
|
4973
4939
|
i(At, "C");
|
|
4974
|
-
function
|
|
4940
|
+
function di(n, t) {
|
|
4975
4941
|
if (n.indexOf(t[1]) === -1) return -1;
|
|
4976
4942
|
let e = 0;
|
|
4977
4943
|
for (let r = 0; r < n.length; r++) if (n[r] === "\\") r++;
|
|
@@ -4979,8 +4945,8 @@ function pi(n, t) {
|
|
|
4979
4945
|
else if (n[r] === t[1] && (e--, e < 0)) return r;
|
|
4980
4946
|
return e > 0 ? -2 : -1;
|
|
4981
4947
|
}
|
|
4982
|
-
i(
|
|
4983
|
-
function
|
|
4948
|
+
i(di, "ge");
|
|
4949
|
+
function hi(n, t = 0) {
|
|
4984
4950
|
let e = t, r = "";
|
|
4985
4951
|
for (let s of n) if (s === " ") {
|
|
4986
4952
|
let o = 4 - e % 4;
|
|
@@ -4988,15 +4954,15 @@ function fi(n, t = 0) {
|
|
|
4988
4954
|
} else r += s, e++;
|
|
4989
4955
|
return r;
|
|
4990
4956
|
}
|
|
4991
|
-
i(
|
|
4992
|
-
function
|
|
4957
|
+
i(hi, "fe");
|
|
4958
|
+
function _n(n, t, e, r, s) {
|
|
4993
4959
|
let o = t.href, a = t.title || null, l = n[1].replace(s.other.outputLinkReplace, "$1");
|
|
4994
4960
|
r.state.inLink = !0;
|
|
4995
4961
|
let c = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: e, href: o, title: a, text: l, tokens: r.inlineTokens(l) };
|
|
4996
4962
|
return r.state.inLink = !1, c;
|
|
4997
4963
|
}
|
|
4998
|
-
i(
|
|
4999
|
-
function
|
|
4964
|
+
i(_n, "me");
|
|
4965
|
+
function gi(n, t, e) {
|
|
5000
4966
|
let r = n.match(e.other.indentCodeCompensation);
|
|
5001
4967
|
if (r === null) return t;
|
|
5002
4968
|
let s = r[1];
|
|
@@ -5009,8 +4975,8 @@ function mi(n, t, e) {
|
|
|
5009
4975
|
}).join(`
|
|
5010
4976
|
`);
|
|
5011
4977
|
}
|
|
5012
|
-
i(
|
|
5013
|
-
var lt,
|
|
4978
|
+
i(gi, "it");
|
|
4979
|
+
var lt, Yt = (lt = class {
|
|
5014
4980
|
constructor(t) {
|
|
5015
4981
|
R(this, "options");
|
|
5016
4982
|
R(this, "rules");
|
|
@@ -5032,7 +4998,7 @@ var lt, Zt = (lt = class {
|
|
|
5032
4998
|
fences(t) {
|
|
5033
4999
|
let e = this.rules.block.fences.exec(t);
|
|
5034
5000
|
if (e) {
|
|
5035
|
-
let r = e[0], s =
|
|
5001
|
+
let r = e[0], s = gi(r, e[3] || "", this.rules);
|
|
5036
5002
|
return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
|
|
5037
5003
|
}
|
|
5038
5004
|
}
|
|
@@ -5102,7 +5068,7 @@ ${g}` : g;
|
|
|
5102
5068
|
let d = !1, h = "", g = "";
|
|
5103
5069
|
if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
5104
5070
|
h = e[0], t = t.substring(h.length);
|
|
5105
|
-
let f =
|
|
5071
|
+
let f = hi(e[2].split(`
|
|
5106
5072
|
`, 1)[0], e[1].length), k = t.split(`
|
|
5107
5073
|
`, 1)[0], M = !f.trim(), E = 0;
|
|
5108
5074
|
if (this.options.pedantic ? (E = 2, g = f.trimStart()) : M ? E = e[1].length + 1 : (E = f.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, g = f.slice(E), E += e[1].length), M && this.rules.other.blankLine.test(k) && (h += k + `
|
|
@@ -5110,17 +5076,17 @@ ${g}` : g;
|
|
|
5110
5076
|
let N = this.rules.other.nextBulletRegex(E), X = this.rules.other.hrRegex(E), y = this.rules.other.fencesBeginRegex(E), x = this.rules.other.headingBeginRegex(E), w = this.rules.other.htmlBeginRegex(E), B = this.rules.other.blockquoteBeginRegex(E);
|
|
5111
5077
|
for (; t; ) {
|
|
5112
5078
|
let H = t.split(`
|
|
5113
|
-
`, 1)[0],
|
|
5114
|
-
if (k = H, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "),
|
|
5115
|
-
if (
|
|
5116
|
-
` +
|
|
5079
|
+
`, 1)[0], ee;
|
|
5080
|
+
if (k = H, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), ee = k) : ee = k.replace(this.rules.other.tabCharGlobal, " "), y.test(k) || x.test(k) || w.test(k) || B.test(k) || N.test(k) || X.test(k)) break;
|
|
5081
|
+
if (ee.search(this.rules.other.nonSpaceChar) >= E || !k.trim()) g += `
|
|
5082
|
+
` + ee.slice(E);
|
|
5117
5083
|
else {
|
|
5118
5084
|
if (M || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || y.test(f) || x.test(f) || X.test(f)) break;
|
|
5119
5085
|
g += `
|
|
5120
5086
|
` + k;
|
|
5121
5087
|
}
|
|
5122
5088
|
M = !k.trim(), h += H + `
|
|
5123
|
-
`, t = t.substring(H.length + 1), f =
|
|
5089
|
+
`, t = t.substring(H.length + 1), f = ee.slice(E);
|
|
5124
5090
|
}
|
|
5125
5091
|
}
|
|
5126
5092
|
o.loose || (l ? o.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), o.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), o.raw += h;
|
|
@@ -5170,12 +5136,12 @@ ${g}` : g;
|
|
|
5170
5136
|
table(t) {
|
|
5171
5137
|
let e = this.rules.block.table.exec(t);
|
|
5172
5138
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
5173
|
-
let r =
|
|
5139
|
+
let r = Mn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), o = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5174
5140
|
`) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
5175
5141
|
if (r.length === s.length) {
|
|
5176
5142
|
for (let l of s) this.rules.other.tableAlignRight.test(l) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? a.align.push("left") : a.align.push(null);
|
|
5177
5143
|
for (let l = 0; l < r.length; l++) a.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: a.align[l] });
|
|
5178
|
-
for (let l of o) a.rows.push(
|
|
5144
|
+
for (let l of o) a.rows.push(Mn(l, a.header.length).map((c, d) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[d] })));
|
|
5179
5145
|
return a;
|
|
5180
5146
|
}
|
|
5181
5147
|
}
|
|
@@ -5212,7 +5178,7 @@ ${g}` : g;
|
|
|
5212
5178
|
let a = At(r.slice(0, -1), "\\");
|
|
5213
5179
|
if ((r.length - a.length) % 2 === 0) return;
|
|
5214
5180
|
} else {
|
|
5215
|
-
let a =
|
|
5181
|
+
let a = di(e[2], "()");
|
|
5216
5182
|
if (a === -2) return;
|
|
5217
5183
|
if (a > -1) {
|
|
5218
5184
|
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
|
|
@@ -5224,7 +5190,7 @@ ${g}` : g;
|
|
|
5224
5190
|
let a = this.rules.other.pedanticHrefTitle.exec(s);
|
|
5225
5191
|
a && (s = a[1], o = a[3]);
|
|
5226
5192
|
} else o = e[3] ? e[3].slice(1, -1) : "";
|
|
5227
|
-
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
5193
|
+
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), _n(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: o && o.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
5228
5194
|
}
|
|
5229
5195
|
}
|
|
5230
5196
|
reflink(t, e) {
|
|
@@ -5235,7 +5201,7 @@ ${g}` : g;
|
|
|
5235
5201
|
let a = r[0].charAt(0);
|
|
5236
5202
|
return { type: "text", raw: a, text: a };
|
|
5237
5203
|
}
|
|
5238
|
-
return
|
|
5204
|
+
return _n(r, o, r[0], this.lexer, this.rules);
|
|
5239
5205
|
}
|
|
5240
5206
|
}
|
|
5241
5207
|
emStrong(t, e, r = "") {
|
|
@@ -5327,12 +5293,12 @@ ${g}` : g;
|
|
|
5327
5293
|
R(this, "state");
|
|
5328
5294
|
R(this, "inlineQueue");
|
|
5329
5295
|
R(this, "tokenizer");
|
|
5330
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Xe, this.options.tokenizer = this.options.tokenizer || new
|
|
5331
|
-
let e = { other: ce, block:
|
|
5332
|
-
this.options.pedantic ? (e.block =
|
|
5296
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Xe, this.options.tokenizer = this.options.tokenizer || new Yt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5297
|
+
let e = { other: ce, block: Ht.normal, inline: wt.normal };
|
|
5298
|
+
this.options.pedantic ? (e.block = Ht.pedantic, e.inline = wt.pedantic) : this.options.gfm && (e.block = Ht.gfm, this.options.breaks ? e.inline = wt.breaks : e.inline = wt.gfm), this.tokenizer.rules = e;
|
|
5333
5299
|
}
|
|
5334
5300
|
static get rules() {
|
|
5335
|
-
return { block:
|
|
5301
|
+
return { block: Ht, inline: wt };
|
|
5336
5302
|
}
|
|
5337
5303
|
static lex(t, e) {
|
|
5338
5304
|
return new Pe(e).lex(t);
|
|
@@ -5527,7 +5493,7 @@ ${g}` : g;
|
|
|
5527
5493
|
}
|
|
5528
5494
|
return e;
|
|
5529
5495
|
}
|
|
5530
|
-
}, i(Pe, "u"), Pe), ct,
|
|
5496
|
+
}, i(Pe, "u"), Pe), ct, Zt = (ct = class {
|
|
5531
5497
|
constructor(t) {
|
|
5532
5498
|
R(this, "options");
|
|
5533
5499
|
R(this, "parser");
|
|
@@ -5627,7 +5593,7 @@ ${t}</tr>
|
|
|
5627
5593
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5628
5594
|
}
|
|
5629
5595
|
link({ href: t, title: e, tokens: r }) {
|
|
5630
|
-
let s = this.parser.parseInline(r), o =
|
|
5596
|
+
let s = this.parser.parseInline(r), o = In(t);
|
|
5631
5597
|
if (o === null) return s;
|
|
5632
5598
|
t = o;
|
|
5633
5599
|
let a = '<a href="' + t + '"';
|
|
@@ -5635,7 +5601,7 @@ ${t}</tr>
|
|
|
5635
5601
|
}
|
|
5636
5602
|
image({ href: t, title: e, text: r, tokens: s }) {
|
|
5637
5603
|
s && (r = this.parser.parseInline(s, this.parser.textRenderer));
|
|
5638
|
-
let o =
|
|
5604
|
+
let o = In(t);
|
|
5639
5605
|
if (o === null) return we(r);
|
|
5640
5606
|
t = o;
|
|
5641
5607
|
let a = `<img src="${t}" alt="${we(r)}"`;
|
|
@@ -5644,7 +5610,7 @@ ${t}</tr>
|
|
|
5644
5610
|
text(t) {
|
|
5645
5611
|
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : we(t.text);
|
|
5646
5612
|
}
|
|
5647
|
-
}, i(ct, "y"), ct), ut,
|
|
5613
|
+
}, i(ct, "y"), ct), ut, Nr = (ut = class {
|
|
5648
5614
|
strong({ text: t }) {
|
|
5649
5615
|
return t;
|
|
5650
5616
|
}
|
|
@@ -5680,7 +5646,7 @@ ${t}</tr>
|
|
|
5680
5646
|
R(this, "options");
|
|
5681
5647
|
R(this, "renderer");
|
|
5682
5648
|
R(this, "textRenderer");
|
|
5683
|
-
this.options = t || Xe, this.options.renderer = this.options.renderer || new
|
|
5649
|
+
this.options = t || Xe, this.options.renderer = this.options.renderer || new Zt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Nr();
|
|
5684
5650
|
}
|
|
5685
5651
|
static parse(t, e) {
|
|
5686
5652
|
return new Ne(e).parse(t);
|
|
@@ -5848,17 +5814,17 @@ ${t}</tr>
|
|
|
5848
5814
|
provideParser() {
|
|
5849
5815
|
return this.block ? ke.parse : ke.parseInline;
|
|
5850
5816
|
}
|
|
5851
|
-
}, i(Oe, "P"), R(Oe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), R(Oe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Oe), dt,
|
|
5817
|
+
}, i(Oe, "P"), R(Oe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), R(Oe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Oe), dt, pi = (dt = class {
|
|
5852
5818
|
constructor(...t) {
|
|
5853
|
-
R(this, "defaults",
|
|
5819
|
+
R(this, "defaults", Mr());
|
|
5854
5820
|
R(this, "options", this.setOptions);
|
|
5855
5821
|
R(this, "parse", this.parseMarkdown(!0));
|
|
5856
5822
|
R(this, "parseInline", this.parseMarkdown(!1));
|
|
5857
5823
|
R(this, "Parser", ke);
|
|
5858
|
-
R(this, "Renderer",
|
|
5859
|
-
R(this, "TextRenderer",
|
|
5824
|
+
R(this, "Renderer", Zt);
|
|
5825
|
+
R(this, "TextRenderer", Nr);
|
|
5860
5826
|
R(this, "Lexer", be);
|
|
5861
|
-
R(this, "Tokenizer",
|
|
5827
|
+
R(this, "Tokenizer", Yt);
|
|
5862
5828
|
R(this, "Hooks", St);
|
|
5863
5829
|
this.use(...t);
|
|
5864
5830
|
}
|
|
@@ -5906,7 +5872,7 @@ ${t}</tr>
|
|
|
5906
5872
|
}
|
|
5907
5873
|
"childTokens" in o && o.childTokens && (e.childTokens[o.name] = o.childTokens);
|
|
5908
5874
|
}), s.extensions = e), r.renderer) {
|
|
5909
|
-
let o = this.defaults.renderer || new
|
|
5875
|
+
let o = this.defaults.renderer || new Zt(this.defaults);
|
|
5910
5876
|
for (let a in r.renderer) {
|
|
5911
5877
|
if (!(a in o)) throw new Error(`renderer '${a}' does not exist`);
|
|
5912
5878
|
if (["options", "parser"].includes(a)) continue;
|
|
@@ -5919,7 +5885,7 @@ ${t}</tr>
|
|
|
5919
5885
|
s.renderer = o;
|
|
5920
5886
|
}
|
|
5921
5887
|
if (r.tokenizer) {
|
|
5922
|
-
let o = this.defaults.tokenizer || new
|
|
5888
|
+
let o = this.defaults.tokenizer || new Yt(this.defaults);
|
|
5923
5889
|
for (let a in r.tokenizer) {
|
|
5924
5890
|
if (!(a in o)) throw new Error(`tokenizer '${a}' does not exist`);
|
|
5925
5891
|
if (["options", "rules", "lexer"].includes(a)) continue;
|
|
@@ -6008,18 +5974,18 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
6008
5974
|
throw r;
|
|
6009
5975
|
};
|
|
6010
5976
|
}
|
|
6011
|
-
}, i(dt, "B"), dt), Ye = new
|
|
5977
|
+
}, i(dt, "B"), dt), Ye = new pi();
|
|
6012
5978
|
function F(n, t) {
|
|
6013
5979
|
return Ye.parse(n, t);
|
|
6014
5980
|
}
|
|
6015
5981
|
i(F, "g");
|
|
6016
5982
|
F.options = F.setOptions = function(n) {
|
|
6017
|
-
return Ye.setOptions(n), F.defaults = Ye.defaults,
|
|
5983
|
+
return Ye.setOptions(n), F.defaults = Ye.defaults, ns(F.defaults), F;
|
|
6018
5984
|
};
|
|
6019
|
-
F.getDefaults =
|
|
5985
|
+
F.getDefaults = Mr;
|
|
6020
5986
|
F.defaults = Xe;
|
|
6021
5987
|
F.use = function(...n) {
|
|
6022
|
-
return Ye.use(...n), F.defaults = Ye.defaults,
|
|
5988
|
+
return Ye.use(...n), F.defaults = Ye.defaults, ns(F.defaults), F;
|
|
6023
5989
|
};
|
|
6024
5990
|
F.walkTokens = function(n, t) {
|
|
6025
5991
|
return Ye.walkTokens(n, t);
|
|
@@ -6027,11 +5993,11 @@ F.walkTokens = function(n, t) {
|
|
|
6027
5993
|
F.parseInline = Ye.parseInline;
|
|
6028
5994
|
F.Parser = ke;
|
|
6029
5995
|
F.parser = ke.parse;
|
|
6030
|
-
F.Renderer =
|
|
6031
|
-
F.TextRenderer =
|
|
5996
|
+
F.Renderer = Zt;
|
|
5997
|
+
F.TextRenderer = Nr;
|
|
6032
5998
|
F.Lexer = be;
|
|
6033
5999
|
F.lexer = be.lex;
|
|
6034
|
-
F.Tokenizer =
|
|
6000
|
+
F.Tokenizer = Yt;
|
|
6035
6001
|
F.Hooks = St;
|
|
6036
6002
|
F.parse = F;
|
|
6037
6003
|
F.options;
|
|
@@ -6041,22 +6007,22 @@ F.walkTokens;
|
|
|
6041
6007
|
F.parseInline;
|
|
6042
6008
|
ke.parse;
|
|
6043
6009
|
be.lex;
|
|
6044
|
-
const
|
|
6010
|
+
const fi = { class: "flex flex-col h-full relative" }, mi = {
|
|
6045
6011
|
key: 0,
|
|
6046
6012
|
class: "pb-4"
|
|
6047
|
-
},
|
|
6013
|
+
}, bi = {
|
|
6048
6014
|
key: 0,
|
|
6049
6015
|
class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
|
|
6050
|
-
},
|
|
6016
|
+
}, ki = ["src", "alt"], xi = {
|
|
6051
6017
|
key: 0,
|
|
6052
6018
|
class: "flex items-center gap-3 py-3 px-2"
|
|
6053
|
-
},
|
|
6019
|
+
}, vi = {
|
|
6054
6020
|
key: 0,
|
|
6055
6021
|
class: "flex-shrink-0 size-8"
|
|
6056
|
-
},
|
|
6022
|
+
}, yi = ["src", "alt"], wi = ["innerHTML"], Ai = {
|
|
6057
6023
|
key: 1,
|
|
6058
6024
|
class: "flex gap-2 justify-start items-end mb-4"
|
|
6059
|
-
},
|
|
6025
|
+
}, Si = { class: "flex-shrink-0" }, Ti = ["src", "alt"], Ei = { class: "flex-shrink-0 pt-4 pb-2" }, Ci = ["placeholder", "disabled"], Ri = /* @__PURE__ */ se({
|
|
6060
6026
|
__name: "ElAgentChat",
|
|
6061
6027
|
props: {
|
|
6062
6028
|
agentController: {},
|
|
@@ -6069,15 +6035,15 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6069
6035
|
if (!y)
|
|
6070
6036
|
return "";
|
|
6071
6037
|
const x = F.parse(y, { async: !1 });
|
|
6072
|
-
return
|
|
6038
|
+
return Ta.sanitize(x);
|
|
6073
6039
|
}
|
|
6074
6040
|
i(t, "renderMarkdown");
|
|
6075
|
-
const e = W(""), r = W(), s = W(), o = U(() => Vt(n.agent)
|
|
6041
|
+
const e = W(""), r = W(), s = W(), o = U(() => Vt(n.agent));
|
|
6076
6042
|
function a(y, x) {
|
|
6077
6043
|
const w = y[x], B = y[x + 1];
|
|
6078
6044
|
return !B || B.sender !== w.sender;
|
|
6079
6045
|
}
|
|
6080
|
-
i(a, "shouldShowAvatar"),
|
|
6046
|
+
i(a, "shouldShowAvatar"), Et(async () => {
|
|
6081
6047
|
if (n.agentController && !n.agentController.textState.value.isConnected)
|
|
6082
6048
|
try {
|
|
6083
6049
|
await n.agentController.startTextConversation();
|
|
@@ -6139,22 +6105,22 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6139
6105
|
function X(y) {
|
|
6140
6106
|
const x = /* @__PURE__ */ new Date(), w = y.toDateString() === x.toDateString(), B = new Date(x);
|
|
6141
6107
|
B.setDate(B.getDate() - 1);
|
|
6142
|
-
const H = y.toDateString() === B.toDateString(),
|
|
6143
|
-
if (w) return
|
|
6144
|
-
if (H) return `Yesterday, ${
|
|
6108
|
+
const H = y.toDateString() === B.toDateString(), ee = y.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
|
|
6109
|
+
if (w) return ee;
|
|
6110
|
+
if (H) return `Yesterday, ${ee}`;
|
|
6145
6111
|
const z = y.getFullYear() === x.getFullYear();
|
|
6146
6112
|
return `${y.toLocaleDateString("en-US", {
|
|
6147
6113
|
weekday: "long",
|
|
6148
6114
|
month: "short",
|
|
6149
6115
|
day: "numeric",
|
|
6150
6116
|
...z ? {} : { year: "numeric" }
|
|
6151
|
-
})}, ${
|
|
6117
|
+
})}, ${ee}`;
|
|
6152
6118
|
}
|
|
6153
6119
|
return i(X, "formatTimeDivider"), Be(() => n.agentController?.sharedMessages.value, (y) => {
|
|
6154
6120
|
y && y.length > 0 && cr(() => d());
|
|
6155
|
-
}, { immediate: !0, deep: !0 }), (y, x) => (b(), v("div",
|
|
6156
|
-
E.value ? $("", !0) : (b(), v("div",
|
|
6157
|
-
|
|
6121
|
+
}, { immediate: !0, deep: !0 }), (y, x) => (b(), v("div", fi, [
|
|
6122
|
+
E.value ? $("", !0) : (b(), v("div", mi, [
|
|
6123
|
+
J(Cr, { agent: n.agent }, null, 8, ["agent"])
|
|
6158
6124
|
])),
|
|
6159
6125
|
g.value ? (b(), v("div", {
|
|
6160
6126
|
key: 1,
|
|
@@ -6168,19 +6134,19 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6168
6134
|
key: 2,
|
|
6169
6135
|
class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", E.value ? "text-theme-400" : "text-theme-600"])
|
|
6170
6136
|
}, [
|
|
6171
|
-
|
|
6137
|
+
J(Er, { class: "size-4" })
|
|
6172
6138
|
], 2)) : $("", !0),
|
|
6173
6139
|
p("div", {
|
|
6174
6140
|
ref_key: "messagesContainer",
|
|
6175
6141
|
ref: r,
|
|
6176
6142
|
class: "flex-1 overflow-y-auto overflow-x-hidden py-4 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
|
|
6177
6143
|
}, [
|
|
6178
|
-
(n.agentController?.sharedMessages.value.filter((w) => w.sender !== "system") ?? []).length === 0 && !f.value && !g.value ? (b(), v("div",
|
|
6144
|
+
(n.agentController?.sharedMessages.value.filter((w) => w.sender !== "system") ?? []).length === 0 && !f.value && !g.value ? (b(), v("div", bi, [
|
|
6179
6145
|
p("img", {
|
|
6180
6146
|
src: o.value,
|
|
6181
6147
|
alt: n.agent.name,
|
|
6182
6148
|
class: "size-20 rounded-full object-cover mb-3"
|
|
6183
|
-
}, null, 8,
|
|
6149
|
+
}, null, 8, ki),
|
|
6184
6150
|
p("div", {
|
|
6185
6151
|
class: _(["text-base font-semibold", E.value ? "text-theme-900" : "text-white"])
|
|
6186
6152
|
}, Z(n.agent.name), 3),
|
|
@@ -6192,10 +6158,10 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6192
6158
|
class: _(["text-center text-sm mt-3 max-w-[240px] leading-relaxed", E.value ? "text-theme-400" : "text-white/50"])
|
|
6193
6159
|
}, " Send a message to start the conversation. ", 2)
|
|
6194
6160
|
])) : $("", !0),
|
|
6195
|
-
(b(!0), v(Ae, null,
|
|
6161
|
+
(b(!0), v(Ae, null, Ct(n.agentController?.sharedMessages.value.filter((w) => w.sender !== "system") ?? [], (w, B) => (b(), v(Ae, {
|
|
6196
6162
|
key: w.id
|
|
6197
6163
|
}, [
|
|
6198
|
-
N(n.agentController?.sharedMessages.value.filter((H) => H.sender !== "system") ?? [], B) ? (b(), v("div",
|
|
6164
|
+
N(n.agentController?.sharedMessages.value.filter((H) => H.sender !== "system") ?? [], B) ? (b(), v("div", xi, [
|
|
6199
6165
|
p("div", {
|
|
6200
6166
|
class: _(["flex-1 h-px", E.value ? "bg-theme-200" : "bg-white/10"])
|
|
6201
6167
|
}, null, 2),
|
|
@@ -6213,13 +6179,13 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6213
6179
|
"mb-4": a(n.agentController?.sharedMessages.value.filter((H) => H.sender !== "system") ?? [], B)
|
|
6214
6180
|
}])
|
|
6215
6181
|
}, [
|
|
6216
|
-
w.sender === "agent" ? (b(), v("div",
|
|
6182
|
+
w.sender === "agent" ? (b(), v("div", vi, [
|
|
6217
6183
|
a(n.agentController?.sharedMessages.value.filter((H) => H.sender !== "system") ?? [], B) ? (b(), v("img", {
|
|
6218
6184
|
key: 0,
|
|
6219
6185
|
src: o.value,
|
|
6220
6186
|
alt: n.agent.name,
|
|
6221
6187
|
class: "size-7 rounded-full object-cover"
|
|
6222
|
-
}, null, 8,
|
|
6188
|
+
}, null, 8, yi)) : $("", !0)
|
|
6223
6189
|
])) : $("", !0),
|
|
6224
6190
|
p("div", {
|
|
6225
6191
|
class: _(w.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
|
|
@@ -6230,18 +6196,18 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6230
6196
|
p("div", {
|
|
6231
6197
|
class: "chat-msg-prose text-[13px] leading-[1.55] break-words",
|
|
6232
6198
|
innerHTML: t(w.text)
|
|
6233
|
-
}, null, 8,
|
|
6199
|
+
}, null, 8, wi)
|
|
6234
6200
|
], 2)
|
|
6235
6201
|
], 2)
|
|
6236
6202
|
], 2)
|
|
6237
6203
|
], 64))), 128)),
|
|
6238
|
-
n.agentController?.textState.value.isThinking ? (b(), v("div",
|
|
6239
|
-
p("div",
|
|
6204
|
+
n.agentController?.textState.value.isThinking ? (b(), v("div", Ai, [
|
|
6205
|
+
p("div", Si, [
|
|
6240
6206
|
p("img", {
|
|
6241
6207
|
src: o.value,
|
|
6242
6208
|
alt: n.agent.name,
|
|
6243
6209
|
class: "size-8 rounded-full object-cover"
|
|
6244
|
-
}, null, 8,
|
|
6210
|
+
}, null, 8, Ti)
|
|
6245
6211
|
]),
|
|
6246
6212
|
p("div", {
|
|
6247
6213
|
class: _(["rounded-2xl px-4 py-2.5 flex items-center", E.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
|
|
@@ -6252,8 +6218,8 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6252
6218
|
], 2)
|
|
6253
6219
|
])) : $("", !0)
|
|
6254
6220
|
], 512),
|
|
6255
|
-
p("div",
|
|
6256
|
-
|
|
6221
|
+
p("div", Ei, [
|
|
6222
|
+
Ln(p("textarea", {
|
|
6257
6223
|
ref_key: "textarea",
|
|
6258
6224
|
ref: s,
|
|
6259
6225
|
"onUpdate:modelValue": x[0] || (x[0] = (w) => e.value = w),
|
|
@@ -6263,8 +6229,8 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6263
6229
|
style: { "font-size": "16px", resize: "none" },
|
|
6264
6230
|
class: _(["w-full rounded-3xl px-5 py-3 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", E.value ? "bg-theme-50 border border-theme-200 text-theme-800 placeholder-theme-400 focus:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 text-white placeholder-white/50 focus:border-white/40"]),
|
|
6265
6231
|
onKeydown: c
|
|
6266
|
-
}, null, 42,
|
|
6267
|
-
[
|
|
6232
|
+
}, null, 42, Ci), [
|
|
6233
|
+
[Dn, e.value]
|
|
6268
6234
|
]),
|
|
6269
6235
|
p("div", {
|
|
6270
6236
|
class: _(["text-[10px] text-center mt-2", E.value ? "text-theme-300" : "text-white/40"])
|
|
@@ -6272,30 +6238,30 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6272
6238
|
])
|
|
6273
6239
|
]));
|
|
6274
6240
|
}
|
|
6275
|
-
}),
|
|
6241
|
+
}), Ii = /* @__PURE__ */ i((n, t) => {
|
|
6276
6242
|
const e = n.__vccOpts || n;
|
|
6277
6243
|
for (const [r, s] of t)
|
|
6278
6244
|
e[r] = s;
|
|
6279
6245
|
return e;
|
|
6280
|
-
}, "_export_sfc"), br = /* @__PURE__ */
|
|
6246
|
+
}, "_export_sfc"), br = /* @__PURE__ */ Ii(Ri, [["__scopeId", "data-v-a11b518b"]]), Mi = { class: "flex flex-col items-center text-center gap-4" }, _i = { class: "relative flex-shrink-0" }, zi = { class: "w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white" }, Li = ["src", "alt"], Di = { class: "min-w-0" }, $i = { class: "text-3xl font-light text-white mb-2 truncate" }, Oi = { class: "text-base font-light text-white/60 line-clamp-1" }, Pi = /* @__PURE__ */ se({
|
|
6281
6247
|
__name: "ElAgentHeader",
|
|
6282
6248
|
props: {
|
|
6283
6249
|
agent: {}
|
|
6284
6250
|
},
|
|
6285
6251
|
setup(n) {
|
|
6286
6252
|
function t() {
|
|
6287
|
-
return n.agent.avatar?.src ||
|
|
6253
|
+
return n.agent.avatar?.src || Xt(n.agent.name);
|
|
6288
6254
|
}
|
|
6289
|
-
return i(t, "getAvatarSrc"), (e, r) => (b(), v("div",
|
|
6290
|
-
p("div",
|
|
6291
|
-
p("div",
|
|
6255
|
+
return i(t, "getAvatarSrc"), (e, r) => (b(), v("div", Mi, [
|
|
6256
|
+
p("div", _i, [
|
|
6257
|
+
p("div", zi, [
|
|
6292
6258
|
p("img", {
|
|
6293
6259
|
src: t(),
|
|
6294
6260
|
alt: n.agent.name,
|
|
6295
6261
|
class: "w-full h-full object-cover",
|
|
6296
6262
|
onError: r[0] || (r[0] = //@ts-ignore
|
|
6297
|
-
(...s) =>
|
|
6298
|
-
}, null, 40,
|
|
6263
|
+
(...s) => ne(jt) && ne(jt)(...s))
|
|
6264
|
+
}, null, 40, Li)
|
|
6299
6265
|
]),
|
|
6300
6266
|
r[1] || (r[1] = p("div", { class: "absolute top-1.5 right-1.5" }, [
|
|
6301
6267
|
p("div", {
|
|
@@ -6305,19 +6271,19 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6305
6271
|
p("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" })
|
|
6306
6272
|
], -1))
|
|
6307
6273
|
]),
|
|
6308
|
-
p("div",
|
|
6309
|
-
p("h1",
|
|
6310
|
-
p("p",
|
|
6274
|
+
p("div", Di, [
|
|
6275
|
+
p("h1", $i, Z(n.agent.name), 1),
|
|
6276
|
+
p("p", Oi, Z(n.agent.title), 1)
|
|
6311
6277
|
])
|
|
6312
6278
|
]));
|
|
6313
6279
|
}
|
|
6314
|
-
}),
|
|
6280
|
+
}), Ni = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, Bi = /* @__PURE__ */ se({
|
|
6315
6281
|
name: "SelfSidebarClose",
|
|
6316
6282
|
__name: "AgentSidebarClose",
|
|
6317
6283
|
emits: ["click"],
|
|
6318
6284
|
setup(n) {
|
|
6319
6285
|
const t = W(!1);
|
|
6320
|
-
return
|
|
6286
|
+
return Et(() => {
|
|
6321
6287
|
setTimeout(() => {
|
|
6322
6288
|
t.value = !0;
|
|
6323
6289
|
}, 100);
|
|
@@ -6326,7 +6292,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6326
6292
|
onClick: r[0] || (r[0] = (s) => e.$emit("click", s))
|
|
6327
6293
|
}, [
|
|
6328
6294
|
r[1] || (r[1] = p("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)),
|
|
6329
|
-
p("span",
|
|
6295
|
+
p("span", Ni, [
|
|
6330
6296
|
p("span", {
|
|
6331
6297
|
class: _(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
|
|
6332
6298
|
style: { "background-color": "currentColor", "transition-delay": "0.15s" }
|
|
@@ -6338,16 +6304,16 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6338
6304
|
])
|
|
6339
6305
|
]));
|
|
6340
6306
|
}
|
|
6341
|
-
}),
|
|
6307
|
+
}), Ui = {
|
|
6342
6308
|
key: 0,
|
|
6343
6309
|
class: "px-9 pt-12 pb-4"
|
|
6344
|
-
},
|
|
6310
|
+
}, Fi = { class: "text-base font-medium text-theme-400" }, Hi = {
|
|
6345
6311
|
key: 1,
|
|
6346
6312
|
class: "px-4 pb-8 border-b border-white/10"
|
|
6347
|
-
},
|
|
6313
|
+
}, Vi = ["disabled", "onClick"], Gi = { class: "flex items-center gap-3" }, ji = { class: "flex-1" }, Wi = {
|
|
6348
6314
|
key: 0,
|
|
6349
6315
|
class: "text-xs text-white/50 mt-0.5"
|
|
6350
|
-
},
|
|
6316
|
+
}, qi = { class: "p-6" }, fs = /* @__PURE__ */ se({
|
|
6351
6317
|
name: "ElSidebar",
|
|
6352
6318
|
inheritAttrs: !1,
|
|
6353
6319
|
__name: "ElSidebar",
|
|
@@ -6380,7 +6346,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6380
6346
|
closeButton: "-left-16"
|
|
6381
6347
|
});
|
|
6382
6348
|
return (h, g) => (b(), v(Ae, null, [
|
|
6383
|
-
|
|
6349
|
+
J(on, {
|
|
6384
6350
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
6385
6351
|
"leave-active-class": "transition-opacity duration-200 ease-in",
|
|
6386
6352
|
"enter-from-class": "opacity-0",
|
|
@@ -6397,7 +6363,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6397
6363
|
]),
|
|
6398
6364
|
_: 1
|
|
6399
6365
|
}),
|
|
6400
|
-
|
|
6366
|
+
J(on, {
|
|
6401
6367
|
"enter-active-class": "transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6402
6368
|
"leave-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6403
6369
|
"enter-from-class": d.value.enter,
|
|
@@ -6412,35 +6378,35 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6412
6378
|
onClick: g[3] || (g[3] = (f) => a.value = !1)
|
|
6413
6379
|
}, [
|
|
6414
6380
|
p("div", {
|
|
6415
|
-
class: _(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center",
|
|
6381
|
+
class: _(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center", ne(o)]),
|
|
6416
6382
|
onClick: g[2] || (g[2] = kr(() => {
|
|
6417
6383
|
}, ["stop"]))
|
|
6418
6384
|
}, [
|
|
6419
|
-
|
|
6385
|
+
J(Bi, {
|
|
6420
6386
|
class: _(["absolute top-4 z-10 text-white", d.value.closeButton]),
|
|
6421
6387
|
onClick: g[1] || (g[1] = (f) => a.value = !1)
|
|
6422
6388
|
}, null, 8, ["class"]),
|
|
6423
|
-
n.title ? (b(), v("div",
|
|
6424
|
-
p("h3",
|
|
6389
|
+
n.title ? (b(), v("div", Ui, [
|
|
6390
|
+
p("h3", Fi, Z(n.title), 1)
|
|
6425
6391
|
])) : $("", !0),
|
|
6426
|
-
h.$slots.header ? (b(), v("div",
|
|
6392
|
+
h.$slots.header ? (b(), v("div", Hi, [
|
|
6427
6393
|
ht(h.$slots, "header")
|
|
6428
6394
|
])) : $("", !0),
|
|
6429
6395
|
p("div", {
|
|
6430
6396
|
class: _(["flex-1 p-6 space-y-2 overflow-y-auto", { "pt-6": !n.title && !h.$slots.header, "pt-4": n.title || h.$slots.header }])
|
|
6431
6397
|
}, [
|
|
6432
|
-
|
|
6398
|
+
J(zn, {
|
|
6433
6399
|
"enter-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6434
6400
|
"leave-active-class": "transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6435
|
-
"enter-from-class":
|
|
6401
|
+
"enter-from-class": ne(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0",
|
|
6436
6402
|
"enter-to-class": "translate-x-0 opacity-100",
|
|
6437
6403
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
6438
|
-
"leave-to-class":
|
|
6404
|
+
"leave-to-class": ne(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
|
|
6439
6405
|
}, {
|
|
6440
6406
|
default: Se(() => [
|
|
6441
|
-
(b(!0), v(Ae, null,
|
|
6407
|
+
(b(!0), v(Ae, null, Ct(l.value, (f, k) => (b(), v("button", {
|
|
6442
6408
|
key: f.key || f.label || k,
|
|
6443
|
-
style:
|
|
6409
|
+
style: $n({ transitionDelay: `${k * 40}ms` }),
|
|
6444
6410
|
class: _(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [
|
|
6445
6411
|
f.isActive ? "bg-primary-500/20 border border-primary-500/40" : "hover:bg-white/10",
|
|
6446
6412
|
f.isDisabled && "opacity-50 cursor-not-allowed"
|
|
@@ -6448,7 +6414,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6448
6414
|
disabled: f.isDisabled,
|
|
6449
6415
|
onClick: /* @__PURE__ */ i((M) => c(f), "onClick")
|
|
6450
6416
|
}, [
|
|
6451
|
-
p("div",
|
|
6417
|
+
p("div", Gi, [
|
|
6452
6418
|
f.icon?.src ? (b(), v("i", {
|
|
6453
6419
|
key: 0,
|
|
6454
6420
|
class: _(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [
|
|
@@ -6456,19 +6422,19 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6456
6422
|
f.isActive ? "text-primary-400" : "text-white/70 group-hover:text-white"
|
|
6457
6423
|
]])
|
|
6458
6424
|
}, null, 2)) : $("", !0),
|
|
6459
|
-
p("div",
|
|
6425
|
+
p("div", ji, [
|
|
6460
6426
|
p("div", {
|
|
6461
6427
|
class: _(["font-medium text-sm", f.isActive ? "text-primary-300" : "text-white"])
|
|
6462
6428
|
}, Z(f.label), 3),
|
|
6463
|
-
f.subLabel ? (b(), v("div",
|
|
6429
|
+
f.subLabel ? (b(), v("div", Wi, Z(f.subLabel), 1)) : $("", !0)
|
|
6464
6430
|
])
|
|
6465
6431
|
])
|
|
6466
|
-
], 14,
|
|
6432
|
+
], 14, Vi))), 128))
|
|
6467
6433
|
]),
|
|
6468
6434
|
_: 1
|
|
6469
6435
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
6470
6436
|
], 2),
|
|
6471
|
-
p("div",
|
|
6437
|
+
p("div", qi, [
|
|
6472
6438
|
ht(h.$slots, "footer", {}, () => [
|
|
6473
6439
|
g[4] || (g[4] = p("div", { class: "text-center" }, [
|
|
6474
6440
|
p("p", { class: "text-[10px] text-white/40 font-sans" }, [
|
|
@@ -6489,7 +6455,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6489
6455
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
6490
6456
|
], 64));
|
|
6491
6457
|
}
|
|
6492
|
-
}),
|
|
6458
|
+
}), Yi = /* @__PURE__ */ se({
|
|
6493
6459
|
name: "AgentModeSidebar",
|
|
6494
6460
|
__name: "ElAgentModeSidebar",
|
|
6495
6461
|
props: {
|
|
@@ -6501,7 +6467,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6501
6467
|
const e = n, r = t, s = U({
|
|
6502
6468
|
get: /* @__PURE__ */ i(() => e.modelValue, "get"),
|
|
6503
6469
|
set: /* @__PURE__ */ i((l) => r("update:modelValue", l), "set")
|
|
6504
|
-
}), o = U(() => e.agentController?.agentMode?.value ?? "self"), a = U(() =>
|
|
6470
|
+
}), o = U(() => e.agentController?.agentMode?.value ?? "self"), a = U(() => Pn.map((l) => ({
|
|
6505
6471
|
key: l.mode,
|
|
6506
6472
|
icon: { src: l.icon },
|
|
6507
6473
|
label: l.label,
|
|
@@ -6510,7 +6476,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6510
6476
|
e.agentController?.setMode(l.mode);
|
|
6511
6477
|
}, "onClick")
|
|
6512
6478
|
})));
|
|
6513
|
-
return (l, c) => (b(), me(
|
|
6479
|
+
return (l, c) => (b(), me(fs, {
|
|
6514
6480
|
modelValue: s.value,
|
|
6515
6481
|
"onUpdate:modelValue": c[0] || (c[0] = (d) => s.value = d),
|
|
6516
6482
|
items: a.value,
|
|
@@ -6519,7 +6485,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6519
6485
|
"width-classes": "w-[80%] max-w-[255px]"
|
|
6520
6486
|
}, null, 8, ["modelValue", "items"]));
|
|
6521
6487
|
}
|
|
6522
|
-
}),
|
|
6488
|
+
}), Zi = /* @__PURE__ */ se({
|
|
6523
6489
|
name: "AgentSidebar",
|
|
6524
6490
|
__name: "ElAgentSidebar",
|
|
6525
6491
|
props: {
|
|
@@ -6570,7 +6536,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6570
6536
|
}, "onClick")
|
|
6571
6537
|
}), a;
|
|
6572
6538
|
});
|
|
6573
|
-
return (a, l) => (b(), me(
|
|
6539
|
+
return (a, l) => (b(), me(fs, {
|
|
6574
6540
|
modelValue: s.value,
|
|
6575
6541
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => s.value = c),
|
|
6576
6542
|
items: o.value,
|
|
@@ -6578,40 +6544,40 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6578
6544
|
title: n.title || "Menu"
|
|
6579
6545
|
}, null, 8, ["modelValue", "items", "title"]));
|
|
6580
6546
|
}
|
|
6581
|
-
}),
|
|
6547
|
+
}), Xi = {
|
|
6582
6548
|
key: 0,
|
|
6583
6549
|
class: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-theme-800 to-theme-950 rounded-3xl z-10"
|
|
6584
|
-
},
|
|
6550
|
+
}, Ki = ["data-quality"], Qi = {
|
|
6585
6551
|
key: 0,
|
|
6586
6552
|
class: "flex items-center"
|
|
6587
|
-
},
|
|
6553
|
+
}, Ji = { class: "flex-1 flex items-center gap-3 pl-2" }, el = ["src", "alt"], tl = { class: "text-white/90 text-sm font-medium" }, rl = {
|
|
6588
6554
|
key: 0,
|
|
6589
6555
|
class: "flex justify-end"
|
|
6590
|
-
},
|
|
6556
|
+
}, nl = { class: "text-sm" }, sl = {
|
|
6591
6557
|
key: 0,
|
|
6592
6558
|
class: "flex-1 basis-0 flex justify-end"
|
|
6593
|
-
},
|
|
6559
|
+
}, ol = {
|
|
6594
6560
|
key: 0,
|
|
6595
6561
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full px-4"
|
|
6596
|
-
},
|
|
6562
|
+
}, al = { class: "flex-1 min-h-0 max-w-md mx-auto w-full" }, il = {
|
|
6597
6563
|
key: 0,
|
|
6598
6564
|
class: "h-full pb-12 flex-1 flex flex-col relative z-20 min-h-0 px-4 @[480px]/agent:px-6 max-w-md mx-auto w-full"
|
|
6599
|
-
},
|
|
6565
|
+
}, ll = { class: "flex-1 basis-0 flex flex-col justify-start pt-8 gap-7" }, cl = {
|
|
6600
6566
|
key: 0,
|
|
6601
6567
|
class: "flex items-center justify-center gap-3"
|
|
6602
|
-
},
|
|
6568
|
+
}, ul = ["href"], dl = {
|
|
6603
6569
|
key: 1,
|
|
6604
6570
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full gap-4 px-4"
|
|
6605
|
-
},
|
|
6571
|
+
}, hl = { class: "max-w-md mx-auto" }, gl = {
|
|
6606
6572
|
key: 2,
|
|
6607
6573
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full px-4 @[480px]/agent:px-6"
|
|
6608
|
-
},
|
|
6574
|
+
}, pl = { class: "flex-1 min-h-0 max-w-md mx-auto w-full" }, fl = {
|
|
6609
6575
|
key: 2,
|
|
6610
6576
|
class: "bg-gradient-to-br from-theme-800 to-theme-950 text-white flex items-center justify-center h-full p-8"
|
|
6611
|
-
},
|
|
6577
|
+
}, ml = { class: "text-center max-w-md space-y-4" }, bl = { class: "text-sm text-white/70 leading-relaxed" }, kl = {
|
|
6612
6578
|
key: 3,
|
|
6613
6579
|
class: "bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"
|
|
6614
|
-
},
|
|
6580
|
+
}, Il = /* @__PURE__ */ se({
|
|
6615
6581
|
__name: "AgentChat",
|
|
6616
6582
|
props: {
|
|
6617
6583
|
sdk: {},
|
|
@@ -6629,7 +6595,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6629
6595
|
},
|
|
6630
6596
|
emits: ["close", "error"],
|
|
6631
6597
|
setup(n, { emit: t }) {
|
|
6632
|
-
const e = t, r =
|
|
6598
|
+
const e = t, r = Cs(), s = W(!1), o = W(!1), a = W(), l = W(), c = U(() => r.value?.agentMode?.value ?? "self"), d = U(() => n.sdk.activeUser.value !== void 0), h = U(() => Pn.find((x) => x.mode === c.value));
|
|
6633
6599
|
function g() {
|
|
6634
6600
|
r.value && r.value.destroy();
|
|
6635
6601
|
try {
|
|
@@ -6647,19 +6613,19 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6647
6613
|
function f(y) {
|
|
6648
6614
|
if (!l.value)
|
|
6649
6615
|
return;
|
|
6650
|
-
const x =
|
|
6616
|
+
const x = Ls(y);
|
|
6651
6617
|
Object.entries(x).forEach(([w, B]) => {
|
|
6652
6618
|
l.value.style.setProperty(`--primary-${w}`, B);
|
|
6653
6619
|
});
|
|
6654
6620
|
}
|
|
6655
|
-
i(f, "applyTheme"),
|
|
6621
|
+
i(f, "applyTheme"), Et(() => {
|
|
6656
6622
|
try {
|
|
6657
6623
|
g(), f(n.theme), n.chatOnly && r.value && r.value.setMode("chat");
|
|
6658
6624
|
} catch (y) {
|
|
6659
6625
|
const x = y instanceof Error ? y.message : "Failed to initialize digital agent";
|
|
6660
6626
|
a.value = x, e("error", x);
|
|
6661
6627
|
}
|
|
6662
|
-
}),
|
|
6628
|
+
}), Rs(() => {
|
|
6663
6629
|
r.value && r.value.destroy();
|
|
6664
6630
|
}), Be(() => n.theme, (y) => {
|
|
6665
6631
|
f(y);
|
|
@@ -6675,23 +6641,23 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6675
6641
|
question: "i-heroicons-question-mark-circle",
|
|
6676
6642
|
message: "i-heroicons-chat-bubble-left-right",
|
|
6677
6643
|
sparkles: "i-heroicons-sparkles"
|
|
6678
|
-
}, N = U(() =>
|
|
6644
|
+
}, N = U(() => Ns({
|
|
6679
6645
|
template: n.buttonText || "Talk to {name}",
|
|
6680
6646
|
agent: n.agent
|
|
6681
6647
|
})), X = U(() => E[n.buttonIcon || "phone"] || E.phone);
|
|
6682
6648
|
return (y, x) => (b(), v("div", {
|
|
6683
6649
|
ref_key: "rootElement",
|
|
6684
6650
|
ref: l,
|
|
6685
|
-
key:
|
|
6651
|
+
key: ne(Vt)(n.agent),
|
|
6686
6652
|
class: "pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative",
|
|
6687
6653
|
"data-test": "agent-chat"
|
|
6688
6654
|
}, [
|
|
6689
|
-
n.loading ? (b(), v("div",
|
|
6690
|
-
|
|
6655
|
+
n.loading ? (b(), v("div", Xi, [
|
|
6656
|
+
J(Er, { class: "text-white size-8" })
|
|
6691
6657
|
])) : n.agent && !a.value ? (b(), v("div", {
|
|
6692
6658
|
key: 1,
|
|
6693
6659
|
class: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
6694
|
-
style:
|
|
6660
|
+
style: $n({ backgroundImage: `url(${ne(Vt)(n.agent)})` }),
|
|
6695
6661
|
"data-quality": n.agent.avatar?.quality || "none"
|
|
6696
6662
|
}, [
|
|
6697
6663
|
p("div", {
|
|
@@ -6703,16 +6669,16 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6703
6669
|
p("div", {
|
|
6704
6670
|
class: _(["relative z-30 p-2", c.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
6705
6671
|
}, [
|
|
6706
|
-
n.chatOnly ? (b(), v("div",
|
|
6707
|
-
p("div",
|
|
6672
|
+
n.chatOnly ? (b(), v("div", Qi, [
|
|
6673
|
+
p("div", Ji, [
|
|
6708
6674
|
p("img", {
|
|
6709
|
-
src:
|
|
6675
|
+
src: ne(Vt)(n.agent),
|
|
6710
6676
|
alt: n.agent.name,
|
|
6711
6677
|
class: "size-8 rounded-full object-cover"
|
|
6712
|
-
}, null, 8,
|
|
6713
|
-
p("span",
|
|
6678
|
+
}, null, 8, el),
|
|
6679
|
+
p("span", tl, Z(n.agent.name), 1)
|
|
6714
6680
|
]),
|
|
6715
|
-
n.hasClose ? (b(), v("div",
|
|
6681
|
+
n.hasClose ? (b(), v("div", rl, [
|
|
6716
6682
|
p("button", {
|
|
6717
6683
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
6718
6684
|
onClick: x[0] || (x[0] = kr((w) => e("close", "button"), ["stop"]))
|
|
@@ -6741,10 +6707,10 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6741
6707
|
p("i", {
|
|
6742
6708
|
class: _([h.value?.icon, "size-4 opacity-60"])
|
|
6743
6709
|
}, null, 2),
|
|
6744
|
-
p("span",
|
|
6710
|
+
p("span", nl, Z(h.value?.label), 1),
|
|
6745
6711
|
x[9] || (x[9] = p("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
6746
6712
|
], 2),
|
|
6747
|
-
n.hasClose ? (b(), v("div",
|
|
6713
|
+
n.hasClose ? (b(), v("div", sl, [
|
|
6748
6714
|
p("button", {
|
|
6749
6715
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
6750
6716
|
onClick: x[3] || (x[3] = kr((w) => e("close", "button"), ["stop"]))
|
|
@@ -6754,19 +6720,19 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6754
6720
|
])) : $("", !0)
|
|
6755
6721
|
], 2))
|
|
6756
6722
|
], 2),
|
|
6757
|
-
n.chatOnly ? (b(), v("div",
|
|
6758
|
-
p("div",
|
|
6759
|
-
|
|
6723
|
+
n.chatOnly ? (b(), v("div", ol, [
|
|
6724
|
+
p("div", al, [
|
|
6725
|
+
J(br, {
|
|
6760
6726
|
"agent-controller": r.value,
|
|
6761
6727
|
agent: n.agent
|
|
6762
6728
|
}, null, 8, ["agent-controller", "agent"])
|
|
6763
6729
|
])
|
|
6764
6730
|
])) : (b(), v(Ae, { key: 1 }, [
|
|
6765
|
-
c.value === "self" ? (b(), v("div",
|
|
6731
|
+
c.value === "self" ? (b(), v("div", il, [
|
|
6766
6732
|
x[11] || (x[11] = p("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
6767
|
-
|
|
6768
|
-
p("div",
|
|
6769
|
-
|
|
6733
|
+
J(Pi, { agent: n.agent }, null, 8, ["agent"]),
|
|
6734
|
+
p("div", ll, [
|
|
6735
|
+
J(Nn, {
|
|
6770
6736
|
theme: "primary",
|
|
6771
6737
|
size: "lg",
|
|
6772
6738
|
class: "w-full",
|
|
@@ -6779,38 +6745,38 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6779
6745
|
]),
|
|
6780
6746
|
_: 1
|
|
6781
6747
|
}, 8, ["icon"]),
|
|
6782
|
-
n.agent.accounts && n.agent.accounts.length > 0 ? (b(), v("div",
|
|
6783
|
-
(b(!0), v(Ae, null,
|
|
6748
|
+
n.agent.accounts && n.agent.accounts.length > 0 ? (b(), v("div", cl, [
|
|
6749
|
+
(b(!0), v(Ae, null, Ct(n.agent.accounts.filter((w) => ne(it)[w.platform]), (w) => (b(), v("a", {
|
|
6784
6750
|
key: `${w.platform}-${w.handle}`,
|
|
6785
|
-
href:
|
|
6751
|
+
href: ne(it)[w.platform].getUrl(w.handle),
|
|
6786
6752
|
target: "_blank",
|
|
6787
6753
|
class: "size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"
|
|
6788
6754
|
}, [
|
|
6789
6755
|
p("i", {
|
|
6790
|
-
class: _([
|
|
6756
|
+
class: _([ne(it)[w.platform].icon, "size-5"])
|
|
6791
6757
|
}, null, 2)
|
|
6792
|
-
], 8,
|
|
6758
|
+
], 8, ul))), 128))
|
|
6793
6759
|
])) : $("", !0)
|
|
6794
6760
|
])
|
|
6795
|
-
])) : c.value === "talk" ? (b(), v("div",
|
|
6796
|
-
n.requireAuth && !d.value ? (b(), me(
|
|
6761
|
+
])) : c.value === "talk" ? (b(), v("div", dl, [
|
|
6762
|
+
n.requireAuth && !d.value ? (b(), me(cn, {
|
|
6797
6763
|
key: 0,
|
|
6798
6764
|
sdk: n.sdk
|
|
6799
6765
|
}, null, 8, ["sdk"])) : (b(), v(Ae, { key: 1 }, [
|
|
6800
6766
|
p("div", null, [
|
|
6801
|
-
p("div",
|
|
6802
|
-
|
|
6767
|
+
p("div", hl, [
|
|
6768
|
+
J(Cr, { agent: n.agent }, null, 8, ["agent"])
|
|
6803
6769
|
])
|
|
6804
6770
|
]),
|
|
6805
|
-
|
|
6771
|
+
J(br, {
|
|
6806
6772
|
"agent-controller": r.value,
|
|
6807
6773
|
agent: n.agent
|
|
6808
6774
|
}, null, 8, ["agent-controller", "agent"])
|
|
6809
6775
|
], 64))
|
|
6810
|
-
])) : (b(), v("div",
|
|
6811
|
-
p("div",
|
|
6776
|
+
])) : (b(), v("div", gl, [
|
|
6777
|
+
p("div", pl, [
|
|
6812
6778
|
c.value === "chat" ? (b(), v(Ae, { key: 0 }, [
|
|
6813
|
-
n.requireAuth && !d.value ? (b(), me(
|
|
6779
|
+
n.requireAuth && !d.value ? (b(), me(cn, {
|
|
6814
6780
|
key: 0,
|
|
6815
6781
|
sdk: n.sdk
|
|
6816
6782
|
}, null, 8, ["sdk"])) : (b(), me(br, {
|
|
@@ -6818,7 +6784,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6818
6784
|
"agent-controller": r.value,
|
|
6819
6785
|
agent: n.agent
|
|
6820
6786
|
}, null, 8, ["agent-controller", "agent"]))
|
|
6821
|
-
], 64)) : c.value === "info" ? (b(), me(
|
|
6787
|
+
], 64)) : c.value === "info" ? (b(), me(na, {
|
|
6822
6788
|
key: 1,
|
|
6823
6789
|
agent: n.agent
|
|
6824
6790
|
}, null, 8, ["agent"])) : $("", !0)
|
|
@@ -6838,18 +6804,18 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6838
6804
|
], -1)
|
|
6839
6805
|
])], 2)
|
|
6840
6806
|
], 2)
|
|
6841
|
-
], 12,
|
|
6842
|
-
p("div",
|
|
6807
|
+
], 12, Ki)) : a.value ? (b(), v("div", fl, [
|
|
6808
|
+
p("div", ml, [
|
|
6843
6809
|
x[13] || (x[13] = p("div", { class: "flex justify-center" }, [
|
|
6844
6810
|
p("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [
|
|
6845
6811
|
p("i", { class: "i-tabler-alert-circle size-6 text-red-400" })
|
|
6846
6812
|
])
|
|
6847
6813
|
], -1)),
|
|
6848
6814
|
x[14] || (x[14] = p("h3", { class: "text-lg font-medium" }, " Agent Error ", -1)),
|
|
6849
|
-
p("p",
|
|
6815
|
+
p("p", bl, Z(a.value), 1)
|
|
6850
6816
|
])
|
|
6851
|
-
])) : (b(), v("div",
|
|
6852
|
-
n.chatOnly ? $("", !0) : (b(), me(
|
|
6817
|
+
])) : (b(), v("div", kl, " There was an error loading the digital agent. Please try again later. ")),
|
|
6818
|
+
n.chatOnly ? $("", !0) : (b(), me(Zi, {
|
|
6853
6819
|
key: 4,
|
|
6854
6820
|
modelValue: s.value,
|
|
6855
6821
|
"onUpdate:modelValue": x[5] || (x[5] = (w) => s.value = w),
|
|
@@ -6858,7 +6824,7 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6858
6824
|
title: n.agent.name,
|
|
6859
6825
|
"data-test": "agent-sidebar"
|
|
6860
6826
|
}, null, 8, ["modelValue", "agent", "sdk", "title"])),
|
|
6861
|
-
n.chatOnly ? $("", !0) : (b(), me(
|
|
6827
|
+
n.chatOnly ? $("", !0) : (b(), me(Yi, {
|
|
6862
6828
|
key: 5,
|
|
6863
6829
|
modelValue: o.value,
|
|
6864
6830
|
"onUpdate:modelValue": x[6] || (x[6] = (w) => o.value = w),
|
|
@@ -6867,10 +6833,10 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6867
6833
|
}, null, 8, ["modelValue", "agent-controller"]))
|
|
6868
6834
|
]));
|
|
6869
6835
|
}
|
|
6870
|
-
}),
|
|
6836
|
+
}), xl = { class: "agent-wrap" }, vl = {
|
|
6871
6837
|
key: 0,
|
|
6872
6838
|
class: "flex items-center justify-center h-full"
|
|
6873
|
-
},
|
|
6839
|
+
}, Ml = /* @__PURE__ */ se({
|
|
6874
6840
|
__name: "AgentWrap",
|
|
6875
6841
|
props: {
|
|
6876
6842
|
sdk: {},
|
|
@@ -6884,11 +6850,11 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6884
6850
|
apiBase: {}
|
|
6885
6851
|
},
|
|
6886
6852
|
setup(n) {
|
|
6887
|
-
const t =
|
|
6853
|
+
const t = Is("AgentWrap"), e = n, r = e.sdk || Ms.getInstance({
|
|
6888
6854
|
isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
|
|
6889
6855
|
...e.apiBase && { apiBase: e.apiBase }
|
|
6890
6856
|
}), s = W(!e.agent), o = W(e.agent), a = W();
|
|
6891
|
-
return
|
|
6857
|
+
return Et(async () => {
|
|
6892
6858
|
if (e.agent) {
|
|
6893
6859
|
t.debug("Agent provided via props, skipping fetch", {
|
|
6894
6860
|
agentId: e.agent.agentId,
|
|
@@ -6964,12 +6930,12 @@ const ki = { class: "flex flex-col h-full relative" }, xi = {
|
|
|
6964
6930
|
}
|
|
6965
6931
|
});
|
|
6966
6932
|
}
|
|
6967
|
-
}), (l, c) => (b(), v("div",
|
|
6968
|
-
s.value ? (b(), v("div",
|
|
6933
|
+
}), (l, c) => (b(), v("div", xl, [
|
|
6934
|
+
s.value ? (b(), v("div", vl, [...c[0] || (c[0] = [
|
|
6969
6935
|
p("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
|
|
6970
6936
|
])])) : o.value ? ht(l.$slots, "default", {
|
|
6971
6937
|
key: 1,
|
|
6972
|
-
sdk:
|
|
6938
|
+
sdk: ne(r),
|
|
6973
6939
|
agent: o.value,
|
|
6974
6940
|
context: n.context,
|
|
6975
6941
|
firstMessage: n.firstMessage,
|
|
@@ -6984,21 +6950,19 @@ export {
|
|
|
6984
6950
|
vr as A,
|
|
6985
6951
|
xr as C,
|
|
6986
6952
|
br as E,
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6953
|
+
El as V,
|
|
6954
|
+
Ml as _,
|
|
6955
|
+
Il as a,
|
|
6956
|
+
Ds as b,
|
|
6957
|
+
$s as c,
|
|
6958
|
+
Os as d,
|
|
6959
|
+
Cl as e,
|
|
6960
|
+
Pn as f,
|
|
6995
6961
|
Vt as g,
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
Fs as m,
|
|
7002
|
-
Us as p
|
|
6962
|
+
ln as h,
|
|
6963
|
+
jt as i,
|
|
6964
|
+
Rl as j,
|
|
6965
|
+
Ns as k,
|
|
6966
|
+
Ps as p
|
|
7003
6967
|
};
|
|
7004
|
-
//# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-
|
|
6968
|
+
//# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CeEcZnMh.js.map
|