@instructure/platform-modules 0.1.1 → 0.2.0

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.
Files changed (56) hide show
  1. package/README.md +113 -3
  2. package/dist/adapters/canvasGraphql/normalize.d.ts +1 -0
  3. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  4. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  5. package/dist/components/FilterChips.d.ts.map +1 -1
  6. package/dist/components/ModuleCard.d.ts +17 -5
  7. package/dist/components/ModuleCard.d.ts.map +1 -1
  8. package/dist/components/ModuleCard.stories.d.ts +12 -0
  9. package/dist/components/ModuleCard.stories.d.ts.map +1 -0
  10. package/dist/components/ModuleItemRow.d.ts +3 -1
  11. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  12. package/dist/components/ModuleNumberBadge.d.ts +8 -0
  13. package/dist/components/ModuleNumberBadge.d.ts.map +1 -0
  14. package/dist/components/ModulesList.d.ts +4 -1
  15. package/dist/components/ModulesList.d.ts.map +1 -1
  16. package/dist/components/ModulesList.stories.d.ts +34 -6
  17. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/components/labels.d.ts +6 -10
  21. package/dist/components/labels.d.ts.map +1 -1
  22. package/dist/config/base.d.ts +8 -0
  23. package/dist/config/base.d.ts.map +1 -0
  24. package/dist/config/context.d.ts +11 -0
  25. package/dist/config/context.d.ts.map +1 -0
  26. package/dist/config/index.d.ts +6 -1
  27. package/dist/config/index.d.ts.map +1 -1
  28. package/dist/config/partialModulesConfig.d.ts +4 -0
  29. package/dist/config/partialModulesConfig.d.ts.map +1 -0
  30. package/dist/config/registry.d.ts +3 -0
  31. package/dist/config/registry.d.ts.map +1 -1
  32. package/dist/config/resolve.d.ts +7 -0
  33. package/dist/config/resolve.d.ts.map +1 -0
  34. package/dist/config/schemas.d.ts +2 -0
  35. package/dist/config/schemas.d.ts.map +1 -1
  36. package/dist/config/types.d.ts +32 -0
  37. package/dist/config/types.d.ts.map +1 -0
  38. package/dist/fixtures/generate.d.ts.map +1 -1
  39. package/dist/fixtures/index.d.ts +1 -1
  40. package/dist/fixtures/index.d.ts.map +1 -1
  41. package/dist/fixtures/scenarios.d.ts +5 -0
  42. package/dist/fixtures/scenarios.d.ts.map +1 -1
  43. package/dist/i18n.d.ts +33 -63
  44. package/dist/i18n.d.ts.map +1 -1
  45. package/dist/index.d.ts +5 -4
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +1130 -852
  48. package/dist/types/domain.d.ts +2 -0
  49. package/dist/types/domain.d.ts.map +1 -1
  50. package/dist/types/index.d.ts +1 -0
  51. package/dist/types/index.d.ts.map +1 -1
  52. package/dist/types/navigation.d.ts +13 -0
  53. package/dist/types/navigation.d.ts.map +1 -0
  54. package/dist/types/schemas.d.ts.map +1 -1
  55. package/locales/en.json +103 -0
  56. package/package.json +11 -3
package/dist/index.js CHANGED
@@ -1,23 +1,25 @@
1
- import { z as g } from "zod";
1
+ import { z as d } from "zod";
2
2
  import { gql as ee } from "graphql-tag";
