@genpact/genome.mfe.mgtwin-app 1.1.114-alpha → 1.1.114
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-f6986a2a.mjs +607 -0
- package/dist/AssessmentSimulation-b628c9de.mjs +32650 -0
- package/dist/EditSkillAdminData-963d89ff.mjs +259 -0
- package/dist/EditSkillData-611054c7.mjs +277 -0
- package/dist/HomeView-9867ffe4.mjs +1742 -0
- package/dist/Loading-1971b3a0.mjs +18 -0
- package/dist/PromptTesting-6374daac.mjs +383 -0
- package/dist/SkillAutomation-56ea9d2e.mjs +112 -0
- package/dist/SkillData-61e2b4a8.mjs +218 -0
- package/dist/UnderMaintenance-9eba6d51.mjs +20 -0
- package/dist/_commonjsHelpers-e8a12996.mjs +52 -0
- package/dist/api-d0467592.mjs +249 -0
- package/dist/constants-e0c83ac4.mjs +8 -0
- package/dist/genome-Logo-white-ffcf2413.mjs +4 -0
- package/dist/html2canvas.esm-7570f311.mjs +4886 -0
- package/dist/index.es-d8a5f937.mjs +5776 -0
- package/dist/loadernew-ac153a51.mjs +4 -0
- package/dist/main-43a6e9d3.mjs +7513 -0
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +279 -25
- package/dist/native/aiguru-native.css +1 -0
- package/dist/native/aiguru-native.umd.min.js +285 -0
- package/dist/native/favicon.ico +0 -0
- package/dist/native/guru_gpt.png +0 -0
- package/dist/purify.es-e2b9a570.mjs +563 -0
- package/dist/scout-icon-090a8a8b.mjs +4 -0
- package/dist/simulationPopup.vue_vue_type_script_setup_true_lang-50a88b15.mjs +161 -0
- package/dist/style.css +1 -1
- package/package.json +14 -4
- package/dist/ArrowLeftCircleIcon-6e394843.mjs +0 -18
- package/dist/EditSkillAdminData-330ebfed.mjs +0 -271
- package/dist/EditSkillData-d7c886f0.mjs +0 -240
- package/dist/HomeView-7d9f53c6.mjs +0 -1771
- package/dist/Loading-1e4f37de.mjs +0 -18
- package/dist/MagnifyingGlassIcon-27192d05.mjs +0 -18
- package/dist/PaperAirplaneIcon-a37427a0.mjs +0 -14
- package/dist/PromptTesting-bfb29871.mjs +0 -364
- package/dist/SkillAutomation-c97e7903.mjs +0 -111
- package/dist/SkillData-d980f182.mjs +0 -199
- package/dist/UnderMaintenance-550b5625.mjs +0 -19
- package/dist/loadernew-c4ba445f.mjs +0 -8
- package/dist/main-1b373bae.mjs +0 -7310
|
@@ -0,0 +1,607 @@
|
|
|
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-50a88b15.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-43a6e9d3.mjs";
|
|
4
|
+
import { _ as F } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { u as Y, i as J } from "./api-d0467592.mjs";
|
|
6
|
+
import "./loadernew-ac153a51.mjs";
|
|
7
|
+
function xe(s, e) {
|
|
8
|
+
return u(), _("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 ve(s, e) {
|
|
24
|
+
return u(), _("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
|
+
function be(s, e) {
|
|
40
|
+
return u(), _("svg", {
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
fill: "none",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
"stroke-width": "1.5",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
}, [
|
|
48
|
+
t("path", {
|
|
49
|
+
"stroke-linecap": "round",
|
|
50
|
+
"stroke-linejoin": "round",
|
|
51
|
+
d: "M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"
|
|
52
|
+
})
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
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
|
+
class: "h-16 w-auto cursor-pointer",
|
|
57
|
+
src: te,
|
|
58
|
+
alt: "Genome Logo"
|
|
59
|
+
}, null, -1), ke = [
|
|
60
|
+
Ae
|
|
61
|
+
], $e = ["href"], Fe = /* @__PURE__ */ t("img", {
|
|
62
|
+
class: "h-6 w-28 cursor-pointer md:w-36",
|
|
63
|
+
src: ie,
|
|
64
|
+
alt: "Aiguru Logo"
|
|
65
|
+
}, null, -1), Me = [
|
|
66
|
+
Fe
|
|
67
|
+
], qe = /* @__PURE__ */ k({
|
|
68
|
+
__name: "headerAMA",
|
|
69
|
+
setup(s) {
|
|
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
|
+
t("a", {
|
|
73
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
74
|
+
href: c(e).url(r.value),
|
|
75
|
+
target: "_blank"
|
|
76
|
+
}, ke, 8, ye),
|
|
77
|
+
t("a", {
|
|
78
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
79
|
+
href: c(e).url(i.value),
|
|
80
|
+
target: "_blank"
|
|
81
|
+
}, Me, 8, $e)
|
|
82
|
+
]));
|
|
83
|
+
}
|
|
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
|
+
__name: "responseAMA",
|
|
86
|
+
props: {
|
|
87
|
+
answer: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
setup(s) {
|
|
93
|
+
const e = s, r = E(), i = (a) => a.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*/g, ""), p = (a) => {
|
|
94
|
+
const o = [];
|
|
95
|
+
let h = [];
|
|
96
|
+
const n = () => {
|
|
97
|
+
h.length && (o.push({ html: `<ul style="list-style: disc; margin: 0 0 0 2.5rem; padding: 0;">${h.join("")}</ul>`, block: !0 }), h = []);
|
|
98
|
+
};
|
|
99
|
+
for (const l of a.split(`
|
|
100
|
+
`)) {
|
|
101
|
+
if (!l.trim()) {
|
|
102
|
+
n();
|
|
103
|
+
const m = o[o.length - 1];
|
|
104
|
+
m && !m.block && m.html !== "" && o.push({ html: "", block: !1 });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const x = l.match(/^\s*[-*•]\s+(.*)$/);
|
|
108
|
+
if (x) {
|
|
109
|
+
h.push(`<li>${i(x[1])}</li>`);
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
n();
|
|
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
|
+
}
|
|
116
|
+
n();
|
|
117
|
+
for (let l = o.length - 2; l >= 0; l--)
|
|
118
|
+
o[l].html === "" && !o[l].block && o[l + 1].block && o.splice(l, 1);
|
|
119
|
+
for (; o.length && o[o.length - 1].html === ""; )
|
|
120
|
+
o.pop();
|
|
121
|
+
return o.reduce((l, x, v) => v === 0 ? x.html : l + (x.block || o[v - 1].block ? "" : `
|
|
122
|
+
`) + x.html, "");
|
|
123
|
+
}, d = B(() => {
|
|
124
|
+
const a = p(e.answer).replace(
|
|
125
|
+
/Assessment Rating & Feedback/g,
|
|
126
|
+
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
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
|
+
return r.html(h);
|
|
129
|
+
});
|
|
130
|
+
return (a, o) => (u(), _("div", Le, [
|
|
131
|
+
t("div", Ie, [
|
|
132
|
+
t("div", Se, [
|
|
133
|
+
t("span", {
|
|
134
|
+
class: "fontFormattingAMA answer-link",
|
|
135
|
+
innerHTML: d.value
|
|
136
|
+
}, null, 8, Be)
|
|
137
|
+
]),
|
|
138
|
+
Ee
|
|
139
|
+
])
|
|
140
|
+
]));
|
|
141
|
+
}
|
|
142
|
+
});
|
|
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
|
+
__name: "learnerAMA",
|
|
145
|
+
props: {
|
|
146
|
+
question: {
|
|
147
|
+
type: String,
|
|
148
|
+
required: !0
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
setup(s) {
|
|
152
|
+
return (e, r) => (u(), _("div", Qe, [
|
|
153
|
+
t("div", Re, [
|
|
154
|
+
t("div", Ve, [
|
|
155
|
+
t("div", Te, $(s.question), 1)
|
|
156
|
+
]),
|
|
157
|
+
Ge
|
|
158
|
+
])
|
|
159
|
+
]));
|
|
160
|
+
}
|
|
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
|
+
class: "flex items-center gap-2.5",
|
|
163
|
+
role: "status",
|
|
164
|
+
"aria-live": "polite"
|
|
165
|
+
}, De = /* @__PURE__ */ U(() => /* @__PURE__ */ t("span", {
|
|
166
|
+
class: "dots flex shrink-0 items-center gap-1",
|
|
167
|
+
"aria-hidden": "true"
|
|
168
|
+
}, [
|
|
169
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
170
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
|
|
171
|
+
/* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
|
|
172
|
+
], -1)), Oe = /* @__PURE__ */ U(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
|
|
173
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
|
|
174
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
|
|
175
|
+
/* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
|
|
176
|
+
], -1)), Ke = /* @__PURE__ */ U(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ye = /* @__PURE__ */ k({
|
|
177
|
+
__name: "LoadingResponseAMA",
|
|
178
|
+
setup(s) {
|
|
179
|
+
const e = E(), r = [
|
|
180
|
+
"Generating response",
|
|
181
|
+
"Fetching the best response for you",
|
|
182
|
+
"Thinking... give me a moment",
|
|
183
|
+
"One moment while I gather the information",
|
|
184
|
+
"Hang in tight, we are almost there",
|
|
185
|
+
"Almost there... just a bit longer",
|
|
186
|
+
"Compiling a response for you"
|
|
187
|
+
], i = w(0), p = setInterval(() => {
|
|
188
|
+
var d, a;
|
|
189
|
+
!((a = (d = e.scope) == null ? void 0 : d.isActive) != null && a.call(d)) && e.native || (i.value = (i.value + 1) % r.length);
|
|
190
|
+
}, 5e3);
|
|
191
|
+
return e.own(() => clearInterval(p)), (d, a) => (u(), _("div", He, [
|
|
192
|
+
t("div", Ue, [
|
|
193
|
+
t("div", Pe, [
|
|
194
|
+
t("div", We, [
|
|
195
|
+
De,
|
|
196
|
+
b(P, {
|
|
197
|
+
name: "fade",
|
|
198
|
+
mode: "out-in"
|
|
199
|
+
}, {
|
|
200
|
+
default: T(() => [
|
|
201
|
+
(u(), _("span", {
|
|
202
|
+
key: i.value,
|
|
203
|
+
class: "text-xs italic leading-4 text-gray-500"
|
|
204
|
+
}, $(r[i.value]), 1))
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
})
|
|
208
|
+
]),
|
|
209
|
+
Oe
|
|
210
|
+
]),
|
|
211
|
+
Ke
|
|
212
|
+
])
|
|
213
|
+
]));
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
const Je = /* @__PURE__ */ F(Ye, [["__scopeId", "data-v-a8911c8a"]]), Z = (s) => (C("data-v-3bded0ae"), s = s(), L(), s), Ze = {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "fontFormattingAMA flex h-full min-h-[260px] flex-col items-center justify-center px-2 py-8 text-center"
|
|
219
|
+
}, Xe = {
|
|
220
|
+
class: "flex h-14 w-14 items-center justify-center rounded-full bg-[#FFF4E0] ring-8 ring-[#FFF4E0]/50 md:h-16 md:w-16",
|
|
221
|
+
"aria-hidden": "true"
|
|
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
|
+
key: 1,
|
|
224
|
+
class: "flex"
|
|
225
|
+
}, it = /* @__PURE__ */ k({
|
|
226
|
+
__name: "conversationAMA",
|
|
227
|
+
setup(s) {
|
|
228
|
+
let e = w(""), r = w("");
|
|
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 = j(), p = E(), d = w(), a = () => {
|
|
231
|
+
var n;
|
|
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
|
+
h.length && ((n = h.pop()) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
234
|
+
};
|
|
235
|
+
return G(a), ce(a), (o, h) => (u(), _("div", {
|
|
236
|
+
ref_key: "nestedElement",
|
|
237
|
+
ref: d,
|
|
238
|
+
class: "smooth-scroll overflow-auto px-4 md:px-10 lg:px-12"
|
|
239
|
+
}, [
|
|
240
|
+
!c(i).conversations.length && !c(i).dotLoader ? (u(), _("div", Ze, [
|
|
241
|
+
t("span", Xe, [
|
|
242
|
+
b(c(be), { class: "h-7 w-7 text-[#E08A00] md:h-8 md:w-8" })
|
|
243
|
+
]),
|
|
244
|
+
et,
|
|
245
|
+
t("p", tt, [
|
|
246
|
+
q(" What would you like to know about "),
|
|
247
|
+
t("span", st, $(c(i).amaSkillName || "Skill"), 1),
|
|
248
|
+
q("? ")
|
|
249
|
+
]),
|
|
250
|
+
ot
|
|
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
|
+
question: n.question,
|
|
256
|
+
c2question: n.c2question,
|
|
257
|
+
"show-feedback": n.showFeedback,
|
|
258
|
+
id: `qId${l}`,
|
|
259
|
+
name: "askQuestion",
|
|
260
|
+
"que-id": l
|
|
261
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
262
|
+
])) : M("", !0),
|
|
263
|
+
n.answer ? (u(), _("div", at, [
|
|
264
|
+
b(Ne, {
|
|
265
|
+
question: n == null ? void 0 : n.question,
|
|
266
|
+
c2question: n == null ? void 0 : n.c2question,
|
|
267
|
+
"show-sources": n == null ? void 0 : n.showSources,
|
|
268
|
+
questionId: n.id,
|
|
269
|
+
answer: n.answer.replaceAll("<a", c(e)).replaceAll("<ul", c(r)),
|
|
270
|
+
"show-feedback": n.showFeedback,
|
|
271
|
+
"related-ques": n.relatedQues,
|
|
272
|
+
"options-array": n.optionsArray,
|
|
273
|
+
"ans-id": l
|
|
274
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
275
|
+
])) : M("", !0)
|
|
276
|
+
]))), 128)),
|
|
277
|
+
c(i).dotLoader ? (u(), _("div", rt, [
|
|
278
|
+
b(Je)
|
|
279
|
+
])) : M("", !0)
|
|
280
|
+
], 512));
|
|
281
|
+
}
|
|
282
|
+
});
|
|
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
|
+
class: "wave inline-block shrink-0",
|
|
285
|
+
"aria-hidden": "true"
|
|
286
|
+
}, "👋", -1)), ht = ["disabled"], ft = /* @__PURE__ */ k({
|
|
287
|
+
__name: "greetingsAMA",
|
|
288
|
+
setup(s) {
|
|
289
|
+
const e = j(), r = B(() => e.learnerName || "Learner");
|
|
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
|
+
const i = () => {
|
|
292
|
+
!e.conversations.length || e.dotLoader || (e.conversations = [], e.past_messages = []);
|
|
293
|
+
};
|
|
294
|
+
return (p, d) => (u(), _("section", ct, [
|
|
295
|
+
t("h2", ut, [
|
|
296
|
+
t("span", pt, [
|
|
297
|
+
q(" Hi "),
|
|
298
|
+
t("span", mt, $(r.value), 1),
|
|
299
|
+
q("! ")
|
|
300
|
+
]),
|
|
301
|
+
_t
|
|
302
|
+
]),
|
|
303
|
+
t("button", {
|
|
304
|
+
type: "button",
|
|
305
|
+
disabled: !c(e).conversations.length || c(e).dotLoader,
|
|
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
|
+
onClick: d[0] || (d[0] = (a) => i())
|
|
308
|
+
}, [
|
|
309
|
+
b(c(ve), {
|
|
310
|
+
class: "h-4 w-4",
|
|
311
|
+
"aria-hidden": "true"
|
|
312
|
+
}),
|
|
313
|
+
q(" New chat ")
|
|
314
|
+
], 8, ht)
|
|
315
|
+
]));
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
const gt = /* @__PURE__ */ F(ft, [["__scopeId", "data-v-9c9fcaf5"]]), R = (s) => String(s.query.amaId ?? "");
|
|
319
|
+
function xt(s, e, r, i, p, d = (a) => !1) {
|
|
320
|
+
const a = w(!1);
|
|
321
|
+
let o = 0, h = !0;
|
|
322
|
+
const n = () => {
|
|
323
|
+
o += 1, a.value = !1, e.dotLoader = !1;
|
|
324
|
+
};
|
|
325
|
+
z(() => R(s), n), W(() => {
|
|
326
|
+
h = !1, n();
|
|
327
|
+
});
|
|
328
|
+
const l = (v, m) => h && v === o && m === R(s);
|
|
329
|
+
return { isWaitingResponse: a, sendQuestion: async () => {
|
|
330
|
+
var I, S, g;
|
|
331
|
+
if (e.question.trim().length < 1) {
|
|
332
|
+
r.setError("Please enter question!");
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (e.amaQuestionsLeft <= 0) {
|
|
336
|
+
r.setError("You have exhausted your question limit!");
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
const v = ++o, m = R(s);
|
|
340
|
+
a.value = !0, e.dotLoader = !0;
|
|
341
|
+
const f = e.question;
|
|
342
|
+
e.conversations.push({ question: f }), e.question = "";
|
|
343
|
+
const y = {
|
|
344
|
+
skillId: m,
|
|
345
|
+
question: f,
|
|
346
|
+
past_messages: e.past_messages
|
|
347
|
+
};
|
|
348
|
+
try {
|
|
349
|
+
const A = await i(y);
|
|
350
|
+
if (!l(v, m))
|
|
351
|
+
return;
|
|
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
|
+
return;
|
|
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
|
+
}
|
|
358
|
+
} };
|
|
359
|
+
}
|
|
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
|
+
class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
|
|
362
|
+
"aria-hidden": "true"
|
|
363
|
+
}, At = ["placeholder"], kt = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, $t = {
|
|
364
|
+
key: 1,
|
|
365
|
+
class: "flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF4E0]",
|
|
366
|
+
role: "status",
|
|
367
|
+
"aria-label": "Waiting for response",
|
|
368
|
+
title: "Waiting for response"
|
|
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
|
+
Ft
|
|
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
|
+
class: "hidden sm:inline",
|
|
373
|
+
"aria-hidden": "true"
|
|
374
|
+
}, "·", -1)), It = { class: "font-semibold text-[#181C23]" }, St = /* @__PURE__ */ k({
|
|
375
|
+
__name: "NewQuestionAMA",
|
|
376
|
+
setup(s) {
|
|
377
|
+
const e = j(), r = H();
|
|
378
|
+
e.question = "";
|
|
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
|
+
e,
|
|
382
|
+
r,
|
|
383
|
+
(m) => h.postApi("/amaBotResponse", m),
|
|
384
|
+
me.isAxiosError,
|
|
385
|
+
J
|
|
386
|
+
);
|
|
387
|
+
G(() => {
|
|
388
|
+
i.value.focus();
|
|
389
|
+
});
|
|
390
|
+
const x = B(() => e.question.trim().length > 0);
|
|
391
|
+
z(
|
|
392
|
+
() => e.question,
|
|
393
|
+
async () => {
|
|
394
|
+
await O();
|
|
395
|
+
const m = i.value;
|
|
396
|
+
m && (m.style.height = "auto", m.style.height = `${m.scrollHeight}px`);
|
|
397
|
+
}
|
|
398
|
+
);
|
|
399
|
+
const v = (m) => {
|
|
400
|
+
const f = m.length;
|
|
401
|
+
a.value = N - f, p.value = f >= N;
|
|
402
|
+
};
|
|
403
|
+
return (m, f) => (u(), _("div", vt, [
|
|
404
|
+
t("div", bt, [
|
|
405
|
+
t("div", wt, [
|
|
406
|
+
t("span", yt, [
|
|
407
|
+
b(c(xe), { class: "h-4 w-4 md:h-5 md:w-5" })
|
|
408
|
+
])
|
|
409
|
+
]),
|
|
410
|
+
_e(t("textarea", {
|
|
411
|
+
ref_key: "AiSearch",
|
|
412
|
+
ref: i,
|
|
413
|
+
"onUpdate:modelValue": f[0] || (f[0] = (y) => c(e).question = y),
|
|
414
|
+
rows: "1",
|
|
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
|
+
placeholder: `Ask me about ${c(e).amaSkillName || "Skill Name"}`,
|
|
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
|
+
}, null, 40, At), [
|
|
420
|
+
[he, c(e).question]
|
|
421
|
+
]),
|
|
422
|
+
t("div", kt, [
|
|
423
|
+
c(n) ? (u(), _("span", $t, Mt)) : (u(), _("button", {
|
|
424
|
+
key: 0,
|
|
425
|
+
type: "button",
|
|
426
|
+
title: "Send",
|
|
427
|
+
"aria-label": "Send question",
|
|
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
|
+
}, [
|
|
431
|
+
b(c(se), {
|
|
432
|
+
class: "h-5 w-5",
|
|
433
|
+
"aria-hidden": "true"
|
|
434
|
+
})
|
|
435
|
+
], 2))
|
|
436
|
+
])
|
|
437
|
+
]),
|
|
438
|
+
t("div", qt, [
|
|
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),
|
|
456
|
+
Lt,
|
|
457
|
+
t("span", It, $(c(e).amaQuestionsLeft) + " questions remaining for the day", 1)
|
|
458
|
+
])
|
|
459
|
+
]));
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
const Bt = /* @__PURE__ */ F(St, [["__scopeId", "data-v-2d1373dd"]]), Et = (s) => (C("data-v-fb943644"), s = s(), L(), s), jt = {
|
|
463
|
+
class: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#FDF3E1] text-[#C68A16]",
|
|
464
|
+
"aria-hidden": "true"
|
|
465
|
+
}, Nt = /* @__PURE__ */ Et(() => /* @__PURE__ */ t("div", { class: "mt-3 text-xs font-bold uppercase tracking-[0.12em] text-[#C68A16]" }, "Heads up", -1)), Qt = {
|
|
466
|
+
id: "ama-error-text",
|
|
467
|
+
class: "mt-1.5 text-base font-semibold leading-snug text-[#181C23]"
|
|
468
|
+
}, Rt = /* @__PURE__ */ k({
|
|
469
|
+
__name: "errorPopupAMA",
|
|
470
|
+
setup(s) {
|
|
471
|
+
const e = H(), r = w(""), i = w(null), p = () => {
|
|
472
|
+
r.value = "";
|
|
473
|
+
};
|
|
474
|
+
e.$subscribe(
|
|
475
|
+
(a, o) => {
|
|
476
|
+
o.error && (r.value = o.error, O(() => {
|
|
477
|
+
var h;
|
|
478
|
+
return (h = i.value) == null ? void 0 : h.focus();
|
|
479
|
+
}));
|
|
480
|
+
},
|
|
481
|
+
{ flush: "sync" }
|
|
482
|
+
);
|
|
483
|
+
const d = (a) => {
|
|
484
|
+
r.value && a.key === "Escape" && p();
|
|
485
|
+
};
|
|
486
|
+
return G(() => window.addEventListener("keydown", d)), ge(() => window.removeEventListener("keydown", d)), (a, o) => (u(), V(P, { name: "ama-popup" }, {
|
|
487
|
+
default: T(() => [
|
|
488
|
+
r.value ? (u(), _("div", {
|
|
489
|
+
key: 0,
|
|
490
|
+
class: "fixed inset-0 z-[99999] flex items-center justify-center bg-[#181C23]/35 p-4 backdrop-blur-[2px]",
|
|
491
|
+
onClick: p
|
|
492
|
+
}, [
|
|
493
|
+
t("div", {
|
|
494
|
+
role: "alertdialog",
|
|
495
|
+
"aria-modal": "true",
|
|
496
|
+
"aria-labelledby": "ama-error-text",
|
|
497
|
+
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)]",
|
|
498
|
+
onClick: o[0] || (o[0] = K(() => {
|
|
499
|
+
}, ["stop"]))
|
|
500
|
+
}, [
|
|
501
|
+
t("span", jt, [
|
|
502
|
+
b(c(ne), { class: "h-5 w-5" })
|
|
503
|
+
]),
|
|
504
|
+
Nt,
|
|
505
|
+
t("div", Qt, $(r.value), 1),
|
|
506
|
+
t("button", {
|
|
507
|
+
ref_key: "okButton",
|
|
508
|
+
ref: i,
|
|
509
|
+
type: "button",
|
|
510
|
+
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]",
|
|
511
|
+
onClick: p
|
|
512
|
+
}, " Got it ", 512)
|
|
513
|
+
])
|
|
514
|
+
])) : M("", !0)
|
|
515
|
+
]),
|
|
516
|
+
_: 1
|
|
517
|
+
}));
|
|
518
|
+
}
|
|
519
|
+
});
|
|
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);
|
|
523
|
+
let o = 0;
|
|
524
|
+
const h = (l) => {
|
|
525
|
+
e.amaSkillId = l, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
|
|
526
|
+
}, n = async (l) => {
|
|
527
|
+
var m, f, y, I, S;
|
|
528
|
+
const x = ++o;
|
|
529
|
+
d.value = !0, a.value = !1, h(l);
|
|
530
|
+
let v = !1;
|
|
531
|
+
try {
|
|
532
|
+
const g = await i(l);
|
|
533
|
+
if (x !== o)
|
|
534
|
+
return;
|
|
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;
|
|
536
|
+
} catch (g) {
|
|
537
|
+
if (p(g)) {
|
|
538
|
+
v = !0;
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
if (x !== o)
|
|
542
|
+
return;
|
|
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");
|
|
545
|
+
} finally {
|
|
546
|
+
!v && x === o && (d.value = !1);
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
return z(() => Tt(s), (l) => {
|
|
550
|
+
n(l);
|
|
551
|
+
}, { immediate: !0 }), W(() => {
|
|
552
|
+
o += 1;
|
|
553
|
+
}), { loaderValue: d, notAllowedModalVisible: a };
|
|
554
|
+
}
|
|
555
|
+
const zt = {
|
|
556
|
+
key: 1,
|
|
557
|
+
class: "flex h-screen flex-col overflow-hidden"
|
|
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({
|
|
559
|
+
__name: "AMABot",
|
|
560
|
+
setup(s) {
|
|
561
|
+
const e = j(), r = H(), i = D(), p = Y(), { loaderValue: d, notAllowedModalVisible: a } = Gt(
|
|
562
|
+
i,
|
|
563
|
+
e,
|
|
564
|
+
r,
|
|
565
|
+
(o) => p.getApi(`/getLearnerData?amaSkillId=${o}`),
|
|
566
|
+
J
|
|
567
|
+
);
|
|
568
|
+
return (o, h) => (u(), _("section", null, [
|
|
569
|
+
c(a) ? (u(), V(ae, {
|
|
570
|
+
key: 0,
|
|
571
|
+
tone: "error",
|
|
572
|
+
title: "Assessment Access Required"
|
|
573
|
+
}, {
|
|
574
|
+
default: T(() => [
|
|
575
|
+
q(" You don't have access to this assessment. Please contact to administrator ")
|
|
576
|
+
]),
|
|
577
|
+
_: 1
|
|
578
|
+
})) : M("", !0),
|
|
579
|
+
b(Vt),
|
|
580
|
+
t("div", null, [
|
|
581
|
+
c(d) ? (u(), V(re, {
|
|
582
|
+
key: 0,
|
|
583
|
+
message: "Loading AI Guru"
|
|
584
|
+
})) : (u(), _("main", zt, [
|
|
585
|
+
t("div", Ht, [
|
|
586
|
+
b(qe)
|
|
587
|
+
]),
|
|
588
|
+
t("section", Ut, [
|
|
589
|
+
t("div", Pt, [
|
|
590
|
+
t("div", Wt, [
|
|
591
|
+
b(gt, { class: "shrink-0" }),
|
|
592
|
+
b(lt, { class: "min-h-0 flex-1 pt-3" }),
|
|
593
|
+
t("div", Dt, [
|
|
594
|
+
b(Bt)
|
|
595
|
+
])
|
|
596
|
+
])
|
|
597
|
+
])
|
|
598
|
+
])
|
|
599
|
+
]))
|
|
600
|
+
])
|
|
601
|
+
]));
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
const ts = /* @__PURE__ */ F(Ot, [["__scopeId", "data-v-d2dc4f82"]]);
|
|
605
|
+
export {
|
|
606
|
+
ts as default
|
|
607
|
+
};
|