mario-core 2.0.97-release → 2.0.98-release
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/Dashboard-D2zLzwFR.mjs +206 -0
- package/dist/Dashboard-dOwpd3sn.js +1 -0
- package/dist/EmailTemplateDetail-D07dUCZL.js +1 -0
- package/dist/EmailTemplateDetail-uNlh3Otz.mjs +443 -0
- package/dist/EmailTemplateList-B5ee4Byb.js +1 -0
- package/dist/EmailTemplateList-EZ_sAp6W.mjs +170 -0
- package/dist/GalleryList-CdyApn-m.mjs +329 -0
- package/dist/GalleryList-DFuoYp_Q.js +1 -0
- package/dist/Login-8c69l-hn.js +1 -0
- package/dist/Login-MzPc2sA6.mjs +1684 -0
- package/dist/NotificationList-BP871ggG.mjs +3982 -0
- package/dist/NotificationList-CzX65qMV.js +2 -0
- package/dist/SkillList-C-aJeufd.mjs +386 -0
- package/dist/SkillList-hMvqDcsQ.js +1 -0
- package/dist/TeacherSelector-CV9c0Cn8.js +1 -0
- package/dist/TeacherSelector-XuYxdZgr.mjs +30 -0
- package/dist/TheContent-BfT4R2Gc.mjs +38 -0
- package/dist/TheContent-BicDxizL.js +1 -0
- package/dist/UserContainer-DR6lGYNl.js +5 -0
- package/dist/UserContainer-Ip-sYnrv.mjs +2902 -0
- package/dist/UserDetail-iw6l5L3a.mjs +903 -0
- package/dist/UserDetail-uR6dMDOB.js +1 -0
- package/dist/UserList-DLC9FDWG.mjs +1252 -0
- package/dist/UserList-DUiZTiTR.js +7 -0
- package/dist/constants-DUelcmx7.js +1 -0
- package/dist/constants-QjFnVl1d.mjs +286 -0
- package/dist/index--POWjYN0.mjs +19073 -0
- package/dist/index-KWXe_Hjz.js +15 -0
- package/dist/index.js +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/mailCategoryService-B9Yboyna.mjs +11 -0
- package/dist/mailCategoryService-DAw3X_PE.js +1 -0
- package/dist/services/userService.d.ts +1 -0
- package/dist/userService-DEwtByu1.js +1 -0
- package/dist/userService-DxucAe6U.mjs +56 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1684 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Ve, useState as S, useCallback as v, Fragment as Se, useEffect as K } from "react";
|
|
3
|
+
import { Input as ne, Modal as He, ModalBody as qe, ModalFooter as ds, Button as ms, Form as gs, FormGroup as ce, Row as Ne, Col as Z } from "reactstrap";
|
|
4
|
+
import { Link as We, useLocation as hs, useNavigate as xe } from "react-router-dom";
|
|
5
|
+
import { s as o, M as je, E as oe, a as Ye, A as us, g as ye, b as m, f as ps, c as x, d as A, e as fs, r as ws, h as de, i as Ke, B as Je, j as fe, k as Ss, l as ys, m as Ns, I as Ce, N as vs, n as Is, o as bs, p as ks, q as Ls, t as Cs, u as Ge, v as xs, w as Ts, x as ke, y as Oe, z as Es, C as Ps, D as $s, F as _s } from "./index--POWjYN0.mjs";
|
|
6
|
+
import { useDispatch as ve, useSelector as Le } from "react-redux";
|
|
7
|
+
import { Formik as Ie } from "formik";
|
|
8
|
+
import * as B from "yup";
|
|
9
|
+
import { useGoogleReCaptcha as Te, GoogleReCaptcha as Rs, GoogleReCaptchaProvider as As } from "react-google-recaptcha-v3";
|
|
10
|
+
import { GoogleOAuthProvider as Ms, useGoogleLogin as Gs } from "@react-oauth/google";
|
|
11
|
+
import { L as we, T as Ze } from "./types-BvnbDeJF.mjs";
|
|
12
|
+
import { G as Ue } from "./constants-QjFnVl1d.mjs";
|
|
13
|
+
import { LogLevel as pe, PublicClientApplication as Os } from "@azure/msal-browser";
|
|
14
|
+
import * as le from "@amplitude/analytics-browser";
|
|
15
|
+
const Us = {
|
|
16
|
+
backgroundColor: "#f7f9fc",
|
|
17
|
+
borderRadius: "4px",
|
|
18
|
+
marginBottom: "5px",
|
|
19
|
+
position: "relative"
|
|
20
|
+
}, zs = {
|
|
21
|
+
backgroundColor: "#ffffff",
|
|
22
|
+
paddingRight: "50px",
|
|
23
|
+
color: "#333333",
|
|
24
|
+
caretColor: "#333333"
|
|
25
|
+
}, Bs = {
|
|
26
|
+
fontSize: "20px",
|
|
27
|
+
position: "absolute",
|
|
28
|
+
right: "10px",
|
|
29
|
+
color: "#316CD9"
|
|
30
|
+
}, Fs = (s) => s.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (t, i) => i.toUpperCase()), me = ({
|
|
31
|
+
isShowPassword: s,
|
|
32
|
+
togglePasswordVisible: t,
|
|
33
|
+
onChange: i,
|
|
34
|
+
placeholder: l
|
|
35
|
+
}) => /* @__PURE__ */ n("div", { className: "d-flex align-items-center w-100", style: Us, children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
ne,
|
|
38
|
+
{
|
|
39
|
+
className: "border password-input",
|
|
40
|
+
style: zs,
|
|
41
|
+
type: s ? "text" : "password",
|
|
42
|
+
name: "password",
|
|
43
|
+
onChange: i,
|
|
44
|
+
placeholder: l || "Password",
|
|
45
|
+
autocomplete: l ? Fs(l) : "password",
|
|
46
|
+
required: !0
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
"i",
|
|
51
|
+
{
|
|
52
|
+
className: `far ${s ? "fa-eye-slash" : "fa-eye"} mx-2 cursor-pointer`,
|
|
53
|
+
style: Bs,
|
|
54
|
+
onClick: () => t(),
|
|
55
|
+
title: s ? "Hide" : "Show"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }), Ds = ({ open: s, onConfirm: t, onClose: i, clickHandler: l }) => {
|
|
59
|
+
const [d, p] = S(Ue[0].value);
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
61
|
+
He,
|
|
62
|
+
{
|
|
63
|
+
isOpen: s,
|
|
64
|
+
className: `${o["teacher-code"]}`,
|
|
65
|
+
style: { zIndex: 1201 },
|
|
66
|
+
centered: !0,
|
|
67
|
+
autoFocus: !1,
|
|
68
|
+
returnFocusAfterClose: !1,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ n("div", { className: `${o["header-teacher-code"]}`, children: [
|
|
71
|
+
/* @__PURE__ */ e("div", { style: { padding: "16px 24px", margin: 0, fontWeight: 500, fontSize: "1.25rem" }, children: "Select Grade" }),
|
|
72
|
+
/* @__PURE__ */ e("div", { hidden: !i, children: /* @__PURE__ */ e(je, { onClick: () => i?.(), className: `${o["close-icon"]}`, size: 24, style: { color: "rgba(0, 0, 0, 0.54)" } }) })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ n(qe, { style: { padding: "20px 24px" }, children: [
|
|
75
|
+
/* @__PURE__ */ e("p", { className: `${o["teacher-code-label"]}`, style: { margin: 0, marginBottom: "16px", color: "rgba(0, 0, 0, 0.6)" }, children: "You are logging in as a student, please select your grade" }),
|
|
76
|
+
/* @__PURE__ */ n("div", { className: "form-floating", style: { marginTop: "16px", marginBottom: "8px" }, children: [
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
ne,
|
|
79
|
+
{
|
|
80
|
+
type: "select",
|
|
81
|
+
id: "floatingSelectGrade",
|
|
82
|
+
value: d,
|
|
83
|
+
onChange: (u) => p(u.target.value),
|
|
84
|
+
children: Ue.map((u) => /* @__PURE__ */ e("option", { value: u.value, children: u.label }, u.value))
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ e("label", { htmlFor: "floatingSelectGrade", children: "Select grade" })
|
|
88
|
+
] })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ e(ds, { style: { borderTop: "none", padding: "8px 24px" }, children: /* @__PURE__ */ e(ms, { disabled: !d, style: { borderRadius: 20, background: "#316cd9", border: "none", opacity: d ? 1 : 0.65 }, color: "primary", onClick: () => t(d, l), children: "Confirm" }) })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
function Vs(s, t) {
|
|
96
|
+
return JSON.stringify(s) === JSON.stringify(t);
|
|
97
|
+
}
|
|
98
|
+
const Hs = Ve(Ds, Vs), qs = B.object({
|
|
99
|
+
email: B.string().email("Email is invalid").required("Email is required"),
|
|
100
|
+
password: B.string().required("Password is required"),
|
|
101
|
+
rememberMe: B.boolean()
|
|
102
|
+
}), Ws = ({ onSuccess: s, onError: t }) => {
|
|
103
|
+
const i = Gs({
|
|
104
|
+
onSuccess: async (l) => {
|
|
105
|
+
try {
|
|
106
|
+
const d = await fetch("https://www.googleapis.com/oauth2/v3/userinfo", {
|
|
107
|
+
headers: { Authorization: `Bearer ${l.access_token}` }
|
|
108
|
+
}).then((u) => u.json()), p = {
|
|
109
|
+
accessToken: l.access_token,
|
|
110
|
+
googleId: d.sub,
|
|
111
|
+
profileObj: {
|
|
112
|
+
email: d.email,
|
|
113
|
+
familyName: d.family_name,
|
|
114
|
+
givenName: d.given_name,
|
|
115
|
+
imageUrl: d.picture,
|
|
116
|
+
name: d.name
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
s(p);
|
|
120
|
+
} catch (d) {
|
|
121
|
+
t(d);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
onError: (l) => t(l)
|
|
125
|
+
});
|
|
126
|
+
return /* @__PURE__ */ n("div", { className: o["btn-login-with-sso"], onClick: () => i(), children: [
|
|
127
|
+
/* @__PURE__ */ n("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "24px", height: "24px", style: { marginRight: "8px" }, children: [
|
|
128
|
+
/* @__PURE__ */ e("path", { fill: "#EA4335", d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" }),
|
|
129
|
+
/* @__PURE__ */ e("path", { fill: "#4285F4", d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z" }),
|
|
130
|
+
/* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z" }),
|
|
131
|
+
/* @__PURE__ */ e("path", { fill: "#34A853", d: "M24 48c6.48 0 12.38-2.12 16.66-5.73l-7.73-6c-2.15 1.45-4.92 2.3-8.93 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" }),
|
|
132
|
+
/* @__PURE__ */ e("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ e("p", { children: "GOOGLE" })
|
|
135
|
+
] });
|
|
136
|
+
}, js = ({
|
|
137
|
+
defaultInfo: s,
|
|
138
|
+
userLogin: t,
|
|
139
|
+
school: i,
|
|
140
|
+
isShowPassword: l,
|
|
141
|
+
setIsShowPassword: d,
|
|
142
|
+
fnIsCheckLogin: p,
|
|
143
|
+
// isLoginGoogle,
|
|
144
|
+
// submitLogin,
|
|
145
|
+
// infoUser,
|
|
146
|
+
googleClientId: u,
|
|
147
|
+
fnLoginSSO: I,
|
|
148
|
+
extensionEmail: E,
|
|
149
|
+
onLoginWidthClever: b,
|
|
150
|
+
openModalSelectGrade: T,
|
|
151
|
+
handleRegisterUser: w,
|
|
152
|
+
onToggleModelGrade: P
|
|
153
|
+
}) => {
|
|
154
|
+
const y = () => d(!l), q = ve(), { executeRecaptcha: M } = Te(), k = v(async () => {
|
|
155
|
+
if (!M) {
|
|
156
|
+
console.log("execute recaptcha undefined");
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
return await M("login");
|
|
160
|
+
}, [M]), _ = async (L) => {
|
|
161
|
+
try {
|
|
162
|
+
await us(L);
|
|
163
|
+
} catch (C) {
|
|
164
|
+
console.error(C);
|
|
165
|
+
}
|
|
166
|
+
}, W = async (L) => {
|
|
167
|
+
if (L?.accessToken) {
|
|
168
|
+
let {
|
|
169
|
+
email: C,
|
|
170
|
+
familyName: j,
|
|
171
|
+
givenName: N,
|
|
172
|
+
imageUrl: $,
|
|
173
|
+
name: G
|
|
174
|
+
// fullName
|
|
175
|
+
} = L.profileObj, D = L.accessToken, Q = L.googleId;
|
|
176
|
+
const X = window.location.hostname.split(".marioforme.com")?.[0], J = C.split("@")?.[1], be = E?.split(",")?.map((F) => F.trim())?.filter((F) => F).some((F) => J.includes(F));
|
|
177
|
+
if (!J.includes(X) && !be) {
|
|
178
|
+
alert(
|
|
179
|
+
"The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator"
|
|
180
|
+
), await _([`${J} is incorrect`]);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const ge = {
|
|
184
|
+
firstName: N,
|
|
185
|
+
lastName: j,
|
|
186
|
+
imageUrl: $,
|
|
187
|
+
fullName: G,
|
|
188
|
+
email: C,
|
|
189
|
+
accessToken: D,
|
|
190
|
+
googleId: Q
|
|
191
|
+
};
|
|
192
|
+
q(Ye(ge)), p(
|
|
193
|
+
Ze.Google,
|
|
194
|
+
ge,
|
|
195
|
+
D,
|
|
196
|
+
k
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return /* @__PURE__ */ n(Se, { children: [
|
|
201
|
+
/* @__PURE__ */ e(
|
|
202
|
+
Ie,
|
|
203
|
+
{
|
|
204
|
+
initialValues: s,
|
|
205
|
+
validationSchema: qs,
|
|
206
|
+
onSubmit: async (L) => {
|
|
207
|
+
try {
|
|
208
|
+
const C = await k();
|
|
209
|
+
if (!C) return;
|
|
210
|
+
L.captcha = C, L.loginType = we.Default, t(L);
|
|
211
|
+
} catch (C) {
|
|
212
|
+
console.error(C);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
children: (L) => {
|
|
216
|
+
const {
|
|
217
|
+
handleBlur: C,
|
|
218
|
+
handleSubmit: j,
|
|
219
|
+
values: N,
|
|
220
|
+
touched: $,
|
|
221
|
+
errors: G,
|
|
222
|
+
setFieldValue: D
|
|
223
|
+
} = L, Q = $.email && G.email, re = $.password && G.password;
|
|
224
|
+
return /* @__PURE__ */ e("div", { className: `${o["box-login"]} w-100`, children: /* @__PURE__ */ e(
|
|
225
|
+
gs,
|
|
226
|
+
{
|
|
227
|
+
className: `${o["block-login"]}`,
|
|
228
|
+
onSubmit: j,
|
|
229
|
+
children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
|
|
230
|
+
/* @__PURE__ */ n("div", { className: "d-flex align-items-center mb-4", children: [
|
|
231
|
+
/* @__PURE__ */ e(
|
|
232
|
+
"img",
|
|
233
|
+
{
|
|
234
|
+
hidden: !i?.schoolLogo,
|
|
235
|
+
src: i?.schoolLogo,
|
|
236
|
+
className: `${o["school-icon"]} mr-3`
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ e(
|
|
240
|
+
"p",
|
|
241
|
+
{
|
|
242
|
+
className: `${o["school-name"]} mb-0`,
|
|
243
|
+
children: i.schoolName
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
] }),
|
|
247
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Welcome Back!" }),
|
|
248
|
+
/* @__PURE__ */ e(
|
|
249
|
+
"p",
|
|
250
|
+
{
|
|
251
|
+
className: `${o["login-description"]} mb-5`,
|
|
252
|
+
children: "Please enter your MARIO Education account details"
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
/* @__PURE__ */ n(
|
|
256
|
+
ce,
|
|
257
|
+
{
|
|
258
|
+
className: `${o["form-user-name"]}`,
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ e(
|
|
261
|
+
ne,
|
|
262
|
+
{
|
|
263
|
+
type: "text",
|
|
264
|
+
name: "email",
|
|
265
|
+
placeholder: "Email",
|
|
266
|
+
value: N.email,
|
|
267
|
+
onChange: (X) => D(
|
|
268
|
+
"email",
|
|
269
|
+
X.target?.value?.trim() || ""
|
|
270
|
+
),
|
|
271
|
+
autocomplete: "email",
|
|
272
|
+
onBlur: C("email"),
|
|
273
|
+
required: !0
|
|
274
|
+
}
|
|
275
|
+
),
|
|
276
|
+
Q && /* @__PURE__ */ e(
|
|
277
|
+
oe,
|
|
278
|
+
{
|
|
279
|
+
text: G.email
|
|
280
|
+
}
|
|
281
|
+
)
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
),
|
|
285
|
+
/* @__PURE__ */ n(ce, { children: [
|
|
286
|
+
/* @__PURE__ */ e(
|
|
287
|
+
me,
|
|
288
|
+
{
|
|
289
|
+
isShowPassword: l,
|
|
290
|
+
togglePasswordVisible: y,
|
|
291
|
+
onChange: (X) => D(
|
|
292
|
+
"password",
|
|
293
|
+
X.target?.value?.trim() || ""
|
|
294
|
+
)
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
re && /* @__PURE__ */ e(
|
|
298
|
+
oe,
|
|
299
|
+
{
|
|
300
|
+
text: G.password
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
] }),
|
|
304
|
+
/* @__PURE__ */ e(ce, {}),
|
|
305
|
+
/* @__PURE__ */ n("div", { className: "d-flex justify-content-between", children: [
|
|
306
|
+
/* @__PURE__ */ n("div", { className: "d-flex align-items-center", style: { gap: "8px" }, children: [
|
|
307
|
+
/* @__PURE__ */ e(
|
|
308
|
+
"input",
|
|
309
|
+
{
|
|
310
|
+
type: "checkbox",
|
|
311
|
+
checked: !N.isSessionUserBrowser,
|
|
312
|
+
className: `${o["checkbox-keep-login"]}`,
|
|
313
|
+
onChange: () => D(
|
|
314
|
+
"isSessionUserBrowser",
|
|
315
|
+
!N.isSessionUserBrowser
|
|
316
|
+
)
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
/* @__PURE__ */ e(
|
|
320
|
+
"p",
|
|
321
|
+
{
|
|
322
|
+
className: `${o["label-keep-login"]} mb-0 ml-2`,
|
|
323
|
+
children: "Keep me logged in"
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
] }),
|
|
327
|
+
/* @__PURE__ */ e(
|
|
328
|
+
We,
|
|
329
|
+
{
|
|
330
|
+
to: "/forgot-password",
|
|
331
|
+
className: `${o["link-to-login"]}`,
|
|
332
|
+
children: "Forgot password?"
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ e(
|
|
337
|
+
"button",
|
|
338
|
+
{
|
|
339
|
+
className: `${o["btn-login"]} mt-5`,
|
|
340
|
+
type: "submit",
|
|
341
|
+
children: "LOG IN"
|
|
342
|
+
}
|
|
343
|
+
),
|
|
344
|
+
/* @__PURE__ */ e(
|
|
345
|
+
"p",
|
|
346
|
+
{
|
|
347
|
+
className: `${o["option-text"]} my-3 text-center`,
|
|
348
|
+
children: "OR"
|
|
349
|
+
}
|
|
350
|
+
),
|
|
351
|
+
/* @__PURE__ */ n(Ne, { className: "mb-4", children: [
|
|
352
|
+
/* @__PURE__ */ e(
|
|
353
|
+
Z,
|
|
354
|
+
{
|
|
355
|
+
lg: 6,
|
|
356
|
+
md: 6,
|
|
357
|
+
xs: 12,
|
|
358
|
+
className: "pr-md-3",
|
|
359
|
+
children: !!u && /* @__PURE__ */ e(
|
|
360
|
+
Ms,
|
|
361
|
+
{
|
|
362
|
+
clientId: u,
|
|
363
|
+
children: /* @__PURE__ */ e(
|
|
364
|
+
Ws,
|
|
365
|
+
{
|
|
366
|
+
onSuccess: W,
|
|
367
|
+
onError: () => console.log("Google login failed")
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
}
|
|
371
|
+
)
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
i.schoolId && /* @__PURE__ */ e(
|
|
375
|
+
Z,
|
|
376
|
+
{
|
|
377
|
+
lg: 6,
|
|
378
|
+
md: 6,
|
|
379
|
+
xs: 12,
|
|
380
|
+
className: `${o["btn-login-sso"]} pl-md-2`,
|
|
381
|
+
hidden: !i?.schoolId,
|
|
382
|
+
children: /* @__PURE__ */ n(
|
|
383
|
+
"div",
|
|
384
|
+
{
|
|
385
|
+
className: o["btn-login-with-sso"],
|
|
386
|
+
onClick: () => I(k),
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ e("img", { src: "images/microsoft-logo.png" }),
|
|
389
|
+
/* @__PURE__ */ e("p", { children: "MICROSOFT" })
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
] }),
|
|
396
|
+
/* @__PURE__ */ e(
|
|
397
|
+
"div",
|
|
398
|
+
{
|
|
399
|
+
className: `${o["btn-login-sso"]}`,
|
|
400
|
+
children: /* @__PURE__ */ n(
|
|
401
|
+
"div",
|
|
402
|
+
{
|
|
403
|
+
className: o["btn-login-with-sso"],
|
|
404
|
+
onClick: () => window.open(
|
|
405
|
+
"https://launchpad.classlink.com/login"
|
|
406
|
+
),
|
|
407
|
+
children: [
|
|
408
|
+
/* @__PURE__ */ e("img", { src: "images/class-link-icon.png" }),
|
|
409
|
+
/* @__PURE__ */ e("p", { children: "SIGN IN WITH CLASSLINK" })
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ e(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
className: `${o["btn-login-sso"]} mt-4`,
|
|
419
|
+
children: /* @__PURE__ */ n(
|
|
420
|
+
"div",
|
|
421
|
+
{
|
|
422
|
+
className: o["btn-login-with-sso"],
|
|
423
|
+
onClick: () => b(),
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ e("img", { src: "images/clever-icon.png" }),
|
|
426
|
+
/* @__PURE__ */ e("p", { children: "SIGN IN WITH CLEVER" })
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] })
|
|
433
|
+
}
|
|
434
|
+
) });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
),
|
|
438
|
+
/* @__PURE__ */ e(Hs, { open: T, onConfirm: w, clickHandler: k, onClose: P })
|
|
439
|
+
] });
|
|
440
|
+
}, Ys = {
|
|
441
|
+
email: "",
|
|
442
|
+
captcha: ""
|
|
443
|
+
}, Ks = "/", ze = "/login", Js = "Log in", Qe = () => {
|
|
444
|
+
const s = new URLSearchParams(hs().search), t = s.get("token"), i = s.get("key") ?? "", l = ve(), d = xe(), [p, u] = S(!1), I = v(() => {
|
|
445
|
+
u(!p);
|
|
446
|
+
}, [p]), [E, b] = S(!1), [T, w] = S(!1), [P, y] = S({
|
|
447
|
+
token: "",
|
|
448
|
+
password: "",
|
|
449
|
+
reEnterPassword: "",
|
|
450
|
+
email: "",
|
|
451
|
+
userId: ""
|
|
452
|
+
}), [q, M] = S(!0), { executeRecaptcha: k } = Te();
|
|
453
|
+
K(() => {
|
|
454
|
+
document.title = Js, ye() && d(Ks);
|
|
455
|
+
}, []);
|
|
456
|
+
const _ = v(async (N) => {
|
|
457
|
+
l(m(!0));
|
|
458
|
+
try {
|
|
459
|
+
await ps(N), d(ze), l(
|
|
460
|
+
x({
|
|
461
|
+
type: "success",
|
|
462
|
+
message: "A mail to reset password was sent"
|
|
463
|
+
})
|
|
464
|
+
);
|
|
465
|
+
} catch ($) {
|
|
466
|
+
l(
|
|
467
|
+
x({
|
|
468
|
+
type: "danger",
|
|
469
|
+
message: $.response?.data?.title || $.message || "Error occured"
|
|
470
|
+
})
|
|
471
|
+
), localStorage.removeItem(A), sessionStorage.removeItem(A);
|
|
472
|
+
}
|
|
473
|
+
l(m(!1));
|
|
474
|
+
}, []), W = v(
|
|
475
|
+
async (N, $) => {
|
|
476
|
+
l(m(!0));
|
|
477
|
+
try {
|
|
478
|
+
const G = await fs(N, $);
|
|
479
|
+
G.data ? y({
|
|
480
|
+
...P,
|
|
481
|
+
token: N,
|
|
482
|
+
email: G.data
|
|
483
|
+
}) : M(!1);
|
|
484
|
+
} catch {
|
|
485
|
+
M(!1);
|
|
486
|
+
}
|
|
487
|
+
l(m(!1));
|
|
488
|
+
},
|
|
489
|
+
[]
|
|
490
|
+
), L = v(async (N) => {
|
|
491
|
+
l(m(!0));
|
|
492
|
+
try {
|
|
493
|
+
await ws({ ...N, key: i }), d(ze), l(
|
|
494
|
+
x({
|
|
495
|
+
type: "success",
|
|
496
|
+
message: "Reset password sucessfully"
|
|
497
|
+
})
|
|
498
|
+
);
|
|
499
|
+
} catch ($) {
|
|
500
|
+
l(
|
|
501
|
+
x({
|
|
502
|
+
type: "danger",
|
|
503
|
+
message: $.response?.data?.title || $.message || "Error occured"
|
|
504
|
+
})
|
|
505
|
+
), localStorage.removeItem(A), sessionStorage.removeItem(A);
|
|
506
|
+
}
|
|
507
|
+
l(m(!1));
|
|
508
|
+
}, []), C = v(async () => {
|
|
509
|
+
if (!k) {
|
|
510
|
+
console.log("execute recaptcha undefined");
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
return await k("forgetPass");
|
|
514
|
+
}, [k]), j = v(() => {
|
|
515
|
+
}, []);
|
|
516
|
+
return K(() => {
|
|
517
|
+
t && i && W(t, i);
|
|
518
|
+
}, [t, i]), {
|
|
519
|
+
defaultInfo: Ys,
|
|
520
|
+
forgotPasswordRequest: _,
|
|
521
|
+
checkResetTokenRequest: W,
|
|
522
|
+
validLink: q,
|
|
523
|
+
resetPasswordRequest: L,
|
|
524
|
+
openLogin: p,
|
|
525
|
+
toggle: I,
|
|
526
|
+
isShowNewPassword: E,
|
|
527
|
+
setIsShowNewPassword: b,
|
|
528
|
+
isShowReTypePassword: T,
|
|
529
|
+
setIsShowReTypePassword: w,
|
|
530
|
+
clickHandler: C,
|
|
531
|
+
handleVerify: j,
|
|
532
|
+
initialValues: P
|
|
533
|
+
};
|
|
534
|
+
}, Zs = {
|
|
535
|
+
email: "",
|
|
536
|
+
captcha: ""
|
|
537
|
+
}, Qs = B.object({
|
|
538
|
+
email: B.string().email("Email is invalid").required("Email is required")
|
|
539
|
+
}), Xs = ({ school: s }) => {
|
|
540
|
+
const {
|
|
541
|
+
forgotPasswordRequest: t,
|
|
542
|
+
clickHandler: i,
|
|
543
|
+
handleVerify: l
|
|
544
|
+
} = Qe();
|
|
545
|
+
return /* @__PURE__ */ e(
|
|
546
|
+
Ie,
|
|
547
|
+
{
|
|
548
|
+
initialValues: Zs,
|
|
549
|
+
enableReinitialize: !0,
|
|
550
|
+
validationSchema: Qs,
|
|
551
|
+
onSubmit: async (d) => {
|
|
552
|
+
const p = await i();
|
|
553
|
+
p && (d.captcha = p, t(d));
|
|
554
|
+
},
|
|
555
|
+
children: (d) => {
|
|
556
|
+
const {
|
|
557
|
+
handleChange: p,
|
|
558
|
+
handleSubmit: u,
|
|
559
|
+
values: I,
|
|
560
|
+
touched: E,
|
|
561
|
+
errors: b
|
|
562
|
+
} = d;
|
|
563
|
+
return /* @__PURE__ */ e("div", { className: `${o["box-login"]}`, children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
|
|
564
|
+
/* @__PURE__ */ n("div", { className: "d-flex align-items-center mb-4", children: [
|
|
565
|
+
/* @__PURE__ */ e(
|
|
566
|
+
"img",
|
|
567
|
+
{
|
|
568
|
+
src: s.schoolLogo,
|
|
569
|
+
className: `${o["school-icon"]} mr-3`
|
|
570
|
+
}
|
|
571
|
+
),
|
|
572
|
+
/* @__PURE__ */ e(
|
|
573
|
+
"p",
|
|
574
|
+
{
|
|
575
|
+
className: `${o["school-name"]} mb-0`,
|
|
576
|
+
children: s.schoolName
|
|
577
|
+
}
|
|
578
|
+
)
|
|
579
|
+
] }),
|
|
580
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]} `, children: "Forgot password" }),
|
|
581
|
+
/* @__PURE__ */ e(
|
|
582
|
+
"p",
|
|
583
|
+
{
|
|
584
|
+
className: `${o["recover-account"]} mb-5`,
|
|
585
|
+
children: "Enter email to recover your account"
|
|
586
|
+
}
|
|
587
|
+
),
|
|
588
|
+
/* @__PURE__ */ n("div", { className: "w-100", children: [
|
|
589
|
+
/* @__PURE__ */ e(
|
|
590
|
+
ne,
|
|
591
|
+
{
|
|
592
|
+
type: "text",
|
|
593
|
+
name: "email",
|
|
594
|
+
id: "email",
|
|
595
|
+
placeholder: "Input email",
|
|
596
|
+
onChange: p,
|
|
597
|
+
value: I.email
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
E.email && b.email && /* @__PURE__ */ e(oe, { text: b.email })
|
|
601
|
+
] }),
|
|
602
|
+
/* @__PURE__ */ e(
|
|
603
|
+
We,
|
|
604
|
+
{
|
|
605
|
+
to: "/login",
|
|
606
|
+
className: `${o["link-to-login"]} mt-2`,
|
|
607
|
+
children: "Return to login"
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
/* @__PURE__ */ e(
|
|
611
|
+
Rs,
|
|
612
|
+
{
|
|
613
|
+
action: "forgetPass",
|
|
614
|
+
onVerify: l
|
|
615
|
+
}
|
|
616
|
+
),
|
|
617
|
+
/* @__PURE__ */ e(Z, { className: "p-0", children: /* @__PURE__ */ e(
|
|
618
|
+
"button",
|
|
619
|
+
{
|
|
620
|
+
className: `${o["btn-login"]} mt-5`,
|
|
621
|
+
onClick: () => u(),
|
|
622
|
+
children: "Continue"
|
|
623
|
+
}
|
|
624
|
+
) })
|
|
625
|
+
] }) }) });
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
}, ea = B.object({
|
|
630
|
+
password: B.string().required("New password is required"),
|
|
631
|
+
reEnterPassword: B.string().required("Please re-enter new password").test("matching", "Passwords do not match", function() {
|
|
632
|
+
return this.parent.password === this.parent.reEnterPassword;
|
|
633
|
+
})
|
|
634
|
+
}), sa = () => {
|
|
635
|
+
const {
|
|
636
|
+
validLink: s,
|
|
637
|
+
resetPasswordRequest: t,
|
|
638
|
+
isShowNewPassword: i,
|
|
639
|
+
setIsShowNewPassword: l,
|
|
640
|
+
isShowReTypePassword: d,
|
|
641
|
+
setIsShowReTypePassword: p,
|
|
642
|
+
initialValues: u
|
|
643
|
+
} = Qe();
|
|
644
|
+
return /* @__PURE__ */ e(
|
|
645
|
+
Ie,
|
|
646
|
+
{
|
|
647
|
+
initialValues: u,
|
|
648
|
+
enableReinitialize: !0,
|
|
649
|
+
validationSchema: ea,
|
|
650
|
+
onSubmit: (I) => {
|
|
651
|
+
t(I);
|
|
652
|
+
},
|
|
653
|
+
children: (I) => {
|
|
654
|
+
const { setFieldValue: E, handleSubmit: b, touched: T, errors: w, values: P } = I;
|
|
655
|
+
return /* @__PURE__ */ e(Ne, { className: `${o["box-login"]}`, children: /* @__PURE__ */ e(Z, { className: "p-0", children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
|
|
656
|
+
/* @__PURE__ */ e(
|
|
657
|
+
"img",
|
|
658
|
+
{
|
|
659
|
+
src: `${de(
|
|
660
|
+
"/images/horizontal-logo-blue.svg"
|
|
661
|
+
)}`,
|
|
662
|
+
className: `${o["img-login-rectangle"]}`
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Reset Password" }),
|
|
666
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: s ? /* @__PURE__ */ n(Se, { children: [
|
|
667
|
+
/* @__PURE__ */ e(
|
|
668
|
+
ce,
|
|
669
|
+
{
|
|
670
|
+
className: `${o["form-user-name"]}`,
|
|
671
|
+
children: /* @__PURE__ */ e(
|
|
672
|
+
ne,
|
|
673
|
+
{
|
|
674
|
+
disabled: !0,
|
|
675
|
+
type: "text",
|
|
676
|
+
name: "email",
|
|
677
|
+
placeholder: "Email",
|
|
678
|
+
value: P.email,
|
|
679
|
+
autocomplete: "email",
|
|
680
|
+
required: !0,
|
|
681
|
+
className: `${o.input}`
|
|
682
|
+
}
|
|
683
|
+
)
|
|
684
|
+
}
|
|
685
|
+
),
|
|
686
|
+
/* @__PURE__ */ n(
|
|
687
|
+
"div",
|
|
688
|
+
{
|
|
689
|
+
className: `${o["form-user-name"]}`,
|
|
690
|
+
children: [
|
|
691
|
+
/* @__PURE__ */ e(
|
|
692
|
+
me,
|
|
693
|
+
{
|
|
694
|
+
isShowPassword: i,
|
|
695
|
+
togglePasswordVisible: () => l(
|
|
696
|
+
!i
|
|
697
|
+
),
|
|
698
|
+
onChange: (y) => E(
|
|
699
|
+
"password",
|
|
700
|
+
y.target.value
|
|
701
|
+
)
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
T.password && w.password && /* @__PURE__ */ e(
|
|
705
|
+
oe,
|
|
706
|
+
{
|
|
707
|
+
text: w.password
|
|
708
|
+
}
|
|
709
|
+
)
|
|
710
|
+
]
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
/* @__PURE__ */ n(
|
|
714
|
+
"div",
|
|
715
|
+
{
|
|
716
|
+
className: `${o["form-user-name"]}`,
|
|
717
|
+
children: [
|
|
718
|
+
/* @__PURE__ */ e(
|
|
719
|
+
me,
|
|
720
|
+
{
|
|
721
|
+
placeholder: "Confirm Password",
|
|
722
|
+
isShowPassword: d,
|
|
723
|
+
togglePasswordVisible: () => p(
|
|
724
|
+
!d
|
|
725
|
+
),
|
|
726
|
+
onChange: (y) => E(
|
|
727
|
+
"reEnterPassword",
|
|
728
|
+
y.target.value
|
|
729
|
+
)
|
|
730
|
+
}
|
|
731
|
+
),
|
|
732
|
+
T.reEnterPassword && w.reEnterPassword && /* @__PURE__ */ e(
|
|
733
|
+
oe,
|
|
734
|
+
{
|
|
735
|
+
text: w.reEnterPassword
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
] }) : /* @__PURE__ */ n(Se, { children: [
|
|
742
|
+
/* @__PURE__ */ e(
|
|
743
|
+
"p",
|
|
744
|
+
{
|
|
745
|
+
className: `${o["recover-account"]} mb-5`,
|
|
746
|
+
children: "Invalid reset password link"
|
|
747
|
+
}
|
|
748
|
+
),
|
|
749
|
+
/* @__PURE__ */ e("p", { className: "w-100", children: "It may have been accessed before or expired or you have just tried to reset another account's password" })
|
|
750
|
+
] }) }),
|
|
751
|
+
s && /* @__PURE__ */ e(Z, { className: "p-0", children: /* @__PURE__ */ e(
|
|
752
|
+
"button",
|
|
753
|
+
{
|
|
754
|
+
className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
|
|
755
|
+
onClick: () => b(),
|
|
756
|
+
children: "SET A NEW PASSWORD"
|
|
757
|
+
}
|
|
758
|
+
) })
|
|
759
|
+
] }) }) }) });
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
);
|
|
763
|
+
}, Xe = `${Je}/api/school`, aa = () => Ke.get(`${Xe}/settings`), oa = () => Ke.get(`${Xe}/info`), ta = {
|
|
764
|
+
auth: {
|
|
765
|
+
clientId: fe ? "a27f8ac9-e039-4bbd-a9e1-3096e52a77bb" : "90c6897c-f17b-475e-a7a8-9a19651e0060",
|
|
766
|
+
authority: "https://login.microsoftonline.com/common",
|
|
767
|
+
redirectUri: "https://sso.marioforme.com/microsoft-login.html"
|
|
768
|
+
},
|
|
769
|
+
cache: {
|
|
770
|
+
cacheLocation: "sessionStorage",
|
|
771
|
+
// This configures where your cache will be stored
|
|
772
|
+
storeAuthStateInCookie: !1
|
|
773
|
+
// Set this to "true" if you are having issues on IE11 or Edge
|
|
774
|
+
},
|
|
775
|
+
system: {
|
|
776
|
+
loggerOptions: {
|
|
777
|
+
loggerCallback: (s, t, i) => {
|
|
778
|
+
if (!i)
|
|
779
|
+
switch (s) {
|
|
780
|
+
case pe.Error:
|
|
781
|
+
console.error(t);
|
|
782
|
+
return;
|
|
783
|
+
case pe.Info:
|
|
784
|
+
console.info(t);
|
|
785
|
+
return;
|
|
786
|
+
case pe.Verbose:
|
|
787
|
+
console.debug(t);
|
|
788
|
+
return;
|
|
789
|
+
case pe.Warning:
|
|
790
|
+
console.warn(t);
|
|
791
|
+
return;
|
|
792
|
+
default:
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}, na = {
|
|
799
|
+
email: "",
|
|
800
|
+
password: "",
|
|
801
|
+
captcha: "",
|
|
802
|
+
rememberMe: !1,
|
|
803
|
+
isSessionUserBrowser: !!sessionStorage.getItem(Ce)
|
|
804
|
+
}, ra = "/home", Be = "/home", ia = "/admin/home", la = "/parent", ca = "/admin/schools", da = "/list-student", ma = "Log in", ga = () => {
|
|
805
|
+
const s = ve(), t = xe(), [i, l] = S(!1), d = Le(
|
|
806
|
+
(a) => a.common.isLoginGoogle
|
|
807
|
+
), [p, u] = S(""), [I, E] = S(""), [b, T] = S(""), [w, P] = S(!1), y = Le((a) => a.common.inforUserGoogle), q = Le((a) => a.common.environment), M = new URLSearchParams(location.search), k = M.get("type") === "classlink", _ = M.get("token"), W = M.get("isAdminUser"), [
|
|
808
|
+
L
|
|
809
|
+
/*, setOpenModelAssign*/
|
|
810
|
+
] = S(!1), [C, j] = S({
|
|
811
|
+
schoolName: "",
|
|
812
|
+
schoolLogo: "",
|
|
813
|
+
schoolId: 0
|
|
814
|
+
}), [N, $] = S(null), G = v(() => {
|
|
815
|
+
l(!i);
|
|
816
|
+
}, [i]), [D, Q] = S(!1), [re, X] = S(!1), [J, be] = S({
|
|
817
|
+
firstName: "",
|
|
818
|
+
lastName: "",
|
|
819
|
+
fullName: "",
|
|
820
|
+
imageUrl: "",
|
|
821
|
+
email: "",
|
|
822
|
+
accessToken: "",
|
|
823
|
+
googleId: ""
|
|
824
|
+
});
|
|
825
|
+
K(() => {
|
|
826
|
+
document.title = ma;
|
|
827
|
+
const a = Ss("auth-token");
|
|
828
|
+
if (a) {
|
|
829
|
+
const c = window.location.hostname;
|
|
830
|
+
if (localStorage.setItem(A, a), document.cookie = `auth-token=;domain=${c.includes("localhost") ? c : ".marioforme.com"}; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`, document.cookie = "redirect-uri=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/", W)
|
|
831
|
+
return t("/admin/home");
|
|
832
|
+
_e(a);
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
ye() && t("/"), ns();
|
|
836
|
+
}, [W, _e, t]);
|
|
837
|
+
const ge = () => {
|
|
838
|
+
localStorage.removeItem(A), sessionStorage.removeItem(A), localStorage.removeItem("USER_EMAIL");
|
|
839
|
+
};
|
|
840
|
+
K(() => {
|
|
841
|
+
k && _ != "" && ss();
|
|
842
|
+
}, []);
|
|
843
|
+
const F = () => {
|
|
844
|
+
X(!re);
|
|
845
|
+
}, es = () => {
|
|
846
|
+
if (fe) {
|
|
847
|
+
const a = "https://clever.com/oauth/instant-login?client_id=c3da6c669d239c70d48e&district_id=66132a6f222bda41cc8abe5d";
|
|
848
|
+
window.location.href = a;
|
|
849
|
+
} else {
|
|
850
|
+
const a = `https://clever.com/oauth/authorize?response_type=code&redirect_uri=${encodeURIComponent(`${Je}/api/clever/clever-login`)}&client_id=c3da6c669d239c70d48e`;
|
|
851
|
+
window.location.href = a;
|
|
852
|
+
}
|
|
853
|
+
}, ss = async () => {
|
|
854
|
+
s(m(!0));
|
|
855
|
+
try {
|
|
856
|
+
const r = await ys({
|
|
857
|
+
tokenClassLink: _
|
|
858
|
+
}), { email: c, token: f } = r.data;
|
|
859
|
+
await ee({
|
|
860
|
+
email: c,
|
|
861
|
+
rememberMe: !1,
|
|
862
|
+
password: "default",
|
|
863
|
+
accessToken: f
|
|
864
|
+
});
|
|
865
|
+
} catch (a) {
|
|
866
|
+
s(
|
|
867
|
+
x({
|
|
868
|
+
type: "danger",
|
|
869
|
+
message: a.response?.data?.title || a.message
|
|
870
|
+
})
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
s(m(!1));
|
|
874
|
+
}, Ee = window.location.host.includes("-district"), as = v(async () => {
|
|
875
|
+
s(m(!0));
|
|
876
|
+
try {
|
|
877
|
+
const a = await oa(), r = a.data.schoolLogo ?? "";
|
|
878
|
+
a.data && j({
|
|
879
|
+
schoolName: a.data.schoolName,
|
|
880
|
+
schoolLogo: r ? Ns(r) : de("/images/logo_header_blue.png"),
|
|
881
|
+
schoolId: a.data.schoolId
|
|
882
|
+
});
|
|
883
|
+
} catch (a) {
|
|
884
|
+
s(
|
|
885
|
+
x({
|
|
886
|
+
type: "danger",
|
|
887
|
+
message: a.response?.data?.title || a.message
|
|
888
|
+
})
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
s(m(!1));
|
|
892
|
+
}, []), [os, he] = S(!1), [te, Pe] = S(null), ie = v((a, r, c, f, g, V, O, H, Y, R) => {
|
|
893
|
+
const U = R?.isSessionUserBrowser ?? !1;
|
|
894
|
+
if (U ? (sessionStorage.setItem(A, a), sessionStorage.setItem(
|
|
895
|
+
Ce,
|
|
896
|
+
String(U)
|
|
897
|
+
)) : (sessionStorage.removeItem(Ce), localStorage.setItem(A, a)), localStorage.removeItem(vs), s(
|
|
898
|
+
Is({
|
|
899
|
+
id: r,
|
|
900
|
+
firstName: c,
|
|
901
|
+
lastName: f,
|
|
902
|
+
roles: g,
|
|
903
|
+
email: V,
|
|
904
|
+
profileImageFileName: O
|
|
905
|
+
})
|
|
906
|
+
), !localStorage.getItem("ROLES") && g.includes("Admin") && localStorage.setItem("ROLES", "Admin"), R?.email && !g.includes("Admin")) {
|
|
907
|
+
le.init(
|
|
908
|
+
fe ? ks : bs,
|
|
909
|
+
R.email,
|
|
910
|
+
{
|
|
911
|
+
defaultTracking: !1
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
const se = window.location.hostname, ae = new le.Identify();
|
|
915
|
+
ae.set("domain", se), le.identify(ae), le.track("general: session start", {
|
|
916
|
+
user_id: R.email,
|
|
917
|
+
domain: se,
|
|
918
|
+
roles: g?.toString()
|
|
919
|
+
}), localStorage.setItem("USER_EMAIL", R.email), H && le.track("general: first login", {
|
|
920
|
+
user_id: R.email,
|
|
921
|
+
domain: se,
|
|
922
|
+
roles: g?.toString()
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
const z = (se) => {
|
|
926
|
+
const ae = Es(se, Y);
|
|
927
|
+
window.location.pathname.startsWith("/es") ? Y === "es" ? t(ae) : window.location.href = ae : Y === "es" ? window.location.href = ae : t(ae);
|
|
928
|
+
};
|
|
929
|
+
Ee ? z(ca) : g.includes("Admin") ? z(ia) : g.includes("Teacher") || g.includes("Assistant") || g.includes("Counselor") || g.includes("SecondaryTeacher") ? z(ra) : g.includes("Student") ? z(Be) : g.includes("Parent") ? z(la) : g.includes("EduTeacher") && z(da), s(m(!1));
|
|
930
|
+
}, [s, t, Ee]), ue = v((a, r, c) => w && a?.includes("Student") && (r === "es" || c === "ES") ? (s(
|
|
931
|
+
x({
|
|
932
|
+
type: "danger",
|
|
933
|
+
message: "Unable to sign in with SSO. Please contact your admin or teacher."
|
|
934
|
+
})
|
|
935
|
+
), localStorage.removeItem(A), sessionStorage.removeItem(A), s(m(!1)), !0) : !1, [w, s]), $e = v((a) => w && a && Ls.includes(a.trim()) ? (s(
|
|
936
|
+
x({
|
|
937
|
+
type: "danger",
|
|
938
|
+
message: "Unable to sign in with SSO. Please contact your admin or teacher."
|
|
939
|
+
})
|
|
940
|
+
), s(m(!1)), !0) : !1, [w, s]);
|
|
941
|
+
async function _e(a) {
|
|
942
|
+
s(m(!0));
|
|
943
|
+
try {
|
|
944
|
+
const r = await Cs();
|
|
945
|
+
let {
|
|
946
|
+
id: c,
|
|
947
|
+
firstName: f,
|
|
948
|
+
lastName: g,
|
|
949
|
+
roles: V,
|
|
950
|
+
email: O,
|
|
951
|
+
profileImageFileName: H,
|
|
952
|
+
isLoginFirst: Y,
|
|
953
|
+
schoolLevel: R,
|
|
954
|
+
appType: U,
|
|
955
|
+
preferredAppType: z,
|
|
956
|
+
needsAppTypeChoice: se
|
|
957
|
+
} = r.data;
|
|
958
|
+
if (se) {
|
|
959
|
+
Pe({ email: O }), he(!0), s(m(!1));
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
R || (U === "ES" || U === "ES, MS" && z === "ES") && (R = "es"), ie(
|
|
963
|
+
a,
|
|
964
|
+
c,
|
|
965
|
+
f,
|
|
966
|
+
g,
|
|
967
|
+
V,
|
|
968
|
+
O,
|
|
969
|
+
H,
|
|
970
|
+
Y,
|
|
971
|
+
R,
|
|
972
|
+
{ email: O }
|
|
973
|
+
);
|
|
974
|
+
} catch (r) {
|
|
975
|
+
s(
|
|
976
|
+
x({
|
|
977
|
+
type: "danger",
|
|
978
|
+
message: r.response?.data?.title || r.message || "Login failed"
|
|
979
|
+
})
|
|
980
|
+
), s(m(!1));
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
const ts = v(async (a) => {
|
|
984
|
+
if (he(!1), !te) return;
|
|
985
|
+
s(m(!0));
|
|
986
|
+
const r = a === "es" ? "ES" : a === "ms" ? "MS" : "ES, MS";
|
|
987
|
+
try {
|
|
988
|
+
const c = await Ge({
|
|
989
|
+
...te,
|
|
990
|
+
email: te?.email?.trim(),
|
|
991
|
+
password: te?.password?.trim(),
|
|
992
|
+
preferredAppType: r
|
|
993
|
+
});
|
|
994
|
+
let {
|
|
995
|
+
token: f,
|
|
996
|
+
id: g,
|
|
997
|
+
firstName: V,
|
|
998
|
+
lastName: O,
|
|
999
|
+
roles: H,
|
|
1000
|
+
email: Y,
|
|
1001
|
+
profileImageFileName: R,
|
|
1002
|
+
isLoginFirst: U,
|
|
1003
|
+
schoolLevel: z
|
|
1004
|
+
} = c.data;
|
|
1005
|
+
if (!z && a === "es" && (z = "es"), ue(H, z, c.data.appType)) return;
|
|
1006
|
+
ie(
|
|
1007
|
+
f,
|
|
1008
|
+
g,
|
|
1009
|
+
V,
|
|
1010
|
+
O,
|
|
1011
|
+
H,
|
|
1012
|
+
Y,
|
|
1013
|
+
R,
|
|
1014
|
+
U,
|
|
1015
|
+
z,
|
|
1016
|
+
te
|
|
1017
|
+
);
|
|
1018
|
+
} catch (c) {
|
|
1019
|
+
s(
|
|
1020
|
+
x({
|
|
1021
|
+
type: "danger",
|
|
1022
|
+
message: c.response?.data?.title || c.message || "Login failed"
|
|
1023
|
+
})
|
|
1024
|
+
), s(m(!1));
|
|
1025
|
+
}
|
|
1026
|
+
}, [te, ie, ue, s]), ee = v(async (a) => {
|
|
1027
|
+
s(m(!0));
|
|
1028
|
+
try {
|
|
1029
|
+
const r = await Ge({
|
|
1030
|
+
...a,
|
|
1031
|
+
email: a?.email?.trim(),
|
|
1032
|
+
password: a?.password?.trim()
|
|
1033
|
+
});
|
|
1034
|
+
let {
|
|
1035
|
+
token: c,
|
|
1036
|
+
id: f,
|
|
1037
|
+
firstName: g,
|
|
1038
|
+
lastName: V,
|
|
1039
|
+
roles: O,
|
|
1040
|
+
email: H,
|
|
1041
|
+
profileImageFileName: Y,
|
|
1042
|
+
isLoginFirst: R,
|
|
1043
|
+
schoolLevel: U
|
|
1044
|
+
} = r.data;
|
|
1045
|
+
if (r.data.needsAppTypeChoice) {
|
|
1046
|
+
Pe(a), he(!0), s(m(!1));
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
if (U || (r.data.appType === "ES" || r.data.appType === "ES, MS" && r.data.preferredAppType === "ES") && (U = "es"), ue(O, U, r.data.appType)) return;
|
|
1050
|
+
ie(
|
|
1051
|
+
c,
|
|
1052
|
+
f,
|
|
1053
|
+
g,
|
|
1054
|
+
V,
|
|
1055
|
+
O,
|
|
1056
|
+
H,
|
|
1057
|
+
Y,
|
|
1058
|
+
R,
|
|
1059
|
+
U,
|
|
1060
|
+
a
|
|
1061
|
+
);
|
|
1062
|
+
} catch (r) {
|
|
1063
|
+
s(
|
|
1064
|
+
x({
|
|
1065
|
+
type: "danger",
|
|
1066
|
+
message: r.response?.data?.title || r.message || "Login failed"
|
|
1067
|
+
})
|
|
1068
|
+
), localStorage.removeItem(A), sessionStorage.removeItem(A), s(m(!1));
|
|
1069
|
+
}
|
|
1070
|
+
}, [ie, ue, s]), ns = async () => {
|
|
1071
|
+
try {
|
|
1072
|
+
const a = await xs();
|
|
1073
|
+
u(a.data.googleClientId), E(a.data.googleCaptchaId), T(a.data.extensionEmail), P(a.data.isRestrictedLogin);
|
|
1074
|
+
} catch (a) {
|
|
1075
|
+
s(
|
|
1076
|
+
x({
|
|
1077
|
+
type: "danger",
|
|
1078
|
+
message: a.response?.data?.title || a.message || "Login failed"
|
|
1079
|
+
})
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
}, Re = v(
|
|
1083
|
+
async (a, r, c, f) => {
|
|
1084
|
+
s(m(!0));
|
|
1085
|
+
try {
|
|
1086
|
+
if ((await Ts(a, r)).data) {
|
|
1087
|
+
const O = {
|
|
1088
|
+
email: r.email,
|
|
1089
|
+
isLoginGoogle: !0,
|
|
1090
|
+
rememberMe: !1,
|
|
1091
|
+
password: "default",
|
|
1092
|
+
accessToken: c,
|
|
1093
|
+
captcha: "",
|
|
1094
|
+
loginType: we.Google
|
|
1095
|
+
};
|
|
1096
|
+
if (f != null) {
|
|
1097
|
+
const H = await f();
|
|
1098
|
+
O.captcha = H;
|
|
1099
|
+
}
|
|
1100
|
+
await ee(O), s(ke(!1));
|
|
1101
|
+
} else
|
|
1102
|
+
be({ ...r, token: c }), F();
|
|
1103
|
+
} catch (g) {
|
|
1104
|
+
s(
|
|
1105
|
+
x({
|
|
1106
|
+
type: "danger",
|
|
1107
|
+
message: g.response?.data?.title || g.message || "Login failed"
|
|
1108
|
+
})
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
s(m(!1));
|
|
1112
|
+
},
|
|
1113
|
+
[ee, s, F]
|
|
1114
|
+
), rs = v(async (a, r) => {
|
|
1115
|
+
s(m(!0));
|
|
1116
|
+
try {
|
|
1117
|
+
if ($e(a)) return;
|
|
1118
|
+
if ((await Oe({ ...J, gradeLevel: a }))?.data) {
|
|
1119
|
+
const f = {
|
|
1120
|
+
email: J.email,
|
|
1121
|
+
isLoginGoogle: !0,
|
|
1122
|
+
rememberMe: !1,
|
|
1123
|
+
password: "default",
|
|
1124
|
+
accessToken: J.accessToken,
|
|
1125
|
+
captcha: "",
|
|
1126
|
+
loginType: we.Google
|
|
1127
|
+
};
|
|
1128
|
+
if (r != null) {
|
|
1129
|
+
const g = await r();
|
|
1130
|
+
f.captcha = g;
|
|
1131
|
+
}
|
|
1132
|
+
await ee(f), F();
|
|
1133
|
+
}
|
|
1134
|
+
} catch (c) {
|
|
1135
|
+
s(
|
|
1136
|
+
x({
|
|
1137
|
+
type: "danger",
|
|
1138
|
+
message: c.response?.data?.title || c.message || "Login failed"
|
|
1139
|
+
})
|
|
1140
|
+
);
|
|
1141
|
+
}
|
|
1142
|
+
s(m(!1));
|
|
1143
|
+
}, [$e, J, ee, F, s]), is = async (a, r) => {
|
|
1144
|
+
s(m(!0));
|
|
1145
|
+
try {
|
|
1146
|
+
const c = {
|
|
1147
|
+
firstName: y.firstName,
|
|
1148
|
+
lastName: y.lastName,
|
|
1149
|
+
imageUrl: y.imageUrl,
|
|
1150
|
+
fullName: y.fullName,
|
|
1151
|
+
email: y.email,
|
|
1152
|
+
accessToken: y.accessToken,
|
|
1153
|
+
teacherId: a
|
|
1154
|
+
};
|
|
1155
|
+
if ((await Oe(c)).data) {
|
|
1156
|
+
const g = await r(), V = {
|
|
1157
|
+
email: y.email,
|
|
1158
|
+
captcha: g,
|
|
1159
|
+
isLoginGoogle: !0,
|
|
1160
|
+
rememberMe: !1,
|
|
1161
|
+
password: "default",
|
|
1162
|
+
accessToken: y.accessToken,
|
|
1163
|
+
loginType: we.Google
|
|
1164
|
+
};
|
|
1165
|
+
s(ke(!1)), await ee(V), t(Be);
|
|
1166
|
+
}
|
|
1167
|
+
} catch (c) {
|
|
1168
|
+
s(
|
|
1169
|
+
x({
|
|
1170
|
+
type: "danger",
|
|
1171
|
+
message: c.response?.data?.title || c.message || "Login failed"
|
|
1172
|
+
})
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
s(ke(!1)), s(m(!1));
|
|
1176
|
+
}, ls = async () => {
|
|
1177
|
+
try {
|
|
1178
|
+
const a = await aa();
|
|
1179
|
+
s(Ps(a.data.isSandboxMode));
|
|
1180
|
+
} catch (a) {
|
|
1181
|
+
console.error(a);
|
|
1182
|
+
}
|
|
1183
|
+
}, Ae = async (a) => {
|
|
1184
|
+
N.handleRedirectPromise().then(async (r) => {
|
|
1185
|
+
if (C?.schoolId)
|
|
1186
|
+
if (r) {
|
|
1187
|
+
let c = r.account;
|
|
1188
|
+
await Me(c, a);
|
|
1189
|
+
} else {
|
|
1190
|
+
const c = N.getAllAccounts();
|
|
1191
|
+
if (c.length === 0) {
|
|
1192
|
+
const f = q === "PreProduction" ? "https://mario1.marioforme.com" : fe ? "https://brightsoft.marioforme.com" : "https://sso.marioforme.com";
|
|
1193
|
+
window.location.href = (window.location.hostname === "localhost" ? window.location.origin : f) + `/microsoft-login.html?redirect-uri=${window.location.origin}&schoolId=${C.schoolId}`;
|
|
1194
|
+
} else {
|
|
1195
|
+
let f = c[0];
|
|
1196
|
+
await Me(f, a);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}).catch((r) => {
|
|
1200
|
+
console.error(r);
|
|
1201
|
+
});
|
|
1202
|
+
}, Me = async (a, r) => {
|
|
1203
|
+
let c = a.name, f = {
|
|
1204
|
+
firstName: c.split(" ").slice(0, -1).join(" "),
|
|
1205
|
+
lastName: c.split(" ").slice(-1).join(" "),
|
|
1206
|
+
fullName: c,
|
|
1207
|
+
imageUrl: "",
|
|
1208
|
+
email: a.username,
|
|
1209
|
+
accessToken: a.idTokenClaims.aio,
|
|
1210
|
+
googleId: a.tenantId
|
|
1211
|
+
};
|
|
1212
|
+
s(Ye(f)), await Re(
|
|
1213
|
+
Ze.MicrosoftSSO,
|
|
1214
|
+
f,
|
|
1215
|
+
a.idTokenClaims.aio,
|
|
1216
|
+
r
|
|
1217
|
+
);
|
|
1218
|
+
}, cs = async () => {
|
|
1219
|
+
const a = new Os(ta);
|
|
1220
|
+
await a.initialize(), $(a);
|
|
1221
|
+
};
|
|
1222
|
+
return K(() => {
|
|
1223
|
+
let a = window.location.href;
|
|
1224
|
+
N && a.includes("code") && a.includes("client_info") && Ae();
|
|
1225
|
+
}, [JSON.stringify(N)]), K(() => {
|
|
1226
|
+
ls(), cs(), as();
|
|
1227
|
+
}, []), {
|
|
1228
|
+
defaultInfo: na,
|
|
1229
|
+
userLogin: ee,
|
|
1230
|
+
openLogin: i,
|
|
1231
|
+
toggle: G,
|
|
1232
|
+
isShowPassword: D,
|
|
1233
|
+
setIsShowPassword: Q,
|
|
1234
|
+
fnIsCheckLogin: Re,
|
|
1235
|
+
isLoginGoogle: d,
|
|
1236
|
+
infoUser: y,
|
|
1237
|
+
submitLogin: is,
|
|
1238
|
+
googleClientId: p,
|
|
1239
|
+
googleRecaptchaId: I,
|
|
1240
|
+
handleCancelModelAssign: ge,
|
|
1241
|
+
openModelAssign: L,
|
|
1242
|
+
// handleAssignTeacherByCode,
|
|
1243
|
+
fnLoginSSO: Ae,
|
|
1244
|
+
school: C,
|
|
1245
|
+
extensionEmail: b,
|
|
1246
|
+
handleLoginWidthClever: es,
|
|
1247
|
+
openModalSelectGrade: re,
|
|
1248
|
+
handleRegisterUser: rs,
|
|
1249
|
+
handleToggleModelGrade: F,
|
|
1250
|
+
openModalSelectTier: os,
|
|
1251
|
+
handleSelectTier: ts,
|
|
1252
|
+
setOpenModalSelectTier: he
|
|
1253
|
+
};
|
|
1254
|
+
}, Fe = "/", ha = "/login", De = "Log in", ua = () => {
|
|
1255
|
+
const s = ve(), t = xe(), i = location.search, d = new URLSearchParams(i).get("userId"), [p, u] = S(!1), [I, E] = S(
|
|
1256
|
+
!1
|
|
1257
|
+
), [b, T] = S({
|
|
1258
|
+
password: "",
|
|
1259
|
+
reEnterPassword: "",
|
|
1260
|
+
email: "",
|
|
1261
|
+
userId: d ?? "",
|
|
1262
|
+
token: ""
|
|
1263
|
+
}), { executeRecaptcha: w } = Te(), P = v(async (k) => {
|
|
1264
|
+
s(m(!0));
|
|
1265
|
+
try {
|
|
1266
|
+
const _ = await $s(k);
|
|
1267
|
+
T({ ...b, email: _.data });
|
|
1268
|
+
} catch (_) {
|
|
1269
|
+
s(
|
|
1270
|
+
x({
|
|
1271
|
+
type: "danger",
|
|
1272
|
+
message: _.message
|
|
1273
|
+
})
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
s(m(!1));
|
|
1277
|
+
}, []), y = v(async (k) => {
|
|
1278
|
+
s(m(!0));
|
|
1279
|
+
try {
|
|
1280
|
+
await _s(k), t(ha), s(
|
|
1281
|
+
x({
|
|
1282
|
+
type: "success",
|
|
1283
|
+
message: "Create password sucessfully"
|
|
1284
|
+
})
|
|
1285
|
+
);
|
|
1286
|
+
} catch (_) {
|
|
1287
|
+
s(
|
|
1288
|
+
x({
|
|
1289
|
+
type: "danger",
|
|
1290
|
+
message: _.response?.data?.title || _.message || "Error occured"
|
|
1291
|
+
})
|
|
1292
|
+
), localStorage.removeItem(A), sessionStorage.removeItem(A);
|
|
1293
|
+
}
|
|
1294
|
+
s(m(!1));
|
|
1295
|
+
}, []), q = v(async () => {
|
|
1296
|
+
if (!w) {
|
|
1297
|
+
console.log("execute recaptcha undefined");
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
return await w("forgetPass");
|
|
1301
|
+
}, [w]), M = v(() => {
|
|
1302
|
+
}, []);
|
|
1303
|
+
return K(() => {
|
|
1304
|
+
document.title = De, ye() && t(Fe), d && P(d);
|
|
1305
|
+
}, [d]), K(() => {
|
|
1306
|
+
document.title = De, ye() && t(Fe);
|
|
1307
|
+
}, []), {
|
|
1308
|
+
createPasswordRequest: y,
|
|
1309
|
+
isShowNewPassword: p,
|
|
1310
|
+
setIsShowNewPassword: u,
|
|
1311
|
+
isShowReTypePassword: I,
|
|
1312
|
+
setIsShowReTypePassword: E,
|
|
1313
|
+
clickHandler: q,
|
|
1314
|
+
handleVerify: M,
|
|
1315
|
+
initialValues: b
|
|
1316
|
+
};
|
|
1317
|
+
}, pa = B.object({
|
|
1318
|
+
password: B.string().required("Password is required"),
|
|
1319
|
+
reEnterPassword: B.string().required("Please re-enter Password").test("matching", "Passwords do not match", function() {
|
|
1320
|
+
return this.parent.password === this.parent.reEnterPassword;
|
|
1321
|
+
})
|
|
1322
|
+
}), fa = () => {
|
|
1323
|
+
const {
|
|
1324
|
+
createPasswordRequest: s,
|
|
1325
|
+
isShowNewPassword: t,
|
|
1326
|
+
setIsShowNewPassword: i,
|
|
1327
|
+
isShowReTypePassword: l,
|
|
1328
|
+
setIsShowReTypePassword: d,
|
|
1329
|
+
initialValues: p
|
|
1330
|
+
} = ua();
|
|
1331
|
+
return /* @__PURE__ */ e(
|
|
1332
|
+
Ie,
|
|
1333
|
+
{
|
|
1334
|
+
initialValues: p,
|
|
1335
|
+
enableReinitialize: !0,
|
|
1336
|
+
validationSchema: pa,
|
|
1337
|
+
onSubmit: (u) => {
|
|
1338
|
+
s(u);
|
|
1339
|
+
},
|
|
1340
|
+
children: (u) => {
|
|
1341
|
+
const {
|
|
1342
|
+
setFieldValue: I,
|
|
1343
|
+
handleSubmit: E,
|
|
1344
|
+
touched: b,
|
|
1345
|
+
errors: T,
|
|
1346
|
+
values: w
|
|
1347
|
+
} = u;
|
|
1348
|
+
return /* @__PURE__ */ e(Ne, { className: `${o["box-login"]}`, children: /* @__PURE__ */ n(Z, { className: "p-0", children: [
|
|
1349
|
+
/* @__PURE__ */ e(
|
|
1350
|
+
"div",
|
|
1351
|
+
{
|
|
1352
|
+
hidden: !w.email,
|
|
1353
|
+
className: `${o["block-login"]}`,
|
|
1354
|
+
children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
|
|
1355
|
+
/* @__PURE__ */ e(
|
|
1356
|
+
"img",
|
|
1357
|
+
{
|
|
1358
|
+
src: `${de(
|
|
1359
|
+
"/images/horizontal-logo-blue.svg"
|
|
1360
|
+
)}`,
|
|
1361
|
+
className: `${o["img-login-rectangle"]}`
|
|
1362
|
+
}
|
|
1363
|
+
),
|
|
1364
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Create Your Password" }),
|
|
1365
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ n(Se, { children: [
|
|
1366
|
+
/* @__PURE__ */ e(
|
|
1367
|
+
ce,
|
|
1368
|
+
{
|
|
1369
|
+
className: `${o["form-user-name"]}`,
|
|
1370
|
+
children: /* @__PURE__ */ e(
|
|
1371
|
+
ne,
|
|
1372
|
+
{
|
|
1373
|
+
disabled: !0,
|
|
1374
|
+
type: "text",
|
|
1375
|
+
name: "email",
|
|
1376
|
+
placeholder: "Email",
|
|
1377
|
+
value: w.email,
|
|
1378
|
+
autocomplete: "email",
|
|
1379
|
+
required: !0,
|
|
1380
|
+
className: `${o.input}`
|
|
1381
|
+
}
|
|
1382
|
+
)
|
|
1383
|
+
}
|
|
1384
|
+
),
|
|
1385
|
+
/* @__PURE__ */ n(
|
|
1386
|
+
"div",
|
|
1387
|
+
{
|
|
1388
|
+
className: `${o["form-user-name"]}`,
|
|
1389
|
+
children: [
|
|
1390
|
+
/* @__PURE__ */ e(
|
|
1391
|
+
me,
|
|
1392
|
+
{
|
|
1393
|
+
isShowPassword: t,
|
|
1394
|
+
togglePasswordVisible: () => i(
|
|
1395
|
+
!t
|
|
1396
|
+
),
|
|
1397
|
+
onChange: (P) => I(
|
|
1398
|
+
"password",
|
|
1399
|
+
P.target.value
|
|
1400
|
+
)
|
|
1401
|
+
}
|
|
1402
|
+
),
|
|
1403
|
+
b.password && T.password && /* @__PURE__ */ e(
|
|
1404
|
+
oe,
|
|
1405
|
+
{
|
|
1406
|
+
text: T.password
|
|
1407
|
+
}
|
|
1408
|
+
)
|
|
1409
|
+
]
|
|
1410
|
+
}
|
|
1411
|
+
),
|
|
1412
|
+
/* @__PURE__ */ n(
|
|
1413
|
+
"div",
|
|
1414
|
+
{
|
|
1415
|
+
className: `${o["form-user-name"]}`,
|
|
1416
|
+
children: [
|
|
1417
|
+
/* @__PURE__ */ e(
|
|
1418
|
+
me,
|
|
1419
|
+
{
|
|
1420
|
+
placeholder: "Confirm Password",
|
|
1421
|
+
isShowPassword: l,
|
|
1422
|
+
togglePasswordVisible: () => d(
|
|
1423
|
+
!l
|
|
1424
|
+
),
|
|
1425
|
+
onChange: (P) => I(
|
|
1426
|
+
"reEnterPassword",
|
|
1427
|
+
P.target.value
|
|
1428
|
+
)
|
|
1429
|
+
}
|
|
1430
|
+
),
|
|
1431
|
+
b.reEnterPassword && T.reEnterPassword && /* @__PURE__ */ e(
|
|
1432
|
+
oe,
|
|
1433
|
+
{
|
|
1434
|
+
text: T.reEnterPassword
|
|
1435
|
+
}
|
|
1436
|
+
)
|
|
1437
|
+
]
|
|
1438
|
+
}
|
|
1439
|
+
)
|
|
1440
|
+
] }) }),
|
|
1441
|
+
/* @__PURE__ */ e(
|
|
1442
|
+
"button",
|
|
1443
|
+
{
|
|
1444
|
+
className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
|
|
1445
|
+
onClick: () => E(),
|
|
1446
|
+
children: "CREATE YOUR PASSWORD"
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
] })
|
|
1450
|
+
}
|
|
1451
|
+
),
|
|
1452
|
+
/* @__PURE__ */ e(
|
|
1453
|
+
"div",
|
|
1454
|
+
{
|
|
1455
|
+
hidden: !!w.email,
|
|
1456
|
+
className: `${o["block-login"]}`,
|
|
1457
|
+
children: /* @__PURE__ */ n("div", { className: `${o["block-form"]}`, children: [
|
|
1458
|
+
/* @__PURE__ */ e(
|
|
1459
|
+
"img",
|
|
1460
|
+
{
|
|
1461
|
+
src: `${de(
|
|
1462
|
+
"/images/horizontal-logo-blue.svg"
|
|
1463
|
+
)}`,
|
|
1464
|
+
className: `${o["img-login-rectangle"]}`
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "You cannot regenerate the password" })
|
|
1468
|
+
] })
|
|
1469
|
+
}
|
|
1470
|
+
)
|
|
1471
|
+
] }) });
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
1475
|
+
}, wa = "_modalContent_1pxxz_1", Sa = "_closeButton_1pxxz_6", ya = "_modalBody_1pxxz_17", Na = "_iconWrapper_1pxxz_22", va = "_title_1pxxz_38", Ia = "_subtitle_1pxxz_45", ba = "_tierCard_1pxxz_51", ka = "_es_1pxxz_60", La = "_tierTitle_1pxxz_71", Ca = "_tierDesc_1pxxz_76", xa = "_arrow_1pxxz_81", Ta = "_ms_1pxxz_85", Ea = "_both_1pxxz_110", Pa = "_cardLeft_1pxxz_134", $a = "_cardText_1pxxz_138", h = {
|
|
1476
|
+
modalContent: wa,
|
|
1477
|
+
closeButton: Sa,
|
|
1478
|
+
modalBody: ya,
|
|
1479
|
+
iconWrapper: Na,
|
|
1480
|
+
title: va,
|
|
1481
|
+
subtitle: Ia,
|
|
1482
|
+
tierCard: ba,
|
|
1483
|
+
es: ka,
|
|
1484
|
+
tierTitle: La,
|
|
1485
|
+
tierDesc: Ca,
|
|
1486
|
+
arrow: xa,
|
|
1487
|
+
ms: Ta,
|
|
1488
|
+
both: Ea,
|
|
1489
|
+
cardLeft: Pa,
|
|
1490
|
+
cardText: $a
|
|
1491
|
+
}, _a = ({ open: s, onSelectTier: t, onClose: i }) => /* @__PURE__ */ n(
|
|
1492
|
+
He,
|
|
1493
|
+
{
|
|
1494
|
+
isOpen: s,
|
|
1495
|
+
style: { zIndex: 1201, maxWidth: 450 },
|
|
1496
|
+
centered: !0,
|
|
1497
|
+
autoFocus: !1,
|
|
1498
|
+
returnFocusAfterClose: !1,
|
|
1499
|
+
contentClassName: h.modalContent,
|
|
1500
|
+
children: [
|
|
1501
|
+
/* @__PURE__ */ e("div", { className: h.closeButton, children: i && /* @__PURE__ */ e(je, { onClick: () => i(), size: 24 }) }),
|
|
1502
|
+
/* @__PURE__ */ n(qe, { className: h.modalBody, children: [
|
|
1503
|
+
/* @__PURE__ */ e("div", { className: h.iconWrapper, children: /* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) }),
|
|
1504
|
+
/* @__PURE__ */ e("h4", { className: h.title, children: "Select Grade Level" }),
|
|
1505
|
+
/* @__PURE__ */ e("p", { className: h.subtitle, children: "Select the grade levels you support" }),
|
|
1506
|
+
/* @__PURE__ */ n(
|
|
1507
|
+
"div",
|
|
1508
|
+
{
|
|
1509
|
+
onClick: () => t("es"),
|
|
1510
|
+
className: `${h.tierCard} ${h.es}`,
|
|
1511
|
+
children: [
|
|
1512
|
+
/* @__PURE__ */ n("div", { className: h.cardLeft, children: [
|
|
1513
|
+
/* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" }) }),
|
|
1514
|
+
/* @__PURE__ */ n("div", { className: h.cardText, children: [
|
|
1515
|
+
/* @__PURE__ */ e("div", { className: h.tierTitle, children: "Elementary / Primary" }),
|
|
1516
|
+
/* @__PURE__ */ e("div", { className: h.tierDesc, children: "Grades 2-5 / Years 3-6" })
|
|
1517
|
+
] })
|
|
1518
|
+
] }),
|
|
1519
|
+
/* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
|
|
1520
|
+
]
|
|
1521
|
+
}
|
|
1522
|
+
),
|
|
1523
|
+
/* @__PURE__ */ n(
|
|
1524
|
+
"div",
|
|
1525
|
+
{
|
|
1526
|
+
onClick: () => t("ms"),
|
|
1527
|
+
className: `${h.tierCard} ${h.ms}`,
|
|
1528
|
+
children: [
|
|
1529
|
+
/* @__PURE__ */ n("div", { className: h.cardLeft, children: [
|
|
1530
|
+
/* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" }) }),
|
|
1531
|
+
/* @__PURE__ */ n("div", { className: h.cardText, children: [
|
|
1532
|
+
/* @__PURE__ */ e("div", { className: h.tierTitle, children: "Middle & High / Secondary" }),
|
|
1533
|
+
/* @__PURE__ */ e("div", { className: h.tierDesc, children: "Grades 6-12 / Years 7-13" })
|
|
1534
|
+
] })
|
|
1535
|
+
] }),
|
|
1536
|
+
/* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
|
|
1537
|
+
]
|
|
1538
|
+
}
|
|
1539
|
+
),
|
|
1540
|
+
/* @__PURE__ */ n(
|
|
1541
|
+
"div",
|
|
1542
|
+
{
|
|
1543
|
+
onClick: () => t("both"),
|
|
1544
|
+
className: `${h.tierCard} ${h.both}`,
|
|
1545
|
+
children: [
|
|
1546
|
+
/* @__PURE__ */ n("div", { className: h.cardLeft, children: [
|
|
1547
|
+
/* @__PURE__ */ e("svg", { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z" }) }),
|
|
1548
|
+
/* @__PURE__ */ n("div", { className: h.cardText, children: [
|
|
1549
|
+
/* @__PURE__ */ e("div", { className: h.tierTitle, children: "Both Tiers" }),
|
|
1550
|
+
/* @__PURE__ */ e("div", { className: h.tierDesc, children: "Access all grade levels" })
|
|
1551
|
+
] })
|
|
1552
|
+
] }),
|
|
1553
|
+
/* @__PURE__ */ e("div", { className: h.arrow, children: ">" })
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
)
|
|
1557
|
+
] })
|
|
1558
|
+
]
|
|
1559
|
+
}
|
|
1560
|
+
), Ra = Ve(_a), Aa = "Log in", Ma = "Forgot password", Ga = "Reset password", Ja = (s) => {
|
|
1561
|
+
const {
|
|
1562
|
+
isLogin: t,
|
|
1563
|
+
isForgotPassword: i,
|
|
1564
|
+
isResetPassword: l,
|
|
1565
|
+
isCreatePassword: d
|
|
1566
|
+
// isLoginTwoFactor
|
|
1567
|
+
} = s, {
|
|
1568
|
+
defaultInfo: p,
|
|
1569
|
+
userLogin: u,
|
|
1570
|
+
googleRecaptchaId: I,
|
|
1571
|
+
handleCancelModelAssign: E,
|
|
1572
|
+
school: b,
|
|
1573
|
+
openModelAssign: T,
|
|
1574
|
+
setIsShowPassword: w,
|
|
1575
|
+
fnIsCheckLogin: P,
|
|
1576
|
+
isLoginGoogle: y,
|
|
1577
|
+
submitLogin: q,
|
|
1578
|
+
infoUser: M,
|
|
1579
|
+
googleClientId: k,
|
|
1580
|
+
isShowPassword: _,
|
|
1581
|
+
fnLoginSSO: W,
|
|
1582
|
+
extensionEmail: L,
|
|
1583
|
+
handleLoginWidthClever: C,
|
|
1584
|
+
openModalSelectGrade: j,
|
|
1585
|
+
handleRegisterUser: N,
|
|
1586
|
+
handleToggleModelGrade: $,
|
|
1587
|
+
openModalSelectTier: G,
|
|
1588
|
+
handleSelectTier: D,
|
|
1589
|
+
setOpenModalSelectTier: Q
|
|
1590
|
+
} = ga();
|
|
1591
|
+
return K(() => {
|
|
1592
|
+
t && (document.title = Aa), i && (document.title = Ma), l && (document.title = Ga);
|
|
1593
|
+
}, [t, i, l]), /* @__PURE__ */ n("div", { className: `${o.login} container-fluid font-family-lato`, children: [
|
|
1594
|
+
/* @__PURE__ */ n(Ne, { className: "h-100", children: [
|
|
1595
|
+
/* @__PURE__ */ n(
|
|
1596
|
+
Z,
|
|
1597
|
+
{
|
|
1598
|
+
lg: 8,
|
|
1599
|
+
md: 12,
|
|
1600
|
+
xs: 12,
|
|
1601
|
+
className: "d-flex justify-content-center h-100 align-items-center p-3 flex-column",
|
|
1602
|
+
children: [
|
|
1603
|
+
!!I && /* @__PURE__ */ n(
|
|
1604
|
+
As,
|
|
1605
|
+
{
|
|
1606
|
+
useRecaptchaNet: !0,
|
|
1607
|
+
reCaptchaKey: I,
|
|
1608
|
+
scriptProps: {
|
|
1609
|
+
async: !0,
|
|
1610
|
+
defer: !0,
|
|
1611
|
+
appendTo: "body"
|
|
1612
|
+
},
|
|
1613
|
+
children: [
|
|
1614
|
+
t && /* @__PURE__ */ e(
|
|
1615
|
+
js,
|
|
1616
|
+
{
|
|
1617
|
+
userLogin: u,
|
|
1618
|
+
defaultInfo: p,
|
|
1619
|
+
onCancelModelAssign: E,
|
|
1620
|
+
openModelAssign: T,
|
|
1621
|
+
school: b,
|
|
1622
|
+
fnIsCheckLogin: P,
|
|
1623
|
+
googleClientId: k,
|
|
1624
|
+
infoUser: M,
|
|
1625
|
+
isLoginGoogle: y,
|
|
1626
|
+
isShowPassword: _,
|
|
1627
|
+
setIsShowPassword: w,
|
|
1628
|
+
submitLogin: q,
|
|
1629
|
+
fnLoginSSO: W,
|
|
1630
|
+
extensionEmail: L,
|
|
1631
|
+
onLoginWidthClever: C,
|
|
1632
|
+
openModalSelectGrade: j,
|
|
1633
|
+
handleRegisterUser: N,
|
|
1634
|
+
onToggleModelGrade: $
|
|
1635
|
+
}
|
|
1636
|
+
),
|
|
1637
|
+
i && /* @__PURE__ */ e(Xs, { school: b })
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
),
|
|
1641
|
+
l && /* @__PURE__ */ e(sa, {}),
|
|
1642
|
+
d && /* @__PURE__ */ e(fa, {}),
|
|
1643
|
+
/* @__PURE__ */ e(
|
|
1644
|
+
"a",
|
|
1645
|
+
{
|
|
1646
|
+
href: "/privacy-policy/",
|
|
1647
|
+
target: "blank",
|
|
1648
|
+
className: `${o["privacy-policy"]}`,
|
|
1649
|
+
children: "Privacy Policy"
|
|
1650
|
+
}
|
|
1651
|
+
)
|
|
1652
|
+
]
|
|
1653
|
+
}
|
|
1654
|
+
),
|
|
1655
|
+
/* @__PURE__ */ e(
|
|
1656
|
+
Z,
|
|
1657
|
+
{
|
|
1658
|
+
className: "p-3 mh-100 d-flex justify-content-end",
|
|
1659
|
+
lg: 4,
|
|
1660
|
+
md: 12,
|
|
1661
|
+
xs: 12,
|
|
1662
|
+
children: /* @__PURE__ */ e(
|
|
1663
|
+
"img",
|
|
1664
|
+
{
|
|
1665
|
+
src: `${de(window.innerWidth > 992 ? "/images/img-login.png" : "/images/img-login-tablet.png")}`,
|
|
1666
|
+
className: `${o["img-login"]}`
|
|
1667
|
+
}
|
|
1668
|
+
)
|
|
1669
|
+
}
|
|
1670
|
+
)
|
|
1671
|
+
] }),
|
|
1672
|
+
/* @__PURE__ */ e(
|
|
1673
|
+
Ra,
|
|
1674
|
+
{
|
|
1675
|
+
open: G,
|
|
1676
|
+
onSelectTier: D,
|
|
1677
|
+
onClose: () => Q(!1)
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
] });
|
|
1681
|
+
};
|
|
1682
|
+
export {
|
|
1683
|
+
Ja as default
|
|
1684
|
+
};
|