3
- import { useInfiniteQuery as be, useQueryClient as Fe, InfiniteQueryObserver as Ct } from "@tanstack/react-query";
4
- import { useMemo as L, useCallback as D, useRef as B, useState as X, useEffect as ae, createContext as vt, useContext as Tt, useId as ke, memo as ze } from "react";
5
- import Nt from "p-limit";
6
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
7
- import { Button as Z, IconButton as At } from "@instructure/ui-buttons";
8
- import { Flex as P } from "@instructure/ui-flex";
9
- import { Text as I } from "@instructure/ui-text";
10
- import { View as S } from "@instructure/ui-view";
11
- import { politeAnnounce as Oe, getLiveRegion as Ue } from "@instructure/platform-instui-bindings";
12
- import { Alert as $e } from "@instructure/ui-alerts";
13
- import { Heading as Be } from "@instructure/ui-heading";
14
- import { IconLockLine as Ge, IconWarningLine as Ye, IconCheckLine as ue, IconClockLine as Qe, IconArrowNestLine as Lt, IconEmptyLine as Dt, IconLtiLine as Rt, IconLinkLine as qt, IconAttachMediaLine as Ft, IconDocumentLine as kt, IconDiscussionLine as zt, IconQuizLine as Ot, IconAssignmentLine as Ut, IconArrowOpenUpLine as $t, IconArrowOpenDownLine as je, IconSearchLine as Bt } from "@instructure/ui-icons";
15
- import { ProgressBar as Gt } from "@instructure/ui-progress";
16
- import { Spinner as We } from "@instructure/ui-spinner";
17
- import { Pill as Yt } from "@instructure/ui-pill";
18
- import { Menu as fe } from "@instructure/ui-menu";
19
- import { TextInput as Qt } from "@instructure/ui-text-input";
20
- const jt = g.enum([
3
+ import { jsx as o, jsxs as _ } from "react/jsx-runtime";
4
+ import { createContext as Be, useContext as Ge, useMemo as N, useCallback as D, useRef as $, useState as Z, useEffect as de, useId as je, memo as Ye } from "react";
5
+ import { useInfiniteQuery as Te, useQueryClient as We, InfiniteQueryObserver as Rt } from "@tanstack/react-query";
6
+ import Ft from "p-limit";
7
+ import { Button as X, IconButton as zt } from "@instructure/ui-buttons";
8
+ import { Flex as T } from "@instructure/ui-flex";
9
+ import { Text as b } from "@instructure/ui-text";
10
+ import { View as y } from "@instructure/ui-view";
11
+ import { politeAnnounce as Qe, getLiveRegion as He } from "@instructure/platform-instui-bindings";
12
+ import { Alert as Ke } from "@instructure/ui-alerts";
13
+ import { Heading as Ve } from "@instructure/ui-heading";
14
+ import { IconLockLine as Ze, IconWarningLine as Xe, IconCheckLine as me, IconClockLine as Je, IconArrowNestLine as Ut, IconEmptyLine as Ot, IconLtiLine as $t, IconLinkLine as Bt, IconAttachMediaLine as Gt, IconDocumentLine as jt, IconDiscussionLine as Yt, IconQuizLine as Wt, IconAssignmentLine as Qt, IconArrowOpenUpLine as Ht, IconArrowOpenDownLine as et, IconSearchLine as Kt } from "@instructure/ui-icons";
15
+ import { ProgressBar as Vt } from "@instructure/ui-progress";
16
+ import { Spinner as tt } from "@instructure/ui-spinner";
17
+ import { ScreenReaderContent as Zt } from "@instructure/ui-a11y-content";
18
+ import { Link as Xt } from "@instructure/ui-link";
19
+ import { Pill as Jt } from "@instructure/ui-pill";
20
+ import { Menu as Me } from "@instructure/ui-menu";
21
+ import { TextInput as en } from "@instructure/ui-text-input";
22
+ const tn = d.enum([
21
23
  "assignment",
22
24
  "quiz",
23
25
  "discussion",
@@ -26,7 +28,7 @@ const jt = g.enum([
26
28
  "external_url",
27
29
  "external_tool",
28
30
  "sub_header"
29
- ]), Wt = g.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), Kt = g.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), Ht = g.enum([
31
+ ]), nn = d.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), sn = d.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), rn = d.enum([
30
32
  "must_view",
31
33
  "must_mark_done",
32
34
  "must_contribute",
@@ -34,94 +36,95 @@ const jt = g.enum([
34
36
  "min_score",
35
37
  "min_percentage",
36
38
  "unknown"
37
- ]), Vt = g.object({
38
- status: Kt,
39
- requirementsMet: g.number(),
40
- requirementCount: g.number(),
41
- percentComplete: g.number().min(0).max(100),
42
- latestDueAt: g.string().nullish(),
43
- missingCount: g.number()
44
- }), Ke = g.object({
45
- itemId: g.string(),
46
- type: Ht,
47
- minScore: g.number().nullish(),
48
- minPercentage: g.number().nullish()
49
- }), He = g.object({
50
- id: g.string(),
51
- moduleId: g.string(),
52
- title: g.string(),
53
- type: jt,
54
- position: g.number(),
55
- indent: g.number(),
56
- published: g.boolean(),
57
- url: g.string().nullish(),
58
- completionRequirement: Ke.nullish(),
59
- dueAt: g.string().nullish(),
60
- status: Wt.optional(),
61
- pointsPossible: g.number().nullish(),
62
- extensions: g.record(g.unknown()).optional()
63
- }), Xt = g.object({
64
- id: g.string(),
65
- name: g.string(),
66
- position: g.number(),
67
- published: g.boolean(),
68
- itemCount: g.number(),
69
- items: g.array(He).optional(),
70
- unlockAt: g.string().nullish(),
71
- prerequisiteModuleIds: g.array(g.string()),
72
- requirementCount: g.number().nullish(),
73
- requireSequentialProgress: g.boolean(),
74
- completionRequirements: g.array(Ke).optional(),
75
- progress: Vt.optional(),
76
- extensions: g.record(g.unknown()).optional()
77
- }), Ve = g.object({
78
- hasNextPage: g.boolean(),
79
- endCursor: g.string().nullable()
39
+ ]), on = d.object({
40
+ status: sn,
41
+ requirementsMet: d.number(),
42
+ requirementCount: d.number(),
43
+ percentComplete: d.number().min(0).max(100),
44
+ latestDueAt: d.string().nullish(),
45
+ missingCount: d.number()
46
+ }), nt = d.object({
47
+ itemId: d.string(),
48
+ type: rn,
49
+ minScore: d.number().nullish(),
50
+ minPercentage: d.number().nullish()
51
+ }), st = d.object({
52
+ id: d.string(),
53
+ moduleId: d.string(),
54
+ title: d.string(),
55
+ type: tn,
56
+ position: d.number(),
57
+ indent: d.number(),
58
+ published: d.boolean(),
59
+ url: d.string().nullish(),
60
+ newTab: d.boolean().nullish(),
61
+ completionRequirement: nt.nullish(),
62
+ dueAt: d.string().nullish(),
63
+ status: nn.optional(),
64
+ pointsPossible: d.number().nullish(),
65
+ extensions: d.record(d.unknown()).optional()
66
+ }), ln = d.object({
67
+ id: d.string(),
68
+ name: d.string(),
69
+ position: d.number(),
70
+ published: d.boolean(),
71
+ itemCount: d.number(),
72
+ items: d.array(st).optional(),
73
+ unlockAt: d.string().nullish(),
74
+ prerequisiteModuleIds: d.array(d.string()),
75
+ requirementCount: d.number().nullish(),
76
+ requireSequentialProgress: d.boolean(),
77
+ completionRequirements: d.array(nt).optional(),
78
+ progress: on.optional(),
79
+ extensions: d.record(d.unknown()).optional()
80
+ }), rt = d.object({
81
+ hasNextPage: d.boolean(),
82
+ endCursor: d.string().nullable()
80
83
  }).refine((e) => !e.hasNextPage || e.endCursor !== null, {
81
84
  message: 'hasNextPage is true but endCursor is null: there is another page and no cursor to ask for it with, which renders a "Load more" that can never load.',
82
85
  path: ["endCursor"]
83
- }), Zt = g.object({
84
- modules: g.array(Xt),
85
- pageInfo: Ve
86
- }), Jt = g.object({
87
- items: g.array(He),
88
- pageInfo: Ve
89
- }), Xe = "career.estimatedDurationMinutes";
90
- function en(e) {
86
+ }), an = d.object({
87
+ modules: d.array(ln),
88
+ pageInfo: rt
89
+ }), un = d.object({
90
+ items: d.array(st),
91
+ pageInfo: rt
92
+ }), ot = "career.estimatedDurationMinutes";
93
+ function cn(e) {
91
94
  var n;
92
- const t = (n = e.extensions) == null ? void 0 : n[Xe];
95
+ const t = (n = e.extensions) == null ? void 0 : n[ot];
93
96
  return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
94
97
  }
95
- function Ze(e, t) {
96
- return t == null ? e : { ...e, [Xe]: t };
98
+ function it(e, t) {
99
+ return t == null ? e : { ...e, [ot]: t };
97
100
  }
98
- const pe = 100, Me = 2e3;
99
- class tn extends Error {
101
+ const Se = 100, we = 2e3;
102
+ class dn extends Error {
100
103
  constructor(t, n) {
101
104
  super(
102
105
  `This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
103
106
  ), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
104
107
  }
105
108
  }
106
- const nn = (e) => `offset:${e}`, sn = (e) => {
109
+ const mn = (e) => `offset:${e}`, gn = (e) => {
107
110
  if (!e) return 0;
108
111
  const t = Number.parseInt(e.replace("offset:", ""), 10);
109
112
  return Number.isFinite(t) && t >= 0 ? t : 0;
110
- }, Pe = (e) => {
113
+ }, Ce = (e) => {
111
114
  if (e != null && e.aborted)
112
115
  throw new DOMException("The operation was aborted.", "AbortError");
113
116
  };
114
- function xe(e, t, n) {
115
- const s = sn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
117
+ function Le(e, t, n) {
118
+ const s = gn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
116
119
  return {
117
120
  slice: r,
118
- pageInfo: { hasNextPage: u, endCursor: u ? nn(i) : null }
121
+ pageInfo: { hasNextPage: u, endCursor: u ? mn(i) : null }
119
122
  };
120
123
  }
121
- function er(e, t = {}) {
124
+ function Qo(e, t = {}) {
122
125
  const n = (r) => e.itemsByModuleId[r] ?? [], s = (r) => {
123
126
  if (r !== e.courseId)
124
- throw new tn(e.courseId, r);
127
+ throw new dn(e.courseId, r);
125
128
  };
126
129
  return {
127
130
  async listModules({
@@ -129,15 +132,15 @@ function er(e, t = {}) {
129
132
  cursor: i,
130
133
  pageSize: u,
131
134
  includeItems: a,
132
- inlineItemsFirst: d,
133
- signal: c
135
+ inlineItemsFirst: c,
136
+ signal: g
134
137
  }) {
135
- var h;
136
- Pe(c), s(r), (h = t.onRequest) == null || h.call(t, "listModules", { operation: "listModules", courseId: r });
137
- const { slice: l, pageInfo: m } = xe(e.modules, i, u), M = Math.min(d ?? pe, pe);
138
- return { modules: l.map((f) => {
139
- const w = n(f.id), v = a && w.length <= M;
140
- return { ...f, itemCount: w.length, items: v ? w : void 0 };
138
+ var f;
139
+ Ce(g), s(r), (f = t.onRequest) == null || f.call(t, "listModules", { operation: "listModules", courseId: r });
140
+ const { slice: l, pageInfo: m } = Le(e.modules, i, u), M = Math.min(c ?? Se, Se);
141
+ return { modules: l.map((h) => {
142
+ const P = n(h.id), C = a && P.length <= M;
143
+ return { ...h, itemCount: P.length, items: C ? P : void 0 };
141
144
  }), pageInfo: m };
142
145
  },
143
146
  async listModuleItems({
@@ -145,16 +148,16 @@ function er(e, t = {}) {
145
148
  moduleId: i,
146
149
  cursor: u,
147
150
  pageSize: a,
148
- signal: d
151
+ signal: c
149
152
  }) {
150
153
  var m;
151
- Pe(d), s(r), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: i });
152
- const { slice: c, pageInfo: l } = xe(n(i), u, a);
153
- return { items: c, pageInfo: l };
154
+ Ce(c), s(r), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: i });
155
+ const { slice: g, pageInfo: l } = Le(n(i), u, a);
156
+ return { items: g, pageInfo: l };
154
157
  }
155
158
  };
156
159
  }
157
- class Je extends Error {
160
+ class lt extends Error {
158
161
  constructor(t, n, s) {
159
162
  const r = t === "module" ? "module" : "module item";
160
163
  super(
@@ -162,11 +165,11 @@ class Je extends Error {
162
165
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
163
166
  }
164
167
  }
165
- function et(e, t, n) {
168
+ function at(e, t, n) {
166
169
  if (e != null) return e;
167
- throw new Je(t, n, "published");
170
+ throw new lt(t, n, "published");
168
171
  }
169
- function rn(e, t) {
172
+ function fn(e, t) {
170
173
  if (e.onUnsupportedItem) {
171
174
  e.onUnsupportedItem(t);
172
175
  return;
@@ -175,7 +178,7 @@ function rn(e, t) {
175
178
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
176
179
  );
177
180
  }
178
- const on = {
181
+ const hn = {
179
182
  Assignment: "assignment",
180
183
  Quiz: "quiz",
181
184
  Discussion: "discussion",
@@ -193,21 +196,21 @@ const on = {
193
196
  // for no better reason than not being listed.
194
197
  PeerReviewSubAssignment: "assignment"
195
198
  };
196
- function ln(e) {
199
+ function pn(e) {
197
200
  const t = e == null ? void 0 : e.__typename;
198
201
  if (!t) return null;
199
- const n = on[t];
202
+ const n = hn[t];
200
203
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
201
204
  }
202
- const an = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
203
- function un(e) {
205
+ const In = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
206
+ function bn(e) {
204
207
  if (!e) return null;
205
- const t = an.exec(e);
208
+ const t = In.exec(e);
206
209
  if (!t) return null;
207
210
  const [, n, s, r, i, u] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(i ?? 0) + Number(u ?? 0) / 60;
208
211
  return Math.round(a);
209
212
  }
210
- const dn = /* @__PURE__ */ new Set([
213
+ const Mn = /* @__PURE__ */ new Set([
211
214
  "must_view",
212
215
  "must_mark_done",
213
216
  "must_contribute",
@@ -215,31 +218,31 @@ const dn = /* @__PURE__ */ new Set([
215
218
  "min_score",
216
219
  "min_percentage"
217
220
  ]);
218
- function cn(e) {
219
- return dn.has(e) ? e : "unknown";
221
+ function Sn(e) {
222
+ return Mn.has(e) ? e : "unknown";
220
223
  }
221
- function mn(e) {
224
+ function yn(e) {
222
225
  return {
223
226
  itemId: String(e.id),
224
- type: cn(e.type),
227
+ type: Sn(e.type),
225
228
  minScore: e.minScore ?? null,
226
229
  minPercentage: e.minPercentage ?? null
227
230
  };
228
231
  }
229
- function tt(e) {
232
+ function ut(e) {
230
233
  return {
231
234
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
232
235
  endCursor: (e == null ? void 0 : e.endCursor) ?? null
233
236
  };
234
237
  }
235
- const gn = /* @__PURE__ */ new Set(["graded"]), hn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), fn = /* @__PURE__ */ new Set(["graded", "excused"]);
236
- function nt(e) {
238
+ const _n = /* @__PURE__ */ new Set(["graded"]), Tn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), wn = /* @__PURE__ */ new Set(["graded", "excused"]);
239
+ function ct(e) {
237
240
  var t;
238
241
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
239
242
  if (n) return n;
240
243
  return null;
241
244
  }
242
- function st(e, t) {
245
+ function dt(e, t) {
243
246
  if (!e) return;
244
247
  const n = new Map(t.map((r) => [r.itemId, r.type])), s = /* @__PURE__ */ new Set();
245
248
  for (const r of e.requirementsMet ?? []) {
@@ -255,48 +258,48 @@ function st(e, t) {
255
258
  requirementsMetItemIds: s
256
259
  };
257
260
  }
258
- function pn(e, t, n) {
261
+ function Pn(e, t, n) {
259
262
  if (n.locked) return "locked";
260
- const s = nt(e);
263
+ const s = ct(e);
261
264
  if (s) {
262
265
  if (s.missing === !0) return "missing";
263
- if (gn.has(s.state ?? "") || fn.has(s.gradingStatus ?? ""))
266
+ if (_n.has(s.state ?? "") || wn.has(s.gradingStatus ?? ""))
264
267
  return "graded";
265
- if (s.submittedAt != null || hn.has(s.state ?? ""))
268
+ if (s.submittedAt != null || Tn.has(s.state ?? ""))
266
269
  return "submitted";
267
270
  if ((s.attempt ?? 0) > 0) return "in_progress";
268
271
  }
269
272
  return n.requirementsMetItemIds.has(t) ? "in_progress" : "not_started";
270
273
  }
271
- const In = (e) => e.pointsPossible != null;
272
- function bn(e, t, n, s) {
274
+ const En = (e) => e.pointsPossible != null;
275
+ function xn(e, t, n, s) {
273
276
  if (e.locked) return "locked";
274
277
  if (t > 0 && !e.completed) return "missing";
275
278
  if (e.completed) {
276
- const r = (s ?? []).filter(In);
279
+ const r = (s ?? []).filter(En);
277
280
  return r.length > 0 && r.every((u) => u.status === "graded") ? "all_graded" : "all_submitted";
278
281
  }
279
282
  return e.started || n > 0 ? "in_progress" : "not_started";
280
283
  }
281
- function Mn(e, t, n, s) {
282
- var a, d;
284
+ function Cn(e, t, n, s) {
285
+ var a, c;
283
286
  if (!n) return;
284
287
  const r = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, r), u = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0;
285
288
  return {
286
- status: bn(n, u, i, s),
289
+ status: xn(n, u, i, s),
287
290
  requirementsMet: i,
288
291
  requirementCount: r,
289
292
  percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
290
- latestDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.latestDueAt) ?? null,
293
+ latestDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.latestDueAt) ?? null,
291
294
  missingCount: u
292
295
  };
293
296
  }
294
- function _n(e, t, n, s = {}, r) {
295
- var d, c, l;
296
- const i = String(e._id), u = ln(e.content);
297
+ function Ln(e, t, n, s = {}, r) {
298
+ var c, g, l;
299
+ const i = String(e._id), u = pn(e.content);
297
300
  if (!u)
298
- return rn(s, { id: i, typename: ((d = e.content) == null ? void 0 : d.__typename) ?? null }), null;
299
- const a = nt(e.content);
301
+ return fn(s, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
302
+ const a = ct(e.content);
300
303
  return {
301
304
  id: i,
302
305
  moduleId: t,
@@ -304,25 +307,26 @@ function _n(e, t, n, s = {}, r) {
304
307
  type: u,
305
308
  position: e.position ?? 0,
306
309
  indent: e.indent ?? 0,
307
- published: et(e.published, "moduleItem", i),
310
+ published: at(e.published, "moduleItem", i),
308
311
  url: e.url ?? null,
312
+ newTab: e.newTab ?? !1,
309
313
  completionRequirement: n.get(i) ?? null,
310
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((c = e.content) == null ? void 0 : c.dueAt) ?? null,
311
- status: r ? pn(e.content, i, r) : void 0,
314
+ dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
315
+ status: r ? Pn(e.content, i, r) : void 0,
312
316
  pointsPossible: ((l = e.content) == null ? void 0 : l.pointsPossible) ?? null,
313
317
  // Career-only, so it rides in `extensions` rather than widening the shared
314
318
  // model. Absent entirely for a Canvas LMS item, which is every item here.
315
- extensions: Ze(
319
+ extensions: it(
316
320
  void 0,
317
- un(e.estimatedDuration)
321
+ bn(e.estimatedDuration)
318
322
  )
319
323
  };
320
324
  }
321
- function rt(e, t, n, s, r) {
325
+ function mt(e, t, n, s, r) {
322
326
  const i = [];
323
327
  for (const u of e ?? []) {
324
328
  if (!u) continue;
325
- const a = _n(
329
+ const a = Ln(
326
330
  u,
327
331
  t,
328
332
  n,
@@ -333,52 +337,52 @@ function rt(e, t, n, s, r) {
333
337
  }
334
338
  return i;
335
339
  }
336
- function ot(e) {
340
+ function gt(e) {
337
341
  const t = [], n = /* @__PURE__ */ new Map();
338
342
  for (const s of e ?? []) {
339
343
  if (!s) continue;
340
- const r = mn(s);
344
+ const r = yn(s);
341
345
  t.push(r), n.set(r.itemId, r);
342
346
  }
343
347
  return { list: t, byItemId: n };
344
348
  }
345
- function Sn(e, t = {}) {
346
- var c;
349
+ function An(e, t = {}) {
350
+ var g;
347
351
  const n = String(e._id);
348
352
  if (e.moduleItemsTotalCount == null)
349
- throw new Je("module", n, "moduleItemsTotalCount");
350
- const { list: s, byItemId: r } = ot(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((c = i.pageInfo) != null && c.hasNextPage), a = st(e.progression, s), d = u ? rt(i.nodes, n, r, t, a) : void 0;
353
+ throw new lt("module", n, "moduleItemsTotalCount");
354
+ const { list: s, byItemId: r } = gt(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((g = i.pageInfo) != null && g.hasNextPage), a = dt(e.progression, s), c = u ? mt(i.nodes, n, r, t, a) : void 0;
351
355
  return {
352
356
  id: n,
353
357
  name: e.name ?? "",
354
358
  position: e.position ?? 0,
355
- published: et(e.published, "module", n),
359
+ published: at(e.published, "module", n),
356
360
  itemCount: e.moduleItemsTotalCount,
357
- items: d,
361
+ items: c,
358
362
  unlockAt: e.unlockAt ?? null,
359
363
  prerequisiteModuleIds: (e.prerequisites ?? []).filter((l) => l != null).map((l) => String(l.id)),
360
364
  requirementCount: e.requirementCount ?? null,
361
365
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
362
366
  completionRequirements: s,
363
367
  // Derived after the items so `all_graded` can see them when they are inline.
364
- progress: Mn(e, s, a, d)
368
+ progress: Cn(e, s, a, c)
365
369
  };
366
370
  }
367
- function yn(e, t = {}) {
371
+ function vn(e, t = {}) {
368
372
  var r;
369
373
  const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, s = [];
370
374
  for (const i of (n == null ? void 0 : n.nodes) ?? [])
371
- i && s.push(Sn(i, t));
372
- return { modules: s, pageInfo: tt(n == null ? void 0 : n.pageInfo) };
375
+ i && s.push(An(i, t));
376
+ return { modules: s, pageInfo: ut(n == null ? void 0 : n.pageInfo) };
373
377
  }
374
- function Pn(e, t, n = {}) {
375
- const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = ot(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = st(s == null ? void 0 : s.progression, r);
378
+ function Nn(e, t, n = {}) {
379
+ const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = gt(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = dt(s == null ? void 0 : s.progression, r);
376
380
  return {
377
- items: rt(u == null ? void 0 : u.nodes, t, i, n, a),
378
- pageInfo: tt(u == null ? void 0 : u.pageInfo)
381
+ items: mt(u == null ? void 0 : u.nodes, t, i, n, a),
382
+ pageInfo: ut(u == null ? void 0 : u.pageInfo)
379
383
  };
380
384
  }
381
- const xn = ee`
385
+ const Dn = ee`
382
386
  fragment PlatformModulesSubmissionFields on Submission {
383
387
  _id
384
388
  state
@@ -388,11 +392,12 @@ const xn = ee`
388
392
  missing
389
393
  cachedDueDate
390
394
  }
391
- `, it = ee`
395
+ `, ft = ee`
392
396
  fragment PlatformModulesItemFields on ModuleItem {
393
397
  _id
394
398
  title
395
399
  url
400
+ newTab
396
401
  position
397
402
  indent
398
403
  published
@@ -434,8 +439,8 @@ const xn = ee`
434
439
  }
435
440
  }
436
441
  }
437
- ${xn}
438
- `, lt = ee`
442
+ ${Dn}
443
+ `, ht = ee`
439
444
  fragment PlatformModulesProgressionFields on ModuleProgression {
440
445
  workflowState
441
446
  completed
@@ -448,7 +453,7 @@ const xn = ee`
448
453
  minPercentage
449
454
  }
450
455
  }
451
- `, wn = ee`
456
+ `, kn = ee`
452
457
  query PlatformModulesGetModules(
453
458
  $courseId: ID!
454
459
  $first: Int!
@@ -504,9 +509,9 @@ const xn = ee`
504
509
  }
505
510
  }
506
511
  }
507
- ${it}
508
- ${lt}
509
- `, En = ee`
512
+ ${ft}
513
+ ${ht}
514
+ `, qn = ee`
510
515
  query PlatformModulesGetModuleItems(
511
516
  $moduleId: ID!
512
517
  $first: Int!
@@ -537,25 +542,25 @@ const xn = ee`
537
542
  }
538
543
  }
539
544
  }
540
- ${it}
541
- ${lt}
545
+ ${ft}
546
+ ${ht}
542
547
  `;
543
- function at() {
548
+ function pt() {
544
549
  return new DOMException("The operation was aborted.", "AbortError");
545
550
  }
546
- function le(e) {
547
- if (e != null && e.aborted) throw at();
551
+ function ue(e) {
552
+ if (e != null && e.aborted) throw pt();
548
553
  }
549
- function we(e, t) {
554
+ function Ae(e, t) {
550
555
  return t ? new Promise((n, s) => {
551
- const r = () => s(at());
556
+ const r = () => s(pt());
552
557
  t.addEventListener("abort", r, { once: !0 }), e.then(n, s).finally(() => t.removeEventListener("abort", r));
553
558
  }) : e;
554
559
  }
555
- function tr({
560
+ function Ho({
556
561
  executeQuery: e,
557
- inlineItemLimit: t = pe,
558
- nodeBudget: n = Me,
562
+ inlineItemLimit: t = Se,
563
+ nodeBudget: n = we,
559
564
  onUnsupportedItem: s,
560
565
  studentId: r,
561
566
  validate: i = !0
@@ -566,71 +571,148 @@ function tr({
566
571
  // limit rather than assuming one. @see ModulesDataAdapter.inlineNodeBudget
567
572
  inlineNodeBudget: n,
568
573
  async listModules({
569
- courseId: d,
570
- cursor: c,
574
+ courseId: c,
575
+ cursor: g,
571
576
  pageSize: l,
572
577
  includeItems: m,
573
578
  inlineItemsFirst: M,
574
- inlineFirst: _,
575
- signal: h
579
+ inlineFirst: p,
580
+ signal: f
576
581
  }) {
577
- le(h);
578
- const f = m ? Math.min(_ ?? l, l) : l, w = Math.min(M ?? t, t), v = Math.max(1, Math.min(w, Math.floor(n / f))), A = await we(
579
- e(wn, {
580
- courseId: d,
581
- first: f,
582
+ ue(f);
583
+ const h = m ? Math.min(p ?? l, l) : l, P = Math.min(M ?? t, t), C = Math.max(1, Math.min(P, Math.floor(n / h))), v = await Ae(
584
+ e(kn, {
585
+ courseId: c,
586
+ first: h,
582
587
  // Pass through what the caller was given; never derive an offset.
583
- after: c ?? null,
588
+ after: g ?? null,
584
589
  includeItems: m,
585
- itemsFirst: v,
590
+ itemsFirst: C,
586
591
  includeSubmissions: a,
587
592
  studentId: r ?? null
588
593
  }),
589
- h
594
+ f
590
595
  );
591
- le(h);
592
- const N = yn(A, u);
593
- return i ? Zt.parse(N) : N;
596
+ ue(f);
597
+ const A = vn(v, u);
598
+ return i ? an.parse(A) : A;
594
599
  },
595
600
  async listModuleItems({
596
- moduleId: d,
597
- cursor: c,
601
+ moduleId: c,
602
+ cursor: g,
598
603
  pageSize: l,
599
604
  signal: m
600
605
  }) {
601
- le(m);
602
- const M = await we(
603
- e(En, {
604
- moduleId: d,
606
+ ue(m);
607
+ const M = await Ae(
608
+ e(qn, {
609
+ moduleId: c,
605
610
  first: l,
606
- after: c ?? null,
611
+ after: g ?? null,
607
612
  includeSubmissions: a,
608
613
  studentId: r ?? null
609
614
  }),
610
615
  m
611
616
  );
612
- le(m);
613
- const _ = Pn(M, d, u);
614
- return i ? Jt.parse(_) : _;
617
+ ue(m);
618
+ const p = Nn(M, c, u);
619
+ return i ? un.parse(p) : p;
615
620
  }
616
621
  };
617
622
  }
618
- const _e = 100, ut = 100, dt = 100, Cn = 4, ce = 5 * 60 * 1e3, ct = 20, de = { hasNextPage: !1, endCursor: null }, W = ["platform-modules"], te = {
619
- all: W,
620
- course: (e) => [...W, e],
621
- list: (e, t = {}) => [...W, e, "list", t],
622
- items: (e, t, n = {}) => [...W, e, "module", t, "items", n]
623
+ const he = {
624
+ formatters: {},
625
+ itemTypes: {},
626
+ itemStatuses: {},
627
+ itemMeta: {},
628
+ filters: {},
629
+ moduleActions: {},
630
+ itemActions: {},
631
+ navigation: {}
623
632
  };
624
- function vn(e) {
625
- return [...W, e, "list"];
633
+ Object.freeze(he);
634
+ for (const e of Object.values(he))
635
+ Object.freeze(e);
636
+ const It = Be(null);
637
+ function Ko({ value: e, children: t }) {
638
+ return /* @__PURE__ */ o(It.Provider, { value: e, children: t });
639
+ }
640
+ function Vo() {
641
+ return Ge(It) ?? he;
642
+ }
643
+ const ye = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
644
+ function ge(e, t) {
645
+ const n = Object.entries(t ?? {}).filter(([, s]) => s !== void 0);
646
+ return { ...e, ...Object.fromEntries(n) };
647
+ }
648
+ function Y(e, t = {}) {
649
+ const n = Object.keys(e).map((r) => [
650
+ r,
651
+ ge(e[r], ye(t, r) ? t[r] : void 0)
652
+ ]), s = Object.keys(t).filter((r) => !ye(e, r)).sort().map((r) => [r, ge({}, t[r])]);
653
+ return Object.fromEntries([...n, ...s]);
654
+ }
655
+ function Zo(e) {
656
+ return Object.keys(e).filter((t) => !e[t].hidden).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
657
+ }
658
+ const Rn = d.object({
659
+ /** Resolved through `t` at render. */
660
+ label: d.string(),
661
+ /** Sort position, ascending. The base spaces its values (10, 20, 30…) so a host can insert between two built-ins. */
662
+ order: d.number(),
663
+ /** How a host removes an entry. Stays in the resolved registry; `visibleEntries` filters it at read time. */
664
+ hidden: d.boolean().optional()
665
+ });
666
+ function Fn(e) {
667
+ return d.record(d.string(), e);
668
+ }
669
+ const W = Fn(Rn.strict()), zn = d.object({
670
+ formatters: d.object({}).strict(),
671
+ itemTypes: W,
672
+ itemStatuses: W,
673
+ itemMeta: W,
674
+ filters: W,
675
+ moduleActions: W,
676
+ itemActions: W,
677
+ navigation: d.object({}).strict()
678
+ });
679
+ function Un(e, t = {}) {
680
+ const n = Object.keys(t).filter((r) => !ye(e, r));
681
+ if (n.length > 0)
682
+ throw new Error(
683
+ `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
684
+ );
685
+ const s = {
686
+ formatters: ge(e.formatters, t.formatters),
687
+ itemTypes: Y(e.itemTypes, t.itemTypes),
688
+ itemStatuses: Y(e.itemStatuses, t.itemStatuses),
689
+ itemMeta: Y(e.itemMeta, t.itemMeta),
690
+ filters: Y(e.filters, t.filters),
691
+ moduleActions: Y(e.moduleActions, t.moduleActions),
692
+ itemActions: Y(e.itemActions, t.itemActions),
693
+ navigation: ge(e.navigation, t.navigation)
694
+ };
695
+ return zn.parse(s), s;
626
696
  }
