@genpact/genome.mfe.mgtwin-app 1.1.111 → 1.1.112
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-d3c25aca.mjs → AMABot-4b655f68.mjs} +160 -148
- package/dist/{AssessmentSimulation-de4df6f9.mjs → AssessmentSimulation-166a0d13.mjs} +12 -12
- package/dist/{EditSkillAdminData-ed9449b6.mjs → EditSkillAdminData-60ea8311.mjs} +2 -2
- package/dist/{EditSkillData-0f12a2f1.mjs → EditSkillData-2cda91cf.mjs} +2 -2
- package/dist/{HomeView-1c82abcb.mjs → HomeView-6f4b47a6.mjs} +4 -4
- package/dist/{Loading-581900a3.mjs → Loading-b603bafb.mjs} +1 -1
- package/dist/{PromptTesting-fd764128.mjs → PromptTesting-b0e4ba08.mjs} +2 -2
- package/dist/{SkillAutomation-c57bc98f.mjs → SkillAutomation-91cb213a.mjs} +3 -3
- package/dist/{SkillData-efc3c48e.mjs → SkillData-4f5a955d.mjs} +3 -3
- package/dist/{UnderMaintenance-5d5abed8.mjs → UnderMaintenance-72966162.mjs} +1 -1
- package/dist/{_commonjsHelpers-fa8004e0.mjs → _commonjsHelpers-09aae632.mjs} +1 -1
- package/dist/{api-127df7f6.mjs → api-1632aeaa.mjs} +1 -1
- package/dist/{index.es-74ad0a04.mjs → index.es-ff9ac789.mjs} +5 -5
- package/dist/{main-ebf114a8.mjs → main-db45df2b.mjs} +1042 -1042
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +51 -51
- package/dist/native/aiguru-native.css +1 -1
- package/dist/native/aiguru-native.umd.min.js +51 -51
- package/dist/{simulationPopup.vue_vue_type_script_setup_true_lang-65114ce8.mjs → simulationPopup.vue_vue_type_script_setup_true_lang-41e4e9c6.mjs} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { o as u, c as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as Y, i as J } from "./api-
|
|
1
|
+
import { r as ee, _ as te, b as se, a as oe, d as ne, c as ae, L as re } from "./simulationPopup.vue_vue_type_script_setup_true_lang-41e4e9c6.mjs";
|
|
2
|
+
import { _ as ie, Q as N } from "./constants-e0c83ac4.mjs";
|
|
3
|
+
import { o as u, c as _, a as t, d as k, z as E, r as w, G as le, I as de, b as c, B, p as C, g as L, t as $, h as b, s as T, T as P, u as j, H as G, C as ce, i as q, f as M, F as ue, e as pe, O as z, J as W, k as H, E as D, q as me, w as _e, m as he, Q as fe, n as Q, V as O, x as K, Z as ge, l as V } from "./main-db45df2b.mjs";
|
|
4
|
+
import { _ as F } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { u as Y, i as J } from "./api-1632aeaa.mjs";
|
|
6
6
|
import "./loadernew-ac153a51.mjs";
|
|
7
7
|
function xe(s, e) {
|
|
8
|
-
return u(),
|
|
8
|
+
return u(), _("svg", {
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
fill: "none",
|
|
11
11
|
viewBox: "0 0 24 24",
|
|
@@ -21,7 +21,7 @@ function xe(s, e) {
|
|
|
21
21
|
]);
|
|
22
22
|
}
|
|
23
23
|
function ve(s, e) {
|
|
24
|
-
return u(),
|
|
24
|
+
return u(), _("svg", {
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
fill: "none",
|
|
27
27
|
viewBox: "0 0 24 24",
|
|
@@ -37,7 +37,7 @@ function ve(s, e) {
|
|
|
37
37
|
]);
|
|
38
38
|
}
|
|
39
39
|
function be(s, e) {
|
|
40
|
-
return u(),
|
|
40
|
+
return u(), _("svg", {
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
fill: "none",
|
|
43
43
|
viewBox: "0 0 24 24",
|
|
@@ -54,21 +54,21 @@ function be(s, e) {
|
|
|
54
54
|
}
|
|
55
55
|
const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-black md:pr-6 lg:pr-6" }, ye = ["href"], Ae = /* @__PURE__ */ t("img", {
|
|
56
56
|
class: "h-16 w-auto cursor-pointer",
|
|
57
|
-
src:
|
|
57
|
+
src: te,
|
|
58
58
|
alt: "Genome Logo"
|
|
59
59
|
}, null, -1), ke = [
|
|
60
60
|
Ae
|
|
61
61
|
], $e = ["href"], Fe = /* @__PURE__ */ t("img", {
|
|
62
62
|
class: "h-6 w-28 cursor-pointer md:w-36",
|
|
63
|
-
src:
|
|
63
|
+
src: ie,
|
|
64
64
|
alt: "Aiguru Logo"
|
|
65
65
|
}, null, -1), Me = [
|
|
66
66
|
Fe
|
|
67
|
-
], qe = /* @__PURE__ */
|
|
67
|
+
], qe = /* @__PURE__ */ k({
|
|
68
68
|
__name: "headerAMA",
|
|
69
69
|
setup(s) {
|
|
70
|
-
const e = E(), r =
|
|
71
|
-
return p === "prod" ? r.value = "https://genome.genpact.com" : r.value = "https://genome-dev.genpact.com", p === "prod" ? i.value = "https://genome.genpact.com
|
|
70
|
+
const e = E(), r = w(""), i = w(""), p = ee(le(de, void 0), window.location);
|
|
71
|
+
return p === "prod" ? r.value = "https://genome.genpact.com" : r.value = "https://genome-dev.genpact.com", p === "prod" ? i.value = "https://genome.genpact.com/aiguru-agent" : i.value = "https://genome-dev.genpact.com/aiguru-agent", (d, a) => (u(), _("nav", we, [
|
|
72
72
|
t("a", {
|
|
73
73
|
class: "px-2 md:px-0 lg:px-0",
|
|
74
74
|
href: c(e).url(r.value),
|
|
@@ -81,7 +81,7 @@ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-bla
|
|
|
81
81
|
}, Me, 8, $e)
|
|
82
82
|
]));
|
|
83
83
|
}
|
|
84
|
-
}), Ce = (s) => (
|
|
84
|
+
}), Ce = (s) => (C("data-v-c2a7fb37"), s = s(), L(), s), Le = { class: "fontFormattingAMA flex justify-start py-2" }, Ie = { class: "w-full max-w-[92%]" }, Se = { 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]" }, Be = ["innerHTML"], Ee = /* @__PURE__ */ Ce(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), je = /* @__PURE__ */ k({
|
|
85
85
|
__name: "responseAMA",
|
|
86
86
|
props: {
|
|
87
87
|
answer: {
|
|
@@ -100,8 +100,8 @@ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-bla
|
|
|
100
100
|
`)) {
|
|
101
101
|
if (!l.trim()) {
|
|
102
102
|
n();
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
const m = o[o.length - 1];
|
|
104
|
+
m && !m.block && m.html !== "" && o.push({ html: "", block: !1 });
|
|
105
105
|
continue;
|
|
106
106
|
}
|
|
107
107
|
const x = l.match(/^\s*[-*•]\s+(.*)$/);
|
|
@@ -110,15 +110,15 @@ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-bla
|
|
|
110
110
|
continue;
|
|
111
111
|
}
|
|
112
112
|
n();
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
const v = l.match(/^\s*#{1,6}\s*(.*)$/);
|
|
114
|
+
v ? o.push({ html: `<div style="font-weight: 700;">${i(v[1])}</div>`, block: !0 }) : o.push({ html: i(l), block: !1 });
|
|
115
115
|
}
|
|
116
116
|
n();
|
|
117
117
|
for (let l = o.length - 2; l >= 0; l--)
|
|
118
118
|
o[l].html === "" && !o[l].block && o[l + 1].block && o.splice(l, 1);
|
|
119
119
|
for (; o.length && o[o.length - 1].html === ""; )
|
|
120
120
|
o.pop();
|
|
121
|
-
return o.reduce((l, x,
|
|
121
|
+
return o.reduce((l, x, v) => v === 0 ? x.html : l + (x.block || o[v - 1].block ? "" : `
|
|
122
122
|
`) + x.html, "");
|
|
123
123
|
}, d = B(() => {
|
|
124
124
|
const a = p(e.answer).replace(
|
|
@@ -127,7 +127,7 @@ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-bla
|
|
|
127
127
|
), o = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, h = a.replace(o, (n, l, x) => `<a href="${r.url(x)}" target="_blank" rel="noopener noreferrer" style="color: #00AECF; text-decoration: underline;">${l}</a>`);
|
|
128
128
|
return r.html(h);
|
|
129
129
|
});
|
|
130
|
-
return (a, o) => (u(),
|
|
130
|
+
return (a, o) => (u(), _("div", Le, [
|
|
131
131
|
t("div", Ie, [
|
|
132
132
|
t("div", Se, [
|
|
133
133
|
t("span", {
|
|
@@ -140,7 +140,7 @@ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-bla
|
|
|
140
140
|
]));
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
const
|
|
143
|
+
const Ne = /* @__PURE__ */ F(je, [["__scopeId", "data-v-c2a7fb37"]]), Qe = { class: "fontFormattingAMA flex justify-end py-2" }, Re = { class: "max-w-[80%]" }, Ve = { class: "rounded-2xl rounded-br-sm bg-[#FFAB28] px-4 py-3" }, Te = { class: "fontFormattingAMA whitespace-pre-line break-words text-sm leading-5 text-[#181C23]" }, Ge = /* @__PURE__ */ t("div", { class: "mt-1 text-right text-xs text-gray-400" }, "You", -1), ze = /* @__PURE__ */ k({
|
|
144
144
|
__name: "learnerAMA",
|
|
145
145
|
props: {
|
|
146
146
|
question: {
|
|
@@ -149,31 +149,31 @@ const je = /* @__PURE__ */ k(Ne, [["__scopeId", "data-v-c2a7fb37"]]), Qe = { cla
|
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
setup(s) {
|
|
152
|
-
return (e, r) => (u(),
|
|
152
|
+
return (e, r) => (u(), _("div", Qe, [
|
|
153
153
|
t("div", Re, [
|
|
154
|
-
t("div",
|
|
155
|
-
t("div",
|
|
154
|
+
t("div", Ve, [
|
|
155
|
+
t("div", Te, $(s.question), 1)
|
|
156
156
|
]),
|
|
157
|
-
|
|
157
|
+
Ge
|
|
158
158
|
])
|
|
159
159
|
]));
|
|
160
160
|
}
|
|
161
|
-
}),
|
|
161
|
+
}), U = (s) => (C("data-v-a8911c8a"), s = s(), L(), s), He = { class: "fontFormattingAMA flex w-full justify-start py-2" }, Ue = { class: "w-full max-w-[92%]" }, Pe = { class: "rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-5 py-4 md:px-6 md:py-5" }, We = {
|
|
162
162
|
class: "flex items-center gap-2.5",
|
|
163
163
|
role: "status",
|
|
164
164
|
"aria-live": "polite"
|
|
165
|
-
}, De = /* @__PURE__ */
|
|
165
|
+
}, De = /* @__PURE__ */ U(() => /* @__PURE__ */ t("span", {
|
|
166
166
|
class: "dots flex shrink-0 items-center gap-1",
|
|
167
167
|
"aria-hidden": "true"
|
|
168
168
|
}, [
|
|
169
169
|
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
170
170
|
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
171
171
|
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
|
|
172
|
-
], -1)), Oe = /* @__PURE__ */
|
|
172
|
+
], -1)), Oe = /* @__PURE__ */ U(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
|
|
173
173
|
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
|
|
174
174
|
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
|
|
175
175
|
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
|
|
176
|
-
], -1)), Ke = /* @__PURE__ */
|
|
176
|
+
], -1)), Ke = /* @__PURE__ */ U(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ye = /* @__PURE__ */ k({
|
|
177
177
|
__name: "LoadingResponseAMA",
|
|
178
178
|
setup(s) {
|
|
179
179
|
const e = E(), r = [
|
|
@@ -184,24 +184,24 @@ const je = /* @__PURE__ */ k(Ne, [["__scopeId", "data-v-c2a7fb37"]]), Qe = { cla
|
|
|
184
184
|
"Hang in tight, we are almost there",
|
|
185
185
|
"Almost there... just a bit longer",
|
|
186
186
|
"Compiling a response for you"
|
|
187
|
-
], i =
|
|
187
|
+
], i = w(0), p = setInterval(() => {
|
|
188
188
|
var d, a;
|
|
189
189
|
!((a = (d = e.scope) == null ? void 0 : d.isActive) != null && a.call(d)) && e.native || (i.value = (i.value + 1) % r.length);
|
|
190
190
|
}, 5e3);
|
|
191
|
-
return e.own(() => clearInterval(p)), (d, a) => (u(),
|
|
191
|
+
return e.own(() => clearInterval(p)), (d, a) => (u(), _("div", He, [
|
|
192
192
|
t("div", Ue, [
|
|
193
193
|
t("div", Pe, [
|
|
194
194
|
t("div", We, [
|
|
195
195
|
De,
|
|
196
|
-
|
|
196
|
+
b(P, {
|
|
197
197
|
name: "fade",
|
|
198
198
|
mode: "out-in"
|
|
199
199
|
}, {
|
|
200
200
|
default: T(() => [
|
|
201
|
-
(u(),
|
|
201
|
+
(u(), _("span", {
|
|
202
202
|
key: i.value,
|
|
203
203
|
class: "text-xs italic leading-4 text-gray-500"
|
|
204
|
-
},
|
|
204
|
+
}, $(r[i.value]), 1))
|
|
205
205
|
]),
|
|
206
206
|
_: 1
|
|
207
207
|
})
|
|
@@ -213,7 +213,7 @@ const je = /* @__PURE__ */ k(Ne, [["__scopeId", "data-v-c2a7fb37"]]), Qe = { cla
|
|
|
213
213
|
]));
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
|
-
const Je = /* @__PURE__ */
|
|
216
|
+
const Je = /* @__PURE__ */ F(Ye, [["__scopeId", "data-v-a8911c8a"]]), Z = (s) => (C("data-v-3bded0ae"), s = s(), L(), s), Ze = {
|
|
217
217
|
key: 0,
|
|
218
218
|
class: "fontFormattingAMA flex h-full min-h-[260px] flex-col items-center justify-center px-2 py-8 text-center"
|
|
219
219
|
}, Xe = {
|
|
@@ -222,36 +222,36 @@ const Je = /* @__PURE__ */ k(Ye, [["__scopeId", "data-v-a8911c8a"]]), Z = (s) =>
|
|
|
222
222
|
}, et = /* @__PURE__ */ Z(() => /* @__PURE__ */ t("p", { class: "mt-6 text-sm text-gray-500 md:text-base" }, "I'm here and ready to help!", -1)), tt = { class: "mt-1 text-lg font-semibold text-[#181C23] md:text-2xl" }, st = { class: "text-[#B26A00]" }, ot = /* @__PURE__ */ Z(() => /* @__PURE__ */ t("p", { class: "mt-2 max-w-md text-sm text-gray-500 md:text-base" }, " Ask me to explain concepts, provide examples, or clarify anything that seems confusing. ", -1)), nt = { key: 0 }, at = { key: 1 }, rt = {
|
|
223
223
|
key: 1,
|
|
224
224
|
class: "flex"
|
|
225
|
-
}, it = /* @__PURE__ */
|
|
225
|
+
}, it = /* @__PURE__ */ k({
|
|
226
226
|
__name: "conversationAMA",
|
|
227
227
|
setup(s) {
|
|
228
|
-
let e =
|
|
228
|
+
let e = w(""), r = w("");
|
|
229
229
|
e.value = '<a style="color:#00AECF;"', r.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
230
|
-
const i =
|
|
230
|
+
const i = j(), p = E(), d = w(), a = () => {
|
|
231
231
|
var n;
|
|
232
232
|
const o = p.native && p.root && typeof p.root.querySelectorAll == "function" ? p.root.querySelectorAll('[name="askQuestion"]') : document.getElementsByName("askQuestion"), h = Array.from(o);
|
|
233
233
|
h.length && ((n = h.pop()) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
234
234
|
};
|
|
235
|
-
return G(a), ce(a), (o, h) => (u(),
|
|
235
|
+
return G(a), ce(a), (o, h) => (u(), _("div", {
|
|
236
236
|
ref_key: "nestedElement",
|
|
237
237
|
ref: d,
|
|
238
238
|
class: "smooth-scroll overflow-auto px-4 md:px-10 lg:px-12"
|
|
239
239
|
}, [
|
|
240
|
-
!c(i).conversations.length && !c(i).dotLoader ? (u(),
|
|
240
|
+
!c(i).conversations.length && !c(i).dotLoader ? (u(), _("div", Ze, [
|
|
241
241
|
t("span", Xe, [
|
|
242
|
-
|
|
242
|
+
b(c(be), { class: "h-7 w-7 text-[#E08A00] md:h-8 md:w-8" })
|
|
243
243
|
]),
|
|
244
244
|
et,
|
|
245
245
|
t("p", tt, [
|
|
246
|
-
|
|
247
|
-
t("span", st,
|
|
248
|
-
|
|
246
|
+
q(" What would you like to know about "),
|
|
247
|
+
t("span", st, $(c(i).amaSkillName || "Skill"), 1),
|
|
248
|
+
q("? ")
|
|
249
249
|
]),
|
|
250
250
|
ot
|
|
251
|
-
])) :
|
|
252
|
-
(u(!0),
|
|
253
|
-
n.question ? (u(),
|
|
254
|
-
|
|
251
|
+
])) : M("", !0),
|
|
252
|
+
(u(!0), _(ue, null, pe(c(i).conversations, (n, l) => (u(), _("div", { key: l }, [
|
|
253
|
+
n.question ? (u(), _("div", nt, [
|
|
254
|
+
b(ze, {
|
|
255
255
|
question: n.question,
|
|
256
256
|
c2question: n.c2question,
|
|
257
257
|
"show-feedback": n.showFeedback,
|
|
@@ -259,9 +259,9 @@ const Je = /* @__PURE__ */ k(Ye, [["__scopeId", "data-v-a8911c8a"]]), Z = (s) =>
|
|
|
259
259
|
name: "askQuestion",
|
|
260
260
|
"que-id": l
|
|
261
261
|
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
262
|
-
])) :
|
|
263
|
-
n.answer ? (u(),
|
|
264
|
-
|
|
262
|
+
])) : M("", !0),
|
|
263
|
+
n.answer ? (u(), _("div", at, [
|
|
264
|
+
b(Ne, {
|
|
265
265
|
question: n == null ? void 0 : n.question,
|
|
266
266
|
c2question: n == null ? void 0 : n.c2question,
|
|
267
267
|
"show-sources": n == null ? void 0 : n.showSources,
|
|
@@ -272,33 +272,33 @@ const Je = /* @__PURE__ */ k(Ye, [["__scopeId", "data-v-a8911c8a"]]), Z = (s) =>
|
|
|
272
272
|
"options-array": n.optionsArray,
|
|
273
273
|
"ans-id": l
|
|
274
274
|
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
275
|
-
])) :
|
|
275
|
+
])) : M("", !0)
|
|
276
276
|
]))), 128)),
|
|
277
|
-
c(i).dotLoader ? (u(),
|
|
278
|
-
|
|
279
|
-
])) :
|
|
277
|
+
c(i).dotLoader ? (u(), _("div", rt, [
|
|
278
|
+
b(Je)
|
|
279
|
+
])) : M("", !0)
|
|
280
280
|
], 512));
|
|
281
281
|
}
|
|
282
282
|
});
|
|
283
|
-
const lt = /* @__PURE__ */
|
|
283
|
+
const lt = /* @__PURE__ */ F(it, [["__scopeId", "data-v-3bded0ae"]]), dt = (s) => (C("data-v-9c9fcaf5"), s = s(), L(), s), ct = { 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" }, ut = { class: "flex min-w-0 items-center gap-2 text-xl font-bold tracking-tight text-[#181C23] md:text-2xl lg:text-3xl" }, pt = { class: "truncate" }, mt = { class: "text-[#B26A00]" }, _t = /* @__PURE__ */ dt(() => /* @__PURE__ */ t("span", {
|
|
284
284
|
class: "wave inline-block shrink-0",
|
|
285
285
|
"aria-hidden": "true"
|
|
286
|
-
}, "👋", -1)), ht = ["disabled"], ft = /* @__PURE__ */
|
|
286
|
+
}, "👋", -1)), ht = ["disabled"], ft = /* @__PURE__ */ k({
|
|
287
287
|
__name: "greetingsAMA",
|
|
288
288
|
setup(s) {
|
|
289
|
-
const e =
|
|
289
|
+
const e = j(), r = B(() => e.learnerName || "Learner");
|
|
290
290
|
B(() => `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.`);
|
|
291
291
|
const i = () => {
|
|
292
292
|
!e.conversations.length || e.dotLoader || (e.conversations = [], e.past_messages = []);
|
|
293
293
|
};
|
|
294
|
-
return (p, d) => (u(),
|
|
294
|
+
return (p, d) => (u(), _("section", ct, [
|
|
295
295
|
t("h2", ut, [
|
|
296
296
|
t("span", pt, [
|
|
297
|
-
|
|
298
|
-
t("span",
|
|
299
|
-
|
|
297
|
+
q(" Hi "),
|
|
298
|
+
t("span", mt, $(r.value), 1),
|
|
299
|
+
q("! ")
|
|
300
300
|
]),
|
|
301
|
-
|
|
301
|
+
_t
|
|
302
302
|
]),
|
|
303
303
|
t("button", {
|
|
304
304
|
type: "button",
|
|
@@ -306,28 +306,28 @@ const lt = /* @__PURE__ */ k(it, [["__scopeId", "data-v-3bded0ae"]]), ct = (s) =
|
|
|
306
306
|
class: "flex shrink-0 items-center gap-1.5 rounded-full border border-[#FFAB28]/50 bg-[#FFF4E0] px-3.5 py-1.5 text-xs font-semibold text-[#7A4A00] shadow-sm transition hover:-translate-y-0.5 hover:border-[#FFAB28] hover:bg-[#FFAB28] hover:text-[#181C23] hover:shadow-md disabled:pointer-events-none disabled:opacity-50 md:text-sm",
|
|
307
307
|
onClick: d[0] || (d[0] = (a) => i())
|
|
308
308
|
}, [
|
|
309
|
-
|
|
309
|
+
b(c(ve), {
|
|
310
310
|
class: "h-4 w-4",
|
|
311
311
|
"aria-hidden": "true"
|
|
312
312
|
}),
|
|
313
|
-
|
|
313
|
+
q(" New chat ")
|
|
314
314
|
], 8, ht)
|
|
315
315
|
]));
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
|
-
const gt = /* @__PURE__ */
|
|
318
|
+
const gt = /* @__PURE__ */ F(ft, [["__scopeId", "data-v-9c9fcaf5"]]), R = (s) => String(s.query.amaId ?? "");
|
|
319
319
|
function xt(s, e, r, i, p, d = (a) => !1) {
|
|
320
|
-
const a =
|
|
320
|
+
const a = w(!1);
|
|
321
321
|
let o = 0, h = !0;
|
|
322
322
|
const n = () => {
|
|
323
323
|
o += 1, a.value = !1, e.dotLoader = !1;
|
|
324
324
|
};
|
|
325
|
-
|
|
325
|
+
z(() => R(s), n), W(() => {
|
|
326
326
|
h = !1, n();
|
|
327
327
|
});
|
|
328
|
-
const l = (
|
|
328
|
+
const l = (v, m) => h && v === o && m === R(s);
|
|
329
329
|
return { isWaitingResponse: a, sendQuestion: async () => {
|
|
330
|
-
var
|
|
330
|
+
var I, S, g;
|
|
331
331
|
if (e.question.trim().length < 1) {
|
|
332
332
|
r.setError("Please enter question!");
|
|
333
333
|
return;
|
|
@@ -336,28 +336,28 @@ function xt(s, e, r, i, p, d = (a) => !1) {
|
|
|
336
336
|
r.setError("You have exhausted your question limit!");
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const v = ++o, m = R(s);
|
|
340
340
|
a.value = !0, e.dotLoader = !0;
|
|
341
|
-
const
|
|
342
|
-
e.conversations.push({ question:
|
|
343
|
-
const
|
|
344
|
-
skillId:
|
|
345
|
-
question:
|
|
341
|
+
const f = e.question;
|
|
342
|
+
e.conversations.push({ question: f }), e.question = "";
|
|
343
|
+
const y = {
|
|
344
|
+
skillId: m,
|
|
345
|
+
question: f,
|
|
346
346
|
past_messages: e.past_messages
|
|
347
347
|
};
|
|
348
348
|
try {
|
|
349
|
-
const
|
|
350
|
-
if (!l(
|
|
349
|
+
const A = await i(y);
|
|
350
|
+
if (!l(v, m))
|
|
351
351
|
return;
|
|
352
|
-
e.addConversation((
|
|
353
|
-
} catch (
|
|
354
|
-
if (d(
|
|
352
|
+
e.addConversation((I = A.data) == null ? void 0 : I.body, "new"), a.value = !1, e.dotLoader = !1;
|
|
353
|
+
} catch (A) {
|
|
354
|
+
if (d(A) || !l(v, m))
|
|
355
355
|
return;
|
|
356
|
-
a.value = !1, e.dotLoader = !1, p(
|
|
356
|
+
a.value = !1, e.dotLoader = !1, p(A) ? r.setError((g = (S = A.response) == null ? void 0 : S.data) == null ? void 0 : g.message) : r.setError("There was an issue, please contact helpmate");
|
|
357
357
|
}
|
|
358
358
|
} };
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const X = (s) => (C("data-v-2d1373dd"), s = s(), L(), s), vt = { class: "w-full px-4 pb-4 pt-3 md:px-10 lg:px-12" }, bt = { class: "relative" }, wt = { class: "pointer-events-none absolute inset-y-0 left-3 flex items-center md:left-4" }, yt = {
|
|
361
361
|
class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
|
|
362
362
|
"aria-hidden": "true"
|
|
363
363
|
}, At = ["placeholder"], kt = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, $t = {
|
|
@@ -366,29 +366,29 @@ const U = (s) => (M("data-v-81aaf2f7"), s = s(), q(), s), vt = { class: "w-full
|
|
|
366
366
|
role: "status",
|
|
367
367
|
"aria-label": "Waiting for response",
|
|
368
368
|
title: "Waiting for response"
|
|
369
|
-
}, Ft = /* @__PURE__ */
|
|
369
|
+
}, Ft = /* @__PURE__ */ X(() => /* @__PURE__ */ t("span", { class: "h-5 w-5 animate-spin rounded-full border-[2.5px] border-[#FFAB28] border-t-transparent" }, null, -1)), Mt = [
|
|
370
370
|
Ft
|
|
371
|
-
], qt = { class: "fontFormattingAMA flex flex-
|
|
371
|
+
], qt = { class: "fontFormattingAMA flex flex-col items-center gap-x-1.5 gap-y-0.5 pt-2 text-center text-xs text-gray-500 sm:flex-row sm:flex-wrap sm:justify-center md:text-sm" }, Ct = ["aria-expanded"], Lt = /* @__PURE__ */ X(() => /* @__PURE__ */ t("span", {
|
|
372
372
|
class: "hidden sm:inline",
|
|
373
373
|
"aria-hidden": "true"
|
|
374
|
-
}, "·", -1)), It = { class: "font-semibold text-[#181C23]" }, St = /* @__PURE__ */
|
|
374
|
+
}, "·", -1)), It = { class: "font-semibold text-[#181C23]" }, St = /* @__PURE__ */ k({
|
|
375
375
|
__name: "NewQuestionAMA",
|
|
376
376
|
setup(s) {
|
|
377
|
-
const e =
|
|
377
|
+
const e = j(), r = H();
|
|
378
378
|
e.question = "";
|
|
379
|
-
const i =
|
|
380
|
-
|
|
379
|
+
const i = w(null), p = w(!1), d = w(!1), a = w(N), o = D(), h = Y(), { isWaitingResponse: n, sendQuestion: l } = xt(
|
|
380
|
+
o,
|
|
381
381
|
e,
|
|
382
382
|
r,
|
|
383
|
-
(m) =>
|
|
384
|
-
|
|
383
|
+
(m) => h.postApi("/amaBotResponse", m),
|
|
384
|
+
me.isAxiosError,
|
|
385
385
|
J
|
|
386
386
|
);
|
|
387
387
|
G(() => {
|
|
388
388
|
i.value.focus();
|
|
389
389
|
});
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const x = B(() => e.question.trim().length > 0);
|
|
391
|
+
z(
|
|
392
392
|
() => e.question,
|
|
393
393
|
async () => {
|
|
394
394
|
await O();
|
|
@@ -396,39 +396,39 @@ const U = (s) => (M("data-v-81aaf2f7"), s = s(), q(), s), vt = { class: "w-full
|
|
|
396
396
|
m && (m.style.height = "auto", m.style.height = `${m.scrollHeight}px`);
|
|
397
397
|
}
|
|
398
398
|
);
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
|
|
399
|
+
const v = (m) => {
|
|
400
|
+
const f = m.length;
|
|
401
|
+
a.value = N - f, p.value = f >= N;
|
|
402
402
|
};
|
|
403
|
-
return (m,
|
|
403
|
+
return (m, f) => (u(), _("div", vt, [
|
|
404
404
|
t("div", bt, [
|
|
405
405
|
t("div", wt, [
|
|
406
406
|
t("span", yt, [
|
|
407
|
-
|
|
407
|
+
b(c(xe), { class: "h-4 w-4 md:h-5 md:w-5" })
|
|
408
408
|
])
|
|
409
409
|
]),
|
|
410
410
|
_e(t("textarea", {
|
|
411
411
|
ref_key: "AiSearch",
|
|
412
412
|
ref: i,
|
|
413
|
-
"onUpdate:modelValue":
|
|
413
|
+
"onUpdate:modelValue": f[0] || (f[0] = (y) => c(e).question = y),
|
|
414
414
|
rows: "1",
|
|
415
415
|
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",
|
|
416
416
|
placeholder: `Ask me about ${c(e).amaSkillName || "Skill Name"}`,
|
|
417
|
-
onKeydown:
|
|
418
|
-
onInput:
|
|
417
|
+
onKeydown: f[1] || (f[1] = fe(K((y) => c(n) ? "" : c(l)(), ["exact", "prevent"]), ["enter"])),
|
|
418
|
+
onInput: f[2] || (f[2] = (y) => v(c(e).question))
|
|
419
419
|
}, null, 40, At), [
|
|
420
|
-
[
|
|
420
|
+
[he, c(e).question]
|
|
421
421
|
]),
|
|
422
422
|
t("div", kt, [
|
|
423
|
-
c(
|
|
423
|
+
c(n) ? (u(), _("span", $t, Mt)) : (u(), _("button", {
|
|
424
424
|
key: 0,
|
|
425
425
|
type: "button",
|
|
426
426
|
title: "Send",
|
|
427
427
|
"aria-label": "Send question",
|
|
428
|
-
class:
|
|
429
|
-
onClick:
|
|
428
|
+
class: Q([x.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"]),
|
|
429
|
+
onClick: f[3] || (f[3] = (y) => c(l)())
|
|
430
430
|
}, [
|
|
431
|
-
|
|
431
|
+
b(c(se), {
|
|
432
432
|
class: "h-5 w-5",
|
|
433
433
|
"aria-hidden": "true"
|
|
434
434
|
})
|
|
@@ -436,27 +436,39 @@ const U = (s) => (M("data-v-81aaf2f7"), s = s(), q(), s), vt = { class: "w-full
|
|
|
436
436
|
])
|
|
437
437
|
]),
|
|
438
438
|
t("div", qt, [
|
|
439
|
-
|
|
440
|
-
class: "
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
t("div", {
|
|
440
|
+
class: Q([d.value ? "flex-wrap" : "", "flex min-w-0 max-w-full items-center justify-center gap-x-1.5 sm:contents"])
|
|
441
|
+
}, [
|
|
442
|
+
b(c(oe), {
|
|
443
|
+
class: "h-4 w-4 shrink-0 text-[#E08A00]",
|
|
444
|
+
"aria-hidden": "true"
|
|
445
|
+
}),
|
|
446
|
+
t("span", {
|
|
447
|
+
class: Q([d.value ? "" : "truncate sm:overflow-visible sm:whitespace-normal", "min-w-0"])
|
|
448
|
+
}, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ", 2),
|
|
449
|
+
t("button", {
|
|
450
|
+
type: "button",
|
|
451
|
+
class: "shrink-0 font-semibold text-[#E08A00] underline-offset-2 hover:underline sm:hidden",
|
|
452
|
+
"aria-expanded": d.value,
|
|
453
|
+
onClick: f[4] || (f[4] = (y) => d.value = !d.value)
|
|
454
|
+
}, $(d.value ? "View less" : "View more"), 9, Ct)
|
|
455
|
+
], 2),
|
|
444
456
|
Lt,
|
|
445
|
-
t("span", It,
|
|
457
|
+
t("span", It, $(c(e).amaQuestionsLeft) + " questions remaining for the day", 1)
|
|
446
458
|
])
|
|
447
459
|
]));
|
|
448
460
|
}
|
|
449
461
|
});
|
|
450
|
-
const Bt = /* @__PURE__ */
|
|
462
|
+
const Bt = /* @__PURE__ */ F(St, [["__scopeId", "data-v-2d1373dd"]]), Et = (s) => (C("data-v-fb943644"), s = s(), L(), s), jt = {
|
|
451
463
|
class: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#FDF3E1] text-[#C68A16]",
|
|
452
464
|
"aria-hidden": "true"
|
|
453
|
-
},
|
|
465
|
+
}, Nt = /* @__PURE__ */ Et(() => /* @__PURE__ */ t("div", { class: "mt-3 text-xs font-bold uppercase tracking-[0.12em] text-[#C68A16]" }, "Heads up", -1)), Qt = {
|
|
454
466
|
id: "ama-error-text",
|
|
455
467
|
class: "mt-1.5 text-base font-semibold leading-snug text-[#181C23]"
|
|
456
|
-
}, Rt = /* @__PURE__ */
|
|
468
|
+
}, Rt = /* @__PURE__ */ k({
|
|
457
469
|
__name: "errorPopupAMA",
|
|
458
470
|
setup(s) {
|
|
459
|
-
const e =
|
|
471
|
+
const e = H(), r = w(""), i = w(null), p = () => {
|
|
460
472
|
r.value = "";
|
|
461
473
|
};
|
|
462
474
|
e.$subscribe(
|
|
@@ -471,9 +483,9 @@ const Bt = /* @__PURE__ */ k(St, [["__scopeId", "data-v-81aaf2f7"]]), Et = (s) =
|
|
|
471
483
|
const d = (a) => {
|
|
472
484
|
r.value && a.key === "Escape" && p();
|
|
473
485
|
};
|
|
474
|
-
return G(() => window.addEventListener("keydown", d)), ge(() => window.removeEventListener("keydown", d)), (a, o) => (u(),
|
|
486
|
+
return G(() => window.addEventListener("keydown", d)), ge(() => window.removeEventListener("keydown", d)), (a, o) => (u(), V(P, { name: "ama-popup" }, {
|
|
475
487
|
default: T(() => [
|
|
476
|
-
r.value ? (u(),
|
|
488
|
+
r.value ? (u(), _("div", {
|
|
477
489
|
key: 0,
|
|
478
490
|
class: "fixed inset-0 z-[99999] flex items-center justify-center bg-[#181C23]/35 p-4 backdrop-blur-[2px]",
|
|
479
491
|
onClick: p
|
|
@@ -486,11 +498,11 @@ const Bt = /* @__PURE__ */ k(St, [["__scopeId", "data-v-81aaf2f7"]]), Et = (s) =
|
|
|
486
498
|
onClick: o[0] || (o[0] = K(() => {
|
|
487
499
|
}, ["stop"]))
|
|
488
500
|
}, [
|
|
489
|
-
t("span",
|
|
490
|
-
|
|
501
|
+
t("span", jt, [
|
|
502
|
+
b(c(ne), { class: "h-5 w-5" })
|
|
491
503
|
]),
|
|
492
|
-
|
|
493
|
-
t("div", Qt,
|
|
504
|
+
Nt,
|
|
505
|
+
t("div", Qt, $(r.value), 1),
|
|
494
506
|
t("button", {
|
|
495
507
|
ref_key: "okButton",
|
|
496
508
|
ref: i,
|
|
@@ -499,42 +511,42 @@ const Bt = /* @__PURE__ */ k(St, [["__scopeId", "data-v-81aaf2f7"]]), Et = (s) =
|
|
|
499
511
|
onClick: p
|
|
500
512
|
}, " Got it ", 512)
|
|
501
513
|
])
|
|
502
|
-
])) :
|
|
514
|
+
])) : M("", !0)
|
|
503
515
|
]),
|
|
504
516
|
_: 1
|
|
505
517
|
}));
|
|
506
518
|
}
|
|
507
519
|
});
|
|
508
|
-
const
|
|
509
|
-
function
|
|
510
|
-
const d =
|
|
520
|
+
const Vt = /* @__PURE__ */ F(Rt, [["__scopeId", "data-v-fb943644"]]), Tt = (s) => String(s.query.amaId ?? "");
|
|
521
|
+
function Gt(s, e, r, i, p = (d) => !1) {
|
|
522
|
+
const d = w(!0), a = w(!1);
|
|
511
523
|
let o = 0;
|
|
512
524
|
const h = (l) => {
|
|
513
525
|
e.amaSkillId = l, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
|
|
514
526
|
}, n = async (l) => {
|
|
515
|
-
var
|
|
527
|
+
var m, f, y, I, S;
|
|
516
528
|
const x = ++o;
|
|
517
529
|
d.value = !0, a.value = !1, h(l);
|
|
518
|
-
let
|
|
530
|
+
let v = !1;
|
|
519
531
|
try {
|
|
520
532
|
const g = await i(l);
|
|
521
533
|
if (x !== o)
|
|
522
534
|
return;
|
|
523
|
-
e.initialize(g.data), e.amaQuestionsLeft = (
|
|
535
|
+
e.initialize(g.data), e.amaQuestionsLeft = (m = g == null ? void 0 : g.data) == null ? void 0 : m.questionsLeftAIGC, e.amaSkillName = (f = g == null ? void 0 : g.data) == null ? void 0 : f.skillName;
|
|
524
536
|
} catch (g) {
|
|
525
537
|
if (p(g)) {
|
|
526
|
-
|
|
538
|
+
v = !0;
|
|
527
539
|
return;
|
|
528
540
|
}
|
|
529
541
|
if (x !== o)
|
|
530
542
|
return;
|
|
531
|
-
const
|
|
532
|
-
|
|
543
|
+
const A = g && typeof g == "object" && ((y = g.response) == null ? void 0 : y.status);
|
|
544
|
+
A === 424 || A === 425 ? a.value = !0 : A ? r.setError((S = (I = g.response) == null ? void 0 : I.data) == null ? void 0 : S.message) : r.setError("There was an issue, please contact helpmate");
|
|
533
545
|
} finally {
|
|
534
|
-
!
|
|
546
|
+
!v && x === o && (d.value = !1);
|
|
535
547
|
}
|
|
536
548
|
};
|
|
537
|
-
return
|
|
549
|
+
return z(() => Tt(s), (l) => {
|
|
538
550
|
n(l);
|
|
539
551
|
}, { immediate: !0 }), W(() => {
|
|
540
552
|
o += 1;
|
|
@@ -543,43 +555,43 @@ function Vt(s, e, r, i, p = (d) => !1) {
|
|
|
543
555
|
const zt = {
|
|
544
556
|
key: 1,
|
|
545
557
|
class: "flex h-screen flex-col overflow-hidden"
|
|
546
|
-
}, Ht = { class: "z-20 shrink-0" }, Ut = { class: "min-h-0 flex-1 overflow-hidden pb-1" }, Pt = { class: "flex h-full flex-col bg-gray-100 px-2 sm:px-6 md:px-10 lg:px-20" }, Wt = { class: "fontFormattingAMA flex min-h-0 flex-1 flex-col border-x border-b border-black bg-white pt-3 md:pt-4" }, Dt = { class: "shrink-0" }, Ot = /* @__PURE__ */
|
|
558
|
+
}, Ht = { class: "z-20 shrink-0" }, Ut = { class: "min-h-0 flex-1 overflow-hidden pb-1" }, Pt = { class: "flex h-full flex-col bg-gray-100 px-2 sm:px-6 md:px-10 lg:px-20" }, Wt = { class: "fontFormattingAMA flex min-h-0 flex-1 flex-col border-x border-b border-black bg-white pt-3 md:pt-4" }, Dt = { class: "shrink-0" }, Ot = /* @__PURE__ */ k({
|
|
547
559
|
__name: "AMABot",
|
|
548
560
|
setup(s) {
|
|
549
|
-
const e =
|
|
561
|
+
const e = j(), r = H(), i = D(), p = Y(), { loaderValue: d, notAllowedModalVisible: a } = Gt(
|
|
550
562
|
i,
|
|
551
563
|
e,
|
|
552
564
|
r,
|
|
553
565
|
(o) => p.getApi(`/getLearnerData?amaSkillId=${o}`),
|
|
554
566
|
J
|
|
555
567
|
);
|
|
556
|
-
return (o, h) => (u(),
|
|
557
|
-
c(a) ? (u(),
|
|
568
|
+
return (o, h) => (u(), _("section", null, [
|
|
569
|
+
c(a) ? (u(), V(ae, {
|
|
558
570
|
key: 0,
|
|
559
571
|
tone: "error",
|
|
560
572
|
title: "Assessment Access Required"
|
|
561
573
|
}, {
|
|
562
574
|
default: T(() => [
|
|
563
|
-
|
|
575
|
+
q(" You don't have access to this assessment. Please contact to administrator ")
|
|
564
576
|
]),
|
|
565
577
|
_: 1
|
|
566
|
-
})) :
|
|
567
|
-
|
|
578
|
+
})) : M("", !0),
|
|
579
|
+
b(Vt),
|
|
568
580
|
t("div", null, [
|
|
569
|
-
c(d) ? (u(),
|
|
581
|
+
c(d) ? (u(), V(re, {
|
|
570
582
|
key: 0,
|
|
571
583
|
message: "Loading AI Guru"
|
|
572
|
-
})) : (u(),
|
|
584
|
+
})) : (u(), _("main", zt, [
|
|
573
585
|
t("div", Ht, [
|
|
574
|
-
|
|
586
|
+
b(qe)
|
|
575
587
|
]),
|
|
576
588
|
t("section", Ut, [
|
|
577
589
|
t("div", Pt, [
|
|
578
590
|
t("div", Wt, [
|
|
579
|
-
|
|
580
|
-
|
|
591
|
+
b(gt, { class: "shrink-0" }),
|
|
592
|
+
b(lt, { class: "min-h-0 flex-1 pt-3" }),
|
|
581
593
|
t("div", Dt, [
|
|
582
|
-
|
|
594
|
+
b(Bt)
|
|
583
595
|
])
|
|
584
596
|
])
|
|
585
597
|
])
|
|
@@ -589,7 +601,7 @@ const zt = {
|
|
|
589
601
|
]));
|
|
590
602
|
}
|
|
591
603
|
});
|
|
592
|
-
const ts = /* @__PURE__ */
|
|
604
|
+
const ts = /* @__PURE__ */ F(Ot, [["__scopeId", "data-v-d2dc4f82"]]);
|
|
593
605
|
export {
|
|
594
606
|
ts as default
|
|
595
607
|
};
|