@genpact/genome.mfe.mgtwin-app 1.1.435-alpha → 1.1.437-alpha
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/AMABot-5122a8a4.mjs +556 -0
- package/dist/{AssessmentSimulation-8f13ed5a.mjs → AssessmentSimulation-3a3d6326.mjs} +6 -6
- package/dist/{EditSkillAdminData-47fd9ace.mjs → EditSkillAdminData-dd02feef.mjs} +2 -2
- package/dist/{EditSkillData-ab0285da.mjs → EditSkillData-df698a98.mjs} +2 -2
- package/dist/{HomeView-3374faca.mjs → HomeView-c737fadc.mjs} +4 -4
- package/dist/{Loading-fc0617d6.mjs → Loading-e86cad15.mjs} +1 -1
- package/dist/{PaperAirplaneIcon-1f1b9420.mjs → PaperAirplaneIcon-e6c2fbdc.mjs} +1 -1
- package/dist/{PromptTesting-28188d3b.mjs → PromptTesting-00ea95b1.mjs} +3 -3
- package/dist/{SkillAutomation-a15cf890.mjs → SkillAutomation-60b45b69.mjs} +3 -3
- package/dist/{SkillData-b7051cad.mjs → SkillData-a2f18d52.mjs} +3 -3
- package/dist/{Testcase-5ec19354.mjs → Testcase-f783f09f.mjs} +3 -3
- package/dist/{UnderMaintenance-1e84605a.mjs → UnderMaintenance-c31d6924.mjs} +1 -1
- package/dist/{VoiceTestcase-cd70c11a.mjs → VoiceTestcase-be081d3d.mjs} +3 -3
- package/dist/{XMarkIcon-8941ff00.mjs → XMarkIcon-bca592a2.mjs} +1 -1
- package/dist/{api-bcd81c0c.mjs → api-c67299fe.mjs} +1 -1
- package/dist/{index.es-7df55209.mjs → index.es-2157eb81.mjs} +6 -6
- package/dist/{main-25dbe608.mjs → main-5483437d.mjs} +749 -749
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +50 -50
- package/dist/native/aiguru-native.css +1 -1
- package/dist/native/aiguru-native.umd.min.js +39 -39
- package/dist/{simulationPopup.vue_vue_type_script_setup_true_lang-1deaa932.mjs → simulationPopup.vue_vue_type_script_setup_true_lang-3f6e3d9c.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{voiceServices-8dcba4f0.mjs → voiceServices-d58ee911.mjs} +2 -2
- package/package.json +1 -1
- package/dist/AMABot-60401cff.mjs +0 -525
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import { r as X, _ as Z, a as ee, b as te, d as se, c as oe, L as ne } from "./simulationPopup.vue_vue_type_script_setup_true_lang-3f6e3d9c.mjs";
|
|
2
|
+
import { _ as ae, Q as N } from "./constants-e0c83ac4.mjs";
|
|
3
|
+
import { o as c, c as f, a as t, d as A, z as C, r as b, G as re, I as ie, b as _, B as M, p as L, g as E, t as I, h as v, s as j, T as U, u as B, H as T, C as le, F as de, e as ce, f as k, i as P, N as H, J as D, k as G, E as W, q as ue, w as pe, m as _e, P as me, n as he, R as K, x as O, U as fe, l as R } from "./main-5483437d.mjs";
|
|
4
|
+
import { _ as $ } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { u as Y, i as J } from "./api-c67299fe.mjs";
|
|
6
|
+
import "./loadernew-ac153a51.mjs";
|
|
7
|
+
function ge(o, e) {
|
|
8
|
+
return c(), f("svg", {
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "none",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
"stroke-width": "1.5",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}, [
|
|
16
|
+
t("path", {
|
|
17
|
+
"stroke-linecap": "round",
|
|
18
|
+
"stroke-linejoin": "round",
|
|
19
|
+
d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
|
|
20
|
+
})
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
function xe(o, e) {
|
|
24
|
+
return c(), f("svg", {
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
fill: "none",
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
"stroke-width": "1.5",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
"aria-hidden": "true"
|
|
31
|
+
}, [
|
|
32
|
+
t("path", {
|
|
33
|
+
"stroke-linecap": "round",
|
|
34
|
+
"stroke-linejoin": "round",
|
|
35
|
+
d: "M12 4.5v15m7.5-7.5h-15"
|
|
36
|
+
})
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
const ve = { class: "flex h-14 w-full flex-1 items-center justify-between bg-black md:pr-6 lg:pr-6" }, be = ["href"], we = /* @__PURE__ */ t("img", {
|
|
40
|
+
class: "h-16 w-auto cursor-pointer",
|
|
41
|
+
src: Z,
|
|
42
|
+
alt: "Genome Logo"
|
|
43
|
+
}, null, -1), ye = [
|
|
44
|
+
we
|
|
45
|
+
], Ae = ["href"], ke = /* @__PURE__ */ t("img", {
|
|
46
|
+
class: "h-6 w-28 cursor-pointer md:w-36",
|
|
47
|
+
src: ae,
|
|
48
|
+
alt: "Aiguru Logo"
|
|
49
|
+
}, null, -1), $e = [
|
|
50
|
+
ke
|
|
51
|
+
], Fe = /* @__PURE__ */ A({
|
|
52
|
+
__name: "headerAMA",
|
|
53
|
+
setup(o) {
|
|
54
|
+
const e = C(), r = b(""), l = b(""), u = X(re(ie, void 0), window.location);
|
|
55
|
+
return u === "prod" ? r.value = "https://genome.genpact.com" : r.value = "https://genome-dev.genpact.com", u === "prod" ? l.value = "https://genome.genpact.com/#aiguru" : l.value = "https://genome-dev.genpact.com/#aiguru", (d, a) => (c(), f("nav", ve, [
|
|
56
|
+
t("a", {
|
|
57
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
58
|
+
href: _(e).url(r.value),
|
|
59
|
+
target: "_blank"
|
|
60
|
+
}, ye, 8, be),
|
|
61
|
+
t("a", {
|
|
62
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
63
|
+
href: _(e).url(l.value),
|
|
64
|
+
target: "_blank"
|
|
65
|
+
}, $e, 8, Ae)
|
|
66
|
+
]));
|
|
67
|
+
}
|
|
68
|
+
}), qe = (o) => (L("data-v-c2a7fb37"), o = o(), E(), o), Me = { class: "fontFormattingAMA flex justify-start py-2" }, Ce = { class: "w-full max-w-[92%]" }, Ie = { class: "line-break rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-5 py-4 text-sm leading-6 md:px-6 md:py-5 text-[#3f4451]" }, Se = ["innerHTML"], Le = /* @__PURE__ */ qe(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ee = /* @__PURE__ */ A({
|
|
69
|
+
__name: "responseAMA",
|
|
70
|
+
props: {
|
|
71
|
+
answer: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: !0
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
setup(o) {
|
|
77
|
+
const e = o, r = C(), l = (a) => a.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*/g, ""), u = (a) => {
|
|
78
|
+
const s = [];
|
|
79
|
+
let p = [];
|
|
80
|
+
const n = () => {
|
|
81
|
+
p.length && (s.push({ html: `<ul style="list-style: disc; margin: 0 0 0 2.5rem; padding: 0;">${p.join("")}</ul>`, block: !0 }), p = []);
|
|
82
|
+
};
|
|
83
|
+
for (const i of a.split(`
|
|
84
|
+
`)) {
|
|
85
|
+
if (!i.trim()) {
|
|
86
|
+
n();
|
|
87
|
+
const m = s[s.length - 1];
|
|
88
|
+
m && !m.block && m.html !== "" && s.push({ html: "", block: !1 });
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
const x = i.match(/^\s*[-*•]\s+(.*)$/);
|
|
92
|
+
if (x) {
|
|
93
|
+
p.push(`<li>${l(x[1])}</li>`);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
n();
|
|
97
|
+
const h = i.match(/^\s*#{1,6}\s*(.*)$/);
|
|
98
|
+
h ? s.push({ html: `<div style="font-weight: 700;">${l(h[1])}</div>`, block: !0 }) : s.push({ html: l(i), block: !1 });
|
|
99
|
+
}
|
|
100
|
+
n();
|
|
101
|
+
for (let i = s.length - 2; i >= 0; i--)
|
|
102
|
+
s[i].html === "" && !s[i].block && s[i + 1].block && s.splice(i, 1);
|
|
103
|
+
for (; s.length && s[s.length - 1].html === ""; )
|
|
104
|
+
s.pop();
|
|
105
|
+
return s.reduce((i, x, h) => h === 0 ? x.html : i + (x.block || s[h - 1].block ? "" : `
|
|
106
|
+
`) + x.html, "");
|
|
107
|
+
}, d = M(() => {
|
|
108
|
+
const a = u(e.answer).replace(
|
|
109
|
+
/Assessment Rating & Feedback/g,
|
|
110
|
+
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
111
|
+
), s = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, p = a.replace(s, (n, i, x) => `<a href="${r.url(x)}" target="_blank" rel="noopener noreferrer" style="color: #00AECF; text-decoration: underline;">${i}</a>`);
|
|
112
|
+
return r.html(p);
|
|
113
|
+
});
|
|
114
|
+
return (a, s) => (c(), f("div", Me, [
|
|
115
|
+
t("div", Ce, [
|
|
116
|
+
t("div", Ie, [
|
|
117
|
+
t("span", {
|
|
118
|
+
class: "fontFormattingAMA answer-link",
|
|
119
|
+
innerHTML: d.value
|
|
120
|
+
}, null, 8, Se)
|
|
121
|
+
]),
|
|
122
|
+
Le
|
|
123
|
+
])
|
|
124
|
+
]));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const Be = /* @__PURE__ */ $(Ee, [["__scopeId", "data-v-c2a7fb37"]]), Ne = { class: "fontFormattingAMA flex justify-end py-2" }, Qe = { class: "max-w-[80%]" }, Re = { class: "rounded-2xl rounded-br-sm bg-[#FFAB28] px-4 py-3" }, je = { class: "fontFormattingAMA whitespace-pre-line break-words text-sm leading-5 text-[#181C23]" }, Te = /* @__PURE__ */ t("div", { class: "mt-1 text-right text-xs text-gray-400" }, "You", -1), He = /* @__PURE__ */ A({
|
|
128
|
+
__name: "learnerAMA",
|
|
129
|
+
props: {
|
|
130
|
+
question: {
|
|
131
|
+
type: String,
|
|
132
|
+
required: !0
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
setup(o) {
|
|
136
|
+
return (e, r) => (c(), f("div", Ne, [
|
|
137
|
+
t("div", Qe, [
|
|
138
|
+
t("div", Re, [
|
|
139
|
+
t("div", je, I(o.question), 1)
|
|
140
|
+
]),
|
|
141
|
+
Te
|
|
142
|
+
])
|
|
143
|
+
]));
|
|
144
|
+
}
|
|
145
|
+
}), V = (o) => (L("data-v-a8911c8a"), o = o(), E(), o), Ge = { class: "fontFormattingAMA flex w-full justify-start py-2" }, Ve = { class: "w-full max-w-[92%]" }, ze = { class: "rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-5 py-4 md:px-6 md:py-5" }, Ue = {
|
|
146
|
+
class: "flex items-center gap-2.5",
|
|
147
|
+
role: "status",
|
|
148
|
+
"aria-live": "polite"
|
|
149
|
+
}, Pe = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", {
|
|
150
|
+
class: "dots flex shrink-0 items-center gap-1",
|
|
151
|
+
"aria-hidden": "true"
|
|
152
|
+
}, [
|
|
153
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
154
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
155
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
|
|
156
|
+
], -1)), De = /* @__PURE__ */ V(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
|
|
157
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
|
|
158
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
|
|
159
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
|
|
160
|
+
], -1)), We = /* @__PURE__ */ V(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ke = /* @__PURE__ */ A({
|
|
161
|
+
__name: "LoadingResponseAMA",
|
|
162
|
+
setup(o) {
|
|
163
|
+
const e = C(), r = [
|
|
164
|
+
"Generating response",
|
|
165
|
+
"Fetching the best response for you",
|
|
166
|
+
"Thinking... give me a moment",
|
|
167
|
+
"One moment while I gather the information",
|
|
168
|
+
"Hang in tight, we are almost there",
|
|
169
|
+
"Almost there... just a bit longer",
|
|
170
|
+
"Compiling a response for you"
|
|
171
|
+
], l = b(0), u = setInterval(() => {
|
|
172
|
+
var d, a;
|
|
173
|
+
!((a = (d = e.scope) == null ? void 0 : d.isActive) != null && a.call(d)) && e.native || (l.value = (l.value + 1) % r.length);
|
|
174
|
+
}, 5e3);
|
|
175
|
+
return e.own(() => clearInterval(u)), (d, a) => (c(), f("div", Ge, [
|
|
176
|
+
t("div", Ve, [
|
|
177
|
+
t("div", ze, [
|
|
178
|
+
t("div", Ue, [
|
|
179
|
+
Pe,
|
|
180
|
+
v(U, {
|
|
181
|
+
name: "fade",
|
|
182
|
+
mode: "out-in"
|
|
183
|
+
}, {
|
|
184
|
+
default: j(() => [
|
|
185
|
+
(c(), f("span", {
|
|
186
|
+
key: l.value,
|
|
187
|
+
class: "text-xs italic leading-4 text-gray-500"
|
|
188
|
+
}, I(r[l.value]), 1))
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
})
|
|
192
|
+
]),
|
|
193
|
+
De
|
|
194
|
+
]),
|
|
195
|
+
We
|
|
196
|
+
])
|
|
197
|
+
]));
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
const Oe = /* @__PURE__ */ $(Ke, [["__scopeId", "data-v-a8911c8a"]]), Ye = { key: 0 }, Je = { key: 1 }, Xe = {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "flex"
|
|
203
|
+
}, Ze = /* @__PURE__ */ A({
|
|
204
|
+
__name: "conversationAMA",
|
|
205
|
+
setup(o) {
|
|
206
|
+
let e = b(""), r = b("");
|
|
207
|
+
e.value = '<a style="color:#00AECF;"', r.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
208
|
+
const l = B(), u = C(), d = b(), a = () => {
|
|
209
|
+
var n;
|
|
210
|
+
const s = u.native && u.root && typeof u.root.querySelectorAll == "function" ? u.root.querySelectorAll('[name="askQuestion"]') : document.getElementsByName("askQuestion"), p = Array.from(s);
|
|
211
|
+
p.length && ((n = p.pop()) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
212
|
+
};
|
|
213
|
+
return T(a), le(a), (s, p) => (c(), f("div", {
|
|
214
|
+
ref_key: "nestedElement",
|
|
215
|
+
ref: d,
|
|
216
|
+
class: "smooth-scroll overflow-auto px-4 md:px-10 lg:px-12"
|
|
217
|
+
}, [
|
|
218
|
+
(c(!0), f(de, null, ce(_(l).conversations, (n, i) => (c(), f("div", { key: i }, [
|
|
219
|
+
n.question ? (c(), f("div", Ye, [
|
|
220
|
+
v(He, {
|
|
221
|
+
question: n.question,
|
|
222
|
+
c2question: n.c2question,
|
|
223
|
+
"show-feedback": n.showFeedback,
|
|
224
|
+
id: `qId${i}`,
|
|
225
|
+
name: "askQuestion",
|
|
226
|
+
"que-id": i
|
|
227
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
228
|
+
])) : k("", !0),
|
|
229
|
+
n.answer ? (c(), f("div", Je, [
|
|
230
|
+
v(Be, {
|
|
231
|
+
question: n == null ? void 0 : n.question,
|
|
232
|
+
c2question: n == null ? void 0 : n.c2question,
|
|
233
|
+
"show-sources": n == null ? void 0 : n.showSources,
|
|
234
|
+
questionId: n.id,
|
|
235
|
+
answer: n.answer.replaceAll("<a", _(e)).replaceAll("<ul", _(r)),
|
|
236
|
+
"show-feedback": n.showFeedback,
|
|
237
|
+
"related-ques": n.relatedQues,
|
|
238
|
+
"options-array": n.optionsArray,
|
|
239
|
+
"ans-id": i
|
|
240
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
241
|
+
])) : k("", !0)
|
|
242
|
+
]))), 128)),
|
|
243
|
+
_(l).dotLoader ? (c(), f("div", Xe, [
|
|
244
|
+
v(Oe)
|
|
245
|
+
])) : k("", !0)
|
|
246
|
+
], 512));
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
const et = /* @__PURE__ */ $(Ze, [["__scopeId", "data-v-3f433017"]]), tt = { class: "fontFormattingAMA flex items-center justify-between gap-3 border-b border-gray-100 px-4 pb-3 pt-1 md:px-10 md:pb-4 lg:px-12" }, st = { class: "min-w-0 text-base font-semibold text-[#181C23] md:text-lg" }, ot = { key: 0 }, nt = ["innerHTML"], at = ["disabled"], rt = /* @__PURE__ */ A({
|
|
250
|
+
__name: "greetingsAMA",
|
|
251
|
+
setup(o) {
|
|
252
|
+
const e = B(), r = C(), l = ` Hi ${e.learnerName || "Learner"}! 👋`, u = M(() => l), d = M(() => r.text(l.replace("👋", "👋")));
|
|
253
|
+
M(() => `I'm here and ready to help! What would you like to know about <span class='font-[600]'>${e.amaSkillName || "Skill"}</span>? <br/> Ask me to explain concepts, provide examples, or clarify anything that seems confusing.`);
|
|
254
|
+
const a = () => {
|
|
255
|
+
e.dotLoader || (e.conversations = [], e.past_messages = []);
|
|
256
|
+
};
|
|
257
|
+
return (s, p) => (c(), f("section", tt, [
|
|
258
|
+
t("div", st, [
|
|
259
|
+
_(r).native ? (c(), f("div", ot, I(d.value), 1)) : (c(), f("div", {
|
|
260
|
+
key: 1,
|
|
261
|
+
innerHTML: u.value
|
|
262
|
+
}, null, 8, nt))
|
|
263
|
+
]),
|
|
264
|
+
_(e).conversations.length ? (c(), f("button", {
|
|
265
|
+
key: 0,
|
|
266
|
+
type: "button",
|
|
267
|
+
disabled: _(e).dotLoader,
|
|
268
|
+
class: "flex shrink-0 items-center gap-1.5 rounded-full border border-gray-200 bg-white px-3 py-1 text-xs font-semibold text-gray-600 transition hover:border-[#FFAB28] hover:bg-[#FFF4E0] hover:text-[#181C23] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
269
|
+
onClick: p[0] || (p[0] = (n) => a())
|
|
270
|
+
}, [
|
|
271
|
+
v(_(xe), {
|
|
272
|
+
class: "h-4 w-4 text-[#E08A00]",
|
|
273
|
+
"aria-hidden": "true"
|
|
274
|
+
}),
|
|
275
|
+
P(" New chat ")
|
|
276
|
+
], 8, at)) : k("", !0)
|
|
277
|
+
]));
|
|
278
|
+
}
|
|
279
|
+
}), Q = (o) => String(o.query.amaId ?? "");
|
|
280
|
+
function it(o, e, r, l, u, d = (a) => !1) {
|
|
281
|
+
const a = b(!1);
|
|
282
|
+
let s = 0, p = !0;
|
|
283
|
+
const n = () => {
|
|
284
|
+
s += 1, a.value = !1, e.dotLoader = !1;
|
|
285
|
+
};
|
|
286
|
+
H(() => Q(o), n), D(() => {
|
|
287
|
+
p = !1, n();
|
|
288
|
+
});
|
|
289
|
+
const i = (h, m) => p && h === s && m === Q(o);
|
|
290
|
+
return { isWaitingResponse: a, sendQuestion: async () => {
|
|
291
|
+
var F, q, g;
|
|
292
|
+
if (e.question.trim().length < 1) {
|
|
293
|
+
r.setError("Please enter question!");
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
if (e.amaQuestionsLeft <= 0) {
|
|
297
|
+
r.setError("You have exhausted your question limit!");
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
const h = ++s, m = Q(o);
|
|
301
|
+
a.value = !0, e.dotLoader = !0;
|
|
302
|
+
const w = e.question;
|
|
303
|
+
e.conversations.push({ question: w }), e.question = "";
|
|
304
|
+
const S = {
|
|
305
|
+
skillId: m,
|
|
306
|
+
question: w,
|
|
307
|
+
past_messages: e.past_messages
|
|
308
|
+
};
|
|
309
|
+
try {
|
|
310
|
+
const y = await l(S);
|
|
311
|
+
if (!i(h, m))
|
|
312
|
+
return;
|
|
313
|
+
e.addConversation((F = y.data) == null ? void 0 : F.body, "new"), a.value = !1, e.dotLoader = !1;
|
|
314
|
+
} catch (y) {
|
|
315
|
+
if (d(y) || !i(h, m))
|
|
316
|
+
return;
|
|
317
|
+
a.value = !1, e.dotLoader = !1, u(y) ? r.setError((g = (q = y.response) == null ? void 0 : q.data) == null ? void 0 : g.message) : r.setError("There was an issue, please contact helpmate");
|
|
318
|
+
}
|
|
319
|
+
} };
|
|
320
|
+
}
|
|
321
|
+
const z = (o) => (L("data-v-81aaf2f7"), o = o(), E(), o), lt = { class: "w-full px-4 pb-4 pt-3 md:px-10 lg:px-12" }, dt = { class: "relative" }, ct = { class: "pointer-events-none absolute inset-y-0 left-3 flex items-center md:left-4" }, ut = {
|
|
322
|
+
class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
|
|
323
|
+
"aria-hidden": "true"
|
|
324
|
+
}, pt = ["placeholder"], _t = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, mt = {
|
|
325
|
+
key: 1,
|
|
326
|
+
class: "flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF4E0]",
|
|
327
|
+
role: "status",
|
|
328
|
+
"aria-label": "Waiting for response",
|
|
329
|
+
title: "Waiting for response"
|
|
330
|
+
}, ht = /* @__PURE__ */ z(() => /* @__PURE__ */ t("span", { class: "h-5 w-5 animate-spin rounded-full border-[2.5px] border-[#FFAB28] border-t-transparent" }, null, -1)), ft = [
|
|
331
|
+
ht
|
|
332
|
+
], gt = { class: "fontFormattingAMA flex flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 pt-2 text-center text-xs text-gray-500 md:text-sm" }, xt = /* @__PURE__ */ z(() => /* @__PURE__ */ t("span", null, "Note: AI-generated response may not be fully accurate; check with experts for critical information.", -1)), vt = /* @__PURE__ */ z(() => /* @__PURE__ */ t("span", {
|
|
333
|
+
class: "hidden sm:inline",
|
|
334
|
+
"aria-hidden": "true"
|
|
335
|
+
}, "·", -1)), bt = { class: "font-semibold text-[#181C23]" }, wt = /* @__PURE__ */ A({
|
|
336
|
+
__name: "NewQuestionAMA",
|
|
337
|
+
setup(o) {
|
|
338
|
+
const e = B(), r = G();
|
|
339
|
+
e.question = "";
|
|
340
|
+
const l = b(null), u = b(!1), d = b(N), a = W(), s = Y(), { isWaitingResponse: p, sendQuestion: n } = it(
|
|
341
|
+
a,
|
|
342
|
+
e,
|
|
343
|
+
r,
|
|
344
|
+
(h) => s.postApi("/amaBotResponse", h),
|
|
345
|
+
ue.isAxiosError,
|
|
346
|
+
J
|
|
347
|
+
);
|
|
348
|
+
T(() => {
|
|
349
|
+
l.value.focus();
|
|
350
|
+
});
|
|
351
|
+
const i = M(() => e.question.trim().length > 0);
|
|
352
|
+
H(
|
|
353
|
+
() => e.question,
|
|
354
|
+
async () => {
|
|
355
|
+
await K();
|
|
356
|
+
const h = l.value;
|
|
357
|
+
h && (h.style.height = "auto", h.style.height = `${h.scrollHeight}px`);
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
const x = (h) => {
|
|
361
|
+
const m = h.length;
|
|
362
|
+
d.value = N - m, u.value = m >= N;
|
|
363
|
+
};
|
|
364
|
+
return (h, m) => (c(), f("div", lt, [
|
|
365
|
+
t("div", dt, [
|
|
366
|
+
t("div", ct, [
|
|
367
|
+
t("span", ut, [
|
|
368
|
+
v(_(ge), { class: "h-4 w-4 md:h-5 md:w-5" })
|
|
369
|
+
])
|
|
370
|
+
]),
|
|
371
|
+
pe(t("textarea", {
|
|
372
|
+
ref_key: "AiSearch",
|
|
373
|
+
ref: l,
|
|
374
|
+
"onUpdate:modelValue": m[0] || (m[0] = (w) => _(e).question = w),
|
|
375
|
+
rows: "1",
|
|
376
|
+
class: "fontFormattingAMA block max-h-40 w-full !cursor-text resize-none overflow-y-auto rounded-2xl border border-[#FFAB28]/40 bg-white py-3 pl-14 pr-16 text-sm leading-6 text-[#181C23] shadow-[0_4px_16px_rgba(7,50,98,0.08)] transition placeholder:text-gray-400 hover:border-[#FFAB28]/70 focus:border-[#FFAB28] focus:outline-none focus:ring-4 focus:ring-[#FFAB28]/20 md:py-4 md:pl-16 md:pr-20 md:text-base",
|
|
377
|
+
placeholder: `Ask me about ${_(e).amaSkillName || "Skill Name"}`,
|
|
378
|
+
onKeydown: m[1] || (m[1] = me(O((w) => _(p) ? "" : _(n)(), ["exact", "prevent"]), ["enter"])),
|
|
379
|
+
onInput: m[2] || (m[2] = (w) => x(_(e).question))
|
|
380
|
+
}, null, 40, pt), [
|
|
381
|
+
[_e, _(e).question]
|
|
382
|
+
]),
|
|
383
|
+
t("div", _t, [
|
|
384
|
+
_(p) ? (c(), f("span", mt, ft)) : (c(), f("button", {
|
|
385
|
+
key: 0,
|
|
386
|
+
type: "button",
|
|
387
|
+
title: "Send",
|
|
388
|
+
"aria-label": "Send question",
|
|
389
|
+
class: he([i.value ? "bg-[#FFAB28] text-[#181C23] shadow-md hover:-translate-y-0.5 hover:shadow-lg" : "bg-[#FFAB28]/40 text-[#181C23]/60", "flex h-10 w-10 items-center justify-center rounded-full transition"]),
|
|
390
|
+
onClick: m[3] || (m[3] = (w) => _(n)())
|
|
391
|
+
}, [
|
|
392
|
+
v(_(ee), {
|
|
393
|
+
class: "h-5 w-5",
|
|
394
|
+
"aria-hidden": "true"
|
|
395
|
+
})
|
|
396
|
+
], 2))
|
|
397
|
+
])
|
|
398
|
+
]),
|
|
399
|
+
t("div", gt, [
|
|
400
|
+
v(_(te), {
|
|
401
|
+
class: "h-4 w-4 shrink-0 text-[#E08A00]",
|
|
402
|
+
"aria-hidden": "true"
|
|
403
|
+
}),
|
|
404
|
+
xt,
|
|
405
|
+
vt,
|
|
406
|
+
t("span", bt, I(_(e).amaQuestionsLeft) + " questions remaining for the day", 1)
|
|
407
|
+
])
|
|
408
|
+
]));
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
const yt = /* @__PURE__ */ $(wt, [["__scopeId", "data-v-81aaf2f7"]]), At = (o) => (L("data-v-fb943644"), o = o(), E(), o), kt = {
|
|
412
|
+
class: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#FDF3E1] text-[#C68A16]",
|
|
413
|
+
"aria-hidden": "true"
|
|
414
|
+
}, $t = /* @__PURE__ */ At(() => /* @__PURE__ */ t("div", { class: "mt-3 text-xs font-bold uppercase tracking-[0.12em] text-[#C68A16]" }, "Heads up", -1)), Ft = {
|
|
415
|
+
id: "ama-error-text",
|
|
416
|
+
class: "mt-1.5 text-base font-semibold leading-snug text-[#181C23]"
|
|
417
|
+
}, qt = /* @__PURE__ */ A({
|
|
418
|
+
__name: "errorPopupAMA",
|
|
419
|
+
setup(o) {
|
|
420
|
+
const e = G(), r = b(""), l = b(null), u = () => {
|
|
421
|
+
r.value = "";
|
|
422
|
+
};
|
|
423
|
+
e.$subscribe(
|
|
424
|
+
(a, s) => {
|
|
425
|
+
s.error && (r.value = s.error, K(() => {
|
|
426
|
+
var p;
|
|
427
|
+
return (p = l.value) == null ? void 0 : p.focus();
|
|
428
|
+
}));
|
|
429
|
+
},
|
|
430
|
+
{ flush: "sync" }
|
|
431
|
+
);
|
|
432
|
+
const d = (a) => {
|
|
433
|
+
r.value && a.key === "Escape" && u();
|
|
434
|
+
};
|
|
435
|
+
return T(() => window.addEventListener("keydown", d)), fe(() => window.removeEventListener("keydown", d)), (a, s) => (c(), R(U, { name: "ama-popup" }, {
|
|
436
|
+
default: j(() => [
|
|
437
|
+
r.value ? (c(), f("div", {
|
|
438
|
+
key: 0,
|
|
439
|
+
class: "fixed inset-0 z-[99999] flex items-center justify-center bg-[#181C23]/35 p-4 backdrop-blur-[2px]",
|
|
440
|
+
onClick: u
|
|
441
|
+
}, [
|
|
442
|
+
t("div", {
|
|
443
|
+
role: "alertdialog",
|
|
444
|
+
"aria-modal": "true",
|
|
445
|
+
"aria-labelledby": "ama-error-text",
|
|
446
|
+
class: "ama-popup-card fontFormattingAMA w-full max-w-[360px] rounded-[14px] border border-[#F3E6CF] bg-[#FFFCF7] px-[22px] pb-5 pt-6 text-center shadow-[0_18px_40px_rgba(24,28,35,0.18)]",
|
|
447
|
+
onClick: s[0] || (s[0] = O(() => {
|
|
448
|
+
}, ["stop"]))
|
|
449
|
+
}, [
|
|
450
|
+
t("span", kt, [
|
|
451
|
+
v(_(se), { class: "h-5 w-5" })
|
|
452
|
+
]),
|
|
453
|
+
$t,
|
|
454
|
+
t("div", Ft, I(r.value), 1),
|
|
455
|
+
t("button", {
|
|
456
|
+
ref_key: "okButton",
|
|
457
|
+
ref: l,
|
|
458
|
+
type: "button",
|
|
459
|
+
class: "mt-5 w-full rounded-lg bg-[#181C23] px-4 py-2.5 text-sm font-semibold text-white transition hover:bg-[#2B313C] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#FFAB28]",
|
|
460
|
+
onClick: u
|
|
461
|
+
}, " Got it ", 512)
|
|
462
|
+
])
|
|
463
|
+
])) : k("", !0)
|
|
464
|
+
]),
|
|
465
|
+
_: 1
|
|
466
|
+
}));
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
const Mt = /* @__PURE__ */ $(qt, [["__scopeId", "data-v-fb943644"]]), Ct = (o) => String(o.query.amaId ?? "");
|
|
470
|
+
function It(o, e, r, l, u = (d) => !1) {
|
|
471
|
+
const d = b(!0), a = b(!1);
|
|
472
|
+
let s = 0;
|
|
473
|
+
const p = (i) => {
|
|
474
|
+
e.amaSkillId = i, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
|
|
475
|
+
}, n = async (i) => {
|
|
476
|
+
var m, w, S, F, q;
|
|
477
|
+
const x = ++s;
|
|
478
|
+
d.value = !0, a.value = !1, p(i);
|
|
479
|
+
let h = !1;
|
|
480
|
+
try {
|
|
481
|
+
const g = await l(i);
|
|
482
|
+
if (x !== s)
|
|
483
|
+
return;
|
|
484
|
+
e.initialize(g.data), e.amaQuestionsLeft = (m = g == null ? void 0 : g.data) == null ? void 0 : m.questionsLeftAIGC, e.amaSkillName = (w = g == null ? void 0 : g.data) == null ? void 0 : w.skillName;
|
|
485
|
+
} catch (g) {
|
|
486
|
+
if (u(g)) {
|
|
487
|
+
h = !0;
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
if (x !== s)
|
|
491
|
+
return;
|
|
492
|
+
const y = g && typeof g == "object" && ((S = g.response) == null ? void 0 : S.status);
|
|
493
|
+
y === 424 || y === 425 ? a.value = !0 : y ? r.setError((q = (F = g.response) == null ? void 0 : F.data) == null ? void 0 : q.message) : r.setError("There was an issue, please contact helpmate");
|
|
494
|
+
} finally {
|
|
495
|
+
!h && x === s && (d.value = !1);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
return H(() => Ct(o), (i) => {
|
|
499
|
+
n(i);
|
|
500
|
+
}, { immediate: !0 }), D(() => {
|
|
501
|
+
s += 1;
|
|
502
|
+
}), { loaderValue: d, notAllowedModalVisible: a };
|
|
503
|
+
}
|
|
504
|
+
const St = {
|
|
505
|
+
key: 1,
|
|
506
|
+
class: "flex h-screen flex-col overflow-hidden"
|
|
507
|
+
}, Lt = { class: "z-20 shrink-0" }, Et = { class: "min-h-0 flex-1 overflow-hidden pb-1" }, Bt = { class: "flex h-full flex-col bg-gray-100 px-2 sm:px-6 md:px-10 lg:px-20" }, Nt = { class: "fontFormattingAMA flex min-h-0 flex-1 flex-col border-x border-b border-black bg-white pt-3 md:pt-4" }, Qt = { class: "shrink-0" }, Rt = /* @__PURE__ */ A({
|
|
508
|
+
__name: "AMABot",
|
|
509
|
+
setup(o) {
|
|
510
|
+
const e = B(), r = G(), l = W(), u = Y(), { loaderValue: d, notAllowedModalVisible: a } = It(
|
|
511
|
+
l,
|
|
512
|
+
e,
|
|
513
|
+
r,
|
|
514
|
+
(s) => u.getApi(`/getLearnerData?amaSkillId=${s}`),
|
|
515
|
+
J
|
|
516
|
+
);
|
|
517
|
+
return (s, p) => (c(), f("section", null, [
|
|
518
|
+
_(a) ? (c(), R(oe, {
|
|
519
|
+
key: 0,
|
|
520
|
+
tone: "error",
|
|
521
|
+
title: "Assessment Access Required"
|
|
522
|
+
}, {
|
|
523
|
+
default: j(() => [
|
|
524
|
+
P(" You don't have access to this assessment. Please contact to administrator ")
|
|
525
|
+
]),
|
|
526
|
+
_: 1
|
|
527
|
+
})) : k("", !0),
|
|
528
|
+
v(Mt),
|
|
529
|
+
t("div", null, [
|
|
530
|
+
_(d) ? (c(), R(ne, {
|
|
531
|
+
key: 0,
|
|
532
|
+
message: "Loading AI Guru"
|
|
533
|
+
})) : (c(), f("main", St, [
|
|
534
|
+
t("div", Lt, [
|
|
535
|
+
v(Fe)
|
|
536
|
+
]),
|
|
537
|
+
t("section", Et, [
|
|
538
|
+
t("div", Bt, [
|
|
539
|
+
t("div", Nt, [
|
|
540
|
+
v(rt, { class: "shrink-0" }),
|
|
541
|
+
v(et, { class: "min-h-0 flex-1 pt-3" }),
|
|
542
|
+
t("div", Qt, [
|
|
543
|
+
v(yt)
|
|
544
|
+
])
|
|
545
|
+
])
|
|
546
|
+
])
|
|
547
|
+
])
|
|
548
|
+
]))
|
|
549
|
+
])
|
|
550
|
+
]));
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
const Ut = /* @__PURE__ */ $(Rt, [["__scopeId", "data-v-d2dc4f82"]]);
|
|
554
|
+
export {
|
|
555
|
+
Ut as default
|
|
556
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Xh = Object.defineProperty;
|
|
2
2
|
var Mh = (e, n, t) => n in e ? Xh(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var Ct = (e, n, t) => (Mh(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
|
-
import { o as ke, c as Se, a as L, d as Fn, z as ro, r as _e, G as xa, I as Ka, b as Oe, p as Qi, g as Wi, h as bt, s as Tr, T as Fh, f as Xt, n as zn, x as Gs, y as Sd, u as Kr, B as tn, t as Yt, i as Be, F as jr, e as wa, M as Qn, J as _a, N as vi, l as pa, w as Us, O as Bd, P as il, H as Kc, C as Eh, k as ml, L as _c, q as Hd, E as $c, m as Td, Q as Zh, R as $f, S as Ih, v as Gh } from "./main-
|
|
5
|
-
import { r as jd, _ as Rh, a as Cd, b as Xd, c as Md, L as Jh } from "./simulationPopup.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { o as ke, c as Se, a as L, d as Fn, z as ro, r as _e, G as xa, I as Ka, b as Oe, p as Qi, g as Wi, h as bt, s as Tr, T as Fh, f as Xt, n as zn, x as Gs, y as Sd, u as Kr, B as tn, t as Yt, i as Be, F as jr, e as wa, M as Qn, J as _a, N as vi, l as pa, w as Us, O as Bd, P as il, H as Kc, C as Eh, k as ml, L as _c, q as Hd, E as $c, m as Td, Q as Zh, R as $f, S as Ih, v as Gh } from "./main-5483437d.mjs";
|
|
5
|
+
import { r as jd, _ as Rh, a as Cd, b as Xd, c as Md, L as Jh } from "./simulationPopup.vue_vue_type_script_setup_true_lang-3f6e3d9c.mjs";
|
|
6
6
|
import { _ as Qh, Q as ic, M as eu } from "./constants-e0c83ac4.mjs";
|
|
7
7
|
import { _ as gi } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
8
|
-
import { u as za, i as Mi, c as Es } from "./api-
|
|
9
|
-
import { u as Wh, a as Uh } from "./voiceServices-
|
|
10
|
-
import { r as qh } from "./XMarkIcon-
|
|
8
|
+
import { u as za, i as Mi, c as Es } from "./api-c67299fe.mjs";
|
|
9
|
+
import { u as Wh, a as Uh } from "./voiceServices-d58ee911.mjs";
|
|
10
|
+
import { r as qh } from "./XMarkIcon-bca592a2.mjs";
|
|
11
11
|
function Yh(e, n) {
|
|
12
12
|
return ke(), Se("svg", {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12469,7 +12469,7 @@ function(e) {
|
|
|
12469
12469
|
var d = u.getContext("2d");
|
|
12470
12470
|
d.fillStyle = "#fff", d.fillRect(0, 0, u.width, u.height);
|
|
12471
12471
|
var v = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, w = this;
|
|
12472
|
-
return (at.canvg ? Promise.resolve(at.canvg) : import("./index.es-
|
|
12472
|
+
return (at.canvg ? Promise.resolve(at.canvg) : import("./index.es-2157eb81.mjs")).catch(function(A) {
|
|
12473
12473
|
return Promise.reject(new Error("Could not load canvg: " + A));
|
|
12474
12474
|
}).then(function(A) {
|
|
12475
12475
|
return A.default ? A.default : A;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as O, D as P, u as $, k as H, r as c, o as i, c as d, a as e, w as b, m as T, b as n, n as F, v as B, F as G, e as Y, t as f, q as j, p as J, g as Q, i as E } from "./main-
|
|
1
|
+
import { d as O, D as P, u as $, k as H, r as c, o as i, c as d, a as e, w as b, m as T, b as n, n as F, v as B, F as G, e as Y, t as f, q as j, p as J, g as Q, i as E } from "./main-5483437d.mjs";
|
|
2
2
|
import { _ as C } from "./loadernew-ac153a51.mjs";
|
|
3
|
-
import { u as X, a as Z, i as A } from "./api-
|
|
3
|
+
import { u as X, a as Z, i as A } from "./api-c67299fe.mjs";
|
|
4
4
|
import { _ as ee } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
5
|
const a = (_) => (J("data-v-53586205"), _ = _(), Q(), _), te = /* @__PURE__ */ a(() => /* @__PURE__ */ e("nav", { class: "bg-genpact-blue-box w-full px-5 mb-6" }, null, -1)), se = { class: "grid grid-cols-5 gap-8 p-10 items-stretch" }, oe = /* @__PURE__ */ a(() => /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
|
|
6
6
|
/* @__PURE__ */ e("label", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as r, c, a as e, d as z, D as G, h as L, b as a, U as H, u as Y, k as J, r as i, w, m as T, n as F, f as b, F as j, e as Q, v as X, t as m, q, p as Z, g as ee, i as I } from "./main-
|
|
1
|
+
import { o as r, c, a as e, d as z, D as G, h as L, b as a, U as H, u as Y, k as J, r as i, w, m as T, n as F, f as b, F as j, e as Q, v as X, t as m, q, p as Z, g as ee, i as I } from "./main-5483437d.mjs";
|
|
2
2
|
import { _ as R } from "./loadernew-ac153a51.mjs";
|
|
3
|
-
import { a as U, u as te, i as M } from "./api-
|
|
3
|
+
import { a as U, u as te, i as M } from "./api-c67299fe.mjs";
|
|
4
4
|
import { _ as se } from "./genome-Logo-white-ffcf2413.mjs";
|
|
5
5
|
import { _ as oe } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
6
6
|
function ae(u, h) {
|