627
- function mt(e, t) {
628
- return [...W, e, "module", t, "items"];
697
+ function Xo(e = {}) {
698
+ return Un(he, e);
629
699
  }
630
- function gt(e) {
700
+ const Pe = 100, bt = 100, Mt = 100, On = 4, pe = 5 * 60 * 1e3, St = 20, fe = { hasNextPage: !1, endCursor: null }, Q = ["platform-modules"], te = {
701
+ all: Q,
702
+ course: (e) => [...Q, e],
703
+ list: (e, t = {}) => [...Q, e, "list", t],
704
+ items: (e, t, n = {}) => [...Q, e, "module", t, "items", n]
705
+ };
706
+ function $n(e) {
707
+ return [...Q, e, "list"];
708
+ }
709
+ function yt(e, t) {
710
+ return [...Q, e, "module", t, "items"];
711
+ }
712
+ function _t(e) {
631
713
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
632
714
  }
633
- function ht(e) {
715
+ function Tt(e) {
634
716
  const {
635
717
  courseId: t,
636
718
  adapter: n,
@@ -639,8 +721,8 @@ function ht(e) {
639
721
  inlineItemsFirst: i,
640
722
  inlineFirst: u,
641
723
  view: a,
642
- staleTime: d,
643
- enabled: c
724
+ staleTime: c,
725
+ enabled: g
644
726
  } = e;
645
727
  return {
646
728
  // `inlineItemsFirst` is deliberately NOT in the key. It is derived from the
@@ -657,47 +739,47 @@ function ht(e) {
657
739
  inlineFirst: u,
658
740
  signal: m
659
741
  }),
660
- getNextPageParam: gt,
661
- enabled: c,
662
- staleTime: d,
742
+ getNextPageParam: _t,
743
+ enabled: g,
744
+ staleTime: c,
663
745
  // A refetch of an infinite query re-walks every page it has loaded. Doing
664
746
  // that because someone alt-tabbed is the Canvas behaviour we are replacing.
665
747
  refetchOnWindowFocus: !1
666
748
  };
667
749
  }
668
- function ft(e) {
669
- const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: d } = e;
750
+ function wt(e) {
751
+ const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: c } = e;
670
752
  return {
671
753
  queryKey: te.items(t, n, { view: i, pageSize: r }),
672
754
  initialPageParam: null,
673
- queryFn: ({ pageParam: c, signal: l }) => {
674
- const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: r, signal: l });
675
- return d ? d(() => {
755
+ queryFn: ({ pageParam: g, signal: l }) => {
756
+ const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: l });
757
+ return c ? c(() => {
676
758
  if (l.aborted)
677
759
  throw new DOMException("The operation was aborted.", "AbortError");
678
760
  return m();
679
761
  }) : m();
680
762
  },
681
- getNextPageParam: gt,
763
+ getNextPageParam: _t,
682
764
  enabled: a,
683
765
  staleTime: u,
684
766
  refetchOnWindowFocus: !1
685
767
  };
686
768
  }
687
- function Tn(e) {
688
- var w;
769
+ function Bn(e) {
770
+ var P;
689
771
  const {
690
772
  courseId: t,
691
773
  adapter: n,
692
- pageSize: s = _e,
774
+ pageSize: s = Pe,
693
775
  includeItems: r = !1,
694
776
  inlineItemsFirst: i,
695
777
  inlineFirst: u,
696
778
  view: a,
697
- staleTime: d = ce,
698
- enabled: c = !0
699
- } = e, l = be(
700
- ht({
779
+ staleTime: c = pe,
780
+ enabled: g = !0
781
+ } = e, l = Te(
782
+ Tt({
701
783
  courseId: t,
702
784
  adapter: n,
703
785
  pageSize: s,
@@ -705,36 +787,36 @@ function Tn(e) {
705
787
  inlineItemsFirst: i,
706
788
  inlineFirst: u,
707
789
  view: a,
708
- staleTime: d,
709
- enabled: c
790
+ staleTime: c,
791
+ enabled: g
710
792
  })
711
- ), m = (w = l.data) == null ? void 0 : w.pages, M = L(() => (m ?? []).flatMap((v) => v.modules), [m]), _ = m && m.length > 0 ? m[m.length - 1].pageInfo : de, h = l.fetchNextPage, f = D(() => {
712
- h();
713
- }, [h]);
793
+ ), m = (P = l.data) == null ? void 0 : P.pages, M = N(() => (m ?? []).flatMap((C) => C.modules), [m]), p = m && m.length > 0 ? m[m.length - 1].pageInfo : fe, f = l.fetchNextPage, h = D(() => {
794
+ f();
795
+ }, [f]);
714
796
  return {
715
797
  modules: M,
716
- pageInfo: _,
717
- hasNextPage: _.hasNextPage,
718
- fetchNextPage: f,
798
+ pageInfo: p,
799
+ hasNextPage: p.hasNextPage,
800
+ fetchNextPage: h,
719
801
  isLoading: l.isLoading,
720
802
  isFetchingNextPage: l.isFetchingNextPage,
721
803
  isPending: l.isPending,
722
804
  error: l.error
723
805
  };
724
806
  }
725
- function nr(e) {
726
- var f;
807
+ function Jo(e) {
808
+ var h;
727
809
  const {
728
810
  courseId: t,
729
811
  moduleId: n,
730
812
  adapter: s,
731
- pageSize: r = ut,
813
+ pageSize: r = bt,
732
814
  view: i,
733
815
  enabled: u = !0,
734
- staleTime: a = ce,
735
- limit: d
736
- } = e, c = be(
737
- ft({
816
+ staleTime: a = pe,
817
+ limit: c
818
+ } = e, g = Te(
819
+ wt({
738
820
  courseId: t,
739
821
  moduleId: n,
740
822
  adapter: s,
@@ -742,22 +824,22 @@ function nr(e) {
742
824
  view: i,
743
825
  staleTime: a,
744
826
  enabled: u,
745
- limit: d
827
+ limit: c
746
828
  })
747
- ), l = (f = c.data) == null ? void 0 : f.pages, m = L(() => (l ?? []).flatMap((w) => w.items), [l]), M = l && l.length > 0 ? l[l.length - 1].pageInfo : de, _ = c.fetchNextPage, h = D(() => {
748
- _();
749
- }, [_]);
829
+ ), l = (h = g.data) == null ? void 0 : h.pages, m = N(() => (l ?? []).flatMap((P) => P.items), [l]), M = l && l.length > 0 ? l[l.length - 1].pageInfo : fe, p = g.fetchNextPage, f = D(() => {
830
+ p();
831
+ }, [p]);
750
832
  return {
751
833
  items: m,
752
834
  pageInfo: M,
753
835
  hasNextPage: M.hasNextPage,
754
- fetchNextPage: h,
755
- isLoading: c.isLoading,
756
- isFetchingNextPage: c.isFetchingNextPage,
757
- error: c.error
836
+ fetchNextPage: f,
837
+ isLoading: g.isLoading,
838
+ isFetchingNextPage: g.isFetchingNextPage,
839
+ error: g.error
758
840
  };
759
841
  }
760
- function Nn(e, t, n = Me) {
842
+ function Gn(e, t, n = we) {
761
843
  if (e.pageInfo.hasNextPage) return "onDemand";
762
844
  let s = 0, r = 0;
763
845
  for (const i of e.modules) {
@@ -766,29 +848,29 @@ function Nn(e, t, n = Me) {
766
848
  }
767
849
  return s > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
768
850
  }
769
- function An(e) {
851
+ function jn(e) {
770
852
  var M;
771
853
  const {
772
854
  courseId: t,
773
855
  adapter: n,
774
856
  mode: s = "auto",
775
- inlineThreshold: r = dt,
776
- nodeBudget: i = n.inlineNodeBudget ?? Me,
777
- pageSize: u = _e,
857
+ inlineThreshold: r = Mt,
858
+ nodeBudget: i = n.inlineNodeBudget ?? we,
859
+ pageSize: u = Pe,
778
860
  view: a,
779
- staleTime: d = ce
780
- } = e, c = s === "auto", l = be(
781
- ht({
861
+ staleTime: c = pe
862
+ } = e, g = s === "auto", l = Te(
863
+ Tt({
782
864
  courseId: t,
783
865
  adapter: n,
784
866
  pageSize: u,
785
867
  includeItems: !1,
786
868
  view: a,
787
- staleTime: d,
788
- enabled: c
869
+ staleTime: c,
870
+ enabled: g
789
871
  })
790
872
  );
791
- if (!c)
873
+ if (!g)
792
874
  return {
793
875
  resolvedMode: s,
794
876
  isResolving: !1,
@@ -806,85 +888,85 @@ function An(e) {
806
888
  };
807
889
  const m = (M = l.data) == null ? void 0 : M.pages[0];
808
890
  return m ? {
809
- resolvedMode: Nn(m, r, i),
891
+ resolvedMode: Gn(m, r, i),
810
892
  isResolving: !1,
811
893
  probed: !0,
812
894
  error: null,
813
- inlineShape: Ln(m)
895
+ inlineShape: Yn(m)
814
896
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
815
897
  }
816
- function Ln(e) {
898
+ function Yn(e) {
817
899
  let t = 1;
818
900
  for (const n of e.modules)
819
901
  n.itemCount > t && (t = n.itemCount);
820
902
  return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
821
903
  }
822
- const Ee = "\0", Dn = /* @__PURE__ */ new Map();
823
- function Rn(e, t, n = ct) {
824
- const s = Fe(), r = B(/* @__PURE__ */ new Map()), [i, u] = X(Dn), a = e.join(Ee), d = L(() => a === "" ? [] : a.split(Ee), [a]);
825
- ae(() => {
904
+ const ve = "\0", Wn = /* @__PURE__ */ new Map();
905
+ function Qn(e, t, n = St) {
906
+ const s = We(), r = $(/* @__PURE__ */ new Map()), [i, u] = Z(Wn), a = e.join(ve), c = N(() => a === "" ? [] : a.split(ve), [a]);
907
+ de(() => {
826
908
  const l = r.current, m = () => {
827
- u((h) => {
828
- const f = /* @__PURE__ */ new Map();
829
- let w = h.size !== l.size;
830
- for (const [v, A] of l) {
831
- const N = A.getCurrentResult();
832
- f.set(v, N), !w && h.get(v) !== N && (w = !0);
909
+ u((f) => {
910
+ const h = /* @__PURE__ */ new Map();
911
+ let P = f.size !== l.size;
912
+ for (const [C, v] of l) {
913
+ const A = v.getCurrentResult();
914
+ h.set(C, A), !P && f.get(C) !== A && (P = !0);
833
915
  }
834
- return w ? f : h;
916
+ return P ? h : f;
835
917
  });
836
- }, M = new Set(d);
837
- for (const h of d) {
838
- if (l.has(h)) continue;
839
- const f = new Ct(
918
+ }, M = new Set(c);
919
+ for (const f of c) {
920
+ if (l.has(f)) continue;
921
+ const h = new Rt(
840
922
  s,
841
- t(h, !0)
923
+ t(f, !0)
842
924
  );
843
- l.set(h, f), f.subscribe(m);
925
+ l.set(f, h), h.subscribe(m);
844
926
  }
845
- for (const [h, f] of l)
846
- f.setOptions(t(h, M.has(h)));
847
- for (const h of d) {
848
- const f = l.get(h);
849
- f && (l.delete(h), l.set(h, f));
927
+ for (const [f, h] of l)
928
+ h.setOptions(t(f, M.has(f)));
929
+ for (const f of c) {
930
+ const h = l.get(f);
931
+ h && (l.delete(f), l.set(f, h));
850
932
  }
851
- let _ = l.size - M.size;
852
- if (_ > n)
853
- for (const [h, f] of l) {
854
- if (_ <= n) break;
855
- M.has(h) || (f.destroy(), l.delete(h), _ -= 1);
933
+ let p = l.size - M.size;
934
+ if (p > n)
935
+ for (const [f, h] of l) {
936
+ if (p <= n) break;
937
+ M.has(f) || (h.destroy(), l.delete(f), p -= 1);
856
938
  }
857
939
  m();
858
- }, [s, t, d, n]), ae(() => {
940
+ }, [s, t, c, n]), de(() => {
859
941
  const l = r.current;
860
942
  return () => {
861
943
  for (const m of l.values()) m.destroy();
862
944
  l.clear();
863
945
  };
864
946
  }, []);
865
- const c = D((l) => {
947
+ const g = D((l) => {
866
948
  var m;
867
949
  (m = r.current.get(l)) == null || m.fetchNextPage();
868
950
  }, []);
869
- return { results: i, fetchNextPage: c };
951
+ return { results: i, fetchNextPage: g };
870
952
  }
871
- const qn = [], Fn = () => {
953
+ const Hn = [], Kn = () => {
872
954
  };
873
- function sr(e) {
874
- var Q, oe;
955
+ function ei(e) {
956
+ var G, le;
875
957
  const {
876
958
  courseId: t,
877
959
  adapter: n,
878
960
  view: s,
879
961
  itemsMode: r = "auto",
880
- inlineThreshold: i = dt,
881
- pageSize: u = _e,
882
- itemPageSize: a = ut,
883
- itemConcurrency: d = Cn,
884
- retainCollapsedLimit: c = ct,
885
- staleTime: l = ce,
962
+ inlineThreshold: i = Mt,
963
+ pageSize: u = Pe,
964
+ itemPageSize: a = bt,
965
+ itemConcurrency: c = On,
966
+ retainCollapsedLimit: g = St,
967
+ staleTime: l = pe,
886
968
  initialExpandedModuleIds: m
887
- } = e, M = Fe(), _ = An({
969
+ } = e, M = We(), p = jn({
888
970
  courseId: t,
889
971
  adapter: n,
890
972
  mode: r,
@@ -892,264 +974,363 @@ function sr(e) {
892
974
  pageSize: u,
893
975
  view: s,
894
976
  staleTime: l
895
- }), h = _.resolvedMode, f = Tn({
977
+ }), f = p.resolvedMode, h = Bn({
896
978
  courseId: t,
897
979
  adapter: n,
898
980
  pageSize: u,
899
981
  view: s,
900
982
  staleTime: l,
901
- includeItems: h === "inline",
983
+ includeItems: f === "inline",
902
984
  // Measured by the probe, not assumed. Canvas charges GraphQL complexity on
903
985
  // the requested shape, so asking for the ceiling rejects the query outright
904
986
  // even on a tiny course. @see UseItemsModeResult.inlineShape
905
- inlineItemsFirst: (Q = _.inlineShape) == null ? void 0 : Q.maxItemCount,
987
+ inlineItemsFirst: (G = p.inlineShape) == null ? void 0 : G.maxItemCount,
906
988
  // Both axes, not just one: the budget is charged on the product, so asking
907
989
  // for 100 modules when page 1 held 6 is what forces `inlineItemsFirst` down.
908
- inlineFirst: (oe = _.inlineShape) == null ? void 0 : oe.moduleCount,
909
- enabled: h !== null
910
- }), [w, v] = X(
990
+ inlineFirst: (le = p.inlineShape) == null ? void 0 : le.moduleCount,
991
+ enabled: f !== null
992
+ }), [P, C] = Z(
911
993
  () => m ?? []
912
- ), A = L(() => {
913
- const b = /* @__PURE__ */ new Map();
914
- for (const p of f.modules) b.set(p.id, p);
915
- return b;
916
- }, [f.modules]), N = L(
917
- () => w.filter((b) => {
918
- const p = A.get(b);
919
- return p !== void 0 && p.items === void 0;
994
+ ), v = N(() => {
995
+ const S = /* @__PURE__ */ new Map();
996
+ for (const I of h.modules) S.set(I.id, I);
997
+ return S;
998
+ }, [h.modules]), A = N(
999
+ () => P.filter((S) => {
1000
+ const I = v.get(S);
1001
+ return I !== void 0 && I.items === void 0;
920
1002
  }),
921
- [w, A]
922
- ), ne = L(() => new Set(N), [N]), E = L(() => Nt(d), [d]), z = D(
923
- (b, p) => ft({
1003
+ [P, v]
1004
+ ), se = N(() => new Set(A), [A]), re = N(() => Ft(c), [c]), E = D(
1005
+ (S, I) => wt({
924
1006
  courseId: t,
925
- moduleId: b,
1007
+ moduleId: S,
926
1008
  adapter: n,
927
1009
  pageSize: a,
928
1010
  view: s,
929
1011
  staleTime: l,
930
- enabled: p,
931
- limit: E
1012
+ enabled: I,
1013
+ limit: re
932
1014
  }),
933
- [t, n, a, s, l, E]
934
- ), G = Rn(N, z, c), K = G.fetchNextPage, q = B(/* @__PURE__ */ new Map()), H = D(
935
- (b) => {
936
- let p = q.current.get(b);
937
- return p || (p = () => K(b), q.current.set(b, p)), p;
1015
+ [t, n, a, s, l, re]
1016
+ ), F = Qn(A, E, g), H = F.fetchNextPage, q = $(/* @__PURE__ */ new Map()), K = D(
1017
+ (S) => {
1018
+ let I = q.current.get(S);
1019
+ return I || (I = () => H(S), q.current.set(S, I)), I;
938
1020
  },
939
- [K]
940
- ), O = D((b) => {
941
- v(
942
- (p) => p.includes(b) ? p : [...p, b]
1021
+ [H]
1022
+ ), z = D((S) => {
1023
+ C(
1024
+ (I) => I.includes(S) ? I : [...I, S]
943
1025
  );
944
- }, []), Y = D(
945
- (b) => {
946
- v((p) => p.filter((C) => C !== b)), M.cancelQueries({ queryKey: mt(t, b) });
1026
+ }, []), B = D(
1027
+ (S) => {
1028
+ C((I) => I.filter((x) => x !== S)), M.cancelQueries({ queryKey: yt(t, S) });
947
1029
  },
948
1030
  [M, t]
949
- ), V = B(w);
950
- V.current = w;
951
- const se = D(
952
- (b) => {
953
- V.current.includes(b) ? Y(b) : O(b);
1031
+ ), V = $(P);
1032
+ V.current = P;
1033
+ const oe = D(
1034
+ (S) => {
1035
+ V.current.includes(S) ? B(S) : z(S);
954
1036
  },
955
- [Y, O]
956
- ), U = G.results, re = B(/* @__PURE__ */ new Map()), $ = D(
957
- (b) => {
958
- var ye;
959
- const p = A.get(b), C = U.get(b), x = ne.has(b), T = re.current.get(b);
960
- if (T && T.items === (p == null ? void 0 : p.items) && T.result === C && T.active === x)
961
- return T.value;
962
- const j = (ie) => (re.current.set(b, { items: p == null ? void 0 : p.items, result: C, active: x, value: ie }), ie);
963
- if ((p == null ? void 0 : p.items) !== void 0)
1037
+ [B, z]
1038
+ ), U = F.results, ie = $(/* @__PURE__ */ new Map()), O = D(
1039
+ (S) => {
1040
+ var xe;
1041
+ const I = v.get(S), x = U.get(S), w = se.has(S), L = ie.current.get(S);
1042
+ if (L && L.items === (I == null ? void 0 : I.items) && L.result === x && L.active === w)
1043
+ return L.value;
1044
+ const j = (ae) => (ie.current.set(S, { items: I == null ? void 0 : I.items, result: x, active: w, value: ae }), ae);
1045
+ if ((I == null ? void 0 : I.items) !== void 0)
964
1046
  return j({
965
- items: p.items,
966
- pageInfo: de,
1047
+ items: I.items,
1048
+ pageInfo: fe,
967
1049
  hasNextPage: !1,
968
- fetchNextPage: Fn,
1050
+ fetchNextPage: Kn,
969
1051
  isLoading: !1,
970
1052
  isFetchingNextPage: !1,
971
1053
  error: null,
972
1054
  source: "inline"
973
1055
  });
974
- const F = (ye = C == null ? void 0 : C.data) == null ? void 0 : ye.pages, Et = F ? F.flatMap((ie) => ie.items) : qn, Se = F && F.length > 0 ? F[F.length - 1].pageInfo : de;
1056
+ const R = (xe = x == null ? void 0 : x.data) == null ? void 0 : xe.pages, qt = R ? R.flatMap((ae) => ae.items) : Hn, Ee = R && R.length > 0 ? R[R.length - 1].pageInfo : fe;
975
1057
  return j({
976
- items: Et,
977
- pageInfo: Se,
978
- hasNextPage: Se.hasNextPage,
979
- fetchNextPage: H(b),
1058
+ items: qt,
1059
+ pageInfo: Ee,
1060
+ hasNextPage: Ee.hasNextPage,
1061
+ fetchNextPage: K(S),
980
1062
  // Between the click and the observer being wired up there is one commit
981
1063
  // with no result yet; report that as loading rather than as "empty".
982
- isLoading: C ? C.isLoading : x,
983
- isFetchingNextPage: (C == null ? void 0 : C.isFetchingNextPage) ?? !1,
984
- error: (C == null ? void 0 : C.error) ?? null,
1064
+ isLoading: x ? x.isLoading : w,
1065
+ isFetchingNextPage: (x == null ? void 0 : x.isFetchingNextPage) ?? !1,
1066
+ error: (x == null ? void 0 : x.error) ?? null,
985
1067
  source: "onDemand"
986
1068
  });
987
1069
  },
988
- [A, U, H, ne]
1070
+ [v, U, K, se]
989
1071
  );
990
1072
  return {
991
- modules: f.modules,
992
- pageInfo: f.pageInfo,
993
- hasNextPage: f.hasNextPage,
994
- fetchNextPage: f.fetchNextPage,
995
- isLoading: _.isResolving || f.isPending,
996
- isFetchingNextPage: f.isFetchingNextPage,
997
- error: f.error ?? _.error,
998
- itemsMode: h,
999
- getItems: $,
1000
- expandModule: O,
1001
- collapseModule: Y,
1002
- toggleModule: se,
1003
- expandedModuleIds: w
1073
+ modules: h.modules,
1074
+ pageInfo: h.pageInfo,
1075
+ hasNextPage: h.hasNextPage,
1076
+ fetchNextPage: h.fetchNextPage,
1077
+ isLoading: p.isResolving || h.isPending,
1078
+ isFetchingNextPage: h.isFetchingNextPage,
1079
+ error: h.error ?? p.error,
1080
+ itemsMode: f,
1081
+ getItems: O,
1082
+ expandModule: z,
1083
+ collapseModule: B,
1084
+ toggleModule: oe,
1085
+ expandedModuleIds: P
1004
1086
  };
1005
1087
  }
1006
- function rr(e, t, n, s) {
1007
- const r = s ? te.items(t, n, s) : mt(t, n);
1088
+ function ti(e, t, n, s) {
1089
+ const r = s ? te.items(t, n, s) : yt(t, n);
1008
1090
  return e.invalidateQueries({ queryKey: r });
1009
1091
  }
1010
- function or(e, t, n) {
1011
- const s = n ? te.list(t, n) : vn(t);
1092
+ function ni(e, t, n) {
1093
+ const s = n ? te.list(t, n) : $n(t);
1012
1094
  return e.invalidateQueries({ queryKey: s });
1013
1095
  }
1014
- function ir(e, t) {
1096
+ function si(e, t) {
1015
1097
  return e.invalidateQueries({ queryKey: te.course(t) });
1016
1098
  }
1017
- const kn = /%\{(\w+)\}/g, pt = (e, t) => t ? e.replace(
1018
- kn,
1019
- (n, s) => s in t ? String(t[s]) : n
1020
- ) : e, k = "en-US", zn = { t: pt, locale: k }, It = vt(null);
1021
- function lr({ t: e, locale: t, children: n }) {
1022
- const s = L(
1023
- () => ({ t: e ?? pt, locale: t ?? k }),
1024
- [e, t]
1025
- );
1026
- return /* @__PURE__ */ o(It.Provider, { value: s, children: n });
1027
- }
1028
- function R() {
1029
- return Tt(It) ?? zn;
1030
- }
1031
- const On = 864e5, Ce = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
1032
- function me(e) {
1033
- const t = ve.get(e);
1034
- if (t) return t;
1035
- const n = new Intl.NumberFormat(e);
1036
- return ve.set(e, n), n;
1099
+ const Vn = "Course modules", Zn = { one: "%{count} module loaded", other: "%{count} modules loaded" }, Xn = "Search by name", Jn = "Search…", es = "Expand / collapse", ts = "Expand all", ns = "Collapse all", ss = "Search matches module names only — items of collapsed modules are not loaded.", rs = "Modules failed to load: %{message}", os = "Loading modules", is = "This course has no modules.", ls = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, as = "Clear filters", us = "Loading more modules…", cs = "Load more modules (%{count} loaded)", ds = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, ms = "Filter", gs = "%{label} (%{count})", fs = "All", hs = "In progress", ps = "Complete", Is = "Due this week", bs = "Missing", Ms = "Locked until prerequisites are met", Ss = "%{name} progress", ys = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, _s = "Items failed to load: %{message}", Ts = "Loading items", ws = "Loading…", Ps = "No items.", Es = "Loading more items…", xs = "Load more items (%{loaded} of %{count} loaded)", Cs = "(unpublished)", Ls = "Collapse %{name}", As = "Expand %{name}", vs = "Not started", Ns = "In progress", Ds = "All items complete", ks = "All items graded", qs = "Missing", Rs = "Locked", Fs = "Not started", zs = "In progress", Us = "Submitted", Os = "Graded", $s = "Missing", Bs = "Locked", Gs = "Assignment", js = "Quiz", Ys = "Discussion", Ws = "Page", Qs = "File", Hs = "External URL", Ks = "External tool", Vs = "Text header", Zs = "View the item", Xs = "Submit the assignment", Js = "Contribute to the page", er = "Mark as done", tr = "Score at least the minimum", nr = "Score at least %{count}", sr = "Score at least the minimum percentage", rr = "Score at least %{count}%", or = "Complete the requirement", ir = "today, %{time}", lr = "yesterday, %{time}", ar = "tomorrow, %{time}", ur = "%{date}, %{time}", cr = "Due %{when}", dr = "Will unlock on %{when}", mr = { one: "%{count} pt", other: "%{count} pts" }, gr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, fr = "%{count} min", hr = "Unpublished", pr = "Untitled item", Ir = "opens in a new window", br = {
1100
+ pageTitle: Vn,
1101
+ modulesLoadedAnnouncement: Zn,
1102
+ moduleSearchLabel: Xn,
1103
+ searchPlaceholder: Jn,
1104
+ expandCollapseTrigger: es,
1105
+ expandAll: ts,
1106
+ collapseAll: ns,
1107
+ searchScopeHint: ss,
1108
+ modulesLoadErrorAlert: rs,
1109
+ modulesLoadingSpinnerLabel: os,
1110
+ noModulesEmptyState: is,
1111
+ filteredEmptyState: ls,
1112
+ clearFilters: as,
1113
+ loadMoreModulesLoading: us,
1114
+ loadMoreModules: cs,
1115
+ allModulesLoaded: ds,
1116
+ filterGroupLabel: ms,
1117
+ filterChipWithCount: gs,
1118
+ filterAll: fs,
1119
+ filterInProgress: hs,
1120
+ filterComplete: ps,
1121
+ filterDueThisWeek: Is,
1122
+ filterMissing: bs,
1123
+ lockedByline: Ms,
1124
+ moduleProgressScreenReaderLabel: Ss,
1125
+ itemsLoadedAnnouncement: ys,
1126
+ itemsLoadErrorAlert: _s,
1127
+ itemsLoadingSpinnerLabel: Ts,
1128
+ itemsLoadingText: ws,
1129
+ noItemsEmptyState: Ps,
1130
+ loadMoreItemsLoading: Es,
1131
+ loadMoreItems: xs,
1132
+ moduleUnpublishedBadge: Cs,
1133
+ collapseModule: Ls,
1134
+ expandModule: As,
1135
+ moduleStatusNotStarted: vs,
1136
+ moduleStatusInProgress: Ns,
1137
+ moduleStatusAllSubmitted: Ds,
1138
+ moduleStatusAllGraded: ks,
1139
+ moduleStatusMissing: qs,
1140
+ moduleStatusLocked: Rs,
1141
+ itemStatusNotStarted: Fs,
1142
+ itemStatusInProgress: zs,
1143
+ itemStatusSubmitted: Us,
1144
+ itemStatusGraded: Os,
1145
+ itemStatusMissing: $s,
1146
+ itemStatusLocked: Bs,
1147
+ itemTypeAssignment: Gs,
1148
+ itemTypeQuiz: js,
1149
+ itemTypeDiscussion: Ys,
1150
+ itemTypePage: Ws,
1151
+ itemTypeFile: Qs,
1152
+ itemTypeExternalUrl: Hs,
1153
+ itemTypeExternalTool: Ks,
1154
+ itemTypeSubHeader: Vs,
1155
+ requirementMustView: Zs,
1156
+ requirementMustSubmit: Xs,
1157
+ requirementMustContribute: Js,
1158
+ requirementMustMarkDone: er,
1159
+ requirementMinScoreUnknown: tr,
1160
+ requirementMinScore: nr,
1161
+ requirementMinPercentageUnknown: sr,
1162
+ requirementMinPercentage: rr,
1163
+ requirementUnknown: or,
1164
+ dateTimeToday: ir,
1165
+ dateTimeYesterday: lr,
1166
+ dateTimeTomorrow: ar,
1167
+ dateTimeWithDate: ur,
1168
+ dueByline: cr,
1169
+ unlockByline: dr,
1170
+ pointsAbbreviated: mr,
1171
+ progressSummary: gr,
1172
+ durationMinutes: fr,
1173
+ itemUnpublishedLabel: hr,
1174
+ itemUntitled: pr,
1175
+ opensInNewWindow: Ir
1176
+ }, Mr = /%\{(\w+)\}/g, Sr = br, ne = "en-US", yr = /* @__PURE__ */ new Map(), _r = /* @__PURE__ */ new Map();
1177
+ function Pt(e, t, n) {
1178
+ const s = e.get(t);
1179
+ if (s) return s;
1180
+ const r = n();
1181
+ return e.set(t, r), r;
1182
+ }
1183
+ function Tr(e, t, n) {
1184
+ return n ? e.replace(Mr, (s, r) => {
1185
+ if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
1186
+ const i = n[r];
1187
+ return typeof i == "number" && Number.isFinite(i) ? Pt(_r, t, () => new Intl.NumberFormat(t)).format(i) : String(i);
1188
+ }) : e;
1037
1189
  }
1038
- function Un(e) {
1039
- const t = Te.get(e);
1190
+ function wr(e, t, n) {
1191
+ const s = n == null ? void 0 : n.count;
1192
+ if (typeof s == "number" && Number.isFinite(s)) {
1193
+ const r = Pt(yr, t, () => new Intl.PluralRules(t)).select(s), i = e[r];
1194
+ if (typeof i == "string") return i;
1195
+ }
1196
+ return typeof e.other == "string" ? e.other : void 0;
1197
+ }
1198
+ function Ne(e, t, n) {
1199
+ if (typeof e == "string") return e;
1200
+ if (e !== null && typeof e == "object")
1201
+ return wr(e, t, n);
1202
+ }
1203
+ function Pr(e, t, n, s) {
1204
+ const r = Ne(e == null ? void 0 : e[t], n, s);
1205
+ if (typeof r == "string") return r;
1206
+ const i = Ne(Sr[t], n, s);
1207
+ return typeof i == "string" ? i : t;
1208
+ }
1209
+ function Et(e, t = ne) {
1210
+ return (n, s) => Tr(Pr(e, n, t, s), t, s);
1211
+ }
1212
+ const Er = Et(), xr = { t: Er, locale: ne }, xt = Be(null);
1213
+ function ri({
1214
+ translations: e,
1215
+ locale: t,
1216
+ children: n
1217
+ }) {
1218
+ const s = N(() => {
1219
+ const r = t ?? ne;
1220
+ return { t: Et(e, r), locale: r };
1221
+ }, [e, t]);
1222
+ return /* @__PURE__ */ o(xt.Provider, { value: s, children: n });
1223
+ }
1224
+ function k() {
1225
+ return Ge(xt) ?? xr;
1226
+ }
1227
+ const Cr = 864e5, De = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
1228
+ function Lr(e) {
1229
+ const t = ke.get(e);
1040
1230
  if (t) return t;
1041
1231
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
1042
- return Te.set(e, n), n;
1232
+ return ke.set(e, n), n;
1043
1233
  }
1044
- function ge(e = k) {
1045
- return me(e);
1046
- }
1047
- function $n(e) {
1048
- const t = Ce.get(e);
1234
+ function Ar(e) {
1235
+ const t = De.get(e);
1049
1236
  if (t) return t;
1050
1237
  const n = {
1051
1238
  time: new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }),
1052
1239
  day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric" }),
1053
1240
  dayYear: new Intl.DateTimeFormat(e, { month: "long", day: "numeric", year: "numeric" })
1054
1241
  };
1055
- return Ce.set(e, n), n;
1242
+ return De.set(e, n), n;
1056
1243
  }
1057
- function bt(e, t) {
1244
+ function Ct(e, t) {
1058
1245
  const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), s = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
1059
- return Math.round((n - s) / On);
1246
+ return Math.round((n - s) / Cr);
1060
1247
  }
1061
- function Mt(e, t, n, s = k) {
1248
+ function Lt(e, t, n, s = ne) {
1062
1249
  const r = new Date(t);
1063
1250
  if (Number.isNaN(r.getTime())) return t;
1064
- const i = $n(s), u = i.time.format(r), a = bt(r, n);
1065
- if (a === 0) return e("today, %{time}", { time: u });
1066
- if (a === -1) return e("yesterday, %{time}", { time: u });
1067
- if (a === 1) return e("tomorrow, %{time}", { time: u });
1068
- const d = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1069
- return e("%{date}, %{time}", { date: d, time: u });
1251
+ const i = Ar(s), u = i.time.format(r), a = Ct(r, n);
1252
+ if (a === 0) return e("dateTimeToday", { time: u });
1253
+ if (a === -1) return e("dateTimeYesterday", { time: u });
1254
+ if (a === 1) return e("dateTimeTomorrow", { time: u });
1255
+ const c = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1256
+ return e("dateTimeWithDate", { date: c, time: u });
1070
1257
  }
1071
- function _t(e, t, n, s) {
1072
- return e("Due %{when}", { when: Mt(e, t, n, s) });
1258
+ function At(e, t, n, s) {
1259
+ return e("dueByline", { when: Lt(e, t, n, s) });
1073
1260
  }
1074
- function Ne(e, t, n, s) {
1075
- return e("Will unlock on %{when}", { when: Mt(e, t, n, s) });
1261
+ function qe(e, t, n, s) {
1262
+ return e("unlockByline", { when: Lt(e, t, n, s) });
1076
1263
  }
1077
- function Bn(e, t = k) {
1078
- return Un(t).format(e);
1264
+ function vr(e, t = ne) {
1265
+ return !Number.isInteger(e) || e < 1 ? null : Lr(t).format(e);
1079
1266
  }
1080
- function Gn(e, t) {
1267
+ function Nr(e, t) {
1081
1268
  switch (t) {
1082
1269
  case "assignment":
1083
- return e("Assignment");
1270
+ return e("itemTypeAssignment");
1084
1271
  case "quiz":
1085
- return e("Quiz");
1272
+ return e("itemTypeQuiz");
1086
1273
  case "discussion":
1087
- return e("Discussion");
1274
+ return e("itemTypeDiscussion");
1088
1275
  case "page":
1089
- return e("Page");
1276
+ return e("itemTypePage");
1090
1277
  case "file":
1091
- return e("File");
1278
+ return e("itemTypeFile");
1092
1279
  case "external_url":
1093
- return e("External URL");
1280
+ return e("itemTypeExternalUrl");
1094
1281
  case "external_tool":
1095
- return e("External tool");
1282
+ return e("itemTypeExternalTool");
1096
1283
  case "sub_header":
1097
- return e("Text header");
1284
+ return e("itemTypeSubHeader");
1098
1285
  }
1099
1286
  }
1100
- function Yn(e, t, n = k) {
1101
- return t == null ? null : e("%{points} pts", { points: me(n).format(t) });
1287
+ function Dr(e, t) {
1288
+ return t == null ? null : e("pointsAbbreviated", { count: t });
1102
1289
  }
1103
- function Qn(e, t, n = k) {
1104
- const s = (r) => me(n).format(r);
1290
+ function kr(e, t) {
1105
1291
  switch (t.type) {
1106
1292
  case "must_view":
1107
- return e("View the item");
1293
+ return e("requirementMustView");
1108
1294
  case "must_submit":
1109
- return e("Submit the assignment");
1295
+ return e("requirementMustSubmit");
1110
1296
  case "must_contribute":
1111
- return e("Contribute to the page");
1297
+ return e("requirementMustContribute");
1112
1298
  case "must_mark_done":
1113
- return e("Mark as done");
1299
+ return e("requirementMustMarkDone");
1114
1300
  case "min_score":
1115
- return t.minScore === null || t.minScore === void 0 ? e("Score at least the minimum") : e("Score at least %{score}", { score: s(t.minScore) });
1301
+ return t.minScore === null || t.minScore === void 0 ? e("requirementMinScoreUnknown") : e("requirementMinScore", { count: t.minScore });
1116
1302
  case "min_percentage":
1117
- return t.minPercentage === null || t.minPercentage === void 0 ? e("Score at least the minimum percentage") : e("Score at least %{percentage}%", { percentage: s(t.minPercentage) });
1303
+ return t.minPercentage === null || t.minPercentage === void 0 ? e("requirementMinPercentageUnknown") : e("requirementMinPercentage", { count: t.minPercentage });
1118
1304
  case "unknown":
1119
- return e("Complete the requirement");
1305
+ return e("requirementUnknown");
1120
1306
  }
1121
1307
  }
1122
- function jn(e, t, n, s, r = k) {
1123
- const i = me(r);
1124
- return e("%{percent}% | %{met} of %{total} requirements met", {
1125
- percent: i.format(t),
1126
- met: i.format(n),
1127
- total: i.format(s)
1128
- });
1308
+ function qr(e, t, n, s) {
1309
+ return e("progressSummary", { percent: t, met: n, count: s });
1129
1310
  }
1130
- const Wn = [
1311
+ const Rr = [
1131
1312
  "all",
1132
1313
  "in_progress",
1133
1314
  "complete",
1134
1315
  "due_this_week",
1135
1316
  "missing"
1136
1317
  ];
1137
- function Kn(e, t) {
1318
+ function Fr(e, t) {
1138
1319
  switch (t) {
1139
1320
  case "all":
1140
- return e("All");
1321
+ return e("filterAll");
1141
1322
  case "in_progress":
1142
- return e("In progress");
1323
+ return e("filterInProgress");
1143
1324
  case "complete":
1144
- return e("Complete");
1325
+ return e("filterComplete");
1145
1326
  case "due_this_week":
1146
- return e("Due this week");
1327
+ return e("filterDueThisWeek");
1147
1328
  case "missing":
1148
- return e("Missing");
1329
+ return e("filterMissing");
1149
1330
  }
1150
1331
  }
1151
- const Hn = 7;
1152
- function Ae(e, t, n) {
1332
+ const zr = 7;
1333
+ function Re(e, t, n) {
1153
1334
  if (t === "all") return !0;
1154
1335
  const s = e.progress;
1155
1336
  if (!s) return !1;
@@ -1164,148 +1345,160 @@ function Ae(e, t, n) {
1164
1345
  if (!s.latestDueAt) return !1;
1165
1346
  const r = new Date(s.latestDueAt);
1166
1347
  if (Number.isNaN(r.getTime())) return !1;
1167
- const i = bt(r, n);
1168
- return i >= 0 && i <= Hn;
1348
+ const i = Ct(r, n);
1349
+ return i >= 0 && i <= zr;
1169
1350
  }
1170
1351
  default:
1171
1352
  return !0;
1172
1353
  }
1173
1354
  }
1174
- function Le(e, t, n) {
1355
+ function Fe(e, t, n) {
1175
1356
  const s = t.trim().toLocaleLowerCase(n);
1176
1357
  return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
1177
1358
  }
1178
- function Vn({ value: e, onChange: t, counts: n }) {
1179
- const { t: s, locale: r } = R(), i = ke(), u = ge(r);
1180
- return /* @__PURE__ */ y(S, { as: "div", margin: "medium 0 0 0", children: [
1181
- /* @__PURE__ */ o(S, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(I, { size: "small", weight: "bold", id: i, children: s("Filter") }) }),
1359
+ function Ur({ value: e, onChange: t, counts: n }) {
1360
+ const { t: s } = k(), r = je();
1361
+ return /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
1362
+ /* @__PURE__ */ o(y, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(b, { size: "small", weight: "bold", id: r, children: s("filterGroupLabel") }) }),
1182
1363
  /* @__PURE__ */ o(
1183
- P,
1364
+ T,
1184
1365
  {
1185
1366
  gap: "x-small",
1186
1367
  wrap: "wrap",
1187
1368
  as: "div",
1188
1369
  role: "group",
1189
- "aria-labelledby": i,
1370
+ "aria-labelledby": r,
1190
1371
  "data-testid": "filter-chips",
1191
- children: Wn.map((a) => {
1192
- const d = a === e, c = n == null ? void 0 : n[a], l = Kn(s, a);
1193
- return /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1194
- Z,
1372
+ children: Rr.map((i) => {
1373
+ const u = i === e, a = n == null ? void 0 : n[i], c = Fr(s, i);
1374
+ return /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1375
+ X,
1195
1376
  {
1196
1377
  size: "small",
1197
- color: d ? "primary" : "secondary",
1198
- "aria-pressed": d,
1199
- onClick: () => t(a),
1200
- "data-testid": `filter-chip-${a}`,
1378
+ color: u ? "primary" : "secondary",
1379
+ "aria-pressed": u,
1380
+ onClick: () => t(i),
1381
+ "data-testid": `filter-chip-${i}`,
1201
1382
  themeOverride: { borderRadius: "1.5rem" },
1202
- children: c === void 0 ? l : s("%{label} (%{count})", { label: l, count: u.format(c) })
1383
+ children: a === void 0 ? c : s("filterChipWithCount", { label: c, count: a })
1203
1384
  }
1204
- ) }, a);
1385
+ ) }, i);
1205
1386
  })
1206
1387
  }
1207
1388
  )
1208
1389
  ] });
1209
1390
  }
1210
- const Xn = {
1391
+ const Or = {
1211
1392
  not_started: {},
1212
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Qe, {}) },
1213
- all_submitted: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1214
- all_graded: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1215
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ye, {}) },
1216
- locked: { icon: /* @__PURE__ */ o(Ge, {}) }
1217
- }, Zn = {
1393
+ in_progress: { color: "info", icon: /* @__PURE__ */ o(Je, {}) },
1394
+ all_submitted: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1395
+ all_graded: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1396
+ missing: { color: "danger", icon: /* @__PURE__ */ o(Xe, {}) },
1397
+ locked: { icon: /* @__PURE__ */ o(Ze, {}) }
1398
+ }, $r = {
1218
1399
  not_started: {},
1219
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Qe, {}) },
1220
- submitted: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1221
- graded: { color: "success", icon: /* @__PURE__ */ o(ue, {}) },
1222
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ye, {}) },
1223
- locked: { icon: /* @__PURE__ */ o(Ge, {}) }
1400
+ in_progress: { color: "info", icon: /* @__PURE__ */ o(Je, {}) },
1401
+ submitted: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1402
+ graded: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1403
+ missing: { color: "danger", icon: /* @__PURE__ */ o(Xe, {}) },
1404
+ locked: { icon: /* @__PURE__ */ o(Ze, {}) }
1224
1405
  };
1225
- function Jn(e, t) {
1406
+ function Br(e, t) {
1226
1407
  switch (t) {
1227
1408
  case "not_started":
1228
- return e("Not started");
1409
+ return e("moduleStatusNotStarted");
1229
1410
  case "in_progress":
1230
- return e("In progress");
1411
+ return e("moduleStatusInProgress");
1231
1412
  case "all_submitted":
1232
- return e("All items complete");
1413
+ return e("moduleStatusAllSubmitted");
1233
1414
  case "all_graded":
1234
- return e("All items graded");
1415
+ return e("moduleStatusAllGraded");
1235
1416
  case "missing":
1236
- return e("Missing");
1417
+ return e("moduleStatusMissing");
1237
1418
  case "locked":
1238
- return e("Locked");
1419
+ return e("moduleStatusLocked");
1239
1420
  }
1240
1421
  }
1241
- function es(e, t) {
1422
+ function Gr(e, t) {
1242
1423
  switch (t) {
1243
1424
  case "not_started":
1244
- return e("Not started");
1425
+ return e("itemStatusNotStarted");
1245
1426
  case "in_progress":
1246
- return e("In progress");
1427
+ return e("itemStatusInProgress");
1247
1428
  case "submitted":
1248
- return e("Submitted");
1429
+ return e("itemStatusSubmitted");
1249
1430
  case "graded":
1250
- return e("Graded");
1431
+ return e("itemStatusGraded");
1251
1432
  case "missing":
1252
- return e("Missing");
1433
+ return e("itemStatusMissing");
1253
1434
  case "locked":
1254
- return e("Locked");
1435
+ return e("itemStatusLocked");
1255
1436
  }
1256
1437
  }
1257
- function St(e, t, n) {
1258
- return /* @__PURE__ */ o(Yt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1438
+ function vt(e, t, n) {
1439
+ return /* @__PURE__ */ o(Jt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1259
1440
  }
1260
- function ts({ status: e }) {
1261
- const { t } = R();
1262
- return St(
1263
- Xn[e],
1264
- Jn(t, e),
1441
+ function jr({ status: e }) {
1442
+ const { t } = k();
1443
+ return vt(
1444
+ Or[e],
1445
+ Br(t, e),
1265
1446
  "module-status-pill"
1266
1447
  );
1267
1448
  }
1268
- function ns({ status: e }) {
1269
- const { t } = R();
1270
- return St(
1271
- Zn[e],
1272
- es(t, e),
1449
+ function Yr({ status: e }) {
1450
+ const { t } = k();
1451
+ return vt(
1452
+ $r[e],
1453
+ Gr(t, e),
1273
1454
  "item-status-pill"
1274
1455
  );
1275
1456
  }
1276
- const ss = {
1277
- assignment: /* @__PURE__ */ o(Ut, {}),
1278
- quiz: /* @__PURE__ */ o(Ot, {}),
1279
- discussion: /* @__PURE__ */ o(zt, {}),
1280
- page: /* @__PURE__ */ o(kt, {}),
1281
- file: /* @__PURE__ */ o(Ft, {}),
1282
- external_url: /* @__PURE__ */ o(qt, {}),
1283
- external_tool: /* @__PURE__ */ o(Rt, {}),
1284
- sub_header: /* @__PURE__ */ o(Dt, {})
1285
- }, rs = 1.75, os = {
1457
+ const Wr = {
1458
+ assignment: /* @__PURE__ */ o(Qt, {}),
1459
+ quiz: /* @__PURE__ */ o(Wt, {}),
1460
+ discussion: /* @__PURE__ */ o(Yt, {}),
1461
+ page: /* @__PURE__ */ o(jt, {}),
1462
+ file: /* @__PURE__ */ o(Gt, {}),
1463
+ external_url: /* @__PURE__ */ o(Bt, {}),
1464
+ external_tool: /* @__PURE__ */ o($t, {}),
1465
+ sub_header: /* @__PURE__ */ o(Ot, {})
1466
+ }, Qr = 1.75, Hr = {
1286
1467
  contentVisibility: "auto",
1287
1468
  containIntrinsicSize: "auto 3.5rem"
1288
1469
  };
1289
- function is({ item: e, today: t }) {
1290
- const { t: n, locale: s } = R();
1470
+ function Kr({ item: e, today: t, navigation: n }) {
1471
+ var p;
1472
+ const { t: s, locale: r } = k(), i = e.title || s("itemUntitled");
1291
1473
  if (e.type === "sub_header")
1292
1474
  return /* @__PURE__ */ o(
1293
- S,
1475
+ y,
1294
1476
  {
1295
1477
  as: "div",
1296
1478
  padding: "x-small small",
1297
1479
  margin: "x-small 0 0 0",
1298
1480
  "data-testid": `module-item-${e.id}`,
1299
- children: /* @__PURE__ */ o(I, { size: "small", weight: "bold", transform: "uppercase", letterSpacing: "expanded", children: e.title })
1481
+ children: /* @__PURE__ */ o(
1482
+ b,
1483
+ {
1484
+ size: "small",
1485
+ weight: "bold",
1486
+ transform: "uppercase",
1487
+ letterSpacing: "expanded",
1488
+ "data-testid": "module-item-title",
1489
+ "data-sub-header": "true",
1490
+ children: i
1491
+ }
1492
+ )
1300
1493
  }
1301
1494
  );
1302
- const r = [Gn(n, e.type)];
1303
- e.dueAt && r.push(_t(n, e.dueAt, t, s));
1304
- const i = Yn(n, e.pointsPossible, s);
1305
- i && r.push(i), e.completionRequirement && r.push(Qn(n, e.completionRequirement, s));
1306
- const u = en(e);
1307
- return u !== null && r.push(n("%{minutes} min", { minutes: ge(s).format(u) })), e.published || r.push(n("Unpublished")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * rs}rem`, ...os }, children: /* @__PURE__ */ o(
1308
- S,
1495
+ const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, a = e.status === "locked", c = n == null ? void 0 : n.onItemClick, g = c ? (f) => c(e, f) : void 0, l = [Nr(s, e.type)];
1496
+ e.dueAt && l.push(At(s, e.dueAt, t, r));
1497
+ const m = Dr(s, e.pointsPossible);
1498
+ m && l.push(m), e.completionRequirement && l.push(kr(s, e.completionRequirement));
1499
+ const M = cn(e);
1500
+ return M !== null && l.push(s("durationMinutes", { count: M })), e.published || l.push(s("itemUnpublishedLabel")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * Qr}rem`, ...Hr }, children: /* @__PURE__ */ o(
1501
+ y,
1309
1502
  {
1310
1503
  as: "div",
1311
1504
  background: "secondary",
@@ -1313,10 +1506,10 @@ function is({ item: e, today: t }) {
1313
1506
  padding: "x-small small",
1314
1507
  margin: "x-small 0 0 0",
1315
1508
  "data-testid": `module-item-${e.id}`,
1316
- children: /* @__PURE__ */ y(P, { alignItems: "center", gap: "small", children: [
1317
- e.indent > 0 ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { color: "secondary", children: /* @__PURE__ */ o(Lt, {}) }) }) : null,
1318
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1319
- S,
1509
+ children: /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", children: [
1510
+ e.indent > 0 ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { color: "secondary", children: /* @__PURE__ */ o(Ut, {}) }) }) : null,
1511
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1512
+ y,
1320
1513
  {
1321
1514
  as: "div",
1322
1515
  background: "primary",
@@ -1326,92 +1519,131 @@ function is({ item: e, today: t }) {
1326
1519
  width: "2.25rem",
1327
1520
  height: "2.25rem",
1328
1521
  textAlign: "center",
1329
- children: /* @__PURE__ */ o(I, { color: "secondary", children: ss[e.type] })
1522
+ children: /* @__PURE__ */ o(b, { color: "secondary", children: Wr[e.type] })
1330
1523
  }
1331
1524
  ) }),
1332
- /* @__PURE__ */ y(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1333
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(I, { weight: "bold", size: "small", "data-testid": "module-item-title", children: e.title }) }),
1334
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(I, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: r.map((a, d) => /* @__PURE__ */ y("span", { children: [
1335
- d > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1336
- /* @__PURE__ */ o("span", { children: a })
1337
- ] }, a)) }) })
1525
+ /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1526
+ /* @__PURE__ */ o(y, { as: "div", children: a || !u ? /* @__PURE__ */ o(
1527
+ b,
1528
+ {
1529
+ weight: "bold",
1530
+ size: "small",
1531
+ color: a ? "secondary" : "primary",
1532
+ "data-testid": "module-item-title",
1533
+ "data-locked": a ? "true" : void 0,
1534
+ children: i
1535
+ }
1536
+ ) : /* @__PURE__ */ _(
1537
+ Xt,
1538
+ {
1539
+ href: u,
1540
+ onClick: g,
1541
+ forceButtonRole: !1,
1542
+ isWithinText: !1,
1543
+ target: e.newTab ? "_blank" : void 0,
1544
+ rel: e.newTab ? "noopener noreferrer" : void 0,
1545
+ children: [
1546
+ /* @__PURE__ */ o(b, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: i }),
1547
+ e.newTab ? /* @__PURE__ */ o(Zt, { children: ` ${s("opensInNewWindow")}` }) : null
1548
+ ]
1549
+ }
1550
+ ) }),
1551
+ /* @__PURE__ */ o(y, { as: "div", children: /* @__PURE__ */ o(b, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: l.map((f, h) => /* @__PURE__ */ _("span", { children: [
1552
+ h > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1553
+ /* @__PURE__ */ o("span", { children: f })
1554
+ ] }, f)) }) })
1338
1555
  ] }),
1339
- e.status ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(ns, { status: e.status }) }) : null
1556
+ e.status ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(Yr, { status: e.status }) }) : null
1340
1557
  ] })
1341
1558
  }
1342
1559
  ) });
1343
1560
  }
1344
- const ls = ze(is), as = "3.5rem";
1345
- function us({ module: e, today: t }) {
1346
- var a, d;
1347
- const { t: n, locale: s } = R(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1561
+ const Vr = Ye(Kr), ze = "3rem";
1562
+ function Zr({
1563
+ label: e,
1564
+ dimmed: t = !1
1565
+ }) {
1566
+ return e === null ? null : /* @__PURE__ */ o(
1567
+ y,
1568
+ {
1569
+ as: "div",
1570
+ display: "inline-block",
1571
+ borderWidth: "small",
1572
+ borderRadius: "large",
1573
+ borderColor: t ? "primary" : "secondary",
1574
+ minWidth: ze,
1575
+ height: ze,
1576
+ padding: "0 xx-small",
1577
+ "data-testid": "module-number",
1578
+ children: /* @__PURE__ */ o(T, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ o(b, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
1579
+ }
1580
+ );
1581
+ }
1582
+ function Xr({ module: e, today: t }) {
1583
+ var a, c;
1584
+ const { t: n, locale: s } = k(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1348
1585
  if (r && i)
1349
- return /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ne(n, i, t, s) });
1586
+ return /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) });
1350
1587
  if (r)
1351
- return /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("Locked until prerequisites are met") });
1352
- const u = (d = e.progress) == null ? void 0 : d.latestDueAt;
1353
- return u ? /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: _t(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(I, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ne(n, i, t, s) }) : null;
1354
- }
1355
- function ds({ module: e }) {
1356
- const { t, locale: n } = R(), s = e.progress;
1357
- return !s || s.requirementCount <= 0 ? null : (
1358
- // Indented to sit under the module name rather than under the number badge,
1359
- // as the mock draws it. Plain `style` because InstUI's `margin` only takes
1360
- // spacing keywords and the badge width is not one of them.
1361
- /* @__PURE__ */ o("div", { style: { marginLeft: as }, children: /* @__PURE__ */ y(P, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1362
- /* @__PURE__ */ o(P.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1363
- Gt,
1364
- {
1365
- size: "x-small",
1366
- meterColor: s.percentComplete >= 100 ? "success" : "brand",
1367
- valueNow: s.requirementsMet,
1368
- valueMax: Math.max(s.requirementCount, 1),
1369
- shouldAnimate: !1,
1370
- screenReaderLabel: t("%{name} progress", { name: e.name })
1371
- }
1372
- ) }),
1373
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: jn(
1374
- t,
1375
- s.percentComplete,
1376
- s.requirementsMet,
1377
- s.requirementCount,
1378
- n
1379
- ) }) })
1380
- ] }) })
1381
- );
1588
+ return /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
1589
+ const u = (c = e.progress) == null ? void 0 : c.latestDueAt;
1590
+ return u ? /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: At(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) }) : null;
1591
+ }
1592
+ function Jr({ module: e }) {
1593
+ const { t } = k(), n = e.progress;
1594
+ return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1595
+ /* @__PURE__ */ o(T.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1596
+ Vt,
1597
+ {
1598
+ size: "x-small",
1599
+ meterColor: n.percentComplete >= 100 ? "success" : "brand",
1600
+ valueNow: n.requirementsMet,
1601
+ valueMax: Math.max(n.requirementCount, 1),
1602
+ shouldAnimate: !1,
1603
+ screenReaderLabel: t("moduleProgressScreenReaderLabel", { name: e.name })
1604
+ }
1605
+ ) }),
1606
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: qr(
1607
+ t,
1608
+ n.percentComplete,
1609
+ n.requirementsMet,
1610
+ n.requirementCount
1611
+ ) }) })
1612
+ ] });
1382
1613
  }
1383
- const De = (e) => `platform-modules-panel-${e}`;
1384
- function cs({
1614
+ const Ue = (e) => `platform-modules-panel-${e}`;
1615
+ function eo({
1385
1616
  module: e,
1386
1617
  state: t,
1387
1618
  today: n,
1388
- showDiagnostics: s
1619
+ navigation: s,
1620
+ showDiagnostics: r
1389
1621
  }) {
1390
- const { t: r, locale: i } = R(), u = ge(i), a = B(null), d = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1391
- return ae(() => {
1392
- !c || d === 0 || a.current !== d && (a.current = d, Oe(
1393
- r("%{loaded} of %{total} items loaded in %{name}", {
1394
- loaded: u.format(d),
1395
- total: u.format(e.itemCount),
1622
+ const { t: i } = k(), u = $(null), a = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1623
+ return de(() => {
1624
+ !c || a === 0 || u.current !== a && (u.current = a, Qe(
1625
+ i("itemsLoadedAnnouncement", {
1626
+ loaded: a,
1627
+ count: e.itemCount,
1396
1628
  name: e.name
1397
1629
  })
1398
1630
  ));
1399
- }, [c, d, e.itemCount, e.name, u, r]), t.error ? /* @__PURE__ */ o(S, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1400
- $e,
1631
+ }, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(y, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1632
+ Ke,
1401
1633
  {
1402
1634
  variant: "error",
1403
1635
  margin: "0",
1404
- liveRegion: Ue,
1636
+ liveRegion: He,
1405
1637
  liveRegionPoliteness: "assertive",
1406
1638
  "data-testid": "items-error",
1407
- children: r("Items failed to load: %{message}", { message: t.error.message })
1639
+ children: i("itemsLoadErrorAlert", { message: t.error.message })
1408
1640
  }
1409
- ) }) : t.isLoading ? /* @__PURE__ */ y(S, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1410
- /* @__PURE__ */ o(We, { size: "x-small", renderTitle: r("Loading items") }),
1641
+ ) }) : t.isLoading ? /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1642
+ /* @__PURE__ */ o(tt, { size: "x-small", renderTitle: i("itemsLoadingSpinnerLabel") }),
1411
1643
  " ",
1412
- /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: r("Loading items…") })
1413
- ] }) : /* @__PURE__ */ y(S, { as: "div", margin: "small 0 0 0", children: [
1414
- s ? /* @__PURE__ */ y(I, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1644
+ /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: i("itemsLoadingText") })
1645
+ ] }) : /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", children: [
1646
+ r ? /* @__PURE__ */ _(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1415
1647
  "items source: ",
1416
1648
  t.source,
1417
1649
  " · loaded ",
@@ -1419,35 +1651,37 @@ function cs({
1419
1651
  " of ",
1420
1652
  e.itemCount
1421
1653
  ] }) : null,
1422
- t.items.length === 0 ? /* @__PURE__ */ o(S, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: r("No items in this module.") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((l) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(ls, { item: l, today: n }) }, l.id)) }),
1423
- t.hasNextPage ? /* @__PURE__ */ o(S, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1424
- Z,
1654
+ t.items.length === 0 ? /* @__PURE__ */ o(y, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: i("noItemsEmptyState") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(Vr, { item: g, today: n, navigation: s }) }, g.id)) }),
1655
+ t.hasNextPage ? /* @__PURE__ */ o(y, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1656
+ X,
1425
1657
  {
1426
1658
  size: "small",
1427
1659
  onClick: t.fetchNextPage,
1428
1660
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
1429
1661
  "data-testid": "load-more-items",
1430
- children: t.isFetchingNextPage ? r("Loading more items…") : r("Load more items (%{loaded} of %{total} loaded)", {
1431
- loaded: u.format(t.items.length),
1432
- total: u.format(e.itemCount)
1662
+ children: t.isFetchingNextPage ? i("loadMoreItemsLoading") : i("loadMoreItems", {
1663
+ loaded: t.items.length,
1664
+ count: e.itemCount
1433
1665
  })
1434
1666
  }
1435
1667
  ) }) : null
1436
1668
  ] });
