@genpact/genome.mfe.mgtwin-app 1.1.280-alpha → 1.1.282-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/{ArrowLeftCircleIcon-38ea10b8.mjs → ArrowLeftCircleIcon-22d3e91d.mjs} +1 -1
- package/dist/AssessmentAMA-4ba4ab54.mjs +425 -0
- package/dist/{AssessmentSimulation-6fa25b1b.mjs → AssessmentSimulation-d1a41761.mjs} +721 -738
- package/dist/{EditSkillAdminData-41b9e3e4.mjs → EditSkillAdminData-42fa0e41.mjs} +3 -3
- package/dist/{EditSkillData-364af62e.mjs → EditSkillData-ab074d42.mjs} +3 -3
- package/dist/{HomeView-19d205a3.mjs → HomeView-1a707b99.mjs} +726 -734
- package/dist/{Loading-f0d07556.mjs → Loading-e573cf0e.mjs} +1 -1
- package/dist/{LoadingSimulation-b7c923e5.mjs → LoadingSimulation-97c59ac7.mjs} +1 -1
- package/dist/{Modal-21cf05ca.mjs → Modal-bae97822.mjs} +1 -1
- package/dist/{PromptTesting-89931785.mjs → PromptTesting-3dec19e4.mjs} +2 -2
- package/dist/{SkillAutomation-b0a3836e.mjs → SkillAutomation-cb133e0e.mjs} +3 -3
- package/dist/{SkillData-35976d60.mjs → SkillData-c4cada8a.mjs} +3 -3
- package/dist/{UnderMaintenance-b1d23dce.mjs → UnderMaintenance-704fbab8.mjs} +1 -1
- package/dist/{_commonjsHelpers-63bc7805.mjs → _commonjsHelpers-359df6d5.mjs} +1 -1
- package/dist/{api-8eb981c1.mjs → api-3df34099.mjs} +1 -1
- package/dist/{main-9d26e0ba.mjs → main-5667c758.mjs} +1731 -1735
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/AssessmentAMA-8228e2db.mjs +0 -430
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { _ as fe, a as ge, L as ve } from "./LoadingSimulation-97c59ac7.mjs";
|
|
2
|
+
import { _ as xe, Q as j, a as ye } from "./Modal-bae97822.mjs";
|
|
3
|
+
import { d as I, r as i, H as V, o as d, c as m, a as t, u as Q, y as D, t as T, G as we, p as z, g as H, C as O, z as Ae, h as q, F as be, e as $e, f as U, b as M, k as me, w as ke, m as qe, L as Me, q as R, s as Ie, l as Le } from "./main-5667c758.mjs";
|
|
4
|
+
import { _ as C } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { p as ue, g as pe } from "./api-3df34099.mjs";
|
|
6
|
+
import "./loadernew-ac153a51.mjs";
|
|
7
|
+
const Se = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, Ee = ["href"], Fe = /* @__PURE__ */ t("img", {
|
|
8
|
+
class: "h-11 w-auto cursor-pointer",
|
|
9
|
+
src: fe,
|
|
10
|
+
alt: "Genome Logo"
|
|
11
|
+
}, null, -1), Re = [
|
|
12
|
+
Fe
|
|
13
|
+
], Te = ["href"], Ce = /* @__PURE__ */ t("img", {
|
|
14
|
+
class: "h-9 w-28 cursor-pointer md:w-36",
|
|
15
|
+
src: xe,
|
|
16
|
+
alt: "Aiguru Logo"
|
|
17
|
+
}, null, -1), Ne = [
|
|
18
|
+
Ce
|
|
19
|
+
], Qe = /* @__PURE__ */ I({
|
|
20
|
+
__name: "headerAMA",
|
|
21
|
+
setup(l) {
|
|
22
|
+
const s = i(""), r = i("");
|
|
23
|
+
return V === "prod" ? s.value = "https://genome.genpact.com" : s.value = "https://genome-dev.genpact.com", V === "prod" ? r.value = "https://genome.genpact.com/#aiguru" : r.value = "https://genome-dev.genpact.com/#aiguru", (a, u) => (d(), m("nav", Se, [
|
|
24
|
+
t("a", {
|
|
25
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
26
|
+
href: s.value,
|
|
27
|
+
target: "_blank"
|
|
28
|
+
}, Re, 8, Ee),
|
|
29
|
+
t("a", {
|
|
30
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
31
|
+
href: r.value,
|
|
32
|
+
target: "_blank"
|
|
33
|
+
}, Ne, 8, Te)
|
|
34
|
+
]));
|
|
35
|
+
}
|
|
36
|
+
}), Be = { class: "flex items-end justify-start" }, Pe = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, je = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, Ue = { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, Ve = /* @__PURE__ */ t("br", null, null, -1), De = /* @__PURE__ */ I({
|
|
37
|
+
__name: "greetingsAMA",
|
|
38
|
+
setup(l) {
|
|
39
|
+
const s = Q(), r = ` Hi ${s.learnerName || "Expert"}, and welcome!`, a = D(() => r), u = D(() => s.welcomeMessage);
|
|
40
|
+
return (_, c) => (d(), m("section", null, [
|
|
41
|
+
t("div", Be, [
|
|
42
|
+
t("div", Pe, [
|
|
43
|
+
t("div", je, T(a.value), 1),
|
|
44
|
+
t("div", Ue, T(u.value), 1)
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
Ve
|
|
48
|
+
]));
|
|
49
|
+
}
|
|
50
|
+
}), ze = { class: "fontFormattingAMA flex items-end justify-start py-2" }, He = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Oe = ["innerHTML"], Ge = /* @__PURE__ */ I({
|
|
51
|
+
__name: "responseAMA",
|
|
52
|
+
props: {
|
|
53
|
+
answer: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: !0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
setup(l) {
|
|
59
|
+
const s = l, r = D(() => {
|
|
60
|
+
const a = s.answer.replace(/[*#]/g, "").replace(
|
|
61
|
+
/Assessment Rating & Feedback/g,
|
|
62
|
+
'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
|
|
63
|
+
), u = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
64
|
+
return a.replace(u, (_, c, o) => `<a href="${o}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${c}</a>`);
|
|
65
|
+
});
|
|
66
|
+
return (a, u) => (d(), m("div", ze, [
|
|
67
|
+
t("div", He, [
|
|
68
|
+
t("span", {
|
|
69
|
+
class: "fontFormattingAMA",
|
|
70
|
+
innerHTML: r.value
|
|
71
|
+
}, null, 8, Oe)
|
|
72
|
+
])
|
|
73
|
+
]));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const Ye = /* @__PURE__ */ C(Ge, [["__scopeId", "data-v-38edcca6"]]), We = { class: "flex justify-end items-end py-3" }, Ze = { class: "max-w-[80%]" }, Ke = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, Je = /* @__PURE__ */ I({
|
|
77
|
+
__name: "learnerAMA",
|
|
78
|
+
props: {
|
|
79
|
+
question: {
|
|
80
|
+
type: String,
|
|
81
|
+
required: !0
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
setup(l) {
|
|
85
|
+
return (s, r) => (d(), m("div", We, [
|
|
86
|
+
t("div", Ze, [
|
|
87
|
+
t("div", Ke, T(l.question), 1)
|
|
88
|
+
])
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
}), Xe = (l) => (z("data-v-12a02acf"), l = l(), H(), l), et = { class: "flex w-full flex-col items-start justify-start bg-white" }, tt = { class: "bot-typing-animation gap-1" }, st = { class: "block w-full text-lg italic text-gray-800" }, at = /* @__PURE__ */ Xe(() => /* @__PURE__ */ t("span", { class: "dot-animation" }, [
|
|
92
|
+
/* @__PURE__ */ t("span", null, "."),
|
|
93
|
+
/* @__PURE__ */ t("span", null, "."),
|
|
94
|
+
/* @__PURE__ */ t("span", null, ".")
|
|
95
|
+
], -1)), ot = /* @__PURE__ */ we('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), nt = /* @__PURE__ */ I({
|
|
96
|
+
__name: "LoadingResponseAMA",
|
|
97
|
+
setup(l) {
|
|
98
|
+
const s = i("Generating response"), r = i([
|
|
99
|
+
"This may take a few seconds",
|
|
100
|
+
"Fetching the best response for you",
|
|
101
|
+
"Thinking... give me a moment",
|
|
102
|
+
"One moment while I gather the information",
|
|
103
|
+
"Hang in tight, we are almost there",
|
|
104
|
+
"Almost there... just a bit longer",
|
|
105
|
+
"Compiling a response for you"
|
|
106
|
+
]);
|
|
107
|
+
return setTimeout(() => {
|
|
108
|
+
const a = Math.floor(Math.random() * r.value.length);
|
|
109
|
+
s.value = r.value[a];
|
|
110
|
+
}, 15e3), (a, u) => (d(), m("div", et, [
|
|
111
|
+
t("div", tt, [
|
|
112
|
+
t("div", st, T(s.value), 1),
|
|
113
|
+
at
|
|
114
|
+
]),
|
|
115
|
+
ot
|
|
116
|
+
]));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const rt = /* @__PURE__ */ C(nt, [["__scopeId", "data-v-12a02acf"]]), lt = { key: 0 }, ct = { key: 1 }, it = {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: "flex"
|
|
122
|
+
}, dt = /* @__PURE__ */ I({
|
|
123
|
+
__name: "conversationAMA",
|
|
124
|
+
setup(l) {
|
|
125
|
+
let s = i(""), r = i("");
|
|
126
|
+
s.value = '<a style="color:#00AECF;"', r.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
127
|
+
const a = Q(), u = i();
|
|
128
|
+
return O(() => {
|
|
129
|
+
var o;
|
|
130
|
+
const _ = document.getElementsByName("askQuestion"), c = Array.from(_);
|
|
131
|
+
_.length && ((o = c == null ? void 0 : c.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
132
|
+
}), Ae(() => {
|
|
133
|
+
var o;
|
|
134
|
+
const _ = document.getElementsByName("askQuestion"), c = Array.from(_);
|
|
135
|
+
_.length && ((o = c == null ? void 0 : c.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
136
|
+
}), (_, c) => (d(), m("div", {
|
|
137
|
+
ref_key: "nestedElement",
|
|
138
|
+
ref: u,
|
|
139
|
+
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
140
|
+
}, [
|
|
141
|
+
q(De),
|
|
142
|
+
(d(!0), m(be, null, $e(M(a).conversations, (o, y) => (d(), m("div", { key: y }, [
|
|
143
|
+
o.question ? (d(), m("div", lt, [
|
|
144
|
+
q(Je, {
|
|
145
|
+
question: o.question,
|
|
146
|
+
c2question: o.c2question,
|
|
147
|
+
"show-feedback": o.showFeedback,
|
|
148
|
+
id: `qId${y}`,
|
|
149
|
+
name: "askQuestion",
|
|
150
|
+
"que-id": y
|
|
151
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
152
|
+
])) : U("", !0),
|
|
153
|
+
o.answer ? (d(), m("div", ct, [
|
|
154
|
+
q(Ye, {
|
|
155
|
+
question: o == null ? void 0 : o.question,
|
|
156
|
+
c2question: o == null ? void 0 : o.c2question,
|
|
157
|
+
"show-sources": o == null ? void 0 : o.showSources,
|
|
158
|
+
questionId: o.id,
|
|
159
|
+
answer: o.answer.replaceAll("<a", M(s)).replaceAll("<ul", M(r)),
|
|
160
|
+
"show-feedback": o.showFeedback,
|
|
161
|
+
"related-ques": o.relatedQues,
|
|
162
|
+
"options-array": o.optionsArray,
|
|
163
|
+
"ans-id": y
|
|
164
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
165
|
+
])) : U("", !0)
|
|
166
|
+
]))), 128)),
|
|
167
|
+
M(a).dotLoader ? (d(), m("div", it, [
|
|
168
|
+
q(rt)
|
|
169
|
+
])) : U("", !0)
|
|
170
|
+
], 512));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
const ut = /* @__PURE__ */ C(dt, [["__scopeId", "data-v-e6168dd4"]]), B = (l) => (z("data-v-df62b92f"), l = l(), H(), l), pt = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, mt = { class: "py-2" }, _t = { class: "flex" }, ht = { class: "z-1 relative w-full" }, ft = { class: "relative w-full" }, gt = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, vt = { key: 0 }, xt = /* @__PURE__ */ B(() => /* @__PURE__ */ t("path", { d: "M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" }, null, -1)), yt = [
|
|
174
|
+
xt
|
|
175
|
+
], wt = {
|
|
176
|
+
key: 1,
|
|
177
|
+
class: "tooltip"
|
|
178
|
+
}, At = /* @__PURE__ */ B(() => /* @__PURE__ */ t("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), bt = /* @__PURE__ */ B(() => /* @__PURE__ */ t("img", {
|
|
179
|
+
class: "w-7 h-7",
|
|
180
|
+
src: ge,
|
|
181
|
+
alt: "watingIcon"
|
|
182
|
+
}, null, -1)), $t = [
|
|
183
|
+
At,
|
|
184
|
+
bt
|
|
185
|
+
], kt = { class: "flex justify-start" }, qt = { class: "flex justify-start items-start text-[#161916]" }, Mt = /* @__PURE__ */ B(() => /* @__PURE__ */ t("div", { class: "pt-1 text-start font-sans" }, [
|
|
186
|
+
/* @__PURE__ */ t("div", { class: "text-xs font-bold text-gray-500 md:text-sm" }, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
|
|
187
|
+
], -1)), It = /* @__PURE__ */ I({
|
|
188
|
+
__name: "NewQuestionAMA",
|
|
189
|
+
setup(l) {
|
|
190
|
+
const s = Q(), r = me();
|
|
191
|
+
s.question = "";
|
|
192
|
+
const a = i(null), u = i(!1), _ = i(j), c = i(!1);
|
|
193
|
+
O(() => {
|
|
194
|
+
a.value.focus();
|
|
195
|
+
});
|
|
196
|
+
const o = (b) => new URLSearchParams(window.location.search).get(b) || "", y = i(o("amaId")), S = i(o("corpusId")), Y = (b) => {
|
|
197
|
+
const p = b.length;
|
|
198
|
+
_.value = j - p, u.value = p >= j;
|
|
199
|
+
}, k = async () => {
|
|
200
|
+
var b, p, $, N, h, v;
|
|
201
|
+
try {
|
|
202
|
+
if (s.question.trim().length < 1) {
|
|
203
|
+
r.setError("Please enter answer!");
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (s.amaQuestionsLeft <= 0) {
|
|
207
|
+
r.setError("You have exhausted your question limit!");
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
c.value = !0, s.dotLoader = !0;
|
|
211
|
+
const f = {
|
|
212
|
+
question: s.question
|
|
213
|
+
};
|
|
214
|
+
s.conversations.push(f);
|
|
215
|
+
const g = i("");
|
|
216
|
+
g.value = s.question, s.question = "";
|
|
217
|
+
const w = {
|
|
218
|
+
amaId: y.value,
|
|
219
|
+
amaCorpusId: S.value,
|
|
220
|
+
past_messages: s.past_messages,
|
|
221
|
+
question: g.value,
|
|
222
|
+
prompt: s.generatedPrompt
|
|
223
|
+
}, n = await ue("/amaBotResponse", w);
|
|
224
|
+
if (((p = (b = n == null ? void 0 : n.data) == null ? void 0 : b.body) == null ? void 0 : p.answer) === "") {
|
|
225
|
+
console.log("in the if case calling api again");
|
|
226
|
+
const L = await ue("/amaBotResponse", w);
|
|
227
|
+
s.addConversation(($ = L.data) == null ? void 0 : $.body, "new");
|
|
228
|
+
} else
|
|
229
|
+
s.addConversation((N = n.data) == null ? void 0 : N.body, "new");
|
|
230
|
+
c.value = !1, s.dotLoader = !1;
|
|
231
|
+
} catch (f) {
|
|
232
|
+
if (console.error(f), s.dotLoader = !1, c.value = !1, R.isAxiosError(f)) {
|
|
233
|
+
const g = f;
|
|
234
|
+
console.log("Error found!"), console.error((h = g.response) == null ? void 0 : h.data), r.setError(((v = g.response) == null ? void 0 : v.data).message);
|
|
235
|
+
} else
|
|
236
|
+
r.setError("There was an issue, please contact helpmate");
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
return (b, p) => (d(), m("div", pt, [
|
|
240
|
+
t("div", mt, [
|
|
241
|
+
t("div", _t, [
|
|
242
|
+
t("div", ht, [
|
|
243
|
+
t("div", ft, [
|
|
244
|
+
t("div", gt, [
|
|
245
|
+
c.value ? (d(), m("div", wt, $t)) : (d(), m("div", vt, [
|
|
246
|
+
(d(), m("svg", {
|
|
247
|
+
onClick: p[0] || (p[0] = ($) => k()),
|
|
248
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
249
|
+
fill: "currentColor",
|
|
250
|
+
class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
|
|
251
|
+
viewBox: "0 0 16 16"
|
|
252
|
+
}, yt))
|
|
253
|
+
]))
|
|
254
|
+
]),
|
|
255
|
+
t("div", kt, [
|
|
256
|
+
ke(t("input", {
|
|
257
|
+
onKeyup: [
|
|
258
|
+
p[1] || (p[1] = Me(($) => c.value ? "" : k(), ["enter"])),
|
|
259
|
+
p[3] || (p[3] = ($) => Y(M(s).question))
|
|
260
|
+
],
|
|
261
|
+
"onUpdate:modelValue": p[2] || (p[2] = ($) => M(s).question = $),
|
|
262
|
+
class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
|
|
263
|
+
placeholder: "Write your answer here...",
|
|
264
|
+
type: "text",
|
|
265
|
+
ref_key: "AiSearch",
|
|
266
|
+
ref: a
|
|
267
|
+
}, null, 544), [
|
|
268
|
+
[qe, M(s).question]
|
|
269
|
+
])
|
|
270
|
+
])
|
|
271
|
+
]),
|
|
272
|
+
t("div", qt, T(M(s).amaQuestionsLeft) + " questions remaining for the day ", 1),
|
|
273
|
+
Mt
|
|
274
|
+
])
|
|
275
|
+
])
|
|
276
|
+
])
|
|
277
|
+
]));
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
const Lt = /* @__PURE__ */ C(It, [["__scopeId", "data-v-df62b92f"]]), G = (l) => (z("data-v-137589f5"), l = l(), H(), l), St = /* @__PURE__ */ G(() => /* @__PURE__ */ t("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
|
|
281
|
+
/* @__PURE__ */ t("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
|
|
282
|
+
/* @__PURE__ */ t("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
|
|
283
|
+
], -1)), Et = {
|
|
284
|
+
key: 1,
|
|
285
|
+
className: "h-screen flex flex-col items-stretch"
|
|
286
|
+
}, Ft = { class: "z-20" }, Rt = /* @__PURE__ */ G(() => /* @__PURE__ */ t("div", { class: "mt-6" }, null, -1)), Tt = { class: "flex h-full items-stretch overflow-hidden" }, Ct = { class: "mx-auto w-11/12 bg-white" }, Nt = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, Qt = /* @__PURE__ */ G(() => /* @__PURE__ */ t("div", { class: "mt-[160px]" }, null, -1)), Bt = { class: "relative" }, Pt = /* @__PURE__ */ I({
|
|
287
|
+
__name: "AssessmentAMA",
|
|
288
|
+
setup(l) {
|
|
289
|
+
const s = i(!0), r = i(!1), a = Q(), u = me(), _ = i(""), c = localStorage.getItem("accessToken");
|
|
290
|
+
let o = "", y = "", S = "";
|
|
291
|
+
const k = i(((h) => new URLSearchParams(window.location.search).get(h) || "")("amaId"));
|
|
292
|
+
a.amaSkillId = k.value ?? "";
|
|
293
|
+
const b = ["703331197", "703380812", "703331909", "703363051", "703319578"];
|
|
294
|
+
O(async () => {
|
|
295
|
+
s.value = !0, await p(), await N(), s.value = !1;
|
|
296
|
+
});
|
|
297
|
+
const p = async () => {
|
|
298
|
+
var h, v, f, g, w;
|
|
299
|
+
try {
|
|
300
|
+
if (k.value === null)
|
|
301
|
+
throw {
|
|
302
|
+
response: {
|
|
303
|
+
status: 424,
|
|
304
|
+
data: {
|
|
305
|
+
message: "Invalid URL"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
console.log("before calling get learner");
|
|
310
|
+
const n = await pe(
|
|
311
|
+
`/getLearnerData?forSimulation=true&skillForSimulation=${k.value}`
|
|
312
|
+
);
|
|
313
|
+
a.initialize(n.data), await $();
|
|
314
|
+
} catch (n) {
|
|
315
|
+
if (console.error(n), s.value = !1, R.isAxiosError(n) && ((h = n.response) != null && h.status) || n && typeof n == "object" && "response" in n && n.response && typeof n.response == "object" && "status" in n.response && n.response.status) {
|
|
316
|
+
const A = n;
|
|
317
|
+
if (console.log("Error found!"), console.error((v = A.response) == null ? void 0 : v.data), ((f = A.response) == null ? void 0 : f.status) === 424 || ((g = A.response) == null ? void 0 : g.status) === 425) {
|
|
318
|
+
r.value = !0;
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
u.setError(((w = A.response) == null ? void 0 : w.data).message);
|
|
322
|
+
} else
|
|
323
|
+
u.setError("There was an issue, please contact helpmate");
|
|
324
|
+
}
|
|
325
|
+
}, $ = async () => {
|
|
326
|
+
var h, v, f, g, w, n, A, L, x, F, W, Z, K, J, X, ee, te, se, ae, oe, ne, re, le, ce, ie, de;
|
|
327
|
+
console.log("Start getAssessmentDetails");
|
|
328
|
+
try {
|
|
329
|
+
V === "prod" ? o = `https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${k.value}` : o = `https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${k.value}`;
|
|
330
|
+
const e = await pe(o);
|
|
331
|
+
console.log("response from GetAMA", e), _.value = (v = (h = e == null ? void 0 : e.data) == null ? void 0 : h.data) == null ? void 0 : v.name, a.welcomeMessage = (g = (f = e == null ? void 0 : e.data) == null ? void 0 : f.data) == null ? void 0 : g.displayMsg, console.log("response from GetAMA skill Name", _.value), a.skillNameForSimulation = _.value, a.generatedPrompt = (n = (w = e == null ? void 0 : e.data) == null ? void 0 : w.data) == null ? void 0 : n.generatedPrompt, y = (L = (A = e == null ? void 0 : e.data) == null ? void 0 : A.data) == null ? void 0 : L.accessBand, S = (F = (x = e == null ? void 0 : e.data) == null ? void 0 : x.data) == null ? void 0 : F.accessOhrList;
|
|
332
|
+
const E = (Z = (W = e == null ? void 0 : e.data) == null ? void 0 : W.data) == null ? void 0 : Z.createdBy;
|
|
333
|
+
a.mcqType = (J = (K = e == null ? void 0 : e.data) == null ? void 0 : K.data) == null ? void 0 : J.mcqTypes, a.storeFinalFeedback = (ee = (X = e == null ? void 0 : e.data) == null ? void 0 : X.data) == null ? void 0 : ee.storeFinalFeedback, a.storeFinalScore = (se = (te = e == null ? void 0 : e.data) == null ? void 0 : te.data) == null ? void 0 : se.storeFinalScore, a.amaQuestionsLeft = (oe = (ae = e == null ? void 0 : e.data) == null ? void 0 : ae.data) == null ? void 0 : oe.amaQuestionsLeft, console.log("store mcqType====>", a.mcqType);
|
|
334
|
+
const _e = a == null ? void 0 : a.band_code;
|
|
335
|
+
console.log("accessBand , accessOhrList====>", y, S);
|
|
336
|
+
const P = (ne = y == null ? void 0 : y.split(",")) == null ? void 0 : ne.map((he) => he.trim());
|
|
337
|
+
if (console.log("bands ,====>", P), E === (a == null ? void 0 : a.ohr) || b.includes(a == null ? void 0 : a.ohr))
|
|
338
|
+
console.log("User has access to this assessment.");
|
|
339
|
+
else {
|
|
340
|
+
if (P.length === 0 && S.length === 0)
|
|
341
|
+
throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
|
|
342
|
+
response: {
|
|
343
|
+
status: 424,
|
|
344
|
+
data: {
|
|
345
|
+
message: "You don't have access to this assessment. Please contact to administrator"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
if (P.includes(_e) || S.includes(a == null ? void 0 : a.ohr))
|
|
350
|
+
console.log("User has access to this assessment.");
|
|
351
|
+
else
|
|
352
|
+
throw console.log("User does not have access to this assessment."), {
|
|
353
|
+
response: {
|
|
354
|
+
status: 424,
|
|
355
|
+
data: {
|
|
356
|
+
message: "You don't have access to this assessment. Please contact to administrator"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
console.log("end getAssessmentDetails");
|
|
362
|
+
} catch (e) {
|
|
363
|
+
if (console.error(e), s.value = !1, R.isAxiosError(e) && ((re = e.response) != null && re.status) || e && typeof e == "object" && "response" in e && e.response && typeof e.response == "object" && "status" in e.response && e.response.status) {
|
|
364
|
+
const E = e;
|
|
365
|
+
if (console.log("Error found!"), console.error((le = E.response) == null ? void 0 : le.data), ((ce = E.response) == null ? void 0 : ce.status) === 424 || ((ie = E.response) == null ? void 0 : ie.status) === 425) {
|
|
366
|
+
r.value = !0;
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
u.setError(((de = E.response) == null ? void 0 : de.data).message);
|
|
370
|
+
} else
|
|
371
|
+
u.setError("There was an issue, please contact helpmate");
|
|
372
|
+
}
|
|
373
|
+
}, N = async () => {
|
|
374
|
+
var h, v, f, g, w, n, A, L;
|
|
375
|
+
try {
|
|
376
|
+
const x = await R({
|
|
377
|
+
url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
|
|
378
|
+
headers: {
|
|
379
|
+
authorization: `Bearer ${c}`,
|
|
380
|
+
"content-type": "application/json"
|
|
381
|
+
},
|
|
382
|
+
method: "get"
|
|
383
|
+
});
|
|
384
|
+
a.genomeFunctionValue = (f = (v = (h = x == null ? void 0 : x.data) == null ? void 0 : h.role_function) == null ? void 0 : v.function) == null ? void 0 : f.name, a.genomeRoleValue = (n = (w = (g = x == null ? void 0 : x.data) == null ? void 0 : g.role_function) == null ? void 0 : w.role) == null ? void 0 : n.name, console.log("profile data", a.genomeFunctionValue, a.genomeRoleValue);
|
|
385
|
+
} catch (x) {
|
|
386
|
+
if (console.error(x), s.value = !1, R.isAxiosError(x)) {
|
|
387
|
+
const F = x;
|
|
388
|
+
console.log("Error found!"), console.error((A = F.response) == null ? void 0 : A.data), u.setError(((L = F.response) == null ? void 0 : L.data).message);
|
|
389
|
+
} else
|
|
390
|
+
u.setError("There was an issue, please contact helpmate");
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
return (h, v) => (d(), m("section", null, [
|
|
394
|
+
q(ye, { "is-visible": r.value }, {
|
|
395
|
+
default: Ie(() => [
|
|
396
|
+
St
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
}, 8, ["is-visible"]),
|
|
400
|
+
t("div", null, [
|
|
401
|
+
s.value ? (d(), Le(ve, { key: 0 })) : (d(), m("main", Et, [
|
|
402
|
+
t("div", Ft, [
|
|
403
|
+
q(Qe)
|
|
404
|
+
]),
|
|
405
|
+
Rt,
|
|
406
|
+
t("div", Tt, [
|
|
407
|
+
t("div", Ct, [
|
|
408
|
+
t("div", Nt, [
|
|
409
|
+
q(ut),
|
|
410
|
+
Qt
|
|
411
|
+
]),
|
|
412
|
+
t("div", Bt, [
|
|
413
|
+
q(Lt)
|
|
414
|
+
])
|
|
415
|
+
])
|
|
416
|
+
])
|
|
417
|
+
]))
|
|
418
|
+
])
|
|
419
|
+
]));
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
const Ot = /* @__PURE__ */ C(Pt, [["__scopeId", "data-v-137589f5"]]);
|
|
423
|
+
export {
|
|
424
|
+
Ot as default
|
|
425
|
+
};
|