@instructure/platform-modules 1.16.1 → 1.17.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 (45) hide show
  1. package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
  2. package/dist/adapters/canvasGraphql/normalize.d.ts +5 -0
  3. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  4. package/dist/adapters/canvasGraphql/queries.d.ts +5 -0
  5. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  6. package/dist/adapters/inMemory.d.ts.map +1 -1
  7. package/dist/adapters/types.d.ts +6 -0
  8. package/dist/adapters/types.d.ts.map +1 -1
  9. package/dist/cache/keys.d.ts +3 -0
  10. package/dist/cache/keys.d.ts.map +1 -1
  11. package/dist/chunks/ModulesProgressBar-BFKPmBau.js +2727 -0
  12. package/dist/components/HighlightedText.d.ts +13 -0
  13. package/dist/components/HighlightedText.d.ts.map +1 -0
  14. package/dist/components/ModuleCard.d.ts +1 -0
  15. package/dist/components/ModuleCard.d.ts.map +1 -1
  16. package/dist/components/ModuleItemRow.d.ts +1 -0
  17. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  18. package/dist/components/ModulesList.d.ts.map +1 -1
  19. package/dist/components/ModulesList.stories.d.ts +5 -0
  20. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  21. package/dist/edit.js +9 -9
  22. package/dist/hooks/constants.d.ts +2 -0
  23. package/dist/hooks/constants.d.ts.map +1 -1
  24. package/dist/hooks/queryOptions.d.ts +2 -0
  25. package/dist/hooks/queryOptions.d.ts.map +1 -1
  26. package/dist/hooks/useItemsMode.d.ts +1 -0
  27. package/dist/hooks/useItemsMode.d.ts.map +1 -1
  28. package/dist/hooks/useModules.d.ts +1 -0
  29. package/dist/hooks/useModules.d.ts.map +1 -1
  30. package/dist/hooks/useModulesPageData.d.ts +11 -0
  31. package/dist/hooks/useModulesPageData.d.ts.map +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +1206 -1122
  35. package/dist/types/domain.d.ts +5 -0
  36. package/dist/types/domain.d.ts.map +1 -1
  37. package/dist/types/filterClause.d.ts +1 -0
  38. package/dist/types/filterClause.d.ts.map +1 -1
  39. package/dist/types/index.d.ts +1 -1
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/dist/types/schemas.d.ts +2 -1
  42. package/dist/types/schemas.d.ts.map +1 -1
  43. package/locales/en.json +6 -0
  44. package/package.json +1 -1
  45. package/dist/chunks/ModulesProgressBar-B7Lo3-k0.js +0 -2550