1437
1669
  }
1438
- function ms({
1670
+ function to({
1439
1671
  module: e,
1440
1672
  expanded: t,
1441
1673
  onToggle: n,
1442
1674
  itemsState: s,
1443
1675
  today: r,
1444
- showDiagnostics: i = !1,
1445
- headingLevel: u = "h3"
1676
+ navigation: i,
1677
+ showDiagnostics: u = !1,
1678
+ headingLevel: a = "h3",
1679
+ moduleLabel: c
1446
1680
  }) {
1447
- var l;
1448
- const { t: a, locale: d } = R(), c = ((l = e.progress) == null ? void 0 : l.status) === "locked";
1449
- return /* @__PURE__ */ y(
1450
- S,
1681
+ var p;
1682
+ const { t: g, locale: l } = k(), m = ((p = e.progress) == null ? void 0 : p.status) === "locked", M = c === void 0 ? vr(e.position, l) : c;
1683
+ return /* @__PURE__ */ _(
1684
+ y,
1451
1685
  {
1452
1686
  as: "div",
1453
1687
  background: "primary",
@@ -1458,77 +1692,66 @@ function ms({
1458
1692
  margin: "0 0 small 0",
1459
1693
  "data-testid": `module-card-${e.id}`,
1460
1694
  children: [
1461
- /* @__PURE__ */ y(P, { alignItems: "start", gap: "small", children: [
1462
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1463
- S,
1464
- {
1465
- as: "div",
1466
- borderWidth: "small",
1467
- borderRadius: "medium",
1468
- padding: "x-small",
1469
- width: "2.75rem",
1470
- textAlign: "center",
1471
- "data-testid": "module-number",
1472
- children: /* @__PURE__ */ o(I, { weight: "bold", size: "small", children: Bn(e.position, d) })
1473
- }
1474
- ) }),
1475
- /* @__PURE__ */ y(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1476
- /* @__PURE__ */ y(S, { as: "div", children: [
1695
+ /* @__PURE__ */ _(T, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
1696
+ M !== null ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(Zr, { label: M, dimmed: m }) }) : null,
1697
+ /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1698
+ /* @__PURE__ */ _(y, { as: "div", children: [
1477
1699
  /* @__PURE__ */ o(
1478
- Be,
1700
+ Ve,
1479
1701
  {
1480
- level: u,
1702
+ level: a,
1481
1703
  themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
1482
1704
  "data-testid": "module-name",
1483
- children: /* @__PURE__ */ o(I, { size: "large", weight: "bold", color: c ? "secondary" : "primary", children: e.name })
1705
+ children: /* @__PURE__ */ o(b, { size: "large", weight: "bold", color: m ? "secondary" : "primary", children: e.name })
1484
1706
  }
1485
1707
  ),
1486
- e.published ? null : /* @__PURE__ */ y(I, { size: "x-small", color: "secondary", children: [
1708
+ e.published ? null : /* @__PURE__ */ _(b, { size: "x-small", color: "secondary", children: [
1487
1709
  " ",
1488
- a("(unpublished)")
1710
+ g("moduleUnpublishedBadge")
1489
1711
  ] })
1490
1712
  ] }),
1491
- /* @__PURE__ */ o(S, { as: "div", children: /* @__PURE__ */ o(us, { module: e, today: r }) })
1713
+ /* @__PURE__ */ o(y, { as: "div", children: /* @__PURE__ */ o(Xr, { module: e, today: r }) }),
1714
+ /* @__PURE__ */ o(Jr, { module: e })
1492
1715
  ] }),
1493
- e.progress ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(ts, { status: e.progress.status }) }) : null,
1494
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1495
- At,
1716
+ e.progress ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(jr, { status: e.progress.status }) }) : null,
1717
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1718
+ zt,
1496
1719
  {
1497
1720
  size: "small",
1498
1721
  withBorder: !0,
1499
1722
  withBackground: !1,
1500
- screenReaderLabel: t ? a("Collapse %{name}", { name: e.name }) : a("Expand %{name}", { name: e.name }),
1723
+ screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1501
1724
  "aria-expanded": t,
1502
- "aria-controls": De(e.id),
1725
+ "aria-controls": Ue(e.id),
1503
1726
  onClick: () => n(e.id),
1504
1727
  "data-testid": `toggle-module-${e.id}`,
1505
- children: t ? /* @__PURE__ */ o($t, {}) : /* @__PURE__ */ o(je, {})
1728
+ children: t ? /* @__PURE__ */ o(Ht, {}) : /* @__PURE__ */ o(et, {})
1506
1729
  }
1507
1730
  ) })
1508
1731
  ] }),
1509
- /* @__PURE__ */ o(ds, { module: e }),
1510
- /* @__PURE__ */ o("div", { id: De(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1511
- cs,
1732
+ /* @__PURE__ */ o("div", { id: Ue(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1733
+ eo,
1512
1734
  {
1513
1735
  module: e,
1514
1736
  state: s,
1515
1737
  today: r,
1516
- showDiagnostics: i
1738
+ navigation: i,
1739
+ showDiagnostics: u
1517
1740
  }
1518
1741
  ) : null })
1519
1742
  ]
1520
1743
  }
1521
1744
  );
1522
1745
  }
1523
- const gs = ze(ms);
1524
- function hs({
1746
+ const no = Ye(to);
1747
+ function so({
1525
1748
  counts: e,
1526
1749
  itemsMode: t,
1527
1750
  loadedModules: n
1528
1751
  }) {
1529
1752
  const s = e.listModules + e.listModuleItems;
1530
1753
  return /* @__PURE__ */ o(
1531
- S,
1754
+ y,
1532
1755
  {
1533
1756
  as: "div",
1534
1757
  background: "secondary",
@@ -1537,25 +1760,25 @@ function hs({
1537
1760
  padding: "x-small small",
1538
1761
  margin: "0 0 small 0",
1539
1762
  "data-testid": "dev-diagnostics",
1540
- children: /* @__PURE__ */ y(P, { gap: "medium", wrap: "wrap", children: [
1541
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(I, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1542
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1763
+ children: /* @__PURE__ */ _(T, { gap: "medium", wrap: "wrap", children: [
1764
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1765
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1543
1766
  "listModules: ",
1544
1767
  e.listModules
1545
1768
  ] }) }),
1546
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1769
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1547
1770
  "listModuleItems: ",
1548
1771
  e.listModuleItems
1549
1772
  ] }) }),
1550
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1773
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1551
1774
  "total: ",
1552
1775
  s
1553
1776
  ] }) }),
