@fiction/sdk 1.0.4 → 1.0.6
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/sdk.css +1 -1
- package/dist/self.js +465 -485
- package/dist/self.js.map +1 -1
- package/package.json +8 -4
- package/sdk.css.d.ts +5 -0
package/dist/self.js
CHANGED
|
@@ -2,11 +2,11 @@ var vt = Object.defineProperty;
|
|
|
2
2
|
var er = (e, o, r) => o in e ? vt(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r;
|
|
3
3
|
var n = (e, o) => vt(e, "name", { value: o, configurable: !0 });
|
|
4
4
|
var D = (e, o, r) => er(e, typeof o != "symbol" ? o + "" : o, r);
|
|
5
|
-
import { ref as B, defineComponent as K, createElementBlock as v, openBlock as b, createElementVNode as l, normalizeClass as
|
|
5
|
+
import { ref as B, defineComponent as K, createElementBlock as v, openBlock as b, createElementVNode as l, normalizeClass as E, watch as ye, createCommentVNode as P, unref as Z, toDisplayString as W, computed as L, createBlock as Se, resolveDynamicComponent as tr, withCtx as ke, createVNode as Q, renderSlot as Ge, Fragment as Je, renderList as ct, createTextVNode as Xe, onMounted as Oe, nextTick as Ue, withDirectives as rr, vModelText as or, Transition as xt, withModifiers as It, TransitionGroup as nr, normalizeStyle as dt, onUnmounted as $t, shallowRef as sr, mergeProps as yt } from "vue";
|
|
6
6
|
import { S as Et } from "./base-CEr2lLFg.js";
|
|
7
7
|
import { Conversation as kt } from "@elevenlabs/client";
|
|
8
|
-
import { objectId as
|
|
9
|
-
const
|
|
8
|
+
import { objectId as ir } from "@fiction/utils";
|
|
9
|
+
const ar = 256, lr = 0.8, cr = 50, dr = {
|
|
10
10
|
bars: 64,
|
|
11
11
|
barWidth: 3,
|
|
12
12
|
barSpacing: 1,
|
|
@@ -136,13 +136,13 @@ const lr = 256, cr = 0.8, dr = 50, ur = {
|
|
|
136
136
|
const {
|
|
137
137
|
noiseSuppression: t = !0,
|
|
138
138
|
echoCancellation: s = !0,
|
|
139
|
-
autoGainControl:
|
|
139
|
+
autoGainControl: a = !0
|
|
140
140
|
} = r;
|
|
141
141
|
return this.stream = await navigator.mediaDevices.getUserMedia({
|
|
142
142
|
audio: {
|
|
143
143
|
noiseSuppression: t,
|
|
144
144
|
echoCancellation: s,
|
|
145
|
-
autoGainControl:
|
|
145
|
+
autoGainControl: a
|
|
146
146
|
}
|
|
147
147
|
}), this.logger.info("Microphone permission granted"), await this.setupAudioAnalysis(), !0;
|
|
148
148
|
} catch (t) {
|
|
@@ -156,7 +156,7 @@ const lr = 256, cr = 0.8, dr = 50, ur = {
|
|
|
156
156
|
if (!this.stream)
|
|
157
157
|
throw new Error("No audio stream available");
|
|
158
158
|
try {
|
|
159
|
-
this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.microphone = this.audioContext.createMediaStreamSource(this.stream), this.analyser.fftSize =
|
|
159
|
+
this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.microphone = this.audioContext.createMediaStreamSource(this.stream), this.analyser.fftSize = ar, this.analyser.smoothingTimeConstant = lr, this.microphone.connect(this.analyser), this.logger.info("Audio analysis setup complete");
|
|
160
160
|
} catch (r) {
|
|
161
161
|
throw this.logger.error("Failed to setup audio analysis:", r), r;
|
|
162
162
|
}
|
|
@@ -177,17 +177,17 @@ const lr = 256, cr = 0.8, dr = 50, ur = {
|
|
|
177
177
|
}
|
|
178
178
|
try {
|
|
179
179
|
this.analyser.getByteFrequencyData(t);
|
|
180
|
-
const
|
|
181
|
-
this.audioLevels.value = { inputLevel:
|
|
182
|
-
} catch (
|
|
183
|
-
this.logger.error("Error in audio level monitoring:",
|
|
180
|
+
const i = t.reduce((A, d) => A + d, 0) / t.length, m = Math.min(i / 128, 1), c = r?.() ? 0.3 : 0;
|
|
181
|
+
this.audioLevels.value = { inputLevel: m, outputLevel: c };
|
|
182
|
+
} catch (i) {
|
|
183
|
+
this.logger.error("Error in audio level monitoring:", i), this.stopAudioLevelMonitoring();
|
|
184
184
|
}
|
|
185
|
-
}, "updateLevels"),
|
|
186
|
-
s().catch((
|
|
187
|
-
this.logger.error("Async error in audio level monitoring:",
|
|
185
|
+
}, "updateLevels"), a = /* @__PURE__ */ n(() => {
|
|
186
|
+
s().catch((i) => {
|
|
187
|
+
this.logger.error("Async error in audio level monitoring:", i);
|
|
188
188
|
});
|
|
189
189
|
}, "intervalWrapper");
|
|
190
|
-
this.audioLevelInterval = window.setInterval(
|
|
190
|
+
this.audioLevelInterval = window.setInterval(a, cr);
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
193
|
* Stop monitoring audio levels
|
|
@@ -257,7 +257,7 @@ const Lt = [
|
|
|
257
257
|
label: "Info",
|
|
258
258
|
icon: "i-tabler-user-circle"
|
|
259
259
|
}
|
|
260
|
-
],
|
|
260
|
+
], ur = { class: "spinner max-w-sm" }, hr = {
|
|
261
261
|
class: "ring-circular h-full w-full origin-center",
|
|
262
262
|
viewBox: "25 25 50 50"
|
|
263
263
|
}, Tt = /* @__PURE__ */ K({
|
|
@@ -267,10 +267,10 @@ const Lt = [
|
|
|
267
267
|
colorMode: { type: String, default: "primary" }
|
|
268
268
|
},
|
|
269
269
|
setup(e) {
|
|
270
|
-
return (o, r) => (b(), v("div",
|
|
271
|
-
(b(), v("svg",
|
|
270
|
+
return (o, r) => (b(), v("div", ur, [
|
|
271
|
+
(b(), v("svg", hr, [
|
|
272
272
|
l("circle", {
|
|
273
|
-
class:
|
|
273
|
+
class: E([e.colorMode, "ring-path"]),
|
|
274
274
|
cx: "50",
|
|
275
275
|
cy: "50",
|
|
276
276
|
r: "20",
|
|
@@ -414,10 +414,10 @@ const Lt = [
|
|
|
414
414
|
950: "oklch(29.3% 0.066 243.157)"
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
function
|
|
417
|
+
function fr(e) {
|
|
418
418
|
return wt[e] || wt.blue;
|
|
419
419
|
}
|
|
420
|
-
n(
|
|
420
|
+
n(fr, "getColorSchemeOklch");
|
|
421
421
|
function Ct(e) {
|
|
422
422
|
return e ? typeof e == "string" ? e : e.src || "" : "";
|
|
423
423
|
}
|
|
@@ -435,7 +435,7 @@ function Qe(e) {
|
|
|
435
435
|
o.dataset.fallbackUsed || (o.dataset.fallbackUsed = "true", o.src = _e());
|
|
436
436
|
}
|
|
437
437
|
n(Qe, "handleImageError");
|
|
438
|
-
function
|
|
438
|
+
function gr(e) {
|
|
439
439
|
const { message: o } = e;
|
|
440
440
|
if (!o)
|
|
441
441
|
return null;
|
|
@@ -447,12 +447,12 @@ function mr(e) {
|
|
|
447
447
|
(t) => {
|
|
448
448
|
if (!("source" in t))
|
|
449
449
|
return null;
|
|
450
|
-
const
|
|
450
|
+
const a = {
|
|
451
451
|
user: "user",
|
|
452
452
|
ai: "agent",
|
|
453
453
|
agent: "agent"
|
|
454
454
|
}[t.source];
|
|
455
|
-
return
|
|
455
|
+
return a ? { text: t.message || "", sender: a } : null;
|
|
456
456
|
}
|
|
457
457
|
];
|
|
458
458
|
for (const t of r) {
|
|
@@ -462,12 +462,12 @@ function mr(e) {
|
|
|
462
462
|
}
|
|
463
463
|
return null;
|
|
464
464
|
}
|
|
465
|
-
n(
|
|
466
|
-
function
|
|
465
|
+
n(gr, "parseVoiceMessage");
|
|
466
|
+
function Pn(e) {
|
|
467
467
|
const { name: o, context: r } = e;
|
|
468
468
|
return r === "welcome" ? `Welcome to Fiction! I'm ${o}, your digital self. 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?` : r === "onboarding" ? `Hi! I'm ${o}, your newly created digital self. I can handle conversations, answer questions about your expertise, and represent you professionally. Ready to see what I can do?` : `Hello! I'm ${o}. How can I help you today?`;
|
|
469
469
|
}
|
|
470
|
-
n(
|
|
470
|
+
n(Pn, "generateFirstMessage");
|
|
471
471
|
const ft = class ft extends Et {
|
|
472
472
|
constructor(r) {
|
|
473
473
|
super("SelfController", r);
|
|
@@ -513,8 +513,8 @@ const ft = class ft extends Et {
|
|
|
513
513
|
try {
|
|
514
514
|
const r = this.conversation.getOutputByteFrequencyData();
|
|
515
515
|
if (r && r.length > 0) {
|
|
516
|
-
const t = Array.from(r).filter((
|
|
517
|
-
return console.warn(`ElevenLabs frequency data: ${r.length} bins, ${t} with signal, max: ${s}, avg: ${
|
|
516
|
+
const t = Array.from(r).filter((i) => Number(i) > 0).length, s = Math.max(...Array.from(r)), a = Array.from(r).reduce((i, m) => i + Number(m), 0) / r.length;
|
|
517
|
+
return console.warn(`ElevenLabs frequency data: ${r.length} bins, ${t} with signal, max: ${s}, avg: ${a.toFixed(1)}`), new Uint8Array(r);
|
|
518
518
|
} else
|
|
519
519
|
return console.warn("ElevenLabs returned empty frequency data"), null;
|
|
520
520
|
} catch (r) {
|
|
@@ -522,8 +522,8 @@ const ft = class ft extends Et {
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
isDuplicateMessage(r, t) {
|
|
525
|
-
const s = `${t}:${r.toLowerCase().trim()}`,
|
|
526
|
-
return
|
|
525
|
+
const s = `${t}:${r.toLowerCase().trim()}`, a = Date.now(), i = s === this.lastMessage.hash && a - this.lastMessage.time < 500;
|
|
526
|
+
return i || (this.lastMessage = { hash: s, time: a }), i;
|
|
527
527
|
}
|
|
528
528
|
addMessage(r, t) {
|
|
529
529
|
this.isDuplicateMessage(r, t) || (this.sharedMessages.value = [
|
|
@@ -568,7 +568,7 @@ const ft = class ft extends Et {
|
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
handleMessage(r, t) {
|
|
571
|
-
const s =
|
|
571
|
+
const s = gr(r);
|
|
572
572
|
s && (this.addMessage(s.text, s.sender), !t && s.sender === "agent" && this.updateState(this.textState, { isThinking: !1 }));
|
|
573
573
|
}
|
|
574
574
|
handleError(r, t) {
|
|
@@ -618,26 +618,26 @@ const ft = class ft extends Et {
|
|
|
618
618
|
}), r.onConnect?.(), r.onAudioLevel && (this.unwatchAudio = ye(this.audioLevels, r.onAudioLevel, { immediate: !0 }));
|
|
619
619
|
}, "onConnect"),
|
|
620
620
|
onDisconnect: /* @__PURE__ */ n(() => {
|
|
621
|
-
this.logger.info("Voice conversation disconnected"), this.conversation = void 0, this.clientAudio.stopAudioLevelMonitoring(), this.endSession().catch((
|
|
621
|
+
this.logger.info("Voice conversation disconnected"), this.conversation = void 0, this.clientAudio.stopAudioLevelMonitoring(), this.endSession().catch((a) => console.error("Failed to end session:", a)), this.resetState(!1), r.onDisconnect?.();
|
|
622
622
|
}, "onDisconnect"),
|
|
623
|
-
onError: /* @__PURE__ */ n((
|
|
624
|
-
let
|
|
625
|
-
|
|
623
|
+
onError: /* @__PURE__ */ n((a) => {
|
|
624
|
+
let i = a;
|
|
625
|
+
a.includes("does not exist") ? i = `Agent not found: ${this.settings.self.elevenlabsAgentId}. Check ElevenLabs configuration.` : a.includes("limit") || a.includes("quota") ? i = "ElevenLabs account limit reached. Check your subscription and usage." : (a.includes("unauthorized") || a.includes("invalid")) && (i = "ElevenLabs API authentication failed. Check ELEVENLABS_API_KEY."), this.endSession().catch((m) => console.error("Failed to end session:", m)), this.handleError(new Error(i), !0), r.onError?.(new Error(i));
|
|
626
626
|
}, "onError"),
|
|
627
|
-
onModeChange: /* @__PURE__ */ n((
|
|
628
|
-
const
|
|
627
|
+
onModeChange: /* @__PURE__ */ n((a) => {
|
|
628
|
+
const i = a.mode === "speaking";
|
|
629
629
|
this.updateState(this.voiceState, {
|
|
630
|
-
isSpeaking:
|
|
631
|
-
isListening: !
|
|
632
|
-
transcript:
|
|
633
|
-
}), r.onModeChange?.(
|
|
630
|
+
isSpeaking: i,
|
|
631
|
+
isListening: !i,
|
|
632
|
+
transcript: i ? "Agent is speaking..." : "Listening for your voice..."
|
|
633
|
+
}), r.onModeChange?.(a.mode);
|
|
634
634
|
}, "onModeChange"),
|
|
635
|
-
onMessage: /* @__PURE__ */ n((
|
|
636
|
-
this.handleMessage(
|
|
635
|
+
onMessage: /* @__PURE__ */ n((a) => {
|
|
636
|
+
this.handleMessage(a, !0), r.onMessage?.(a);
|
|
637
637
|
}, "onMessage")
|
|
638
638
|
});
|
|
639
|
-
} catch (
|
|
640
|
-
throw this.isConnecting = !1, this.endSession().catch((
|
|
639
|
+
} catch (a) {
|
|
640
|
+
throw this.isConnecting = !1, this.endSession().catch((i) => console.error("Failed to end session:", i)), this.handleError(a, !0), a;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
async startTextConversation(r = {}) {
|
|
@@ -660,7 +660,7 @@ const ft = class ft extends Et {
|
|
|
660
660
|
}, "onDisconnect"),
|
|
661
661
|
onError: /* @__PURE__ */ n((t) => {
|
|
662
662
|
let s = t;
|
|
663
|
-
t.includes("does not exist") ? s = `Agent not found: ${this.settings.self.elevenlabsAgentId}. Check ElevenLabs configuration.` : t.includes("limit") || t.includes("quota") ? s = "ElevenLabs account limit reached. Check your subscription and usage." : (t.includes("unauthorized") || t.includes("invalid")) && (s = "ElevenLabs API authentication failed. Check ELEVENLABS_API_KEY."), this.endSession().catch((
|
|
663
|
+
t.includes("does not exist") ? s = `Agent not found: ${this.settings.self.elevenlabsAgentId}. Check ElevenLabs configuration.` : t.includes("limit") || t.includes("quota") ? s = "ElevenLabs account limit reached. Check your subscription and usage." : (t.includes("unauthorized") || t.includes("invalid")) && (s = "ElevenLabs API authentication failed. Check ELEVENLABS_API_KEY."), this.endSession().catch((a) => console.error("Failed to end session:", a)), this.handleError(new Error(s), !1), r.onError?.(new Error(s));
|
|
664
664
|
}, "onError"),
|
|
665
665
|
onModeChange: /* @__PURE__ */ n((t) => {
|
|
666
666
|
r.onModeChange?.(t.mode);
|
|
@@ -708,7 +708,7 @@ const ft = class ft extends Et {
|
|
|
708
708
|
}
|
|
709
709
|
// Simple session tracking - minimal implementation
|
|
710
710
|
startSession(r) {
|
|
711
|
-
this.sessionId =
|
|
711
|
+
this.sessionId = ir(), this.conversationStartTime = /* @__PURE__ */ new Date(), this.chatCharacterCount = 0, this.logger.info("Started conversation session", {
|
|
712
712
|
sessionId: this.sessionId,
|
|
713
713
|
type: r
|
|
714
714
|
});
|
|
@@ -721,21 +721,21 @@ const ft = class ft extends Et {
|
|
|
721
721
|
this.logger.info("No org/user context - skipping usage recording"), this.resetSession();
|
|
722
722
|
return;
|
|
723
723
|
}
|
|
724
|
-
const s = Math.round((Date.now() - this.conversationStartTime.getTime()) / 1e3),
|
|
724
|
+
const s = Math.round((Date.now() - this.conversationStartTime.getTime()) / 1e3), a = this.isTextMode ? "chat" : "voice", i = a === "voice" ? s : this.chatCharacterCount;
|
|
725
725
|
if (!r.selfId) {
|
|
726
726
|
this.logger.warn("Cannot track usage: selfId is undefined"), this.resetSession();
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
729
|
await t.trackUsage({
|
|
730
730
|
selfId: r.selfId,
|
|
731
|
-
type:
|
|
732
|
-
quantity:
|
|
731
|
+
type: a,
|
|
732
|
+
quantity: i,
|
|
733
733
|
participantId: t.activeUser.value?.userId
|
|
734
734
|
// Track authenticated user
|
|
735
735
|
}) ? this.logger.info("Recorded usage", {
|
|
736
736
|
sessionId: this.sessionId,
|
|
737
|
-
type:
|
|
738
|
-
quantity:
|
|
737
|
+
type: a,
|
|
738
|
+
quantity: i,
|
|
739
739
|
duration: s
|
|
740
740
|
}) : this.logger.warn("Failed to record usage - continuing normally"), this.resetSession();
|
|
741
741
|
}
|
|
@@ -745,10 +745,10 @@ const ft = class ft extends Et {
|
|
|
745
745
|
};
|
|
746
746
|
n(ft, "SelfController");
|
|
747
747
|
let st = ft;
|
|
748
|
-
const
|
|
748
|
+
const mr = { class: "relative flex-shrink-0" }, br = ["src", "alt"], pr = {
|
|
749
749
|
key: 0,
|
|
750
750
|
class: "absolute top-1 right-1"
|
|
751
|
-
},
|
|
751
|
+
}, vr = { class: "min-w-0" }, xr = /* @__PURE__ */ K({
|
|
752
752
|
__name: "ElModeHeader",
|
|
753
753
|
props: {
|
|
754
754
|
self: {},
|
|
@@ -761,13 +761,13 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
761
761
|
return e.self.avatar?.src ? e.self.avatar.src : _e();
|
|
762
762
|
}
|
|
763
763
|
return n(o, "getAvatarSrc"), (r, t) => (b(), v("div", {
|
|
764
|
-
class:
|
|
764
|
+
class: E(["flex gap-4", [
|
|
765
765
|
e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
|
|
766
766
|
]])
|
|
767
767
|
}, [
|
|
768
|
-
l("div",
|
|
768
|
+
l("div", mr, [
|
|
769
769
|
l("div", {
|
|
770
|
-
class:
|
|
770
|
+
class: E(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
|
|
771
771
|
}, [
|
|
772
772
|
l("img", {
|
|
773
773
|
src: o(),
|
|
@@ -775,9 +775,9 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
775
775
|
class: "w-full h-full object-cover",
|
|
776
776
|
onError: t[0] || (t[0] = //@ts-ignore
|
|
777
777
|
(...s) => Z(Qe) && Z(Qe)(...s))
|
|
778
|
-
}, null, 40,
|
|
778
|
+
}, null, 40, br)
|
|
779
779
|
], 2),
|
|
780
|
-
e.showOnlineIndicator ? (b(), v("div",
|
|
780
|
+
e.showOnlineIndicator ? (b(), v("div", pr, [...t[1] || (t[1] = [
|
|
781
781
|
l("div", {
|
|
782
782
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute",
|
|
783
783
|
style: { animation: "ping 3s cubic-bezier(0, 0, 0.2, 1) infinite" }
|
|
@@ -785,15 +785,15 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
785
785
|
l("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1)
|
|
786
786
|
])])) : P("", !0)
|
|
787
787
|
]),
|
|
788
|
-
l("div",
|
|
788
|
+
l("div", vr, [
|
|
789
789
|
l("h1", {
|
|
790
|
-
class:
|
|
790
|
+
class: E(["font-light text-white mb-1 truncate", [
|
|
791
791
|
e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
|
|
792
792
|
e.layout === "horizontal" ? "text-white/95" : ""
|
|
793
793
|
]])
|
|
794
794
|
}, W(e.self.name), 3),
|
|
795
795
|
l("p", {
|
|
796
|
-
class:
|
|
796
|
+
class: E(["font-light line-clamp-1", [
|
|
797
797
|
e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
|
|
798
798
|
e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
|
|
799
799
|
]])
|
|
@@ -801,19 +801,19 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
801
801
|
])
|
|
802
802
|
], 2));
|
|
803
803
|
}
|
|
804
|
-
}), ut = "-",
|
|
805
|
-
const o =
|
|
804
|
+
}), ut = "-", yr = /* @__PURE__ */ n((e) => {
|
|
805
|
+
const o = wr(e), {
|
|
806
806
|
conflictingClassGroups: r,
|
|
807
807
|
conflictingClassGroupModifiers: t
|
|
808
808
|
} = e;
|
|
809
809
|
return {
|
|
810
|
-
getClassGroupId: /* @__PURE__ */ n((
|
|
811
|
-
const
|
|
812
|
-
return
|
|
810
|
+
getClassGroupId: /* @__PURE__ */ n((i) => {
|
|
811
|
+
const m = i.split(ut);
|
|
812
|
+
return m[0] === "" && m.length !== 1 && m.shift(), Pt(m, o) || kr(i);
|
|
813
813
|
}, "getClassGroupId"),
|
|
814
|
-
getConflictingClassGroupIds: /* @__PURE__ */ n((
|
|
815
|
-
const c = r[
|
|
816
|
-
return
|
|
814
|
+
getConflictingClassGroupIds: /* @__PURE__ */ n((i, m) => {
|
|
815
|
+
const c = r[i] || [];
|
|
816
|
+
return m && t[i] ? [...c, ...t[i]] : c;
|
|
817
817
|
}, "getConflictingClassGroupIds")
|
|
818
818
|
};
|
|
819
819
|
}, "createClassGroupUtils"), Pt = /* @__PURE__ */ n((e, o) => {
|
|
@@ -824,17 +824,17 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
824
824
|
return s;
|
|
825
825
|
if (o.validators.length === 0)
|
|
826
826
|
return;
|
|
827
|
-
const
|
|
827
|
+
const a = e.join(ut);
|
|
828
828
|
return o.validators.find(({
|
|
829
|
-
validator:
|
|
830
|
-
}) => a
|
|
831
|
-
}, "getGroupRecursive"), St = /^\[(.+)\]$/,
|
|
829
|
+
validator: i
|
|
830
|
+
}) => i(a))?.classGroupId;
|
|
831
|
+
}, "getGroupRecursive"), St = /^\[(.+)\]$/, kr = /* @__PURE__ */ n((e) => {
|
|
832
832
|
if (St.test(e)) {
|
|
833
833
|
const o = St.exec(e)[1], r = o?.substring(0, o.indexOf(":"));
|
|
834
834
|
if (r)
|
|
835
835
|
return "arbitrary.." + r;
|
|
836
836
|
}
|
|
837
|
-
}, "getGroupIdForArbitraryProperty"),
|
|
837
|
+
}, "getGroupIdForArbitraryProperty"), wr = /* @__PURE__ */ n((e) => {
|
|
838
838
|
const {
|
|
839
839
|
theme: o,
|
|
840
840
|
classGroups: r
|
|
@@ -848,12 +848,12 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
848
848
|
}, "createClassMap"), it = /* @__PURE__ */ n((e, o, r, t) => {
|
|
849
849
|
e.forEach((s) => {
|
|
850
850
|
if (typeof s == "string") {
|
|
851
|
-
const
|
|
852
|
-
|
|
851
|
+
const a = s === "" ? o : Mt(o, s);
|
|
852
|
+
a.classGroupId = r;
|
|
853
853
|
return;
|
|
854
854
|
}
|
|
855
855
|
if (typeof s == "function") {
|
|
856
|
-
if (
|
|
856
|
+
if (Cr(s)) {
|
|
857
857
|
it(s(t), o, r, t);
|
|
858
858
|
return;
|
|
859
859
|
}
|
|
@@ -863,8 +863,8 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
863
863
|
});
|
|
864
864
|
return;
|
|
865
865
|
}
|
|
866
|
-
Object.entries(s).forEach(([
|
|
867
|
-
it(
|
|
866
|
+
Object.entries(s).forEach(([a, i]) => {
|
|
867
|
+
it(i, Mt(o, a), r, t);
|
|
868
868
|
});
|
|
869
869
|
});
|
|
870
870
|
}, "processClassesRecursively"), Mt = /* @__PURE__ */ n((e, o) => {
|
|
@@ -875,7 +875,7 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
875
875
|
validators: []
|
|
876
876
|
}), r = r.nextPart.get(t);
|
|
877
877
|
}), r;
|
|
878
|
-
}, "getPart"),
|
|
878
|
+
}, "getPart"), Cr = /* @__PURE__ */ n((e) => e.isThemeGetter, "isThemeGetter"), Sr = /* @__PURE__ */ n((e) => {
|
|
879
879
|
if (e < 1)
|
|
880
880
|
return {
|
|
881
881
|
get: /* @__PURE__ */ n(() => {
|
|
@@ -884,34 +884,34 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
884
884
|
}, "set")
|
|
885
885
|
};
|
|
886
886
|
let o = 0, r = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
887
|
-
const s = /* @__PURE__ */ n((
|
|
888
|
-
r.set(
|
|
887
|
+
const s = /* @__PURE__ */ n((a, i) => {
|
|
888
|
+
r.set(a, i), o++, o > e && (o = 0, t = r, r = /* @__PURE__ */ new Map());
|
|
889
889
|
}, "update");
|
|
890
890
|
return {
|
|
891
|
-
get(
|
|
892
|
-
let
|
|
893
|
-
if (
|
|
894
|
-
return
|
|
895
|
-
if ((
|
|
896
|
-
return s(
|
|
891
|
+
get(a) {
|
|
892
|
+
let i = r.get(a);
|
|
893
|
+
if (i !== void 0)
|
|
894
|
+
return i;
|
|
895
|
+
if ((i = t.get(a)) !== void 0)
|
|
896
|
+
return s(a, i), i;
|
|
897
897
|
},
|
|
898
|
-
set(
|
|
899
|
-
r.has(
|
|
898
|
+
set(a, i) {
|
|
899
|
+
r.has(a) ? r.set(a, i) : s(a, i);
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
|
-
}, "createLruCache"), at = "!", lt = ":",
|
|
902
|
+
}, "createLruCache"), at = "!", lt = ":", Mr = lt.length, Ar = /* @__PURE__ */ n((e) => {
|
|
903
903
|
const {
|
|
904
904
|
prefix: o,
|
|
905
905
|
experimentalParseClassName: r
|
|
906
906
|
} = e;
|
|
907
907
|
let t = /* @__PURE__ */ n((s) => {
|
|
908
|
-
const
|
|
909
|
-
let
|
|
908
|
+
const a = [];
|
|
909
|
+
let i = 0, m = 0, c = 0, A;
|
|
910
910
|
for (let I = 0; I < s.length; I++) {
|
|
911
911
|
let V = s[I];
|
|
912
|
-
if (
|
|
912
|
+
if (i === 0 && m === 0) {
|
|
913
913
|
if (V === lt) {
|
|
914
|
-
|
|
914
|
+
a.push(s.slice(c, I)), c = I + Mr;
|
|
915
915
|
continue;
|
|
916
916
|
}
|
|
917
917
|
if (V === "/") {
|
|
@@ -919,63 +919,63 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
919
919
|
continue;
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
V === "[" ?
|
|
922
|
+
V === "[" ? i++ : V === "]" ? i-- : V === "(" ? m++ : V === ")" && m--;
|
|
923
923
|
}
|
|
924
|
-
const d =
|
|
924
|
+
const d = a.length === 0 ? s : s.substring(c), C = zr(d), x = C !== d, g = A && A > c ? A - c : void 0;
|
|
925
925
|
return {
|
|
926
|
-
modifiers:
|
|
926
|
+
modifiers: a,
|
|
927
927
|
hasImportantModifier: x,
|
|
928
928
|
baseClassName: C,
|
|
929
|
-
maybePostfixModifierPosition:
|
|
929
|
+
maybePostfixModifierPosition: g
|
|
930
930
|
};
|
|
931
931
|
}, "parseClassName");
|
|
932
932
|
if (o) {
|
|
933
|
-
const s = o + lt,
|
|
934
|
-
t = /* @__PURE__ */ n((
|
|
933
|
+
const s = o + lt, a = t;
|
|
934
|
+
t = /* @__PURE__ */ n((i) => i.startsWith(s) ? a(i.substring(s.length)) : {
|
|
935
935
|
isExternal: !0,
|
|
936
936
|
modifiers: [],
|
|
937
937
|
hasImportantModifier: !1,
|
|
938
|
-
baseClassName:
|
|
938
|
+
baseClassName: i,
|
|
939
939
|
maybePostfixModifierPosition: void 0
|
|
940
940
|
}, "parseClassName");
|
|
941
941
|
}
|
|
942
942
|
if (r) {
|
|
943
943
|
const s = t;
|
|
944
|
-
t = /* @__PURE__ */ n((
|
|
945
|
-
className:
|
|
944
|
+
t = /* @__PURE__ */ n((a) => r({
|
|
945
|
+
className: a,
|
|
946
946
|
parseClassName: s
|
|
947
947
|
}), "parseClassName");
|
|
948
948
|
}
|
|
949
949
|
return t;
|
|
950
|
-
}, "createParseClassName"),
|
|
950
|
+
}, "createParseClassName"), zr = /* @__PURE__ */ n((e) => e.endsWith(at) ? e.substring(0, e.length - 1) : e.startsWith(at) ? e.substring(1) : e, "stripImportantModifier"), Ir = /* @__PURE__ */ n((e) => {
|
|
951
951
|
const o = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0]));
|
|
952
952
|
return /* @__PURE__ */ n((t) => {
|
|
953
953
|
if (t.length <= 1)
|
|
954
954
|
return t;
|
|
955
955
|
const s = [];
|
|
956
|
-
let
|
|
957
|
-
return t.forEach((
|
|
958
|
-
|
|
959
|
-
}), s.push(...
|
|
956
|
+
let a = [];
|
|
957
|
+
return t.forEach((i) => {
|
|
958
|
+
i[0] === "[" || o[i] ? (s.push(...a.sort(), i), a = []) : a.push(i);
|
|
959
|
+
}), s.push(...a.sort()), s;
|
|
960
960
|
}, "sortModifiers");
|
|
961
|
-
}, "createSortModifiers"),
|
|
962
|
-
cache:
|
|
963
|
-
parseClassName:
|
|
964
|
-
sortModifiers:
|
|
965
|
-
...
|
|
966
|
-
}), "createConfigUtils"),
|
|
961
|
+
}, "createSortModifiers"), $r = /* @__PURE__ */ n((e) => ({
|
|
962
|
+
cache: Sr(e.cacheSize),
|
|
963
|
+
parseClassName: Ar(e),
|
|
964
|
+
sortModifiers: Ir(e),
|
|
965
|
+
...yr(e)
|
|
966
|
+
}), "createConfigUtils"), Er = /\s+/, Lr = /* @__PURE__ */ n((e, o) => {
|
|
967
967
|
const {
|
|
968
968
|
parseClassName: r,
|
|
969
969
|
getClassGroupId: t,
|
|
970
970
|
getConflictingClassGroupIds: s,
|
|
971
|
-
sortModifiers:
|
|
972
|
-
} = o,
|
|
971
|
+
sortModifiers: a
|
|
972
|
+
} = o, i = [], m = e.trim().split(Er);
|
|
973
973
|
let c = "";
|
|
974
|
-
for (let A =
|
|
975
|
-
const d =
|
|
974
|
+
for (let A = m.length - 1; A >= 0; A -= 1) {
|
|
975
|
+
const d = m[A], {
|
|
976
976
|
isExternal: C,
|
|
977
977
|
modifiers: x,
|
|
978
|
-
hasImportantModifier:
|
|
978
|
+
hasImportantModifier: g,
|
|
979
979
|
baseClassName: I,
|
|
980
980
|
maybePostfixModifierPosition: V
|
|
981
981
|
} = r(d);
|
|
@@ -995,26 +995,26 @@ const br = { class: "relative flex-shrink-0" }, pr = ["src", "alt"], vr = {
|
|
|
995
995
|
}
|
|
996
996
|
Y = !1;
|
|
997
997
|
}
|
|
998
|
-
const Me =
|
|
999
|
-
if (
|
|
998
|
+
const Me = a(x).join(":"), we = g ? Me + at : Me, le = we + ee;
|
|
999
|
+
if (i.includes(le))
|
|
1000
1000
|
continue;
|
|
1001
|
-
|
|
1001
|
+
i.push(le);
|
|
1002
1002
|
const me = s(ee, Y);
|
|
1003
1003
|
for (let ce = 0; ce < me.length; ++ce) {
|
|
1004
1004
|
const te = me[ce];
|
|
1005
|
-
|
|
1005
|
+
i.push(we + te);
|
|
1006
1006
|
}
|
|
1007
1007
|
c = d + (c.length > 0 ? " " + c : c);
|
|
1008
1008
|
}
|
|
1009
1009
|
return c;
|
|
1010
1010
|
}, "mergeClassList");
|
|
1011
|
-
function
|
|
1011
|
+
function Tr() {
|
|
1012
1012
|
let e = 0, o, r, t = "";
|
|
1013
1013
|
for (; e < arguments.length; )
|
|
1014
1014
|
(o = arguments[e++]) && (r = Ft(o)) && (t && (t += " "), t += r);
|
|
1015
1015
|
return t;
|
|
1016
1016
|
}
|
|
1017
|
-
n(
|
|
1017
|
+
n(Tr, "twJoin");
|
|
1018
1018
|
const Ft = /* @__PURE__ */ n((e) => {
|
|
1019
1019
|
if (typeof e == "string")
|
|
1020
1020
|
return e;
|
|
@@ -1023,41 +1023,41 @@ const Ft = /* @__PURE__ */ n((e) => {
|
|
|
1023
1023
|
e[t] && (o = Ft(e[t])) && (r && (r += " "), r += o);
|
|
1024
1024
|
return r;
|
|
1025
1025
|
}, "toValue");
|
|
1026
|
-
function
|
|
1027
|
-
let r, t, s,
|
|
1028
|
-
function
|
|
1026
|
+
function Pr(e, ...o) {
|
|
1027
|
+
let r, t, s, a = i;
|
|
1028
|
+
function i(c) {
|
|
1029
1029
|
const A = o.reduce((d, C) => C(d), e());
|
|
1030
|
-
return r =
|
|
1030
|
+
return r = $r(A), t = r.cache.get, s = r.cache.set, a = m, m(c);
|
|
1031
1031
|
}
|
|
1032
|
-
n(
|
|
1033
|
-
function
|
|
1032
|
+
n(i, "initTailwindMerge");
|
|
1033
|
+
function m(c) {
|
|
1034
1034
|
const A = t(c);
|
|
1035
1035
|
if (A)
|
|
1036
1036
|
return A;
|
|
1037
|
-
const d =
|
|
1037
|
+
const d = Lr(c, r);
|
|
1038
1038
|
return s(c, d), d;
|
|
1039
1039
|
}
|
|
1040
|
-
return n(
|
|
1041
|
-
return
|
|
1040
|
+
return n(m, "tailwindMerge"), /* @__PURE__ */ n(function() {
|
|
1041
|
+
return a(Tr.apply(null, arguments));
|
|
1042
1042
|
}, "callTailwindMerge");
|
|
1043
1043
|
}
|
|
1044
|
-
n(
|
|
1044
|
+
n(Pr, "createTailwindMerge");
|
|
1045
1045
|
const q = /* @__PURE__ */ n((e) => {
|
|
1046
1046
|
const o = /* @__PURE__ */ n((r) => r[e] || [], "themeGetter");
|
|
1047
1047
|
return o.isThemeGetter = !0, o;
|
|
1048
|
-
}, "fromTheme"), Dt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Bt = /^\((?:(\w[\w-]*):)?(.+)\)$/i,
|
|
1048
|
+
}, "fromTheme"), Dt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Bt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Fr = /^\d+\/\d+$/, Dr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Br = /\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$/, Vr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Rr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, jr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Te = /* @__PURE__ */ n((e) => Fr.test(e), "isFraction"), M = /* @__PURE__ */ n((e) => !!e && !Number.isNaN(Number(e)), "isNumber"), xe = /* @__PURE__ */ n((e) => !!e && Number.isInteger(Number(e)), "isInteger"), tt = /* @__PURE__ */ n((e) => e.endsWith("%") && M(e.slice(0, -1)), "isPercent"), ge = /* @__PURE__ */ n((e) => Dr.test(e), "isTshirtSize"), Nr = /* @__PURE__ */ n(() => !0, "isAny"), Gr = /* @__PURE__ */ n((e) => (
|
|
1049
1049
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1050
1050
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1051
1051
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1052
|
-
|
|
1053
|
-
), "isLengthOnly"), Vt = /* @__PURE__ */ n(() => !1, "isNever"),
|
|
1052
|
+
Br.test(e) && !Vr.test(e)
|
|
1053
|
+
), "isLengthOnly"), Vt = /* @__PURE__ */ n(() => !1, "isNever"), Or = /* @__PURE__ */ n((e) => Rr.test(e), "isShadow"), Hr = /* @__PURE__ */ n((e) => jr.test(e), "isImage"), qr = /* @__PURE__ */ n((e) => !h(e) && !f(e), "isAnyNonArbitrary"), Wr = /* @__PURE__ */ n((e) => Pe(e, Nt, Vt), "isArbitrarySize"), h = /* @__PURE__ */ n((e) => Dt.test(e), "isArbitraryValue"), Ce = /* @__PURE__ */ n((e) => Pe(e, Gt, Gr), "isArbitraryLength"), rt = /* @__PURE__ */ n((e) => Pe(e, Jr, M), "isArbitraryNumber"), At = /* @__PURE__ */ n((e) => Pe(e, Rt, Vt), "isArbitraryPosition"), Ur = /* @__PURE__ */ n((e) => Pe(e, jt, Hr), "isArbitraryImage"), Ze = /* @__PURE__ */ n((e) => Pe(e, Ot, Or), "isArbitraryShadow"), f = /* @__PURE__ */ n((e) => Bt.test(e), "isArbitraryVariable"), Ne = /* @__PURE__ */ n((e) => Fe(e, Gt), "isArbitraryVariableLength"), Zr = /* @__PURE__ */ n((e) => Fe(e, Qr), "isArbitraryVariableFamilyName"), zt = /* @__PURE__ */ n((e) => Fe(e, Rt), "isArbitraryVariablePosition"), Kr = /* @__PURE__ */ n((e) => Fe(e, Nt), "isArbitraryVariableSize"), Yr = /* @__PURE__ */ n((e) => Fe(e, jt), "isArbitraryVariableImage"), Ke = /* @__PURE__ */ n((e) => Fe(e, Ot, !0), "isArbitraryVariableShadow"), Pe = /* @__PURE__ */ n((e, o, r) => {
|
|
1054
1054
|
const t = Dt.exec(e);
|
|
1055
1055
|
return t ? t[1] ? o(t[1]) : r(t[2]) : !1;
|
|
1056
1056
|
}, "getIsArbitraryValue"), Fe = /* @__PURE__ */ n((e, o, r = !1) => {
|
|
1057
1057
|
const t = Bt.exec(e);
|
|
1058
1058
|
return t ? t[1] ? o(t[1]) : r : !1;
|
|
1059
|
-
}, "getIsArbitraryVariable"), Rt = /* @__PURE__ */ n((e) => e === "position" || e === "percentage", "isLabelPosition"), jt = /* @__PURE__ */ n((e) => e === "image" || e === "url", "isLabelImage"), Nt = /* @__PURE__ */ n((e) => e === "length" || e === "size" || e === "bg-size", "isLabelSize"), Gt = /* @__PURE__ */ n((e) => e === "length", "isLabelLength"),
|
|
1060
|
-
const e = q("color"), o = q("font"), r = q("text"), t = q("font-weight"), s = q("tracking"),
|
|
1059
|
+
}, "getIsArbitraryVariable"), Rt = /* @__PURE__ */ n((e) => e === "position" || e === "percentage", "isLabelPosition"), jt = /* @__PURE__ */ n((e) => e === "image" || e === "url", "isLabelImage"), Nt = /* @__PURE__ */ n((e) => e === "length" || e === "size" || e === "bg-size", "isLabelSize"), Gt = /* @__PURE__ */ n((e) => e === "length", "isLabelLength"), Jr = /* @__PURE__ */ n((e) => e === "number", "isLabelNumber"), Qr = /* @__PURE__ */ n((e) => e === "family-name", "isLabelFamilyName"), Ot = /* @__PURE__ */ n((e) => e === "shadow", "isLabelShadow"), Xr = /* @__PURE__ */ n(() => {
|
|
1060
|
+
const e = q("color"), o = q("font"), r = q("text"), t = q("font-weight"), s = q("tracking"), a = q("leading"), i = q("breakpoint"), m = q("container"), c = q("spacing"), A = q("radius"), d = q("shadow"), C = q("inset-shadow"), x = q("text-shadow"), g = q("drop-shadow"), I = q("blur"), V = q("perspective"), Y = q("aspect"), ee = q("ease"), Me = q("animate"), we = /* @__PURE__ */ n(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), le = /* @__PURE__ */ n(() => [
|
|
1061
1061
|
"center",
|
|
1062
1062
|
"top",
|
|
1063
1063
|
"bottom",
|
|
@@ -1081,7 +1081,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1081
1081
|
position: [f, h]
|
|
1082
1082
|
}], "scaleBgPosition"), De = /* @__PURE__ */ n(() => ["no-repeat", {
|
|
1083
1083
|
repeat: ["", "x", "y", "space", "round"]
|
|
1084
|
-
}], "scaleBgRepeat"), be = /* @__PURE__ */ n(() => ["auto", "cover", "contain",
|
|
1084
|
+
}], "scaleBgRepeat"), be = /* @__PURE__ */ n(() => ["auto", "cover", "contain", Kr, Wr, {
|
|
1085
1085
|
size: [f, h]
|
|
1086
1086
|
}], "scaleBgSize"), pe = /* @__PURE__ */ n(() => [tt, Ne, Ce], "scaleGradientStopPosition"), R = /* @__PURE__ */ n(() => [
|
|
1087
1087
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -1106,11 +1106,11 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1106
1106
|
aspect: ["video"],
|
|
1107
1107
|
blur: [ge],
|
|
1108
1108
|
breakpoint: [ge],
|
|
1109
|
-
color: [
|
|
1109
|
+
color: [Nr],
|
|
1110
1110
|
container: [ge],
|
|
1111
1111
|
"drop-shadow": [ge],
|
|
1112
1112
|
ease: ["in", "out", "in-out"],
|
|
1113
|
-
font: [
|
|
1113
|
+
font: [qr],
|
|
1114
1114
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
1115
1115
|
"inset-shadow": [ge],
|
|
1116
1116
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -1144,7 +1144,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1144
1144
|
* @see https://tailwindcss.com/docs/columns
|
|
1145
1145
|
*/
|
|
1146
1146
|
columns: [{
|
|
1147
|
-
columns: [M, h, f,
|
|
1147
|
+
columns: [M, h, f, m]
|
|
1148
1148
|
}],
|
|
1149
1149
|
/**
|
|
1150
1150
|
* Break After
|
|
@@ -1354,7 +1354,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1354
1354
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
1355
1355
|
*/
|
|
1356
1356
|
basis: [{
|
|
1357
|
-
basis: [Te, "full", "auto",
|
|
1357
|
+
basis: [Te, "full", "auto", m, ...k()]
|
|
1358
1358
|
}],
|
|
1359
1359
|
/**
|
|
1360
1360
|
* Flex Direction
|
|
@@ -1729,7 +1729,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1729
1729
|
* @see https://tailwindcss.com/docs/width
|
|
1730
1730
|
*/
|
|
1731
1731
|
w: [{
|
|
1732
|
-
w: [
|
|
1732
|
+
w: [m, "screen", ...ne()]
|
|
1733
1733
|
}],
|
|
1734
1734
|
/**
|
|
1735
1735
|
* Min-Width
|
|
@@ -1737,7 +1737,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1737
1737
|
*/
|
|
1738
1738
|
"min-w": [{
|
|
1739
1739
|
"min-w": [
|
|
1740
|
-
|
|
1740
|
+
m,
|
|
1741
1741
|
"screen",
|
|
1742
1742
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1743
1743
|
"none",
|
|
@@ -1750,14 +1750,14 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1750
1750
|
*/
|
|
1751
1751
|
"max-w": [{
|
|
1752
1752
|
"max-w": [
|
|
1753
|
-
|
|
1753
|
+
m,
|
|
1754
1754
|
"screen",
|
|
1755
1755
|
"none",
|
|
1756
1756
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1757
1757
|
"prose",
|
|
1758
1758
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1759
1759
|
{
|
|
1760
|
-
screen: [
|
|
1760
|
+
screen: [i]
|
|
1761
1761
|
},
|
|
1762
1762
|
...ne()
|
|
1763
1763
|
]
|
|
@@ -1822,7 +1822,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1822
1822
|
* @see https://tailwindcss.com/docs/font-family
|
|
1823
1823
|
*/
|
|
1824
1824
|
"font-family": [{
|
|
1825
|
-
font: [
|
|
1825
|
+
font: [Zr, h, o]
|
|
1826
1826
|
}],
|
|
1827
1827
|
/**
|
|
1828
1828
|
* Font Variant Numeric
|
|
@@ -1875,7 +1875,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
1875
1875
|
leading: [{
|
|
1876
1876
|
leading: [
|
|
1877
1877
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1878
|
-
|
|
1878
|
+
a,
|
|
1879
1879
|
...k()
|
|
1880
1880
|
]
|
|
1881
1881
|
}],
|
|
@@ -2077,7 +2077,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
2077
2077
|
}, xe, f, h],
|
|
2078
2078
|
radial: ["", f, h],
|
|
2079
2079
|
conic: [xe, f, h]
|
|
2080
|
-
},
|
|
2080
|
+
}, Yr, Ur]
|
|
2081
2081
|
}],
|
|
2082
2082
|
/**
|
|
2083
2083
|
* Background Color
|
|
@@ -2803,7 +2803,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
2803
2803
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2804
2804
|
"",
|
|
2805
2805
|
"none",
|
|
2806
|
-
|
|
2806
|
+
g,
|
|
2807
2807
|
Ke,
|
|
2808
2808
|
Ze
|
|
2809
2809
|
]
|
|
@@ -3526,7 +3526,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3526
3526
|
},
|
|
3527
3527
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
3528
3528
|
};
|
|
3529
|
-
}, "getDefaultConfig"),
|
|
3529
|
+
}, "getDefaultConfig"), _r = /* @__PURE__ */ Pr(Xr), Ye = {
|
|
3530
3530
|
default: {
|
|
3531
3531
|
solid: {
|
|
3532
3532
|
base: "bg-theme-0 dark:bg-theme-700/40 text-theme-600 dark:text-theme-50",
|
|
@@ -3812,10 +3812,10 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3812
3812
|
icon: "text-red-600 dark:text-red-400"
|
|
3813
3813
|
}
|
|
3814
3814
|
}
|
|
3815
|
-
},
|
|
3815
|
+
}, eo = {
|
|
3816
3816
|
key: 0,
|
|
3817
3817
|
class: "absolute inset-0 flex items-center justify-center"
|
|
3818
|
-
},
|
|
3818
|
+
}, to = /* @__PURE__ */ K({
|
|
3819
3819
|
__name: "FButton",
|
|
3820
3820
|
props: {
|
|
3821
3821
|
theme: { default: "default" },
|
|
@@ -3841,7 +3841,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3841
3841
|
lg: "size-5",
|
|
3842
3842
|
xl: "size-6"
|
|
3843
3843
|
})[e.size]), s = L(() => {
|
|
3844
|
-
const
|
|
3844
|
+
const i = "relative inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 focus:outline-none active:opacity-80 cursor-pointer", m = {
|
|
3845
3845
|
xxs: "px-2 py-0.5 text-[10px]",
|
|
3846
3846
|
xs: "px-3 py-1 text-[11px]",
|
|
3847
3847
|
sm: "px-3 py-1.5 text-xs",
|
|
@@ -3853,58 +3853,58 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3853
3853
|
lg: "rounded-lg",
|
|
3854
3854
|
full: "rounded-full"
|
|
3855
3855
|
}, d = Ye[e.theme]?.[e.design] || Ye.default[e.design], C = [
|
|
3856
|
-
|
|
3857
|
-
|
|
3856
|
+
i,
|
|
3857
|
+
m[e.size],
|
|
3858
3858
|
c,
|
|
3859
3859
|
A[e.rounding],
|
|
3860
3860
|
d.base,
|
|
3861
3861
|
`border ${d.border}`,
|
|
3862
3862
|
d.hover
|
|
3863
3863
|
].filter(Boolean).join(" ");
|
|
3864
|
-
return
|
|
3865
|
-
}),
|
|
3864
|
+
return _r(C, e.class);
|
|
3865
|
+
}), a = L(() => ({
|
|
3866
3866
|
design: (Ye[e.theme]?.[e.design] || Ye.default[e.design]).icon || ""
|
|
3867
3867
|
}));
|
|
3868
|
-
return (
|
|
3868
|
+
return (i, m) => (b(), Se(tr(r.value), {
|
|
3869
3869
|
href: e.href,
|
|
3870
|
-
class:
|
|
3870
|
+
class: E(s.value)
|
|
3871
3871
|
}, {
|
|
3872
3872
|
default: ke(() => [
|
|
3873
|
-
e.loading ? (b(), v("div",
|
|
3873
|
+
e.loading ? (b(), v("div", eo, [
|
|
3874
3874
|
Q(Tt, {
|
|
3875
|
-
class:
|
|
3875
|
+
class: E(t.value)
|
|
3876
3876
|
}, null, 8, ["class"])
|
|
3877
3877
|
])) : P("", !0),
|
|
3878
3878
|
l("span", {
|
|
3879
|
-
class:
|
|
3879
|
+
class: E(["flex items-center gap-2 transition-opacity duration-200 whitespace-nowrap", e.loading ? "opacity-0" : "opacity-100"])
|
|
3880
3880
|
}, [
|
|
3881
3881
|
o.value.icon ? (b(), v("span", {
|
|
3882
3882
|
key: 0,
|
|
3883
|
-
class:
|
|
3883
|
+
class: E(["flex items-center size-[1.1em] mt-[-.07em]", [o.value.icon, a.value]])
|
|
3884
3884
|
}, null, 2)) : P("", !0),
|
|
3885
|
-
Ge(
|
|
3885
|
+
Ge(i.$slots, "default"),
|
|
3886
3886
|
o.value.iconAfter ? (b(), v("span", {
|
|
3887
3887
|
key: 1,
|
|
3888
|
-
class:
|
|
3888
|
+
class: E(["flex items-center size-[1.1em] mt-[-.07em]", [o.value.iconAfter, a.value]])
|
|
3889
3889
|
}, null, 2)) : P("", !0)
|
|
3890
3890
|
], 2)
|
|
3891
3891
|
]),
|
|
3892
3892
|
_: 3
|
|
3893
3893
|
}, 8, ["href", "class"]));
|
|
3894
3894
|
}
|
|
3895
|
-
}),
|
|
3895
|
+
}), ro = { 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" }, oo = { class: "flex-1 space-y-6" }, no = {
|
|
3896
3896
|
key: 0,
|
|
3897
3897
|
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3898
|
-
},
|
|
3898
|
+
}, so = { class: "text-sm text-white/70 leading-relaxed" }, io = {
|
|
3899
3899
|
key: 1,
|
|
3900
3900
|
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3901
|
-
},
|
|
3901
|
+
}, ao = ["innerHTML"], lo = {
|
|
3902
3902
|
key: 2,
|
|
3903
3903
|
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3904
|
-
},
|
|
3904
|
+
}, co = { class: "text-sm text-white/70 leading-relaxed" }, uo = {
|
|
3905
3905
|
key: 3,
|
|
3906
3906
|
class: "space-y-3"
|
|
3907
|
-
},
|
|
3907
|
+
}, ho = { class: "grid grid-cols-2 gap-3" }, fo = /* @__PURE__ */ K({
|
|
3908
3908
|
__name: "ElSelfAbout",
|
|
3909
3909
|
props: {
|
|
3910
3910
|
self: {}
|
|
@@ -3957,27 +3957,27 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3957
3957
|
}), "generate")
|
|
3958
3958
|
}
|
|
3959
3959
|
].filter((t) => t.condition()).map((t) => t.generate()));
|
|
3960
|
-
return (r, t) => (b(), v("div",
|
|
3961
|
-
l("div",
|
|
3962
|
-
e.self.headline ? (b(), v("div",
|
|
3960
|
+
return (r, t) => (b(), v("div", ro, [
|
|
3961
|
+
l("div", oo, [
|
|
3962
|
+
e.self.headline ? (b(), v("div", no, [
|
|
3963
3963
|
t[0] || (t[0] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Professional Tagline ", -1)),
|
|
3964
|
-
l("div",
|
|
3964
|
+
l("div", so, W(e.self.headline), 1)
|
|
3965
3965
|
])) : P("", !0),
|
|
3966
|
-
e.self.summary ? (b(), v("div",
|
|
3966
|
+
e.self.summary ? (b(), v("div", io, [
|
|
3967
3967
|
t[1] || (t[1] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " About ", -1)),
|
|
3968
3968
|
l("div", {
|
|
3969
3969
|
class: "text-sm text-white/70 leading-relaxed",
|
|
3970
3970
|
innerHTML: e.self.summary
|
|
3971
|
-
}, null, 8,
|
|
3971
|
+
}, null, 8, ao)
|
|
3972
3972
|
])) : P("", !0),
|
|
3973
|
-
e.self.entityType === "company" ? (b(), v("div",
|
|
3973
|
+
e.self.entityType === "company" ? (b(), v("div", lo, [
|
|
3974
3974
|
t[2] || (t[2] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Company Info ", -1)),
|
|
3975
|
-
l("p",
|
|
3975
|
+
l("p", co, " This is a company digital self representing " + W(e.self.name) + ". ", 1)
|
|
3976
3976
|
])) : P("", !0),
|
|
3977
|
-
o.value.length > 0 ? (b(), v("div",
|
|
3977
|
+
o.value.length > 0 ? (b(), v("div", uo, [
|
|
3978
3978
|
t[3] || (t[3] = l("h3", { class: "text-sm font-medium text-white/90" }, " Connect ", -1)),
|
|
3979
|
-
l("div",
|
|
3980
|
-
(b(!0), v(Je, null, ct(o.value, (s) => (b(), Se(
|
|
3979
|
+
l("div", ho, [
|
|
3980
|
+
(b(!0), v(Je, null, ct(o.value, (s) => (b(), Se(to, {
|
|
3981
3981
|
key: s.title,
|
|
3982
3982
|
design: "ghost",
|
|
3983
3983
|
theme: "default",
|
|
@@ -3988,7 +3988,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3988
3988
|
}, {
|
|
3989
3989
|
default: ke(() => [
|
|
3990
3990
|
l("i", {
|
|
3991
|
-
class:
|
|
3991
|
+
class: E([s.icon, "size-4 mr-2"])
|
|
3992
3992
|
}, null, 2),
|
|
3993
3993
|
Xe(" " + W(s.title), 1)
|
|
3994
3994
|
]),
|
|
@@ -3999,7 +3999,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
3999
3999
|
])
|
|
4000
4000
|
]));
|
|
4001
4001
|
}
|
|
4002
|
-
}),
|
|
4002
|
+
}), go = {
|
|
4003
4003
|
key: 0,
|
|
4004
4004
|
class: "absolute inset-0 flex items-center justify-center"
|
|
4005
4005
|
}, Ht = /* @__PURE__ */ K({
|
|
@@ -4013,10 +4013,10 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4013
4013
|
},
|
|
4014
4014
|
setup(e) {
|
|
4015
4015
|
const o = L(() => ({
|
|
4016
|
-
primary: "bg-primary-600 border-primary-400 hover:bg-primary-
|
|
4017
|
-
green: "bg-green-600 border-green-400 hover:bg-green-
|
|
4018
|
-
red: "bg-red-600 border-red-400 hover:bg-red-
|
|
4019
|
-
default: "bg-white/10 border-white/20 hover:bg-white/20"
|
|
4016
|
+
primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
|
|
4017
|
+
green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
|
|
4018
|
+
red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
|
|
4019
|
+
default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20"
|
|
4020
4020
|
})[e.theme]), r = L(() => ({
|
|
4021
4021
|
sm: "px-4 py-2 text-sm",
|
|
4022
4022
|
md: "px-6 py-3 text-base",
|
|
@@ -4026,37 +4026,37 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4026
4026
|
md: "size-4",
|
|
4027
4027
|
lg: "size-5"
|
|
4028
4028
|
})[e.size]);
|
|
4029
|
-
return (s,
|
|
4030
|
-
class:
|
|
4029
|
+
return (s, a) => (b(), v("button", {
|
|
4030
|
+
class: E(["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", [o.value, r.value]])
|
|
4031
4031
|
}, [
|
|
4032
|
-
e.loading ? (b(), v("div",
|
|
4032
|
+
e.loading ? (b(), v("div", go, [...a[0] || (a[0] = [
|
|
4033
4033
|
l("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
|
|
4034
4034
|
])])) : P("", !0),
|
|
4035
4035
|
l("span", {
|
|
4036
|
-
class:
|
|
4036
|
+
class: E(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"])
|
|
4037
4037
|
}, [
|
|
4038
4038
|
e.icon ? (b(), v("i", {
|
|
4039
4039
|
key: 0,
|
|
4040
|
-
class:
|
|
4040
|
+
class: E([e.icon, t.value])
|
|
4041
4041
|
}, null, 2)) : P("", !0),
|
|
4042
4042
|
Ge(s.$slots, "default"),
|
|
4043
4043
|
e.iconAfter ? (b(), v("i", {
|
|
4044
4044
|
key: 1,
|
|
4045
|
-
class:
|
|
4045
|
+
class: E([e.iconAfter, t.value])
|
|
4046
4046
|
}, null, 2)) : P("", !0)
|
|
4047
4047
|
], 2)
|
|
4048
4048
|
], 2));
|
|
4049
4049
|
}
|
|
4050
|
-
}),
|
|
4050
|
+
}), mo = { class: "flex flex-col h-full relative" }, bo = {
|
|
4051
4051
|
key: 0,
|
|
4052
4052
|
class: "absolute top-[-10px] left-1/2 transform -translate-x-1/2 z-30 px-4 py-1 bg-theme-900 text-theme-500 text-[10px] font-mono rounded-full"
|
|
4053
|
-
},
|
|
4053
|
+
}, po = {
|
|
4054
4054
|
key: 0,
|
|
4055
4055
|
class: "flex-shrink-0 size-8"
|
|
4056
|
-
},
|
|
4056
|
+
}, vo = ["src", "alt"], xo = { class: "max-w-[70%]" }, yo = { class: "text-sm leading-[1.5] whitespace-pre-wrap break-words" }, ko = {
|
|
4057
4057
|
key: 0,
|
|
4058
4058
|
class: "flex gap-2 justify-start items-end mb-4"
|
|
4059
|
-
},
|
|
4059
|
+
}, wo = { class: "flex-shrink-0" }, Co = ["src", "alt"], So = { class: "flex-shrink-0 pt-6 pb-2" }, Mo = ["placeholder", "disabled"], Ao = /* @__PURE__ */ K({
|
|
4060
4060
|
__name: "ElSelfChat",
|
|
4061
4061
|
props: {
|
|
4062
4062
|
selfController: {},
|
|
@@ -4064,11 +4064,11 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4064
4064
|
},
|
|
4065
4065
|
setup(e) {
|
|
4066
4066
|
const o = B(""), r = B(), t = B(), s = L(() => nt(e.self));
|
|
4067
|
-
function
|
|
4068
|
-
const x = d[C],
|
|
4069
|
-
return !
|
|
4067
|
+
function a(d, C) {
|
|
4068
|
+
const x = d[C], g = d[C + 1];
|
|
4069
|
+
return !g || g.sender !== x.sender;
|
|
4070
4070
|
}
|
|
4071
|
-
n(
|
|
4071
|
+
n(a, "shouldShowAvatar"), Oe(async () => {
|
|
4072
4072
|
if (e.selfController && !e.selfController.textState.value.isConnected)
|
|
4073
4073
|
try {
|
|
4074
4074
|
await e.selfController.startTextConversation();
|
|
@@ -4076,7 +4076,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4076
4076
|
console.error("Failed to start text conversation:", d);
|
|
4077
4077
|
}
|
|
4078
4078
|
});
|
|
4079
|
-
async function
|
|
4079
|
+
async function i() {
|
|
4080
4080
|
if (!o.value.trim() || !e.selfController || !e.selfController.textState.value.isConnected)
|
|
4081
4081
|
return;
|
|
4082
4082
|
const d = o.value;
|
|
@@ -4089,11 +4089,11 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4089
4089
|
console.error("Error sending message:", C);
|
|
4090
4090
|
}
|
|
4091
4091
|
}
|
|
4092
|
-
n(
|
|
4093
|
-
function
|
|
4094
|
-
d.key === "Enter" && !d.shiftKey && (d.preventDefault(),
|
|
4092
|
+
n(i, "sendMessage");
|
|
4093
|
+
function m(d) {
|
|
4094
|
+
d.key === "Enter" && !d.shiftKey && (d.preventDefault(), i());
|
|
4095
4095
|
}
|
|
4096
|
-
n(
|
|
4096
|
+
n(m, "handleKeydown");
|
|
4097
4097
|
function c() {
|
|
4098
4098
|
r.value && Ue(() => {
|
|
4099
4099
|
const d = r.value;
|
|
@@ -4112,51 +4112,51 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4112
4112
|
Ue(() => A());
|
|
4113
4113
|
}), ye(() => e.selfController?.sharedMessages.value, (d) => {
|
|
4114
4114
|
d && d.length > 0 && Ue(() => c());
|
|
4115
|
-
}, { immediate: !0, deep: !0 }), (d, C) => (b(), v("div",
|
|
4116
|
-
e.selfController?.textState.value.connectionStatus !== "connected" ? (b(), v("div",
|
|
4115
|
+
}, { immediate: !0, deep: !0 }), (d, C) => (b(), v("div", mo, [
|
|
4116
|
+
e.selfController?.textState.value.connectionStatus !== "connected" ? (b(), v("div", bo, W(e.selfController?.textState.value.connectionStatus === "connecting" ? "Connecting..." : "Disconnected"), 1)) : P("", !0),
|
|
4117
4117
|
l("div", {
|
|
4118
4118
|
ref_key: "messagesContainer",
|
|
4119
4119
|
ref: r,
|
|
4120
4120
|
class: "flex-1 overflow-y-auto overflow-x-hidden py-8 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
|
|
4121
4121
|
}, [
|
|
4122
|
-
(b(!0), v(Je, null, ct(e.selfController?.sharedMessages.value.filter((x) => x.sender !== "system") ?? [], (x,
|
|
4122
|
+
(b(!0), v(Je, null, ct(e.selfController?.sharedMessages.value.filter((x) => x.sender !== "system") ?? [], (x, g) => (b(), v("div", {
|
|
4123
4123
|
key: x.id,
|
|
4124
|
-
class:
|
|
4124
|
+
class: E(["flex gap-2 items-end", {
|
|
4125
4125
|
"justify-end": x.sender === "user",
|
|
4126
4126
|
"justify-start": x.sender === "agent",
|
|
4127
|
-
"mb-4":
|
|
4127
|
+
"mb-4": a(e.selfController?.sharedMessages.value.filter((I) => I.sender !== "system") ?? [], g)
|
|
4128
4128
|
}])
|
|
4129
4129
|
}, [
|
|
4130
|
-
x.sender === "agent" ? (b(), v("div",
|
|
4131
|
-
|
|
4130
|
+
x.sender === "agent" ? (b(), v("div", po, [
|
|
4131
|
+
a(e.selfController?.sharedMessages.value.filter((I) => I.sender !== "system") ?? [], g) ? (b(), v("img", {
|
|
4132
4132
|
key: 0,
|
|
4133
4133
|
src: s.value,
|
|
4134
4134
|
alt: e.self.name,
|
|
4135
4135
|
class: "size-7 rounded-full object-cover"
|
|
4136
|
-
}, null, 8,
|
|
4136
|
+
}, null, 8, vo)) : P("", !0)
|
|
4137
4137
|
])) : P("", !0),
|
|
4138
|
-
l("div",
|
|
4138
|
+
l("div", xo, [
|
|
4139
4139
|
l("div", {
|
|
4140
|
-
class:
|
|
4140
|
+
class: E(["rounded-2xl px-3.5 py-1.5 backdrop-blur-sm", x.sender === "user" ? "bg-primary-500/80 text-white" : "bg-white/15 text-white/95"])
|
|
4141
4141
|
}, [
|
|
4142
|
-
l("p",
|
|
4142
|
+
l("p", yo, W(x.text), 1)
|
|
4143
4143
|
], 2)
|
|
4144
4144
|
])
|
|
4145
4145
|
], 2))), 128)),
|
|
4146
|
-
e.selfController?.textState.value.isThinking ? (b(), v("div",
|
|
4147
|
-
l("div",
|
|
4146
|
+
e.selfController?.textState.value.isThinking ? (b(), v("div", ko, [
|
|
4147
|
+
l("div", wo, [
|
|
4148
4148
|
l("img", {
|
|
4149
4149
|
src: s.value,
|
|
4150
4150
|
alt: e.self.name,
|
|
4151
4151
|
class: "size-8 rounded-full object-cover"
|
|
4152
|
-
}, null, 8,
|
|
4152
|
+
}, null, 8, Co)
|
|
4153
4153
|
]),
|
|
4154
4154
|
C[1] || (C[1] = l("div", { class: "rounded-2xl px-4 py-2.5 bg-white/15 backdrop-blur-sm flex items-center" }, [
|
|
4155
4155
|
l("i", { class: "i-svg-spinners-3-dots-fade size-6 text-white/70" })
|
|
4156
4156
|
], -1))
|
|
4157
4157
|
])) : P("", !0)
|
|
4158
4158
|
], 512),
|
|
4159
|
-
l("div",
|
|
4159
|
+
l("div", So, [
|
|
4160
4160
|
rr(l("textarea", {
|
|
4161
4161
|
ref_key: "textarea",
|
|
4162
4162
|
ref: t,
|
|
@@ -4166,15 +4166,15 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4166
4166
|
disabled: e.selfController?.textState.value.isThinking || !e.selfController?.textState.value.isConnected,
|
|
4167
4167
|
style: { "font-size": "16px", resize: "none" },
|
|
4168
4168
|
class: "w-full bg-white/10 backdrop-blur-sm border border-white/20 rounded-3xl px-5 py-3 text-white placeholder-white/50 focus:outline-none focus:border-white/40 disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
4169
|
-
onKeydown:
|
|
4170
|
-
}, null, 40,
|
|
4169
|
+
onKeydown: m
|
|
4170
|
+
}, null, 40, Mo), [
|
|
4171
4171
|
[or, o.value]
|
|
4172
4172
|
]),
|
|
4173
4173
|
C[2] || (C[2] = l("div", { class: "text-[10px] text-white/40 text-center mt-2" }, " Press Enter to send, Shift+Enter for new line ", -1))
|
|
4174
4174
|
])
|
|
4175
4175
|
]));
|
|
4176
4176
|
}
|
|
4177
|
-
}),
|
|
4177
|
+
}), zo = { class: "flex flex-col items-center text-center gap-4" }, Io = { class: "relative flex-shrink-0" }, $o = { class: "w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white" }, Eo = ["src", "alt"], Lo = { class: "min-w-0" }, To = { class: "text-3xl font-light text-white mb-2 truncate" }, Po = { class: "text-base font-light text-white/60 line-clamp-1" }, Fo = /* @__PURE__ */ K({
|
|
4178
4178
|
__name: "ElSelfHeader",
|
|
4179
4179
|
props: {
|
|
4180
4180
|
self: {}
|
|
@@ -4183,16 +4183,16 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4183
4183
|
function o() {
|
|
4184
4184
|
return e.self.avatar?.src ? e.self.avatar.src : _e();
|
|
4185
4185
|
}
|
|
4186
|
-
return n(o, "getAvatarSrc"), (r, t) => (b(), v("div",
|
|
4187
|
-
l("div",
|
|
4188
|
-
l("div",
|
|
4186
|
+
return n(o, "getAvatarSrc"), (r, t) => (b(), v("div", zo, [
|
|
4187
|
+
l("div", Io, [
|
|
4188
|
+
l("div", $o, [
|
|
4189
4189
|
l("img", {
|
|
4190
4190
|
src: o(),
|
|
4191
4191
|
alt: e.self.name,
|
|
4192
4192
|
class: "w-full h-full object-cover",
|
|
4193
4193
|
onError: t[0] || (t[0] = //@ts-ignore
|
|
4194
4194
|
(...s) => Z(Qe) && Z(Qe)(...s))
|
|
4195
|
-
}, null, 40,
|
|
4195
|
+
}, null, 40, Eo)
|
|
4196
4196
|
]),
|
|
4197
4197
|
t[1] || (t[1] = l("div", { class: "absolute top-1.5 right-1.5" }, [
|
|
4198
4198
|
l("div", {
|
|
@@ -4202,60 +4202,49 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4202
4202
|
l("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" })
|
|
4203
4203
|
], -1))
|
|
4204
4204
|
]),
|
|
4205
|
-
l("div",
|
|
4206
|
-
l("h1",
|
|
4207
|
-
l("p",
|
|
4205
|
+
l("div", Lo, [
|
|
4206
|
+
l("h1", To, W(e.self.name), 1),
|
|
4207
|
+
l("p", Po, W(e.self.title), 1)
|
|
4208
4208
|
])
|
|
4209
4209
|
]));
|
|
4210
4210
|
}
|
|
4211
|
-
}),
|
|
4211
|
+
}), Do = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, Bo = /* @__PURE__ */ K({
|
|
4212
4212
|
name: "FClose",
|
|
4213
4213
|
__name: "FClose",
|
|
4214
|
-
props: {
|
|
4215
|
-
colorMode: { default: "auto" }
|
|
4216
|
-
},
|
|
4217
4214
|
emits: ["click"],
|
|
4218
4215
|
setup(e) {
|
|
4219
|
-
const o = B(!1)
|
|
4220
|
-
Oe(() => {
|
|
4216
|
+
const o = B(!1);
|
|
4217
|
+
return Oe(() => {
|
|
4221
4218
|
setTimeout(() => {
|
|
4222
4219
|
o.value = !0;
|
|
4223
4220
|
}, 100);
|
|
4224
|
-
}),
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
const t = L(() => e.colorMode === "light" ? "bg-white" : e.colorMode === "dark" ? "bg-theme-950" : "bg-theme-950 dark:bg-white");
|
|
4228
|
-
return (s, i) => (b(), v("a", {
|
|
4229
|
-
id: r,
|
|
4230
|
-
class: $(["close block cursor-pointer duration-1000 hover:scale-110 active:scale-90 hover:rotate-90 transition-all ease-[cubic-bezier(0.25,1,0.33,1)] w-[60px] h-[60px] rounded-full", o.value ? "in-view" : "out-view"]),
|
|
4231
|
-
onClick: i[0] || (i[0] = (a) => s.$emit("click", a))
|
|
4221
|
+
}), (r, t) => (b(), v("a", {
|
|
4222
|
+
class: "close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",
|
|
4223
|
+
onClick: t[0] || (t[0] = (s) => r.$emit("click", s))
|
|
4232
4224
|
}, [
|
|
4233
|
-
|
|
4234
|
-
l("span",
|
|
4225
|
+
t[1] || (t[1] = l("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)),
|
|
4226
|
+
l("span", Do, [
|
|
4235
4227
|
l("span", {
|
|
4236
|
-
class:
|
|
4228
|
+
class: E(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", o.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
|
|
4229
|
+
style: { "background-color": "currentColor", "transition-delay": "0.15s" }
|
|
4237
4230
|
}, null, 2),
|
|
4238
4231
|
l("span", {
|
|
4239
|
-
class:
|
|
4232
|
+
class: E(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", o.value ? "translate-y-0 translate-x-0 -rotate-45" : "-translate-y-[30px] -translate-x-[30px] rotate-0"]),
|
|
4233
|
+
style: { "background-color": "currentColor", "transition-delay": "0.45s" }
|
|
4240
4234
|
}, null, 2)
|
|
4241
4235
|
])
|
|
4242
|
-
]
|
|
4236
|
+
]));
|
|
4243
4237
|
}
|
|
4244
|
-
}),
|
|
4245
|
-
const r = e.__vccOpts || e;
|
|
4246
|
-
for (const [t, s] of o)
|
|
4247
|
-
r[t] = s;
|
|
4248
|
-
return r;
|
|
4249
|
-
}, "_export_sfc"), jo = /* @__PURE__ */ Ro(Vo, [["__scopeId", "data-v-bbf0f1cb"]]), No = {
|
|
4238
|
+
}), Vo = {
|
|
4250
4239
|
key: 0,
|
|
4251
4240
|
class: "px-9 pt-12 pb-4"
|
|
4252
|
-
},
|
|
4241
|
+
}, Ro = { class: "text-base font-medium text-theme-400" }, jo = {
|
|
4253
4242
|
key: 1,
|
|
4254
4243
|
class: "px-4 pb-8 border-b border-white/10"
|
|
4255
|
-
},
|
|
4244
|
+
}, No = ["disabled", "onClick"], Go = { class: "flex items-center gap-3" }, Oo = { class: "flex-1" }, Ho = {
|
|
4256
4245
|
key: 0,
|
|
4257
4246
|
class: "text-xs text-white/50 mt-0.5"
|
|
4258
|
-
},
|
|
4247
|
+
}, qo = { class: "p-6" }, qt = /* @__PURE__ */ K({
|
|
4259
4248
|
name: "ElSidebar",
|
|
4260
4249
|
__name: "ElSidebar",
|
|
4261
4250
|
props: {
|
|
@@ -4267,12 +4256,12 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4267
4256
|
},
|
|
4268
4257
|
emits: ["update:modelValue"],
|
|
4269
4258
|
setup(e, { emit: o }) {
|
|
4270
|
-
const r = e, t = o, s = r.position || "left",
|
|
4259
|
+
const r = e, t = o, s = r.position || "left", a = r.widthClasses || "w-[70%] max-w-[300px]", i = L({
|
|
4271
4260
|
get: /* @__PURE__ */ n(() => r.modelValue, "get"),
|
|
4272
4261
|
set: /* @__PURE__ */ n((d) => t("update:modelValue", d), "set")
|
|
4273
|
-
}),
|
|
4262
|
+
}), m = L(() => r.items.filter((d) => !d.isHidden));
|
|
4274
4263
|
function c(d) {
|
|
4275
|
-
d.isDisabled || (d.onClick ? d.onClick({ item: d, event: new MouseEvent("click") }) : d.href && (d.href.includes("http") ? window.open(d.href, d.target || "_self")?.focus() : window.location.href = d.href),
|
|
4264
|
+
d.isDisabled || (d.onClick ? d.onClick({ item: d, event: new MouseEvent("click") }) : d.href && (d.href.includes("http") ? window.open(d.href, d.target || "_self")?.focus() : window.location.href = d.href), i.value = !1);
|
|
4276
4265
|
}
|
|
4277
4266
|
n(c, "handleItemClick");
|
|
4278
4267
|
const A = L(() => s === "left" ? {
|
|
@@ -4296,10 +4285,10 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4296
4285
|
"leave-to-class": "opacity-0"
|
|
4297
4286
|
}, {
|
|
4298
4287
|
default: ke(() => [
|
|
4299
|
-
|
|
4288
|
+
i.value ? (b(), v("div", {
|
|
4300
4289
|
key: 0,
|
|
4301
4290
|
class: "absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
4302
|
-
onClick: C[0] || (C[0] = (x) =>
|
|
4291
|
+
onClick: C[0] || (C[0] = (x) => i.value = !1)
|
|
4303
4292
|
})) : P("", !0)
|
|
4304
4293
|
]),
|
|
4305
4294
|
_: 1
|
|
@@ -4313,31 +4302,30 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4313
4302
|
"leave-to-class": A.value.leave
|
|
4314
4303
|
}, {
|
|
4315
4304
|
default: ke(() => [
|
|
4316
|
-
|
|
4305
|
+
i.value ? (b(), v("div", {
|
|
4317
4306
|
key: 0,
|
|
4318
|
-
class:
|
|
4319
|
-
onClick: C[3] || (C[3] = (x) =>
|
|
4307
|
+
class: E(["absolute inset-0 z-50 flex", A.value.position]),
|
|
4308
|
+
onClick: C[3] || (C[3] = (x) => i.value = !1)
|
|
4320
4309
|
}, [
|
|
4321
4310
|
l("div", {
|
|
4322
|
-
class:
|
|
4311
|
+
class: E(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center", Z(a)]),
|
|
4323
4312
|
onClick: C[2] || (C[2] = It(() => {
|
|
4324
4313
|
}, ["stop"]))
|
|
4325
4314
|
}, [
|
|
4326
|
-
Q(
|
|
4327
|
-
class:
|
|
4328
|
-
|
|
4329
|
-
onClick: C[1] || (C[1] = (x) => a.value = !1)
|
|
4315
|
+
Q(Bo, {
|
|
4316
|
+
class: E(["absolute top-4 z-10 text-white", A.value.closeButton]),
|
|
4317
|
+
onClick: C[1] || (C[1] = (x) => i.value = !1)
|
|
4330
4318
|
}, null, 8, ["class"]),
|
|
4331
|
-
e.title ? (b(), v("div",
|
|
4332
|
-
l("h3",
|
|
4319
|
+
e.title ? (b(), v("div", Vo, [
|
|
4320
|
+
l("h3", Ro, W(e.title), 1)
|
|
4333
4321
|
])) : P("", !0),
|
|
4334
|
-
d.$slots.header ? (b(), v("div",
|
|
4322
|
+
d.$slots.header ? (b(), v("div", jo, [
|
|
4335
4323
|
Ge(d.$slots, "header")
|
|
4336
4324
|
])) : P("", !0),
|
|
4337
4325
|
l("div", {
|
|
4338
|
-
class:
|
|
4326
|
+
class: E(["flex-1 p-6 space-y-2 overflow-y-auto", { "pt-6": !e.title && !d.$slots.header, "pt-4": e.title || d.$slots.header }])
|
|
4339
4327
|
}, [
|
|
4340
|
-
Q(
|
|
4328
|
+
Q(nr, {
|
|
4341
4329
|
"enter-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4342
4330
|
"leave-active-class": "transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4343
4331
|
"enter-from-class": Z(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0",
|
|
@@ -4346,37 +4334,37 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4346
4334
|
"leave-to-class": Z(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
|
|
4347
4335
|
}, {
|
|
4348
4336
|
default: ke(() => [
|
|
4349
|
-
(b(!0), v(Je, null, ct(
|
|
4350
|
-
key: x.key || x.label ||
|
|
4351
|
-
style: dt({ transitionDelay: `${
|
|
4352
|
-
class:
|
|
4337
|
+
(b(!0), v(Je, null, ct(m.value, (x, g) => (b(), v("button", {
|
|
4338
|
+
key: x.key || x.label || g,
|
|
4339
|
+
style: dt({ transitionDelay: `${g * 40}ms` }),
|
|
4340
|
+
class: E(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [
|
|
4353
4341
|
x.isActive ? "bg-primary-500/20 border border-primary-500/40" : "hover:bg-white/10",
|
|
4354
4342
|
x.isDisabled && "opacity-50 cursor-not-allowed"
|
|
4355
4343
|
]]),
|
|
4356
4344
|
disabled: x.isDisabled,
|
|
4357
4345
|
onClick: /* @__PURE__ */ n((I) => c(x), "onClick")
|
|
4358
4346
|
}, [
|
|
4359
|
-
l("div",
|
|
4347
|
+
l("div", Go, [
|
|
4360
4348
|
x.icon?.src ? (b(), v("i", {
|
|
4361
4349
|
key: 0,
|
|
4362
|
-
class:
|
|
4350
|
+
class: E(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [
|
|
4363
4351
|
x.icon.src,
|
|
4364
4352
|
x.isActive ? "text-primary-400" : "text-white/70 group-hover:text-white"
|
|
4365
4353
|
]])
|
|
4366
4354
|
}, null, 2)) : P("", !0),
|
|
4367
|
-
l("div",
|
|
4355
|
+
l("div", Oo, [
|
|
4368
4356
|
l("div", {
|
|
4369
|
-
class:
|
|
4357
|
+
class: E(["font-medium text-sm", x.isActive ? "text-primary-300" : "text-white"])
|
|
4370
4358
|
}, W(x.label), 3),
|
|
4371
|
-
x.subLabel ? (b(), v("div",
|
|
4359
|
+
x.subLabel ? (b(), v("div", Ho, W(x.subLabel), 1)) : P("", !0)
|
|
4372
4360
|
])
|
|
4373
4361
|
])
|
|
4374
|
-
], 14,
|
|
4362
|
+
], 14, No))), 128))
|
|
4375
4363
|
]),
|
|
4376
4364
|
_: 1
|
|
4377
4365
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
4378
4366
|
], 2),
|
|
4379
|
-
l("div",
|
|
4367
|
+
l("div", qo, [
|
|
4380
4368
|
Ge(d.$slots, "footer", {}, () => [
|
|
4381
4369
|
C[4] || (C[4] = l("div", { class: "text-center" }, [
|
|
4382
4370
|
l("p", { class: "text-[10px] text-white/40 font-sans" }, [
|
|
@@ -4397,7 +4385,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4397
4385
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
4398
4386
|
], 64));
|
|
4399
4387
|
}
|
|
4400
|
-
}),
|
|
4388
|
+
}), Wo = /* @__PURE__ */ K({
|
|
4401
4389
|
name: "SelfModeSidebar",
|
|
4402
4390
|
__name: "ElSelfModeSidebar",
|
|
4403
4391
|
props: {
|
|
@@ -4408,26 +4396,26 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4408
4396
|
setup(e, { emit: o }) {
|
|
4409
4397
|
const r = e, t = o, s = L({
|
|
4410
4398
|
get: /* @__PURE__ */ n(() => r.modelValue, "get"),
|
|
4411
|
-
set: /* @__PURE__ */ n((
|
|
4412
|
-
}),
|
|
4413
|
-
key:
|
|
4414
|
-
icon: { src:
|
|
4415
|
-
label:
|
|
4416
|
-
isActive:
|
|
4399
|
+
set: /* @__PURE__ */ n((m) => t("update:modelValue", m), "set")
|
|
4400
|
+
}), a = L(() => r.selfController?.agentMode?.value ?? "self"), i = L(() => Lt.map((m) => ({
|
|
4401
|
+
key: m.mode,
|
|
4402
|
+
icon: { src: m.icon },
|
|
4403
|
+
label: m.label,
|
|
4404
|
+
isActive: a.value === m.mode,
|
|
4417
4405
|
onClick: /* @__PURE__ */ n(() => {
|
|
4418
|
-
r.selfController?.setMode(
|
|
4406
|
+
r.selfController?.setMode(m.mode);
|
|
4419
4407
|
}, "onClick")
|
|
4420
4408
|
})));
|
|
4421
|
-
return (
|
|
4409
|
+
return (m, c) => (b(), Se(qt, {
|
|
4422
4410
|
modelValue: s.value,
|
|
4423
4411
|
"onUpdate:modelValue": c[0] || (c[0] = (A) => s.value = A),
|
|
4424
|
-
items:
|
|
4412
|
+
items: i.value,
|
|
4425
4413
|
position: "right",
|
|
4426
4414
|
title: "Mode",
|
|
4427
4415
|
"width-classes": "w-[60%] max-w-[255px]"
|
|
4428
4416
|
}, null, 8, ["modelValue", "items"]));
|
|
4429
4417
|
}
|
|
4430
|
-
}),
|
|
4418
|
+
}), Uo = /* @__PURE__ */ K({
|
|
4431
4419
|
name: "SelfSidebar",
|
|
4432
4420
|
__name: "ElSelfSidebar",
|
|
4433
4421
|
props: {
|
|
@@ -4440,16 +4428,16 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4440
4428
|
setup(e, { emit: o }) {
|
|
4441
4429
|
const r = e, t = o, s = L({
|
|
4442
4430
|
get: /* @__PURE__ */ n(() => r.modelValue, "get"),
|
|
4443
|
-
set: /* @__PURE__ */ n((
|
|
4444
|
-
}),
|
|
4445
|
-
const
|
|
4431
|
+
set: /* @__PURE__ */ n((i) => t("update:modelValue", i), "set")
|
|
4432
|
+
}), a = L(() => {
|
|
4433
|
+
const i = [
|
|
4446
4434
|
{
|
|
4447
4435
|
key: "share",
|
|
4448
4436
|
icon: { src: "i-tabler-share" },
|
|
4449
4437
|
label: "Share This Digital Self",
|
|
4450
4438
|
onClick: /* @__PURE__ */ n(() => {
|
|
4451
|
-
const
|
|
4452
|
-
navigator.clipboard.writeText(
|
|
4439
|
+
const m = `${window.location.origin}/@${r.self.handle || r.self.selfId}`;
|
|
4440
|
+
navigator.clipboard.writeText(m);
|
|
4453
4441
|
}, "onClick")
|
|
4454
4442
|
},
|
|
4455
4443
|
{
|
|
@@ -4469,31 +4457,24 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4469
4457
|
}, "onClick")
|
|
4470
4458
|
}
|
|
4471
4459
|
];
|
|
4472
|
-
return r.sdk.activeUser.value &&
|
|
4460
|
+
return r.sdk.activeUser.value && i.push({
|
|
4473
4461
|
key: "logout",
|
|
4474
4462
|
icon: { src: "i-tabler-logout" },
|
|
4475
4463
|
label: "Logout",
|
|
4476
4464
|
onClick: /* @__PURE__ */ n(async () => {
|
|
4477
4465
|
await r.sdk.logout();
|
|
4478
4466
|
}, "onClick")
|
|
4479
|
-
}),
|
|
4480
|
-
key: "report",
|
|
4481
|
-
icon: { src: "i-tabler-bug" },
|
|
4482
|
-
label: "Report an Issue",
|
|
4483
|
-
onClick: /* @__PURE__ */ n(() => {
|
|
4484
|
-
window.location.href = "mailto:support@fiction.com";
|
|
4485
|
-
}, "onClick")
|
|
4486
|
-
}), a;
|
|
4467
|
+
}), i;
|
|
4487
4468
|
});
|
|
4488
|
-
return (
|
|
4469
|
+
return (i, m) => (b(), Se(qt, {
|
|
4489
4470
|
modelValue: s.value,
|
|
4490
|
-
"onUpdate:modelValue":
|
|
4491
|
-
items:
|
|
4471
|
+
"onUpdate:modelValue": m[0] || (m[0] = (c) => s.value = c),
|
|
4472
|
+
items: a.value,
|
|
4492
4473
|
position: "left",
|
|
4493
4474
|
title: e.title || "Menu"
|
|
4494
4475
|
}, null, 8, ["modelValue", "items", "title"]));
|
|
4495
4476
|
}
|
|
4496
|
-
}),
|
|
4477
|
+
}), Zo = { class: "w-full max-w-full flex items-center justify-center" }, Ko = ["width", "height"], Yo = /* @__PURE__ */ K({
|
|
4497
4478
|
__name: "ElAudioVisualizer",
|
|
4498
4479
|
props: {
|
|
4499
4480
|
rms: {},
|
|
@@ -4511,9 +4492,9 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4511
4492
|
setup(e) {
|
|
4512
4493
|
const o = e, r = B();
|
|
4513
4494
|
let t = null, s = null;
|
|
4514
|
-
const
|
|
4495
|
+
const a = B(!1), i = B(!0), m = /* @__PURE__ */ new Map();
|
|
4515
4496
|
let c = null, A = null, d = null;
|
|
4516
|
-
const C = B(!1), x = B(null), { bars:
|
|
4497
|
+
const C = B(!1), x = B(null), { bars: g, barWidth: I, barSpacing: V, minHeight: Y, maxHeight: ee, STIFFNESS: Me, DAMPING: we, PEAK_HOLD_TIME: le, PEAK_DECAY_STIFFNESS: me, PEAK_DECAY_DAMPING: ce } = dr, te = new Float32Array(g).fill(Y), k = new Float32Array(g).fill(0), re = new Float32Array(g).fill(Y), ie = new Float32Array(g).fill(Y), de = new Float32Array(g).fill(0), ue = new Float32Array(g).fill(0);
|
|
4517
4498
|
function He(u) {
|
|
4518
4499
|
return u < 200 ? { stiffnessMultiplier: 0.7, dampingMultiplier: 1.2 } : u < 1e3 ? { stiffnessMultiplier: 1, dampingMultiplier: 1 } : u < 4e3 ? { stiffnessMultiplier: 1.3, dampingMultiplier: 0.8 } : { stiffnessMultiplier: 1.5, dampingMultiplier: 0.6 };
|
|
4519
4500
|
}
|
|
@@ -4546,7 +4527,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4546
4527
|
if (!r.value)
|
|
4547
4528
|
return;
|
|
4548
4529
|
typeof window < "u" && (G = Math.max(1, Math.min(2, window.devicePixelRatio || 1)));
|
|
4549
|
-
const u = (I + V) *
|
|
4530
|
+
const u = (I + V) * g - V, w = ee;
|
|
4550
4531
|
r.value.width = Math.floor(u * G), r.value.height = Math.floor(w * G), r.value.style.width = `${u}px`, r.value.style.height = `${w}px`, t && t.setTransform(G, 0, 0, G, 0, 0), Zt();
|
|
4551
4532
|
}
|
|
4552
4533
|
n(ne, "resizeCanvas");
|
|
@@ -4568,8 +4549,8 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4568
4549
|
}
|
|
4569
4550
|
n(qe, "generateRealOutputFrequencyBands");
|
|
4570
4551
|
function De(u) {
|
|
4571
|
-
return Array.from({ length: J.length }, (S,
|
|
4572
|
-
const z = J[
|
|
4552
|
+
return Array.from({ length: J.length }, (S, $) => {
|
|
4553
|
+
const z = J[$], N = Math.floor(z / 12e3 * u.length), fe = Math.max(1, Math.floor(u.length / J.length / 2));
|
|
4573
4554
|
let H = 0;
|
|
4574
4555
|
for (let U = 0; U < fe && N + U < u.length; U++)
|
|
4575
4556
|
H += u[N + U];
|
|
@@ -4599,22 +4580,22 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4599
4580
|
if (u <= 0)
|
|
4600
4581
|
return w;
|
|
4601
4582
|
pe += 16.67, R += 0.02, pe > O[be].duration && (be = (be + 1) % O.length, pe = 0);
|
|
4602
|
-
const S = O[be],
|
|
4583
|
+
const S = O[be], $ = O[(be + 1) % O.length], z = pe / S.duration, j = 0.5 * (1 + Math.cos(Math.PI + z * Math.PI)), N = 0.7 + 0.3 * Math.sin(R * 0.5), fe = 0.9 + 0.1 * Math.sin(R * 8);
|
|
4603
4584
|
for (let H = 0; H < J.length; H++) {
|
|
4604
4585
|
const T = J[H];
|
|
4605
4586
|
let p = 0;
|
|
4606
|
-
const ae = Ie(T, S.f1,
|
|
4607
|
-
p = (ae * 0.4 + X * 0.35 + U * 0.25) * (S.energy * (1 - j) +
|
|
4587
|
+
const ae = Ie(T, S.f1, $.f1, j, 200), X = Ie(T, S.f2, $.f2, j, 300), U = Ie(T, S.f3, $.f3, j, 400);
|
|
4588
|
+
p = (ae * 0.4 + X * 0.35 + U * 0.25) * (S.energy * (1 - j) + $.energy * j);
|
|
4608
4589
|
const oe = 150 + 50 * Math.sin(R * 0.3);
|
|
4609
4590
|
(Math.abs(T - oe) < 20 || Math.abs(T - oe * 2) < 30 || Math.abs(T - oe * 3) < 40) && (p += 0.3 * S.energy), p *= u * N * fe, p *= 0.85 + Math.random() * 0.3, w[H] = Math.max(0, Math.min(1, p));
|
|
4610
4591
|
}
|
|
4611
4592
|
return w;
|
|
4612
4593
|
}
|
|
4613
4594
|
n(ze, "generateSpeechPatterns");
|
|
4614
|
-
function Ie(u, w, S,
|
|
4595
|
+
function Ie(u, w, S, $, z) {
|
|
4615
4596
|
if (w === 0 && S === 0)
|
|
4616
4597
|
return 0;
|
|
4617
|
-
const j = w * (1 -
|
|
4598
|
+
const j = w * (1 - $) + S * $;
|
|
4618
4599
|
if (j === 0)
|
|
4619
4600
|
return 0;
|
|
4620
4601
|
const N = Math.abs(u - j);
|
|
@@ -4623,7 +4604,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4623
4604
|
n(Ie, "getFormantResponse");
|
|
4624
4605
|
let F = [], Be = 0, ve = 0;
|
|
4625
4606
|
function $e() {
|
|
4626
|
-
const u =
|
|
4607
|
+
const u = a.value ? 100 : 50, w = Math.min(2 ** ve, 8);
|
|
4627
4608
|
return u * w;
|
|
4628
4609
|
}
|
|
4629
4610
|
n($e, "getApiThrottleInterval");
|
|
@@ -4634,9 +4615,9 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4634
4615
|
S.some((z) => z > 0.05) && (w = S);
|
|
4635
4616
|
}
|
|
4636
4617
|
if (!w.length && o.isSpeaking && o.selfController && o.audioLevels && o.audioLevels.outputLevel > 0.05) {
|
|
4637
|
-
const
|
|
4638
|
-
if (
|
|
4639
|
-
Be =
|
|
4618
|
+
const $ = Date.now(), z = $e();
|
|
4619
|
+
if ($ - Be > z) {
|
|
4620
|
+
Be = $;
|
|
4640
4621
|
try {
|
|
4641
4622
|
const N = qe();
|
|
4642
4623
|
N.some((H) => H > 0.05) && (F = N, ve = 0);
|
|
@@ -4650,7 +4631,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4650
4631
|
}
|
|
4651
4632
|
n(Ve, "generateFrequencyBands");
|
|
4652
4633
|
function Ee(u, w) {
|
|
4653
|
-
const S = performance.now() * 1e-3,
|
|
4634
|
+
const S = performance.now() * 1e-3, $ = [...u];
|
|
4654
4635
|
for (let z = 0; z < u.length; z++) {
|
|
4655
4636
|
const j = z * (2 * Math.PI) / u.length;
|
|
4656
4637
|
let N = 0;
|
|
@@ -4665,9 +4646,9 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4665
4646
|
N = H + T;
|
|
4666
4647
|
}
|
|
4667
4648
|
const fe = Math.max(0.3, w);
|
|
4668
|
-
|
|
4649
|
+
$[z] = Math.max(0, Math.min(0.9, u[z] + N * fe));
|
|
4669
4650
|
}
|
|
4670
|
-
return
|
|
4651
|
+
return $;
|
|
4671
4652
|
}
|
|
4672
4653
|
n(Ee, "addWaveMotionOverlay");
|
|
4673
4654
|
function gt(u) {
|
|
@@ -4675,9 +4656,9 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4675
4656
|
if (u <= 0)
|
|
4676
4657
|
return w;
|
|
4677
4658
|
for (let S = 0; S < J.length; S++) {
|
|
4678
|
-
const
|
|
4659
|
+
const $ = J[S];
|
|
4679
4660
|
let z = 0;
|
|
4680
|
-
|
|
4661
|
+
$ >= 400 && $ <= 600 ? z = u * 0.9 : $ >= 1400 && $ <= 1600 ? z = u * 0.8 : $ >= 2400 && $ <= 2600 ? z = u * 0.7 : $ >= 200 && $ <= 2e3 ? z = u * 0.6 : $ >= 85 && $ <= 300 ? z = u * 0.4 : z = u * 0.2, z *= 0.8 + Math.random() * 0.4, w[S] = Math.max(0, Math.min(1, z));
|
|
4681
4662
|
}
|
|
4682
4663
|
return w;
|
|
4683
4664
|
}
|
|
@@ -4686,15 +4667,15 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4686
4667
|
if (typeof window > "u")
|
|
4687
4668
|
return;
|
|
4688
4669
|
const u = navigator.userAgent.toLowerCase(), w = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(u);
|
|
4689
|
-
|
|
4670
|
+
a.value = w;
|
|
4690
4671
|
}
|
|
4691
4672
|
n(Wt, "detectMobile");
|
|
4692
4673
|
function Ut(u, w) {
|
|
4693
|
-
return
|
|
4674
|
+
return m.has(u) || m.set(u, w()), m.get(u);
|
|
4694
4675
|
}
|
|
4695
4676
|
n(Ut, "getGradient");
|
|
4696
4677
|
function Zt() {
|
|
4697
|
-
|
|
4678
|
+
m.clear(), c = null;
|
|
4698
4679
|
}
|
|
4699
4680
|
n(Zt, "clearGradientCache");
|
|
4700
4681
|
function et() {
|
|
@@ -4702,21 +4683,21 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4702
4683
|
return;
|
|
4703
4684
|
Wt();
|
|
4704
4685
|
const u = r.value, w = u.width / G, S = u.height / G;
|
|
4705
|
-
function
|
|
4686
|
+
function $(z) {
|
|
4706
4687
|
if (!t)
|
|
4707
4688
|
return;
|
|
4708
|
-
if (!
|
|
4709
|
-
s = requestAnimationFrame(
|
|
4689
|
+
if (!i.value) {
|
|
4690
|
+
s = requestAnimationFrame($);
|
|
4710
4691
|
return;
|
|
4711
4692
|
}
|
|
4712
4693
|
t.clearRect(0, 0, w, S);
|
|
4713
4694
|
let j = 0;
|
|
4714
4695
|
o.audioLevels ? o.isListening ? j = Math.min(o.audioLevels.inputLevel * 1.5, 1) : o.isSpeaking && (j = Math.min(o.audioLevels.outputLevel * 1.8, 1)) : o.rms !== void 0 && (j = Math.min(o.rms / 70, 1));
|
|
4715
4696
|
const N = Ve(j);
|
|
4716
|
-
for (let p = 0; p <
|
|
4697
|
+
for (let p = 0; p < g; p++)
|
|
4717
4698
|
re[p] = Y + N[p] * (ee - Y);
|
|
4718
4699
|
const fe = 16.67;
|
|
4719
|
-
for (let p = 0; p <
|
|
4700
|
+
for (let p = 0; p < g; p++) {
|
|
4720
4701
|
const ae = J[p], X = He(ae), U = re[p] - te[p], oe = Me * X.stiffnessMultiplier, Le = we * X.dampingMultiplier, se = U * oe - k[p] * Le;
|
|
4721
4702
|
if (k[p] += se, te[p] += k[p], te[p] > ie[p])
|
|
4722
4703
|
ie[p] = te[p], de[p] = le, ue[p] = 0;
|
|
@@ -4725,7 +4706,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4725
4706
|
ue[p] += je, ie[p] = Math.max(Y, ie[p] + ue[p]);
|
|
4726
4707
|
}
|
|
4727
4708
|
}
|
|
4728
|
-
const H =
|
|
4709
|
+
const H = g * 0.15;
|
|
4729
4710
|
function T() {
|
|
4730
4711
|
t && (c || (c = t.createRadialGradient(
|
|
4731
4712
|
w * 0.5,
|
|
@@ -4736,19 +4717,19 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4736
4717
|
S * 0.9
|
|
4737
4718
|
), c.addColorStop(0, "rgba(255,255,255,0.02)"), c.addColorStop(1, "rgba(0,0,0,0.08)")), t.fillStyle = c, t.fillRect(0, 0, w, S));
|
|
4738
4719
|
}
|
|
4739
|
-
if (n(T, "drawBackground"), T(), (o.isListening || o.isSpeaking) && !
|
|
4720
|
+
if (n(T, "drawBackground"), T(), (o.isListening || o.isSpeaking) && !a.value) {
|
|
4740
4721
|
const p = performance.now() * 1e-3, ae = 0.1 + Math.sin(p * 2) * 0.05;
|
|
4741
4722
|
t.save(), t.globalCompositeOperation = "lighter", t.globalAlpha = ae;
|
|
4742
4723
|
const X = o.isSpeaking ? "rgba(34,197,94,0.4)" : "rgba(59,130,246,0.4)";
|
|
4743
4724
|
t.fillStyle = X;
|
|
4744
|
-
for (let U = 0; U <
|
|
4725
|
+
for (let U = 0; U < g; U++) {
|
|
4745
4726
|
const oe = U * (I + V), Le = te[U], se = S - Le;
|
|
4746
4727
|
t.beginPath(), t.roundRect(oe - 1, se - 1, I + 2, Le + 2, [2, 2, 0, 0]), t.fill();
|
|
4747
4728
|
}
|
|
4748
4729
|
t.restore();
|
|
4749
4730
|
}
|
|
4750
|
-
for (let p = 0; p <
|
|
4751
|
-
const ae = p * (I + V), X = te[p], U = S - X, oe = J[p], Le = Math.min(p,
|
|
4731
|
+
for (let p = 0; p < g; p++) {
|
|
4732
|
+
const ae = p * (I + V), X = te[p], U = S - X, oe = J[p], Le = Math.min(p, g - 1 - p), se = Math.min(1, Le / H), Re = Math.min(1, X / ee), je = (0.8 + Re * 0.2) * se, bt = (0.6 + Re * 0.2) * se, pt = (0.3 + Re * 0.1) * se, Kt = Math.round(Re * 10) / 10, Yt = Math.round(se * 10) / 10, Jt = `${o.isSpeaking ? "speaking" : o.isListening ? "listening" : "idle"}-${Kt}-${Yt}-${X}`, Qt = Ut(Jt, () => {
|
|
4752
4733
|
const _ = t.createLinearGradient(0, U, 0, U + X);
|
|
4753
4734
|
if (o.isSpeaking)
|
|
4754
4735
|
_.addColorStop(0, `rgba(34, 197, 94, ${je})`), _.addColorStop(0.5, `rgba(34, 197, 94, ${bt})`), _.addColorStop(1, `rgba(34, 197, 94, ${pt})`), (oe >= 400 && oe <= 600 || oe >= 1400 && oe <= 1600) && _.addColorStop(0, `rgba(74, 222, 128, ${Math.min(1, je + 0.2)})`);
|
|
@@ -4762,19 +4743,19 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4762
4743
|
});
|
|
4763
4744
|
if (t.fillStyle = Qt, t.beginPath(), t.roundRect(ae, U, I, X, [1, 1, 0, 0]), t.fill(), ie[p] > Y + 2) {
|
|
4764
4745
|
const _ = S - ie[p], We = de[p] > 0 ? 0.9 : Math.max(0.3, de[p] / le);
|
|
4765
|
-
t.fillStyle = `rgba(255, 255, 255, ${We})`, t.fillRect(ae, _ - 1, I, 2), We > 0.5 && !
|
|
4746
|
+
t.fillStyle = `rgba(255, 255, 255, ${We})`, t.fillRect(ae, _ - 1, I, 2), We > 0.5 && !a.value && (t.shadowColor = o.isSpeaking ? "rgba(34, 197, 94, 0.5)" : "rgba(59, 130, 246, 0.5)", t.shadowBlur = 3, t.fillRect(ae, _ - 1, I, 2), t.shadowBlur = 0);
|
|
4766
4747
|
}
|
|
4767
4748
|
}
|
|
4768
|
-
s = requestAnimationFrame(
|
|
4749
|
+
s = requestAnimationFrame($);
|
|
4769
4750
|
}
|
|
4770
|
-
n(
|
|
4751
|
+
n($, "animate"), s = requestAnimationFrame($);
|
|
4771
4752
|
}
|
|
4772
4753
|
n(et, "startAnimation"), Oe(() => {
|
|
4773
4754
|
if (r.value) {
|
|
4774
4755
|
if (t = r.value.getContext("2d"), ne(), typeof window < "u") {
|
|
4775
4756
|
window.addEventListener("resize", mt, { passive: !0 });
|
|
4776
4757
|
const u = /* @__PURE__ */ n(() => {
|
|
4777
|
-
|
|
4758
|
+
i.value = !document.hidden;
|
|
4778
4759
|
}, "handleVisibilityChange");
|
|
4779
4760
|
document.addEventListener("visibilitychange", u, { passive: !0 });
|
|
4780
4761
|
}
|
|
@@ -4793,7 +4774,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4793
4774
|
}
|
|
4794
4775
|
return n(mt, "onResize"), $t(() => {
|
|
4795
4776
|
s && cancelAnimationFrame(s), typeof window < "u" && (window.removeEventListener("resize", mt), document.removeEventListener("visibilitychange", () => {
|
|
4796
|
-
|
|
4777
|
+
i.value = !document.hidden;
|
|
4797
4778
|
})), he();
|
|
4798
4779
|
}), ye(
|
|
4799
4780
|
[() => o.isActive, () => o.isConnected, () => o.isListening, () => o.isSpeaking, () => o.rms],
|
|
@@ -4803,46 +4784,46 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4803
4784
|
{ immediate: !0 }
|
|
4804
4785
|
), ye(
|
|
4805
4786
|
[() => o.enableRealAudio, () => o.isListening],
|
|
4806
|
-
async ([u, w], [S,
|
|
4807
|
-
u && w && (!S ||
|
|
4787
|
+
async ([u, w], [S, $]) => {
|
|
4788
|
+
u && w && (!S || !$) && (C.value || await Ae().catch(console.error)), (!u || !w) && S && $ && he();
|
|
4808
4789
|
},
|
|
4809
4790
|
{ immediate: !1 }
|
|
4810
4791
|
), ye(r, (u) => {
|
|
4811
4792
|
u && !t && (t = u.getContext("2d"), ne(), et());
|
|
4812
|
-
}), (u, w) => (b(), v("div",
|
|
4793
|
+
}), (u, w) => (b(), v("div", Zo, [
|
|
4813
4794
|
l("canvas", {
|
|
4814
4795
|
ref_key: "canvasRef",
|
|
4815
4796
|
ref: r,
|
|
4816
|
-
width: (Z(I) + Z(V)) * Z(
|
|
4797
|
+
width: (Z(I) + Z(V)) * Z(g) - Z(V),
|
|
4817
4798
|
height: Z(ee),
|
|
4818
4799
|
class: "w-full max-w-full [image-rendering:-webkit-optimize-contrast]",
|
|
4819
4800
|
style: dt({ height: `${Z(ee)}px` })
|
|
4820
|
-
}, null, 12,
|
|
4801
|
+
}, null, 12, Ko)
|
|
4821
4802
|
]));
|
|
4822
4803
|
}
|
|
4823
|
-
}),
|
|
4804
|
+
}), Jo = { class: "flex flex-col h-full items-center justify-center px-6 py-8" }, Qo = { class: "flex-1 flex flex-col items-center justify-center space-y-8 py-4" }, Xo = { class: "h-32 w-full max-w-md" }, _o = { class: "text-center flex gap-2 items-center text-xs" }, en = { class: "flex items-center justify-center gap-2" }, tn = {
|
|
4824
4805
|
key: 0,
|
|
4825
4806
|
class: "size-2 bg-blue-500 rounded-full animate-pulse"
|
|
4826
|
-
},
|
|
4807
|
+
}, rn = {
|
|
4827
4808
|
key: 1,
|
|
4828
4809
|
class: "size-2 bg-green-500 rounded-full animate-pulse"
|
|
4829
|
-
},
|
|
4810
|
+
}, on = {
|
|
4830
4811
|
key: 2,
|
|
4831
4812
|
class: "size-2 bg-white/50 rounded-full"
|
|
4832
|
-
},
|
|
4813
|
+
}, nn = {
|
|
4833
4814
|
key: 3,
|
|
4834
4815
|
class: "size-2 bg-red-500 rounded-full"
|
|
4835
|
-
},
|
|
4816
|
+
}, sn = { class: "text-white/70 text-sm max-w-xs leading-relaxed" }, an = { class: "flex flex-col items-center space-y-6" }, ln = /* @__PURE__ */ K({
|
|
4836
4817
|
__name: "ElSelfVoice",
|
|
4837
4818
|
props: {
|
|
4838
4819
|
selfController: {}
|
|
4839
4820
|
},
|
|
4840
4821
|
setup(e) {
|
|
4841
|
-
const o = L(() => e.selfController?.voiceState.value), r = L(() => o.value?.isConnected ? "red" : "green"), t = L(() => o.value?.isConnected ? "i-heroicons-phone-x-mark" : "i-heroicons-phone"), s = L(() => o.value?.isConnected ? "End Call" : "Start a Call"),
|
|
4822
|
+
const o = L(() => e.selfController?.voiceState.value), r = L(() => o.value?.isConnected ? "red" : "green"), t = L(() => o.value?.isConnected ? "i-heroicons-phone-x-mark" : "i-heroicons-phone"), s = L(() => o.value?.isConnected ? "End Call" : "Start a Call"), a = L(() => {
|
|
4842
4823
|
const c = e.selfController?.voiceState.value;
|
|
4843
4824
|
return !!c?.error || c?.connectionStatus === "connecting";
|
|
4844
|
-
}),
|
|
4845
|
-
async function
|
|
4825
|
+
}), i = L(() => o.value?.connectionStatus === "connecting");
|
|
4826
|
+
async function m() {
|
|
4846
4827
|
if (e.selfController)
|
|
4847
4828
|
try {
|
|
4848
4829
|
e.selfController.voiceState.value.isConnected ? await e.selfController.endConversation() : (e.selfController.isConnected() && await e.selfController.endConversation(), await e.selfController.startVoiceConversation(), e.selfController.agentMode.value = "talk");
|
|
@@ -4850,10 +4831,10 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4850
4831
|
console.error("Error toggling call:", c);
|
|
4851
4832
|
}
|
|
4852
4833
|
}
|
|
4853
|
-
return n(
|
|
4854
|
-
l("div",
|
|
4855
|
-
l("div",
|
|
4856
|
-
Q(
|
|
4834
|
+
return n(m, "toggleCall"), (c, A) => (b(), v("div", Jo, [
|
|
4835
|
+
l("div", Qo, [
|
|
4836
|
+
l("div", Xo, [
|
|
4837
|
+
Q(Yo, {
|
|
4857
4838
|
"audio-levels": e.selfController?.audioLevels.value ?? { inputLevel: 0, outputLevel: 0 },
|
|
4858
4839
|
"is-listening": e.selfController?.voiceState.value.isListening ?? !1,
|
|
4859
4840
|
"is-speaking": e.selfController?.voiceState.value.isSpeaking ?? !1,
|
|
@@ -4864,21 +4845,21 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4864
4845
|
"self-controller": e.selfController
|
|
4865
4846
|
}, null, 8, ["audio-levels", "is-listening", "is-speaking", "is-connected", "self-controller"])
|
|
4866
4847
|
]),
|
|
4867
|
-
l("div",
|
|
4868
|
-
l("div",
|
|
4869
|
-
e.selfController?.voiceState.value.isListening ? (b(), v("div",
|
|
4848
|
+
l("div", _o, [
|
|
4849
|
+
l("div", en, [
|
|
4850
|
+
e.selfController?.voiceState.value.isListening ? (b(), v("div", tn)) : e.selfController?.voiceState.value.isSpeaking ? (b(), v("div", rn)) : e.selfController?.voiceState.value.isConnected && !e.selfController?.voiceState.value.isListening && !e.selfController?.voiceState.value.isSpeaking ? (b(), v("div", on)) : e.selfController?.voiceState.value.error ? (b(), v("div", nn)) : P("", !0)
|
|
4870
4851
|
]),
|
|
4871
|
-
l("p",
|
|
4852
|
+
l("p", sn, W(e.selfController?.voiceState.value.error ? `Error: ${e.selfController.voiceState.value.error}` : e.selfController?.voiceState.value.transcript || "Ready to start a call..."), 1)
|
|
4872
4853
|
])
|
|
4873
4854
|
]),
|
|
4874
|
-
l("div",
|
|
4855
|
+
l("div", an, [
|
|
4875
4856
|
Q(Ht, {
|
|
4876
4857
|
theme: r.value,
|
|
4877
4858
|
icon: t.value,
|
|
4878
4859
|
size: "lg",
|
|
4879
|
-
loading:
|
|
4880
|
-
disabled:
|
|
4881
|
-
onClick:
|
|
4860
|
+
loading: i.value,
|
|
4861
|
+
disabled: a.value,
|
|
4862
|
+
onClick: m
|
|
4882
4863
|
}, {
|
|
4883
4864
|
default: ke(() => [
|
|
4884
4865
|
Xe(W(s.value), 1)
|
|
@@ -4888,28 +4869,28 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4888
4869
|
])
|
|
4889
4870
|
]));
|
|
4890
4871
|
}
|
|
4891
|
-
}),
|
|
4872
|
+
}), cn = {
|
|
4892
4873
|
key: 0,
|
|
4893
4874
|
class: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-theme-800 to-theme-950 rounded-3xl z-10"
|
|
4894
|
-
},
|
|
4875
|
+
}, dn = { class: "text-sm" }, un = {
|
|
4895
4876
|
key: 0,
|
|
4896
4877
|
class: "flex-1 basis-0 flex justify-end"
|
|
4897
|
-
},
|
|
4878
|
+
}, hn = {
|
|
4898
4879
|
key: 0,
|
|
4899
|
-
class: "
|
|
4900
|
-
},
|
|
4880
|
+
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"
|
|
4881
|
+
}, fn = { class: "flex-1 basis-0 flex flex-col justify-start pt-6" }, gn = {
|
|
4901
4882
|
key: 1,
|
|
4902
4883
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full"
|
|
4903
|
-
},
|
|
4884
|
+
}, mn = { class: "px-4 pt-4 pb-4 max-w-md mx-auto" }, bn = {
|
|
4904
4885
|
key: 2,
|
|
4905
4886
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full px-4 @[480px]/agent:px-6"
|
|
4906
|
-
},
|
|
4887
|
+
}, pn = { class: "flex-1 min-h-0 max-w-md mx-auto w-full" }, vn = {
|
|
4907
4888
|
key: 2,
|
|
4908
4889
|
class: "bg-gradient-to-br from-theme-800 to-theme-950 text-white flex items-center justify-center h-full p-8"
|
|
4909
|
-
},
|
|
4890
|
+
}, xn = { class: "text-center max-w-md space-y-4" }, yn = { class: "text-sm text-white/70 leading-relaxed" }, kn = {
|
|
4910
4891
|
key: 3,
|
|
4911
4892
|
class: "bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"
|
|
4912
|
-
},
|
|
4893
|
+
}, wn = /* @__PURE__ */ K({
|
|
4913
4894
|
__name: "SelfAgent",
|
|
4914
4895
|
props: {
|
|
4915
4896
|
sdk: {},
|
|
@@ -4923,7 +4904,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4923
4904
|
},
|
|
4924
4905
|
emits: ["close", "error"],
|
|
4925
4906
|
setup(e, { emit: o }) {
|
|
4926
|
-
const r = o, t =
|
|
4907
|
+
const r = o, t = sr(), s = B(!1), a = B(!1), i = B(), m = B(), c = L(() => t.value?.agentMode?.value ?? "self"), A = L(() => Lt.find((g) => g.mode === c.value));
|
|
4927
4908
|
function d() {
|
|
4928
4909
|
t.value && t.value.destroy();
|
|
4929
4910
|
try {
|
|
@@ -4939,121 +4920,120 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
4939
4920
|
}
|
|
4940
4921
|
n(d, "createSelfController");
|
|
4941
4922
|
function C(x) {
|
|
4942
|
-
if (!
|
|
4923
|
+
if (!m.value)
|
|
4943
4924
|
return;
|
|
4944
|
-
const
|
|
4945
|
-
Object.entries(
|
|
4946
|
-
|
|
4925
|
+
const g = fr(x);
|
|
4926
|
+
Object.entries(g).forEach(([I, V]) => {
|
|
4927
|
+
m.value.style.setProperty(`--primary-${I}`, V);
|
|
4947
4928
|
});
|
|
4948
4929
|
}
|
|
4949
4930
|
return n(C, "applyTheme"), Oe(() => {
|
|
4950
4931
|
try {
|
|
4951
4932
|
d(), C(e.theme);
|
|
4952
4933
|
} catch (x) {
|
|
4953
|
-
const
|
|
4954
|
-
|
|
4934
|
+
const g = x instanceof Error ? x.message : "Failed to initialize digital self";
|
|
4935
|
+
i.value = g, r("error", g);
|
|
4955
4936
|
}
|
|
4956
4937
|
}), $t(() => {
|
|
4957
4938
|
t.value && t.value.destroy();
|
|
4958
4939
|
}), ye(() => e.theme, (x) => {
|
|
4959
4940
|
C(x);
|
|
4960
|
-
}), (x,
|
|
4941
|
+
}), (x, g) => (b(), v("div", {
|
|
4961
4942
|
ref_key: "rootElement",
|
|
4962
|
-
ref:
|
|
4943
|
+
ref: m,
|
|
4963
4944
|
key: Z(nt)(e.self),
|
|
4964
|
-
class: "@container/agent self-agent w-full h-full
|
|
4945
|
+
class: "@container/agent self-agent w-full h-full overflow-hidden relative",
|
|
4965
4946
|
"data-test": "self-agent"
|
|
4966
4947
|
}, [
|
|
4967
|
-
e.loading ? (b(), v("div",
|
|
4948
|
+
e.loading ? (b(), v("div", cn, [
|
|
4968
4949
|
Q(Tt, { class: "text-white size-8" })
|
|
4969
|
-
])) : e.self && !
|
|
4950
|
+
])) : e.self && !i.value ? (b(), v("div", {
|
|
4970
4951
|
key: 1,
|
|
4971
4952
|
class: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
4972
4953
|
style: dt({ backgroundImage: `url(${Z(nt)(e.self) || Z(_e)()})` })
|
|
4973
4954
|
}, [
|
|
4974
4955
|
l("div", {
|
|
4975
|
-
class:
|
|
4956
|
+
class: E(["absolute inset-0 bg-gradient-to-br z-0", c.value === "self" ? "from-black/70 via-black/50 to-black/80" : "from-black/90 via-black/90 to-black/100"])
|
|
4976
4957
|
}, null, 2),
|
|
4977
4958
|
l("div", {
|
|
4978
|
-
class:
|
|
4959
|
+
class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", e.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"])
|
|
4979
4960
|
}, [
|
|
4980
4961
|
l("div", {
|
|
4981
|
-
class:
|
|
4962
|
+
class: E(["relative z-30 p-2", c.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
4982
4963
|
}, [
|
|
4983
4964
|
l("div", {
|
|
4984
|
-
class:
|
|
4965
|
+
class: E(["flex items-center", e.hasClose ? "" : "justify-between"])
|
|
4985
4966
|
}, [
|
|
4986
4967
|
l("div", {
|
|
4987
|
-
class:
|
|
4968
|
+
class: E(e.hasClose ? "flex-1 basis-0" : "")
|
|
4988
4969
|
}, [
|
|
4989
4970
|
l("button", {
|
|
4990
4971
|
class: "cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
4991
|
-
onClick:
|
|
4992
|
-
}, [...
|
|
4972
|
+
onClick: g[0] || (g[0] = (I) => s.value = !0)
|
|
4973
|
+
}, [...g[6] || (g[6] = [
|
|
4993
4974
|
l("i", { class: "i-tabler-menu size-7" }, null, -1)
|
|
4994
4975
|
])])
|
|
4995
4976
|
], 2),
|
|
4996
4977
|
l("button", {
|
|
4997
|
-
class:
|
|
4998
|
-
onClick:
|
|
4978
|
+
class: E(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": a.value }]),
|
|
4979
|
+
onClick: g[1] || (g[1] = (I) => a.value = !0)
|
|
4999
4980
|
}, [
|
|
5000
4981
|
l("i", {
|
|
5001
|
-
class:
|
|
4982
|
+
class: E([A.value?.icon, "size-4 opacity-60"])
|
|
5002
4983
|
}, null, 2),
|
|
5003
|
-
l("span",
|
|
5004
|
-
|
|
4984
|
+
l("span", dn, W(A.value?.label), 1),
|
|
4985
|
+
g[7] || (g[7] = l("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
5005
4986
|
], 2),
|
|
5006
|
-
e.hasClose ? (b(), v("div",
|
|
4987
|
+
e.hasClose ? (b(), v("div", un, [
|
|
5007
4988
|
l("button", {
|
|
5008
4989
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
5009
|
-
onClick:
|
|
5010
|
-
}, [...
|
|
4990
|
+
onClick: g[2] || (g[2] = It((I) => r("close", "button"), ["stop"]))
|
|
4991
|
+
}, [...g[8] || (g[8] = [
|
|
5011
4992
|
l("i", { class: "size-6 i-tabler-x" }, null, -1)
|
|
5012
4993
|
])])
|
|
5013
4994
|
])) : P("", !0)
|
|
5014
4995
|
], 2)
|
|
5015
4996
|
], 2),
|
|
5016
|
-
c.value === "self" ? (b(), v("div",
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
])
|
|
4997
|
+
c.value === "self" ? (b(), v("div", hn, [
|
|
4998
|
+
g[9] || (g[9] = l("div", { class: "flex-1 basis-0 mb-36" }, null, -1)),
|
|
4999
|
+
Q(Fo, { self: e.self }, null, 8, ["self"]),
|
|
5000
|
+
l("div", fn, [
|
|
5001
|
+
Q(Ht, {
|
|
5002
|
+
theme: "primary",
|
|
5003
|
+
size: "lg",
|
|
5004
|
+
class: "w-full",
|
|
5005
|
+
icon: "i-heroicons-phone",
|
|
5006
|
+
"data-test": "voice-button",
|
|
5007
|
+
onClick: g[3] || (g[3] = (I) => t.value?.setMode("talk"))
|
|
5008
|
+
}, {
|
|
5009
|
+
default: ke(() => [
|
|
5010
|
+
Xe(" Talk to " + W(e.self.name), 1)
|
|
5011
|
+
]),
|
|
5012
|
+
_: 1
|
|
5013
|
+
})
|
|
5034
5014
|
])
|
|
5035
|
-
])) : c.value === "talk" ? (b(), v("div",
|
|
5015
|
+
])) : c.value === "talk" ? (b(), v("div", gn, [
|
|
5036
5016
|
l("div", null, [
|
|
5037
|
-
l("div",
|
|
5038
|
-
Q(
|
|
5017
|
+
l("div", mn, [
|
|
5018
|
+
Q(xr, { self: e.self }, null, 8, ["self"])
|
|
5039
5019
|
])
|
|
5040
5020
|
]),
|
|
5041
|
-
Q(
|
|
5042
|
-
])) : (b(), v("div",
|
|
5043
|
-
l("div",
|
|
5044
|
-
c.value === "chat" ? (b(), Se(
|
|
5021
|
+
Q(ln, { "self-controller": t.value }, null, 8, ["self-controller"])
|
|
5022
|
+
])) : (b(), v("div", bn, [
|
|
5023
|
+
l("div", pn, [
|
|
5024
|
+
c.value === "chat" ? (b(), Se(Ao, {
|
|
5045
5025
|
key: 0,
|
|
5046
5026
|
"self-controller": t.value,
|
|
5047
5027
|
self: e.self
|
|
5048
|
-
}, null, 8, ["self-controller", "self"])) : c.value === "info" ? (b(), Se(
|
|
5028
|
+
}, null, 8, ["self-controller", "self"])) : c.value === "info" ? (b(), Se(fo, {
|
|
5049
5029
|
key: 1,
|
|
5050
5030
|
self: e.self
|
|
5051
5031
|
}, null, 8, ["self"])) : P("", !0)
|
|
5052
5032
|
])
|
|
5053
5033
|
])),
|
|
5054
5034
|
l("div", {
|
|
5055
|
-
class:
|
|
5056
|
-
}, [...
|
|
5035
|
+
class: E(["relative z-20 text-center py-5 px-6", c.value === "info" ? "hidden" : ""])
|
|
5036
|
+
}, [...g[10] || (g[10] = [
|
|
5057
5037
|
l("a", {
|
|
5058
5038
|
href: "https://www.fiction.com",
|
|
5059
5039
|
class: "flex items-center justify-center gap-1.5 text-[10px] font-sans font-normal text-white/50 hover:text-white/70 transition-colors"
|
|
@@ -5064,38 +5044,38 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
5064
5044
|
], -1)
|
|
5065
5045
|
])], 2)
|
|
5066
5046
|
], 2)
|
|
5067
|
-
], 4)) :
|
|
5068
|
-
l("div",
|
|
5069
|
-
|
|
5047
|
+
], 4)) : i.value ? (b(), v("div", vn, [
|
|
5048
|
+
l("div", xn, [
|
|
5049
|
+
g[11] || (g[11] = l("div", { class: "flex justify-center" }, [
|
|
5070
5050
|
l("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [
|
|
5071
5051
|
l("i", { class: "i-tabler-alert-circle size-6 text-red-400" })
|
|
5072
5052
|
])
|
|
5073
5053
|
], -1)),
|
|
5074
|
-
|
|
5075
|
-
l("p",
|
|
5054
|
+
g[12] || (g[12] = l("h3", { class: "text-lg font-medium" }, " Self Error ", -1)),
|
|
5055
|
+
l("p", yn, W(i.value), 1)
|
|
5076
5056
|
])
|
|
5077
|
-
])) : (b(), v("div",
|
|
5078
|
-
Q(
|
|
5057
|
+
])) : (b(), v("div", kn, " There was an error loading the digital self. Please try again later. ")),
|
|
5058
|
+
Q(Uo, {
|
|
5079
5059
|
modelValue: s.value,
|
|
5080
|
-
"onUpdate:modelValue":
|
|
5060
|
+
"onUpdate:modelValue": g[4] || (g[4] = (I) => s.value = I),
|
|
5081
5061
|
self: e.self,
|
|
5082
5062
|
sdk: e.sdk,
|
|
5083
5063
|
title: e.self.name
|
|
5084
5064
|
}, null, 8, ["modelValue", "self", "sdk", "title"]),
|
|
5085
|
-
Q(
|
|
5086
|
-
modelValue:
|
|
5087
|
-
"onUpdate:modelValue":
|
|
5065
|
+
Q(Wo, {
|
|
5066
|
+
modelValue: a.value,
|
|
5067
|
+
"onUpdate:modelValue": g[5] || (g[5] = (I) => a.value = I),
|
|
5088
5068
|
"self-controller": t.value
|
|
5089
5069
|
}, null, 8, ["modelValue", "self-controller"])
|
|
5090
5070
|
]));
|
|
5091
5071
|
}
|
|
5092
|
-
}),
|
|
5072
|
+
}), Cn = { class: "self-wrap" }, Sn = {
|
|
5093
5073
|
key: 0,
|
|
5094
5074
|
class: "flex items-center justify-center h-full"
|
|
5095
|
-
},
|
|
5075
|
+
}, Mn = {
|
|
5096
5076
|
key: 2,
|
|
5097
5077
|
class: "flex items-center justify-center h-full text-theme-500 text-xs"
|
|
5098
|
-
},
|
|
5078
|
+
}, An = { class: "flex flex-col items-center gap-2" }, zn = /* @__PURE__ */ K({
|
|
5099
5079
|
__name: "SelfWrap",
|
|
5100
5080
|
props: {
|
|
5101
5081
|
sdk: {},
|
|
@@ -5118,25 +5098,25 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
5118
5098
|
}
|
|
5119
5099
|
try {
|
|
5120
5100
|
r.value = !0;
|
|
5121
|
-
const
|
|
5122
|
-
|
|
5123
|
-
} catch (
|
|
5124
|
-
s.value =
|
|
5101
|
+
const a = await o.sdk.getPublicSelf({ handle: o.handle });
|
|
5102
|
+
a ? t.value = a : (s.value = o.sdk.error.value || "Self not found", console.error("Failed to fetch digital self:", o.sdk.error.value));
|
|
5103
|
+
} catch (a) {
|
|
5104
|
+
s.value = a instanceof Error ? a.message : "Failed to fetch self", console.error("Error fetching digital self:", a);
|
|
5125
5105
|
} finally {
|
|
5126
5106
|
r.value = !1;
|
|
5127
5107
|
}
|
|
5128
|
-
}), (
|
|
5129
|
-
r.value ? (b(), v("div",
|
|
5108
|
+
}), (a, i) => (b(), v("div", Cn, [
|
|
5109
|
+
r.value ? (b(), v("div", Sn, [...i[0] || (i[0] = [
|
|
5130
5110
|
l("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
|
|
5131
|
-
])])) : t.value ? Ge(
|
|
5111
|
+
])])) : t.value ? Ge(a.$slots, "default", {
|
|
5132
5112
|
key: 1,
|
|
5133
5113
|
self: t.value,
|
|
5134
5114
|
context: e.context,
|
|
5135
5115
|
firstMessage: e.firstMessage,
|
|
5136
5116
|
loading: r.value
|
|
5137
|
-
}) : s.value ? (b(), v("div",
|
|
5138
|
-
l("div",
|
|
5139
|
-
|
|
5117
|
+
}) : s.value ? (b(), v("div", Mn, [
|
|
5118
|
+
l("div", An, [
|
|
5119
|
+
i[1] || (i[1] = l("div", null, [
|
|
5140
5120
|
l("div", { class: "i-tabler-user-off size-8" })
|
|
5141
5121
|
], -1)),
|
|
5142
5122
|
l("div", null, W(s.value), 1)
|
|
@@ -5144,7 +5124,7 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
5144
5124
|
])) : P("", !0)
|
|
5145
5125
|
]));
|
|
5146
5126
|
}
|
|
5147
|
-
}),
|
|
5127
|
+
}), Fn = /* @__PURE__ */ K({
|
|
5148
5128
|
__name: "SelfProvider",
|
|
5149
5129
|
props: {
|
|
5150
5130
|
sdk: {},
|
|
@@ -5156,9 +5136,9 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
5156
5136
|
},
|
|
5157
5137
|
setup(e) {
|
|
5158
5138
|
const o = e;
|
|
5159
|
-
return (r, t) => (b(), Se(
|
|
5139
|
+
return (r, t) => (b(), Se(zn, yt(o, { class: "self-provider size-full relative" }), {
|
|
5160
5140
|
default: ke((s) => [
|
|
5161
|
-
Q(
|
|
5141
|
+
Q(wn, yt(o, {
|
|
5162
5142
|
self: s.self,
|
|
5163
5143
|
"is-active": !0,
|
|
5164
5144
|
class: "size-full"
|
|
@@ -5170,20 +5150,20 @@ const q = /* @__PURE__ */ n((e) => {
|
|
|
5170
5150
|
});
|
|
5171
5151
|
export {
|
|
5172
5152
|
Lt as AGENT_MODES,
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5153
|
+
ar as AUDIO_FFT_SIZE,
|
|
5154
|
+
cr as AUDIO_LEVEL_UPDATE_INTERVAL,
|
|
5155
|
+
lr as AUDIO_SMOOTHING,
|
|
5176
5156
|
ot as ClientAudio,
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5157
|
+
wn as SelfAgent,
|
|
5158
|
+
Fn as SelfProvider,
|
|
5159
|
+
zn as SelfWrap,
|
|
5160
|
+
dr as VISUALIZER_CONFIG,
|
|
5181
5161
|
J as VOICE_FREQUENCIES,
|
|
5182
|
-
|
|
5162
|
+
Pn as generateFirstMessage,
|
|
5183
5163
|
_e as getFallbackAvatarDataUrl,
|
|
5184
5164
|
Ct as getImageSrc,
|
|
5185
5165
|
nt as getSelfAvatarUrl,
|
|
5186
5166
|
Qe as handleImageError,
|
|
5187
|
-
|
|
5167
|
+
gr as parseVoiceMessage
|
|
5188
5168
|
};
|
|
5189
5169
|
//# sourceMappingURL=self.js.map
|