@instructure/platform-grades 0.2.2 → 0.2.4
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/index.js +732 -951
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Spinner as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { View as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { Table as
|
|
7
|
-
import { Pill as
|
|
8
|
-
import { ToggleDetails as
|
|
9
|
-
import { Heading as
|
|
10
|
-
import { usePlatformUi as
|
|
11
|
-
import { useQuery as
|
|
12
|
-
import { gql as
|
|
13
|
-
import { z as
|
|
14
|
-
import { canvasFetch as
|
|
15
|
-
const
|
|
1
|
+
import { jsxs as N, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { Spinner as ze } from "@instructure/ui-spinner";
|
|
3
|
+
import { Text as b } from "@instructure/ui-text";
|
|
4
|
+
import { View as $ } from "@instructure/ui-view";
|
|
5
|
+
import { useState as ue, useCallback as Qe, useMemo as J } from "react";
|
|
6
|
+
import { Table as h } from "@instructure/ui-table";
|
|
7
|
+
import { Pill as Xe } from "@instructure/ui-pill";
|
|
8
|
+
import { ToggleDetails as Ye } from "@instructure/ui-toggle-details";
|
|
9
|
+
import { Heading as Te } from "@instructure/ui-heading";
|
|
10
|
+
import { usePlatformUi as Ze } from "@instructure/platform-provider";
|
|
11
|
+
import { useQuery as de } from "@tanstack/react-query";
|
|
12
|
+
import { gql as Je } from "graphql-tag";
|
|
13
|
+
import { z as a } from "zod";
|
|
14
|
+
import { canvasFetch as Ve } from "@instructure/platform-canvas-fetch";
|
|
15
|
+
const T = {
|
|
16
16
|
caption: "Assignment Group Totals",
|
|
17
17
|
assignmentGroup: "Assignment Group",
|
|
18
18
|
weight: "Weight"
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Ke({
|
|
21
21
|
groups: e,
|
|
22
22
|
labels: t
|
|
23
23
|
}) {
|
|
24
24
|
const r = {
|
|
25
|
-
caption: (t == null ? void 0 : t.caption) ??
|
|
26
|
-
assignmentGroup: (t == null ? void 0 : t.assignmentGroup) ??
|
|
27
|
-
weight: (t == null ? void 0 : t.weight) ??
|
|
25
|
+
caption: (t == null ? void 0 : t.caption) ?? T.caption,
|
|
26
|
+
assignmentGroup: (t == null ? void 0 : t.assignmentGroup) ?? T.assignmentGroup,
|
|
27
|
+
weight: (t == null ? void 0 : t.weight) ?? T.weight
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ N(h, { caption: r.caption, children: [
|
|
30
|
+
/* @__PURE__ */ d(h.Head, { children: /* @__PURE__ */ N(h.Row, { children: [
|
|
31
|
+
/* @__PURE__ */ d(h.ColHeader, { id: "group-name", children: r.assignmentGroup }),
|
|
32
|
+
/* @__PURE__ */ d(h.ColHeader, { id: "group-weight", children: r.weight })
|
|
33
33
|
] }) }),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ d(h.Body, { children: e.map((n) => /* @__PURE__ */ N(h.Row, { children: [
|
|
35
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(b, { children: n.groupName }) }),
|
|
36
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ N(b, { children: [
|
|
37
37
|
n.groupWeight,
|
|
38
38
|
"%"
|
|
39
39
|
] }) })
|
|
40
40
|
] }, n.groupId)) })
|
|
41
41
|
] });
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const me = (e, t, r) => e ? r ?? "-" : t != null ? `${Math.round(t)}%` : "-", ge = (e) => e === "letter_grade" || e === "gpa_scale" || e === "pass_fail", ve = (e, t) => !!e || ge(t), le = (e, t, r) => {
|
|
44
44
|
const n = r ?? 0;
|
|
45
|
-
return
|
|
45
|
+
return ge(t) ? e !== null ? String(e) : "-" : `${e !== null ? e : "-"}/${n}`;
|
|
46
46
|
};
|
|
47
|
-
function
|
|
47
|
+
function ke({ comments: e }) {
|
|
48
48
|
if (e.length === 0)
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ d(b, { children: "-" });
|
|
50
50
|
const t = e.some((r) => !r.read);
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ d($, { as: "span", display: "inline-flex", children: /* @__PURE__ */ N(b, { children: [
|
|
52
52
|
t ? "• " : "",
|
|
53
53
|
e.length
|
|
54
54
|
] }) });
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const R = {
|
|
57
57
|
submitted: "Submitted",
|
|
58
58
|
notSubmitted: "Not Submitted",
|
|
59
59
|
late: "Late",
|
|
60
60
|
excused: "Excused",
|
|
61
61
|
missing: "Missing"
|
|
62
62
|
};
|
|
63
|
-
function
|
|
63
|
+
function Ce(e, t) {
|
|
64
64
|
return e.state === "submitted" || e.state === "pending_review" || e.state === "graded" && e.score !== null ? t.submitted : e.excused ? t.excused : e.late ? t.late : e.missing ? t.missing : t.notSubmitted;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function et({
|
|
67
67
|
score: e,
|
|
68
68
|
labels: t
|
|
69
69
|
}) {
|
|
70
70
|
const r = {
|
|
71
|
-
submitted: (t == null ? void 0 : t.submitted) ??
|
|
72
|
-
notSubmitted: (t == null ? void 0 : t.notSubmitted) ??
|
|
73
|
-
late: (t == null ? void 0 : t.late) ??
|
|
74
|
-
excused: (t == null ? void 0 : t.excused) ??
|
|
75
|
-
missing: (t == null ? void 0 : t.missing) ??
|
|
76
|
-
}, n =
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
}
|
|
79
|
-
const
|
|
71
|
+
submitted: (t == null ? void 0 : t.submitted) ?? R.submitted,
|
|
72
|
+
notSubmitted: (t == null ? void 0 : t.notSubmitted) ?? R.notSubmitted,
|
|
73
|
+
late: (t == null ? void 0 : t.late) ?? R.late,
|
|
74
|
+
excused: (t == null ? void 0 : t.excused) ?? R.excused,
|
|
75
|
+
missing: (t == null ? void 0 : t.missing) ?? R.missing
|
|
76
|
+
}, n = Ce(e, r), c = n === r.late || n === r.missing ? "danger" : "info";
|
|
77
|
+
return /* @__PURE__ */ d(Xe, { color: c, children: n });
|
|
78
|
+
}
|
|
79
|
+
const P = {
|
|
80
80
|
caption: "Assignment Scores",
|
|
81
81
|
name: "Name",
|
|
82
82
|
dueDate: "Due Date",
|
|
@@ -85,118 +85,118 @@ const F = {
|
|
|
85
85
|
feedback: "Feedback",
|
|
86
86
|
noAssignments: "No assignments"
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function tt(e) {
|
|
89
89
|
return e ? new Date(e).toLocaleDateString(void 0, {
|
|
90
90
|
year: "numeric",
|
|
91
91
|
month: "short",
|
|
92
92
|
day: "numeric"
|
|
93
93
|
}) : "-";
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function rt(e, t, r) {
|
|
96
96
|
if (r === "none") return e;
|
|
97
|
-
const n = [...e].sort((i,
|
|
97
|
+
const n = [...e].sort((i, c) => {
|
|
98
98
|
if (t === "name")
|
|
99
|
-
return i.name.localeCompare(
|
|
100
|
-
const
|
|
101
|
-
return
|
|
99
|
+
return i.name.localeCompare(c.name);
|
|
100
|
+
const s = i.dueAt ? new Date(i.dueAt).getTime() : 0, u = c.dueAt ? new Date(c.dueAt).getTime() : 0;
|
|
101
|
+
return s - u;
|
|
102
102
|
});
|
|
103
103
|
return r === "descending" ? n.reverse() : n;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function nt({
|
|
106
106
|
scores: e,
|
|
107
107
|
onAssignmentClick: t,
|
|
108
108
|
labels: r,
|
|
109
109
|
statusLabels: n
|
|
110
110
|
}) {
|
|
111
111
|
const i = {
|
|
112
|
-
caption: (r == null ? void 0 : r.caption) ??
|
|
113
|
-
name: (r == null ? void 0 : r.name) ??
|
|
114
|
-
dueDate: (r == null ? void 0 : r.dueDate) ??
|
|
115
|
-
status: (r == null ? void 0 : r.status) ??
|
|
116
|
-
result: (r == null ? void 0 : r.result) ??
|
|
117
|
-
feedback: (r == null ? void 0 : r.feedback) ??
|
|
118
|
-
noAssignments: (r == null ? void 0 : r.noAssignments) ??
|
|
119
|
-
}, [
|
|
120
|
-
(
|
|
121
|
-
const
|
|
122
|
-
|
|
112
|
+
caption: (r == null ? void 0 : r.caption) ?? P.caption,
|
|
113
|
+
name: (r == null ? void 0 : r.name) ?? P.name,
|
|
114
|
+
dueDate: (r == null ? void 0 : r.dueDate) ?? P.dueDate,
|
|
115
|
+
status: (r == null ? void 0 : r.status) ?? P.status,
|
|
116
|
+
result: (r == null ? void 0 : r.result) ?? P.result,
|
|
117
|
+
feedback: (r == null ? void 0 : r.feedback) ?? P.feedback,
|
|
118
|
+
noAssignments: (r == null ? void 0 : r.noAssignments) ?? P.noAssignments
|
|
119
|
+
}, [c, s] = ue("name"), [u, o] = ue("none"), f = Qe(
|
|
120
|
+
(l, { id: G }) => {
|
|
121
|
+
const D = G;
|
|
122
|
+
D === c ? o((p) => p === "ascending" ? "descending" : "ascending") : (s(D), o("ascending"));
|
|
123
123
|
},
|
|
124
|
-
[
|
|
125
|
-
),
|
|
126
|
-
() =>
|
|
127
|
-
[e,
|
|
128
|
-
),
|
|
129
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
|
|
124
|
+
[c]
|
|
125
|
+
), S = J(
|
|
126
|
+
() => rt(e, c, u),
|
|
127
|
+
[e, c, u]
|
|
128
|
+
), m = (l) => l === c ? u : "none";
|
|
129
|
+
return e.length === 0 ? /* @__PURE__ */ d(b, { children: i.noAssignments }) : /* @__PURE__ */ N(h, { caption: i.caption, hover: !!t, children: [
|
|
130
|
+
/* @__PURE__ */ d(h.Head, { renderSortLabel: "Sort by", children: /* @__PURE__ */ N(h.Row, { children: [
|
|
131
|
+
/* @__PURE__ */ d(
|
|
132
|
+
h.ColHeader,
|
|
133
133
|
{
|
|
134
134
|
id: "name",
|
|
135
|
-
onRequestSort:
|
|
136
|
-
sortDirection:
|
|
135
|
+
onRequestSort: f,
|
|
136
|
+
sortDirection: m("name"),
|
|
137
137
|
children: i.name
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
|
|
140
|
+
/* @__PURE__ */ d(
|
|
141
|
+
h.ColHeader,
|
|
142
142
|
{
|
|
143
143
|
id: "dueDate",
|
|
144
|
-
onRequestSort:
|
|
145
|
-
sortDirection:
|
|
144
|
+
onRequestSort: f,
|
|
145
|
+
sortDirection: m("dueDate"),
|
|
146
146
|
children: i.dueDate
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ d(h.ColHeader, { id: "status", children: i.status }),
|
|
150
|
+
/* @__PURE__ */ d(h.ColHeader, { id: "result", children: i.result }),
|
|
151
|
+
/* @__PURE__ */ d(h.ColHeader, { id: "feedback", children: i.feedback })
|
|
152
152
|
] }) }),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
153
|
+
/* @__PURE__ */ d(h.Body, { children: S.map((l) => /* @__PURE__ */ N(
|
|
154
|
+
h.Row,
|
|
155
155
|
{
|
|
156
|
-
onClick: t ? () => t(
|
|
156
|
+
onClick: t ? () => t(l.assignmentId) : void 0,
|
|
157
157
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(b, { children: l.name }) }),
|
|
159
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(b, { children: l.dueAt ? tt(l.dueAt) : "-" }) }),
|
|
160
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(et, { score: l, labels: n }) }),
|
|
161
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(b, { children: le(l.score, l.gradingType, l.pointsPossible) }) }),
|
|
162
|
+
/* @__PURE__ */ d(h.Cell, { children: /* @__PURE__ */ d(ke, { comments: l.comments }) })
|
|
163
163
|
]
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
l.assignmentId
|
|
166
166
|
)) })
|
|
167
167
|
] });
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function it({
|
|
170
170
|
title: e,
|
|
171
171
|
defaultExpanded: t = !1,
|
|
172
172
|
children: r
|
|
173
173
|
}) {
|
|
174
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ d(Ye, { summary: e, defaultExpanded: t, children: r });
|
|
175
175
|
}
|
|
176
|
-
const
|
|
176
|
+
const oe = {
|
|
177
177
|
total: "Total: {{score}}",
|
|
178
178
|
noActivities: "There are no scored activities in this course."
|
|
179
179
|
};
|
|
180
|
-
function
|
|
180
|
+
function st({
|
|
181
181
|
currentScore: e,
|
|
182
182
|
currentGrade: t,
|
|
183
183
|
restrictQuantitativeData: r,
|
|
184
184
|
hideFinalGrade: n,
|
|
185
185
|
hasScoredActivities: i,
|
|
186
|
-
labels:
|
|
186
|
+
labels: c
|
|
187
187
|
}) {
|
|
188
|
-
const
|
|
189
|
-
total: (
|
|
190
|
-
noActivities: (
|
|
188
|
+
const s = {
|
|
189
|
+
total: (c == null ? void 0 : c.total) ?? oe.total,
|
|
190
|
+
noActivities: (c == null ? void 0 : c.noActivities) ?? oe.noActivities
|
|
191
191
|
};
|
|
192
192
|
if (!i)
|
|
193
|
-
return /* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ d(b, { children: s.noActivities });
|
|
194
194
|
if (n)
|
|
195
195
|
return null;
|
|
196
|
-
const u =
|
|
197
|
-
return /* @__PURE__ */
|
|
196
|
+
const u = me(r, e, t), o = s.total.replace("{{score}}", u);
|
|
197
|
+
return /* @__PURE__ */ d(Te, { level: "h2", children: o });
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const ct = Je`
|
|
200
200
|
query GetSubmissionScoresForCourse($enrollmentId: ID!, $userId: ID!) {
|
|
201
201
|
legacyNode(_id: $enrollmentId, type: Enrollment) {
|
|
202
202
|
... on Enrollment {
|
|
@@ -253,7 +253,7 @@ const wt = ct`
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
`,
|
|
256
|
+
`, ut = a.enum([
|
|
257
257
|
"attendance",
|
|
258
258
|
"basic_lti_launch",
|
|
259
259
|
"discussion_topic",
|
|
@@ -268,106 +268,106 @@ const wt = ct`
|
|
|
268
268
|
"online_url",
|
|
269
269
|
"student_annotation",
|
|
270
270
|
"wiki_page"
|
|
271
|
-
]),
|
|
272
|
-
_id:
|
|
273
|
-
read:
|
|
274
|
-
}),
|
|
275
|
-
currentScore:
|
|
276
|
-
finalScore:
|
|
277
|
-
finalGrade:
|
|
278
|
-
state:
|
|
279
|
-
}),
|
|
280
|
-
state:
|
|
281
|
-
submissionStatus:
|
|
282
|
-
late:
|
|
283
|
-
excused:
|
|
284
|
-
missing:
|
|
285
|
-
score:
|
|
286
|
-
grade:
|
|
287
|
-
commentsConnection:
|
|
288
|
-
nodes:
|
|
271
|
+
]), ot = a.object({
|
|
272
|
+
_id: a.string(),
|
|
273
|
+
read: a.boolean()
|
|
274
|
+
}), ft = a.object({
|
|
275
|
+
currentScore: a.number().nullable(),
|
|
276
|
+
finalScore: a.number().nullable(),
|
|
277
|
+
finalGrade: a.string().nullable(),
|
|
278
|
+
state: a.string()
|
|
279
|
+
}), at = a.object({
|
|
280
|
+
state: a.string(),
|
|
281
|
+
submissionStatus: a.string(),
|
|
282
|
+
late: a.boolean(),
|
|
283
|
+
excused: a.boolean(),
|
|
284
|
+
missing: a.boolean(),
|
|
285
|
+
score: a.number().nullable(),
|
|
286
|
+
grade: a.string().nullable(),
|
|
287
|
+
commentsConnection: a.object({
|
|
288
|
+
nodes: a.array(ot)
|
|
289
289
|
})
|
|
290
|
-
}),
|
|
291
|
-
_id:
|
|
292
|
-
name:
|
|
293
|
-
dueAt:
|
|
294
|
-
pointsPossible:
|
|
295
|
-
gradingType:
|
|
296
|
-
submissionsConnection:
|
|
297
|
-
nodes:
|
|
290
|
+
}), dt = a.object({
|
|
291
|
+
_id: a.string(),
|
|
292
|
+
name: a.string(),
|
|
293
|
+
dueAt: a.string().nullable(),
|
|
294
|
+
pointsPossible: a.number().nullable(),
|
|
295
|
+
gradingType: a.string(),
|
|
296
|
+
submissionsConnection: a.object({
|
|
297
|
+
nodes: a.array(at)
|
|
298
298
|
}),
|
|
299
|
-
submissionTypes:
|
|
300
|
-
}).strict(),
|
|
301
|
-
_id:
|
|
302
|
-
name:
|
|
303
|
-
groupWeight:
|
|
304
|
-
gradesConnection:
|
|
305
|
-
nodes:
|
|
299
|
+
submissionTypes: a.array(ut)
|
|
300
|
+
}).strict(), mt = a.object({
|
|
301
|
+
_id: a.string(),
|
|
302
|
+
name: a.string(),
|
|
303
|
+
groupWeight: a.number().nullable(),
|
|
304
|
+
gradesConnection: a.object({
|
|
305
|
+
nodes: a.array(ft)
|
|
306
306
|
}),
|
|
307
|
-
assignmentsConnection:
|
|
308
|
-
nodes:
|
|
307
|
+
assignmentsConnection: a.object({
|
|
308
|
+
nodes: a.array(dt)
|
|
309
309
|
})
|
|
310
|
-
}),
|
|
311
|
-
applyGroupWeights:
|
|
312
|
-
assignmentGroups:
|
|
313
|
-
}),
|
|
314
|
-
grades:
|
|
315
|
-
finalScore:
|
|
316
|
-
finalGrade:
|
|
317
|
-
currentScore:
|
|
318
|
-
currentGrade:
|
|
310
|
+
}), gt = a.object({
|
|
311
|
+
applyGroupWeights: a.boolean(),
|
|
312
|
+
assignmentGroups: a.array(mt)
|
|
313
|
+
}), lt = a.object({
|
|
314
|
+
grades: a.object({
|
|
315
|
+
finalScore: a.number().nullable(),
|
|
316
|
+
finalGrade: a.string().nullable(),
|
|
317
|
+
currentScore: a.number().nullable(),
|
|
318
|
+
currentGrade: a.string().nullable()
|
|
319
319
|
}).nullable(),
|
|
320
|
-
course:
|
|
321
|
-
}),
|
|
322
|
-
id:
|
|
323
|
-
settings:
|
|
324
|
-
restrict_quantitative_data:
|
|
325
|
-
hide_final_grade:
|
|
320
|
+
course: gt
|
|
321
|
+
}), ht = a.object({
|
|
322
|
+
id: a.number(),
|
|
323
|
+
settings: a.object({
|
|
324
|
+
restrict_quantitative_data: a.boolean().nullable(),
|
|
325
|
+
hide_final_grade: a.boolean().nullable()
|
|
326
326
|
})
|
|
327
327
|
});
|
|
328
|
-
function
|
|
328
|
+
function pt({
|
|
329
329
|
enrollmentId: e,
|
|
330
330
|
userId: t,
|
|
331
331
|
enabled: r = !0
|
|
332
332
|
}) {
|
|
333
|
-
const { executeQuery: n } =
|
|
334
|
-
return
|
|
333
|
+
const { executeQuery: n } = Ze();
|
|
334
|
+
return de({
|
|
335
335
|
queryKey: ["courseScores", e, t],
|
|
336
336
|
enabled: r && !!e && !!t,
|
|
337
337
|
queryFn: async () => {
|
|
338
338
|
const i = await n(
|
|
339
|
-
|
|
339
|
+
ct,
|
|
340
340
|
{ enrollmentId: e, userId: t }
|
|
341
341
|
);
|
|
342
|
-
return
|
|
342
|
+
return lt.parse(i.legacyNode);
|
|
343
343
|
},
|
|
344
344
|
gcTime: 0
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function St({
|
|
348
348
|
courseId: e,
|
|
349
349
|
enabled: t = !0
|
|
350
350
|
}) {
|
|
351
|
-
return
|
|
351
|
+
return de({
|
|
352
352
|
queryKey: ["courseSettings", e],
|
|
353
353
|
enabled: t && !!e,
|
|
354
|
-
queryFn: async () => (await
|
|
354
|
+
queryFn: async () => (await Ve(
|
|
355
355
|
{
|
|
356
356
|
path: `/api/v1/courses/${e}`,
|
|
357
357
|
params: { "include[]": "settings" }
|
|
358
358
|
},
|
|
359
|
-
|
|
359
|
+
ht
|
|
360
360
|
)).data.settings
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const { course: r, grades: n } = e, i = r.assignmentGroups.map((
|
|
365
|
-
groupId:
|
|
366
|
-
groupName:
|
|
367
|
-
groupWeight:
|
|
363
|
+
function yt(e, t) {
|
|
364
|
+
const { course: r, grades: n } = e, i = r.assignmentGroups.map((s) => ({
|
|
365
|
+
groupId: s._id,
|
|
366
|
+
groupName: s.name,
|
|
367
|
+
groupWeight: s.groupWeight ?? 0
|
|
368
368
|
}));
|
|
369
369
|
return {
|
|
370
|
-
totalScore:
|
|
370
|
+
totalScore: me(
|
|
371
371
|
t == null ? void 0 : t.restrict_quantitative_data,
|
|
372
372
|
n == null ? void 0 : n.currentScore,
|
|
373
373
|
n == null ? void 0 : n.currentGrade
|
|
@@ -376,11 +376,11 @@ function Ot(e, t) {
|
|
|
376
376
|
assignmentGroupWeights: i
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function _t(e, t) {
|
|
380
380
|
return e.course.assignmentGroups.flatMap(
|
|
381
381
|
(r) => r.assignmentsConnection.nodes.map((n) => {
|
|
382
382
|
var u;
|
|
383
|
-
const i = n.submissionsConnection.nodes[0],
|
|
383
|
+
const i = n.submissionsConnection.nodes[0], s = ve(
|
|
384
384
|
t == null ? void 0 : t.restrict_quantitative_data,
|
|
385
385
|
n.gradingType
|
|
386
386
|
) ? i == null ? void 0 : i.grade : (u = i == null ? void 0 : i.score) == null ? void 0 : u.toString();
|
|
@@ -389,7 +389,7 @@ function Bt(e, t) {
|
|
|
389
389
|
name: n.name,
|
|
390
390
|
pointsPossible: n.pointsPossible ?? 0,
|
|
391
391
|
dueAt: n.dueAt ?? "",
|
|
392
|
-
score:
|
|
392
|
+
score: s ?? null,
|
|
393
393
|
gradingType: n.gradingType,
|
|
394
394
|
state: (i == null ? void 0 : i.state) ?? "",
|
|
395
395
|
submissionStatus: (i == null ? void 0 : i.submissionStatus) ?? "",
|
|
@@ -402,77 +402,77 @@ function Bt(e, t) {
|
|
|
402
402
|
})
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Vr({
|
|
406
406
|
courseId: e,
|
|
407
407
|
enrollmentId: t,
|
|
408
408
|
userId: r,
|
|
409
409
|
onAssignmentClick: n,
|
|
410
410
|
onError: i,
|
|
411
|
-
labels:
|
|
411
|
+
labels: c
|
|
412
412
|
}) {
|
|
413
|
-
var
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
return /* @__PURE__ */
|
|
417
|
-
if (
|
|
418
|
-
return i &&
|
|
419
|
-
const
|
|
420
|
-
return /* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
413
|
+
var m, l, G, D, p;
|
|
414
|
+
const s = pt({ enrollmentId: t, userId: r }), u = St({ courseId: e }), o = J(() => s.data ? yt(s.data, u.data) : null, [s.data, u.data]), f = J(() => s.data ? _t(s.data, u.data) : [], [s.data, u.data]);
|
|
415
|
+
if (s.isPending)
|
|
416
|
+
return /* @__PURE__ */ d(ze, { renderTitle: (c == null ? void 0 : c.loading) ?? "Loading..." });
|
|
417
|
+
if (s.isError)
|
|
418
|
+
return i && s.error && i(s.error), /* @__PURE__ */ d($, { as: "div", padding: "medium", children: /* @__PURE__ */ d(b, { color: "danger", children: (c == null ? void 0 : c.error) ?? "Failed to load scores." }) });
|
|
419
|
+
const S = f.length > 0;
|
|
420
|
+
return /* @__PURE__ */ N($, { as: "div", children: [
|
|
421
|
+
/* @__PURE__ */ d($, { as: "div", padding: "small medium", children: /* @__PURE__ */ d(
|
|
422
|
+
st,
|
|
423
423
|
{
|
|
424
|
-
currentScore: (
|
|
425
|
-
currentGrade: (
|
|
426
|
-
restrictQuantitativeData: (
|
|
427
|
-
hideFinalGrade: (
|
|
428
|
-
hasScoredActivities:
|
|
424
|
+
currentScore: (m = s.data.grades) == null ? void 0 : m.currentScore,
|
|
425
|
+
currentGrade: (l = s.data.grades) == null ? void 0 : l.currentGrade,
|
|
426
|
+
restrictQuantitativeData: (G = u.data) == null ? void 0 : G.restrict_quantitative_data,
|
|
427
|
+
hideFinalGrade: (D = u.data) == null ? void 0 : D.hide_final_grade,
|
|
428
|
+
hasScoredActivities: S,
|
|
429
429
|
labels: {
|
|
430
|
-
total:
|
|
431
|
-
noActivities:
|
|
430
|
+
total: c == null ? void 0 : c.total,
|
|
431
|
+
noActivities: c == null ? void 0 : c.noActivities
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
) }),
|
|
435
|
-
(
|
|
436
|
-
|
|
437
|
-
|
|
435
|
+
(o == null ? void 0 : o.applyGroupWeights) && /* @__PURE__ */ d(it, { title: (c == null ? void 0 : c.assignmentGroupWeights) ?? "Assignment Group Weights", children: /* @__PURE__ */ d(Ke, { groups: o.assignmentGroupWeights }) }),
|
|
436
|
+
S && /* @__PURE__ */ d(
|
|
437
|
+
nt,
|
|
438
438
|
{
|
|
439
|
-
scores:
|
|
440
|
-
restrictQuantitativeData: !!((
|
|
439
|
+
scores: f,
|
|
440
|
+
restrictQuantitativeData: !!((p = u.data) != null && p.restrict_quantitative_data),
|
|
441
441
|
onAssignmentClick: n
|
|
442
442
|
}
|
|
443
443
|
)
|
|
444
444
|
] });
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Kr({
|
|
447
447
|
score: e,
|
|
448
448
|
gradingType: t,
|
|
449
449
|
pointsPossible: r
|
|
450
450
|
}) {
|
|
451
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ d(b, { children: le(e, t, r) });
|
|
452
452
|
}
|
|
453
|
-
var
|
|
454
|
-
function
|
|
453
|
+
var At = 20, bt = 1, O = 1e6, fe = 1e6, wt = -7, Nt = 21, Et = !1, W = "[big.js] ", I = W + "Invalid ", H = I + "decimal places", Gt = I + "rounding mode", he = W + "Division by zero", g = {}, w = void 0, Dt = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
454
|
+
function pe() {
|
|
455
455
|
function e(t) {
|
|
456
456
|
var r = this;
|
|
457
|
-
if (!(r instanceof e)) return t ===
|
|
457
|
+
if (!(r instanceof e)) return t === w ? pe() : new e(t);
|
|
458
458
|
if (t instanceof e)
|
|
459
459
|
r.s = t.s, r.e = t.e, r.c = t.c.slice();
|
|
460
460
|
else {
|
|
461
461
|
if (typeof t != "string") {
|
|
462
462
|
if (e.strict === !0 && typeof t != "bigint")
|
|
463
|
-
throw TypeError(
|
|
463
|
+
throw TypeError(I + "value");
|
|
464
464
|
t = t === 0 && 1 / t < 0 ? "-0" : String(t);
|
|
465
465
|
}
|
|
466
|
-
|
|
466
|
+
Pt(r, t);
|
|
467
467
|
}
|
|
468
468
|
r.constructor = e;
|
|
469
469
|
}
|
|
470
|
-
return e.prototype =
|
|
470
|
+
return e.prototype = g, e.DP = At, e.RM = bt, e.NE = wt, e.PE = Nt, e.strict = Et, e.roundDown = 0, e.roundHalfUp = 1, e.roundHalfEven = 2, e.roundUp = 3, e;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Pt(e, t) {
|
|
473
473
|
var r, n, i;
|
|
474
|
-
if (!
|
|
475
|
-
throw Error(
|
|
474
|
+
if (!Dt.test(t))
|
|
475
|
+
throw Error(I + "number");
|
|
476
476
|
for (e.s = t.charAt(0) == "-" ? (t = t.slice(1), -1) : 1, (r = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (n = t.search(/e/i)) > 0 ? (r < 0 && (r = n), r += +t.slice(n + 1), t = t.substring(0, n)) : r < 0 && (r = t.length), i = t.length, n = 0; n < i && t.charAt(n) == "0"; ) ++n;
|
|
477
477
|
if (n == i)
|
|
478
478
|
e.c = [e.e = 0];
|
|
@@ -482,14 +482,14 @@ function Ut(e, t) {
|
|
|
482
482
|
}
|
|
483
483
|
return e;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function F(e, t, r, n) {
|
|
486
486
|
var i = e.c;
|
|
487
|
-
if (r ===
|
|
488
|
-
throw Error(
|
|
487
|
+
if (r === w && (r = e.constructor.RM), r !== 0 && r !== 1 && r !== 2 && r !== 3)
|
|
488
|
+
throw Error(Gt);
|
|
489
489
|
if (t < 1)
|
|
490
|
-
n = r === 3 && (n || !!i[0]) || t === 0 && (r === 1 && i[0] >= 5 || r === 2 && (i[0] > 5 || i[0] === 5 && (n || i[1] !==
|
|
490
|
+
n = r === 3 && (n || !!i[0]) || t === 0 && (r === 1 && i[0] >= 5 || r === 2 && (i[0] > 5 || i[0] === 5 && (n || i[1] !== w))), i.length = 1, n ? (e.e = e.e - t + 1, i[0] = 1) : i[0] = e.e = 0;
|
|
491
491
|
else if (t < i.length) {
|
|
492
|
-
if (n = r === 1 && i[t] >= 5 || r === 2 && (i[t] > 5 || i[t] === 5 && (n || i[t + 1] !==
|
|
492
|
+
if (n = r === 1 && i[t] >= 5 || r === 2 && (i[t] > 5 || i[t] === 5 && (n || i[t + 1] !== w || i[t - 1] & 1)) || r === 3 && (n || !!i[0]), i.length = t, n) {
|
|
493
493
|
for (; ++i[--t] > 9; )
|
|
494
494
|
if (i[t] = 0, t === 0) {
|
|
495
495
|
++e.e, i.unshift(1);
|
|
@@ -500,238 +500,238 @@ function $(e, t, r, n) {
|
|
|
500
500
|
}
|
|
501
501
|
return e;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
var n = e.e, i = e.c.join(""),
|
|
503
|
+
function B(e, t, r) {
|
|
504
|
+
var n = e.e, i = e.c.join(""), c = i.length;
|
|
505
505
|
if (t)
|
|
506
|
-
i = i.charAt(0) + (
|
|
506
|
+
i = i.charAt(0) + (c > 1 ? "." + i.slice(1) : "") + (n < 0 ? "e" : "e+") + n;
|
|
507
507
|
else if (n < 0) {
|
|
508
508
|
for (; ++n; ) i = "0" + i;
|
|
509
509
|
i = "0." + i;
|
|
510
510
|
} else if (n > 0)
|
|
511
|
-
if (++n >
|
|
512
|
-
for (n -=
|
|
513
|
-
else n <
|
|
514
|
-
else
|
|
511
|
+
if (++n > c)
|
|
512
|
+
for (n -= c; n--; ) i += "0";
|
|
513
|
+
else n < c && (i = i.slice(0, n) + "." + i.slice(n));
|
|
514
|
+
else c > 1 && (i = i.charAt(0) + "." + i.slice(1));
|
|
515
515
|
return e.s < 0 && r ? "-" + i : i;
|
|
516
516
|
}
|
|
517
|
-
|
|
517
|
+
g.abs = function() {
|
|
518
518
|
var e = new this.constructor(this);
|
|
519
519
|
return e.s = 1, e;
|
|
520
520
|
};
|
|
521
|
-
|
|
522
|
-
var t, r = this, n = r.c, i = (e = new r.constructor(e)).c,
|
|
523
|
-
if (!n[0] || !i[0]) return n[0] ?
|
|
524
|
-
if (
|
|
525
|
-
if (t =
|
|
526
|
-
for (
|
|
527
|
-
if (n[
|
|
528
|
-
return u ==
|
|
521
|
+
g.cmp = function(e) {
|
|
522
|
+
var t, r = this, n = r.c, i = (e = new r.constructor(e)).c, c = r.s, s = e.s, u = r.e, o = e.e;
|
|
523
|
+
if (!n[0] || !i[0]) return n[0] ? c : i[0] ? -s : 0;
|
|
524
|
+
if (c != s) return c;
|
|
525
|
+
if (t = c < 0, u != o) return u > o ^ t ? 1 : -1;
|
|
526
|
+
for (s = (u = n.length) < (o = i.length) ? u : o, c = -1; ++c < s; )
|
|
527
|
+
if (n[c] != i[c]) return n[c] > i[c] ^ t ? 1 : -1;
|
|
528
|
+
return u == o ? 0 : u > o ^ t ? 1 : -1;
|
|
529
529
|
};
|
|
530
|
-
|
|
531
|
-
var t = this, r = t.constructor, n = t.c, i = (e = new r(e)).c,
|
|
532
|
-
if (
|
|
533
|
-
throw Error(
|
|
530
|
+
g.div = function(e) {
|
|
531
|
+
var t = this, r = t.constructor, n = t.c, i = (e = new r(e)).c, c = t.s == e.s ? 1 : -1, s = r.DP;
|
|
532
|
+
if (s !== ~~s || s < 0 || s > O)
|
|
533
|
+
throw Error(H);
|
|
534
534
|
if (!i[0])
|
|
535
|
-
throw Error(
|
|
535
|
+
throw Error(he);
|
|
536
536
|
if (!n[0])
|
|
537
|
-
return e.s =
|
|
538
|
-
var u, f,
|
|
539
|
-
for (
|
|
537
|
+
return e.s = c, e.c = [e.e = 0], e;
|
|
538
|
+
var u, o, f, S, m, l = i.slice(), G = u = i.length, D = n.length, p = n.slice(0, u), _ = p.length, j = e, X = j.c = [], Y = 0, M = s + (j.e = t.e - e.e) + 1;
|
|
539
|
+
for (j.s = c, c = M < 0 ? 0 : M, l.unshift(0); _++ < u; ) p.push(0);
|
|
540
540
|
do {
|
|
541
|
-
for (
|
|
542
|
-
if (u != (
|
|
543
|
-
|
|
541
|
+
for (f = 0; f < 10; f++) {
|
|
542
|
+
if (u != (_ = p.length))
|
|
543
|
+
S = u > _ ? 1 : -1;
|
|
544
544
|
else
|
|
545
|
-
for (
|
|
546
|
-
if (i[
|
|
547
|
-
|
|
545
|
+
for (m = -1, S = 0; ++m < u; )
|
|
546
|
+
if (i[m] != p[m]) {
|
|
547
|
+
S = i[m] > p[m] ? 1 : -1;
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
|
-
if (
|
|
551
|
-
for (
|
|
552
|
-
if (
|
|
553
|
-
for (
|
|
554
|
-
--
|
|
550
|
+
if (S < 0) {
|
|
551
|
+
for (o = _ == u ? i : l; _; ) {
|
|
552
|
+
if (p[--_] < o[_]) {
|
|
553
|
+
for (m = _; m && !p[--m]; ) p[m] = 9;
|
|
554
|
+
--p[m], p[_] += 10;
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
p[_] -= o[_];
|
|
557
557
|
}
|
|
558
|
-
for (; !
|
|
558
|
+
for (; !p[0]; ) p.shift();
|
|
559
559
|
} else
|
|
560
560
|
break;
|
|
561
561
|
}
|
|
562
|
-
|
|
563
|
-
} while ((
|
|
564
|
-
return !
|
|
562
|
+
X[Y++] = S ? f : ++f, p[0] && S ? p[_] = n[G] || 0 : p = [n[G]];
|
|
563
|
+
} while ((G++ < D || p[0] !== w) && c--);
|
|
564
|
+
return !X[0] && Y != 1 && (X.shift(), j.e--, M--), Y > M && F(j, M, r.RM, p[0] !== w), j;
|
|
565
565
|
};
|
|
566
|
-
|
|
566
|
+
g.eq = function(e) {
|
|
567
567
|
return this.cmp(e) === 0;
|
|
568
568
|
};
|
|
569
|
-
|
|
569
|
+
g.gt = function(e) {
|
|
570
570
|
return this.cmp(e) > 0;
|
|
571
571
|
};
|
|
572
|
-
|
|
572
|
+
g.gte = function(e) {
|
|
573
573
|
return this.cmp(e) > -1;
|
|
574
574
|
};
|
|
575
|
-
|
|
575
|
+
g.lt = function(e) {
|
|
576
576
|
return this.cmp(e) < 0;
|
|
577
577
|
};
|
|
578
|
-
|
|
578
|
+
g.lte = function(e) {
|
|
579
579
|
return this.cmp(e) < 1;
|
|
580
580
|
};
|
|
581
|
-
|
|
582
|
-
var t, r, n, i,
|
|
583
|
-
if (u !=
|
|
584
|
-
return e.s = -
|
|
585
|
-
var
|
|
586
|
-
if (!
|
|
587
|
-
return
|
|
588
|
-
if (u =
|
|
589
|
-
for ((i = u < 0) ? (u = -u, n =
|
|
581
|
+
g.minus = g.sub = function(e) {
|
|
582
|
+
var t, r, n, i, c = this, s = c.constructor, u = c.s, o = (e = new s(e)).s;
|
|
583
|
+
if (u != o)
|
|
584
|
+
return e.s = -o, c.plus(e);
|
|
585
|
+
var f = c.c.slice(), S = c.e, m = e.c, l = e.e;
|
|
586
|
+
if (!f[0] || !m[0])
|
|
587
|
+
return m[0] ? e.s = -o : f[0] ? e = new s(c) : e.s = 1, e;
|
|
588
|
+
if (u = S - l) {
|
|
589
|
+
for ((i = u < 0) ? (u = -u, n = f) : (l = S, n = m), n.reverse(), o = u; o--; ) n.push(0);
|
|
590
590
|
n.reverse();
|
|
591
591
|
} else
|
|
592
|
-
for (r = ((i =
|
|
593
|
-
if (o
|
|
594
|
-
i = o
|
|
592
|
+
for (r = ((i = f.length < m.length) ? f : m).length, u = o = 0; o < r; o++)
|
|
593
|
+
if (f[o] != m[o]) {
|
|
594
|
+
i = f[o] < m[o];
|
|
595
595
|
break;
|
|
596
596
|
}
|
|
597
|
-
if (i && (n =
|
|
598
|
-
for (
|
|
599
|
-
if (
|
|
600
|
-
for (t = r; t && !
|
|
601
|
-
--
|
|
597
|
+
if (i && (n = f, f = m, m = n, e.s = -e.s), (o = (r = m.length) - (t = f.length)) > 0) for (; o--; ) f[t++] = 0;
|
|
598
|
+
for (o = t; r > u; ) {
|
|
599
|
+
if (f[--r] < m[r]) {
|
|
600
|
+
for (t = r; t && !f[--t]; ) f[t] = 9;
|
|
601
|
+
--f[t], f[r] += 10;
|
|
602
602
|
}
|
|
603
|
-
|
|
603
|
+
f[r] -= m[r];
|
|
604
604
|
}
|
|
605
|
-
for (;
|
|
606
|
-
for (;
|
|
607
|
-
|
|
608
|
-
return
|
|
605
|
+
for (; f[--o] === 0; ) f.pop();
|
|
606
|
+
for (; f[0] === 0; )
|
|
607
|
+
f.shift(), --l;
|
|
608
|
+
return f[0] || (e.s = 1, f = [l = 0]), e.c = f, e.e = l, e;
|
|
609
609
|
};
|
|
610
|
-
|
|
611
|
-
var t, r = this, n = r.constructor, i = r.s,
|
|
610
|
+
g.mod = function(e) {
|
|
611
|
+
var t, r = this, n = r.constructor, i = r.s, c = (e = new n(e)).s;
|
|
612
612
|
if (!e.c[0])
|
|
613
|
-
throw Error(
|
|
614
|
-
return r.s = e.s = 1, t = e.cmp(r) == 1, r.s = i, e.s =
|
|
613
|
+
throw Error(he);
|
|
614
|
+
return r.s = e.s = 1, t = e.cmp(r) == 1, r.s = i, e.s = c, t ? new n(r) : (i = n.DP, c = n.RM, n.DP = n.RM = 0, r = r.div(e), n.DP = i, n.RM = c, this.minus(r.times(e)));
|
|
615
615
|
};
|
|
616
|
-
|
|
616
|
+
g.neg = function() {
|
|
617
617
|
var e = new this.constructor(this);
|
|
618
618
|
return e.s = -e.s, e;
|
|
619
619
|
};
|
|
620
|
-
|
|
621
|
-
var t, r, n, i = this,
|
|
622
|
-
if (e = new
|
|
620
|
+
g.plus = g.add = function(e) {
|
|
621
|
+
var t, r, n, i = this, c = i.constructor;
|
|
622
|
+
if (e = new c(e), i.s != e.s)
|
|
623
623
|
return e.s = -e.s, i.minus(e);
|
|
624
|
-
var
|
|
625
|
-
if (!u[0] || !
|
|
626
|
-
return
|
|
627
|
-
if (u = u.slice(), t =
|
|
628
|
-
for (t > 0 ? (
|
|
624
|
+
var s = i.e, u = i.c, o = e.e, f = e.c;
|
|
625
|
+
if (!u[0] || !f[0])
|
|
626
|
+
return f[0] || (u[0] ? e = new c(i) : e.s = i.s), e;
|
|
627
|
+
if (u = u.slice(), t = s - o) {
|
|
628
|
+
for (t > 0 ? (o = s, n = f) : (t = -t, n = u), n.reverse(); t--; ) n.push(0);
|
|
629
629
|
n.reverse();
|
|
630
630
|
}
|
|
631
|
-
for (u.length -
|
|
632
|
-
for (r && (u.unshift(r), ++
|
|
633
|
-
return e.c = u, e.e =
|
|
631
|
+
for (u.length - f.length < 0 && (n = f, f = u, u = n), t = f.length, r = 0; t; u[t] %= 10) r = (u[--t] = u[t] + f[t] + r) / 10 | 0;
|
|
632
|
+
for (r && (u.unshift(r), ++o), t = u.length; u[--t] === 0; ) u.pop();
|
|
633
|
+
return e.c = u, e.e = o, e;
|
|
634
634
|
};
|
|
635
|
-
|
|
635
|
+
g.pow = function(e) {
|
|
636
636
|
var t = this, r = new t.constructor("1"), n = r, i = e < 0;
|
|
637
|
-
if (e !== ~~e || e < -
|
|
638
|
-
throw Error(
|
|
637
|
+
if (e !== ~~e || e < -fe || e > fe)
|
|
638
|
+
throw Error(I + "exponent");
|
|
639
639
|
for (i && (e = -e); e & 1 && (n = n.times(t)), e >>= 1, !!e; )
|
|
640
640
|
t = t.times(t);
|
|
641
641
|
return i ? r.div(n) : n;
|
|
642
642
|
};
|
|
643
|
-
|
|
644
|
-
if (e !== ~~e || e < 1 || e >
|
|
645
|
-
throw Error(
|
|
646
|
-
return
|
|
643
|
+
g.prec = function(e, t) {
|
|
644
|
+
if (e !== ~~e || e < 1 || e > O)
|
|
645
|
+
throw Error(I + "precision");
|
|
646
|
+
return F(new this.constructor(this), e, t);
|
|
647
647
|
};
|
|
648
|
-
|
|
649
|
-
if (e ===
|
|
650
|
-
else if (e !== ~~e || e < -
|
|
651
|
-
throw Error(
|
|
652
|
-
return
|
|
648
|
+
g.round = function(e, t) {
|
|
649
|
+
if (e === w) e = 0;
|
|
650
|
+
else if (e !== ~~e || e < -O || e > O)
|
|
651
|
+
throw Error(H);
|
|
652
|
+
return F(new this.constructor(this), e + this.e + 1, t);
|
|
653
653
|
};
|
|
654
|
-
|
|
655
|
-
var e, t, r, n = this, i = n.constructor,
|
|
654
|
+
g.sqrt = function() {
|
|
655
|
+
var e, t, r, n = this, i = n.constructor, c = n.s, s = n.e, u = new i("0.5");
|
|
656
656
|
if (!n.c[0]) return new i(n);
|
|
657
|
-
if (
|
|
658
|
-
throw Error(
|
|
659
|
-
|
|
657
|
+
if (c < 0)
|
|
658
|
+
throw Error(W + "No square root");
|
|
659
|
+
c = Math.sqrt(+B(n, !0, !0)), c === 0 || c === 1 / 0 ? (t = n.c.join(""), t.length + s & 1 || (t += "0"), c = Math.sqrt(t), s = ((s + 1) / 2 | 0) - (s < 0 || s & 1), e = new i((c == 1 / 0 ? "5e" : (c = c.toExponential()).slice(0, c.indexOf("e") + 1)) + s)) : e = new i(c + ""), s = e.e + (i.DP += 4);
|
|
660
660
|
do
|
|
661
661
|
r = e, e = u.times(r.plus(n.div(r)));
|
|
662
|
-
while (r.c.slice(0,
|
|
663
|
-
return
|
|
662
|
+
while (r.c.slice(0, s).join("") !== e.c.slice(0, s).join(""));
|
|
663
|
+
return F(e, (i.DP -= 4) + e.e + 1, i.RM);
|
|
664
664
|
};
|
|
665
|
-
|
|
666
|
-
var t, r = this, n = r.constructor, i = r.c,
|
|
667
|
-
if (e.s = r.s == e.s ? 1 : -1, !i[0] || !
|
|
665
|
+
g.times = g.mul = function(e) {
|
|
666
|
+
var t, r = this, n = r.constructor, i = r.c, c = (e = new n(e)).c, s = i.length, u = c.length, o = r.e, f = e.e;
|
|
667
|
+
if (e.s = r.s == e.s ? 1 : -1, !i[0] || !c[0])
|
|
668
668
|
return e.c = [e.e = 0], e;
|
|
669
|
-
for (e.e =
|
|
670
|
-
for (
|
|
671
|
-
for (u = 0,
|
|
672
|
-
u = t[
|
|
673
|
-
t[
|
|
669
|
+
for (e.e = o + f, s < u && (t = i, i = c, c = t, f = s, s = u, u = f), t = new Array(f = s + u); f--; ) t[f] = 0;
|
|
670
|
+
for (o = u; o--; ) {
|
|
671
|
+
for (u = 0, f = s + o; f > o; )
|
|
672
|
+
u = t[f] + c[o] * i[f - o - 1] + u, t[f--] = u % 10, u = u / 10 | 0;
|
|
673
|
+
t[f] = u;
|
|
674
674
|
}
|
|
675
|
-
for (u ? ++e.e : t.shift(),
|
|
675
|
+
for (u ? ++e.e : t.shift(), o = t.length; !t[--o]; ) t.pop();
|
|
676
676
|
return e.c = t, e;
|
|
677
677
|
};
|
|
678
|
-
|
|
678
|
+
g.toExponential = function(e, t) {
|
|
679
679
|
var r = this, n = r.c[0];
|
|
680
|
-
if (e !==
|
|
681
|
-
if (e !== ~~e || e < 0 || e >
|
|
682
|
-
throw Error(
|
|
683
|
-
for (r =
|
|
680
|
+
if (e !== w) {
|
|
681
|
+
if (e !== ~~e || e < 0 || e > O)
|
|
682
|
+
throw Error(H);
|
|
683
|
+
for (r = F(new r.constructor(r), ++e, t); r.c.length < e; ) r.c.push(0);
|
|
684
684
|
}
|
|
685
|
-
return
|
|
685
|
+
return B(r, !0, !!n);
|
|
686
686
|
};
|
|
687
|
-
|
|
687
|
+
g.toFixed = function(e, t) {
|
|
688
688
|
var r = this, n = r.c[0];
|
|
689
|
-
if (e !==
|
|
690
|
-
if (e !== ~~e || e < 0 || e >
|
|
691
|
-
throw Error(
|
|
692
|
-
for (r =
|
|
689
|
+
if (e !== w) {
|
|
690
|
+
if (e !== ~~e || e < 0 || e > O)
|
|
691
|
+
throw Error(H);
|
|
692
|
+
for (r = F(new r.constructor(r), e + r.e + 1, t), e = e + r.e + 1; r.c.length < e; ) r.c.push(0);
|
|
693
693
|
}
|
|
694
|
-
return
|
|
694
|
+
return B(r, !1, !!n);
|
|
695
695
|
};
|
|
696
|
-
|
|
696
|
+
g[Symbol.for("nodejs.util.inspect.custom")] = g.toJSON = g.toString = function() {
|
|
697
697
|
var e = this, t = e.constructor;
|
|
698
|
-
return
|
|
698
|
+
return B(e, e.e <= t.NE || e.e >= t.PE, !!e.c[0]);
|
|
699
699
|
};
|
|
700
|
-
|
|
701
|
-
var e = +
|
|
700
|
+
g.toNumber = function() {
|
|
701
|
+
var e = +B(this, !0, !0);
|
|
702
702
|
if (this.constructor.strict === !0 && !this.eq(e.toString()))
|
|
703
|
-
throw Error(
|
|
703
|
+
throw Error(W + "Imprecise conversion");
|
|
704
704
|
return e;
|
|
705
705
|
};
|
|
706
|
-
|
|
706
|
+
g.toPrecision = function(e, t) {
|
|
707
707
|
var r = this, n = r.constructor, i = r.c[0];
|
|
708
|
-
if (e !==
|
|
709
|
-
if (e !== ~~e || e < 1 || e >
|
|
710
|
-
throw Error(
|
|
711
|
-
for (r =
|
|
708
|
+
if (e !== w) {
|
|
709
|
+
if (e !== ~~e || e < 1 || e > O)
|
|
710
|
+
throw Error(I + "precision");
|
|
711
|
+
for (r = F(new n(r), e, t); r.c.length < e; ) r.c.push(0);
|
|
712
712
|
}
|
|
713
|
-
return
|
|
713
|
+
return B(r, e <= r.e || r.e <= n.NE || r.e >= n.PE, !!i);
|
|
714
714
|
};
|
|
715
|
-
|
|
715
|
+
g.valueOf = function() {
|
|
716
716
|
var e = this, t = e.constructor;
|
|
717
717
|
if (t.strict === !0)
|
|
718
|
-
throw Error(
|
|
719
|
-
return
|
|
718
|
+
throw Error(W + "valueOf disallowed");
|
|
719
|
+
return B(e, e.e <= t.NE || e.e >= t.PE, !0);
|
|
720
720
|
};
|
|
721
|
-
var
|
|
722
|
-
function
|
|
721
|
+
var y = pe();
|
|
722
|
+
function xt(e) {
|
|
723
723
|
return Number.isSafeInteger(e) && e >= 0;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return e != null && typeof e != "function" &&
|
|
725
|
+
function Se(e) {
|
|
726
|
+
return e != null && typeof e != "function" && xt(e.length);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function k(e) {
|
|
729
729
|
return e;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function V(e) {
|
|
732
732
|
return e === "__proto__";
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function ye(e) {
|
|
735
735
|
switch (typeof e) {
|
|
736
736
|
case "number":
|
|
737
737
|
case "symbol":
|
|
@@ -740,117 +740,117 @@ function xe(e) {
|
|
|
740
740
|
return e.includes(".") || e.includes("[") || e.includes("]");
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function C(e) {
|
|
744
744
|
var t;
|
|
745
745
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is((t = e == null ? void 0 : e.valueOf) == null ? void 0 : t.call(e), -0) ? "-0" : String(e);
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function _e(e) {
|
|
748
748
|
if (e == null)
|
|
749
749
|
return "";
|
|
750
750
|
if (typeof e == "string")
|
|
751
751
|
return e;
|
|
752
752
|
if (Array.isArray(e))
|
|
753
|
-
return e.map(
|
|
753
|
+
return e.map(_e).join(",");
|
|
754
754
|
const t = String(e);
|
|
755
755
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Ae(e) {
|
|
758
758
|
if (Array.isArray(e))
|
|
759
|
-
return e.map(
|
|
759
|
+
return e.map(C);
|
|
760
760
|
if (typeof e == "symbol")
|
|
761
761
|
return [e];
|
|
762
|
-
e =
|
|
762
|
+
e = _e(e);
|
|
763
763
|
const t = [], r = e.length;
|
|
764
764
|
if (r === 0)
|
|
765
765
|
return t;
|
|
766
|
-
let n = 0, i = "",
|
|
766
|
+
let n = 0, i = "", c = "", s = !1;
|
|
767
767
|
for (e.charCodeAt(0) === 46 && (t.push(""), n++); n < r; ) {
|
|
768
768
|
const u = e[n];
|
|
769
|
-
|
|
769
|
+
c ? u === "\\" && n + 1 < r ? (n++, i += e[n]) : u === c ? c = "" : i += u : s ? u === '"' || u === "'" ? c = u : u === "]" ? (s = !1, t.push(i), i = "") : i += u : u === "[" ? (s = !0, i && (t.push(i), i = "")) : u === "." ? i && (t.push(i), i = "") : i += u, n++;
|
|
770
770
|
}
|
|
771
771
|
return i && t.push(i), t;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function ee(e, t, r) {
|
|
774
774
|
if (e == null)
|
|
775
775
|
return r;
|
|
776
776
|
switch (typeof t) {
|
|
777
777
|
case "string": {
|
|
778
|
-
if (
|
|
778
|
+
if (V(t))
|
|
779
779
|
return r;
|
|
780
780
|
const n = e[t];
|
|
781
|
-
return n === void 0 ?
|
|
781
|
+
return n === void 0 ? ye(t) ? ee(e, Ae(t), r) : r : n;
|
|
782
782
|
}
|
|
783
783
|
case "number":
|
|
784
784
|
case "symbol": {
|
|
785
|
-
typeof t == "number" && (t =
|
|
785
|
+
typeof t == "number" && (t = C(t));
|
|
786
786
|
const n = e[t];
|
|
787
787
|
return n === void 0 ? r : n;
|
|
788
788
|
}
|
|
789
789
|
default: {
|
|
790
790
|
if (Array.isArray(t))
|
|
791
|
-
return
|
|
792
|
-
if (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t),
|
|
791
|
+
return Ot(e, t, r);
|
|
792
|
+
if (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t), V(t))
|
|
793
793
|
return r;
|
|
794
794
|
const n = e[t];
|
|
795
795
|
return n === void 0 ? r : n;
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Ot(e, t, r) {
|
|
800
800
|
if (t.length === 0)
|
|
801
801
|
return r;
|
|
802
802
|
let n = e;
|
|
803
803
|
for (let i = 0; i < t.length; i++) {
|
|
804
|
-
if (n == null ||
|
|
804
|
+
if (n == null || V(t[i]))
|
|
805
805
|
return r;
|
|
806
806
|
n = n[t[i]];
|
|
807
807
|
}
|
|
808
808
|
return n === void 0 ? r : n;
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function It(e) {
|
|
811
811
|
return function(t) {
|
|
812
|
-
return
|
|
812
|
+
return ee(t, e);
|
|
813
813
|
};
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Ft(e) {
|
|
816
816
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function K(e) {
|
|
819
819
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function ae(e, t) {
|
|
822
822
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
return typeof r != "function" ?
|
|
826
|
-
}) :
|
|
827
|
-
const
|
|
828
|
-
return
|
|
824
|
+
function be(e, t, r) {
|
|
825
|
+
return typeof r != "function" ? be(e, t, () => {
|
|
826
|
+
}) : v(e, t, function n(i, c, s, u, o, f) {
|
|
827
|
+
const S = r(i, c, s, u, o, f);
|
|
828
|
+
return S !== void 0 ? !!S : v(i, c, n, f);
|
|
829
829
|
}, /* @__PURE__ */ new Map());
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function v(e, t, r, n) {
|
|
832
832
|
if (t === e)
|
|
833
833
|
return !0;
|
|
834
834
|
switch (typeof t) {
|
|
835
835
|
case "object":
|
|
836
|
-
return
|
|
836
|
+
return Bt(e, t, r, n);
|
|
837
837
|
case "function":
|
|
838
|
-
return Object.keys(t).length > 0 ?
|
|
838
|
+
return Object.keys(t).length > 0 ? v(e, { ...t }, r, n) : ae(e, t);
|
|
839
839
|
default:
|
|
840
|
-
return
|
|
840
|
+
return Ft(e) ? typeof t == "string" ? t === "" : !0 : ae(e, t);
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Bt(e, t, r, n) {
|
|
844
844
|
if (t == null)
|
|
845
845
|
return !0;
|
|
846
846
|
if (Array.isArray(t))
|
|
847
|
-
return
|
|
847
|
+
return we(e, t, r, n);
|
|
848
848
|
if (t instanceof Map)
|
|
849
|
-
return
|
|
849
|
+
return jt(e, t, r, n);
|
|
850
850
|
if (t instanceof Set)
|
|
851
|
-
return
|
|
851
|
+
return qt(e, t, r, n);
|
|
852
852
|
const i = Object.keys(t);
|
|
853
|
-
if (e == null ||
|
|
853
|
+
if (e == null || K(e))
|
|
854
854
|
return i.length === 0;
|
|
855
855
|
if (i.length === 0)
|
|
856
856
|
return !0;
|
|
@@ -858,9 +858,9 @@ function Qt(e, t, r, n) {
|
|
|
858
858
|
return n.get(t) === e;
|
|
859
859
|
n == null || n.set(t, e);
|
|
860
860
|
try {
|
|
861
|
-
for (let
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
861
|
+
for (let c = 0; c < i.length; c++) {
|
|
862
|
+
const s = i[c];
|
|
863
|
+
if (!K(e) && !(s in e) || t[s] === void 0 && e[s] !== void 0 || t[s] === null && e[s] !== null || !r(e[s], t[s], s, e, t, n))
|
|
864
864
|
return !1;
|
|
865
865
|
}
|
|
866
866
|
return !0;
|
|
@@ -868,34 +868,34 @@ function Qt(e, t, r, n) {
|
|
|
868
868
|
n == null || n.delete(t);
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function jt(e, t, r, n) {
|
|
872
872
|
if (t.size === 0)
|
|
873
873
|
return !0;
|
|
874
874
|
if (!(e instanceof Map))
|
|
875
875
|
return !1;
|
|
876
|
-
for (const [i,
|
|
877
|
-
const
|
|
878
|
-
if (r(
|
|
876
|
+
for (const [i, c] of t.entries()) {
|
|
877
|
+
const s = e.get(i);
|
|
878
|
+
if (r(s, c, i, e, t, n) === !1)
|
|
879
879
|
return !1;
|
|
880
880
|
}
|
|
881
881
|
return !0;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function we(e, t, r, n) {
|
|
884
884
|
if (t.length === 0)
|
|
885
885
|
return !0;
|
|
886
886
|
if (!Array.isArray(e))
|
|
887
887
|
return !1;
|
|
888
888
|
const i = /* @__PURE__ */ new Set();
|
|
889
|
-
for (let
|
|
890
|
-
const
|
|
889
|
+
for (let c = 0; c < t.length; c++) {
|
|
890
|
+
const s = t[c];
|
|
891
891
|
let u = !1;
|
|
892
|
-
for (let
|
|
893
|
-
if (i.has(
|
|
892
|
+
for (let o = 0; o < e.length; o++) {
|
|
893
|
+
if (i.has(o))
|
|
894
894
|
continue;
|
|
895
|
-
const
|
|
896
|
-
let
|
|
897
|
-
if (r(
|
|
898
|
-
i.add(
|
|
895
|
+
const f = e[o];
|
|
896
|
+
let S = !1;
|
|
897
|
+
if (r(f, s, c, e, t, n) && (S = !0), S) {
|
|
898
|
+
i.add(o), u = !0;
|
|
899
899
|
break;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
@@ -904,167 +904,167 @@ function Fe(e, t, r, n) {
|
|
|
904
904
|
}
|
|
905
905
|
return !0;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
return t.size === 0 ? !0 : e instanceof Set ?
|
|
907
|
+
function qt(e, t, r, n) {
|
|
908
|
+
return t.size === 0 ? !0 : e instanceof Set ? we([...e], [...t], r, n) : !1;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return
|
|
910
|
+
function Ne(e, t) {
|
|
911
|
+
return be(e, t, () => {
|
|
912
912
|
});
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Mt(e) {
|
|
915
915
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function te(e) {
|
|
918
918
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
919
919
|
}
|
|
920
|
-
const
|
|
921
|
-
function
|
|
920
|
+
const Rt = "[object RegExp]", Ee = "[object String]", Ge = "[object Number]", De = "[object Boolean]", Pe = "[object Arguments]", Lt = "[object Symbol]", Ut = "[object Date]", Wt = "[object Map]", $t = "[object Set]", Ht = "[object Array]", zt = "[object ArrayBuffer]", xe = "[object Object]", Qt = "[object DataView]", Xt = "[object Uint8Array]", Yt = "[object Uint8ClampedArray]", Tt = "[object Uint16Array]", Zt = "[object Uint32Array]", Jt = "[object Int8Array]", Vt = "[object Int16Array]", Kt = "[object Int32Array]", vt = "[object Float32Array]", kt = "[object Float64Array]";
|
|
921
|
+
function Ct(e) {
|
|
922
922
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
924
|
+
function er(e, t) {
|
|
925
|
+
return x(e, void 0, e, /* @__PURE__ */ new Map(), t);
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
930
|
-
return
|
|
931
|
-
if (
|
|
927
|
+
function x(e, t, r, n = /* @__PURE__ */ new Map(), i = void 0) {
|
|
928
|
+
const c = i == null ? void 0 : i(e, t, r, n);
|
|
929
|
+
if (c !== void 0)
|
|
930
|
+
return c;
|
|
931
|
+
if (K(e))
|
|
932
932
|
return e;
|
|
933
933
|
if (n.has(e))
|
|
934
934
|
return n.get(e);
|
|
935
935
|
if (Array.isArray(e)) {
|
|
936
|
-
const
|
|
937
|
-
n.set(e,
|
|
936
|
+
const s = new Array(e.length);
|
|
937
|
+
n.set(e, s);
|
|
938
938
|
for (let u = 0; u < e.length; u++)
|
|
939
|
-
|
|
940
|
-
return Object.hasOwn(e, "index") && (
|
|
939
|
+
s[u] = x(e[u], u, r, n, i);
|
|
940
|
+
return Object.hasOwn(e, "index") && (s.index = e.index), Object.hasOwn(e, "input") && (s.input = e.input), s;
|
|
941
941
|
}
|
|
942
942
|
if (e instanceof Date)
|
|
943
943
|
return new Date(e.getTime());
|
|
944
944
|
if (e instanceof RegExp) {
|
|
945
|
-
const
|
|
946
|
-
return
|
|
945
|
+
const s = new RegExp(e.source, e.flags);
|
|
946
|
+
return s.lastIndex = e.lastIndex, s;
|
|
947
947
|
}
|
|
948
948
|
if (e instanceof Map) {
|
|
949
|
-
const
|
|
950
|
-
n.set(e,
|
|
951
|
-
for (const [u,
|
|
952
|
-
|
|
953
|
-
return
|
|
949
|
+
const s = /* @__PURE__ */ new Map();
|
|
950
|
+
n.set(e, s);
|
|
951
|
+
for (const [u, o] of e)
|
|
952
|
+
s.set(u, x(o, u, r, n, i));
|
|
953
|
+
return s;
|
|
954
954
|
}
|
|
955
955
|
if (e instanceof Set) {
|
|
956
|
-
const
|
|
957
|
-
n.set(e,
|
|
956
|
+
const s = /* @__PURE__ */ new Set();
|
|
957
|
+
n.set(e, s);
|
|
958
958
|
for (const u of e)
|
|
959
|
-
|
|
960
|
-
return
|
|
959
|
+
s.add(x(u, void 0, r, n, i));
|
|
960
|
+
return s;
|
|
961
961
|
}
|
|
962
962
|
if (typeof Buffer < "u" && Buffer.isBuffer(e))
|
|
963
963
|
return e.subarray();
|
|
964
|
-
if (
|
|
965
|
-
const
|
|
966
|
-
n.set(e,
|
|
964
|
+
if (Ct(e)) {
|
|
965
|
+
const s = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
966
|
+
n.set(e, s);
|
|
967
967
|
for (let u = 0; u < e.length; u++)
|
|
968
|
-
|
|
969
|
-
return
|
|
968
|
+
s[u] = x(e[u], u, r, n, i);
|
|
969
|
+
return s;
|
|
970
970
|
}
|
|
971
971
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
|
|
972
972
|
return e.slice(0);
|
|
973
973
|
if (e instanceof DataView) {
|
|
974
|
-
const
|
|
975
|
-
return n.set(e,
|
|
974
|
+
const s = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
975
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
976
976
|
}
|
|
977
977
|
if (typeof File < "u" && e instanceof File) {
|
|
978
|
-
const
|
|
978
|
+
const s = new File([e], e.name, {
|
|
979
979
|
type: e.type
|
|
980
980
|
});
|
|
981
|
-
return n.set(e,
|
|
981
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
982
982
|
}
|
|
983
983
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
984
|
-
const
|
|
985
|
-
return n.set(e,
|
|
984
|
+
const s = new Blob([e], { type: e.type });
|
|
985
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
986
986
|
}
|
|
987
987
|
if (e instanceof Error) {
|
|
988
|
-
const
|
|
989
|
-
return n.set(e,
|
|
988
|
+
const s = structuredClone(e);
|
|
989
|
+
return n.set(e, s), s.message = e.message, s.name = e.name, s.stack = e.stack, s.cause = e.cause, s.constructor = e.constructor, A(s, e, r, n, i), s;
|
|
990
990
|
}
|
|
991
991
|
if (e instanceof Boolean) {
|
|
992
|
-
const
|
|
993
|
-
return n.set(e,
|
|
992
|
+
const s = new Boolean(e.valueOf());
|
|
993
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
994
994
|
}
|
|
995
995
|
if (e instanceof Number) {
|
|
996
|
-
const
|
|
997
|
-
return n.set(e,
|
|
996
|
+
const s = new Number(e.valueOf());
|
|
997
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
998
998
|
}
|
|
999
999
|
if (e instanceof String) {
|
|
1000
|
-
const
|
|
1001
|
-
return n.set(e,
|
|
1000
|
+
const s = new String(e.valueOf());
|
|
1001
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
1002
1002
|
}
|
|
1003
|
-
if (typeof e == "object" &&
|
|
1004
|
-
const
|
|
1005
|
-
return n.set(e,
|
|
1003
|
+
if (typeof e == "object" && tr(e)) {
|
|
1004
|
+
const s = Object.create(Object.getPrototypeOf(e));
|
|
1005
|
+
return n.set(e, s), A(s, e, r, n, i), s;
|
|
1006
1006
|
}
|
|
1007
1007
|
return e;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const
|
|
1011
|
-
for (let
|
|
1012
|
-
const u = s
|
|
1013
|
-
(
|
|
1009
|
+
function A(e, t, r = e, n, i) {
|
|
1010
|
+
const c = [...Object.keys(t), ...Mt(t)];
|
|
1011
|
+
for (let s = 0; s < c.length; s++) {
|
|
1012
|
+
const u = c[s], o = Object.getOwnPropertyDescriptor(e, u);
|
|
1013
|
+
(o == null || o.writable) && (e[u] = x(t[u], u, r, n, i));
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
switch (
|
|
1018
|
-
case
|
|
1019
|
-
case
|
|
1020
|
-
case
|
|
1021
|
-
case
|
|
1022
|
-
case
|
|
1023
|
-
case
|
|
1024
|
-
case
|
|
1025
|
-
case ar:
|
|
1026
|
-
case cr:
|
|
1027
|
-
case ur:
|
|
1028
|
-
case or:
|
|
1029
|
-
case Kt:
|
|
1030
|
-
case je:
|
|
1031
|
-
case Le:
|
|
1032
|
-
case Zt:
|
|
1016
|
+
function tr(e) {
|
|
1017
|
+
switch (te(e)) {
|
|
1018
|
+
case Pe:
|
|
1019
|
+
case Ht:
|
|
1020
|
+
case zt:
|
|
1021
|
+
case Qt:
|
|
1022
|
+
case De:
|
|
1023
|
+
case Ut:
|
|
1024
|
+
case vt:
|
|
1033
1025
|
case kt:
|
|
1034
|
-
case Re:
|
|
1035
1026
|
case Jt:
|
|
1036
|
-
case
|
|
1037
|
-
case
|
|
1038
|
-
case
|
|
1039
|
-
case
|
|
1027
|
+
case Vt:
|
|
1028
|
+
case Kt:
|
|
1029
|
+
case Wt:
|
|
1030
|
+
case Ge:
|
|
1031
|
+
case xe:
|
|
1032
|
+
case Rt:
|
|
1033
|
+
case $t:
|
|
1034
|
+
case Ee:
|
|
1035
|
+
case Lt:
|
|
1036
|
+
case Xt:
|
|
1037
|
+
case Yt:
|
|
1038
|
+
case Tt:
|
|
1039
|
+
case Zt:
|
|
1040
1040
|
return !0;
|
|
1041
1041
|
default:
|
|
1042
1042
|
return !1;
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
return
|
|
1045
|
+
function rr(e) {
|
|
1046
|
+
return x(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return e =
|
|
1048
|
+
function nr(e) {
|
|
1049
|
+
return e = rr(e), (t) => Ne(t, e);
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1051
|
+
function ir(e, t) {
|
|
1052
|
+
return er(e, (r, n, i, c) => {
|
|
1053
1053
|
if (typeof e == "object") {
|
|
1054
|
-
if (
|
|
1055
|
-
const
|
|
1056
|
-
return
|
|
1054
|
+
if (te(e) === xe && typeof e.constructor != "function") {
|
|
1055
|
+
const s = {};
|
|
1056
|
+
return c.set(e, s), A(s, e, i, c), s;
|
|
1057
1057
|
}
|
|
1058
1058
|
switch (Object.prototype.toString.call(e)) {
|
|
1059
|
-
case
|
|
1060
|
-
case
|
|
1061
|
-
case
|
|
1062
|
-
const
|
|
1063
|
-
return
|
|
1059
|
+
case Ge:
|
|
1060
|
+
case Ee:
|
|
1061
|
+
case De: {
|
|
1062
|
+
const s = new e.constructor(e == null ? void 0 : e.valueOf());
|
|
1063
|
+
return A(s, e), s;
|
|
1064
1064
|
}
|
|
1065
|
-
case
|
|
1066
|
-
const
|
|
1067
|
-
return
|
|
1065
|
+
case Pe: {
|
|
1066
|
+
const s = {};
|
|
1067
|
+
return A(s, e), s.length = e.length, s[Symbol.iterator] = e[Symbol.iterator], s;
|
|
1068
1068
|
}
|
|
1069
1069
|
default:
|
|
1070
1070
|
return;
|
|
@@ -1072,528 +1072,309 @@ function pr(e, t) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1075
|
+
function sr(e) {
|
|
1076
|
+
return ir(e);
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1079
|
-
function
|
|
1078
|
+
const cr = /^(?:0|[1-9]\d*)$/;
|
|
1079
|
+
function ur(e, t = Number.MAX_SAFE_INTEGER) {
|
|
1080
1080
|
switch (typeof e) {
|
|
1081
1081
|
case "number":
|
|
1082
1082
|
return Number.isInteger(e) && e >= 0 && e < t;
|
|
1083
1083
|
case "symbol":
|
|
1084
1084
|
return !1;
|
|
1085
1085
|
case "string":
|
|
1086
|
-
return
|
|
1086
|
+
return cr.test(e);
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1090
|
-
return e !== null && typeof e == "object" &&
|
|
1089
|
+
function or(e) {
|
|
1090
|
+
return e !== null && typeof e == "object" && te(e) === "[object Arguments]";
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function fr(e, t) {
|
|
1093
1093
|
let r;
|
|
1094
|
-
if (Array.isArray(t) ? r = t : typeof t == "string" &&
|
|
1094
|
+
if (Array.isArray(t) ? r = t : typeof t == "string" && ye(t) && (e == null ? void 0 : e[t]) == null ? r = Ae(t) : r = [t], r.length === 0)
|
|
1095
1095
|
return !1;
|
|
1096
1096
|
let n = e;
|
|
1097
1097
|
for (let i = 0; i < r.length; i++) {
|
|
1098
|
-
const
|
|
1099
|
-
if ((n == null || !Object.hasOwn(n,
|
|
1098
|
+
const c = r[i];
|
|
1099
|
+
if ((n == null || !Object.hasOwn(n, c)) && !((Array.isArray(n) || or(n)) && ur(c) && c < n.length))
|
|
1100
1100
|
return !1;
|
|
1101
|
-
n = n[
|
|
1101
|
+
n = n[c];
|
|
1102
1102
|
}
|
|
1103
1103
|
return !0;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function ar(e, t) {
|
|
1106
1106
|
switch (typeof e) {
|
|
1107
1107
|
case "object": {
|
|
1108
1108
|
Object.is(e == null ? void 0 : e.valueOf(), -0) && (e = "-0");
|
|
1109
1109
|
break;
|
|
1110
1110
|
}
|
|
1111
1111
|
case "number": {
|
|
1112
|
-
e =
|
|
1112
|
+
e = C(e);
|
|
1113
1113
|
break;
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
|
-
return t =
|
|
1117
|
-
const n =
|
|
1118
|
-
return n === void 0 ?
|
|
1116
|
+
return t = sr(t), function(r) {
|
|
1117
|
+
const n = ee(r, e);
|
|
1118
|
+
return n === void 0 ? fr(r, e) : t === void 0 ? n === void 0 : Ne(n, t);
|
|
1119
1119
|
};
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function dr(e) {
|
|
1122
1122
|
if (e == null)
|
|
1123
|
-
return
|
|
1123
|
+
return k;
|
|
1124
1124
|
switch (typeof e) {
|
|
1125
1125
|
case "function":
|
|
1126
1126
|
return e;
|
|
1127
1127
|
case "object":
|
|
1128
|
-
return Array.isArray(e) && e.length === 2 ?
|
|
1128
|
+
return Array.isArray(e) && e.length === 2 ? ar(e[0], e[1]) : nr(e);
|
|
1129
1129
|
case "string":
|
|
1130
1130
|
case "symbol":
|
|
1131
1131
|
case "number":
|
|
1132
|
-
return
|
|
1132
|
+
return It(e);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function Oe(e, t, r = 1) {
|
|
1136
1136
|
if (t == null && (t = e, e = 0), !Number.isInteger(r) || r === 0)
|
|
1137
1137
|
throw new Error("The step value must be a non-zero integer.");
|
|
1138
1138
|
const n = Math.max(Math.ceil((t - e) / r), 0), i = new Array(n);
|
|
1139
|
-
for (let
|
|
1140
|
-
i[
|
|
1139
|
+
for (let c = 0; c < n; c++)
|
|
1140
|
+
i[c] = e + c * r;
|
|
1141
1141
|
return i;
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function mr(e, t) {
|
|
1144
1144
|
if (!e)
|
|
1145
1145
|
return [];
|
|
1146
|
-
const r =
|
|
1147
|
-
for (let
|
|
1148
|
-
const
|
|
1149
|
-
i[
|
|
1146
|
+
const r = Se(e) || Array.isArray(e) ? Oe(0, e.length) : Object.keys(e), n = dr(t ?? k), i = new Array(r.length);
|
|
1147
|
+
for (let c = 0; c < r.length; c++) {
|
|
1148
|
+
const s = r[c], u = e[s];
|
|
1149
|
+
i[c] = n(u, s, e);
|
|
1150
1150
|
}
|
|
1151
1151
|
return i;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function gr(e, t = k, r) {
|
|
1154
1154
|
if (!e)
|
|
1155
1155
|
return r;
|
|
1156
1156
|
let n, i = 0;
|
|
1157
|
-
|
|
1158
|
-
for (let
|
|
1159
|
-
const
|
|
1160
|
-
r = t(r, u,
|
|
1157
|
+
Se(e) ? (n = Oe(0, e.length), r == null && e.length > 0 && (r = e[0], i += 1)) : (n = Object.keys(e), r == null && (r = e[n[0]], i += 1));
|
|
1158
|
+
for (let c = i; c < n.length; c++) {
|
|
1159
|
+
const s = n[c], u = e[s];
|
|
1160
|
+
r = t(r, u, s, e);
|
|
1161
1161
|
}
|
|
1162
1162
|
return r;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
return new
|
|
1164
|
+
function lr(e, t) {
|
|
1165
|
+
return new y(e || 0).plus(t || 0);
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
return new
|
|
1167
|
+
function Ie(e, t) {
|
|
1168
|
+
return new y(e || 0).div(t || 0);
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
return new
|
|
1170
|
+
function vr(e, t) {
|
|
1171
|
+
return new y(e || 0).times(t || 0);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function re(e) {
|
|
1174
1174
|
return Number.parseFloat(e.toString());
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
return e.reduce((t, r) => t.plus(r || 0),
|
|
1176
|
+
function kr(e) {
|
|
1177
|
+
return e.reduce((t, r) => t.plus(r || 0), y(0));
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1180
|
-
const t =
|
|
1181
|
-
return
|
|
1179
|
+
function hr(e) {
|
|
1180
|
+
const t = gr(e, lr, 0);
|
|
1181
|
+
return re(t);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
const r =
|
|
1185
|
-
return
|
|
1183
|
+
function Cr(e, t) {
|
|
1184
|
+
const r = mr(e, t);
|
|
1185
|
+
return hr(r);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Fe(e, t) {
|
|
1188
1188
|
const r = Number(e) / Number(t) * 100;
|
|
1189
1189
|
if (!Number.isFinite(r))
|
|
1190
1190
|
return r;
|
|
1191
|
-
const n =
|
|
1192
|
-
return
|
|
1191
|
+
const n = Ie(e, t), i = new y(n).times(100);
|
|
1192
|
+
return re(i);
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function en(e, t, r) {
|
|
1195
1195
|
const n = (e || 0) / (t / r);
|
|
1196
1196
|
if (!Number.isFinite(n))
|
|
1197
1197
|
return n;
|
|
1198
|
-
const i =
|
|
1199
|
-
return
|
|
1198
|
+
const i = Ie(t, r), c = new y(e || 0).div(i);
|
|
1199
|
+
return re(c);
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function tn({
|
|
1202
1202
|
score: e,
|
|
1203
1203
|
possible: t,
|
|
1204
1204
|
weight: r
|
|
1205
1205
|
}) {
|
|
1206
|
-
return e && r && t ?
|
|
1206
|
+
return e && r && t ? y(e).div(t).times(r) : y(0);
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function rn(e, t = 0) {
|
|
1209
1209
|
try {
|
|
1210
1210
|
if (e == null)
|
|
1211
1211
|
return NaN;
|
|
1212
1212
|
const r = parseFloat(e.toString());
|
|
1213
|
-
return parseFloat(
|
|
1213
|
+
return parseFloat(y(r).round(t).toString());
|
|
1214
1214
|
} catch {
|
|
1215
1215
|
return NaN;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1219
|
-
function He() {
|
|
1220
|
-
function e(t) {
|
|
1221
|
-
var r = this;
|
|
1222
|
-
if (!(r instanceof e)) return t === j ? He() : new e(t);
|
|
1223
|
-
t instanceof e ? (r.s = t.s, r.e = t.e, r.c = t.c.slice()) : Mr(r, t), r.constructor = e;
|
|
1224
|
-
}
|
|
1225
|
-
return e.prototype = w, e.DP = xr, e.RM = Ir, e.NE = Or, e.PE = Br, e.version = "5.2.2", e;
|
|
1226
|
-
}
|
|
1227
|
-
function Mr(e, t) {
|
|
1228
|
-
var r, n, i;
|
|
1229
|
-
if (t === 0 && 1 / t < 0) t = "-0";
|
|
1230
|
-
else if (!Fr.test(t += "")) throw Error(Q + "number");
|
|
1231
|
-
for (e.s = t.charAt(0) == "-" ? (t = t.slice(1), -1) : 1, (r = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (n = t.search(/e/i)) > 0 ? (r < 0 && (r = n), r += +t.slice(n + 1), t = t.substring(0, n)) : r < 0 && (r = t.length), i = t.length, n = 0; n < i && t.charAt(n) == "0"; ) ++n;
|
|
1232
|
-
if (n == i)
|
|
1233
|
-
e.c = [e.e = 0];
|
|
1234
|
-
else {
|
|
1235
|
-
for (; i > 0 && t.charAt(--i) == "0"; ) ;
|
|
1236
|
-
for (e.e = r - n - 1, e.c = [], r = 0; n <= i; ) e.c[r++] = +t.charAt(n++);
|
|
1237
|
-
}
|
|
1238
|
-
return e;
|
|
1239
|
-
}
|
|
1240
|
-
function J(e, t, r, n) {
|
|
1241
|
-
var i = e.c, s = e.e + t + 1;
|
|
1242
|
-
if (s < i.length) {
|
|
1243
|
-
if (r === 1)
|
|
1244
|
-
n = i[s] >= 5;
|
|
1245
|
-
else if (r === 2)
|
|
1246
|
-
n = i[s] > 5 || i[s] == 5 && (n || s < 0 || i[s + 1] !== j || i[s - 1] & 1);
|
|
1247
|
-
else if (r === 3)
|
|
1248
|
-
n = n || !!i[0];
|
|
1249
|
-
else if (n = !1, r !== 0) throw Error(_e);
|
|
1250
|
-
if (s < 1)
|
|
1251
|
-
i.length = 1, n ? (e.e = -t, i[0] = 1) : i[0] = e.e = 0;
|
|
1252
|
-
else {
|
|
1253
|
-
if (i.length = s--, n)
|
|
1254
|
-
for (; ++i[s] > 9; )
|
|
1255
|
-
i[s] = 0, s-- || (++e.e, i.unshift(1));
|
|
1256
|
-
for (s = i.length; !i[--s]; ) i.pop();
|
|
1257
|
-
}
|
|
1258
|
-
} else if (r < 0 || r > 3 || r !== ~~r)
|
|
1259
|
-
throw Error(_e);
|
|
1260
|
-
return e;
|
|
1261
|
-
}
|
|
1262
|
-
function X(e, t, r, n) {
|
|
1263
|
-
var i, s, c = e.constructor, u = !e.c[0];
|
|
1264
|
-
if (r !== j) {
|
|
1265
|
-
if (r !== ~~r || r < (t == 3) || r > V)
|
|
1266
|
-
throw Error(t == 3 ? Q + "precision" : ae);
|
|
1267
|
-
for (e = new c(e), r = n - e.e, e.c.length > ++n && J(e, r, c.RM), t == 2 && (n = e.e + r + 1); e.c.length < n; ) e.c.push(0);
|
|
1268
|
-
}
|
|
1269
|
-
if (i = e.e, s = e.c.join(""), r = s.length, t != 2 && (t == 1 || t == 3 && n <= i || i <= c.NE || i >= c.PE))
|
|
1270
|
-
s = s.charAt(0) + (r > 1 ? "." + s.slice(1) : "") + (i < 0 ? "e" : "e+") + i;
|
|
1271
|
-
else if (i < 0) {
|
|
1272
|
-
for (; ++i; ) s = "0" + s;
|
|
1273
|
-
s = "0." + s;
|
|
1274
|
-
} else if (i > 0)
|
|
1275
|
-
if (++i > r) for (i -= r; i--; ) s += "0";
|
|
1276
|
-
else i < r && (s = s.slice(0, i) + "." + s.slice(i));
|
|
1277
|
-
else r > 1 && (s = s.charAt(0) + "." + s.slice(1));
|
|
1278
|
-
return e.s < 0 && (!u || t == 4) ? "-" + s : s;
|
|
1279
|
-
}
|
|
1280
|
-
w.abs = function() {
|
|
1281
|
-
var e = new this.constructor(this);
|
|
1282
|
-
return e.s = 1, e;
|
|
1283
|
-
};
|
|
1284
|
-
w.cmp = function(e) {
|
|
1285
|
-
var t, r = this, n = r.c, i = (e = new r.constructor(e)).c, s = r.s, c = e.s, u = r.e, f = e.e;
|
|
1286
|
-
if (!n[0] || !i[0]) return n[0] ? s : i[0] ? -c : 0;
|
|
1287
|
-
if (s != c) return s;
|
|
1288
|
-
if (t = s < 0, u != f) return u > f ^ t ? 1 : -1;
|
|
1289
|
-
for (c = (u = n.length) < (f = i.length) ? u : f, s = -1; ++s < c; )
|
|
1290
|
-
if (n[s] != i[s]) return n[s] > i[s] ^ t ? 1 : -1;
|
|
1291
|
-
return u == f ? 0 : u > f ^ t ? 1 : -1;
|
|
1292
|
-
};
|
|
1293
|
-
w.div = function(e) {
|
|
1294
|
-
var t = this, r = t.constructor, n = t.c, i = (e = new r(e)).c, s = t.s == e.s ? 1 : -1, c = r.DP;
|
|
1295
|
-
if (c !== ~~c || c < 0 || c > V) throw Error(ae);
|
|
1296
|
-
if (!i[0]) throw Error(ze);
|
|
1297
|
-
if (!n[0]) return new r(s * 0);
|
|
1298
|
-
var u, f, o, m, a, h = i.slice(), b = u = i.length, P = n.length, g = n.slice(0, u), S = g.length, _ = e, O = _.c = [], B = 0, G = c + (_.e = t.e - e.e) + 1;
|
|
1299
|
-
for (_.s = s, s = G < 0 ? 0 : G, h.unshift(0); S++ < u; ) g.push(0);
|
|
1300
|
-
do {
|
|
1301
|
-
for (o = 0; o < 10; o++) {
|
|
1302
|
-
if (u != (S = g.length))
|
|
1303
|
-
m = u > S ? 1 : -1;
|
|
1304
|
-
else
|
|
1305
|
-
for (a = -1, m = 0; ++a < u; )
|
|
1306
|
-
if (i[a] != g[a]) {
|
|
1307
|
-
m = i[a] > g[a] ? 1 : -1;
|
|
1308
|
-
break;
|
|
1309
|
-
}
|
|
1310
|
-
if (m < 0) {
|
|
1311
|
-
for (f = S == u ? i : h; S; ) {
|
|
1312
|
-
if (g[--S] < f[S]) {
|
|
1313
|
-
for (a = S; a && !g[--a]; ) g[a] = 9;
|
|
1314
|
-
--g[a], g[S] += 10;
|
|
1315
|
-
}
|
|
1316
|
-
g[S] -= f[S];
|
|
1317
|
-
}
|
|
1318
|
-
for (; !g[0]; ) g.shift();
|
|
1319
|
-
} else
|
|
1320
|
-
break;
|
|
1321
|
-
}
|
|
1322
|
-
O[B++] = m ? o : ++o, g[0] && m ? g[S] = n[b] || 0 : g = [n[b]];
|
|
1323
|
-
} while ((b++ < P || g[0] !== j) && s--);
|
|
1324
|
-
return !O[0] && B != 1 && (O.shift(), _.e--), B > G && J(_, c, r.RM, g[0] !== j), _;
|
|
1325
|
-
};
|
|
1326
|
-
w.eq = function(e) {
|
|
1327
|
-
return !this.cmp(e);
|
|
1328
|
-
};
|
|
1329
|
-
w.gt = function(e) {
|
|
1330
|
-
return this.cmp(e) > 0;
|
|
1331
|
-
};
|
|
1332
|
-
w.gte = function(e) {
|
|
1333
|
-
return this.cmp(e) > -1;
|
|
1334
|
-
};
|
|
1335
|
-
w.lt = function(e) {
|
|
1336
|
-
return this.cmp(e) < 0;
|
|
1337
|
-
};
|
|
1338
|
-
w.lte = function(e) {
|
|
1339
|
-
return this.cmp(e) < 1;
|
|
1340
|
-
};
|
|
1341
|
-
w.minus = w.sub = function(e) {
|
|
1342
|
-
var t, r, n, i, s = this, c = s.constructor, u = s.s, f = (e = new c(e)).s;
|
|
1343
|
-
if (u != f)
|
|
1344
|
-
return e.s = -f, s.plus(e);
|
|
1345
|
-
var o = s.c.slice(), m = s.e, a = e.c, h = e.e;
|
|
1346
|
-
if (!o[0] || !a[0])
|
|
1347
|
-
return a[0] ? (e.s = -f, e) : new c(o[0] ? s : 0);
|
|
1348
|
-
if (u = m - h) {
|
|
1349
|
-
for ((i = u < 0) ? (u = -u, n = o) : (h = m, n = a), n.reverse(), f = u; f--; ) n.push(0);
|
|
1350
|
-
n.reverse();
|
|
1351
|
-
} else
|
|
1352
|
-
for (r = ((i = o.length < a.length) ? o : a).length, u = f = 0; f < r; f++)
|
|
1353
|
-
if (o[f] != a[f]) {
|
|
1354
|
-
i = o[f] < a[f];
|
|
1355
|
-
break;
|
|
1356
|
-
}
|
|
1357
|
-
if (i && (n = o, o = a, a = n, e.s = -e.s), (f = (r = a.length) - (t = o.length)) > 0) for (; f--; ) o[t++] = 0;
|
|
1358
|
-
for (f = t; r > u; ) {
|
|
1359
|
-
if (o[--r] < a[r]) {
|
|
1360
|
-
for (t = r; t && !o[--t]; ) o[t] = 9;
|
|
1361
|
-
--o[t], o[r] += 10;
|
|
1362
|
-
}
|
|
1363
|
-
o[r] -= a[r];
|
|
1364
|
-
}
|
|
1365
|
-
for (; o[--f] === 0; ) o.pop();
|
|
1366
|
-
for (; o[0] === 0; )
|
|
1367
|
-
o.shift(), --h;
|
|
1368
|
-
return o[0] || (e.s = 1, o = [h = 0]), e.c = o, e.e = h, e;
|
|
1369
|
-
};
|
|
1370
|
-
w.mod = function(e) {
|
|
1371
|
-
var t, r = this, n = r.constructor, i = r.s, s = (e = new n(e)).s;
|
|
1372
|
-
if (!e.c[0]) throw Error(ze);
|
|
1373
|
-
return r.s = e.s = 1, t = e.cmp(r) == 1, r.s = i, e.s = s, t ? new n(r) : (i = n.DP, s = n.RM, n.DP = n.RM = 0, r = r.div(e), n.DP = i, n.RM = s, this.minus(r.times(e)));
|
|
1374
|
-
};
|
|
1375
|
-
w.plus = w.add = function(e) {
|
|
1376
|
-
var t, r = this, n = r.constructor, i = r.s, s = (e = new n(e)).s;
|
|
1377
|
-
if (i != s)
|
|
1378
|
-
return e.s = -s, r.minus(e);
|
|
1379
|
-
var c = r.e, u = r.c, f = e.e, o = e.c;
|
|
1380
|
-
if (!u[0] || !o[0]) return o[0] ? e : new n(u[0] ? r : i * 0);
|
|
1381
|
-
if (u = u.slice(), i = c - f) {
|
|
1382
|
-
for (i > 0 ? (f = c, t = o) : (i = -i, t = u), t.reverse(); i--; ) t.push(0);
|
|
1383
|
-
t.reverse();
|
|
1384
|
-
}
|
|
1385
|
-
for (u.length - o.length < 0 && (t = o, o = u, u = t), i = o.length, s = 0; i; u[i] %= 10) s = (u[--i] = u[i] + o[i] + s) / 10 | 0;
|
|
1386
|
-
for (s && (u.unshift(s), ++f), i = u.length; u[--i] === 0; ) u.pop();
|
|
1387
|
-
return e.c = u, e.e = f, e;
|
|
1388
|
-
};
|
|
1389
|
-
w.pow = function(e) {
|
|
1390
|
-
var t = this, r = new t.constructor(1), n = r, i = e < 0;
|
|
1391
|
-
if (e !== ~~e || e < -Ae || e > Ae) throw Error(Q + "exponent");
|
|
1392
|
-
for (i && (e = -e); e & 1 && (n = n.times(t)), e >>= 1, !!e; )
|
|
1393
|
-
t = t.times(t);
|
|
1394
|
-
return i ? r.div(n) : n;
|
|
1395
|
-
};
|
|
1396
|
-
w.round = function(e, t) {
|
|
1397
|
-
var r = this.constructor;
|
|
1398
|
-
if (e === j) e = 0;
|
|
1399
|
-
else if (e !== ~~e || e < -V || e > V) throw Error(ae);
|
|
1400
|
-
return J(new r(this), e, t === j ? r.RM : t);
|
|
1401
|
-
};
|
|
1402
|
-
w.sqrt = function() {
|
|
1403
|
-
var e, t, r, n = this, i = n.constructor, s = n.s, c = n.e, u = new i(0.5);
|
|
1404
|
-
if (!n.c[0]) return new i(n);
|
|
1405
|
-
if (s < 0) throw Error(fe + "No square root");
|
|
1406
|
-
s = Math.sqrt(n + ""), s === 0 || s === 1 / 0 ? (t = n.c.join(""), t.length + c & 1 || (t += "0"), s = Math.sqrt(t), c = ((c + 1) / 2 | 0) - (c < 0 || c & 1), e = new i((s == 1 / 0 ? "1e" : (s = s.toExponential()).slice(0, s.indexOf("e") + 1)) + c)) : e = new i(s), c = e.e + (i.DP += 4);
|
|
1407
|
-
do
|
|
1408
|
-
r = e, e = u.times(r.plus(n.div(r)));
|
|
1409
|
-
while (r.c.slice(0, c).join("") !== e.c.slice(0, c).join(""));
|
|
1410
|
-
return J(e, i.DP -= 4, i.RM);
|
|
1411
|
-
};
|
|
1412
|
-
w.times = w.mul = function(e) {
|
|
1413
|
-
var t, r = this, n = r.constructor, i = r.c, s = (e = new n(e)).c, c = i.length, u = s.length, f = r.e, o = e.e;
|
|
1414
|
-
if (e.s = r.s == e.s ? 1 : -1, !i[0] || !s[0]) return new n(e.s * 0);
|
|
1415
|
-
for (e.e = f + o, c < u && (t = i, i = s, s = t, o = c, c = u, u = o), t = new Array(o = c + u); o--; ) t[o] = 0;
|
|
1416
|
-
for (f = u; f--; ) {
|
|
1417
|
-
for (u = 0, o = c + f; o > f; )
|
|
1418
|
-
u = t[o] + s[f] * i[o - f - 1] + u, t[o--] = u % 10, u = u / 10 | 0;
|
|
1419
|
-
t[o] = (t[o] + u) % 10;
|
|
1420
|
-
}
|
|
1421
|
-
for (u ? ++e.e : t.shift(), f = t.length; !t[--f]; ) t.pop();
|
|
1422
|
-
return e.c = t, e;
|
|
1423
|
-
};
|
|
1424
|
-
w.toExponential = function(e) {
|
|
1425
|
-
return X(this, 1, e, e);
|
|
1426
|
-
};
|
|
1427
|
-
w.toFixed = function(e) {
|
|
1428
|
-
return X(this, 2, e, this.e + e);
|
|
1429
|
-
};
|
|
1430
|
-
w.toPrecision = function(e) {
|
|
1431
|
-
return X(this, 3, e, e - 1);
|
|
1432
|
-
};
|
|
1433
|
-
w.toString = function() {
|
|
1434
|
-
return X(this);
|
|
1435
|
-
};
|
|
1436
|
-
w.valueOf = w.toJSON = function() {
|
|
1437
|
-
return X(this, 4);
|
|
1438
|
-
};
|
|
1439
|
-
var Rr = He();
|
|
1440
|
-
function C(e, t) {
|
|
1218
|
+
function Z(e, t, r = !1, n = 1) {
|
|
1441
1219
|
if (typeof e != "number" || Number.isNaN(e) || t == null)
|
|
1442
1220
|
return null;
|
|
1443
|
-
const
|
|
1444
|
-
return
|
|
1221
|
+
const i = t.map((c) => ({ name: c[0], value: c[1] }));
|
|
1222
|
+
return pr(e, i, r, n);
|
|
1445
1223
|
}
|
|
1446
|
-
function
|
|
1224
|
+
function pr(e, t, r = !1, n = null) {
|
|
1447
1225
|
if (typeof e != "number" || Number.isNaN(e) || t == null)
|
|
1448
1226
|
return null;
|
|
1449
|
-
const r = parseFloat(
|
|
1450
|
-
const
|
|
1451
|
-
return
|
|
1227
|
+
const i = r && typeof n == "number" ? Sr(e, n) : e, c = parseFloat(r ? y(i).round(2) : y(i).round(4)), s = Math.max(c, 0), u = t.find((o, f) => {
|
|
1228
|
+
const S = (o.value * 100).toPrecision(4);
|
|
1229
|
+
return s >= parseFloat(S) || f === t.length - 1;
|
|
1452
1230
|
});
|
|
1453
|
-
if (!
|
|
1231
|
+
if (!u)
|
|
1454
1232
|
throw new Error("grading scheme not found");
|
|
1455
|
-
return
|
|
1233
|
+
return u.name;
|
|
1456
1234
|
}
|
|
1457
|
-
function
|
|
1235
|
+
function Sr(e, t) {
|
|
1236
|
+
return t === 100 || t <= 0 ? e : y(e).div(y(100).div(t)).round(2).div(t).times(100);
|
|
1237
|
+
}
|
|
1238
|
+
function yr(e, t = {}) {
|
|
1458
1239
|
const r = t.precision ?? (t.strip_insignificant_zeros !== !1 ? void 0 : 5), n = r !== void 0 ? e.toFixed(r) : String(e), i = t.strip_insignificant_zeros !== !1 && n.includes(".") ? n.replace(/\.?0+$/, "") : n;
|
|
1459
1240
|
return t.percentage ? `${i}%` : i;
|
|
1460
1241
|
}
|
|
1461
|
-
function
|
|
1242
|
+
function _r(e) {
|
|
1462
1243
|
if (typeof e == "number") return e;
|
|
1463
1244
|
const t = String(e).replace(/,/g, ""), r = parseFloat(t);
|
|
1464
1245
|
return Number.isNaN(r) ? NaN : r;
|
|
1465
1246
|
}
|
|
1466
|
-
const
|
|
1247
|
+
const Ar = {
|
|
1467
1248
|
excused: "Excused",
|
|
1468
1249
|
complete: "Complete",
|
|
1469
1250
|
incomplete: "Incomplete",
|
|
1470
1251
|
scoreOutOf: "%{score}/%{pointsPossible}"
|
|
1471
|
-
},
|
|
1472
|
-
formatNumber:
|
|
1473
|
-
parseNumber:
|
|
1474
|
-
strings:
|
|
1252
|
+
}, U = {
|
|
1253
|
+
formatNumber: yr,
|
|
1254
|
+
parseNumber: _r,
|
|
1255
|
+
strings: Ar
|
|
1475
1256
|
};
|
|
1476
|
-
let
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1479
|
-
formatNumber: e.formatNumber ??
|
|
1480
|
-
parseNumber: e.parseNumber ??
|
|
1481
|
-
strings: { ...
|
|
1257
|
+
let ne = { ...U };
|
|
1258
|
+
function nn(e) {
|
|
1259
|
+
ne = {
|
|
1260
|
+
formatNumber: e.formatNumber ?? U.formatNumber,
|
|
1261
|
+
parseNumber: e.parseNumber ?? U.parseNumber,
|
|
1262
|
+
strings: { ...U.strings, ...e.strings }
|
|
1482
1263
|
};
|
|
1483
1264
|
}
|
|
1484
|
-
function
|
|
1485
|
-
|
|
1265
|
+
function sn() {
|
|
1266
|
+
ne = { ...U };
|
|
1486
1267
|
}
|
|
1487
|
-
function
|
|
1488
|
-
return
|
|
1268
|
+
function E() {
|
|
1269
|
+
return ne;
|
|
1489
1270
|
}
|
|
1490
|
-
const
|
|
1271
|
+
const q = Object.assign(
|
|
1491
1272
|
(e, t = 0) => {
|
|
1492
1273
|
if (e === null)
|
|
1493
1274
|
return NaN;
|
|
1494
1275
|
try {
|
|
1495
|
-
return parseFloat(
|
|
1276
|
+
return parseFloat(y(e).round(t).toString());
|
|
1496
1277
|
} catch {
|
|
1497
1278
|
return NaN;
|
|
1498
1279
|
}
|
|
1499
1280
|
},
|
|
1500
1281
|
{ DEFAULT: 2 }
|
|
1501
|
-
),
|
|
1502
|
-
function
|
|
1282
|
+
), Be = "letter_grade", ie = "points", se = "percent", je = "pass_fail", qe = "gpa_scale", br = "points_out_of_fraction", ce = ["complete", "pass"], Me = ["incomplete", "fail"], z = "–", wr = [ie, se, qe], Nr = ["pass_fail", "letter_grade"];
|
|
1283
|
+
function Re(e) {
|
|
1503
1284
|
return typeof e != "string" ? e : e.replace(/(.+)-$/, "$1−");
|
|
1504
1285
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return t ? t ===
|
|
1286
|
+
function Le(e, t = null) {
|
|
1287
|
+
return t ? t === je : ce.includes(e) || Me.includes(e);
|
|
1507
1288
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return t ? t ===
|
|
1289
|
+
function Er(e, t) {
|
|
1290
|
+
return t ? t === se : /%/g.test(e);
|
|
1510
1291
|
}
|
|
1511
|
-
function
|
|
1292
|
+
function Ue(e) {
|
|
1512
1293
|
return e === "EX";
|
|
1513
1294
|
}
|
|
1514
|
-
function
|
|
1515
|
-
return
|
|
1295
|
+
function Q() {
|
|
1296
|
+
return E().strings.excused;
|
|
1516
1297
|
}
|
|
1517
|
-
function
|
|
1298
|
+
function We(e, t) {
|
|
1518
1299
|
if (e == null || e === "" || t == null)
|
|
1519
1300
|
return e;
|
|
1520
|
-
const { formatNumber: r, strings: n } =
|
|
1521
|
-
let
|
|
1522
|
-
e != null && (
|
|
1523
|
-
const
|
|
1524
|
-
return n.scoreOutOf.replace("%{score}",
|
|
1301
|
+
const { formatNumber: r, strings: n } = E(), i = { precision: 2, strip_insignificant_zeros: !0 };
|
|
1302
|
+
let c = z;
|
|
1303
|
+
e != null && (c = r(Number(e), i));
|
|
1304
|
+
const s = r(Number(t), i);
|
|
1305
|
+
return n.scoreOutOf.replace("%{score}", c).replace("%{pointsPossible}", s);
|
|
1525
1306
|
}
|
|
1526
|
-
function
|
|
1527
|
-
return
|
|
1307
|
+
function Gr(e) {
|
|
1308
|
+
return ce.includes(e) ? "complete" : Me.includes(e) ? "incomplete" : null;
|
|
1528
1309
|
}
|
|
1529
|
-
function
|
|
1530
|
-
return e ===
|
|
1310
|
+
function Dr(e) {
|
|
1311
|
+
return e === ie || e === se || e === je || e === Be;
|
|
1531
1312
|
}
|
|
1532
|
-
function
|
|
1533
|
-
return t ?
|
|
1313
|
+
function Pr(e, t) {
|
|
1314
|
+
return t ? Dr(t) : typeof e == "number" || Le(e);
|
|
1534
1315
|
}
|
|
1535
|
-
function
|
|
1536
|
-
const { formatNumber: t } =
|
|
1537
|
-
return t(
|
|
1316
|
+
function xr(e) {
|
|
1317
|
+
const { formatNumber: t } = E();
|
|
1318
|
+
return t(q(e, 2), { precision: 2, strip_insignificant_zeros: !0 });
|
|
1538
1319
|
}
|
|
1539
|
-
function
|
|
1540
|
-
const { formatNumber: r } =
|
|
1541
|
-
return r(
|
|
1320
|
+
function Or(e, t) {
|
|
1321
|
+
const { formatNumber: r } = E(), n = t.pointsPossible ? Fe(e, t.pointsPossible) : e;
|
|
1322
|
+
return r(q(n, 2), {
|
|
1542
1323
|
percentage: !0,
|
|
1543
1324
|
precision: 2,
|
|
1544
1325
|
strip_insignificant_zeros: !0
|
|
1545
1326
|
});
|
|
1546
1327
|
}
|
|
1547
|
-
function
|
|
1328
|
+
function L(e, t, r = {}) {
|
|
1548
1329
|
let n;
|
|
1549
1330
|
if (r != null && r.restrict_quantitative_data && r.pointsPossible === 0 && (e ?? 0) >= 0)
|
|
1550
|
-
n =
|
|
1331
|
+
n = Z(
|
|
1551
1332
|
100,
|
|
1552
1333
|
r.gradingScheme,
|
|
1553
1334
|
r.pointsBasedGradingScheme,
|
|
1554
1335
|
r.scalingFactor
|
|
1555
1336
|
);
|
|
1556
1337
|
else if (r.pointsPossible) {
|
|
1557
|
-
const i =
|
|
1558
|
-
n =
|
|
1338
|
+
const i = Fe(e, r.pointsPossible);
|
|
1339
|
+
n = Z(
|
|
1559
1340
|
i,
|
|
1560
1341
|
r.gradingScheme,
|
|
1561
1342
|
r.pointsBasedGradingScheme,
|
|
1562
1343
|
r.scalingFactor
|
|
1563
1344
|
);
|
|
1564
|
-
} else t != null ? n = t : n =
|
|
1345
|
+
} else t != null ? n = t : n = Z(
|
|
1565
1346
|
e,
|
|
1566
1347
|
r.gradingScheme,
|
|
1567
1348
|
r.pointsBasedGradingScheme,
|
|
1568
1349
|
r.scalingFactor
|
|
1569
1350
|
);
|
|
1570
|
-
return
|
|
1351
|
+
return Re(n);
|
|
1571
1352
|
}
|
|
1572
|
-
function
|
|
1573
|
-
const { strings: n } =
|
|
1353
|
+
function Ir(e, t, r) {
|
|
1354
|
+
const { strings: n } = E();
|
|
1574
1355
|
let i = !1;
|
|
1575
|
-
return r.pointsPossible ? i = e > 0 : i =
|
|
1356
|
+
return r.pointsPossible ? i = e > 0 : i = ce.includes(t), i ? n.complete : n.incomplete;
|
|
1576
1357
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return e.excused ?
|
|
1358
|
+
function Fr(e, t = {}) {
|
|
1359
|
+
return e.excused ? Q() : e.grade == null ? t.defaultValue != null ? t.defaultValue : z : e.grade;
|
|
1579
1360
|
}
|
|
1580
|
-
function
|
|
1581
|
-
const { formatNumber: r } =
|
|
1361
|
+
function Br(e, t = {}) {
|
|
1362
|
+
const { formatNumber: r } = E();
|
|
1582
1363
|
let n = e;
|
|
1583
1364
|
if (e == null || e === "")
|
|
1584
1365
|
return "defaultValue" in t ? t.defaultValue : e;
|
|
1585
|
-
if (
|
|
1586
|
-
return
|
|
1587
|
-
let i =
|
|
1588
|
-
if (
|
|
1589
|
-
if (
|
|
1590
|
-
i =
|
|
1591
|
-
const { strings:
|
|
1592
|
-
n = i === "complete" ?
|
|
1593
|
-
} else if (i && t.gradingType ===
|
|
1594
|
-
n =
|
|
1366
|
+
if (Ue(e))
|
|
1367
|
+
return Q();
|
|
1368
|
+
let i = $e(e, t);
|
|
1369
|
+
if (Pr(i, t.gradingType))
|
|
1370
|
+
if (Le(i, t.gradingType)) {
|
|
1371
|
+
i = Gr(i);
|
|
1372
|
+
const { strings: c } = E();
|
|
1373
|
+
n = i === "complete" ? c.complete : c.incomplete;
|
|
1374
|
+
} else if (i && t.gradingType === Be)
|
|
1375
|
+
n = L(null, i);
|
|
1595
1376
|
else if (t.restrict_quantitative_data && t.score != null && t.pointsPossible != null)
|
|
1596
|
-
n =
|
|
1377
|
+
n = L(t.score, null, {
|
|
1597
1378
|
gradingScheme: t.grading_scheme,
|
|
1598
1379
|
pointsBasedGradingScheme: t.points_based_grading_scheme,
|
|
1599
1380
|
pointsPossible: t.pointsPossible,
|
|
@@ -1601,18 +1382,18 @@ function Tr(e, t = {}) {
|
|
|
1601
1382
|
scalingFactor: t.scaling_factor
|
|
1602
1383
|
});
|
|
1603
1384
|
else {
|
|
1604
|
-
const
|
|
1605
|
-
n = r(
|
|
1606
|
-
percentage:
|
|
1385
|
+
const c = q(i, t.precision || 2);
|
|
1386
|
+
n = r(c, {
|
|
1387
|
+
percentage: Er(e, t.gradingType)
|
|
1607
1388
|
});
|
|
1608
1389
|
}
|
|
1609
|
-
return !t.restrict_quantitative_data && t.gradingType ===
|
|
1390
|
+
return !t.restrict_quantitative_data && t.gradingType === ie && t.formatType === br && (n = We(e, t.pointsPossible)), t.restrict_quantitative_data && t.score != null && t.pointsPossible != null && t.gradingType === qe && (n = L(t.score, null, {
|
|
1610
1391
|
gradingScheme: t.grading_scheme,
|
|
1611
1392
|
pointsBasedGradingScheme: t.points_based_grading_scheme,
|
|
1612
1393
|
pointsPossible: t.pointsPossible,
|
|
1613
1394
|
restrict_quantitative_data: t.restrict_quantitative_data,
|
|
1614
1395
|
scalingFactor: t.scaling_factor
|
|
1615
|
-
})), t.restrict_quantitative_data && t.score != null && t.pointsPossible === 0 && t.gradingType === "letter_grade" && (n =
|
|
1396
|
+
})), t.restrict_quantitative_data && t.score != null && t.pointsPossible === 0 && t.gradingType === "letter_grade" && (n = L(t.score, null, {
|
|
1616
1397
|
gradingScheme: t.grading_scheme,
|
|
1617
1398
|
pointsBasedGradingScheme: t.points_based_grading_scheme,
|
|
1618
1399
|
pointsPossible: t.pointsPossible,
|
|
@@ -1620,128 +1401,128 @@ function Tr(e, t = {}) {
|
|
|
1620
1401
|
scalingFactor: t.scaling_factor
|
|
1621
1402
|
})), n;
|
|
1622
1403
|
}
|
|
1623
|
-
function
|
|
1404
|
+
function jr(e) {
|
|
1624
1405
|
if (e == null || typeof e != "string")
|
|
1625
1406
|
return e;
|
|
1626
|
-
const { parseNumber: t } =
|
|
1407
|
+
const { parseNumber: t } = E(), r = t(e.replace("%", ""));
|
|
1627
1408
|
return Number.isNaN(Number(r)) ? e : r + (/%/g.test(e) ? "%" : "");
|
|
1628
1409
|
}
|
|
1629
|
-
function
|
|
1410
|
+
function $e(e, t = {}) {
|
|
1630
1411
|
if (e == null || e === "" || typeof e == "number")
|
|
1631
1412
|
return e;
|
|
1632
|
-
const { parseNumber: r } =
|
|
1413
|
+
const { parseNumber: r } = E();
|
|
1633
1414
|
let n;
|
|
1634
1415
|
const i = e.replace("%", "");
|
|
1635
1416
|
return "delocalize" in t && !t.delocalize && !Number.isNaN(Number(i)) ? n = parseFloat(i) : n = r(i), Number.isNaN(Number(n)) ? e : n;
|
|
1636
1417
|
}
|
|
1637
|
-
function
|
|
1418
|
+
function qr(e, t = { version: "final" }) {
|
|
1638
1419
|
if (e.excused)
|
|
1639
|
-
return
|
|
1420
|
+
return Q();
|
|
1640
1421
|
const r = t.version === "entered" ? e.enteredScore : e.score, n = t.version === "entered" ? e.enteredGrade : e.grade;
|
|
1641
1422
|
if (r == null)
|
|
1642
|
-
return t.defaultValue != null ? t.defaultValue :
|
|
1423
|
+
return t.defaultValue != null ? t.defaultValue : z;
|
|
1643
1424
|
switch (t.formatType) {
|
|
1644
1425
|
case "percent":
|
|
1645
|
-
return
|
|
1426
|
+
return Or(r, t);
|
|
1646
1427
|
case "gradingScheme":
|
|
1647
|
-
return
|
|
1428
|
+
return L(r, n ?? null);
|
|
1648
1429
|
case "passFail":
|
|
1649
|
-
return
|
|
1430
|
+
return Ir(r, n ?? "", t);
|
|
1650
1431
|
default:
|
|
1651
|
-
return
|
|
1432
|
+
return xr(r);
|
|
1652
1433
|
}
|
|
1653
1434
|
}
|
|
1654
|
-
const
|
|
1655
|
-
formatGrade:
|
|
1656
|
-
delocalizeGrade:
|
|
1657
|
-
parseGrade:
|
|
1658
|
-
excused:
|
|
1659
|
-
isExcused:
|
|
1660
|
-
formatGradeInfo:
|
|
1661
|
-
formatPointsOutOf:
|
|
1662
|
-
formatSubmissionGrade:
|
|
1663
|
-
replaceDashWithMinus:
|
|
1664
|
-
UNGRADED:
|
|
1665
|
-
QUANTITATIVE_GRADING_TYPES:
|
|
1666
|
-
QUALITATIVE_GRADING_TYPES:
|
|
1435
|
+
const cn = {
|
|
1436
|
+
formatGrade: Br,
|
|
1437
|
+
delocalizeGrade: jr,
|
|
1438
|
+
parseGrade: $e,
|
|
1439
|
+
excused: Q,
|
|
1440
|
+
isExcused: Ue,
|
|
1441
|
+
formatGradeInfo: Fr,
|
|
1442
|
+
formatPointsOutOf: We,
|
|
1443
|
+
formatSubmissionGrade: qr,
|
|
1444
|
+
replaceDashWithMinus: Re,
|
|
1445
|
+
UNGRADED: z,
|
|
1446
|
+
QUANTITATIVE_GRADING_TYPES: wr,
|
|
1447
|
+
QUALITATIVE_GRADING_TYPES: Nr
|
|
1667
1448
|
};
|
|
1668
|
-
function
|
|
1669
|
-
const r = (
|
|
1670
|
-
let i = t.findIndex((
|
|
1449
|
+
function He(e, t) {
|
|
1450
|
+
const r = (c, s) => c[0].toLowerCase() === s, n = `${e}`.trim().toLowerCase();
|
|
1451
|
+
let i = t.findIndex((c) => r(c, n));
|
|
1671
1452
|
if (i < 0 && /.+−$/.test(n)) {
|
|
1672
|
-
const
|
|
1673
|
-
i = t.findIndex((
|
|
1453
|
+
const c = n.replace(/−$/, "-");
|
|
1454
|
+
i = t.findIndex((s) => r(s, c));
|
|
1674
1455
|
}
|
|
1675
1456
|
return i;
|
|
1676
1457
|
}
|
|
1677
|
-
function
|
|
1678
|
-
const r =
|
|
1458
|
+
function un(e, t) {
|
|
1459
|
+
const r = He(e, t);
|
|
1679
1460
|
if (r === -1)
|
|
1680
1461
|
return null;
|
|
1681
1462
|
if (r === 0)
|
|
1682
1463
|
return 100;
|
|
1683
|
-
const n = t[r][1], i = t[r - 1][1],
|
|
1684
|
-
let
|
|
1685
|
-
return
|
|
1464
|
+
const n = t[r][1], i = t[r - 1][1], c = q(i - n, 4) * 100;
|
|
1465
|
+
let s = 1;
|
|
1466
|
+
return c <= 1 && (c <= 0.1 ? s = 0.01 : s = 0.1), q(i * 100 - s, 2);
|
|
1686
1467
|
}
|
|
1687
|
-
function
|
|
1688
|
-
const r =
|
|
1468
|
+
function on(e, t) {
|
|
1469
|
+
const r = He(e, t);
|
|
1689
1470
|
if (r === -1)
|
|
1690
1471
|
return null;
|
|
1691
1472
|
const n = t[r][1];
|
|
1692
|
-
return
|
|
1473
|
+
return q(n * 100, 2);
|
|
1693
1474
|
}
|
|
1694
|
-
function
|
|
1475
|
+
function fn(e, t) {
|
|
1695
1476
|
if (t.pointsBased && e != null)
|
|
1696
1477
|
return e / t.scalingFactor * 100;
|
|
1697
1478
|
}
|
|
1698
1479
|
export {
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1480
|
+
Ke as AssignmentGroupScoresTable,
|
|
1481
|
+
nt as AssignmentScoresTable,
|
|
1482
|
+
it as CollapsibleSection,
|
|
1483
|
+
ke as FeedbackIndicator,
|
|
1484
|
+
cn as GradeFormatHelper,
|
|
1485
|
+
Nr as QUALITATIVE_GRADING_TYPES,
|
|
1486
|
+
wr as QUANTITATIVE_GRADING_TYPES,
|
|
1487
|
+
Kr as ScoreDisplay,
|
|
1488
|
+
Vr as ScoresPage,
|
|
1489
|
+
et as SubmissionStatusPill,
|
|
1490
|
+
st as TotalScoreHeading,
|
|
1491
|
+
z as UNGRADED,
|
|
1492
|
+
lr as add,
|
|
1493
|
+
kr as bigSum,
|
|
1494
|
+
Ce as calculateSubmissionStatus,
|
|
1495
|
+
nn as configureGradeFormatting,
|
|
1496
|
+
jr as delocalizeGrade,
|
|
1497
|
+
Ie as divide,
|
|
1498
|
+
Q as excused,
|
|
1499
|
+
Br as formatGrade,
|
|
1500
|
+
Fr as formatGradeInfo,
|
|
1501
|
+
We as formatPointsOutOf,
|
|
1502
|
+
le as formatScore,
|
|
1503
|
+
qr as formatSubmissionGrade,
|
|
1504
|
+
me as getTotalScore,
|
|
1505
|
+
fn as gradePointsToPercentage,
|
|
1506
|
+
on as gradeToScoreLowerBound,
|
|
1507
|
+
un as gradeToScoreUpperBound,
|
|
1508
|
+
He as indexOfGrade,
|
|
1509
|
+
Ue as isExcused,
|
|
1510
|
+
ge as isNonNumericGradingType,
|
|
1511
|
+
vr as multiply,
|
|
1512
|
+
$e as parseGrade,
|
|
1513
|
+
Re as replaceDashWithMinus,
|
|
1514
|
+
sn as resetGradeFormatting,
|
|
1515
|
+
q as round,
|
|
1516
|
+
Fe as scoreToPercentage,
|
|
1517
|
+
en as scoreToScaledPoints,
|
|
1518
|
+
ve as shouldUseFormattedGrade,
|
|
1519
|
+
hr as sum,
|
|
1520
|
+
Cr as sumBy,
|
|
1521
|
+
re as toNumber,
|
|
1522
|
+
rn as totalGradeRound,
|
|
1523
|
+
yt as transformAssignmentGroupScores,
|
|
1524
|
+
_t as transformAssignmentScores,
|
|
1525
|
+
pt as useGetCourseScores,
|
|
1526
|
+
St as useGetCourseSettings,
|
|
1527
|
+
tn as weightedPercent
|
|
1747
1528
|
};
|