1554
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1777
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1555
1778
  "itemsMode: ",
1556
1779
  t ?? "probing…"
1557
1780
  ] }) }),
1558
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(I, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1781
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1559
1782
  "modules loaded: ",
1560
1783
  n
1561
1784
  ] }) })
@@ -1563,7 +1786,7 @@ function hs({
1563
1786
  }
1564
1787
  );
1565
1788
  }
1566
- function ar({
1789
+ function oi({
1567
1790
  data: e,
1568
1791
  courseName: t,
1569
1792
  courseContext: n,
@@ -1571,112 +1794,113 @@ function ar({
1571
1794
  requestCounts: r,
1572
1795
  showDiagnostics: i = r !== void 0,
1573
1796
  initialFilter: u = "all",
1574
- as: a = "div",
1575
- headingLevel: d = "h2"
1797
+ navigation: a,
1798
+ as: c = "div",
1799
+ headingLevel: g = "h2"
1576
1800
  }) {
1577
1801
  const {
1578
- modules: c,
1579
- hasNextPage: l,
1580
- fetchNextPage: m,
1581
- isFetchingNextPage: M,
1582
- isLoading: _,
1802
+ modules: l,
1803
+ hasNextPage: m,
1804
+ fetchNextPage: M,
1805
+ isFetchingNextPage: p,
1806
+ isLoading: f,
1583
1807
  error: h,
1584
- itemsMode: f,
1585
- expandedModuleIds: w,
1808
+ itemsMode: P,
1809
+ expandedModuleIds: C,
1586
1810
  toggleModule: v,
1587
1811
  expandModule: A,
1588
- collapseModule: N,
1589
- getItems: ne
1590
- } = e, { t: E, locale: z } = R(), G = ge(z), K = t ?? E("Course modules"), [q, H] = X(""), [O, Y] = X(u), V = B(null), se = ke(), U = B(!1), [re] = X(() => /* @__PURE__ */ new Date()), $ = s ?? re;
1591
- ae(() => {
1592
- var x;
1593
- !U.current || M || (U.current = !1, Oe(E("%{count} modules loaded", { count: String(c.length) })), (x = V.current) == null || x.focus());
1594
- }, [M, c.length, E]);
1595
- const Q = L(
1596
- () => c.filter(
1597
- (x) => Le(x, q, z) && Ae(x, O, $)
1812
+ collapseModule: se,
1813
+ getItems: re
1814
+ } = e, { t: E, locale: F } = k(), H = t ?? E("pageTitle"), [q, K] = Z(""), [z, B] = Z(u), V = $(null), oe = je(), U = $(!1), [ie] = Z(() => /* @__PURE__ */ new Date()), O = s ?? ie;
1815
+ de(() => {
1816
+ var w;
1817
+ !U.current || p || (U.current = !1, Qe(E("modulesLoadedAnnouncement", { count: l.length })), (w = V.current) == null || w.focus());
1818
+ }, [p, l.length, E]);
1819
+ const G = N(
1820
+ () => l.filter(
1821
+ (w) => Fe(w, q, F) && Re(w, z, O)
1598
1822
  ),
1599
- [c, q, O, $, z]
1600
- ), oe = L(() => {
1601
- const x = c.filter((j) => Le(j, q, z)), T = (j) => x.filter((F) => Ae(F, j, $)).length;
1823
+ [l, q, z, O, F]
1824
+ ), le = N(() => {
1825
+ const w = l.filter((j) => Fe(j, q, F)), L = (j) => w.filter((R) => Re(R, j, O)).length;
1602
1826
  return {
1603
- all: x.length,
1604
- in_progress: T("in_progress"),
1605
- complete: T("complete"),
1606
- due_this_week: T("due_this_week"),
1607
- missing: T("missing")
1827
+ all: w.length,
1828
+ in_progress: L("in_progress"),
1829
+ complete: L("complete"),
1830
+ due_this_week: L("due_this_week"),
1831
+ missing: L("missing")
1608
1832
  };
1609
- }, [c, q, $, z]), b = () => {
1610
- for (const x of Q) A(x.id);
1611
- }, p = () => {
1612
- for (const x of w) N(x);
1613
- }, C = c.length > 0 && Q.length === 0 && !_ && !h;
1614
- return /* @__PURE__ */ y(S, { as: a, display: "block", "data-testid": "modules-list", children: [
1615
- n ? /* @__PURE__ */ y(S, { as: "div", children: [
1616
- /* @__PURE__ */ o(I, { size: "small", color: "brand", children: n }),
1617
- /* @__PURE__ */ y(I, { size: "small", color: "secondary", children: [
1833
+ }, [l, q, O, F]), S = () => {
1834
+ for (const w of G) A(w.id);
1835
+ }, I = () => {
1836
+ for (const w of C) se(w);
1837
+ }, x = l.length > 0 && G.length === 0 && !f && !h;
1838
+ return /* @__PURE__ */ _(y, { as: c, display: "block", "data-testid": "modules-list", children: [
1839
+ n ? /* @__PURE__ */ _(y, { as: "div", children: [
1840
+ /* @__PURE__ */ o(b, { size: "small", color: "brand", children: n }),
1841
+ /* @__PURE__ */ _(b, { size: "small", color: "secondary", children: [
1618
1842
  " ",
1619
1843
  "/",
1620
1844
  " "
1621
1845
  ] }),
1622
- /* @__PURE__ */ o(I, { size: "small", color: "secondary", children: K })
1846
+ /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: H })
1623
1847
  ] }) : null,
1624
- /* @__PURE__ */ o(Be, { level: d, margin: "x-small 0 medium 0", children: K }),
1848
+ /* @__PURE__ */ o(Ve, { level: g, margin: "x-small 0 medium 0", children: H }),
1625
1849
  r ? /* @__PURE__ */ o(
1626
- hs,
1850
+ so,
1627
1851
  {
1628
1852
  counts: r,
1629
- itemsMode: f,
1630
- loadedModules: c.length
1853
+ itemsMode: P,
1854
+ loadedModules: l.length
1631
1855
  }
1632
1856
  ) : null,
1633
- /* @__PURE__ */ y(P, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1634
- /* @__PURE__ */ o(P.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1635
- Qt,
1857
+ /* @__PURE__ */ _(T, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1858
+ /* @__PURE__ */ o(T.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1859
+ en,
1636
1860
  {
1637
- renderLabel: E("Search module names"),
1638
- placeholder: E("Search…"),
1639
- "aria-describedby": se,
1861
+ renderLabel: E("moduleSearchLabel"),
1862
+ placeholder: E("searchPlaceholder"),
1863
+ "aria-describedby": oe,
1640
1864
  value: q,
1641
- onChange: (x, T) => H(T),
1642
- renderBeforeInput: /* @__PURE__ */ o(Bt, { inline: !1 }),
1865
+ onChange: (w, L) => K(L),
1866
+ renderBeforeInput: /* @__PURE__ */ o(Kt, { inline: !1 }),
1643
1867
  "data-testid": "modules-search"
1644
1868
  }
1645
1869
  ) }),
1646
- /* @__PURE__ */ o(P.Item, { shouldGrow: !0 }),
1647
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ y(
1648
- fe,
1870
+ /* @__PURE__ */ o(T.Item, { shouldGrow: !0 }),
1871
+ /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(
1872
+ Me,
1649
1873
  {
1650
1874
  placement: "bottom end",
1651
- trigger: /* @__PURE__ */ o(Z, { renderIcon: /* @__PURE__ */ o(je, {}), "data-testid": "expand-collapse-trigger", children: E("Expand / collapse") }),
1875
+ trigger: /* @__PURE__ */ o(X, { renderIcon: /* @__PURE__ */ o(et, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
1652
1876
  children: [
1653
- /* @__PURE__ */ o(fe.Item, { onSelect: b, "data-testid": "expand-all", children: E("Expand all") }),
1654
- /* @__PURE__ */ o(fe.Item, { onSelect: p, "data-testid": "collapse-all", children: E("Collapse all") })
1877
+ /* @__PURE__ */ o(Me.Item, { onSelect: S, "data-testid": "expand-all", children: E("expandAll") }),
1878
+ /* @__PURE__ */ o(Me.Item, { onSelect: I, "data-testid": "collapse-all", children: E("collapseAll") })
1655
1879
  ]
1656
1880
  }
1657
1881
  ) })
1658
1882
  ] }),
1659
- /* @__PURE__ */ o(S, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(I, { size: "x-small", color: "secondary", id: se, children: E("Search matches module names only — items of collapsed modules are not loaded.") }) }),
1660
- /* @__PURE__ */ o(Vn, { value: O, onChange: Y, counts: oe }),
1661
- /* @__PURE__ */ y(S, { as: "div", margin: "medium 0 0 0", children: [
1883
+ /* @__PURE__ */ o(y, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(b, { size: "x-small", color: "secondary", id: oe, children: E("searchScopeHint") }) }),
1884
+ /* @__PURE__ */ o(Ur, { value: z, onChange: B, counts: le }),
1885
+ /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
1662
1886
  h ? (
1663
1887
  // `liveRegion` is what makes this announce; without it InstUI's Alert
1664
1888
  // sets no role and no aria-live. See the same fix in ModuleCard.
1665
1889
  /* @__PURE__ */ o(
1666
- $e,
1890
+ Ke,
1667
1891
  {
1668
1892
  variant: "error",
1669
1893
  margin: "0 0 small 0",
1670
- liveRegion: Ue,
1894
+ liveRegion: He,
1671
1895
  liveRegionPoliteness: "assertive",
1672
1896
  "data-testid": "modules-error",
1673
- children: E("Modules failed to load: %{message}", { message: h.message })
1897
+ children: E("modulesLoadErrorAlert", { message: h.message })
1674
1898
  }
1675
1899
  )
1676
1900
  ) : null,
1677
- _ ? /* @__PURE__ */ o(S, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(We, { renderTitle: E("Loading modules") }) }) : null,
1678
- !_ && !h && c.length === 0 ? /* @__PURE__ */ o(
1679
- S,
1901
+ f ? /* @__PURE__ */ o(y, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(tt, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1902
+ !f && !h && l.length === 0 ? /* @__PURE__ */ o(
1903
+ y,
1680
1904
  {
1681
1905
  as: "div",
1682
1906
  background: "secondary",
@@ -1684,11 +1908,11 @@ function ar({
1684
1908
  padding: "large",
1685
1909
  textAlign: "center",
1686
1910
  "data-testid": "modules-empty",
1687
- children: /* @__PURE__ */ o(I, { color: "secondary", children: E("This course has no modules.") })
1911
+ children: /* @__PURE__ */ o(b, { color: "secondary", children: E("noModulesEmptyState") })
1688
1912
  }
1689
1913
  ) : null,
1690
- C ? /* @__PURE__ */ y(
1691
- S,
1914
+ x ? /* @__PURE__ */ _(
1915
+ y,
1692
1916
  {
1693
1917
  as: "div",
1694
1918
  background: "secondary",
@@ -1697,59 +1921,56 @@ function ar({
1697
1921
  textAlign: "center",
1698
1922
  "data-testid": "modules-filtered-empty",
1699
1923
  children: [
1700
- /* @__PURE__ */ o(S, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(I, { color: "secondary", children: E("None of the %{count} loaded modules match this filter.", {
1701
- count: G.format(c.length)
1702
- }) }) }),
1924
+ /* @__PURE__ */ o(y, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(b, { color: "secondary", children: E("filteredEmptyState", { count: l.length }) }) }),
1703
1925
  /* @__PURE__ */ o(
1704
- Z,
1926
+ X,
1705
1927
  {
1706
1928
  size: "small",
1707
1929
  onClick: () => {
1708
- Y("all"), H(""), U.current = !0;
1930
+ B("all"), K(""), U.current = !0;
1709
1931
  },
1710
- children: E("Clear filters")
1932
+ children: E("clearFilters")
1711
1933
  }
1712
1934
  )
1713
1935
  ]
1714
1936
  }
1715
1937
  ) : null,
1716
- /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: Q.map((x) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1717
- gs,
1938
+ /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: G.map((w) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1939
+ no,
1718
1940
  {
1719
- module: x,
1720
- expanded: w.includes(x.id),
1941
+ module: w,
1942
+ expanded: C.includes(w.id),
1721
1943
  onToggle: v,
1722
- itemsState: ne(x.id),
1723
- today: $,
1944
+ itemsState: re(w.id),
1945
+ today: O,
1724
1946
  showDiagnostics: i,
1725
- headingLevel: d === "h1" ? "h2" : "h3"
1947
+ navigation: a,
1948
+ headingLevel: g === "h1" ? "h2" : "h3"
1726
1949
  }
1727
- ) }, x.id)) })
1950
+ ) }, w.id)) })
1728
1951
  ] }),
1729
- l ? /* @__PURE__ */ o(S, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1730
- Z,
1952
+ m ? /* @__PURE__ */ o(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1953
+ X,
1731
1954
  {
1732
1955
  color: "primary",
1733
1956
  onClick: () => {
1734
- U.current = !0, m();
1957
+ U.current = !0, M();
1735
1958
  },
1736
- interaction: M ? "disabled" : "enabled",
1959
+ interaction: p ? "disabled" : "enabled",
1737
1960
  "data-testid": "load-more-modules",
1738
- children: M ? E("Loading more modules…") : E("Load more modules (%{count} loaded)", { count: G.format(c.length) })
1961
+ children: p ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: l.length })
1739
1962
  }
1740
- ) }) : c.length > 0 ? /* @__PURE__ */ o(S, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1741
- I,
1963
+ ) }) : l.length > 0 ? /* @__PURE__ */ o(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1964
+ b,
1742
1965
  {
1743
1966
  size: "x-small",
1744
1967
  color: "secondary",
1745
1968
  "data-testid": "modules-all-loaded",
1746
- elementRef: (x) => {
1747
- V.current = x;
1969
+ elementRef: (w) => {
1970
+ V.current = w;
1748
1971
  },
1749
1972
  tabIndex: -1,
1750
- children: E("All %{count} modules in this course are loaded.", {
1751
- count: G.format(c.length)
1752
- })
1973
+ children: E("allModulesLoaded", { count: l.length })
1753
1974
  }
1754
1975
  ) }) : null
1755
1976
  ] });