package/dist/index.js CHANGED
@@ -1,49 +1,50 @@
1
- import { w as tt, I as yn, M as Tn, a as Pn, b as bn, i as Mt, c as Cn, v as nt, h as vn, o as He, m as re, d as wn, e as Ln, g as An, f as Rn, j as kn, u as $, k as ve, D as On, l as ye, n as qn, p as it, q as rt, r as Dn, s as zn, t as Nn, x as xn, y as $n, z as Dt, A as Un, B as zt, C as Nt, E as Fn, F as Bn, G as Gn, H as Wn, J as Hn, K as Yn, L as jn, N as Qn, O as Kn, P as Vn, Q as Zn, R as Xn, S as Jn, T as Te } from "./chunks/ModulesProgressBar-B7Lo3-k0.js";
2
- import { a9 as lo, U as ao, V as uo, ap as co, aq as mo, ar as go, aG as po, as as fo, at as ho, au as Mo, av as _o, ac as Eo, a5 as Io, W as So, ae as yo, a8 as To, aB as Po, ah as bo, ai as Co, Y as vo, aD as wo, Z as Lo, _ as Ao, $ as Ro, a0 as ko, a2 as Oo, a7 as qo, a1 as Do, a3 as zo, a4 as No, aj as xo, al as $o, aa as Uo, aF as Fo, ab as Bo, aH as Go, ad as Wo, a6 as Ho, af as Yo, ax as jo, ag as Qo, aC as Ko, ay as Vo, aE as Zo, az as Xo, aA as Jo, ak as el, X as tl, am as nl, an as il, aw as rl, ao as sl } from "./chunks/ModulesProgressBar-B7Lo3-k0.js";
3
- import { canvasFetch as _t } from "@instructure/platform-canvas-fetch";
4
- import { z as Et } from "zod";
5
- import { gql as J } from "graphql-tag";
6
- import { jsx as s, jsxs as m, Fragment as Y } from "react/jsx-runtime";
7
- import { Pill as ei } from "@instructure/ui-pill/v11_7";
8
- import { useQueryClient as ti, QueryClient as ni, QueryClientProvider as ii } from "@tanstack/react-query";
9
- import { useCallback as N, useMemo as G, useId as ri, memo as si, useRef as R, useEffect as W, useState as H, useLayoutEffect as oi } from "react";
10
- import { SimpleSelect as It } from "@instructure/ui-simple-select/v11_7";
11
- import { Text as P } from "@instructure/ui-text/v11_7";
12
- import { IconArrowOpenUpLine as li, IconArrowOpenDownLine as ai, IconClockLine as xt, IconAiColoredSolid as ui, IconAiSolid as di } from "@instructure/ui-icons";
13
- import { politeAnnounce as x, getLiveRegion as be, TruncateWithTooltip as ci } from "@instructure/platform-instui-bindings";
14
- import { InstUISettingsProvider as mi } from "@instructure/emotion";
15
- import { Alert as X } from "@instructure/ui-alerts/v11_7";
16
- import { ScreenReaderContent as gi } from "@instructure/ui-a11y-content";
17
- import { IconButton as pi, CloseButton as fi, Button as z } from "@instructure/ui-buttons/v11_7";
18
- import { Flex as _ } from "@instructure/ui-flex/v11_7";
19
- import { Heading as me } from "@instructure/ui-heading/v11_7";
20
- import { Link as hi } from "@instructure/ui-link/v11_7";
21
- import { List as Qe, ListItem as Ke } from "@instructure/ui-list/v11_7";
22
- import { Pagination as $t } from "@instructure/ui-pagination/v11_7";
23
- import { ProgressBar as Mi } from "@instructure/ui-progress/v11_7";
24
- import { Spinner as st } from "@instructure/ui-spinner/v11_7";
25
- import { Tooltip as _i } from "@instructure/ui-tooltip/v11_7";
26
- import { View as E } from "@instructure/ui-view/v11_7";
27
- import { WithBreakpoints as Ei } from "@instructure/platform-with-breakpoints";
28
- import { Modal as Ii, ModalHeader as Si, ModalBody as yi, ModalFooter as Ti } from "@instructure/ui-modal/v11_7";
29
- import { CheckboxGroup as St, Checkbox as Ye } from "@instructure/ui-checkbox/v11_7";
30
- import { RadioInputGroup as Pi, RadioInput as yt } from "@instructure/ui-radio-input/v11_7";
31
- import { TextArea as bi } from "@instructure/ui-text-area/v11_7";
32
- function Ut(e) {
1
+ import { w as ot, I as kn, M as On, a as Dn, b as qn, i as Ct, c as zn, v as lt, h as Nn, o as Ve, m as oe, d as xn, e as $n, g as Fn, f as Un, j as Bn, u as F, k as ke, D as Gn, l as ve, n as Hn, p as at, q as ut, r as Wn, L as Yn, H as jn, s as Qn, t as Kn, x as Vn, y as Zn, z as Ht, A as Xn, B as Wt, C as Yt, E as Jn, F as ei, G as ti, J as ni, K as ii, N as ri, O as si, P as oi, Q as li, R as ai, S as ui, T as di, U as ci, V as we } from "./chunks/ModulesProgressBar-BFKPmBau.js";
2
+ import { ab as Co, W as vo, X as wo, ar as Lo, as as Ao, at as Ro, aI as ko, au as Oo, av as Do, aw as qo, ax as zo, ae as No, a7 as xo, Y as $o, ag as Fo, aa as Uo, aD as Bo, aj as Go, ak as Ho, _ as Wo, aF as Yo, $ as jo, a0 as Qo, a1 as Ko, a2 as Vo, a4 as Zo, a9 as Xo, a3 as Jo, a5 as el, a6 as tl, al as nl, an as il, ac as rl, aH as sl, ad as ol, aJ as ll, af as al, a8 as ul, ah as dl, az as cl, ai as ml, aE as gl, aA as pl, aG as fl, aB as hl, aC as Il, am as Ml, Z as _l, ao as El, ap as Sl, ay as Tl, aq as yl } from "./chunks/ModulesProgressBar-BFKPmBau.js";
3
+ import { canvasFetch as vt } from "@instructure/platform-canvas-fetch";
4
+ import { z as wt } from "zod";
5
+ import { gql as ne } from "graphql-tag";
6
+ import { jsx as s, jsxs as g, Fragment as j } from "react/jsx-runtime";
7
+ import { Pill as mi } from "@instructure/ui-pill/v11_7";
8
+ import { useQueryClient as gi, QueryClient as pi, QueryClientProvider as fi } from "@tanstack/react-query";
9
+ import { useCallback as x, useMemo as W, useId as hi, memo as Ii, useRef as L, useEffect as $, useState as Y, useLayoutEffect as Mi } from "react";
10
+ import { SimpleSelect as Lt } from "@instructure/ui-simple-select/v11_7";
11
+ import { Text as b } from "@instructure/ui-text/v11_7";
12
+ import { IconArrowOpenUpLine as _i, IconArrowOpenDownLine as Ei, IconClockLine as jt, IconAiColoredSolid as Si, IconAiSolid as Ti, XInstUIIcon as yi, SearchInstUIIcon as bi } from "@instructure/ui-icons";
13
+ import { politeAnnounce as O, getLiveRegion as Ae, TruncateWithTooltip as Pi } from "@instructure/platform-instui-bindings";
14
+ import { InstUISettingsProvider as Ci } from "@instructure/emotion";
15
+ import { Alert as te } from "@instructure/ui-alerts/v11_7";
16
+ import { ScreenReaderContent as vi } from "@instructure/ui-a11y-content";
17
+ import { IconButton as Qt, CloseButton as wi, Button as N } from "@instructure/ui-buttons/v11_7";
18
+ import { Flex as I } from "@instructure/ui-flex/v11_7";
19
+ import { Heading as Ie } from "@instructure/ui-heading/v11_7";
20
+ import { Link as Li } from "@instructure/ui-link/v11_7";
21
+ import { List as Je, ListItem as et } from "@instructure/ui-list/v11_7";
22
+ import { Pagination as Kt } from "@instructure/ui-pagination/v11_7";
23
+ import { ProgressBar as Ai } from "@instructure/ui-progress/v11_7";
24
+ import { Spinner as dt } from "@instructure/ui-spinner/v11_7";
25
+ import { Tooltip as Ri } from "@instructure/ui-tooltip/v11_7";
26
+ import { View as _ } from "@instructure/ui-view/v11_7";
27
+ import { WithBreakpoints as ki } from "@instructure/platform-with-breakpoints";
28
+ import { TextInput as Oi } from "@instructure/ui-text-input/v11_7";
29
+ import { Modal as Di, ModalHeader as qi, ModalBody as zi, ModalFooter as Ni } from "@instructure/ui-modal/v11_7";
30
+ import { CheckboxGroup as At, Checkbox as Ze } from "@instructure/ui-checkbox/v11_7";
31
+ import { RadioInputGroup as xi, RadioInput as Rt } from "@instructure/ui-radio-input/v11_7";
32
+ import { TextArea as $i } from "@instructure/ui-text-area/v11_7";
33
+ function Vt(e) {
33
34
  return e === "module" ? "module" : "module item";
34
35
  }
35
- class Ft extends Error {
36
- constructor(t, n, r) {
36
+ class Zt extends Error {
37
+ constructor(t, n, i) {
37
38
  super(
38
- `Canvas returned ${Ut(t)} ${n} without a usable ${r}. This is a partial response; refusing to guess a value for it.`
39
- ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = r;
39
+ `Canvas returned ${Vt(t)} ${n} without a usable ${i}. This is a partial response; refusing to guess a value for it.`
40
+ ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = i;
40
41
  }
41
42
  }
42
- function Bt(e, t, n) {
43
+ function Xt(e, t, n) {
43
44
  if (e != null) return e;
44
- throw new Ft(t, n, "published");
45
+ throw new Zt(t, n, "published");
45
46
  }
46
- function Ci(e, t) {
47
+ function Fi(e, t) {
47
48
  if (e.onUnsupportedItem) {
48
49
  e.onUnsupportedItem(t);
49
50
  return;
@@ -52,16 +53,16 @@ function Ci(e, t) {
52
53
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
53
54
  );
54
55
  }
55
- function Gt(e, t) {
56
+ function Jt(e, t) {
56
57
  if (e.onUnsupportedStatus) {
57
58
  e.onUnsupportedStatus(t);
58
59
  return;
59
60
  }
60
61
  console.warn(
61
- `[platform-modules] ${Ut(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
62
+ `[platform-modules] ${Vt(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
62
63
  );
63
64
  }
64
- const vi = /* @__PURE__ */ new Map([
65
+ const Ui = /* @__PURE__ */ new Map([
65
66
  ["Assignment", "assignment"],
66
67
  ["Quiz", "quiz"],
67
68
  ["Discussion", "discussion"],
@@ -73,21 +74,21 @@ const vi = /* @__PURE__ */ new Map([
73
74
  ["SubHeader", "sub_header"],
74
75
  ["PeerReviewSubAssignment", "assignment"]
75
76
  ]);
76
- function wi(e) {
77
+ function Bi(e) {
77
78
  const t = e == null ? void 0 : e.__typename;
78
79
  if (!t) return null;
79
- const n = vi.get(t);
80
+ const n = Ui.get(t);
80
81
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
81
82
  }
82
- const Li = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
83
- function Wt(e) {
83
+ const Gi = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
84
+ function en(e) {
84
85
  if (!e) return null;
85
- const t = Li.exec(e);
86
+ const t = Gi.exec(e);
86
87
  if (!t) return null;
87
- const [, n, r, o, i, l] = t, u = Number(n ?? 0) * 7 * 24 * 60 + Number(r ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(i ?? 0) + Number(l ?? 0) / 60;
88
- return Math.round(u);
88
+ const [, n, i, o, r, a] = t, l = Number(n ?? 0) * 7 * 24 * 60 + Number(i ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(r ?? 0) + Number(a ?? 0) / 60;
89
+ return Math.round(l);
89
90
  }
90
- const Ai = /* @__PURE__ */ new Set([
91
+ const Hi = /* @__PURE__ */ new Set([
91
92
  "must_view",
92
93
  "must_mark_done",
93
94
  "must_contribute",
@@ -95,18 +96,18 @@ const Ai = /* @__PURE__ */ new Set([
95
96
  "min_score",
96
97
  "min_percentage"
97
98
  ]);
98
- function Ri(e) {
99
- return Ai.has(e) ? e : "unknown";
99
+ function Wi(e) {
100
+ return Hi.has(e) ? e : "unknown";
100
101
  }
101
- function ki(e) {
102
+ function Yi(e) {
102
103
  return {
103
104
  itemId: String(e.id),
104
- type: Ri(e.type),
105
+ type: Wi(e.type),
105
106
  minScore: e.minScore ?? null,
106
107
  minPercentage: e.minPercentage ?? null
107
108
  };
108
109
  }
109
- function Ht(e) {
110
+ function tn(e) {
110
111
  return {
111
112
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
112
113
  endCursor: (e == null ? void 0 : e.endCursor) ?? null,
@@ -116,36 +117,36 @@ function Ht(e) {
116
117
  totalNrOfPages: (e == null ? void 0 : e.totalNrOfPages) ?? null
117
118
  };
118
119
  }
119
- const Oi = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
120
- function qi(e) {
120
+ const ji = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
121
+ function Qi(e) {
121
122
  var t;
122
123
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
123
124
  if (n) return n;
124
125
  return null;
125
126
  }
126
- function Yt(e, t) {
127
+ function nn(e, t) {
127
128
  if (!e) return;
128
- const n = new Map(t.map((i) => [i.itemId, i.type])), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
129
- for (const i of e.requirementsMet ?? []) {
130
- if (!i) continue;
131
- const l = String(i.id);
132
- n.get(l) === i.type && r.add(l);
129
+ const n = new Map(t.map((r) => [r.itemId, r.type])), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
130
+ for (const r of e.requirementsMet ?? []) {
131
+ if (!r) continue;
132
+ const a = String(r.id);
133
+ n.get(a) === r.type && i.add(a);
133
134
  }
134
- for (const i of e.incompleteRequirements ?? []) {
135
- if (!i) continue;
136
- const l = String(i.id);
137
- n.get(l) === i.type && Oi.has(i.type) && o.set(l, i.score ?? null);
135
+ for (const r of e.incompleteRequirements ?? []) {
136
+ if (!r) continue;
137
+ const a = String(r.id);
138
+ n.get(a) === r.type && ji.has(r.type) && o.set(a, r.score ?? null);
138
139
  }
139
140
  return {
140
141
  locked: e.locked === !0 || e.workflowState === "locked",
141
142
  workflowState: e.workflowState ?? null,
142
143
  completed: e.completed === !0 || e.workflowState === "completed",
143
144
  started: e.started === !0 || e.workflowState === "started",
144
- requirementsMetItemIds: r,
145
+ requirementsMetItemIds: i,
145
146
  incompleteRequirementScores: o
146
147
  };
147
148
  }
148
- const Di = /* @__PURE__ */ new Map([
149
+ const Ki = /* @__PURE__ */ new Map([
149
150
  ["LOCKED", "locked"],
150
151
  ["MISSING", "missing"],
151
152
  ["INCOMPLETE", "incomplete"],
@@ -153,16 +154,16 @@ const Di = /* @__PURE__ */ new Map([
153
154
  ["IN_PROGRESS", "in_progress"],
154
155
  ["NOT_STARTED", "not_started"]
155
156
  ]);
156
- function zi(e, t, n) {
157
+ function Vi(e, t, n) {
157
158
  if (e == null) return;
158
- const r = Di.get(e);
159
- return r || Gt(n, {
159
+ const i = Ki.get(e);
160
+ return i || Jt(n, {
160
161
  subject: "moduleItem",
161
162
  id: String(t),
162
163
  value: e
163
- }), r;
164
+ }), i;
164
165
  }
165
- const Ni = /* @__PURE__ */ new Map([
166
+ const Zi = /* @__PURE__ */ new Map([
166
167
  ["LOCKED", "locked"],
167
168
  ["MISSING", "missing"],
168
169
  ["MISSING_AND_INCOMPLETE", "missing_and_incomplete"],
@@ -171,123 +172,129 @@ const Ni = /* @__PURE__ */ new Map([
171
172
  ["IN_PROGRESS", "in_progress"],
172
173
  ["NOT_STARTED", "not_started"]
173
174
  ]);
174
- function xi(e, t, n) {
175
+ function Xi(e, t, n) {
175
176
  if (e == null) return;
176
- const r = Ni.get(e);
177
- return r || Gt(n, { subject: "module", id: String(t), value: e }), r;
177
+ const i = Zi.get(e);
178
+ return i || Jt(n, { subject: "module", id: String(t), value: e }), i;
178
179
  }
179
- function $i(e, t, n, r = {}) {
180
- var a, c;
180
+ function Ji(e, t, n, i = {}) {
181
+ var u, c;
181
182
  if (!n) return;
182
- const o = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, o), l = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, u = [...n.incompleteRequirementScores.values()].filter(
183
- (g) => g != null
183
+ const o = e.requirementCount ?? t.length, r = Math.min(n.requirementsMetItemIds.size, o), a = ((u = e.submissionStatistics) == null ? void 0 : u.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
184
+ (p) => p != null
184
185
  ).length;
185
186
  return {
186
- status: xi(e.moduleStatus, e._id, r) ?? (n.locked ? "locked" : void 0),
187
- requirementsMet: i,
187
+ status: Xi(e.moduleStatus, e._id, i) ?? (n.locked ? "locked" : void 0),
188
+ requirementsMet: r,
188
189
  requirementCount: o,
189
- percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
190
+ percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
190
191
  nextDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.nextDueAt) ?? null,
191
- missingCount: l,
192
- incompleteCount: u
192
+ missingCount: a,
193
+ incompleteCount: l
193
194
  };
194
195
  }
195
- function Ui(e, t, n, r = {}, o) {
196
- var c, g, p;
197
- const i = String(e._id), l = wi(e.content);
198
- if (!l)
199
- return Ci(r, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
200
- const u = qi(e.content), a = n.get(i) ?? null;
196
+ function er(e, t, n, i = {}, o) {
197
+ var c, p, m;
198
+ const r = String(e._id), a = Bi(e.content);
199
+ if (!a)
200
+ return Fi(i, { id: r, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
201
+ const l = Qi(e.content), u = n.get(r) ?? null;
201
202
  return {
202
- id: i,
203
+ id: r,
203
204
  moduleId: t,
204
205
  title: e.title ?? "",
205
- type: l,
206
+ type: a,
206
207
  position: e.position ?? 0,
207
208
  itemNumber: e.itemNumber ?? void 0,
208
209
  indent: e.indent ?? 0,
209
- published: Bt(e.published, "moduleItem", i),
210
+ published: Xt(e.published, "moduleItem", r),
210
211
  url: e.url ?? null,
211
212
  newTab: e.newTab ?? !1,
212
- completionRequirement: a,
213
- dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
214
- status: o ? zi(e.moduleItemStatus, i, r) ?? (o.locked ? "locked" : void 0) : void 0,
215
- pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
216
- extensions: tt(
213
+ completionRequirement: u,
214
+ dueAt: (l == null ? void 0 : l.cachedDueDate) ?? ((p = e.content) == null ? void 0 : p.dueAt) ?? null,
215
+ status: o ? Vi(e.moduleItemStatus, r, i) ?? (o.locked ? "locked" : void 0) : void 0,
216
+ pointsPossible: ((m = e.content) == null ? void 0 : m.pointsPossible) ?? null,
217
+ extensions: ot(
217
218
  void 0,
218
- Wt(e.estimatedDuration)
219
+ en(e.estimatedDuration)
219
220
  )
220
221
  };
221
222
  }
222
- function jt(e, t, n, r, o) {
223
- const i = [];
224
- for (const l of e ?? []) {
225
- if (!l) continue;
226
- const u = Ui(
227
- l,
223
+ function rn(e, t, n, i, o) {
224
+ const r = [];
225
+ for (const a of e ?? []) {
226
+ if (!a) continue;
227
+ const l = er(
228
+ a,
228
229
  t,
229
230
  n,
230
- r,
231
+ i,
231
232
  o
232
233
  );
233
- u && i.push(u);
234
+ l && r.push(l);
234
235
  }
235
- return i;
236
+ return r;
236
237
  }
237
- function Qt(e) {
238
+ function sn(e) {
238
239
  const t = [], n = /* @__PURE__ */ new Map();
239
- for (const r of e ?? []) {
240
- if (!r) continue;
241
- const o = ki(r);
240
+ for (const i of e ?? []) {
241
+ if (!i) continue;
242
+ const o = Yi(i);
242
243
  t.push(o), n.set(o.itemId, o);
243
244
  }
244
245
  return { list: t, byItemId: n };
245
246
  }
246
- function Fi(e, t = {}) {
247
- var c, g;
247
+ function tr(e, t = {}) {
248
+ var c, p;
248
249
  const n = String(e._id);
249
250
  if (e.moduleItemsTotalCount == null)
250
- throw new Ft("module", n, "moduleItemsTotalCount");
251
- const { list: r, byItemId: o } = Qt(e.completionRequirements), i = e.moduleItemsConnection, l = i != null && !((c = i.pageInfo) != null && c.hasNextPage), u = Yt(e.progression, r), a = l ? jt(i.nodes, n, o, t, u) : void 0;
251
+ throw new Zt("module", n, "moduleItemsTotalCount");
252
+ const { list: i, byItemId: o } = sn(e.completionRequirements), r = e.moduleItemsConnection, a = r != null && !((c = r.pageInfo) != null && c.hasNextPage), l = nn(e.progression, i), u = a ? rn(r.nodes, n, o, t, l) : void 0;
252
253
  return {
253
254
  id: n,
254
255
  name: e.name ?? "",
255
256
  position: e.position ?? 0,
256
- published: Bt(e.published, "module", n),
257
+ published: Xt(e.published, "module", n),
257
258
  itemCount: e.moduleItemsTotalCount,
258
- items: a,
259
- estimatedDurationMinutes: Wt(e.estimatedDuration) || void 0,
259
+ items: u,
260
+ estimatedDurationMinutes: en(e.estimatedDuration) || void 0,
260
261
  unlockAt: e.unlockAt ?? null,
261
262
  prerequisiteModules: (e.prerequisites ?? []).filter(
262
- (p) => p != null
263
- ).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
263
+ (m) => m != null
264
+ ).map((m) => ({ id: String(m.id), name: m.name ?? "" })),
264
265
  requirementCount: e.requirementCount ?? null,
265
266
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
266
- completionRequirements: r,
267
- progress: $i(e, r, u, t),
268
- collapsed: ((g = e.progression) == null ? void 0 : g.collapsed) ?? null
267
+ completionRequirements: i,
268
+ progress: Ji(e, i, l, t),
269
+ collapsed: ((p = e.progression) == null ? void 0 : p.collapsed) ?? null,
270
+ ...e.searchMatch ? {
271
+ searchMatch: {
272
+ nameMatched: e.searchMatch.nameMatched,
273
+ matchingItemCount: e.searchMatch.matchingItemCount
274
+ }
275
+ } : {}
269
276
  };
270
277
  }
271
- function Bi(e, t = {}) {
278
+ function nr(e, t = {}) {
272
279
  var o;
273
- const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, r = [];
274
- for (const i of (n == null ? void 0 : n.nodes) ?? [])
275
- i && r.push(Fi(i, t));
276
- return { modules: r, pageInfo: Ht(n == null ? void 0 : n.pageInfo) };
280
+ const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, i = [];
281
+ for (const r of (n == null ? void 0 : n.nodes) ?? [])
282
+ r && i.push(tr(r, t));
283
+ return { modules: i, pageInfo: tn(n == null ? void 0 : n.pageInfo) };
277
284
  }
278
- function Gi(e, t, n = {}) {
279
- const r = e == null ? void 0 : e.legacyNode, { list: o, byItemId: i } = Qt(r == null ? void 0 : r.completionRequirements), l = r == null ? void 0 : r.moduleItemsConnection, u = Yt(r == null ? void 0 : r.progression, o);
285
+ function ir(e, t, n = {}) {
286
+ const i = e == null ? void 0 : e.legacyNode, { list: o, byItemId: r } = sn(i == null ? void 0 : i.completionRequirements), a = i == null ? void 0 : i.moduleItemsConnection, l = nn(i == null ? void 0 : i.progression, o);
280
287
  return {
281
- items: jt(l == null ? void 0 : l.nodes, t, i, n, u),
282
- pageInfo: Ht(l == null ? void 0 : l.pageInfo)
288
+ items: rn(a == null ? void 0 : a.nodes, t, r, n, l),
289
+ pageInfo: tn(a == null ? void 0 : a.pageInfo)
283
290
  };
284
291
  }
285
- const Wi = J`
292
+ const rr = ne`
286
293
  fragment PlatformModulesSubmissionFields on Submission {
287
294
  _id
288
295
  cachedDueDate
289
296
  }
290
- `, Kt = J`
297
+ `, on = ne`
291
298
  fragment PlatformModulesItemFields on ModuleItem {
292
299
  _id
293
300
  title
@@ -336,8 +343,8 @@ const Wi = J`
336
343
  }
337
344
  }
338
345
  }
339
- ${Wi}
340
- `, Vt = J`
346
+ ${rr}
347
+ `, ln = ne`
341
348
  fragment PlatformModulesProgressionFields on ModuleProgression {
342
349
  workflowState
343
350
  completed
@@ -357,7 +364,7 @@ const Wi = J`
357
364
  score
358
365
  }
359
366
  }
360
- `, Zt = J`
367
+ `, an = ne`
361
368
  fragment PlatformModulesModuleFields on Module {
362
369
  _id
363
370
  name
@@ -387,9 +394,13 @@ const Wi = J`
387
394
  nextDueAt
388
395
  missingAssignmentCount
389
396
  }
397
+ searchMatch {
398
+ nameMatched
399
+ matchingItemCount
400
+ }
390
401
  }
391
- ${Vt}
392
- `, Hi = J`
402
+ ${ln}
403
+ `, sr = ne`
393
404
  query PlatformModulesGetModules(
394
405
  $courseId: ID!
395
406
  $first: Int
@@ -417,8 +428,8 @@ const Wi = J`
417
428
  }
418
429
  }
419
430
  }
420
- ${Zt}
421
- `, Yi = J`
431
+ ${an}
432
+ `, or = ne`
422
433
  query PlatformModulesGetModulesWithItems(
423
434
  $courseId: ID!
424
435
  $first: Int
@@ -458,9 +469,9 @@ const Wi = J`
458
469
  }
459
470
  }
460
471
  }
461
- ${Zt}
462
- ${Kt}
463
- `, ji = J`
472
+ ${an}
473
+ ${on}
474
+ `, lr = ne`
464
475
  query PlatformModulesGetModuleItems(
465
476
  $moduleId: ID!
466
477
  $first: Int
@@ -470,6 +481,7 @@ const Wi = J`
470
481
  $includeSubmissions: Boolean!
471
482
  $includeEstimatedDuration: Boolean!
472
483
  $studentId: ID
484
+ $itemsFilter: ModuleItemFilter
473
485
  ) {
474
486
  legacyNode(_id: $moduleId, type: Module) {
475
487
  ... on Module {
@@ -482,7 +494,13 @@ const Wi = J`
482
494
  progression {
483
495
  ...PlatformModulesProgressionFields
484
496
  }
485
- moduleItemsConnection(first: $first, after: $after, before: $before, last: $last) {
497
+ moduleItemsConnection(
498
+ first: $first
499
+ after: $after
500
+ before: $before
501
+ last: $last
502
+ filter: $itemsFilter
503
+ ) {
486
504
  nodes {
487
505
  ...PlatformModulesItemFields
488
506
  }
@@ -498,27 +516,27 @@ const Wi = J`
498
516
  }
499
517
  }
500
518
  }
501
- ${Kt}
502
- ${Vt}
519
+ ${on}
520
+ ${ln}
503
521
  `;
504
- function Xt() {
522
+ function un() {
505
523
  return new DOMException("The operation was aborted.", "AbortError");
506
524
  }
507
- function Pe(e) {
508
- if (e != null && e.aborted) throw Xt();
525
+ function Le(e) {
526
+ if (e != null && e.aborted) throw un();
509
527
  }
510
- function Tt(e, t) {
511
- return t ? new Promise((n, r) => {
512
- const o = () => r(Xt());
513
- t.addEventListener("abort", o, { once: !0 }), e.then(n, r).finally(() => t.removeEventListener("abort", o));
528
+ function kt(e, t) {
529
+ return t ? new Promise((n, i) => {
530
+ const o = () => i(un());
531
+ t.addEventListener("abort", o, { once: !0 }), e.then(n, i).finally(() => t.removeEventListener("abort", o));
514
532
  }) : e;
515
533
  }
516
- const Pt = [
534
+ const Ot = [
517
535
  "COMPLETED",
518
536
  "INCOMPLETE",
519
537
  "IN_PROGRESS",
520
538
  "NOT_STARTED"
521
- ], bt = /* @__PURE__ */ new Map([
539
+ ], Dt = /* @__PURE__ */ new Map([
522
540
  ["locked", ["LOCKED"]],
523
541
  ["missing", ["MISSING"]],
524
542
  ["missing_and_incomplete", ["MISSING_AND_INCOMPLETE"]],
@@ -526,24 +544,32 @@ const Pt = [
526
544
  ["complete", ["COMPLETE"]],
527
545
  ["in_progress", ["IN_PROGRESS"]],
528
546
  ["not_started", ["NOT_STARTED"]]
529
- ]), Qi = {
530
- module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] }
547
+ ]), ar = {
548
+ module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] },
549
+ search: !0
531
550
  };
532
- function Ki(e, t) {
551
+ function ur(e, t, n) {
552
+ const i = cr(e, t);
553
+ return n ? { ...i, searchTerm: n } : i;
554
+ }
555
+ function dr(e) {
556
+ return e ? { searchTerm: e } : null;
557
+ }
558
+ function cr(e, t) {
533
559
  if (!e) return null;
534
560
  if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
535
561
  const n = e.value;
536
- if (!Pt.includes(n))
562
+ if (!Ot.includes(n))
537
563
  throw new Error(
538
- `"${e.value}" is not a ModuleCompletionStatus (${Pt.join(", ")}).`
564
+ `"${e.value}" is not a ModuleCompletionStatus (${Ot.join(", ")}).`
539
565
  );
540
566
  return { completionStatus: n };
541
567
  }
542
568
  if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
543
- const n = typeof e.value == "string" ? bt.get(e.value) : void 0;
569
+ const n = typeof e.value == "string" ? Dt.get(e.value) : void 0;
544
570
  if (!n)
545
571
  throw new Error(
546
- `"${String(e.value)}" is not a ModuleStatus (${[...bt.keys()].join(", ")}).`
572
+ `"${String(e.value)}" is not a ModuleStatus (${[...Dt.keys()].join(", ")}).`
547
573
  );
548
574
  return { moduleStatus: n };
549
575
  }
@@ -556,331 +582,334 @@ function Ki(e, t) {
556
582
  `Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". It compiles module.completionStatus eq, module.moduleStatus eq and module.dueWithinDays within.`
557
583
  );
558
584
  }
559
- function je(e, t, n) {
585
+ function Xe(e, t, n) {
560
586
  return e.kind === "before" ? { first: null, after: null, before: e.cursor, last: n } : e.kind === "last" ? { first: null, after: null, before: null, last: e.count } : { first: t, after: e.kind === "after" ? e.cursor : null, before: null, last: null };
561
587
  }
562
- function Ys({
588
+ function co({
563
589
  executeQuery: e,
564
- inlineItemLimit: t = bn,
565
- nodeBudget: n = yn,
566
- onUnsupportedItem: r,
590
+ inlineItemLimit: t = qn,
591
+ nodeBudget: n = kn,
592
+ onUnsupportedItem: i,
567
593
  onUnsupportedStatus: o,
568
- studentId: i,
569
- validate: l = !0,
570
- capabilities: u = Qi,
571
- includeEstimatedDuration: a = !1
594
+ studentId: r,
595
+ validate: a = !0,
596
+ capabilities: l = ar,
597
+ includeEstimatedDuration: u = !1
572
598
  }) {
573
- const c = i != null, g = { onUnsupportedItem: r, onUnsupportedStatus: o };
599
+ const c = r != null, p = { onUnsupportedItem: i, onUnsupportedStatus: o };
574
600
  return {
575
601
  inlineNodeBudget: n,
576
- capabilities: u,
602
+ capabilities: l,
577
603
  async listModules({
578
- courseId: p,
604
+ courseId: m,
579
605
  page: h = { kind: "first" },
580
- pageSize: f,
581
- includeItems: I,
582
- filter: w,
583
- dueRange: L,
606
+ pageSize: S,
607
+ includeItems: M,
608
+ filter: T,
609
+ dueRange: D,
610
+ search: A,
584
611
  inlineItemsFirst: U,
585
- inlineFirst: O,
586
- signal: S
612
+ inlineFirst: y,
613
+ signal: P
587
614
  }) {
588
- Pe(S);
589
- const C = Ki(w, L);
590
- let Q;
591
- if (I) {
592
- const A = Math.min(O ?? f, f), q = Math.min(U ?? t, t), F = Math.max(1, Math.min(q, Math.floor(n / A)));
593
- Q = e(
594
- Yi,
615
+ Le(P);
616
+ const Q = ur(T, D, A);
617
+ let B;
618
+ if (M) {
619
+ const q = Math.min(y ?? S, S), G = Math.min(U ?? t, t), K = Math.max(1, Math.min(G, Math.floor(n / q)));
620
+ B = e(
621
+ or,
595
622
  {
596
- courseId: p,
597
- ...je(h, A, f),
598
- itemsFirst: F,
623
+ courseId: m,
624
+ ...Xe(h, q, S),
625
+ itemsFirst: K,
599
626
  includeSubmissions: c,
600
- includeEstimatedDuration: a,
601
- studentId: i ?? null,
602
- filter: C
627
+ includeEstimatedDuration: u,
628
+ studentId: r ?? null,
629
+ filter: Q
603
630
  }
604
631
  );
605
632
  } else
606
- Q = e(Hi, {
607
- courseId: p,
608
- ...je(h, f, f),
609
- includeEstimatedDuration: a,
610
- filter: C
633
+ B = e(sr, {
634
+ courseId: m,
635
+ ...Xe(h, S, S),
636
+ includeEstimatedDuration: u,
637
+ filter: Q
611
638
  });
612
- const K = await Tt(Q, S);
613
- Pe(S);
614
- const T = Bi(K, g);
615
- return l ? Pn.parse(T) : T;
639
+ const C = await kt(B, P);
640
+ Le(P);
641
+ const R = nr(C, p);
642
+ return a ? Dn.parse(R) : R;
616
643
  },
617
644
  async listModuleItems({
618
- moduleId: p,
645
+ moduleId: m,
619
646
  page: h = { kind: "first" },
620
- pageSize: f,
621
- signal: I
647
+ pageSize: S,
648
+ search: M,
649
+ signal: T
622
650
  }) {
623
- Pe(I);
624
- const w = await Tt(
625
- e(ji, {
626
- moduleId: p,
627
- ...je(h, f, f),
651
+ Le(T);
652
+ const D = await kt(
653
+ e(lr, {
654
+ moduleId: m,
655
+ ...Xe(h, S, S),
628
656
  includeSubmissions: c,
629
- includeEstimatedDuration: a,
630
- studentId: i ?? null
657
+ includeEstimatedDuration: u,
658
+ studentId: r ?? null,
659
+ itemsFilter: dr(M)
631
660
  }),
632
- I
661
+ T
633
662
  );
634
- Pe(I);
635
- const L = Gi(w, p, g);
636
- return l ? Tn.parse(L) : L;
663
+ Le(T);
664
+ const A = ir(D, m, p);
665
+ return a ? On.parse(A) : A;
637
666
  },
638
667
  async setModuleCollapsed({
639
- courseId: p,
668
+ courseId: m,
640
669
  moduleId: h,
641
- collapsed: f,
642
- signal: I
670
+ collapsed: S,
671
+ signal: M
643
672
  }) {
644
- await _t(
673
+ await vt(
645
674
  {
646
- path: `/courses/${p}/modules/${h}/collapse`,
675
+ path: `/courses/${m}/modules/${h}/collapse`,
647
676
  method: "POST",
648
- body: { collapse: f },
649
- signal: I
677
+ body: { collapse: S },
678
+ signal: M
650
679
  },
651
- Et.unknown()
680
+ wt.unknown()
652
681
  );
653
682
  },
654
683
  async setAllModulesCollapsed({
655
- courseId: p,
684
+ courseId: m,
656
685
  collapsed: h,
657
- signal: f
686
+ signal: S
658
687
  }) {
659
- await _t(
688
+ await vt(
660
689
  {
661
- path: `/courses/${p}/collapse_all_modules`,
690
+ path: `/courses/${m}/collapse_all_modules`,
662
691
  method: "POST",
663
692
  params: { collapse: h ? 1 : 0 },
664
- signal: f
693
+ signal: S
665
694
  },
666
- Et.unknown()
695
+ wt.unknown()
667
696
  );
668
697
  }
669
698
  };
670
699
  }
671
- const js = 1e3;
672
- function Vi({
700
+ const mo = 1e3;
701
+ function mr({
673
702
  queryClient: e,
674
703
  courseId: t,
675
704
  module: n,
676
- item: r
705
+ item: i
677
706
  }) {
678
707
  return {
679
708
  module: n,
680
- item: r,
709
+ item: i,
681
710
  invalidateModuleItems: async (o) => {
682
711
  await Promise.all([
683
- Cn(e, t, o),
684
- Mt(e, t)
712
+ zn(e, t, o),
713
+ Ct(e, t)
685
714
  ]);
686
715
  },
687
- invalidateModuleList: () => Mt(e, t)
716
+ invalidateModuleList: () => Ct(e, t)
688
717
  };
689
718
  }
690
- function Qs(e, t) {
691
- return nt(e).filter(
719
+ function go(e, t) {
720
+ return lt(e).filter(
692
721
  (n) => n.visible == null || n.visible(t) === !0
693
722
  );
694
723
  }
695
- function Jt(e, t = {}) {
696
- const n = Object.keys(t).filter((o) => !vn(e, o));
724
+ function dn(e, t = {}) {
725
+ const n = Object.keys(t).filter((o) => !Nn(e, o));
697
726
  if (n.length > 0)
698
727
  throw new Error(
699
728
  `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
700
729
  );
701
- const r = {
702
- formatters: He(e.formatters, t.formatters),
703
- itemTypes: re(e.itemTypes, t.itemTypes),
704
- itemStatuses: re(e.itemStatuses, t.itemStatuses),
705
- itemMeta: re(e.itemMeta, t.itemMeta),
706
- filters: re(e.filters, t.filters),
707
- moduleActions: re(e.moduleActions, t.moduleActions),
708
- itemActions: re(e.itemActions, t.itemActions),
709
- navigation: He(e.navigation, t.navigation),
710
- permissions: He(e.permissions, t.permissions),
730
+ const i = {
731
+ formatters: Ve(e.formatters, t.formatters),
732
+ itemTypes: oe(e.itemTypes, t.itemTypes),
733
+ itemStatuses: oe(e.itemStatuses, t.itemStatuses),
734
+ itemMeta: oe(e.itemMeta, t.itemMeta),
735
+ filters: oe(e.filters, t.filters),
736
+ moduleActions: oe(e.moduleActions, t.moduleActions),
737
+ itemActions: oe(e.itemActions, t.itemActions),
738
+ navigation: Ve(e.navigation, t.navigation),
739
+ permissions: Ve(e.permissions, t.permissions),
711
740
  notify: t.notify ?? e.notify
712
741
  };
713
- return wn.parse(r), r;
742
+ return xn.parse(i), i;
714
743
  }
715
- const Zi = "organizeNewPlacement", Xi = {
744
+ const gr = "organizeNewPlacement", pr = {
716
745
  label: "metaFieldNewPlacementLabel",
717
746
  order: 5,
718
- render: ({ item: e, t }) => Rn(e) ? /* @__PURE__ */ s(ei, { color: "success", children: t("organizeNewItemPill") }) : null
719
- }, Ji = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), er = (e) => Jt(e, {
720
- itemMeta: { [Zi]: Xi },
721
- filters: Ji(e.filters),
747
+ render: ({ item: e, t }) => Un(e) ? /* @__PURE__ */ s(mi, { color: "success", children: t("organizeNewItemPill") }) : null
748
+ }, fr = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), hr = (e) => dn(e, {
749
+ itemMeta: { [gr]: pr },
750
+ filters: fr(e.filters),
722
751
  formatters: {
723
- moduleLabel: (t, n, { t: r }) => {
724
- if (Ln(n)) return r("organizeNewModuleLabel");
725
- const o = An(n);
726
- return o === 0 ? null : r("organizeItemsAddedLabel", { count: o });
752
+ moduleLabel: (t, n, { t: i }) => {
753
+ if ($n(n)) return i("organizeNewModuleLabel");
754
+ const o = Fn(n);
755
+ return o === 0 ? null : i("organizeItemsAddedLabel", { count: o });
727
756
  }
728
757
  }
729
758
  });
730
- function Ks(e = {}) {
731
- return Jt(kn, e);
759
+ function po(e = {}) {
760
+ return dn(Bn, e);
732
761
  }
733
- function Vs(e) {
734
- const t = ti();
735
- return N(
736
- (n, r) => Vi({ queryClient: t, courseId: e, module: n, item: r }),
762
+ function fo(e) {
763
+ const t = gi();
764
+ return x(
765
+ (n, i) => mr({ queryClient: t, courseId: e, module: n, item: i }),
737
766
  [t, e]
738
767
  );
739
768
  }
740
- const tr = {
741
- not_started: ye.not_started,
742
- in_progress: ye.in_progress,
743
- complete: ye.complete,
744
- missing: ye.missing,
745
- due_this_week: On
746
- }, nr = {
769
+ const Ir = {
770
+ not_started: ve.not_started,
771
+ in_progress: ve.in_progress,
772
+ complete: ve.complete,
773
+ missing: ve.missing,
774
+ due_this_week: Gn
775
+ }, Mr = {
747
776
  primary: "secondary",
748
777
  info: "brand",
749
778
  success: "success",
750
779
  warning: "warning"
751
780
  };
752
- function ir({
781
+ function _r({
753
782
  value: e,
754
783
  onChange: t,
755
784
  interaction: n = "enabled"
756
785
  }) {
757
- const { t: r } = $(), o = ve(), i = G(() => nt(o.filters), [o.filters]), l = ri();
758
- return i.length === 0 ? null : /* @__PURE__ */ s(
759
- It,
786
+ const { t: i } = F(), o = ke(), r = W(() => lt(o.filters), [o.filters]), a = hi();
787
+ return r.length === 0 ? null : /* @__PURE__ */ s(
788
+ Lt,
760
789
  {
761
- renderLabel: r("filterGroupLabel"),
790
+ renderLabel: i("filterGroupLabel"),
762
791
  value: e,
763
- onChange: (u, a) => {
764
- a.value !== void 0 && t(String(a.value));
792
+ onChange: (l, u) => {
793
+ u.value !== void 0 && t(String(u.value));
765
794
  },
766
795
  interaction: n,
767
796
  "data-testid": "filter-select",
768
- children: i.map((u) => {
769
- const a = tr[u.key];
797
+ children: r.map((l) => {
798
+ const u = Ir[l.key];
770
799
  return /* @__PURE__ */ s(
771
- It.Option,
800
+ Lt.Option,
772
801
  {
773
- id: `${l}-${u.key}`,
774
- value: u.key,
775
- renderBeforeLabel: a ? /* @__PURE__ */ s(P, { color: nr[a.tone], children: a.icon }) : void 0,
776
- "data-testid": `filter-option-${u.key}`,
777
- children: r(u.label)
802
+ id: `${a}-${l.key}`,
803
+ value: l.key,
804
+ renderBeforeLabel: u ? /* @__PURE__ */ s(b, { color: Mr[u.tone], children: u.icon }) : void 0,
805
+ "data-testid": `filter-option-${l.key}`,
806
+ children: i(l.label)
778
807
  },
779
- u.key
808
+ l.key
780
809
  );
781
810
  })
782
811
  }
783
812
  );
784
813
  }
785
- const Ct = "\0", rr = { textDecoration: "underline dotted", cursor: "help" }, en = { ...qn, marginInlineEnd: "0.375rem" };
786
- function sr({ names: e }) {
787
- const { t } = $();
788
- if (e.length === 1) return /* @__PURE__ */ s(Y, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
814
+ const qt = "\0", Er = { textDecoration: "underline dotted", cursor: "help" }, cn = { ...Hn, marginInlineEnd: "0.375rem" };
815
+ function Sr({ names: e }) {
816
+ const { t } = F();
817
+ if (e.length === 1) return /* @__PURE__ */ s(j, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
789
818
  const n = t("lockedByPrerequisitesByline", {
790
819
  count: e.length,
791
- prerequisites: Ct
792
- }), [r, ...o] = n.split(Ct), i = o.length > 0 ? o.join("") : null;
793
- return /* @__PURE__ */ m(Y, { children: [
794
- i === null ? null : r,
795
- /* @__PURE__ */ s(_i, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
820
+ prerequisites: qt
821
+ }), [i, ...o] = n.split(qt), r = o.length > 0 ? o.join("") : null;
822
+ return /* @__PURE__ */ g(j, { children: [
823
+ r === null ? null : i,
824
+ /* @__PURE__ */ s(Ri, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
796
825
  "span",
797
826
  {
798
827
  tabIndex: 0,
799
- style: rr,
800
- onClick: (l) => l.stopPropagation(),
828
+ style: Er,
829
+ onClick: (a) => a.stopPropagation(),
801
830
  "data-testid": "module-byline-prerequisites",
802
- children: i === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
831
+ children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
803
832
  }
804
833
  ) }),
805
- i
834
+ r
806
835
  ] });
807
836
  }
808
- function or({ module: e, today: t }) {
809
- var p;
810
- const n = rt(), r = Dt(), o = ((p = e.progress) == null ? void 0 : p.status) === "locked", i = e.unlockAt ?? null, l = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), u = i !== null && new Date(i) > t;
811
- let a = null;
812
- i !== null && u && (o || !e.progress) ? a = n.unlockByline(i, t) : i !== null && !u && !e.progress && (a = n.unlockedByline(i, t));
813
- const c = o && l.length > 0;
814
- let g = null;
815
- if (a === null && !c && !o) {
816
- const h = e.estimatedDurationMinutes ?? Un(e.items);
817
- g = h === null ? null : n.estimatedDurationByline(h);
837
+ function Tr({ module: e, today: t }) {
838
+ var m;
839
+ const n = ut(), i = Ht(), o = ((m = e.progress) == null ? void 0 : m.status) === "locked", r = e.unlockAt ?? null, a = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), l = r !== null && new Date(r) > t;
840
+ let u = null;
841
+ r !== null && l && (o || !e.progress) ? u = n.unlockByline(r, t) : r !== null && !l && !e.progress && (u = n.unlockedByline(r, t));
842
+ const c = o && a.length > 0;
843
+ let p = null;
844
+ if (u === null && !c && !o) {
845
+ const h = e.estimatedDurationMinutes ?? Xn(e.items);
846
+ p = h === null ? null : n.estimatedDurationByline(h);
818
847
  }
819
- return a === null && !c && g === null ? null : /* @__PURE__ */ s(E, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: zt, children: /* @__PURE__ */ s(P, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: g !== null ? /* @__PURE__ */ m(Y, { children: [
820
- /* @__PURE__ */ s("span", { style: en, children: /* @__PURE__ */ s(xt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
821
- g
822
- ] }) : /* @__PURE__ */ m(Y, { children: [
823
- a,
824
- a !== null && c ? /* @__PURE__ */ s("span", { style: Nt, children: " " }) : null,
825
- c ? /* @__PURE__ */ s("span", { style: a !== null ? r : void 0, children: /* @__PURE__ */ s(sr, { names: l }) }) : null
848
+ return u === null && !c && p === null ? null : /* @__PURE__ */ s(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: p !== null ? /* @__PURE__ */ g(j, { children: [
849
+ /* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
850
+ p
851
+ ] }) : /* @__PURE__ */ g(j, { children: [
852
+ u,
853
+ u !== null && c ? /* @__PURE__ */ s("span", { style: Yt, children: " " }) : null,
854
+ c ? /* @__PURE__ */ s("span", { style: u !== null ? i : void 0, children: /* @__PURE__ */ s(Sr, { names: a }) }) : null
826
855
  ] }) }) }) });
827
856
  }
828
- const lr = "#273540", ar = "#D7DADE", ur = "0.25rem", dr = (e, t) => {
829
- var n, r, o, i, l;
857
+ const yr = "#273540", br = "#D7DADE", Pr = "0.25rem", Cr = (e, t) => {
858
+ var n, i, o, r, a;
830
859
  return {
831
- meterColorBrand: ((r = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : r.grey125125) ?? lr,
832
- borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? ur),
833
- borderColor: ((l = (i = t.colors) == null ? void 0 : i.contrasts) == null ? void 0 : l.grey1424) ?? ar,
860
+ meterColorBrand: ((i = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : i.grey125125) ?? yr,
861
+ borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? Pr),
862
+ borderColor: ((a = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : a.grey1424) ?? br,
834
863
  trackBottomBorderColor: "transparent"
835
864
  };
836
- }, cr = "66.667%", mr = "80px", gr = 2, pr = { components: { TruncateText: { fontFamily: "inherit" } } };
837
- function fr({
865
+ }, vr = "66.667%", wr = "80px", Lr = 2, Ar = { components: { TruncateText: { fontFamily: "inherit" } } };
866
+ function Rr({
838
867
  module: e,
839
868
  breakpoints: t
840
869
  }) {
841
- const { t: n } = $(), r = rt(), o = Dt(), i = e.progress;
842
- if (!i || i.status === "locked" || i.requirementCount <= 0) return null;
843
- const l = Object.keys(t).length === 0 || t.desktop === !0, u = Bn(e.items);
844
- return /* @__PURE__ */ m(
845
- _,
870
+ const { t: n } = F(), i = ut(), o = Ht(), r = e.progress;
871
+ if (!r || r.status === "locked" || r.requirementCount <= 0) return null;
872
+ const a = Object.keys(t).length === 0 || t.desktop === !0, l = ei(e.items);
873
+ return /* @__PURE__ */ g(
874
+ I,
846
875
  {
847
- width: l ? cr : "100%",
876
+ width: a ? vr : "100%",
848
877
  alignItems: "center",
849
878
  gap: "x-small",
850
879
  margin: "x-small 0 0 0",
851
880
  "data-testid": "module-progress",
852
881
  children: [
853
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(E, { as: "div", width: mr, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
854
- Mi,
882
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(_, { as: "div", width: wr, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
883
+ Ai,
855
884
  {
856
885
  size: "x-small",
857
886
  meterColor: "brand",
858
- valueNow: i.requirementsMet,
859
- valueMax: i.requirementCount,
887
+ valueNow: r.requirementsMet,
888
+ valueMax: r.requirementCount,
860
889
  shouldAnimate: !1,
861
890
  screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
862
891
  formatScreenReaderValue: () => {
863
- const a = Gn(
892
+ const u = ti(
864
893
  n,
865
- i.requirementsMet,
866
- i.requirementCount
894
+ r.requirementsMet,
895
+ r.requirementCount
867
896
  );
868
- return u === null ? a : `${a}, ${r.remainingDurationByline(u)}`;
897
+ return l === null ? u : `${u}, ${i.remainingDurationByline(l)}`;
869
898
  },
870
- themeOverride: dr
899
+ themeOverride: Cr
871
900
  }
872
901
  ) }) }),
873
- /* @__PURE__ */ s(_.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: zt, children: /* @__PURE__ */ m(P, { variant: "contentSmall", color: "secondary", children: [
874
- r.progress(
875
- i.percentComplete,
876
- i.requirementsMet,
877
- i.requirementCount
902
+ /* @__PURE__ */ s(I.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ g(b, { variant: "contentSmall", color: "secondary", children: [
903
+ i.progress(
904
+ r.percentComplete,
905
+ r.requirementsMet,
906
+ r.requirementCount
878
907
  ),
879
- u !== null ? /* @__PURE__ */ m(Y, { children: [
880
- /* @__PURE__ */ s("span", { style: Nt, children: " " }),
881
- /* @__PURE__ */ m("span", { style: o, children: [
882
- /* @__PURE__ */ s("span", { style: en, children: /* @__PURE__ */ s(xt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
883
- r.remainingDurationByline(u)
908
+ l !== null ? /* @__PURE__ */ g(j, { children: [
909
+ /* @__PURE__ */ s("span", { style: Yt, children: " " }),
910
+ /* @__PURE__ */ g("span", { style: o, children: [
911
+ /* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
912
+ i.remainingDurationByline(l)
884
913
  ] })
885
914
  ] }) : null
886
915
  ] }) }) })
@@ -888,35 +917,36 @@ function fr({
888
917
  }
889
918
  );
890
919
  }
891
- const vt = (e) => `platform-modules-panel-${e}`;
892
- function Ve(e) {
920
+ const zt = (e) => `platform-modules-panel-${e}`;
921
+ function tt(e) {
893
922
  return e !== void 0 && e.type !== "sub_header";
894
923
  }
895
- function wt(e) {
896
- return Ve(e) && e.indent > 0;
924
+ function Nt(e) {
925
+ return tt(e) && e.indent > 0;
897
926
  }
898
- function hr(e, t) {
927
+ function kr(e, t) {
899
928
  let n = t;
900
- return e.map((r) => {
901
- if (r.type !== "sub_header")
902
- return n = r.itemNumber ?? n + 1, n;
929
+ return e.map((i) => {
930
+ if (i.type !== "sub_header")
931
+ return n = i.itemNumber ?? n + 1, n;
903
932
  });
904
933
  }
905
- function Mr({
934
+ function Or({
906
935
  module: e,
907
936
  state: t,
908
937
  today: n,
909
- showDiagnostics: r,
938
+ showDiagnostics: i,
910
939
  stackPill: o,
911
- moduleLabel: i
940
+ moduleLabel: r,
941
+ searchTerm: a
912
942
  }) {
913
- const { t: l } = $(), u = it(), a = R(null), c = hr(t.items, t.itemOffset), g = t.items.length, p = !t.isLoading && !t.isRefreshing;
914
- W(() => {
915
- if (!p || g === 0 || a.current === t.page) return;
916
- const f = a.current === null;
917
- a.current = t.page, x(
918
- f ? l("itemsLoadedAnnouncement", {
919
- loaded: g,
943
+ const { t: l } = F(), u = at(), c = L(null), p = kr(t.items, t.itemOffset), m = t.items.length, h = !t.isLoading && !t.isRefreshing;
944
+ $(() => {
945
+ if (!h || m === 0 || c.current === t.page) return;
946
+ const M = c.current === null;
947
+ c.current = t.page, O(
948
+ M ? l("itemsLoadedAnnouncement", {
949
+ loaded: m,
920
950
  count: e.itemCount,
921
951
  name: e.name
922
952
  }) : l("itemsPageChangedAnnouncement", {
@@ -925,26 +955,26 @@ function Mr({
925
955
  name: e.name
926
956
  })
927
957
  );
928
- }, [p, g, t.page, t.pageCount, e.itemCount, e.name, l]);
929
- const h = (f) => {
930
- u("paginate-items"), f === 1 ? t.goToFirstPage() : f === t.page - 1 ? t.goToPreviousPage() : f === t.page + 1 ? t.goToNextPage() : f === t.pageCount && t.goToLastPage();
958
+ }, [h, m, t.page, t.pageCount, e.itemCount, e.name, l]);
959
+ const S = (M) => {
960
+ u("paginate-items"), M === 1 ? t.goToFirstPage() : M === t.page - 1 ? t.goToPreviousPage() : M === t.page + 1 ? t.goToNextPage() : M === t.pageCount && t.goToLastPage();
931
961
  };
932
- return t.error ? /* @__PURE__ */ s(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
933
- X,
962
+ return t.error ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
963
+ te,
934
964
  {
935
965
  variant: "error",
936
966
  margin: "0",
937
- liveRegion: be,
967
+ liveRegion: Ae,
938
968
  liveRegionPoliteness: "assertive",
939
969
  "data-testid": "items-error",
940
970
  children: l("itemsLoadErrorAlert", { message: t.error.message })
941
971
  }
942
- ) }) : t.isLoading ? /* @__PURE__ */ m(E, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
943
- /* @__PURE__ */ s(st, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
972
+ ) }) : t.isLoading ? /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
973
+ /* @__PURE__ */ s(dt, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
944
974
  " ",
945
- /* @__PURE__ */ s(P, { size: "small", color: "secondary", children: l("itemsLoadingText") })
946
- ] }) : /* @__PURE__ */ m(E, { as: "div", margin: "small 0 0 0", children: [
947
- r ? /* @__PURE__ */ m(P, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
975
+ /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("itemsLoadingText") })
976
+ ] }) : /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", children: [
977
+ i ? /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
948
978
  "items source: ",
949
979
  t.source,
950
980
  " · page ",
@@ -952,90 +982,99 @@ function Mr({
952
982
  " of ",
953
983
  t.pageCount
954
984
  ] }) : null,
955
- t.items.length === 0 ? /* @__PURE__ */ s(E, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(P, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Qe, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((f, I) => /* @__PURE__ */ s(Ke, { children: /* @__PURE__ */ s(
956
- Wn,
985
+ t.items.length === 0 ? /* @__PURE__ */ s(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Je, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((M, T) => /* @__PURE__ */ s(et, { children: /* @__PURE__ */ s(
986
+ ni,
957
987
  {
958
- item: f,
988
+ item: M,
959
989
  today: n,
960
- attachedAbove: wt(f) && Ve(t.items[I - 1]),
961
- attachedBelow: Ve(f) && wt(t.items[I + 1]),
990
+ attachedAbove: Nt(M) && tt(t.items[T - 1]),
991
+ attachedBelow: tt(M) && Nt(t.items[T + 1]),
962
992
  stackPill: o,
963
- moduleLabel: i,
964
- itemNumber: c[I]
993
+ moduleLabel: r,
994
+ itemNumber: p[T],
995
+ searchTerm: a
965
996
  }
966
- ) }, f.id)) }),
997
+ ) }, M.id)) }),
967
998
  t.pageCount > 1 ? /* @__PURE__ */ s(
968
- $t,
999
+ Kt,
969
1000
  {
970
1001
  as: "nav",
971
1002
  variant: "compact",
972
1003
  withFirstAndLastButton: !0,
973
1004
  margin: "small 0 0 0",
974
- label: /* @__PURE__ */ s(gi, { children: l("itemsPaginationLabel", { name: e.name }) }),
1005
+ label: /* @__PURE__ */ s(vi, { children: l("itemsPaginationLabel", { name: e.name }) }),
975
1006
  labelFirst: l("paginationFirstPage"),
976
1007
  labelPrev: l("paginationPreviousPage"),
977
1008
  labelNext: l("paginationNextPage"),
978
1009
  labelLast: l("paginationLastPage"),
979
- screenReaderLabelPageButton: (f) => l("paginationPageLabel", { page: f }),
1010
+ screenReaderLabelPageButton: (M) => l("paginationPageLabel", { page: M }),
980
1011
  ellipsis: l("paginationEllipsis"),
981
1012
  totalPageNumber: t.pageCount,
982
1013
  currentPage: t.page,
983
1014
  disabled: t.isRefreshing,
984
- onPageChange: h,
1015
+ onPageChange: S,
985
1016
  "data-testid": "items-pagination"
986
1017
  }
987
1018
  ) : null
988
1019
  ] });
989
1020
  }
990
- function _r({
1021
+ function Dr({
991
1022
  module: e,
992
1023
  expanded: t,
993
1024
  onToggle: n,
994
- itemsState: r,
1025
+ itemsState: i,
995
1026
  today: o,
996
- showDiagnostics: i = !1,
997
- headingLevel: l = "h3",
998
- moduleLabel: u,
999
- breakpoints: a = {},
1000
- toggleRef: c
1027
+ showDiagnostics: r = !1,
1028
+ headingLevel: a = "h3",
1029
+ moduleLabel: l,
1030
+ breakpoints: u = {},
1031
+ toggleRef: c,
1032
+ searchTerm: p
1001
1033
  }) {
1002
- var te, pe, j, le, ae;
1003
- const { t: g, timezone: p } = $(), h = it(), f = rt(), { navigation: I } = ve(), w = Dn(), L = ((te = e.progress) == null ? void 0 : te.status) === "locked", U = L ? null : ((pe = I.getModuleHref) == null ? void 0 : pe.call(I, e)) ?? null, O = u === void 0 ? f.moduleLabel(e.position, e) : u, S = (O == null ? void 0 : O.trim()) || null, C = S ? g("moduleNameWithLabel", { label: S, name: e.name }) : e.name, K = /* @__PURE__ */ s(
1004
- me,
1034
+ var V, ue, de, ce, _e;
1035
+ const { t: m, timezone: h } = F(), S = at(), M = ut(), { navigation: T } = ke(), D = Wn(), A = ((V = e.progress) == null ? void 0 : V.status) === "locked", U = A ? null : ((ue = T.getModuleHref) == null ? void 0 : ue.call(T, e)) ?? null, y = l === void 0 ? M.moduleLabel(e.position, e) : l, P = (y == null ? void 0 : y.trim()) || null, Q = P ? m("moduleNameWithLabel", { label: P, name: e.name }) : e.name, B = p ? P ? /* @__PURE__ */ s(
1036
+ Yn,
1037
+ {
1038
+ render: (z) => m("moduleNameWithLabel", { label: P, name: z }),
1039
+ name: e.name,
1040
+ term: p
1041
+ }
1042
+ ) : /* @__PURE__ */ s(jn, { text: e.name, term: p }) : Q, R = /* @__PURE__ */ s(
1043
+ Ie,
1005
1044
  {
1006
- level: l,
1045
+ level: a,
1007
1046
  variant: "titleCardMini",
1008
- color: L ? "secondary" : "primary",
1009
- "aria-label": C,
1047
+ color: A ? "secondary" : "primary",
1048
+ "aria-label": Q,
1010
1049
  "data-testid": "module-name",
1011
- children: /* @__PURE__ */ s(mi, { themeOverride: pr, children: /* @__PURE__ */ s(ci, { linesAllowed: gr, children: C }) })
1050
+ children: /* @__PURE__ */ s(Ci, { themeOverride: Ar, children: /* @__PURE__ */ s(Pi, { linesAllowed: Lr, children: B }) })
1012
1051
  }
1013
- ), T = U ? /* @__PURE__ */ s(
1014
- hi,
1052
+ ), q = U ? /* @__PURE__ */ s(
1053
+ Li,
1015
1054
  {
1016
1055
  href: U,
1017
1056
  display: "inline-block",
1018
1057
  forceButtonRole: !1,
1019
- variant: w,
1020
- "aria-label": C,
1021
- onClick: (B) => B.stopPropagation(),
1022
- children: K
1058
+ variant: D,
1059
+ "aria-label": Q,
1060
+ onClick: (z) => z.stopPropagation(),
1061
+ children: R
1023
1062
  }
1024
- ) : K, A = (((j = e.completionRequirements) == null ? void 0 : j.length) ?? 0) > 0 ? /* @__PURE__ */ s(zn, {}) : null, q = a.mobileOnly === !0, F = () => {
1025
- h(t ? "module-collapse" : "module-expand"), n(e.id);
1026
- }, ee = () => {
1027
- var B;
1028
- (B = window.getSelection()) != null && B.toString().trim() || F();
1029
- }, D = (le = e.progress) != null && le.status ? /* @__PURE__ */ s(
1030
- Nn,
1063
+ ) : R, G = (((de = e.completionRequirements) == null ? void 0 : de.length) ?? 0) > 0 ? /* @__PURE__ */ s(Qn, {}) : null, K = u.mobileOnly === !0, Z = () => {
1064
+ S(t ? "module-collapse" : "module-expand"), n(e.id);
1065
+ }, ie = () => {
1066
+ var z;
1067
+ (z = window.getSelection()) != null && z.toString().trim() || Z();
1068
+ }, w = (ce = e.progress) != null && ce.status ? /* @__PURE__ */ s(
1069
+ Kn,
1031
1070
  {
1032
1071
  status: e.progress.status,
1033
1072
  missingCount: e.progress.missingCount,
1034
1073
  incompleteCount: e.progress.incompleteCount
1035
1074
  }
1036
- ) : null, v = ((ae = e.progress) == null ? void 0 : ae.status) !== void 0 && e.progress.status !== "complete" && !L && xn(e.progress.nextDueAt, o, p) ? /* @__PURE__ */ s(Fn, {}) : null;
1037
- return /* @__PURE__ */ m(
1038
- E,
1075
+ ) : null, X = ((_e = e.progress) == null ? void 0 : _e.status) !== void 0 && e.progress.status !== "complete" && !A && Vn(e.progress.nextDueAt, o, h) ? /* @__PURE__ */ s(Jn, {}) : null;
1076
+ return /* @__PURE__ */ g(
1077
+ _,
1039
1078
  {
1040
1079
  as: "div",
1041
1080
  background: "primary",
@@ -1046,106 +1085,107 @@ function _r({
1046
1085
  margin: "0 0 small 0",
1047
1086
  "data-testid": `module-card-${e.id}`,
1048
1087
  children: [
1049
- /* @__PURE__ */ s(E, { as: "div", cursor: "pointer", children: /* @__PURE__ */ m(
1050
- _,
1088
+ /* @__PURE__ */ s(_, { as: "div", cursor: "pointer", children: /* @__PURE__ */ g(
1089
+ I,
1051
1090
  {
1052
1091
  alignItems: "start",
1053
1092
  gap: "mediumSmall",
1054
- onClick: ee,
1093
+ onClick: ie,
1055
1094
  "data-testid": "module-header",
1056
1095
  children: [
1057
- /* @__PURE__ */ m(_.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1058
- /* @__PURE__ */ m(E, { as: "div", children: [
1059
- /* @__PURE__ */ s(E, { as: "div", children: A ? /* @__PURE__ */ m(_, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
1060
- /* @__PURE__ */ s(_.Item, { shouldShrink: !0, children: T }),
1061
- /* @__PURE__ */ s(_.Item, { children: A })
1062
- ] }) : T }),
1063
- e.published ? null : /* @__PURE__ */ m(P, { size: "x-small", color: "secondary", children: [
1096
+ /* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1097
+ /* @__PURE__ */ g(_, { as: "div", children: [
1098
+ /* @__PURE__ */ s(_, { as: "div", children: G ? /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
1099
+ /* @__PURE__ */ s(I.Item, { shouldShrink: !0, children: q }),
1100
+ /* @__PURE__ */ s(I.Item, { children: G })
1101
+ ] }) : q }),
1102
+ e.published ? null : /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", children: [
1064
1103
  " ",
1065
- g("moduleUnpublishedBadge")
1104
+ m("moduleUnpublishedBadge")
1066
1105
  ] })
1067
1106
  ] }),
1068
- /* @__PURE__ */ s(or, { module: e, today: o }),
1069
- q && (D || v) ? /* @__PURE__ */ s(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ m(_, { gap: "x-small", wrap: "wrap", children: [
1070
- v ? /* @__PURE__ */ s(_.Item, { children: v }) : null,
1071
- D ? /* @__PURE__ */ s(_.Item, { children: D }) : null
1107
+ /* @__PURE__ */ s(Tr, { module: e, today: o }),
1108
+ K && (w || X) ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(I, { gap: "x-small", wrap: "wrap", children: [
1109
+ X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
1110
+ w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
1072
1111
  ] }) }) : null,
1073
- /* @__PURE__ */ s(fr, { module: e, breakpoints: a })
1112
+ /* @__PURE__ */ s(Rr, { module: e, breakpoints: u })
1074
1113
  ] }),
1075
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "mediumSmall", children: [
1076
- !q && (v || D) ? /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "x-small", children: [
1077
- v ? /* @__PURE__ */ s(_.Item, { children: v }) : null,
1078
- D ? /* @__PURE__ */ s(_.Item, { children: D }) : null
1114
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "mediumSmall", children: [
1115
+ !K && (X || w) ? /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", children: [
1116
+ X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
1117
+ w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
1079
1118
  ] }) }) : null,
1080
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(
1081
- pi,
1119
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(
1120
+ Qt,
1082
1121
  {
1083
- elementRef: (B) => c == null ? void 0 : c(e.id, B),
1122
+ elementRef: (z) => c == null ? void 0 : c(e.id, z),
1084
1123
  size: "medium",
1085
1124
  withBorder: !0,
1086
1125
  withBackground: !1,
1087
- screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1126
+ screenReaderLabel: t ? m("collapseModule", { name: e.name }) : m("expandModule", { name: e.name }),
1088
1127
  "aria-expanded": t,
1089
- "aria-controls": vt(e.id),
1090
- onClick: (B) => {
1091
- B.stopPropagation(), F();
1128
+ "aria-controls": zt(e.id),
1129
+ onClick: (z) => {
1130
+ z.stopPropagation(), Z();
1092
1131
  },
1093
1132
  "data-testid": `toggle-module-${e.id}`,
1094
- children: t ? /* @__PURE__ */ s(li, {}) : /* @__PURE__ */ s(ai, {})
1133
+ children: t ? /* @__PURE__ */ s(_i, {}) : /* @__PURE__ */ s(Ei, {})
1095
1134
  }
1096
1135
  ) })
1097
1136
  ] }) })
1098
1137
  ]
1099
1138
  }
1100
1139
  ) }),
1101
- /* @__PURE__ */ s("div", { id: vt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
1102
- Mr,
1140
+ /* @__PURE__ */ s("div", { id: zt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
1141
+ Or,
1103
1142
  {
1104
1143
  module: e,
1105
- state: r,
1144
+ state: i,
1106
1145
  today: o,
1107
- showDiagnostics: i,
1108
- stackPill: q,
1109
- moduleLabel: $n(e) ? null : S
1146
+ showDiagnostics: r,
1147
+ stackPill: K,
1148
+ moduleLabel: Zn(e) ? null : P,
1149
+ searchTerm: p
1110
1150
  }
1111
1151
  ) : null })
1112
1152
  ]
1113
1153
  }
1114
1154
  );
1115
1155
  }
1116
- const Er = si(_r), Zs = ["place_new", "reorganize_all"], tn = ["assignment", "discussion", "quiz", "page", "file"], Ze = 1e3, Ir = () => ({
1156
+ const qr = Ii(Dr), ho = ["place_new", "reorganize_all"], mn = ["assignment", "discussion", "quiz", "page", "file"], nt = 1e3, zr = () => ({
1117
1157
  mode: "place_new",
1118
- contentTypes: [...tn],
1158
+ contentTypes: [...mn],
1119
1159
  setPrerequisites: !0,
1120
1160
  setRequirements: !0,
1121
1161
  direction: ""
1122
1162
  });
1123
- function Sr(e, t) {
1163
+ function Nr(e, t) {
1124
1164
  return e(t === "assignment" ? "itemTypeAssignment" : t === "discussion" ? "itemTypeDiscussion" : t === "quiz" ? "itemTypeQuiz" : t === "page" ? "itemTypePage" : "itemTypeFile");
1125
1165
  }
1126
- const Xe = "prerequisites", Je = "requirements", yr = (e) => [
1127
- ...e.setPrerequisites ? [Xe] : [],
1128
- ...e.setRequirements ? [Je] : []
1166
+ const it = "prerequisites", rt = "requirements", xr = (e) => [
1167
+ ...e.setPrerequisites ? [it] : [],
1168
+ ...e.setRequirements ? [rt] : []
1129
1169
  ];
1130
- function Tr({
1170
+ function $r({
1131
1171
  input: e,
1132
1172
  errors: t,
1133
1173
  onChange: n,
1134
- disabled: r = !1
1174
+ disabled: i = !1
1135
1175
  }) {
1136
- const { t: o } = $();
1137
- return /* @__PURE__ */ m(E, { as: "div", "data-testid": "organize-form", children: [
1138
- /* @__PURE__ */ m(
1139
- Pi,
1176
+ const { t: o } = F();
1177
+ return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-form", children: [
1178
+ /* @__PURE__ */ g(
1179
+ xi,
1140
1180
  {
1141
1181
  name: "organize-mode",
1142
1182
  value: e.mode,
1143
- onChange: (i, l) => n({ mode: l }),
1183
+ onChange: (r, a) => n({ mode: a }),
1144
1184
  description: o("organizeModeLegend"),
1145
- disabled: r,
1185
+ disabled: i,
1146
1186
  children: [
1147
1187
  /* @__PURE__ */ s(
1148
- yt,
1188
+ Rt,
1149
1189
  {
1150
1190
  value: "place_new",
1151
1191
  label: o("organizeModePlaceNew"),
@@ -1153,7 +1193,7 @@ function Tr({
1153
1193
  }
1154
1194
  ),
1155
1195
  /* @__PURE__ */ s(
1156
- yt,
1196
+ Rt,
1157
1197
  {
1158
1198
  value: "reorganize_all",
1159
1199
  label: o("organizeModeReorganizeAll"),
@@ -1163,402 +1203,402 @@ function Tr({
1163
1203
  ]
1164
1204
  }
1165
1205
  ),
1166
- e.mode === "reorganize_all" ? /* @__PURE__ */ s(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(X, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
1167
- /* @__PURE__ */ s(E, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
1168
- St,
1206
+ e.mode === "reorganize_all" ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(te, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
1207
+ /* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
1208
+ At,
1169
1209
  {
1170
1210
  name: "organize-content-types",
1171
1211
  value: [...e.contentTypes],
1172
- onChange: (i) => n({ contentTypes: i }),
1212
+ onChange: (r) => n({ contentTypes: r }),
1173
1213
  description: o("organizeContentTypesLegend"),
1174
1214
  messages: t.contentTypes ? [{ type: "newError", text: o("organizeErrorPickAContentType") }] : void 0,
1175
1215
  layout: "columns",
1176
- children: tn.map((i) => /* @__PURE__ */ s(
1177
- Ye,
1216
+ children: mn.map((r) => /* @__PURE__ */ s(
1217
+ Ze,
1178
1218
  {
1179
- value: i,
1180
- label: Sr(o, i),
1181
- disabled: r,
1182
- "data-testid": `organize-content-type-${i}`
1219
+ value: r,
1220
+ label: Nr(o, r),
1221
+ disabled: i,
1222
+ "data-testid": `organize-content-type-${r}`
1183
1223
  },
1184
- i
1224
+ r
1185
1225
  ))
1186
1226
  }
1187
1227
  ) }),
1188
- /* @__PURE__ */ s(E, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ m(
1189
- St,
1228
+ /* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ g(
1229
+ At,
1190
1230
  {
1191
1231
  name: "organize-progression",
1192
- value: yr(e),
1193
- onChange: (i) => n({
1194
- setPrerequisites: i.includes(Xe),
1195
- setRequirements: i.includes(Je)
1232
+ value: xr(e),
1233
+ onChange: (r) => n({
1234
+ setPrerequisites: r.includes(it),
1235
+ setRequirements: r.includes(rt)
1196
1236
  }),
1197
1237
  description: o("organizeProgressionLegend"),
1198
1238
  children: [
1199
1239
  /* @__PURE__ */ s(
1200
- Ye,
1240
+ Ze,
1201
1241
  {
1202
- value: Xe,
1242
+ value: it,
1203
1243
  label: o("organizeSetPrerequisites"),
1204
- disabled: r,
1244
+ disabled: i,
1205
1245
  "data-testid": "organize-set-prerequisites"
1206
1246
  }
1207
1247
  ),
1208
1248
  /* @__PURE__ */ s(
1209
- Ye,
1249
+ Ze,
1210
1250
  {
1211
- value: Je,
1251
+ value: rt,
1212
1252
  label: o("organizeSetRequirements"),
1213
- disabled: r,
1253
+ disabled: i,
1214
1254
  "data-testid": "organize-set-requirements"
1215
1255
  }
1216
1256
  )
1217
1257
  ]
1218
1258
  }
1219
1259
  ) }),
1220
- /* @__PURE__ */ m(E, { as: "div", margin: "medium 0 0 0", children: [
1260
+ /* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
1221
1261
  /* @__PURE__ */ s(
1222
- bi,
1262
+ $i,
1223
1263
  {
1224
1264
  label: o("organizeDirectionLabel"),
1225
1265
  placeholder: o("organizeDirectionPlaceholder"),
1226
1266
  value: e.direction,
1227
- onChange: (i) => n({ direction: i.target.value.slice(0, Ze) }),
1228
- disabled: r,
1267
+ onChange: (r) => n({ direction: r.target.value.slice(0, nt) }),
1268
+ disabled: i,
1229
1269
  height: "6rem",
1230
1270
  "data-testid": "organize-direction"
1231
1271
  }
1232
1272
  ),
1233
- /* @__PURE__ */ s(E, { as: "div", textAlign: "end", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s(P, { size: "x-small", color: "secondary", "data-testid": "organize-direction-count", children: o("organizeDirectionCount", {
1273
+ /* @__PURE__ */ s(_, { as: "div", textAlign: "end", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "x-small", color: "secondary", "data-testid": "organize-direction-count", children: o("organizeDirectionCount", {
1234
1274
  used: e.direction.length,
1235
- max: Ze
1275
+ max: nt
1236
1276
  }) }) })
1237
1277
  ] })
1238
1278
  ] });
1239
1279
  }
1240
- const nn = "organize-preview", rn = (e) => `proposed-module-${e + 1}`, Pr = (e) => `${e.contentType}-${e.contentId}`;
1241
- function br(e, t) {
1280
+ const gn = "organize-preview", pn = (e) => `proposed-module-${e + 1}`, Fr = (e) => `${e.contentType}-${e.contentId}`;
1281
+ function Ur(e, t) {
1242
1282
  const n = e.completionRequirement;
1243
1283
  if (n)
1244
1284
  return { itemId: t, type: n.type, minScore: n.minScore ?? null };
1245
1285
  }
1246
- function Cr(e, t, n) {
1247
- const r = Pr(e);
1286
+ function Br(e, t, n) {
1287
+ const i = Fr(e);
1248
1288
  return {
1249
- id: r,
1289
+ id: i,
1250
1290
  moduleId: t,
1251
1291
  title: e.title,
1252
1292
  type: e.contentType,
1253
1293
  position: n + 1,
1254
1294
  indent: 0,
1255
1295
  published: !0,
1256
- completionRequirement: br(e, r) ?? null,
1257
- extensions: { [Qn]: e.isNew }
1296
+ completionRequirement: Ur(e, i) ?? null,
1297
+ extensions: { [oi]: e.isNew }
1258
1298
  };
1259
1299
  }
1260
- function vr(e) {
1300
+ function Gr(e) {
1261
1301
  const t = /* @__PURE__ */ new Map();
1262
- return e.forEach((n, r) => {
1302
+ return e.forEach((n, i) => {
1263
1303
  t.set(
1264
1304
  n.position,
1265
- t.has(n.position) ? null : { id: rn(r), name: n.name }
1305
+ t.has(n.position) ? null : { id: pn(i), name: n.name }
1266
1306
  );
1267
1307
  }), t;
1268
1308
  }
1269
- function wr(e, t, n) {
1270
- return e.prerequisitePositions.flatMap((r) => {
1271
- const o = n.get(r);
1309
+ function Hr(e, t, n) {
1310
+ return e.prerequisitePositions.flatMap((i) => {
1311
+ const o = n.get(i);
1272
1312
  return !o || o.id === t ? [] : [o];
1273
1313
  });
1274
1314
  }
1275
- function Lr(e) {
1276
- const t = vr(e.modules), n = [], r = {};
1277
- for (const [o, i] of e.modules.entries()) {
1278
- const l = rn(o), u = i.items.map((a, c) => Cr(a, l, c));
1279
- r[l] = u, n.push({
1280
- id: l,
1281
- name: i.name,
1282
- position: i.position,
1315
+ function Wr(e) {
1316
+ const t = Gr(e.modules), n = [], i = {};
1317
+ for (const [o, r] of e.modules.entries()) {
1318
+ const a = pn(o), l = r.items.map((u, c) => Br(u, a, c));
1319
+ i[a] = l, n.push({
1320
+ id: a,
1321
+ name: r.name,
1322
+ position: r.position,
1283
1323
  published: !0,
1284
- itemCount: u.length,
1285
- items: u,
1286
- prerequisiteModules: wr(i, l, t),
1287
- requirementCount: i.requirementType === "one" ? 1 : null,
1324
+ itemCount: l.length,
1325
+ items: l,
1326
+ prerequisiteModules: Hr(r, a, t),
1327
+ requirementCount: r.requirementType === "one" ? 1 : null,
1288
1328
  requireSequentialProgress: !1,
1289
- completionRequirements: u.flatMap(
1290
- (a) => a.completionRequirement ? [a.completionRequirement] : []
1329
+ completionRequirements: l.flatMap(
1330
+ (u) => u.completionRequirement ? [u.completionRequirement] : []
1291
1331
  ),
1292
1332
  extensions: {
1293
- [jn]: i.isNew,
1294
- [Yn]: i.items.filter((a) => a.isNew).length,
1295
- [Hn]: !0
1333
+ [si]: r.isNew,
1334
+ [ri]: r.items.filter((u) => u.isNew).length,
1335
+ [ii]: !0
1296
1336
  }
1297
1337
  });
1298
1338
  }
1299
- return { courseId: nn, modules: n, itemsByModuleId: r };
1339
+ return { courseId: gn, modules: n, itemsByModuleId: i };
1300
1340
  }
1301
- const Ar = {
1341
+ const Yr = {
1302
1342
  itemsLoadedAnnouncement: ""
1303
1343
  };
1304
- function Rr({ proposal: e }) {
1305
- const { t } = $(), n = G(() => Lr(e), [e]), r = G(() => Zn(n), [n]), o = G(() => n.modules.map((l) => l.id), [n]), i = Xn({
1306
- courseId: nn,
1307
- adapter: r,
1344
+ function jr({ proposal: e }) {
1345
+ const { t } = F(), n = W(() => Wr(e), [e]), i = W(() => ui(n), [n]), o = W(() => n.modules.map((a) => a.id), [n]), r = di({
1346
+ courseId: gn,
1347
+ adapter: i,
1308
1348
  itemsMode: "inline",
1309
1349
  initialExpandedModuleIds: o
1310
1350
  });
1311
- return /* @__PURE__ */ m(Y, { children: [
1312
- /* @__PURE__ */ s(me, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1313
- /* @__PURE__ */ s(Gr, { data: i, headingLevel: "h3" })
1351
+ return /* @__PURE__ */ g(j, { children: [
1352
+ /* @__PURE__ */ s(Ie, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
1353
+ /* @__PURE__ */ s(os, { data: r, headingLevel: "h3" })
1314
1354
  ] });
1315
1355
  }
1316
- function kr({ proposal: e }) {
1317
- const { t } = $(), n = ve(), r = G(() => er(n), [n]), [o] = H(
1318
- () => new ni({ defaultOptions: { queries: { retry: !1 } } })
1356
+ function Qr({ proposal: e }) {
1357
+ const { t } = F(), n = ke(), i = W(() => hr(n), [n]), [o] = Y(
1358
+ () => new pi({ defaultOptions: { queries: { retry: !1 } } })
1319
1359
  );
1320
- return /* @__PURE__ */ m(E, { as: "div", "data-testid": "organize-proposal-preview", children: [
1321
- e.unplacedItems.length > 0 ? /* @__PURE__ */ m(X, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1322
- /* @__PURE__ */ s(E, { as: "div", children: /* @__PURE__ */ s(P, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
1323
- /* @__PURE__ */ s(E, { as: "div", children: /* @__PURE__ */ s(P, { children: t("organizeUnplacedExplanation") }) }),
1324
- /* @__PURE__ */ s(Qe, { margin: "x-small 0 0 0", children: e.unplacedItems.map((i) => /* @__PURE__ */ s(Ke, { children: i.title }, `${i.contentType}-${i.contentId}`)) })
1360
+ return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-proposal-preview", children: [
1361
+ e.unplacedItems.length > 0 ? /* @__PURE__ */ g(te, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
1362
+ /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
1363
+ /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { children: t("organizeUnplacedExplanation") }) }),
1364
+ /* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.unplacedItems.map((r) => /* @__PURE__ */ s(et, { children: r.title }, `${r.contentType}-${r.contentId}`)) })
1325
1365
  ] }) : null,
1326
- e.warnings.length > 0 ? /* @__PURE__ */ m(X, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1327
- /* @__PURE__ */ s(E, { as: "div", children: /* @__PURE__ */ s(P, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
1328
- /* @__PURE__ */ s(Qe, { margin: "x-small 0 0 0", children: e.warnings.map((i) => /* @__PURE__ */ s(Ke, { children: i }, i)) })
1366
+ e.warnings.length > 0 ? /* @__PURE__ */ g(te, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
1367
+ /* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
1368
+ /* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.warnings.map((r) => /* @__PURE__ */ s(et, { children: r }, r)) })
1329
1369
  ] }) : null,
1330
- /* @__PURE__ */ s(ii, { client: o, children: /* @__PURE__ */ s(Kn, { translations: Ar, children: /* @__PURE__ */ s(Vn, { value: r, children: /* @__PURE__ */ s(Rr, { proposal: e }) }) }) })
1370
+ /* @__PURE__ */ s(fi, { client: o, children: /* @__PURE__ */ s(li, { translations: Yr, children: /* @__PURE__ */ s(ai, { value: i, children: /* @__PURE__ */ s(jr, { proposal: e }) }) }) })
1331
1371
  ] });
1332
1372
  }
1333
- function Lt(e) {
1373
+ function xt(e) {
1334
1374
  const t = {};
1335
- return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > Ze && (t.direction = "too_long"), t;
1375
+ return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > nt && (t.direction = "too_long"), t;
1336
1376
  }
1337
- const At = (e) => Object.keys(e).length > 0, Or = 1e4, qr = (e) => e instanceof DOMException && e.name === "AbortError", Dr = (e) => e instanceof Error ? e : new Error(String(e)), zr = { loading: "read", applying: "write" }, Rt = (e) => {
1377
+ const $t = (e) => Object.keys(e).length > 0, Kr = 1e4, Vr = (e) => e instanceof DOMException && e.name === "AbortError", Zr = (e) => e instanceof Error ? e : new Error(String(e)), Xr = { loading: "read", applying: "write" }, Ft = (e) => {
1338
1378
  (e == null ? void 0 : e.kind) === "read" && e.controller.abort();
1339
1379
  };
1340
- function Nr({
1380
+ function Jr({
1341
1381
  actions: e,
1342
1382
  onApplied: t
1343
1383
  }) {
1344
- const [n, r] = H("form"), [o, i] = H(Ir), [l, u] = H(null), [a, c] = H(null), [g, p] = H(!1), h = R(null), f = R(0), I = R(!0);
1345
- W(() => (I.current = !0, () => {
1346
- I.current = !1, Rt(h.current), h.current = null;
1384
+ const [n, i] = Y("form"), [o, r] = Y(zr), [a, l] = Y(null), [u, c] = Y(null), [p, m] = Y(!1), h = L(null), S = L(0), M = L(!0);
1385
+ $(() => (M.current = !0, () => {
1386
+ M.current = !1, Ft(h.current), h.current = null;
1347
1387
  }), []);
1348
- const w = G(() => Lt(o), [o]), L = !At(w), U = N(() => {
1349
- Rt(h.current), h.current = null, f.current += 1, p(!1);
1350
- }, []), O = N((T) => {
1351
- i((A) => ({ ...A, ...T }));
1352
- }, []), S = N(
1353
- (T, A, q) => {
1354
- U();
1355
- const F = new AbortController(), ee = f.current;
1356
- h.current = { kind: zr[T], controller: F }, c(null), r(T);
1357
- const D = () => I.current && f.current === ee;
1358
- q({ signal: F.signal, current: D }).catch((oe) => {
1359
- F.signal.aborted || qr(oe) || !D() || (c(Dr(oe)), r(A));
1388
+ const T = W(() => xt(o), [o]), D = !$t(T), A = x(() => {
1389
+ Ft(h.current), h.current = null, S.current += 1, m(!1);
1390
+ }, []), U = x((C) => {
1391
+ r((R) => ({ ...R, ...C }));
1392
+ }, []), y = x(
1393
+ (C, R, q) => {
1394
+ A();
1395
+ const G = new AbortController(), K = S.current;
1396
+ h.current = { kind: Xr[C], controller: G }, c(null), i(C);
1397
+ const Z = () => M.current && S.current === K;
1398
+ q({ signal: G.signal, current: Z }).catch((ie) => {
1399
+ G.signal.aborted || Vr(ie) || !Z() || (c(Zr(ie)), i(R));
1360
1400
  });
1361
1401
  },
1362
- [U]
1363
- ), C = N(() => {
1364
- At(Lt(o)) || S("loading", "error", async ({ signal: T, current: A }) => {
1365
- const q = await e.organize(o, T);
1366
- T.aborted || !A() || (u(q), r("preview"));
1402
+ [A]
1403
+ ), P = x(() => {
1404
+ $t(xt(o)) || y("loading", "error", async ({ signal: C, current: R }) => {
1405
+ const q = await e.organize(o, C);
1406
+ C.aborted || !R() || (l(q), i("preview"));
1367
1407
  });
1368
- }, [e, o, S]), Q = N(() => {
1369
- l !== null && S("applying", "preview", async ({ signal: T }) => {
1370
- await e.apply(l, o, T), t == null || t();
1408
+ }, [e, o, y]), Q = x(() => {
1409
+ a !== null && y("applying", "preview", async ({ signal: C }) => {
1410
+ await e.apply(a, o, C), t == null || t();
1371
1411
  });
1372
- }, [e, o, t, l, S]), K = N(() => {
1373
- U(), u(null), c(null), r("form");
1374
- }, [U]);
1375
- return W(() => {
1412
+ }, [e, o, t, a, y]), B = x(() => {
1413
+ A(), l(null), c(null), i("form");
1414
+ }, [A]);
1415
+ return $(() => {
1376
1416
  if (n !== "loading" && n !== "applying") return;
1377
- const T = setTimeout(() => p(!0), Or);
1378
- return () => clearTimeout(T);
1417
+ const C = setTimeout(() => m(!0), Kr);
1418
+ return () => clearTimeout(C);
1379
1419
  }, [n]), {
1380
1420
  status: n,
1381
1421
  input: o,
1382
- setInput: O,
1383
- errors: w,
1384
- canSubmit: L,
1385
- proposal: l,
1386
- error: a,
1387
- takingLong: g && (n === "loading" || n === "applying"),
1388
- submit: C,
1389
- regenerate: C,
1422
+ setInput: U,
1423
+ errors: T,
1424
+ canSubmit: D,
1425
+ proposal: a,
1426
+ error: u,
1427
+ takingLong: p && (n === "loading" || n === "applying"),
1428
+ submit: P,
1429
+ regenerate: P,
1390
1430
  apply: Q,
1391
- cancel: K
1431
+ cancel: B
1392
1432
  };
1393
1433
  }
1394
- function kt({ label: e, takingLong: t }) {
1395
- const { t: n } = $();
1396
- return /* @__PURE__ */ m(E, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1397
- /* @__PURE__ */ s(st, { renderTitle: e }),
1398
- /* @__PURE__ */ s(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(P, { color: "secondary", children: e }) }),
1399
- t ? /* @__PURE__ */ s(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ s(P, { size: "small", color: "secondary", "data-testid": "organize-taking-long", children: n("organizeStillWorking") }) }) : null
1434
+ function Ut({ label: e, takingLong: t }) {
1435
+ const { t: n } = F();
1436
+ return /* @__PURE__ */ g(_, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
1437
+ /* @__PURE__ */ s(dt, { renderTitle: e }),
1438
+ /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { color: "secondary", children: e }) }),
1439
+ t ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", "data-testid": "organize-taking-long", children: n("organizeStillWorking") }) }) : null
1400
1440
  ] });
1401
1441
  }
1402
- function xr({
1442
+ function es({
1403
1443
  actions: e,
1404
1444
  open: t,
1405
1445
  onDismiss: n,
1406
- onApplied: r,
1446
+ onApplied: i,
1407
1447
  aiDisclosure: o
1408
1448
  }) {
1409
- const { t: i } = $(), l = R(!0);
1410
- W(() => (l.current = !0, () => {
1411
- l.current = !1;
1449
+ const { t: r } = F(), a = L(!0);
1450
+ $(() => (a.current = !0, () => {
1451
+ a.current = !1;
1412
1452
  }), []);
1413
- const u = Nr({
1453
+ const l = Jr({
1414
1454
  actions: e,
1415
1455
  onApplied: () => {
1416
- x(i("organizeAppliedAnnouncement")), r == null || r(), l.current && n();
1456
+ O(r("organizeAppliedAnnouncement")), i == null || i(), a.current && n();
1417
1457
  }
1418
- }), { status: a, proposal: c, error: g, takingLong: p } = u;
1419
- return W(() => {
1420
- t && (a === "loading" && x(i("organizeLoadingLabel")), a === "applying" && x(i("organizeApplyingLabel")), a === "preview" && g === null && x(i("organizeProposalReadyAnnouncement")));
1421
- }, [t, a, g, i]), W(() => {
1422
- p && x(i("organizeStillWorking"));
1423
- }, [p, i]), /* @__PURE__ */ m(
1424
- Ii,
1458
+ }), { status: u, proposal: c, error: p, takingLong: m } = l;
1459
+ return $(() => {
1460
+ t && (u === "loading" && O(r("organizeLoadingLabel")), u === "applying" && O(r("organizeApplyingLabel")), u === "preview" && p === null && O(r("organizeProposalReadyAnnouncement")));
1461
+ }, [t, u, p, r]), $(() => {
1462
+ m && O(r("organizeStillWorking"));
1463
+ }, [m, r]), /* @__PURE__ */ g(
1464
+ Di,
1425
1465
  {
1426
1466
  open: t,
1427
1467
  onDismiss: n,
1428
1468
  size: "large",
1429
- label: i("organizeModalLabel"),
1469
+ label: r("organizeModalLabel"),
1430
1470
  shouldCloseOnDocumentClick: !1,
1431
1471
  children: [
1432
- /* @__PURE__ */ m(Si, { children: [
1472
+ /* @__PURE__ */ g(qi, { children: [
1433
1473
  /* @__PURE__ */ s(
1434
- fi,
1474
+ wi,
1435
1475
  {
1436
1476
  placement: "end",
1437
1477
  offset: "small",
1438
1478
  onClick: n,
1439
- screenReaderLabel: i("organizeCloseModal"),
1479
+ screenReaderLabel: r("organizeCloseModal"),
1440
1480
  "data-testid": "organize-close-modal"
1441
1481
  }
1442
1482
  ),
1443
- /* @__PURE__ */ m(_, { alignItems: "center", gap: "small", children: [
1444
- /* @__PURE__ */ s(_.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(me, { level: "h2", "data-testid": "organize-modal-title", children: i("organizeModalLabel") }) }),
1445
- o ? /* @__PURE__ */ s(_.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
1483
+ /* @__PURE__ */ g(I, { alignItems: "center", gap: "small", children: [
1484
+ /* @__PURE__ */ s(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(Ie, { level: "h2", "data-testid": "organize-modal-title", children: r("organizeModalLabel") }) }),
1485
+ o ? /* @__PURE__ */ s(I.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
1446
1486
  ] })
1447
1487
  ] }),
1448
- /* @__PURE__ */ m(yi, { children: [
1449
- a === "form" ? /* @__PURE__ */ s(
1450
- Tr,
1488
+ /* @__PURE__ */ g(zi, { children: [
1489
+ u === "form" ? /* @__PURE__ */ s(
1490
+ $r,
1451
1491
  {
1452
- input: u.input,
1453
- errors: u.errors,
1454
- onChange: u.setInput
1492
+ input: l.input,
1493
+ errors: l.errors,
1494
+ onChange: l.setInput
1455
1495
  }
1456
1496
  ) : null,
1457
- a === "loading" ? /* @__PURE__ */ s(kt, { label: i("organizeLoadingLabel"), takingLong: p }) : null,
1458
- a === "applying" ? /* @__PURE__ */ s(kt, { label: i("organizeApplyingLabel"), takingLong: p }) : null,
1459
- a === "preview" && c ? /* @__PURE__ */ m(Y, { children: [
1460
- g ? /* @__PURE__ */ s(
1461
- X,
1497
+ u === "loading" ? /* @__PURE__ */ s(Ut, { label: r("organizeLoadingLabel"), takingLong: m }) : null,
1498
+ u === "applying" ? /* @__PURE__ */ s(Ut, { label: r("organizeApplyingLabel"), takingLong: m }) : null,
1499
+ u === "preview" && c ? /* @__PURE__ */ g(j, { children: [
1500
+ p ? /* @__PURE__ */ s(
1501
+ te,
1462
1502
  {
1463
1503
  variant: "error",
1464
1504
  margin: "0 0 small 0",
1465
- liveRegion: be,
1505
+ liveRegion: Ae,
1466
1506
  liveRegionPoliteness: "assertive",
1467
1507
  "data-testid": "organize-apply-error",
1468
- children: i("organizeApplyFailed", { message: g.message })
1508
+ children: r("organizeApplyFailed", { message: p.message })
1469
1509
  }
1470
1510
  ) : null,
1471
- /* @__PURE__ */ s(kr, { proposal: c })
1511
+ /* @__PURE__ */ s(Qr, { proposal: c })
1472
1512
  ] }) : null,
1473
- a === "error" ? /* @__PURE__ */ s(
1474
- X,
1513
+ u === "error" ? /* @__PURE__ */ s(
1514
+ te,
1475
1515
  {
1476
1516
  variant: "error",
1477
1517
  margin: "0",
1478
- liveRegion: be,
1518
+ liveRegion: Ae,
1479
1519
  liveRegionPoliteness: "assertive",
1480
1520
  "data-testid": "organize-error",
1481
- children: i("organizeFailed", { message: (g == null ? void 0 : g.message) ?? "" })
1521
+ children: r("organizeFailed", { message: (p == null ? void 0 : p.message) ?? "" })
1482
1522
  }
1483
1523
  ) : null
1484
1524
  ] }),
1485
- /* @__PURE__ */ m(Ti, { children: [
1486
- a === "form" ? /* @__PURE__ */ m(Y, { children: [
1487
- /* @__PURE__ */ s(z, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: i("organizeCancel") }),
1525
+ /* @__PURE__ */ g(Ni, { children: [
1526
+ u === "form" ? /* @__PURE__ */ g(j, { children: [
1527
+ /* @__PURE__ */ s(N, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: r("organizeCancel") }),
1488
1528
  /* @__PURE__ */ s(
1489
- z,
1529
+ N,
1490
1530
  {
1491
1531
  color: "ai-primary",
1492
- onClick: u.submit,
1493
- interaction: u.canSubmit ? "enabled" : "disabled",
1532
+ onClick: l.submit,
1533
+ interaction: l.canSubmit ? "enabled" : "disabled",
1494
1534
  "data-testid": "organize-submit",
1495
- children: i("organizeSubmit")
1535
+ children: r("organizeSubmit")
1496
1536
  }
1497
1537
  )
1498
1538
  ] }) : null,
1499
- a === "loading" ? /* @__PURE__ */ s(z, { onClick: u.cancel, "data-testid": "organize-cancel-loading", children: i("organizeCancel") }) : null,
1500
- a === "preview" ? /* @__PURE__ */ m(Y, { children: [
1501
- /* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1539
+ u === "loading" ? /* @__PURE__ */ s(N, { onClick: l.cancel, "data-testid": "organize-cancel-loading", children: r("organizeCancel") }) : null,
1540
+ u === "preview" ? /* @__PURE__ */ g(j, { children: [
1541
+ /* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
1502
1542
  /* @__PURE__ */ s(
1503
- z,
1543
+ N,
1504
1544
  {
1505
- onClick: u.regenerate,
1545
+ onClick: l.regenerate,
1506
1546
  margin: "0 x-small 0 0",
1507
1547
  "data-testid": "organize-regenerate",
1508
- children: i("organizeRegenerate")
1548
+ children: r("organizeRegenerate")
1509
1549
  }
1510
1550
  ),
1511
- /* @__PURE__ */ s(z, { color: "primary", onClick: u.apply, "data-testid": "organize-apply", children: i("organizeApply") })
1551
+ /* @__PURE__ */ s(N, { color: "primary", onClick: l.apply, "data-testid": "organize-apply", children: r("organizeApply") })
1512
1552
  ] }) : null,
1513
- a === "error" ? /* @__PURE__ */ m(Y, { children: [
1514
- /* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
1515
- /* @__PURE__ */ s(z, { color: "primary", onClick: u.submit, "data-testid": "organize-retry", children: i("organizeTryAgain") })
1553
+ u === "error" ? /* @__PURE__ */ g(j, { children: [
1554
+ /* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
1555
+ /* @__PURE__ */ s(N, { color: "primary", onClick: l.submit, "data-testid": "organize-retry", children: r("organizeTryAgain") })
1516
1556
  ] }) : null,
1517
- a === "applying" ? /* @__PURE__ */ s(z, { interaction: "disabled", "data-testid": "organize-applying", children: i("organizeApply") }) : null
1557
+ u === "applying" ? /* @__PURE__ */ s(N, { interaction: "disabled", "data-testid": "organize-applying", children: r("organizeApply") }) : null
1518
1558
  ] })
1519
1559
  ]
1520
1560
  }
1521
1561
  );
1522
1562
  }
1523
- function $r({
1563
+ function ts({
1524
1564
  actions: e,
1525
1565
  onApplied: t,
1526
1566
  aiDisclosure: n,
1527
- display: r = "inline-block"
1567
+ display: i = "inline-block"
1528
1568
  }) {
1529
- const { t: o } = $(), [i, l] = H(!1);
1530
- return /* @__PURE__ */ m(Y, { children: [
1569
+ const { t: o } = F(), [r, a] = Y(!1);
1570
+ return /* @__PURE__ */ g(j, { children: [
1531
1571
  /* @__PURE__ */ s(
1532
- z,
1572
+ N,
1533
1573
  {
1534
1574
  color: "ai-primary",
1535
- display: r,
1536
- onClick: () => l(!0),
1537
- renderIcon: i ? /* @__PURE__ */ s(ui, {}) : /* @__PURE__ */ s(di, {}),
1575
+ display: i,
1576
+ onClick: () => a(!0),
1577
+ renderIcon: r ? /* @__PURE__ */ s(Si, {}) : /* @__PURE__ */ s(Ti, {}),
1538
1578
  "data-testid": "organize-modules-trigger",
1539
1579
  children: o("organizeModulesTrigger")
1540
1580
  }
1541
1581
  ),
1542
- i ? /* @__PURE__ */ s(
1543
- xr,
1582
+ r ? /* @__PURE__ */ s(
1583
+ es,
1544
1584
  {
1545
1585
  actions: e,
1546
1586
  open: !0,
1547
- onDismiss: () => l(!1),
1587
+ onDismiss: () => a(!1),
1548
1588
  onApplied: t,
1549
1589
  aiDisclosure: n
1550
1590
  }
1551
1591
  ) : null
1552
1592
  ] });
1553
1593
  }
1554
- function Ur({
1594
+ function ns({
1555
1595
  counts: e,
1556
1596
  itemsMode: t,
1557
1597
  loadedModules: n
1558
1598
  }) {
1559
- const r = e.listModules + e.listModuleItems;
1599
+ const i = e.listModules + e.listModuleItems;
1560
1600
  return /* @__PURE__ */ s(
1561
- E,
1601
+ _,
1562
1602
  {
1563
1603
  as: "div",
1564
1604
  background: "secondary",
@@ -1567,25 +1607,25 @@ function Ur({
1567
1607
  padding: "x-small small",
1568
1608
  margin: "0 0 small 0",
1569
1609
  "data-testid": "dev-diagnostics",
1570
- children: /* @__PURE__ */ m(_, { gap: "medium", wrap: "wrap", children: [
1571
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(P, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1572
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(P, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1610
+ children: /* @__PURE__ */ g(I, { gap: "medium", wrap: "wrap", children: [
1611
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1612
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1573
1613
  "listModules: ",
1574
1614
  e.listModules
1575
1615
  ] }) }),
1576
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(P, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1616
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1577
1617
  "listModuleItems: ",
1578
1618
  e.listModuleItems
1579
1619
  ] }) }),
1580
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(P, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1620
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1581
1621
  "total: ",
1582
- r
1622
+ i
1583
1623
  ] }) }),
1584
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(P, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1624
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1585
1625
  "itemsMode: ",
1586
1626
  t ?? "probing…"
1587
1627
  ] }) }),
1588
- /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(P, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1628
+ /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1589
1629
  "modules loaded: ",
1590
1630
  n
1591
1631
  ] }) })
@@ -1593,195 +1633,208 @@ function Ur({
1593
1633
  }
1594
1634
  );
1595
1635
  }
1596
- const Fr = 200;
1597
- function Br({
1636
+ const is = 200, rs = "22rem";
1637
+ function ss({
1598
1638
  data: e,
1599
1639
  today: t,
1600
1640
  requestCounts: n,
1601
- showDiagnostics: r = n !== void 0,
1641
+ showDiagnostics: i = n !== void 0,
1602
1642
  as: o = "div",
1603
- headingLevel: i = "h2",
1604
- organizationActions: l,
1605
- onOrganizationApplied: u,
1606
- organizationAiDisclosure: a,
1643
+ headingLevel: r = "h2",
1644
+ organizationActions: a,
1645
+ onOrganizationApplied: l,
1646
+ organizationAiDisclosure: u,
1607
1647
  breakpoints: c = {}
1608
1648
  }) {
1609
- const { miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: w, ICEDesktop: L } = c, U = G(
1610
- () => ({ miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: w, ICEDesktop: L }),
1611
- [g, p, h, f, I, w, L]
1649
+ const { miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D } = c, A = W(
1650
+ () => ({ miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D }),
1651
+ [p, m, h, S, M, T, D]
1612
1652
  ), {
1613
- modules: O,
1614
- page: S,
1615
- pageCount: C,
1653
+ modules: U,
1654
+ page: y,
1655
+ pageCount: P,
1616
1656
  pageSize: Q,
1617
- pageInfo: K,
1618
- hasNextPage: T,
1619
- hasPreviousPage: A,
1657
+ pageInfo: B,
1658
+ hasNextPage: C,
1659
+ hasPreviousPage: R,
1620
1660
  goToFirstPage: q,
1621
- goToPreviousPage: F,
1622
- goToNextPage: ee,
1623
- goToLastPage: D,
1624
- isLoading: oe,
1625
- isRefreshing: v,
1626
- error: te,
1627
- itemsMode: pe,
1628
- expandedModuleIds: j,
1629
- expandModule: le,
1630
- collapseModule: ae,
1631
- toggleModule: B,
1632
- expandModules: ln,
1633
- collapseModules: an,
1634
- expandAllModules: un,
1635
- collapseAllModules: dn,
1636
- isPersistingCollapsed: cn,
1637
- getItems: Le,
1638
- filter: fe,
1639
- setFilter: lt,
1640
- filterEntry: mn,
1641
- filterPredicate: Ae
1642
- } = e, { t: y, timezone: at } = $(), he = it(), { filters: ut } = ve(), gn = G(() => nt(ut).length > 0, [ut]), dt = R(null), Re = R(/* @__PURE__ */ new Map()), ke = R(/* @__PURE__ */ new Map()), V = w === !0, ne = R(null), Me = R(null), pn = N((d) => {
1643
- var M, k;
1644
- (M = Re.current.get(d)) == null || M.scrollIntoView({ behavior: "smooth", block: "start" }), (k = ke.current.get(d)) == null || k.focus({ preventScroll: !0 });
1645
- }, []), fn = N((d, M) => {
1646
- M ? ke.current.set(d, M) : ke.current.delete(d);
1647
- }, []), [hn] = H(() => /* @__PURE__ */ new Date()), Oe = t ?? hn;
1648
- oi(() => {
1649
- if (ne.current !== "keepFocus" || !Me.current) return;
1650
- const { control: d, fallback: M, scrollY: k } = Me.current;
1651
- Me.current = null, d == null || d.focus({ preventScroll: !0 }), document.activeElement !== d && (M == null || M.focus({ preventScroll: !0 })), window.scrollTo({ top: k });
1652
- }, [S]), W(() => {
1653
- var M;
1654
- if (ne.current === null || v) return;
1655
- const d = ne.current === "focusList";
1656
- ne.current = null, x(y("pageChangedAnnouncement", { page: S, pageCount: C })), d && ((M = dt.current) == null || M.focus({ preventScroll: !0 }));
1657
- }, [v, S, C, y]);
1658
- const qe = N(
1659
- (d = null, M = null) => {
1661
+ goToPreviousPage: G,
1662
+ goToNextPage: K,
1663
+ goToLastPage: Z,
1664
+ isLoading: ie,
1665
+ isRefreshing: w,
1666
+ error: ae,
1667
+ itemsMode: X,
1668
+ expandedModuleIds: V,
1669
+ expandModule: ue,
1670
+ collapseModule: de,
1671
+ toggleModule: ce,
1672
+ expandModules: _e,
1673
+ collapseModules: z,
1674
+ expandAllModules: In,
1675
+ collapseAllModules: Mn,
1676
+ isPersistingCollapsed: _n,
1677
+ getItems: De,
1678
+ filter: Ee,
1679
+ setFilter: mt,
1680
+ filterEntry: En,
1681
+ filterPredicate: qe,
1682
+ search: me,
1683
+ searchEnabled: Sn,
1684
+ searchInput: gt,
1685
+ setSearchInput: Tn,
1686
+ clearSearch: pt
1687
+ } = e, { t: E, timezone: ft } = F(), Se = at(), { filters: ht } = ke(), yn = W(() => lt(ht).length > 0, [ht]), It = L(null), ze = L(/* @__PURE__ */ new Map()), Ne = L(/* @__PURE__ */ new Map()), H = T === !0, Mt = L(null), re = L(null), Te = L(null), bn = x((d) => {
1688
+ var f, k;
1689
+ (f = ze.current.get(d)) == null || f.scrollIntoView({ behavior: "smooth", block: "start" }), (k = Ne.current.get(d)) == null || k.focus({ preventScroll: !0 });
1690
+ }, []), Pn = x((d, f) => {
1691
+ f ? Ne.current.set(d, f) : Ne.current.delete(d);
1692
+ }, []), [Cn] = Y(() => /* @__PURE__ */ new Date()), xe = t ?? Cn;
1693
+ Mi(() => {
1694
+ if (re.current !== "keepFocus" || !Te.current) return;
1695
+ const { control: d, fallback: f, scrollY: k } = Te.current;
1696
+ Te.current = null, d == null || d.focus({ preventScroll: !0 }), document.activeElement !== d && (f == null || f.focus({ preventScroll: !0 })), window.scrollTo({ top: k });
1697
+ }, [y]), $(() => {
1698
+ var f;
1699
+ if (re.current === null || w) return;
1700
+ const d = re.current === "focusList";
1701
+ re.current = null, O(E("pageChangedAnnouncement", { page: y, pageCount: P })), d && ((f = It.current) == null || f.focus({ preventScroll: !0 }));
1702
+ }, [w, y, P, E]);
1703
+ const $e = x(
1704
+ (d = null, f = null) => {
1660
1705
  const k = document.activeElement instanceof HTMLElement ? document.activeElement : null;
1661
- ne.current = "keepFocus", Me.current = {
1706
+ re.current = "keepFocus", Te.current = {
1662
1707
  control: d ?? k,
1663
- fallback: M,
1708
+ fallback: f,
1664
1709
  scrollY: window.scrollY
1665
1710
  };
1666
1711
  },
1667
1712
  []
1668
- ), De = N(
1669
- (d, M = null, k = null) => {
1670
- qe(M, k), he("paginate-modules"), d === 1 ? q() : d === S - 1 ? F() : d === S + 1 ? ee() : d === C && D();
1713
+ ), Fe = x(
1714
+ (d, f = null, k = null) => {
1715
+ $e(f, k), Se("paginate-modules"), d === 1 ? q() : d === y - 1 ? G() : d === y + 1 ? K() : d === P && Z();
1671
1716
  },
1672
1717
  [
1673
- S,
1674
- C,
1718
+ y,
1719
+ P,
1675
1720
  q,
1676
- F,
1677
- ee,
1678
- D,
1679
- he,
1680
- qe
1721
+ G,
1722
+ K,
1723
+ Z,
1724
+ Se,
1725
+ $e
1681
1726
  ]
1682
- ), ze = G(
1683
- () => O.filter(
1684
- (d) => Ae === void 0 || Ae(d, { today: Oe, timezone: at })
1727
+ ), Ue = W(
1728
+ () => U.filter(
1729
+ (d) => qe === void 0 || qe(d, { today: xe, timezone: ft })
1685
1730
  ),
1686
- [O, Ae, Oe, at]
1687
- ), ct = R({
1688
- rows: ze,
1689
- expanded: j,
1731
+ [U, qe, xe, ft]
1732
+ ), _t = L({
1733
+ rows: Ue,
1734
+ expanded: V,
1690
1735
  items: /* @__PURE__ */ new Map()
1691
- }), [b, ue] = H(null);
1692
- v ? b === null && ue(ct.current) : (ct.current = {
1693
- rows: ze,
1694
- expanded: j,
1695
- items: new Map(j.map((d) => [d, Le(d)]))
1696
- }, b !== null && ue(null));
1697
- const Z = (b == null ? void 0 : b.rows) ?? ze, Ne = (b == null ? void 0 : b.expanded) ?? j, mt = G(() => new Set(Ne), [Ne]), de = G(
1698
- () => Z.filter((d) => mt.has(d.id)).map((d) => d.id),
1699
- [Z, mt]
1700
- ), gt = de.length > 0, [xe, $e] = H(!1), _e = de.filter((d) => Le(d).isLoading).length, ie = R(!1);
1701
- W(() => {
1702
- if (xe) {
1703
- if (_e > 0 && !ie.current) {
1704
- ie.current = !0, x(y("expandAllLoadingItems", { count: _e }));
1736
+ }), [v, ge] = Y(null);
1737
+ w ? v === null && ge(_t.current) : (_t.current = {
1738
+ rows: Ue,
1739
+ expanded: V,
1740
+ items: new Map(V.map((d) => [d, De(d)]))
1741
+ }, v !== null && ge(null));
1742
+ const J = (v == null ? void 0 : v.rows) ?? Ue, Be = (v == null ? void 0 : v.expanded) ?? V, Et = W(() => new Set(Be), [Be]), pe = W(
1743
+ () => J.filter((d) => Et.has(d.id)).map((d) => d.id),
1744
+ [J, Et]
1745
+ ), St = pe.length > 0, [Ge, He] = Y(!1), ye = pe.filter((d) => De(d).isLoading).length, se = L(!1);
1746
+ $(() => {
1747
+ if (Ge) {
1748
+ if (ye > 0 && !se.current) {
1749
+ se.current = !0, O(E("expandAllLoadingItems", { count: ye }));
1705
1750
  return;
1706
1751
  }
1707
- _e === 0 && (ie.current && j.length > 0 && x(y("expandAllItemsLoaded")), ie.current = !1, $e(!1));
1752
+ ye === 0 && (se.current && V.length > 0 && O(E("expandAllItemsLoaded")), se.current = !1, He(!1));
1708
1753
  }
1709
- }, [xe, _e, j.length, y]);
1710
- const Ue = xe || cn, Fe = R(null), Be = R(!1);
1711
- W(() => {
1754
+ }, [Ge, ye, V.length, E]);
1755
+ const We = Ge || _n, Ye = L(null), je = L(!1);
1756
+ $(() => {
1712
1757
  var d;
1713
- Ue || !Be.current || (Be.current = !1, (d = Fe.current) == null || d.focus());
1714
- }, [Ue]);
1715
- const Mn = () => {
1716
- if (Be.current = document.activeElement === Fe.current, gt) {
1717
- he("collapse-all");
1718
- const M = new Set(de);
1719
- $e(!1), ie.current = !1, fe === Te ? dn() : an(de), b !== null && ue({ ...b, expanded: b.expanded.filter((k) => !M.has(k)) }), x(y("modulesCollapsedAnnouncement", { count: de.length }));
1758
+ We || !je.current || (je.current = !1, (d = Ye.current) == null || d.focus());
1759
+ }, [We]);
1760
+ const vn = () => {
1761
+ if (je.current = document.activeElement === Ye.current, St) {
1762
+ Se("collapse-all");
1763
+ const f = new Set(pe);
1764
+ He(!1), se.current = !1, Ee === we && me === void 0 ? Mn() : z(pe), v !== null && ge({ ...v, expanded: v.expanded.filter((k) => !f.has(k)) }), O(E("modulesCollapsedAnnouncement", { count: pe.length }));
1720
1765
  return;
1721
1766
  }
1722
- he("expand-all");
1723
- const d = Z.map((M) => M.id);
1724
- $e(!0), ie.current = !1, fe === Te ? un() : ln(d), b !== null && ue({ ...b, expanded: d }), x(y("modulesExpandedAnnouncement", { count: d.length }));
1725
- }, pt = R(b);
1726
- pt.current = b;
1727
- const _n = N(
1767
+ Se("expand-all");
1768
+ const d = J.map((f) => f.id);
1769
+ He(!0), se.current = !1, Ee === we && me === void 0 ? In() : _e(d), v !== null && ge({ ...v, expanded: d }), O(E("modulesExpandedAnnouncement", { count: d.length }));
1770
+ }, Tt = L(v);
1771
+ Tt.current = v;
1772
+ const wn = x(
1728
1773
  (d) => {
1729
- const M = pt.current;
1730
- if (M === null) {
1731
- B(d);
1774
+ const f = Tt.current;
1775
+ if (f === null) {
1776
+ ce(d);
1732
1777
  return;
1733
1778
  }
1734
- const k = M.expanded.includes(d);
1735
- ue({
1736
- ...M,
1737
- expanded: k ? M.expanded.filter((Sn) => Sn !== d) : [...M.expanded, d]
1738
- }), k ? ae(d) : le(d);
1779
+ const k = f.expanded.includes(d);
1780
+ ge({
1781
+ ...f,
1782
+ expanded: k ? f.expanded.filter((Rn) => Rn !== d) : [...f.expanded, d]
1783
+ }), k ? de(d) : ue(d);
1739
1784
  },
1740
- [B, ae, le]
1741
- ), [En, ft] = H(!1);
1742
- W(() => {
1743
- if (!v) {
1744
- ft(!1);
1785
+ [ce, de, ue]
1786
+ ), [Ln, yt] = Y(!1);
1787
+ $(() => {
1788
+ if (!w) {
1789
+ yt(!1);
1745
1790
  return;
1746
1791
  }
1747
- const d = setTimeout(() => ft(!0), Fr);
1792
+ const d = setTimeout(() => yt(!0), is);
1748
1793
  return () => clearTimeout(d);
1749
- }, [v]);
1750
- const Ee = mn !== void 0 && fe !== Te, Ge = oe || v && Z.length === 0, Ie = Z.length === 0 && !Ge && !te, Se = Ie && Ee, We = i === "h1" ? "h2" : "h3";
1751
- W(() => {
1752
- Se && x(y("filteredEmptyStateTitle"));
1753
- }, [Se, y]);
1754
- const ht = C > 1 || T || A, In = C > 1 && !Ge && !Ie && !Se;
1755
- return /* @__PURE__ */ m(E, { as: o, display: "block", "data-testid": "modules-list", children: [
1794
+ }, [w]);
1795
+ const bt = me !== void 0, be = En !== void 0 && Ee !== we || bt, Pe = ie || w && J.length === 0, fe = J.length === 0 && !Pe && !ae, Ce = fe && be, Qe = r === "h1" ? "h2" : "h3";
1796
+ $(() => {
1797
+ Ce && O(E("filteredEmptyStateTitle"));
1798
+ }, [Ce, E]);
1799
+ const ee = bt && B.totalCount !== null && !Pe && !w && !ae && !fe ? E("searchResultsHint", { count: B.totalCount, term: me }) : null, Ke = L(null);
1800
+ $(() => {
1801
+ if (ee === null) {
1802
+ Ke.current = null;
1803
+ return;
1804
+ }
1805
+ Ke.current !== ee && (Ke.current = ee, O(ee));
1806
+ }, [ee]);
1807
+ const Pt = P > 1 || C || R, An = P > 1 && !Pe && !fe && !Ce;
1808
+ return /* @__PURE__ */ g(_, { as: o, display: "block", "data-testid": "modules-list", children: [
1756
1809
  /* @__PURE__ */ s(
1757
- Jn,
1810
+ ci,
1758
1811
  {
1759
- modules: O,
1760
- hasMoreModules: ht || Ee,
1761
- continuesBefore: A,
1762
- continuesAfter: T,
1763
- onModuleClick: pn,
1764
- pagination: ht ? {
1765
- rangeStart: (S - 1) * Q + 1,
1766
- totalCount: K.totalCount,
1767
- hasPreviousPage: A,
1768
- hasNextPage: T,
1769
- onPreviousPage: (d, M) => De(S - 1, d, M),
1770
- onNextPage: (d, M) => De(S + 1, d, M),
1771
- disabled: v
1812
+ modules: U,
1813
+ hasMoreModules: Pt || be,
1814
+ continuesBefore: R,
1815
+ continuesAfter: C,
1816
+ onModuleClick: bn,
1817
+ pagination: Pt ? {
1818
+ rangeStart: (y - 1) * Q + 1,
1819
+ totalCount: B.totalCount,
1820
+ hasPreviousPage: R,
1821
+ hasNextPage: C,
1822
+ onPreviousPage: (d, f) => Fe(y - 1, d, f),
1823
+ onNextPage: (d, f) => Fe(y + 1, d, f),
1824
+ disabled: w
1772
1825
  } : void 0
1773
1826
  }
1774
1827
  ),
1775
- r && n ? /* @__PURE__ */ s(
1776
- Ur,
1828
+ i && n ? /* @__PURE__ */ s(
1829
+ ns,
1777
1830
  {
1778
1831
  counts: n,
1779
- itemsMode: pe,
1780
- loadedModules: O.length
1832
+ itemsMode: X,
1833
+ loadedModules: U.length
1781
1834
  }
1782
1835
  ) : null,
1783
- /* @__PURE__ */ m(
1784
- _,
1836
+ /* @__PURE__ */ g(
1837
+ I,
1785
1838
  {
1786
1839
  justifyItems: "end",
1787
1840
  alignItems: "end",
@@ -1790,56 +1843,86 @@ function Br({
1790
1843
  margin: "medium 0 0 0",
1791
1844
  "data-testid": "modules-controls",
1792
1845
  children: [
1793
- l ? /* @__PURE__ */ s(_.Item, { shouldGrow: V, children: /* @__PURE__ */ s(
1794
- $r,
1846
+ Sn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, margin: H ? void 0 : "0 auto 0 0", children: /* @__PURE__ */ s(
1847
+ Oi,
1848
+ {
1849
+ renderLabel: E("searchLabel"),
1850
+ width: H ? void 0 : rs,
1851
+ value: gt,
1852
+ onChange: (d, f) => Tn(f),
1853
+ inputRef: (d) => {
1854
+ Mt.current = d;
1855
+ },
1856
+ renderBeforeInput: /* @__PURE__ */ s(bi, { size: "sm" }),
1857
+ renderAfterInput: gt === "" ? void 0 : /* @__PURE__ */ s(
1858
+ Qt,
1859
+ {
1860
+ size: "small",
1861
+ withBackground: !1,
1862
+ withBorder: !1,
1863
+ screenReaderLabel: E("clearSearch"),
1864
+ onClick: () => {
1865
+ var d;
1866
+ pt(), (d = Mt.current) == null || d.focus();
1867
+ },
1868
+ "data-testid": "modules-search-clear",
1869
+ children: /* @__PURE__ */ s(yi, { size: "sm" })
1870
+ }
1871
+ ),
1872
+ "data-testid": "modules-search"
1873
+ }
1874
+ ) }) : null,
1875
+ a ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1876
+ ts,
1795
1877
  {
1796
- actions: l,
1797
- onApplied: u,
1798
- aiDisclosure: a,
1799
- display: V ? "block" : "inline-block"
1878
+ actions: a,
1879
+ onApplied: l,
1880
+ aiDisclosure: u,
1881
+ display: H ? "block" : "inline-block"
1800
1882
  }
1801
1883
  ) }) : null,
1802
- gn ? /* @__PURE__ */ s(_.Item, { shouldGrow: V, children: /* @__PURE__ */ s(
1803
- ir,
1884
+ yn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1885
+ _r,
1804
1886
  {
1805
- value: fe,
1887
+ value: Ee,
1806
1888
  onChange: (d) => {
1807
- S !== 1 && qe(), lt(d);
1889
+ y !== 1 && $e(), mt(d);
1808
1890
  },
1809
- interaction: Ie && !Ee ? "disabled" : "enabled"
1891
+ interaction: fe && !be ? "disabled" : "enabled"
1810
1892
  }
1811
1893
  ) }) : null,
1812
- /* @__PURE__ */ s(_.Item, { shouldGrow: V, children: /* @__PURE__ */ s(
1813
- z,
1894
+ /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
1895
+ N,
1814
1896
  {
1815
1897
  elementRef: (d) => {
1816
- Fe.current = d;
1898
+ Ye.current = d;
1817
1899
  },
1818
- display: V ? "block" : "inline-block",
1819
- onClick: Mn,
1820
- interaction: Z.length === 0 || Ue ? "disabled" : "enabled",
1900
+ display: H ? "block" : "inline-block",
1901
+ onClick: vn,
1902
+ interaction: J.length === 0 || We ? "disabled" : "enabled",
1821
1903
  "data-testid": "expand-collapse-all",
1822
- children: y(gt ? "collapseAllModules" : "expandAllModules")
1904
+ children: E(St ? "collapseAllModules" : "expandAllModules")
1823
1905
  }
1824
1906
  ) })
1825
1907
  ]
1826
1908
  }
1827
1909
  ),
1828
- /* @__PURE__ */ m(E, { as: "div", margin: "medium 0 0 0", children: [
1829
- te ? /* @__PURE__ */ s(
1830
- X,
1910
+ ee !== null ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { as: "div", size: "small", color: "secondary", "data-testid": "modules-search-hint", children: ee }) }) : null,
1911
+ /* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
1912
+ ae ? /* @__PURE__ */ s(
1913
+ te,
1831
1914
  {
1832
1915
  variant: "error",
1833
1916
  margin: "0 0 small 0",
1834
- liveRegion: be,
1917
+ liveRegion: Ae,
1835
1918
  liveRegionPoliteness: "assertive",
1836
1919
  "data-testid": "modules-error",
1837
- children: y("modulesLoadErrorAlert", { message: te.message })
1920
+ children: E("modulesLoadErrorAlert", { message: ae.message })
1838
1921
  }
1839
1922
  ) : null,
1840
- Ge ? /* @__PURE__ */ s(E, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(st, { renderTitle: y("modulesLoadingSpinnerLabel") }) }) : null,
1841
- Ie && !Ee ? /* @__PURE__ */ m(
1842
- E,
1923
+ Pe ? /* @__PURE__ */ s(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(dt, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1924
+ fe && !be ? /* @__PURE__ */ g(
1925
+ _,
1843
1926
  {
1844
1927
  as: "div",
1845
1928
  background: "primary",
@@ -1850,43 +1933,43 @@ function Br({
1850
1933
  textAlign: "center",
1851
1934
  "data-testid": "modules-empty",
1852
1935
  children: [
1853
- /* @__PURE__ */ s(me, { level: We, variant: "titleCardLarge", margin: "0 0 x-small 0", children: y("noModulesEmptyStateTitle") }),
1854
- /* @__PURE__ */ s(P, { color: "secondary", children: y("noModulesEmptyStateDescription") })
1936
+ /* @__PURE__ */ s(Ie, { level: Qe, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
1937
+ /* @__PURE__ */ s(b, { color: "secondary", children: E("noModulesEmptyStateDescription") })
1855
1938
  ]
1856
1939
  }
1857
1940
  ) : null,
1858
- Se ? /* @__PURE__ */ m(
1859
- E,
1941
+ Ce ? /* @__PURE__ */ g(
1942
+ _,
1860
1943
  {
1861
1944
  as: "div",
1862
1945
  background: "primary",
1863
1946
  borderRadius: "card.lg",
1864
1947
  borderWidth: "small",
1865
1948
  shadow: "resting",
1866
- padding: V ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
1949
+ padding: H ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
1867
1950
  textAlign: "center",
1868
1951
  "data-testid": "modules-filtered-empty",
1869
1952
  children: [
1870
1953
  /* @__PURE__ */ s(
1871
- me,
1954
+ Ie,
1872
1955
  {
1873
- level: We,
1874
- variant: V ? "titleCardMini" : "titleCardLarge",
1956
+ level: Qe,
1957
+ variant: H ? "titleCardMini" : "titleCardLarge",
1875
1958
  margin: "0 0 general.spaceXs 0",
1876
- children: y("filteredEmptyStateTitle")
1959
+ children: E("filteredEmptyStateTitle")
1877
1960
  }
1878
1961
  ),
1879
- /* @__PURE__ */ s(P, { as: "div", color: "secondary", size: V ? "small" : void 0, children: y("filteredEmptyStateDescription") }),
1962
+ /* @__PURE__ */ s(b, { as: "div", color: "secondary", size: H ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
1880
1963
  /* @__PURE__ */ s(
1881
- z,
1964
+ N,
1882
1965
  {
1883
1966
  color: "primary",
1884
1967
  margin: "general.spaceLg 0 0 0",
1885
1968
  onClick: () => {
1886
- lt(Te), ne.current = "focusList";
1969
+ mt(we), pt(), re.current = "focusList";
1887
1970
  },
1888
1971
  "data-testid": "clear-filters",
1889
- children: y("clearFilters")
1972
+ children: E("clearFilters")
1890
1973
  }
1891
1974
  )
1892
1975
  ]
@@ -1895,29 +1978,30 @@ function Br({
1895
1978
  /* @__PURE__ */ s(
1896
1979
  "ul",
1897
1980
  {
1898
- ref: dt,
1899
- style: { listStyle: "none", margin: 0, padding: 0, opacity: En ? 0.5 : 1 },
1900
- "aria-busy": v,
1981
+ ref: It,
1982
+ style: { listStyle: "none", margin: 0, padding: 0, opacity: Ln ? 0.5 : 1 },
1983
+ "aria-busy": w,
1901
1984
  tabIndex: -1,
1902
1985
  "data-testid": "modules-stack",
1903
- children: Z.map((d) => /* @__PURE__ */ s(
1986
+ children: J.map((d) => /* @__PURE__ */ s(
1904
1987
  "li",
1905
1988
  {
1906
- ref: (M) => {
1907
- M ? Re.current.set(d.id, M) : Re.current.delete(d.id);
1989
+ ref: (f) => {
1990
+ f ? ze.current.set(d.id, f) : ze.current.delete(d.id);
1908
1991
  },
1909
1992
  children: /* @__PURE__ */ s(
1910
- Er,
1993
+ qr,
1911
1994
  {
1912
1995
  module: d,
1913
- expanded: Ne.includes(d.id),
1914
- onToggle: _n,
1915
- itemsState: (b == null ? void 0 : b.items.get(d.id)) ?? Le(d.id),
1916
- today: Oe,
1917
- showDiagnostics: r,
1918
- headingLevel: We,
1919
- breakpoints: U,
1920
- toggleRef: fn
1996
+ expanded: Be.includes(d.id),
1997
+ onToggle: wn,
1998
+ itemsState: (v == null ? void 0 : v.items.get(d.id)) ?? De(d.id),
1999
+ today: xe,
2000
+ showDiagnostics: i,
2001
+ headingLevel: Qe,
2002
+ breakpoints: A,
2003
+ toggleRef: Pn,
2004
+ searchTerm: me
1921
2005
  }
1922
2006
  )
1923
2007
  },
@@ -1926,31 +2010,31 @@ function Br({
1926
2010
  }
1927
2011
  )
1928
2012
  ] }),
1929
- In ? /* @__PURE__ */ s(
1930
- $t,
2013
+ An ? /* @__PURE__ */ s(
2014
+ Kt,
1931
2015
  {
1932
2016
  as: "nav",
1933
2017
  variant: "compact",
1934
2018
  withFirstAndLastButton: !0,
1935
2019
  margin: "small 0 0 0",
1936
- labelFirst: y("paginationFirstPage"),
1937
- labelPrev: y("paginationPreviousPage"),
1938
- labelNext: y("paginationNextPage"),
1939
- labelLast: y("paginationLastPage"),
1940
- screenReaderLabelPageButton: (d) => y("paginationPageLabel", { page: d }),
1941
- ellipsis: y("paginationEllipsis"),
1942
- totalPageNumber: C,
1943
- currentPage: S,
1944
- disabled: v,
1945
- onPageChange: (d) => De(d),
2020
+ labelFirst: E("paginationFirstPage"),
2021
+ labelPrev: E("paginationPreviousPage"),
2022
+ labelNext: E("paginationNextPage"),
2023
+ labelLast: E("paginationLastPage"),
2024
+ screenReaderLabelPageButton: (d) => E("paginationPageLabel", { page: d }),
2025
+ ellipsis: E("paginationEllipsis"),
2026
+ totalPageNumber: P,
2027
+ currentPage: y,
2028
+ disabled: w,
2029
+ onPageChange: (d) => Fe(d),
1946
2030
  "data-testid": "modules-pagination"
1947
2031
  }
1948
2032
  ) : null
1949
2033
  ] });
1950
2034
  }
1951
- const Gr = Ei(
1952
- Br
1953
- ), ge = [
2035
+ const os = ki(
2036
+ ss
2037
+ ), Me = [
1954
2038
  "assignment",
1955
2039
  "quiz",
1956
2040
  "discussion",
@@ -1959,7 +2043,7 @@ const Gr = Ei(
1959
2043
  "external_url",
1960
2044
  "external_tool",
1961
2045
  "sub_header"
1962
- ], et = [
2046
+ ], st = [
1963
2047
  "not_started",
1964
2048
  "in_progress",
1965
2049
  "complete",
@@ -1967,30 +2051,30 @@ const Gr = Ei(
1967
2051
  "incomplete",
1968
2052
  "missing_and_incomplete",
1969
2053
  "locked"
1970
- ], sn = [
2054
+ ], fn = [
1971
2055
  "must_view",
1972
2056
  "must_submit",
1973
2057
  "must_contribute",
1974
2058
  "must_mark_done",
1975
2059
  "min_score",
1976
2060
  "min_percentage"
1977
- ], Wr = ["assignment", "quiz", "discussion"], Hr = ["external_url", "external_tool"], Yr = ["assignment", "quiz", "discussion"], jr = Date.UTC(2025, 0, 6), Qr = 864e5, se = "1", on = (e) => new Date(jr + e * Qr).toISOString(), Ce = [
2061
+ ], ls = ["assignment", "quiz", "discussion"], as = ["external_url", "external_tool"], us = ["assignment", "quiz", "discussion"], ds = Date.UTC(2025, 0, 6), cs = 864e5, le = "1", hn = (e) => new Date(ds + e * cs).toISOString(), Re = [
1978
2062
  "min_score",
1979
2063
  "min_percentage"
1980
- ], Kr = sn.filter(
1981
- (e) => !Ce.includes(e)
1982
- ), Vr = [
2064
+ ], ms = fn.filter(
2065
+ (e) => !Re.includes(e)
2066
+ ), gs = [
1983
2067
  "in_progress",
1984
2068
  "incomplete",
1985
2069
  "missing_and_incomplete"
1986
- ], Zr = (e, t, n, r) => {
1987
- const o = n ? sn : Kr, i = n && r ? Ce[t % Ce.length] : o[Math.floor(t / 3) % o.length];
1988
- return i === "min_score" ? { itemId: e, type: i, minScore: 10 } : i === "min_percentage" ? { itemId: e, type: i, minPercentage: 80 } : { itemId: e, type: i };
1989
- }, Xr = (e, t, n, r) => e === "sub_header" ? !1 : n && r || t % 3 === 0, ot = (e) => et[(e - 1) % et.length], Jr = (e, t) => !Yr.includes(e) || e === "discussion" && Math.floor(t / ge.length) % 2 === 1 ? null : 5 + t % 4 * 5, es = (e, t, n, r) => t ? e === "missing" ? n != null || r % 2 === 0 : e === "missing_and_incomplete" ? r % 2 === 1 : !1 : !1, ts = (e, t, n, r) => {
2070
+ ], ps = (e, t, n, i) => {
2071
+ const o = n ? fn : ms, r = n && i ? Re[t % Re.length] : o[Math.floor(t / 3) % o.length];
2072
+ return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
2073
+ }, fs = (e, t, n, i) => e === "sub_header" ? !1 : n && i || t % 3 === 0, ct = (e) => st[(e - 1) % st.length], hs = (e, t) => !us.includes(e) || e === "discussion" && Math.floor(t / Me.length) % 2 === 1 ? null : 5 + t % 4 * 5, Is = (e, t, n, i) => t ? e === "missing" ? n != null || i % 2 === 0 : e === "missing_and_incomplete" ? i % 2 === 1 : !1 : !1, Ms = (e, t, n, i) => {
1990
2074
  if (e === "locked") return "locked";
1991
- if (es(e, t, n, r)) return "missing";
2075
+ if (Is(e, t, n, i)) return "missing";
1992
2076
  if (!n) return;
1993
- const o = t && Ce.includes(n.type);
2077
+ const o = t && Re.includes(n.type);
1994
2078
  switch (e) {
1995
2079
  case "not_started":
1996
2080
  case "missing":
@@ -1999,122 +2083,122 @@ const Gr = Ei(
1999
2083
  return "complete";
2000
2084
  case "incomplete":
2001
2085
  case "missing_and_incomplete":
2002
- return o && r % 2 === 0 ? "incomplete" : "complete";
2086
+ return o && i % 2 === 0 ? "incomplete" : "complete";
2003
2087
  case "in_progress":
2004
- return o ? r % 3 === 0 ? "complete" : r % 3 === 1 ? "in_progress" : "not_started" : r % 2 === 0 ? "complete" : "not_started";
2088
+ return o ? i % 3 === 0 ? "complete" : i % 3 === 1 ? "in_progress" : "not_started" : i % 2 === 0 ? "complete" : "not_started";
2005
2089
  default:
2006
2090
  return e;
2007
2091
  }
2008
- }, ns = (e) => e.status === "complete", is = (e, t, n, r, o, i, l, u) => {
2009
- const a = String(e), c = ge[r % ge.length], g = c === "sub_header", p = Wr.includes(c) && (r % 4 === 0 || o === "missing");
2092
+ }, _s = (e) => e.status === "complete", Es = (e, t, n, i, o, r, a, l) => {
2093
+ const u = String(e), c = Me[i % Me.length], p = c === "sub_header", m = ls.includes(c) && (i % 4 === 0 || o === "missing");
2010
2094
  return {
2011
2095
  id: n,
2012
- moduleId: a,
2096
+ moduleId: u,
2013
2097
  title: `${c} ${t + 1}`,
2014
2098
  type: c,
2015
2099
  position: t + 1,
2016
2100
  indent: t % 5 === 4 ? 1 : 0,
2017
- published: u === "teacher" ? r % 7 !== 0 : !0,
2018
- url: g ? null : `/courses/${se}/modules/items/${n}`,
2019
- newTab: Hr.includes(c) && r % 2 === 0,
2020
- completionRequirement: l,
2021
- dueAt: p ? on(r % 90) : null,
2101
+ published: l === "teacher" ? i % 7 !== 0 : !0,
2102
+ url: p ? null : `/courses/${le}/modules/items/${n}`,
2103
+ newTab: as.includes(c) && i % 2 === 0,
2104
+ completionRequirement: a,
2105
+ dueAt: m ? hn(i % 90) : null,
2022
2106
  status: o,
2023
- pointsPossible: i,
2024
- extensions: tt(
2107
+ pointsPossible: r,
2108
+ extensions: ot(
2025
2109
  void 0,
2026
- r % 37 === 0 ? 5 + r % 4 * 10 : null
2110
+ i % 37 === 0 ? 5 + i % 4 * 10 : null
2027
2111
  )
2028
2112
  };
2029
- }, rs = (e, t, n, r) => {
2030
- const o = ot(e), i = Vr.includes(o), l = [];
2031
- let u = 0;
2032
- for (let a = 0; a < t; a += 1) {
2033
- const c = n + a, g = ge[c % ge.length], p = Jr(g, c), h = p !== null, f = h ? u++ : a, I = String(e * 1e3 + a + 1), w = Xr(g, c, h, i) ? Zr(I, c, h, i) : null, L = ts(o, h, w, f);
2034
- l.push(is(e, a, I, c, L, p, w, r));
2113
+ }, Ss = (e, t, n, i) => {
2114
+ const o = ct(e), r = gs.includes(o), a = [];
2115
+ let l = 0;
2116
+ for (let u = 0; u < t; u += 1) {
2117
+ const c = n + u, p = Me[c % Me.length], m = hs(p, c), h = m !== null, S = h ? l++ : u, M = String(e * 1e3 + u + 1), T = fs(p, c, h, r) ? ps(M, c, h, r) : null, D = Ms(o, h, T, S);
2118
+ a.push(Es(e, u, M, c, D, m, T, i));
2035
2119
  }
2036
- return l;
2037
- }, ss = (e, t, n, r) => {
2038
- const o = ot(e);
2120
+ return a;
2121
+ }, Ts = (e, t, n, i) => {
2122
+ const o = ct(e);
2039
2123
  if (o === "locked" || o === "not_started") return o;
2040
2124
  if (t.length === 0) return "not_started";
2041
- if (!t.some((i) => i.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && r === 0) return "in_progress";
2125
+ if (!t.some((r) => r.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && i === 0) return "in_progress";
2042
2126
  if (o === "missing_and_incomplete") {
2043
- if (n === 0 && r === 0) return "in_progress";
2127
+ if (n === 0 && i === 0) return "in_progress";
2044
2128
  if (n === 0) return "incomplete";
2045
- if (r === 0) return "missing";
2129
+ if (i === 0) return "missing";
2046
2130
  }
2047
2131
  return o;
2048
- }, os = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, ls = (e, t, n) => {
2049
- const r = t.filter((c) => c.completionRequirement), o = n ?? r.length, i = Math.min(r.filter(ns).length, o), l = t.filter((c) => c.status === "missing").length, u = t.filter((c) => c.status === "incomplete").length;
2132
+ }, ys = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, bs = (e, t, n) => {
2133
+ const i = t.filter((c) => c.completionRequirement), o = n ?? i.length, r = Math.min(i.filter(_s).length, o), a = t.filter((c) => c.status === "missing").length, l = t.filter((c) => c.status === "incomplete").length;
2050
2134
  return {
2051
- status: ss(e, t, l, u),
2052
- requirementsMet: i,
2135
+ status: Ts(e, t, a, l),
2136
+ requirementsMet: r,
2053
2137
  requirementCount: o,
2054
- percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
2055
- nextDueAt: os(t),
2056
- missingCount: l,
2057
- incompleteCount: u
2138
+ percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
2139
+ nextDueAt: ys(t),
2140
+ missingCount: a,
2141
+ incompleteCount: l
2058
2142
  };
2059
- }, as = (e, t, n) => {
2060
- const r = ot(e), o = e % 2 !== 0 && r !== "incomplete" && r !== "missing_and_incomplete" ? 1 : null;
2143
+ }, Ps = (e, t, n) => {
2144
+ const i = ct(e), o = e % 2 !== 0 && i !== "incomplete" && i !== "missing_and_incomplete" ? 1 : null;
2061
2145
  return {
2062
2146
  id: String(e),
2063
2147
  name: `Module ${e}`,
2064
2148
  position: e,
2065
2149
  published: n === "teacher" ? e % 4 !== 0 : !0,
2066
2150
  itemCount: t.length,
2067
- unlockAt: e % 5 === 0 ? on(e) : null,
2151
+ unlockAt: e % 5 === 0 ? hn(e) : null,
2068
2152
  prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2069
2153
  requirementCount: o,
2070
2154
  requireSequentialProgress: e % 6 === 0,
2071
2155
  completionRequirements: t.flatMap(
2072
- (i) => i.completionRequirement ? [i.completionRequirement] : []
2156
+ (r) => r.completionRequirement ? [r.completionRequirement] : []
2073
2157
  ),
2074
- progress: ls(e, t, o)
2158
+ progress: bs(e, t, o)
2075
2159
  };
2076
2160
  };
2077
- function us(e) {
2161
+ function Cs(e) {
2078
2162
  return {
2079
2163
  courseId: e.courseId,
2080
2164
  modules: e.modules.map(({ progress: t, ...n }) => n),
2081
2165
  itemsByModuleId: Object.fromEntries(
2082
2166
  Object.entries(e.itemsByModuleId).map(([t, n]) => [
2083
2167
  t,
2084
- n.map(({ status: r, ...o }) => o)
2168
+ n.map(({ status: i, ...o }) => o)
2085
2169
  ])
2086
2170
  )
2087
2171
  };
2088
2172
  }
2089
- function we(e, t = {}) {
2090
- const n = t.view ?? "student", r = t.courseId ?? se, o = [], i = {};
2091
- let l = 0;
2092
- e.forEach((a, c) => {
2093
- const g = c + 1, p = rs(g, a, l, n);
2094
- l += a, o.push(as(g, p, n)), i[String(g)] = p;
2173
+ function Oe(e, t = {}) {
2174
+ const n = t.view ?? "student", i = t.courseId ?? le, o = [], r = {};
2175
+ let a = 0;
2176
+ e.forEach((u, c) => {
2177
+ const p = c + 1, m = Ss(p, u, a, n);
2178
+ a += u, o.push(Ps(p, m, n)), r[String(p)] = m;
2095
2179
  });
2096
- const u = { courseId: r, modules: o, itemsByModuleId: i };
2097
- return n === "teacher" ? us(u) : u;
2180
+ const l = { courseId: i, modules: o, itemsByModuleId: r };
2181
+ return n === "teacher" ? Cs(l) : l;
2098
2182
  }
2099
- const ce = (e) => `/courses/${se}/modules/items/${e}`, Ot = "2099-08-31T06:59:00Z", ds = "2020-01-06T07:00:00Z", cs = et.length, ms = 8, gs = 120, ps = 25, fs = 250, qt = 8;
2100
- function Xs() {
2101
- return we(Array.from({ length: cs }, () => ms));
2183
+ const he = (e) => `/courses/${le}/modules/items/${e}`, Bt = "2099-08-31T06:59:00Z", vs = "2020-01-06T07:00:00Z", ws = st.length, Ls = 8, As = 120, Rs = 25, ks = 250, Gt = 8;
2184
+ function Io() {
2185
+ return Oe(Array.from({ length: ws }, () => Ls));
2102
2186
  }
2103
- function Js() {
2104
- return we(Array.from({ length: gs }, () => ps));
2187
+ function Mo() {
2188
+ return Oe(Array.from({ length: As }, () => Rs));
2105
2189
  }
2106
- function eo() {
2107
- return we([
2108
- qt,
2109
- fs,
2110
- qt
2190
+ function _o() {
2191
+ return Oe([
2192
+ Gt,
2193
+ ks,
2194
+ Gt
2111
2195
  ]);
2112
2196
  }
2113
- function to() {
2114
- const e = (i, l, u) => ({
2115
- id: String(i),
2116
- name: l,
2117
- position: i,
2197
+ function Eo() {
2198
+ const e = (r, a, l) => ({
2199
+ id: String(r),
2200
+ name: a,
2201
+ position: r,
2118
2202
  published: !0,
2119
2203
  itemCount: 0,
2120
2204
  prerequisiteModules: [],
@@ -2127,29 +2211,29 @@ function to() {
2127
2211
  missingCount: 0,
2128
2212
  incompleteCount: 0
2129
2213
  },
2130
- ...u
2131
- }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, r = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
2132
- e(1, "Locked by a future date", { unlockAt: Ot }),
2214
+ ...l
2215
+ }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, i = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
2216
+ e(1, "Locked by a future date", { unlockAt: Bt }),
2133
2217
  e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2134
2218
  e(3, "Locked by several prerequisites", {
2135
2219
  prerequisiteModules: [t, n]
2136
2220
  }),
2137
2221
  e(4, "Locked by a date and a prerequisite", {
2138
- unlockAt: Ot,
2139
- prerequisiteModules: [r]
2222
+ unlockAt: Bt,
2223
+ prerequisiteModules: [i]
2140
2224
  }),
2141
- e(5, "Locked, and the unlock date has passed", { unlockAt: ds })
2225
+ e(5, "Locked, and the unlock date has passed", { unlockAt: vs })
2142
2226
  ];
2143
2227
  return {
2144
- courseId: se,
2228
+ courseId: le,
2145
2229
  modules: o,
2146
- itemsByModuleId: Object.fromEntries(o.map((i) => [i.id, []]))
2230
+ itemsByModuleId: Object.fromEntries(o.map((r) => [r.id, []]))
2147
2231
  };
2148
2232
  }
2149
- function no() {
2150
- return we([]);
2233
+ function So() {
2234
+ return Oe([]);
2151
2235
  }
2152
- function io() {
2236
+ function To() {
2153
2237
  const t = [
2154
2238
  {
2155
2239
  title: "Every fact: type, due date, points, requirement",
@@ -2178,7 +2262,7 @@ function io() {
2178
2262
  title: "Career item carrying an estimated duration",
2179
2263
  type: "external_tool",
2180
2264
  completionRequirement: { itemId: "5", type: "must_view" },
2181
- extensions: tt(void 0, 45)
2265
+ extensions: ot(void 0, 45)
2182
2266
  },
2183
2267
  { title: "A file, ungradeable, so no points at all", type: "file" },
2184
2268
  { title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
@@ -2194,19 +2278,19 @@ function io() {
2194
2278
  { title: "Indented three levels", type: "quiz", indent: 3 },
2195
2279
  { title: "Indented four levels", type: "discussion", indent: 4 },
2196
2280
  { title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
2197
- ].map((n, r) => ({
2198
- id: String(r + 1),
2281
+ ].map((n, i) => ({
2282
+ id: String(i + 1),
2199
2283
  moduleId: "1",
2200
- position: r + 1,
2284
+ position: i + 1,
2201
2285
  indent: 0,
2202
2286
  published: !0,
2203
2287
  newTab: !1,
2204
- url: ce(r + 1),
2288
+ url: he(i + 1),
2205
2289
  status: "not_started",
2206
2290
  ...n
2207
2291
  }));
2208
2292
  return {
2209
- courseId: se,
2293
+ courseId: le,
2210
2294
  modules: [
2211
2295
  {
2212
2296
  id: "1",
@@ -2221,13 +2305,13 @@ function io() {
2221
2305
  itemsByModuleId: { 1: t }
2222
2306
  };
2223
2307
  }
2224
- function ro() {
2308
+ function yo() {
2225
2309
  const t = [
2226
- { title: "Reading: limits from the left and the right", type: "page", url: ce(1) },
2310
+ { title: "Reading: limits from the left and the right", type: "page", url: he(1) },
2227
2311
  {
2228
2312
  title: "Desmos: interactive limit explorer",
2229
2313
  type: "external_url",
2230
- url: ce(2),
2314
+ url: he(2),
2231
2315
  newTab: !0
2232
2316
  },
2233
2317
  { title: "Practice", type: "sub_header", url: null },
@@ -2235,13 +2319,13 @@ function ro() {
2235
2319
  {
2236
2320
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2237
2321
  type: "assignment",
2238
- url: ce(5)
2322
+ url: he(5)
2239
2323
  },
2240
- { title: "Unit test", type: "quiz", url: ce(6), status: "locked" }
2241
- ].map((n, r) => ({
2242
- id: String(r + 1),
2324
+ { title: "Unit test", type: "quiz", url: he(6), status: "locked" }
2325
+ ].map((n, i) => ({
2326
+ id: String(i + 1),
2243
2327
  moduleId: "1",
2244
- position: r + 1,
2328
+ position: i + 1,
2245
2329
  indent: 0,
2246
2330
  published: !0,
2247
2331
  newTab: !1,
@@ -2249,7 +2333,7 @@ function ro() {
2249
2333
  ...n
2250
2334
  }));
2251
2335
  return {
2252
- courseId: se,
2336
+ courseId: le,
2253
2337
  modules: [
2254
2338
  {
2255
2339
  id: "1",
@@ -2265,126 +2349,126 @@ function ro() {
2265
2349
  };
2266
2350
  }
2267
2351
  export {
2268
- js as ACTION_ORDER_LTI_FLOOR,
2269
- Te as ALL_FILTER,
2270
- lo as ActionEntrySchema,
2271
- ao as CompletionRequirementSchema,
2272
- uo as CompletionRequirementTypeSchema,
2273
- co as DEFAULT_INLINE_THRESHOLD,
2274
- mo as DEFAULT_ITEM_CONCURRENCY,
2275
- go as DEFAULT_ITEM_PAGE_SIZE,
2276
- po as DEFAULT_LOCALE,
2277
- fo as DEFAULT_MOBILE_PAGE_SIZE,
2278
- ho as DEFAULT_PAGE_SIZE,
2279
- Mo as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2280
- _o as DEFAULT_STALE_TIME_MS,
2281
- Eo as DUE_THIS_WEEK_DAYS,
2282
- Io as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2283
- Yn as EXT_ORGANIZE_ADDED_ITEM_COUNT,
2284
- jn as EXT_ORGANIZE_NEW_MODULE,
2285
- Qn as EXT_ORGANIZE_NEW_PLACEMENT,
2286
- Hn as EXT_SUPPRESS_ITEM_NUMBERING,
2287
- se as FIXTURE_COURSE_ID,
2288
- So as FilterClauseSchema,
2289
- yo as FilterEntrySchema,
2290
- ir as FilterSelect,
2291
- Hi as GET_MODULES,
2292
- ji as GET_MODULE_ITEMS,
2293
- bn as INLINE_ITEM_LIMIT,
2294
- yn as INLINE_QUERY_NODE_BUDGET,
2295
- To as InMemoryCourseMismatchError,
2296
- Po as ItemDueSoonPill,
2297
- bo as ItemTypeEntrySchema,
2298
- Ze as MAX_DIRECTION_CHARS,
2299
- Co as MetaFieldEntrySchema,
2300
- Er as ModuleCard,
2301
- Fn as ModuleDueSoonPill,
2302
- Wn as ModuleItemRow,
2303
- vo as ModuleItemSchema,
2304
- wo as ModuleItemStatusPill,
2305
- Lo as ModuleItemStatusSchema,
2306
- Ao as ModuleItemTypeSchema,
2307
- Tn as ModuleItemsPageSchema,
2308
- Ro as ModuleProgressSchema,
2309
- ko as ModuleSchema,
2310
- Nn as ModuleStatusPill,
2311
- Oo as ModuleStatusSchema,
2312
- qo as ModulesAnalyticsProvider,
2313
- Vn as ModulesConfigProvider,
2314
- wn as ModulesConfigSchema,
2315
- Kn as ModulesI18nProvider,
2316
- Gr as ModulesList,
2317
- Do as ModulesPageInfoSchema,
2318
- Pn as ModulesPageSchema,
2319
- Jn as ModulesProgressBar,
2320
- Zi as NEW_PLACEMENT_FIELD,
2321
- tn as ORGANIZE_CONTENT_TYPES,
2322
- Zs as ORGANIZE_MODES,
2323
- Or as ORGANIZE_SLOW_AFTER_MS,
2324
- Tr as OrganizeForm,
2325
- $r as OrganizeModulesButton,
2326
- xr as OrganizeModulesModal,
2327
- nn as PROPOSAL_PREVIEW_COURSE_ID,
2328
- zo as PageInfoSchema,
2329
- Ft as PartialCanvasResponseError,
2330
- No as PrerequisiteModuleSchema,
2331
- kr as ProposalPreview,
2332
- xo as RegistryEntrySchema,
2333
- $o as TYPE_FIELD,
2334
- Uo as baseFilters,
2335
- kn as baseModulesConfig,
2336
- we as buildFixture,
2337
- no as courseEmpty,
2338
- eo as courseFatModule,
2339
- ro as courseItemLinks,
2340
- io as courseItemRowVariants,
2341
- Js as courseLarge,
2342
- to as courseLockReasons,
2343
- Xs as courseSmall,
2344
- Vi as createActionContext,
2345
- Ys as createCanvasGraphqlAdapter,
2346
- Zn as createInMemoryAdapter,
2347
- Fo as createTranslate,
2348
- Bo as defaultFormatters,
2349
- Ir as defaultOrganizeInput,
2350
- Go as defaultTranslate,
2351
- Wo as filterClauseOf,
2352
- An as getAddedItemCount,
2353
- Ho as getEstimatedDurationMinutes,
2354
- At as hasOrganizeInputErrors,
2355
- Yo as hideUnservableFilters,
2356
- jo as invalidateCourse,
2357
- Cn as invalidateModuleItems,
2358
- Mt as invalidateModuleList,
2359
- Rn as isNewPlacement,
2360
- Qo as isPredicateServed,
2361
- Ln as isProposedNewModule,
2362
- re as mergeRegistry,
2363
- Ko as moduleItemStatusLabel,
2364
- Vo as moduleItemsPrefix,
2365
- Zo as moduleStatusLabel,
2366
- Xo as modulesKeys,
2367
- Jo as modulesListPrefix,
2368
- er as organizePreviewConfig,
2369
- Ks as partialModulesConfig,
2370
- Lr as proposalToFixture,
2371
- el as registrySchema,
2372
- Jt as resolveModulesConfig,
2373
- tl as servesClause,
2374
- $n as suppressesItemNumbering,
2375
- nl as unservableFilters,
2376
- Vs as useActionContext,
2377
- il as useFieldVisible,
2378
- rt as useFormatters,
2379
- rl as useModules,
2380
- it as useModulesAnalytics,
2381
- ve as useModulesConfig,
2382
- $ as useModulesI18n,
2383
- Xn as useModulesPageData,
2384
- Nr as useOrganizeModules,
2385
- Lt as validateOrganizeInput,
2386
- Qs as visibleActions,
2387
- nt as visibleEntries,
2388
- sl as visibleEntry,
2389
- tt as withEstimatedDurationMinutes
2352
+ mo as ACTION_ORDER_LTI_FLOOR,
2353
+ we as ALL_FILTER,
2354
+ Co as ActionEntrySchema,
2355
+ vo as CompletionRequirementSchema,
2356
+ wo as CompletionRequirementTypeSchema,
2357
+ Lo as DEFAULT_INLINE_THRESHOLD,
2358
+ Ao as DEFAULT_ITEM_CONCURRENCY,
2359
+ Ro as DEFAULT_ITEM_PAGE_SIZE,
2360
+ ko as DEFAULT_LOCALE,
2361
+ Oo as DEFAULT_MOBILE_PAGE_SIZE,
2362
+ Do as DEFAULT_PAGE_SIZE,
2363
+ qo as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2364
+ zo as DEFAULT_STALE_TIME_MS,
2365
+ No as DUE_THIS_WEEK_DAYS,
2366
+ xo as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2367
+ ri as EXT_ORGANIZE_ADDED_ITEM_COUNT,
2368
+ si as EXT_ORGANIZE_NEW_MODULE,
2369
+ oi as EXT_ORGANIZE_NEW_PLACEMENT,
2370
+ ii as EXT_SUPPRESS_ITEM_NUMBERING,
2371
+ le as FIXTURE_COURSE_ID,
2372
+ $o as FilterClauseSchema,
2373
+ Fo as FilterEntrySchema,
2374
+ _r as FilterSelect,
2375
+ sr as GET_MODULES,
2376
+ lr as GET_MODULE_ITEMS,
2377
+ qn as INLINE_ITEM_LIMIT,
2378
+ kn as INLINE_QUERY_NODE_BUDGET,
2379
+ Uo as InMemoryCourseMismatchError,
2380
+ Bo as ItemDueSoonPill,
2381
+ Go as ItemTypeEntrySchema,
2382
+ nt as MAX_DIRECTION_CHARS,
2383
+ Ho as MetaFieldEntrySchema,
2384
+ qr as ModuleCard,
2385
+ Jn as ModuleDueSoonPill,
2386
+ ni as ModuleItemRow,
2387
+ Wo as ModuleItemSchema,
2388
+ Yo as ModuleItemStatusPill,
2389
+ jo as ModuleItemStatusSchema,
2390
+ Qo as ModuleItemTypeSchema,
2391
+ On as ModuleItemsPageSchema,
2392
+ Ko as ModuleProgressSchema,
2393
+ Vo as ModuleSchema,
2394
+ Kn as ModuleStatusPill,
2395
+ Zo as ModuleStatusSchema,
2396
+ Xo as ModulesAnalyticsProvider,
2397
+ ai as ModulesConfigProvider,
2398
+ xn as ModulesConfigSchema,
2399
+ li as ModulesI18nProvider,
2400
+ os as ModulesList,
2401
+ Jo as ModulesPageInfoSchema,
2402
+ Dn as ModulesPageSchema,
2403
+ ci as ModulesProgressBar,
2404
+ gr as NEW_PLACEMENT_FIELD,
2405
+ mn as ORGANIZE_CONTENT_TYPES,
2406
+ ho as ORGANIZE_MODES,
2407
+ Kr as ORGANIZE_SLOW_AFTER_MS,
2408
+ $r as OrganizeForm,
2409
+ ts as OrganizeModulesButton,
2410
+ es as OrganizeModulesModal,
2411
+ gn as PROPOSAL_PREVIEW_COURSE_ID,
2412
+ el as PageInfoSchema,
2413
+ Zt as PartialCanvasResponseError,
2414
+ tl as PrerequisiteModuleSchema,
2415
+ Qr as ProposalPreview,
2416
+ nl as RegistryEntrySchema,
2417
+ il as TYPE_FIELD,
2418
+ rl as baseFilters,
2419
+ Bn as baseModulesConfig,
2420
+ Oe as buildFixture,
2421
+ So as courseEmpty,
2422
+ _o as courseFatModule,
2423
+ yo as courseItemLinks,
2424
+ To as courseItemRowVariants,
2425
+ Mo as courseLarge,
2426
+ Eo as courseLockReasons,
2427
+ Io as courseSmall,
2428
+ mr as createActionContext,
2429
+ co as createCanvasGraphqlAdapter,
2430
+ ui as createInMemoryAdapter,
2431
+ sl as createTranslate,
2432
+ ol as defaultFormatters,
2433
+ zr as defaultOrganizeInput,
2434
+ ll as defaultTranslate,
2435
+ al as filterClauseOf,
2436
+ Fn as getAddedItemCount,
2437
+ ul as getEstimatedDurationMinutes,
2438
+ $t as hasOrganizeInputErrors,
2439
+ dl as hideUnservableFilters,
2440
+ cl as invalidateCourse,
2441
+ zn as invalidateModuleItems,
2442
+ Ct as invalidateModuleList,
2443
+ Un as isNewPlacement,
2444
+ ml as isPredicateServed,
2445
+ $n as isProposedNewModule,
2446
+ oe as mergeRegistry,
2447
+ gl as moduleItemStatusLabel,
2448
+ pl as moduleItemsPrefix,
2449
+ fl as moduleStatusLabel,
2450
+ hl as modulesKeys,
2451
+ Il as modulesListPrefix,
2452
+ hr as organizePreviewConfig,
2453
+ po as partialModulesConfig,
2454
+ Wr as proposalToFixture,
2455
+ Ml as registrySchema,
2456
+ dn as resolveModulesConfig,
2457
+ _l as servesClause,
2458
+ Zn as suppressesItemNumbering,
2459
+ El as unservableFilters,
2460
+ fo as useActionContext,
2461
+ Sl as useFieldVisible,
2462
+ ut as useFormatters,
2463
+ Tl as useModules,
2464
+ at as useModulesAnalytics,
2465
+ ke as useModulesConfig,
2466
+ F as useModulesI18n,
2467
+ di as useModulesPageData,
2468
+ Jr as useOrganizeModules,
2469
+ xt as validateOrganizeInput,
2470
+ go as visibleActions,
2471
+ lt as visibleEntries,
2472
+ yl as visibleEntry,
2473
+ ot as withEstimatedDurationMinutes
2390
2474
  };