@@ -1763,24 +1984,24 @@ const J = [
1763
1984
  "external_url",
1764
1985
  "external_tool",
1765
1986
  "sub_header"
1766
- ], Ie = [
1987
+ ], _e = [
1767
1988
  "not_started",
1768
1989
  "in_progress",
1769
1990
  "all_submitted",
1770
1991
  "all_graded",
1771
1992
  "missing",
1772
1993
  "locked"
1773
- ], Re = [
1994
+ ], Oe = [
1774
1995
  "must_view",
1775
1996
  "must_submit",
1776
1997
  "must_contribute",
1777
1998
  "must_mark_done",
1778
1999
  "min_score",
1779
2000
  "min_percentage"
1780
- ], fs = ["assignment", "quiz", "discussion"], ps = ["assignment", "quiz", "discussion"], Is = Date.UTC(2025, 0, 6), bs = 864e5, yt = "1", Pt = (e) => new Date(Is + e * bs).toISOString(), Ms = (e, t) => {
1781
- const n = Re[Math.floor(t / 3) % Re.length];
2001
+ ], ro = ["assignment", "quiz", "discussion"], oo = ["external_url", "external_tool"], io = ["assignment", "quiz", "discussion"], lo = Date.UTC(2025, 0, 6), ao = 864e5, Ie = "1", Nt = (e) => new Date(lo + e * ao).toISOString(), uo = (e, t) => {
2002
+ const n = Oe[Math.floor(t / 3) % Oe.length];
1782
2003
  return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
1783
- }, xt = (e, t) => t % 3 === 0 && e !== "sub_header", wt = (e) => Ie[(e - 1) % Ie.length], _s = (e, t) => !ps.includes(e) || e === "discussion" && Math.floor(t / J.length) % 2 === 1 ? null : 5 + t % 4 * 5, Ss = (e, t, n, s) => {
2004
+ }, Dt = (e, t) => t % 3 === 0 && e !== "sub_header", kt = (e) => _e[(e - 1) % _e.length], co = (e, t) => !io.includes(e) || e === "discussion" && Math.floor(t / J.length) % 2 === 1 ? null : 5 + t % 4 * 5, mo = (e, t, n, s) => {
1784
2005
  const r = n ? "in_progress" : "not_started";
1785
2006
  switch (e) {
1786
2007
  case "locked":
@@ -1796,58 +2017,59 @@ const J = [
1796
2017
  case "in_progress":
1797
2018
  return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
1798
2019
  }
1799
- }, ys = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, Ps = (e, t, n, s, r, i) => {
1800
- const u = String(e), a = String(e * 1e3 + t + 1), d = J[n % J.length], c = d === "sub_header", l = fs.includes(d) && (n % 4 === 0 || s === "missing"), m = xt(d, n) ? Ms(a, n) : null;
2020
+ }, go = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, fo = (e, t, n, s, r, i) => {
2021
+ const u = String(e), a = String(e * 1e3 + t + 1), c = J[n % J.length], g = c === "sub_header", l = ro.includes(c) && (n % 4 === 0 || s === "missing"), m = Dt(c, n) ? uo(a, n) : null;
1801
2022
  return {
1802
2023
  id: a,
1803
2024
  moduleId: u,
1804
- title: `${d} ${t + 1}`,
1805
- type: d,
2025
+ title: `${c} ${t + 1}`,
2026
+ type: c,
1806
2027
  position: t + 1,
1807
2028
  indent: t % 5 === 4 ? 1 : 0,
1808
2029
  // 1 in 7 unpublished, so a teacher view always has something to grey out.
1809
2030
  // Same rule as the module: a student's page contains no unpublished items,
1810
2031
  // so only a teacher fixture greys any out.
1811
2032
  published: i === "teacher" ? n % 7 !== 0 : !0,
1812
- url: c ? null : `/courses/${yt}/modules/items/${a}`,
2033
+ url: g ? null : `/courses/${Ie}/modules/items/${a}`,
2034
+ newTab: oo.includes(c) && n % 2 === 0,
1813
2035
  completionRequirement: m,
1814
- dueAt: l ? Pt(n % 90) : null,
2036
+ dueAt: l ? Nt(n % 90) : null,
1815
2037
  status: s,
1816
2038
  pointsPossible: r,
1817
2039
  // Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
1818
2040
  // handful per fixture proves the escape hatch survives a round trip, and
1819
2041
  // every other item must carry no `extensions` key at all.
1820
- extensions: Ze(
2042
+ extensions: it(
1821
2043
  void 0,
1822
2044
  n % 37 === 0 ? 5 + n % 4 * 10 : null
1823
2045
  )
1824
2046
  };
1825
- }, xs = (e, t, n, s) => {
1826
- const r = wt(e), i = [];
2047
+ }, ho = (e, t, n, s) => {
2048
+ const r = kt(e), i = [];
1827
2049
  let u = 0;
1828
2050
  for (let a = 0; a < t; a += 1) {
1829
- const d = n + a, c = J[d % J.length], l = _s(c, d), m = l !== null, M = m ? u++ : a, _ = Ss(r, m, xt(c, d), M);
1830
- i.push(Ps(e, a, d, _, l, s));
2051
+ const c = n + a, g = J[c % J.length], l = co(g, c), m = l !== null, M = m ? u++ : a, p = mo(r, m, Dt(g, c), M);
2052
+ i.push(fo(e, a, c, p, l, s));
1831
2053
  }
1832
2054
  return i;
1833
- }, ws = (e, t, n) => {
1834
- const s = wt(e);
2055
+ }, po = (e, t, n) => {
2056
+ const s = kt(e);
1835
2057
  return s === "locked" || s === "not_started" ? s : t.length === 0 ? "not_started" : !t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 ? "in_progress" : s;
1836
- }, Es = (e) => {
2058
+ }, Io = (e) => {
1837
2059
  const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
1838
2060
  return t.length > 0 ? t[t.length - 1] : null;
1839
- }, Cs = (e, t, n) => {
1840
- const s = t.filter((d) => d.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(ys).length, r), u = t.filter((d) => d.status === "missing").length;
2061
+ }, bo = (e, t, n) => {
2062
+ const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(go).length, r), u = t.filter((c) => c.status === "missing").length;
1841
2063
  return {
1842
- status: ws(e, t, u),
2064
+ status: po(e, t, u),
1843
2065
  requirementsMet: i,
1844
2066
  requirementCount: r,
1845
2067
  // Derived from the clamped pair, so the bar and the fraction always agree.
1846
2068
  percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
1847
- latestDueAt: Es(t),
2069
+ latestDueAt: Io(t),
1848
2070
  missingCount: u
1849
2071
  };
1850
- }, vs = (e, t, n) => {
2072
+ }, Mo = (e, t, n) => {
1851
2073
  const s = e % 2 === 0 ? null : 1;
1852
2074
  return {
1853
2075
  id: String(e),
@@ -1856,17 +2078,17 @@ const J = [
1856
2078
  // A student sees only published modules; publish state varies for a teacher.
1857
2079
  published: n === "teacher" ? e % 4 !== 0 : !0,
1858
2080
  itemCount: t.length,
1859
- unlockAt: e % 5 === 0 ? Pt(e) : null,
2081
+ unlockAt: e % 5 === 0 ? Nt(e) : null,
1860
2082
  prerequisiteModuleIds: e > 1 && e % 3 === 0 ? [String(e - 1)] : [],
1861
2083
  requirementCount: s,
1862
2084
  requireSequentialProgress: e % 6 === 0,
1863
2085
  completionRequirements: t.flatMap(
1864
2086
  (r) => r.completionRequirement ? [r.completionRequirement] : []
1865
2087
  ),
1866
- progress: Cs(e, t, s)
2088
+ progress: bo(e, t, s)
1867
2089
  };
1868
2090
  };
1869
- function Ts(e) {
2091
+ function So(e) {
1870
2092
  return {
1871
2093
  courseId: e.courseId,
1872
2094
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -1878,89 +2100,145 @@ function Ts(e) {
1878
2100
  )
1879
2101
  };
1880
2102
  }
1881
- function he(e, t = {}) {
1882
- const n = t.view ?? "student", s = t.courseId ?? yt, r = [], i = {};
2103
+ function be(e, t = {}) {
2104
+ const n = t.view ?? "student", s = t.courseId ?? Ie, r = [], i = {};
1883
2105
  let u = 0;
1884
- e.forEach((d, c) => {
1885
- const l = c + 1, m = xs(l, d, u, n);
1886
- u += d, r.push(vs(l, m, n)), i[String(l)] = m;
2106
+ e.forEach((c, g) => {
2107
+ const l = g + 1, m = ho(l, c, u, n);
2108
+ u += c, r.push(Mo(l, m, n)), i[String(l)] = m;
1887
2109
  });
1888
2110
  const a = { courseId: s, modules: r, itemsByModuleId: i };
1889
- return n === "teacher" ? Ts(a) : a;
2111
+ return n === "teacher" ? So(a) : a;
1890
2112
  }
1891
- const Ns = Ie.length, As = 8, Ls = 120, Ds = 25, Rs = 250, qe = 8;
1892
- function ur() {
1893
- return he(Array.from({ length: Ns }, () => As));
2113
+ const ce = (e) => `/courses/${Ie}/modules/items/${e}`, yo = _e.length, _o = 8, To = 120, wo = 25, Po = 250, $e = 8;
2114
+ function ii() {
2115
+ return be(Array.from({ length: yo }, () => _o));
1894
2116
  }
1895
- function dr() {
1896
- return he(Array.from({ length: Ls }, () => Ds));
2117
+ function li() {
2118
+ return be(Array.from({ length: To }, () => wo));
1897
2119
  }
1898
- function cr() {
1899
- return he([
1900
- qe,
1901
- Rs,
1902
- qe
2120
+ function ai() {
2121
+ return be([
2122
+ $e,
2123
+ Po,
2124
+ $e
1903
2125
  ]);
1904
2126
  }
1905
- function mr() {
1906
- return he([]);
2127
+ function ui() {
2128
+ return be([]);
2129
+ }
2130
+ function ci() {
2131
+ const t = [
2132
+ { title: "Reading: limits from the left and the right", type: "page", url: ce(1) },
2133
+ {
2134
+ title: "Desmos: interactive limit explorer",
2135
+ type: "external_url",
2136
+ url: ce(2),
2137
+ newTab: !0
2138
+ },
2139
+ { title: "Practice", type: "sub_header", url: null },
2140
+ { title: "Worksheet with no destination", type: "assignment", url: null },
2141
+ {
2142
+ title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2143
+ type: "assignment",
2144
+ url: ce(5)
2145
+ },
2146
+ { title: "Unit test", type: "quiz", url: ce(6), status: "locked" }
2147
+ ].map((n, s) => ({
2148
+ id: String(s + 1),
2149
+ moduleId: "1",
2150
+ position: s + 1,
2151
+ indent: 0,
2152
+ published: !0,
2153
+ newTab: !1,
2154
+ status: "not_started",
2155
+ ...n
2156
+ }));
2157
+ return {
2158
+ courseId: Ie,
2159
+ modules: [
2160
+ {
2161
+ id: "1",
2162
+ name: "Limits and Continuity",
2163
+ position: 1,
2164
+ published: !0,
2165
+ itemCount: t.length,
2166
+ prerequisiteModuleIds: [],
2167
+ requireSequentialProgress: !1
2168
+ }
2169
+ ],
2170
+ itemsByModuleId: { 1: t }
2171
+ };
1907
2172
  }
1908
2173
  export {
1909
- Ke as CompletionRequirementSchema,
1910
- Ht as CompletionRequirementTypeSchema,
1911
- dt as DEFAULT_INLINE_THRESHOLD,
1912
- Cn as DEFAULT_ITEM_CONCURRENCY,
1913
- ut as DEFAULT_ITEM_PAGE_SIZE,
1914
- k as DEFAULT_LOCALE,
1915
- _e as DEFAULT_PAGE_SIZE,
1916
- ct as DEFAULT_RETAIN_COLLAPSED_LIMIT,
1917
- ce as DEFAULT_STALE_TIME_MS,
1918
- Xe as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
1919
- yt as FIXTURE_COURSE_ID,
1920
- Vn as FilterChips,
1921
- wn as GET_MODULES,
1922
- En as GET_MODULE_ITEMS,
1923
- pe as INLINE_ITEM_LIMIT,
1924
- Me as INLINE_QUERY_NODE_BUDGET,
1925
- tn as InMemoryCourseMismatchError,
1926
- Wn as MODULES_FILTER_IDS,
1927
- gs as ModuleCard,
1928
- ls as ModuleItemRow,
1929
- He as ModuleItemSchema,
1930
- ns as ModuleItemStatusPill,
1931
- Wt as ModuleItemStatusSchema,
1932
- jt as ModuleItemTypeSchema,
1933
- Jt as ModuleItemsPageSchema,
1934
- Vt as ModuleProgressSchema,
1935
- Xt as ModuleSchema,
1936
- ts as ModuleStatusPill,
1937
- Kt as ModuleStatusSchema,
1938
- lr as ModulesI18nProvider,
1939
- ar as ModulesList,
1940
- Zt as ModulesPageSchema,
1941
- Ve as PageInfoSchema,
1942
- Je as PartialCanvasResponseError,
1943
- he as buildFixture,
1944
- mr as courseEmpty,
1945
- cr as courseFatModule,
1946
- dr as courseLarge,
1947
- ur as courseSmall,
1948
- tr as createCanvasGraphqlAdapter,
1949
- er as createInMemoryAdapter,
1950
- pt as defaultTranslate,
1951
- Kn as filterLabel,
1952
- en as getEstimatedDurationMinutes,
1953
- ir as invalidateCourse,
1954
- rr as invalidateModuleItems,
1955
- or as invalidateModuleList,
1956
- es as moduleItemStatusLabel,
1957
- mt as moduleItemsPrefix,
1958
- Jn as moduleStatusLabel,
2174
+ nt as CompletionRequirementSchema,
2175
+ rn as CompletionRequirementTypeSchema,
2176
+ Mt as DEFAULT_INLINE_THRESHOLD,
2177
+ On as DEFAULT_ITEM_CONCURRENCY,
2178
+ bt as DEFAULT_ITEM_PAGE_SIZE,
2179
+ ne as DEFAULT_LOCALE,
2180
+ Pe as DEFAULT_PAGE_SIZE,
2181
+ St as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2182
+ pe as DEFAULT_STALE_TIME_MS,
2183
+ ot as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2184
+ Ie as FIXTURE_COURSE_ID,
2185
+ Ur as FilterChips,
2186
+ kn as GET_MODULES,
2187
+ qn as GET_MODULE_ITEMS,
2188
+ Se as INLINE_ITEM_LIMIT,
2189
+ we as INLINE_QUERY_NODE_BUDGET,
2190
+ dn as InMemoryCourseMismatchError,
2191
+ Rr as MODULES_FILTER_IDS,
2192
+ no as ModuleCard,
2193
+ Vr as ModuleItemRow,
2194
+ st as ModuleItemSchema,
2195
+ Yr as ModuleItemStatusPill,
2196
+ nn as ModuleItemStatusSchema,
2197
+ tn as ModuleItemTypeSchema,
2198
+ un as ModuleItemsPageSchema,
2199
+ Zr as ModuleNumberBadge,
2200
+ on as ModuleProgressSchema,
2201
+ ln as ModuleSchema,
2202
+ jr as ModuleStatusPill,
2203
+ sn as ModuleStatusSchema,
2204
+ Ko as ModulesConfigProvider,
2205
+ zn as ModulesConfigSchema,
2206
+ ri as ModulesI18nProvider,
2207
+ oi as ModulesList,
2208
+ an as ModulesPageSchema,
2209
+ rt as PageInfoSchema,
2210
+ lt as PartialCanvasResponseError,
2211
+ Rn as RegistryEntrySchema,
2212
+ he as baseModulesConfig,
2213
+ be as buildFixture,
2214
+ ui as courseEmpty,
2215
+ ai as courseFatModule,
2216
+ ci as courseItemLinks,
2217
+ li as courseLarge,
2218
+ ii as courseSmall,
2219
+ Ho as createCanvasGraphqlAdapter,
2220
+ Qo as createInMemoryAdapter,
2221
+ Et as createTranslate,
2222
+ Er as defaultTranslate,
2223
+ Fr as filterLabel,
2224
+ cn as getEstimatedDurationMinutes,
2225
+ si as invalidateCourse,
2226
+ ti as invalidateModuleItems,
2227
+ ni as invalidateModuleList,
2228
+ Y as mergeRegistry,
2229
+ Gr as moduleItemStatusLabel,
2230
+ yt as moduleItemsPrefix,
2231
+ Br as moduleStatusLabel,
1959
2232
  te as modulesKeys,
1960
- vn as modulesListPrefix,
1961
- nr as useModuleItems,
1962
- Tn as useModules,
1963
- R as useModulesI18n,
1964
- sr as useModulesPageData,
1965
- Ze as withEstimatedDurationMinutes
2233
+ $n as modulesListPrefix,
2234
+ Xo as partialModulesConfig,
2235
+ Fn as registrySchema,
2236
+ Un as resolveModulesConfig,
2237
+ Jo as useModuleItems,
2238
+ Bn as useModules,
2239
+ Vo as useModulesConfig,
2240
+ k as useModulesI18n,
2241
+ ei as useModulesPageData,
2242
+ Zo as visibleEntries,
2243
+ it as withEstimatedDurationMinutes
1966
2244
  };