@instructure/platform-assignment-review 0.4.15 → 0.4.16

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 (2) hide show
  1. package/dist/index.js +703 -682
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { Text as _ } from "@instructure/ui-text";
7
7
  import { View as K } from "@instructure/ui-view";
8
8
  import { useQuery as Ve, useQueryClient as un, useMutation as dn } from "@tanstack/react-query";
9
9
  import ae from "graphql-tag";
10
- import { z as i } from "zod";
10
+ import { z as o } from "zod";
11
11
  import { Pill as _t } from "@instructure/ui-pill";
12
12
  import { IconDownloadLine as Hn, IconCheckMarkSolid as $n, IconArrowStartLine as Bn, IconArrowEndLine as Gn, IconTrashLine as Wn, IconArrowOpenStartLine as fn, IconArrowOpenEndLine as pn, IconXLine as qn, IconLockLine as gn, IconDocumentLine as Kt, IconLinkLine as Yn, IconDiscussionLine as Vn, IconQuizLine as Xn, IconAssignmentLine as Kn } from "@instructure/ui-icons";
13
13
  import { ScreenReaderContent as Et } from "@instructure/ui-a11y-content";
@@ -19,56 +19,56 @@ import { Badge as Tn } from "@instructure/ui-badge";
19
19
  import { Tooltip as Jn } from "@instructure/ui-tooltip";
20
20
  const yn = Fn(void 0);
21
21
  function Fo({
22
- translations: e,
22
+ translations: t,
23
23
  children: n
24
24
  }) {
25
- return /* @__PURE__ */ r(yn.Provider, { value: e, children: n });
25
+ return /* @__PURE__ */ r(yn.Provider, { value: t, children: n });
26
26
  }
27
27
  function q() {
28
- const e = Un(yn);
29
- if (!e)
28
+ const t = Un(yn);
29
+ if (!t)
30
30
  throw new Error("useTranslations must be used within TranslationsProvider");
31
- return e;
31
+ return t;
32
32
  }
33
33
  /*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE */
34
- function Zt(e, n) {
35
- (n == null || n > e.length) && (n = e.length);
36
- for (var o = 0, a = Array(n); o < n; o++) a[o] = e[o];
37
- return a;
34
+ function Zt(t, n) {
35
+ (n == null || n > t.length) && (n = t.length);
36
+ for (var i = 0, s = Array(n); i < n; i++) s[i] = t[i];
37
+ return s;
38
38
  }
39
- function ei(e) {
40
- if (Array.isArray(e)) return e;
39
+ function ei(t) {
40
+ if (Array.isArray(t)) return t;
41
41
  }
42
- function ti(e, n) {
43
- var o = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
44
- if (o != null) {
45
- var a, l, c, d, f = [], m = !0, p = !1;
42
+ function ti(t, n) {
43
+ var i = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
44
+ if (i != null) {
45
+ var s, l, c, d, p = [], m = !0, f = !1;
46
46
  try {
47
- if (c = (o = o.call(e)).next, n !== 0) for (; !(m = (a = c.call(o)).done) && (f.push(a.value), f.length !== n); m = !0) ;
47
+ if (c = (i = i.call(t)).next, n !== 0) for (; !(m = (s = c.call(i)).done) && (p.push(s.value), p.length !== n); m = !0) ;
48
48
  } catch (h) {
49
- p = !0, l = h;
49
+ f = !0, l = h;
50
50
  } finally {
51
51
  try {
52
- if (!m && o.return != null && (d = o.return(), Object(d) !== d)) return;
52
+ if (!m && i.return != null && (d = i.return(), Object(d) !== d)) return;
53
53
  } finally {
54
- if (p) throw l;
54
+ if (f) throw l;
55
55
  }
56
56
  }
57
- return f;
57
+ return p;
58
58
  }
59
59
  }
60
60
  function ni() {
61
61
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62
62
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
63
63
  }
64
- function ii(e, n) {
65
- return ei(e) || ti(e, n) || oi(e, n) || ni();
64
+ function ii(t, n) {
65
+ return ei(t) || ti(t, n) || oi(t, n) || ni();
66
66
  }
67
- function oi(e, n) {
68
- if (e) {
69
- if (typeof e == "string") return Zt(e, n);
70
- var o = {}.toString.call(e).slice(8, -1);
71
- return o === "Object" && e.constructor && (o = e.constructor.name), o === "Map" || o === "Set" ? Array.from(e) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? Zt(e, n) : void 0;
67
+ function oi(t, n) {
68
+ if (t) {
69
+ if (typeof t == "string") return Zt(t, n);
70
+ var i = {}.toString.call(t).slice(8, -1);
71
+ return i === "Object" && t.constructor && (i = t.constructor.name), i === "Map" || i === "Set" ? Array.from(t) : i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? Zt(t, n) : void 0;
72
72
  }
73
73
  }
74
74
  const An = Object.entries, Qt = Object.setPrototypeOf, ri = Object.isFrozen, si = Object.getPrototypeOf, ai = Object.getOwnPropertyDescriptor;
@@ -79,109 +79,109 @@ B || (B = function(n) {
79
79
  Y || (Y = function(n) {
80
80
  return n;
81
81
  });
82
- yt || (yt = function(n, o) {
83
- for (var a = arguments.length, l = new Array(a > 2 ? a - 2 : 0), c = 2; c < a; c++)
82
+ yt || (yt = function(n, i) {
83
+ for (var s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), c = 2; c < s; c++)
84
84
  l[c - 2] = arguments[c];
85
- return n.apply(o, l);
85
+ return n.apply(i, l);
86
86
  });
87
87
  At || (At = function(n) {
88
- for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
89
- a[l - 1] = arguments[l];
90
- return new n(...a);
88
+ for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++)
89
+ s[l - 1] = arguments[l];
90
+ return new n(...s);
91
91
  });
92
92
  const Te = x(Array.prototype.forEach), li = x(Array.prototype.lastIndexOf), Jt = x(Array.prototype.pop), ye = x(Array.prototype.push), ci = x(Array.prototype.splice), H = Array.isArray, Ne = x(String.prototype.toLowerCase), dt = x(String.prototype.toString), en = x(String.prototype.match), Ae = x(String.prototype.replace), tn = x(String.prototype.indexOf), mi = x(String.prototype.trim), ui = x(Number.prototype.toString), di = x(Boolean.prototype.toString), nn = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), on = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), D = x(Object.prototype.hasOwnProperty), Oe = x(Object.prototype.toString), z = x(RegExp.prototype.test), Ge = fi(TypeError);
93
- function x(e) {
93
+ function x(t) {
94
94
  return function(n) {
95
95
  n instanceof RegExp && (n.lastIndex = 0);
96
- for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
97
- a[l - 1] = arguments[l];
98
- return yt(e, n, a);
96
+ for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++)
97
+ s[l - 1] = arguments[l];
98
+ return yt(t, n, s);
99
99
  };
100
100
  }
101
- function fi(e) {
101
+ function fi(t) {
102
102
  return function() {
103
- for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++)
104
- o[a] = arguments[a];
105
- return At(e, o);
103
+ for (var n = arguments.length, i = new Array(n), s = 0; s < n; s++)
104
+ i[s] = arguments[s];
105
+ return At(t, i);
106
106
  };
107
107
  }
108
- function T(e, n) {
109
- let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ne;
110
- if (Qt && Qt(e, null), !H(n))
111
- return e;
112
- let a = n.length;
113
- for (; a--; ) {
114
- let l = n[a];
108
+ function T(t, n) {
109
+ let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ne;
110
+ if (Qt && Qt(t, null), !H(n))
111
+ return t;
112
+ let s = n.length;
113
+ for (; s--; ) {
114
+ let l = n[s];
115
115
  if (typeof l == "string") {
116
- const c = o(l);
117
- c !== l && (ri(n) || (n[a] = c), l = c);
116
+ const c = i(l);
117
+ c !== l && (ri(n) || (n[s] = c), l = c);
118
118
  }
119
- e[l] = !0;
119
+ t[l] = !0;
120
120
  }
121
- return e;
121
+ return t;
122
122
  }
123
- function pi(e) {
124
- for (let n = 0; n < e.length; n++)
125
- D(e, n) || (e[n] = null);
126
- return e;
123
+ function pi(t) {
124
+ for (let n = 0; n < t.length; n++)
125
+ D(t, n) || (t[n] = null);
126
+ return t;
127
127
  }
128
- function W(e) {
128
+ function W(t) {
129
129
  const n = _e(null);
130
- for (const a of An(e)) {
131
- var o = ii(a, 2);
132
- const l = o[0], c = o[1];
133
- D(e, l) && (H(c) ? n[l] = pi(c) : c && typeof c == "object" && c.constructor === Object ? n[l] = W(c) : n[l] = c);
130
+ for (const s of An(t)) {
131
+ var i = ii(s, 2);
132
+ const l = i[0], c = i[1];
133
+ D(t, l) && (H(c) ? n[l] = pi(c) : c && typeof c == "object" && c.constructor === Object ? n[l] = W(c) : n[l] = c);
134
134
  }
135
135
  return n;
136
136
  }
137
- function gi(e) {
138
- switch (typeof e) {
137
+ function gi(t) {
138
+ switch (typeof t) {
139
139
  case "string":
140
- return e;
140
+ return t;
141
141
  case "number":
142
- return ui(e);
142
+ return ui(t);
143
143
  case "boolean":
144
- return di(e);
144
+ return di(t);
145
145
  case "bigint":
146
- return nn ? nn(e) : "0";
146
+ return nn ? nn(t) : "0";
147
147
  case "symbol":
148
- return on ? on(e) : "Symbol()";
148
+ return on ? on(t) : "Symbol()";
149
149
  case "undefined":
150
- return Oe(e);
150
+ return Oe(t);
151
151
  case "function":
152
152
  case "object": {
153
- if (e === null)
154
- return Oe(e);
155
- const n = e, o = de(n, "toString");
156
- if (typeof o == "function") {
157
- const a = o(n);
158
- return typeof a == "string" ? a : Oe(a);
153
+ if (t === null)
154
+ return Oe(t);
155
+ const n = t, i = de(n, "toString");
156
+ if (typeof i == "function") {
157
+ const s = i(n);
158
+ return typeof s == "string" ? s : Oe(s);
159
159
  }
160
- return Oe(e);
160
+ return Oe(t);
161
161
  }
162
162
  default:
163
- return Oe(e);
163
+ return Oe(t);
164
164
  }
165
165
  }
166
- function de(e, n) {
167
- for (; e !== null; ) {
168
- const a = ai(e, n);
169
- if (a) {
170
- if (a.get)
171
- return x(a.get);
172
- if (typeof a.value == "function")
173
- return x(a.value);
166
+ function de(t, n) {
167
+ for (; t !== null; ) {
168
+ const s = ai(t, n);
169
+ if (s) {
170
+ if (s.get)
171
+ return x(s.get);
172
+ if (typeof s.value == "function")
173
+ return x(s.value);
174
174
  }
175
- e = si(e);
175
+ t = si(t);
176
176
  }
177
- function o() {
177
+ function i() {
178
178
  return null;
179
179
  }
180
- return o;
180
+ return i;
181
181
  }
182
- function hi(e) {
182
+ function hi(t) {
183
183
  try {
184
- return z(e, ""), !0;
184
+ return z(t, ""), !0;
185
185
  } catch {
186
186
  return !1;
187
187
  }
@@ -201,13 +201,13 @@ const rn = B(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
201
201
  document: 9
202
202
  }, Ri = function() {
203
203
  return typeof window > "u" ? null : window;
204
- }, Oi = function(n, o) {
204
+ }, Oi = function(n, i) {
205
205
  if (typeof n != "object" || typeof n.createPolicy != "function")
206
206
  return null;
207
- let a = null;
207
+ let s = null;
208
208
  const l = "data-tt-policy-suffix";
209
- o && o.hasAttribute(l) && (a = o.getAttribute(l));
210
- const c = "dompurify" + (a ? "#" + a : "");
209
+ i && i.hasAttribute(l) && (s = i.getAttribute(l));
210
+ const c = "dompurify" + (s ? "#" + s : "");
211
211
  try {
212
212
  return n.createPolicy(c, {
213
213
  createHTML(d) {
@@ -234,21 +234,21 @@ const rn = B(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
234
234
  };
235
235
  };
236
236
  function _n() {
237
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ri();
237
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ri();
238
238
  const n = (g) => _n(g);
239
- if (n.version = "3.4.5", n.removed = [], !e || !e.document || e.document.nodeType !== Se.document || !e.Element)
239
+ if (n.version = "3.4.5", n.removed = [], !t || !t.document || t.document.nodeType !== Se.document || !t.Element)
240
240
  return n.isSupported = !1, n;
241
- let o = e.document;
242
- const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, f = e.Node, m = e.Element, p = e.NodeFilter, h = e.NamedNodeMap, C = h === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : h, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = m.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), k = de(V, "nextSibling"), ne = de(V, "childNodes"), O = de(V, "parentNode"), ce = f && f.prototype ? de(f.prototype, "nodeType") : null;
241
+ let i = t.document;
242
+ const s = i, l = s.currentScript, c = t.DocumentFragment, d = t.HTMLTemplateElement, p = t.Node, m = t.Element, f = t.NodeFilter, h = t.NamedNodeMap, C = h === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : h, I = t.HTMLFormElement, w = t.DOMParser, y = t.trustedTypes, V = m.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), M = de(V, "nextSibling"), ie = de(V, "childNodes"), O = de(V, "parentNode"), ce = p && p.prototype ? de(p.prototype, "nodeType") : null;
243
243
  if (typeof d == "function") {
244
- const g = o.createElement("template");
245
- g.content && g.content.ownerDocument && (o = g.content.ownerDocument);
244
+ const g = i.createElement("template");
245
+ g.content && g.content.ownerDocument && (i = g.content.ownerDocument);
246
246
  }
247
247
  let E, N = "";
248
- const J = o, Ie = J.implementation, xe = J.createNodeIterator, Xe = J.createDocumentFragment, Ke = J.getElementsByTagName, Ze = a.importNode;
248
+ const ee = i, Ie = ee.implementation, xe = ee.createNodeIterator, Xe = ee.createDocumentFragment, Ke = ee.getElementsByTagName, Ze = s.importNode;
249
249
  let j = mn();
250
250
  n.isSupported = typeof An == "function" && typeof O == "function" && Ie && Ie.createHTMLDocument !== void 0;
251
- const Me = yi, ke = Ai, Pe = Si, Cn = _i, Dn = Ei, Rn = Ii, wt = wi, On = Di;
251
+ const ke = yi, Me = Ai, Pe = Si, Cn = _i, Dn = Ei, Rn = Ii, wt = wi, On = Di;
252
252
  let Ct = cn, P = null;
253
253
  const Dt = T({}, [...rn, ...ft, ...pt, ...gt, ...sn]);
254
254
  let U = null;
@@ -273,7 +273,7 @@ function _n() {
273
273
  value: !1
274
274
  }
275
275
  })), we = null, Fe = null;
276
- const ie = Object.seal(_e(null, {
276
+ const oe = Object.seal(_e(null, {
277
277
  tagCheck: {
278
278
  writable: !0,
279
279
  configurable: !1,
@@ -287,11 +287,11 @@ function _n() {
287
287
  value: null
288
288
  }
289
289
  }));
290
- let Ot = !0, Qe = !0, Nt = !1, vt = !0, oe = !1, Ce = !0, me = !1, Je = !1, et = !1, pe = !1, Ue = !1, ze = !1, Lt = !0, xt = !1;
291
- const Mt = "user-content-";
290
+ let Ot = !0, Qe = !0, Nt = !1, vt = !0, re = !1, Ce = !0, me = !1, Je = !1, et = !1, pe = !1, Ue = !1, ze = !1, Lt = !0, xt = !1;
291
+ const kt = "user-content-";
292
292
  let tt = !0, De = !1, ge = {}, Z = null;
293
293
  const nt = T({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
294
- let kt = null;
294
+ let Mt = null;
295
295
  const Pt = T({}, ["audio", "video", "img", "source", "image", "track"]);
296
296
  let it = null;
297
297
  const Ft = T({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), je = "http://www.w3.org/1998/Math/MathML", He = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
@@ -301,177 +301,177 @@ function _n() {
301
301
  const vn = T({}, ["title", "style", "font", "a", "script"]);
302
302
  let Re = null;
303
303
  const Ln = ["application/xhtml+xml", "text/html"], xn = "text/html";
304
- let M = null, be = null;
305
- const Mn = o.createElement("form"), Ut = function(t) {
306
- return t instanceof RegExp || t instanceof Function;
304
+ let k = null, be = null;
305
+ const kn = i.createElement("form"), Ut = function(e) {
306
+ return e instanceof RegExp || e instanceof Function;
307
307
  }, lt = function() {
308
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
309
- if (be && be === t)
308
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
309
+ if (be && be === e)
310
310
  return;
311
- (!t || typeof t != "object") && (t = {}), t = W(t), Re = // eslint-disable-next-line unicorn/prefer-includes
312
- Ln.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? xn : t.PARSER_MEDIA_TYPE, M = Re === "application/xhtml+xml" ? dt : Ne, P = D(t, "ALLOWED_TAGS") && H(t.ALLOWED_TAGS) ? T({}, t.ALLOWED_TAGS, M) : Dt, U = D(t, "ALLOWED_ATTR") && H(t.ALLOWED_ATTR) ? T({}, t.ALLOWED_ATTR, M) : Rt, rt = D(t, "ALLOWED_NAMESPACES") && H(t.ALLOWED_NAMESPACES) ? T({}, t.ALLOWED_NAMESPACES, dt) : Nn, it = D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) ? T(W(Ft), t.ADD_URI_SAFE_ATTR, M) : Ft, kt = D(t, "ADD_DATA_URI_TAGS") && H(t.ADD_DATA_URI_TAGS) ? T(W(Pt), t.ADD_DATA_URI_TAGS, M) : Pt, Z = D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) ? T({}, t.FORBID_CONTENTS, M) : nt, we = D(t, "FORBID_TAGS") && H(t.FORBID_TAGS) ? T({}, t.FORBID_TAGS, M) : W({}), Fe = D(t, "FORBID_ATTR") && H(t.FORBID_ATTR) ? T({}, t.FORBID_ATTR, M) : W({}), ge = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? W(t.USE_PROFILES) : t.USE_PROFILES : !1, Ot = t.ALLOW_ARIA_ATTR !== !1, Qe = t.ALLOW_DATA_ATTR !== !1, Nt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = t.SAFE_FOR_TEMPLATES || !1, Ce = t.SAFE_FOR_XML !== !1, me = t.WHOLE_DOCUMENT || !1, pe = t.RETURN_DOM || !1, Ue = t.RETURN_DOM_FRAGMENT || !1, ze = t.RETURN_TRUSTED_TYPE || !1, et = t.FORCE_BODY || !1, Lt = t.SANITIZE_DOM !== !1, xt = t.SANITIZE_NAMED_PROPS || !1, tt = t.KEEP_CONTENT !== !1, De = t.IN_PLACE || !1, Ct = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : cn, he = typeof t.NAMESPACE == "string" ? t.NAMESPACE : Q, st = D(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? W(t.MATHML_TEXT_INTEGRATION_POINTS) : T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = D(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? W(t.HTML_INTEGRATION_POINTS) : T({}, ["annotation-xml"]);
313
- const s = D(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? W(t.CUSTOM_ELEMENT_HANDLING) : _e(null);
314
- if (R = _e(null), D(s, "tagNameCheck") && Ut(s.tagNameCheck) && (R.tagNameCheck = s.tagNameCheck), D(s, "attributeNameCheck") && Ut(s.attributeNameCheck) && (R.attributeNameCheck = s.attributeNameCheck), D(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), oe && (Qe = !1), Ue && (pe = !0), ge && (P = T({}, sn), U = _e(null), ge.html === !0 && (T(P, rn), T(U, an)), ge.svg === !0 && (T(P, ft), T(U, ht), T(U, We)), ge.svgFilters === !0 && (T(P, pt), T(U, ht), T(U, We)), ge.mathMl === !0 && (T(P, gt), T(U, ln), T(U, We))), ie.tagCheck = null, ie.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? ie.tagCheck = t.ADD_TAGS : H(t.ADD_TAGS) && (P === Dt && (P = W(P)), T(P, t.ADD_TAGS, M))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? ie.attributeCheck = t.ADD_ATTR : H(t.ADD_ATTR) && (U === Rt && (U = W(U)), T(U, t.ADD_ATTR, M))), D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) && T(it, t.ADD_URI_SAFE_ATTR, M), D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.FORBID_CONTENTS, M)), D(t, "ADD_FORBID_CONTENTS") && H(t.ADD_FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.ADD_FORBID_CONTENTS, M)), tt && (P["#text"] = !0), me && T(P, ["html", "head", "body"]), P.table && (T(P, ["tbody"]), delete we.tbody), t.TRUSTED_TYPES_POLICY) {
315
- if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
311
+ (!e || typeof e != "object") && (e = {}), e = W(e), Re = // eslint-disable-next-line unicorn/prefer-includes
312
+ Ln.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? xn : e.PARSER_MEDIA_TYPE, k = Re === "application/xhtml+xml" ? dt : Ne, P = D(e, "ALLOWED_TAGS") && H(e.ALLOWED_TAGS) ? T({}, e.ALLOWED_TAGS, k) : Dt, U = D(e, "ALLOWED_ATTR") && H(e.ALLOWED_ATTR) ? T({}, e.ALLOWED_ATTR, k) : Rt, rt = D(e, "ALLOWED_NAMESPACES") && H(e.ALLOWED_NAMESPACES) ? T({}, e.ALLOWED_NAMESPACES, dt) : Nn, it = D(e, "ADD_URI_SAFE_ATTR") && H(e.ADD_URI_SAFE_ATTR) ? T(W(Ft), e.ADD_URI_SAFE_ATTR, k) : Ft, Mt = D(e, "ADD_DATA_URI_TAGS") && H(e.ADD_DATA_URI_TAGS) ? T(W(Pt), e.ADD_DATA_URI_TAGS, k) : Pt, Z = D(e, "FORBID_CONTENTS") && H(e.FORBID_CONTENTS) ? T({}, e.FORBID_CONTENTS, k) : nt, we = D(e, "FORBID_TAGS") && H(e.FORBID_TAGS) ? T({}, e.FORBID_TAGS, k) : W({}), Fe = D(e, "FORBID_ATTR") && H(e.FORBID_ATTR) ? T({}, e.FORBID_ATTR, k) : W({}), ge = D(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? W(e.USE_PROFILES) : e.USE_PROFILES : !1, Ot = e.ALLOW_ARIA_ATTR !== !1, Qe = e.ALLOW_DATA_ATTR !== !1, Nt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, re = e.SAFE_FOR_TEMPLATES || !1, Ce = e.SAFE_FOR_XML !== !1, me = e.WHOLE_DOCUMENT || !1, pe = e.RETURN_DOM || !1, Ue = e.RETURN_DOM_FRAGMENT || !1, ze = e.RETURN_TRUSTED_TYPE || !1, et = e.FORCE_BODY || !1, Lt = e.SANITIZE_DOM !== !1, xt = e.SANITIZE_NAMED_PROPS || !1, tt = e.KEEP_CONTENT !== !1, De = e.IN_PLACE || !1, Ct = hi(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : cn, he = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Q, st = D(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? W(e.MATHML_TEXT_INTEGRATION_POINTS) : T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = D(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? W(e.HTML_INTEGRATION_POINTS) : T({}, ["annotation-xml"]);
313
+ const a = D(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? W(e.CUSTOM_ELEMENT_HANDLING) : _e(null);
314
+ if (R = _e(null), D(a, "tagNameCheck") && Ut(a.tagNameCheck) && (R.tagNameCheck = a.tagNameCheck), D(a, "attributeNameCheck") && Ut(a.attributeNameCheck) && (R.attributeNameCheck = a.attributeNameCheck), D(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), re && (Qe = !1), Ue && (pe = !0), ge && (P = T({}, sn), U = _e(null), ge.html === !0 && (T(P, rn), T(U, an)), ge.svg === !0 && (T(P, ft), T(U, ht), T(U, We)), ge.svgFilters === !0 && (T(P, pt), T(U, ht), T(U, We)), ge.mathMl === !0 && (T(P, gt), T(U, ln), T(U, We))), oe.tagCheck = null, oe.attributeCheck = null, D(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? oe.tagCheck = e.ADD_TAGS : H(e.ADD_TAGS) && (P === Dt && (P = W(P)), T(P, e.ADD_TAGS, k))), D(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? oe.attributeCheck = e.ADD_ATTR : H(e.ADD_ATTR) && (U === Rt && (U = W(U)), T(U, e.ADD_ATTR, k))), D(e, "ADD_URI_SAFE_ATTR") && H(e.ADD_URI_SAFE_ATTR) && T(it, e.ADD_URI_SAFE_ATTR, k), D(e, "FORBID_CONTENTS") && H(e.FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, e.FORBID_CONTENTS, k)), D(e, "ADD_FORBID_CONTENTS") && H(e.ADD_FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, e.ADD_FORBID_CONTENTS, k)), tt && (P["#text"] = !0), me && T(P, ["html", "head", "body"]), P.table && (T(P, ["tbody"]), delete we.tbody), e.TRUSTED_TYPES_POLICY) {
315
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
316
316
  throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
317
- if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
317
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
318
318
  throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
319
- E = t.TRUSTED_TYPES_POLICY, N = E.createHTML("");
319
+ E = e.TRUSTED_TYPES_POLICY, N = E.createHTML("");
320
320
  } else
321
321
  E === void 0 && (E = Oi(y, l)), E !== null && typeof N == "string" && (N = E.createHTML(""));
322
- B && B(t), be = t;
323
- }, zt = T({}, [...ft, ...pt, ...bi]), jt = T({}, [...gt, ...Ti]), kn = function(t) {
324
- let s = O(t);
325
- (!s || !s.tagName) && (s = {
322
+ B && B(e), be = e;
323
+ }, zt = T({}, [...ft, ...pt, ...bi]), jt = T({}, [...gt, ...Ti]), Mn = function(e) {
324
+ let a = O(e);
325
+ (!a || !a.tagName) && (a = {
326
326
  namespaceURI: he,
327
327
  tagName: "template"
328
328
  });
329
- const u = Ne(t.tagName), A = Ne(s.tagName);
330
- return rt[t.namespaceURI] ? t.namespaceURI === He ? s.namespaceURI === Q ? u === "svg" : s.namespaceURI === je ? u === "svg" && (A === "annotation-xml" || st[A]) : !!zt[u] : t.namespaceURI === je ? s.namespaceURI === Q ? u === "math" : s.namespaceURI === He ? u === "math" && at[A] : !!jt[u] : t.namespaceURI === Q ? s.namespaceURI === He && !at[A] || s.namespaceURI === je && !st[A] ? !1 : !jt[u] && (vn[u] || !zt[u]) : !!(Re === "application/xhtml+xml" && rt[t.namespaceURI]) : !1;
331
- }, X = function(t) {
329
+ const u = Ne(e.tagName), A = Ne(a.tagName);
330
+ return rt[e.namespaceURI] ? e.namespaceURI === He ? a.namespaceURI === Q ? u === "svg" : a.namespaceURI === je ? u === "svg" && (A === "annotation-xml" || st[A]) : !!zt[u] : e.namespaceURI === je ? a.namespaceURI === Q ? u === "math" : a.namespaceURI === He ? u === "math" && at[A] : !!jt[u] : e.namespaceURI === Q ? a.namespaceURI === He && !at[A] || a.namespaceURI === je && !st[A] ? !1 : !jt[u] && (vn[u] || !zt[u]) : !!(Re === "application/xhtml+xml" && rt[e.namespaceURI]) : !1;
331
+ }, X = function(e) {
332
332
  ye(n.removed, {
333
- element: t
333
+ element: e
334
334
  });
335
335
  try {
336
- O(t).removeChild(t);
336
+ O(e).removeChild(e);
337
337
  } catch {
338
- le(t);
338
+ le(e);
339
339
  }
340
- }, ue = function(t, s) {
340
+ }, ue = function(e, a) {
341
341
  try {
342
342
  ye(n.removed, {
343
- attribute: s.getAttributeNode(t),
344
- from: s
343
+ attribute: a.getAttributeNode(e),
344
+ from: a
345
345
  });
346
346
  } catch {
347
347
  ye(n.removed, {
348
348
  attribute: null,
349
- from: s
349
+ from: a
350
350
  });
351
351
  }
352
- if (s.removeAttribute(t), t === "is")
352
+ if (a.removeAttribute(e), e === "is")
353
353
  if (pe || Ue)
354
354
  try {
355
- X(s);
355
+ X(a);
356
356
  } catch {
357
357
  }
358
358
  else
359
359
  try {
360
- s.setAttribute(t, "");
360
+ a.setAttribute(e, "");
361
361
  } catch {
362
362
  }
363
- }, Ht = function(t) {
364
- let s = null, u = null;
363
+ }, Ht = function(e) {
364
+ let a = null, u = null;
365
365
  if (et)
366
- t = "<remove></remove>" + t;
366
+ e = "<remove></remove>" + e;
367
367
  else {
368
- const L = en(t, /^[\r\n\t ]+/);
368
+ const L = en(e, /^[\r\n\t ]+/);
369
369
  u = L && L[0];
370
370
  }
371
- Re === "application/xhtml+xml" && he === Q && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
372
- const A = E ? E.createHTML(t) : t;
371
+ Re === "application/xhtml+xml" && he === Q && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
372
+ const A = E ? E.createHTML(e) : e;
373
373
  if (he === Q)
374
374
  try {
375
- s = new w().parseFromString(A, Re);
375
+ a = new w().parseFromString(A, Re);
376
376
  } catch {
377
377
  }
378
- if (!s || !s.documentElement) {
379
- s = Ie.createDocument(he, "template", null);
378
+ if (!a || !a.documentElement) {
379
+ a = Ie.createDocument(he, "template", null);
380
380
  try {
381
- s.documentElement.innerHTML = ot ? N : A;
381
+ a.documentElement.innerHTML = ot ? N : A;
382
382
  } catch {
383
383
  }
384
384
  }
385
- const v = s.body || s.documentElement;
386
- return t && u && v.insertBefore(o.createTextNode(u), v.childNodes[0] || null), he === Q ? Ke.call(s, me ? "html" : "body")[0] : me ? s.documentElement : v;
387
- }, $t = function(t) {
385
+ const v = a.body || a.documentElement;
386
+ return e && u && v.insertBefore(i.createTextNode(u), v.childNodes[0] || null), he === Q ? Ke.call(a, me ? "html" : "body")[0] : me ? a.documentElement : v;
387
+ }, $t = function(e) {
388
388
  return xe.call(
389
- t.ownerDocument || t,
390
- t,
389
+ e.ownerDocument || e,
390
+ e,
391
391
  // eslint-disable-next-line no-bitwise
392
- p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
392
+ f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
393
393
  null
394
394
  );
395
- }, Bt = function(t) {
396
- t.normalize();
397
- const s = xe.call(
398
- t.ownerDocument || t,
399
- t,
395
+ }, Bt = function(e) {
396
+ e.normalize();
397
+ const a = xe.call(
398
+ e.ownerDocument || e,
399
+ e,
400
400
  // eslint-disable-next-line no-bitwise
401
- p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION,
401
+ f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION,
402
402
  null
403
403
  );
404
- let u = s.nextNode();
404
+ let u = a.nextNode();
405
405
  for (; u; ) {
406
406
  let A = u.data;
407
- Te([Me, ke, Pe], (v) => {
407
+ Te([ke, Me, Pe], (v) => {
408
408
  A = Ae(A, v, " ");
409
- }), u.data = A, u = s.nextNode();
409
+ }), u.data = A, u = a.nextNode();
410
410
  }
411
- }, ct = function(t) {
412
- return t instanceof I && (typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || !(t.attributes instanceof C) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function");
413
- }, $e = function(t) {
414
- if (!ce || typeof t != "object" || t === null)
411
+ }, ct = function(e) {
412
+ return e instanceof I && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof C) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
413
+ }, $e = function(e) {
414
+ if (!ce || typeof e != "object" || e === null)
415
415
  return !1;
416
416
  try {
417
- return typeof ce(t) == "number";
417
+ return typeof ce(e) == "number";
418
418
  } catch {
419
419
  return !1;
420
420
  }
421
421
  };
422
- function ee(g, t, s) {
422
+ function te(g, e, a) {
423
423
  Te(g, (u) => {
424
- u.call(n, t, s, be);
424
+ u.call(n, e, a, be);
425
425
  });
426
426
  }
427
- const Gt = function(t) {
428
- let s = null;
429
- if (ee(j.beforeSanitizeElements, t, null), ct(t))
430
- return X(t), !0;
431
- const u = M(t.nodeName);
432
- if (ee(j.uponSanitizeElement, t, {
427
+ const Gt = function(e) {
428
+ let a = null;
429
+ if (te(j.beforeSanitizeElements, e, null), ct(e))
430
+ return X(e), !0;
431
+ const u = k(e.nodeName);
432
+ if (te(j.uponSanitizeElement, e, {
433
433
  tagName: u,
434
434
  allowedTags: P
435
- }), Ce && t.hasChildNodes() && !$e(t.firstElementChild) && z(/<[/\w!]/g, t.innerHTML) && z(/<[/\w!]/g, t.textContent) || Ce && t.namespaceURI === Q && u === "style" && $e(t.firstElementChild) || t.nodeType === Se.progressingInstruction || Ce && t.nodeType === Se.comment && z(/<[/\w]/g, t.data))
436
- return X(t), !0;
437
- if (we[u] || !(ie.tagCheck instanceof Function && ie.tagCheck(u)) && !P[u]) {
435
+ }), Ce && e.hasChildNodes() && !$e(e.firstElementChild) && z(/<[/\w!]/g, e.innerHTML) && z(/<[/\w!]/g, e.textContent) || Ce && e.namespaceURI === Q && u === "style" && $e(e.firstElementChild) || e.nodeType === Se.progressingInstruction || Ce && e.nodeType === Se.comment && z(/<[/\w]/g, e.data))
436
+ return X(e), !0;
437
+ if (we[u] || !(oe.tagCheck instanceof Function && oe.tagCheck(u)) && !P[u]) {
438
438
  if (!we[u] && qt(u) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
439
439
  return !1;
440
440
  if (tt && !Z[u]) {
441
- const A = O(t) || t.parentNode, v = ne(t) || t.childNodes;
441
+ const A = O(e) || e.parentNode, v = ie(e) || e.childNodes;
442
442
  if (v && A) {
443
443
  const L = v.length;
444
444
  for (let G = L - 1; G >= 0; --G) {
445
- const re = fe(v[G], !0);
446
- A.insertBefore(re, k(t));
445
+ const se = fe(v[G], !0);
446
+ A.insertBefore(se, M(e));
447
447
  }
448
448
  }
449
449
  }
450
- return X(t), !0;
450
+ return X(e), !0;
451
451
  }
452
- return t instanceof m && !kn(t) || (u === "noscript" || u === "noembed" || u === "noframes") && z(/<\/no(script|embed|frames)/i, t.innerHTML) ? (X(t), !0) : (oe && t.nodeType === Se.text && (s = t.textContent, Te([Me, ke, Pe], (A) => {
453
- s = Ae(s, A, " ");
454
- }), t.textContent !== s && (ye(n.removed, {
455
- element: t.cloneNode()
456
- }), t.textContent = s)), ee(j.afterSanitizeElements, t, null), !1);
457
- }, Wt = function(t, s, u) {
458
- if (Fe[s] || Lt && (s === "id" || s === "name") && (u in o || u in Mn))
452
+ return e instanceof m && !Mn(e) || (u === "noscript" || u === "noembed" || u === "noframes") && z(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (re && e.nodeType === Se.text && (a = e.textContent, Te([ke, Me, Pe], (A) => {
453
+ a = Ae(a, A, " ");
454
+ }), e.textContent !== a && (ye(n.removed, {
455
+ element: e.cloneNode()
456
+ }), e.textContent = a)), te(j.afterSanitizeElements, e, null), !1);
457
+ }, Wt = function(e, a, u) {
458
+ if (Fe[a] || Lt && (a === "id" || a === "name") && (u in i || u in kn))
459
459
  return !1;
460
- const A = U[s] || ie.attributeCheck instanceof Function && ie.attributeCheck(s, t);
461
- if (!(Qe && !Fe[s] && z(Cn, s))) {
462
- if (!(Ot && z(Dn, s))) {
463
- if (!A || Fe[s]) {
460
+ const A = U[a] || oe.attributeCheck instanceof Function && oe.attributeCheck(a, e);
461
+ if (!(Qe && !Fe[a] && z(Cn, a))) {
462
+ if (!(Ot && z(Dn, a))) {
463
+ if (!A || Fe[a]) {
464
464
  if (
465
465
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
466
466
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
467
467
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
468
- !(qt(t) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, t) || R.tagNameCheck instanceof Function && R.tagNameCheck(t)) && (R.attributeNameCheck instanceof RegExp && z(R.attributeNameCheck, s) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(s, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
468
+ !(qt(e) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && z(R.attributeNameCheck, a) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(a, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
469
469
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
470
- s === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
470
+ a === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
471
471
  ) return !1;
472
- } else if (!it[s]) {
472
+ } else if (!it[a]) {
473
473
  if (!z(Ct, Ae(u, wt, ""))) {
474
- if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(u, "data:") === 0 && kt[t])) {
474
+ if (!((a === "src" || a === "xlink:href" || a === "href") && e !== "script" && tn(u, "data:") === 0 && Mt[e])) {
475
475
  if (!(Nt && !z(Rn, Ae(u, wt, "")))) {
476
476
  if (u)
477
477
  return !1;
@@ -482,12 +482,12 @@ function _n() {
482
482
  }
483
483
  }
484
484
  return !0;
485
- }, Pn = T({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qt = function(t) {
486
- return !Pn[Ne(t)] && z(On, t);
487
- }, Yt = function(t) {
488
- ee(j.beforeSanitizeAttributes, t, null);
489
- const s = t.attributes;
490
- if (!s || ct(t))
485
+ }, Pn = T({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qt = function(e) {
486
+ return !Pn[Ne(e)] && z(On, e);
487
+ }, Yt = function(e) {
488
+ te(j.beforeSanitizeAttributes, e, null);
489
+ const a = e.attributes;
490
+ if (!a || ct(e))
491
491
  return;
492
492
  const u = {
493
493
  attrName: "",
@@ -496,38 +496,38 @@ function _n() {
496
496
  allowedAttributes: U,
497
497
  forceKeepAttr: void 0
498
498
  };
499
- let A = s.length;
499
+ let A = a.length;
500
500
  for (; A--; ) {
501
- const v = s[A], L = v.name, G = v.namespaceURI, re = v.value, te = M(L), ut = re;
501
+ const v = a[A], L = v.name, G = v.namespaceURI, se = v.value, ne = k(L), ut = se;
502
502
  let F = L === "value" ? ut : mi(ut);
503
- if (u.attrName = te, u.attrValue = F, u.keepAttr = !0, u.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, u), F = u.attrValue, xt && (te === "id" || te === "name") && tn(F, Mt) !== 0 && (ue(L, t), F = Mt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
504
- ue(L, t);
503
+ if (u.attrName = ne, u.attrValue = F, u.keepAttr = !0, u.forceKeepAttr = void 0, te(j.uponSanitizeAttribute, e, u), F = u.attrValue, xt && (ne === "id" || ne === "name") && tn(F, kt) !== 0 && (ue(L, e), F = kt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
504
+ ue(L, e);
505
505
  continue;
506
506
  }
507
- if (te === "attributename" && en(F, "href")) {
508
- ue(L, t);
507
+ if (ne === "attributename" && en(F, "href")) {
508
+ ue(L, e);
509
509
  continue;
510
510
  }
511
511
  if (u.forceKeepAttr)
512
512
  continue;
513
513
  if (!u.keepAttr) {
514
- ue(L, t);
514
+ ue(L, e);
515
515
  continue;
516
516
  }
517
517
  if (!vt && z(/\/>/i, F)) {
518
- ue(L, t);
518
+ ue(L, e);
519
519
  continue;
520
520
  }
521
- oe && Te([Me, ke, Pe], (Xt) => {
521
+ re && Te([ke, Me, Pe], (Xt) => {
522
522
  F = Ae(F, Xt, " ");
523
523
  });
524
- const Vt = M(t.nodeName);
525
- if (!Wt(Vt, te, F)) {
526
- ue(L, t);
524
+ const Vt = k(e.nodeName);
525
+ if (!Wt(Vt, ne, F)) {
526
+ ue(L, e);
527
527
  continue;
528
528
  }
529
529
  if (E && typeof y == "object" && typeof y.getAttributeType == "function" && !G)
530
- switch (y.getAttributeType(Vt, te)) {
530
+ switch (y.getAttributeType(Vt, ne)) {
531
531
  case "TrustedHTML": {
532
532
  F = E.createHTML(F);
533
533
  break;
@@ -539,90 +539,90 @@ function _n() {
539
539
  }
540
540
  if (F !== ut)
541
541
  try {
542
- G ? t.setAttributeNS(G, L, F) : t.setAttribute(L, F), ct(t) ? X(t) : Jt(n.removed);
542
+ G ? e.setAttributeNS(G, L, F) : e.setAttribute(L, F), ct(e) ? X(e) : Jt(n.removed);
543
543
  } catch {
544
- ue(L, t);
544
+ ue(L, e);
545
545
  }
546
546
  }
547
- ee(j.afterSanitizeAttributes, t, null);
548
- }, mt = function(t) {
549
- let s = null;
550
- const u = $t(t);
551
- for (ee(j.beforeSanitizeShadowDOM, t, null); s = u.nextNode(); )
552
- ee(j.uponSanitizeShadowNode, s, null), Gt(s), Yt(s), s.content instanceof c && mt(s.content);
553
- ee(j.afterSanitizeShadowDOM, t, null);
554
- }, Be = function(t) {
555
- if (t.nodeType === Se.element && t.shadowRoot instanceof c) {
556
- const A = t.shadowRoot;
547
+ te(j.afterSanitizeAttributes, e, null);
548
+ }, mt = function(e) {
549
+ let a = null;
550
+ const u = $t(e);
551
+ for (te(j.beforeSanitizeShadowDOM, e, null); a = u.nextNode(); )
552
+ te(j.uponSanitizeShadowNode, a, null), Gt(a), Yt(a), a.content instanceof c && mt(a.content);
553
+ te(j.afterSanitizeShadowDOM, e, null);
554
+ }, Be = function(e) {
555
+ if (e.nodeType === Se.element && e.shadowRoot instanceof c) {
556
+ const A = e.shadowRoot;
557
557
  Be(A), mt(A);
558
558
  }
559
- const s = t.childNodes;
560
- if (!s)
559
+ const a = e.childNodes;
560
+ if (!a)
561
561
  return;
562
562
  const u = [];
563
- Te(s, (A) => {
563
+ Te(a, (A) => {
564
564
  ye(u, A);
565
565
  });
566
566
  for (const A of u)
567
567
  Be(A);
568
568
  };
569
569
  return n.sanitize = function(g) {
570
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, u = null, A = null, v = null;
570
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, u = null, A = null, v = null;
571
571
  if (ot = !g, ot && (g = "<!-->"), typeof g != "string" && !$e(g) && (g = gi(g), typeof g != "string"))
572
572
  throw Ge("dirty is not a string, aborting");
573
573
  if (!n.isSupported)
574
574
  return g;
575
- if (Je || lt(t), n.removed = [], typeof g == "string" && (De = !1), De) {
576
- const re = g.nodeName;
577
- if (typeof re == "string") {
578
- const te = M(re);
579
- if (!P[te] || we[te])
575
+ if (Je || lt(e), n.removed = [], typeof g == "string" && (De = !1), De) {
576
+ const se = g.nodeName;
577
+ if (typeof se == "string") {
578
+ const ne = k(se);
579
+ if (!P[ne] || we[ne])
580
580
  throw Ge("root node is forbidden and cannot be sanitized in-place");
581
581
  }
582
582
  Be(g);
583
583
  } else if ($e(g))
584
- s = Ht("<!---->"), u = s.ownerDocument.importNode(g, !0), u.nodeType === Se.element && u.nodeName === "BODY" || u.nodeName === "HTML" ? s = u : s.appendChild(u), Be(u);
584
+ a = Ht("<!---->"), u = a.ownerDocument.importNode(g, !0), u.nodeType === Se.element && u.nodeName === "BODY" || u.nodeName === "HTML" ? a = u : a.appendChild(u), Be(u);
585
585
  else {
586
- if (!pe && !oe && !me && // eslint-disable-next-line unicorn/prefer-includes
586
+ if (!pe && !re && !me && // eslint-disable-next-line unicorn/prefer-includes
587
587
  g.indexOf("<") === -1)
588
588
  return E && ze ? E.createHTML(g) : g;
589
- if (s = Ht(g), !s)
589
+ if (a = Ht(g), !a)
590
590
  return pe ? null : ze ? N : "";
591
591
  }
592
- s && et && X(s.firstChild);
593
- const L = $t(De ? g : s);
592
+ a && et && X(a.firstChild);
593
+ const L = $t(De ? g : a);
594
594
  for (; A = L.nextNode(); )
595
595
  Gt(A), Yt(A), A.content instanceof c && mt(A.content);
596
596
  if (De)
597
- return oe && Bt(g), g;
597
+ return re && Bt(g), g;
598
598
  if (pe) {
599
- if (oe && Bt(s), Ue)
600
- for (v = Xe.call(s.ownerDocument); s.firstChild; )
601
- v.appendChild(s.firstChild);
599
+ if (re && Bt(a), Ue)
600
+ for (v = Xe.call(a.ownerDocument); a.firstChild; )
601
+ v.appendChild(a.firstChild);
602
602
  else
603
- v = s;
604
- return (U.shadowroot || U.shadowrootmode) && (v = Ze.call(a, v, !0)), v;
603
+ v = a;
604
+ return (U.shadowroot || U.shadowrootmode) && (v = Ze.call(s, v, !0)), v;
605
605
  }
606
- let G = me ? s.outerHTML : s.innerHTML;
607
- return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(Ci, s.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
608
- ` + G), oe && Te([Me, ke, Pe], (re) => {
609
- G = Ae(G, re, " ");
606
+ let G = me ? a.outerHTML : a.innerHTML;
607
+ return me && P["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && z(Ci, a.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
608
+ ` + G), re && Te([ke, Me, Pe], (se) => {
609
+ G = Ae(G, se, " ");
610
610
  }), E && ze ? E.createHTML(G) : G;
611
611
  }, n.setConfig = function() {
612
612
  let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
613
613
  lt(g), Je = !0;
614
614
  }, n.clearConfig = function() {
615
615
  be = null, Je = !1;
616
- }, n.isValidAttribute = function(g, t, s) {
616
+ }, n.isValidAttribute = function(g, e, a) {
617
617
  be || lt({});
618
- const u = M(g), A = M(t);
619
- return Wt(u, A, s);
620
- }, n.addHook = function(g, t) {
621
- typeof t == "function" && ye(j[g], t);
622
- }, n.removeHook = function(g, t) {
623
- if (t !== void 0) {
624
- const s = li(j[g], t);
625
- return s === -1 ? void 0 : ci(j[g], s, 1)[0];
618
+ const u = k(g), A = k(e);
619
+ return Wt(u, A, a);
620
+ }, n.addHook = function(g, e) {
621
+ typeof e == "function" && ye(j[g], e);
622
+ }, n.removeHook = function(g, e) {
623
+ if (e !== void 0) {
624
+ const a = li(j[g], e);
625
+ return a === -1 ? void 0 : ci(j[g], a, 1)[0];
626
626
  }
627
627
  return Jt(j[g]);
628
628
  }, n.removeHooks = function(g) {
@@ -885,7 +885,7 @@ const Ni = /* @__PURE__ */ new Set([
885
885
  "cite",
886
886
  "longdesc",
887
887
  "xlink:href"
888
- ]), Li = ["content"], xi = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, Mi = /* @__PURE__ */ new Set([
888
+ ]), Li = ["content"], xi = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, ki = /* @__PURE__ */ new Set([
889
889
  "allow-downloads",
890
890
  "allow-forms",
891
891
  "allow-modals",
@@ -898,8 +898,22 @@ const Ni = /* @__PURE__ */ new Set([
898
898
  "allow-scripts",
899
899
  "allow-storage-access-by-user-activation",
900
900
  "allow-top-navigation-by-user-activation"
901
- ]), ki = {
902
- ADD_TAGS: ["iframe"],
901
+ ]), Mi = {
902
+ // semantics and annotation are re-allowed because DOMPurify blocks all of
903
+ // mathMlDisallowed by default. semantics is a safe structural wrapper;
904
+ // annotation carries LaTeX source text (e.g. \frac{1}{2}); Canvas emits
905
+ // text-only content here, and any child elements would be hoisted out of
906
+ // the MathML context and sanitized as ordinary HTML.
907
+ //
908
+ // annotation-xml is re-added here and filtered by an afterSanitizeElements
909
+ // hook below: it is stripped when its encoding makes it an HTML integration
910
+ // point ("text/html" or "application/xhtml+xml" per the WHATWG spec), which
911
+ // is the mXSS namespace-confusion vector. Semantic encodings used by external
912
+ // tools (MathML-Content, MathML-Presentation from MathType/Wolfram Alpha,
913
+ // application/x-tex, …) are not integration points and are preserved, so this
914
+ // layer no longer strips the benign annotation-xml the backend and TinyMCE
915
+ // already allow.
916
+ ADD_TAGS: ["iframe", "semantics", "annotation", "annotation-xml"],
903
917
  ADD_ATTR: [
904
918
  "allowfullscreen",
905
919
  "allow",
@@ -943,17 +957,18 @@ const Ni = /* @__PURE__ */ new Set([
943
957
  // confusion attacks where fragments like <svg> could influence parse context.
944
958
  FORCE_BODY: !0
945
959
  };
946
- let se = null;
960
+ let J = null;
947
961
  function Pi() {
948
- return se || (se = typeof bt == "function" ? bt(window) : bt, se.addHook("afterSanitizeAttributes", (e) => {
949
- if (!(e instanceof Element) || !e.hasAttribute("style")) return;
950
- const n = e.style, o = [];
951
- for (let f = 0; f < n.length; f++) {
952
- const m = n.item(f);
953
- Ni.has(m) || o.push(m);
962
+ if (J) return J;
963
+ J = typeof bt == "function" ? bt(window) : bt, J.addHook("afterSanitizeAttributes", (n) => {
964
+ if (!(n instanceof Element) || !n.hasAttribute("style")) return;
965
+ const i = n.style, s = [];
966
+ for (let m = 0; m < i.length; m++) {
967
+ const f = i.item(m);
968
+ Ni.has(f) || s.push(f);
954
969
  }
955
- for (const f of o) n.removeProperty(f);
956
- const a = /* @__PURE__ */ new Set([
970
+ for (const m of s) i.removeProperty(m);
971
+ const l = /* @__PURE__ */ new Set([
957
972
  "static",
958
973
  "relative",
959
974
  "absolute",
@@ -962,51 +977,57 @@ function Pi() {
962
977
  "unset",
963
978
  "revert",
964
979
  "revert-layer"
965
- ]), l = n.getPropertyValue("position").trim().toLowerCase();
966
- l && !a.has(l) && n.removeProperty("position");
967
- const c = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert", "revert-layer"]), d = n.getPropertyValue("opacity").trim().toLowerCase();
968
- d && !c.has(d) && (d.endsWith("%") ? parseFloat(d) / 100 : parseFloat(d)) < 0.05 && n.removeProperty("opacity");
969
- for (const f of Li) {
970
- const m = n.getPropertyValue(f);
971
- m && xi.test(m) && n.removeProperty(f);
980
+ ]), c = i.getPropertyValue("position").trim().toLowerCase();
981
+ c && !l.has(c) && i.removeProperty("position");
982
+ const d = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert", "revert-layer"]), p = i.getPropertyValue("opacity").trim().toLowerCase();
983
+ p && !d.has(p) && (p.endsWith("%") ? parseFloat(p) / 100 : parseFloat(p)) < 0.05 && i.removeProperty("opacity");
984
+ for (const m of Li) {
985
+ const f = i.getPropertyValue(m);
986
+ f && xi.test(f) && i.removeProperty(m);
972
987
  }
973
- n.length === 0 && e.removeAttribute("style");
974
- }), se.addHook("uponSanitizeAttribute", (e, n) => {
975
- if (!vi.has(n.attrName)) return;
976
- const o = n.attrValue;
977
- /^\s*\/\//.test(o) ? (n.attrValue = o.trimStart().replace(/^\/\//, "https://"), n.keepAttr = !0) : /^\s*\\/.test(o) && (n.keepAttr = !1);
978
- }), se.addHook("afterSanitizeAttributes", (e) => {
979
- if (!(e instanceof Element) || !e.hasAttribute("srcset")) return;
980
- const n = (e.getAttribute("srcset") ?? "").split(","), o = (c) => c.trim().split(/\s+/)[0];
981
- if (n.some((c) => /^\s*\\/.test(o(c)))) {
982
- e.removeAttribute("srcset");
988
+ i.length === 0 && n.removeAttribute("style");
989
+ }), J.addHook("uponSanitizeAttribute", (n, i) => {
990
+ if (!vi.has(i.attrName)) return;
991
+ const s = i.attrValue;
992
+ /^\s*\/\//.test(s) ? (i.attrValue = s.trimStart().replace(/^\/\//, "https://"), i.keepAttr = !0) : /^\s*\\/.test(s) && (i.keepAttr = !1);
993
+ }), J.addHook("afterSanitizeAttributes", (n) => {
994
+ if (!(n instanceof Element) || !n.hasAttribute("srcset")) return;
995
+ const i = (n.getAttribute("srcset") ?? "").split(","), s = (d) => d.trim().split(/\s+/)[0];
996
+ if (i.some((d) => /^\s*\\/.test(s(d)))) {
997
+ n.removeAttribute("srcset");
983
998
  return;
984
999
  }
985
- let a = !1;
986
- const l = n.map((c) => {
987
- const d = o(c);
988
- if (!d.startsWith("//")) return c;
989
- a = !0;
990
- const f = c.indexOf(d);
991
- return c.slice(0, f) + "https://" + d.slice(2) + c.slice(f + d.length);
1000
+ let l = !1;
1001
+ const c = i.map((d) => {
1002
+ const p = s(d);
1003
+ if (!p.startsWith("//")) return d;
1004
+ l = !0;
1005
+ const m = d.indexOf(p);
1006
+ return d.slice(0, m) + "https://" + p.slice(2) + d.slice(m + p.length);
992
1007
  });
993
- a && e.setAttribute("srcset", l.join(","));
994
- }), se.addHook("afterSanitizeAttributes", (e) => {
995
- var n;
996
- if (!(e instanceof Element) || e.tagName !== "A" && e.tagName !== "AREA" || ((n = e.getAttribute("target")) == null ? void 0 : n.toLowerCase()) !== "_blank") return;
997
- const o = e.getAttribute("rel") ?? "", a = new Set(o.split(/\s+/).filter(Boolean));
998
- a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
999
- }), se.addHook("afterSanitizeAttributes", (e) => {
1000
- if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
1001
- const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => Mi.has(a));
1002
- o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
1003
- }), se);
1008
+ l && n.setAttribute("srcset", c.join(","));
1009
+ }), J.addHook("afterSanitizeAttributes", (n) => {
1010
+ var i;
1011
+ if (!(n instanceof Element) || n.tagName !== "A" && n.tagName !== "AREA" || ((i = n.getAttribute("target")) == null ? void 0 : i.toLowerCase()) !== "_blank") return;
1012
+ const s = n.getAttribute("rel") ?? "", l = new Set(s.split(/\s+/).filter(Boolean));
1013
+ l.add("noopener"), n.setAttribute("rel", [...l].join(" "));
1014
+ }), J.addHook("afterSanitizeAttributes", (n) => {
1015
+ if (!(n instanceof Element) || n.tagName !== "IFRAME" || !n.hasAttribute("sandbox")) return;
1016
+ const i = (n.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), s = i.filter((l) => ki.has(l));
1017
+ s.length !== i.length && n.setAttribute("sandbox", s.join(" "));
1018
+ });
1019
+ const t = /* @__PURE__ */ new Set(["text/html", "application/xhtml+xml"]);
1020
+ return J.addHook("afterSanitizeElements", (n) => {
1021
+ if (!(n instanceof Element) || n.tagName.toLowerCase() !== "annotation-xml") return;
1022
+ const i = (n.getAttribute("encoding") ?? "").toLowerCase().trim();
1023
+ t.has(i) && n.remove();
1024
+ }), J;
1004
1025
  }
1005
- function It(e, n) {
1026
+ function It(t, n) {
1006
1027
  if (typeof window > "u")
1007
1028
  throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
1008
- const o = ki;
1009
- return Pi().sanitize(e ?? "", o);
1029
+ const i = Mi;
1030
+ return Pi().sanitize(t ?? "", i);
1010
1031
  }
1011
1032
  const Fi = ae`
1012
1033
  query GetAssignment($courseId: ID!, $assignmentId: ID!, $userId: ID!) {
@@ -1150,196 +1171,196 @@ const Fi = ae`
1150
1171
  contentType
1151
1172
  submissionPreviewUrl
1152
1173
  }
1153
- `, ve = i.object({
1154
- _id: i.string(),
1155
- displayName: i.string(),
1156
- id: i.string(),
1157
- mimeClass: i.string(),
1158
- url: i.string(),
1159
- contentType: i.string(),
1160
- submissionPreviewUrl: i.string().nullable()
1161
- }), ji = i.object({
1162
- _id: i.string(),
1163
- activeSubmissionType: i.string(),
1164
- body: i.string().nullable(),
1165
- attachments: i.array(ve).nullable()
1166
- }), Hi = i.object({
1167
- id: i.string(),
1168
- submittedAt: i.string(),
1169
- body: i.string().nullable(),
1170
- grade: i.string().nullable(),
1171
- score: i.number().nullable(),
1172
- submissionType: i.string(),
1173
- attempt: i.number(),
1174
- unreadCommentCount: i.number(),
1174
+ `, ve = o.object({
1175
+ _id: o.string(),
1176
+ displayName: o.string(),
1177
+ id: o.string(),
1178
+ mimeClass: o.string(),
1179
+ url: o.string(),
1180
+ contentType: o.string(),
1181
+ submissionPreviewUrl: o.string().nullable()
1182
+ }), ji = o.object({
1183
+ _id: o.string(),
1184
+ activeSubmissionType: o.string(),
1185
+ body: o.string().nullable(),
1186
+ attachments: o.array(ve).nullable()
1187
+ }), Hi = o.object({
1188
+ id: o.string(),
1189
+ submittedAt: o.string(),
1190
+ body: o.string().nullable(),
1191
+ grade: o.string().nullable(),
1192
+ score: o.number().nullable(),
1193
+ submissionType: o.string(),
1194
+ attempt: o.number(),
1195
+ unreadCommentCount: o.number(),
1175
1196
  attachment: ve.nullable(),
1176
- attachments: i.array(ve).nullable(),
1197
+ attachments: o.array(ve).nullable(),
1177
1198
  submissionDraft: ji.nullable()
1178
- }), $i = i.object({
1179
- _id: i.string(),
1180
- name: i.string(),
1181
- description: i.string().nullable(),
1182
- allowedExtensions: i.array(i.string()).nullable(),
1183
- allowedAttempts: i.number().nullable(),
1184
- dueAt: i.string().nullable(),
1185
- pointsPossible: i.number().nullable(),
1186
- submissionTypes: i.array(i.string()),
1187
- gradingType: i.string(),
1188
- published: i.boolean().nullable().optional(),
1189
- submissionsConnection: i.object({
1190
- nodes: i.array(Hi)
1199
+ }), $i = o.object({
1200
+ _id: o.string(),
1201
+ name: o.string(),
1202
+ description: o.string().nullable(),
1203
+ allowedExtensions: o.array(o.string()).nullable(),
1204
+ allowedAttempts: o.number().nullable(),
1205
+ dueAt: o.string().nullable(),
1206
+ pointsPossible: o.number().nullable(),
1207
+ submissionTypes: o.array(o.string()),
1208
+ gradingType: o.string(),
1209
+ published: o.boolean().nullable().optional(),
1210
+ submissionsConnection: o.object({
1211
+ nodes: o.array(Hi)
1191
1212
  })
1192
- }), Bi = i.object({
1213
+ }), Bi = o.object({
1193
1214
  legacyNode: $i,
1194
- course: i.object({
1195
- name: i.string()
1215
+ course: o.object({
1216
+ name: o.string()
1196
1217
  })
1197
- }), En = i.object({
1198
- startCursor: i.string(),
1199
- endCursor: i.string(),
1200
- hasPreviousPage: i.boolean(),
1201
- hasNextPage: i.boolean()
1202
- }), In = i.object({
1203
- _id: i.string(),
1204
- attempt: i.number(),
1205
- author: i.object({
1206
- avatarUrl: i.string().nullable(),
1207
- shortName: i.string(),
1208
- courseRoles: i.string().nullable()
1218
+ }), En = o.object({
1219
+ startCursor: o.string(),
1220
+ endCursor: o.string(),
1221
+ hasPreviousPage: o.boolean(),
1222
+ hasNextPage: o.boolean()
1223
+ }), In = o.object({
1224
+ _id: o.string(),
1225
+ attempt: o.number(),
1226
+ author: o.object({
1227
+ avatarUrl: o.string().nullable(),
1228
+ shortName: o.string(),
1229
+ courseRoles: o.string().nullable()
1209
1230
  }),
1210
- htmlComment: i.string(),
1211
- read: i.boolean(),
1212
- updatedAt: i.string(),
1213
- createdAt: i.string(),
1214
- attachments: i.array(
1215
- i.object({
1216
- url: i.string(),
1217
- mimeClass: i.string(),
1218
- displayName: i.string(),
1219
- contentType: i.string(),
1220
- id: i.string()
1231
+ htmlComment: o.string(),
1232
+ read: o.boolean(),
1233
+ updatedAt: o.string(),
1234
+ createdAt: o.string(),
1235
+ attachments: o.array(
1236
+ o.object({
1237
+ url: o.string(),
1238
+ mimeClass: o.string(),
1239
+ displayName: o.string(),
1240
+ contentType: o.string(),
1241
+ id: o.string()
1221
1242
  })
1222
1243
  ).nullable()
1223
- }), Gi = i.object({
1224
- submissionComments: i.object({
1225
- commentsConnection: i.object({
1244
+ }), Gi = o.object({
1245
+ submissionComments: o.object({
1246
+ commentsConnection: o.object({
1226
1247
  pageInfo: En,
1227
- nodes: i.array(In)
1248
+ nodes: o.array(In)
1228
1249
  })
1229
1250
  })
1230
- }), Uo = i.object({
1231
- comments: i.array(In),
1251
+ }), Uo = o.object({
1252
+ comments: o.array(In),
1232
1253
  pageInfo: En
1233
- }), Wi = i.object({
1234
- submittedAt: i.string(),
1235
- body: i.string().nullable(),
1236
- grade: i.string().nullable(),
1237
- score: i.number().nullable(),
1238
- submissionType: i.string(),
1239
- state: i.string(),
1240
- attempt: i.number(),
1254
+ }), Wi = o.object({
1255
+ submittedAt: o.string(),
1256
+ body: o.string().nullable(),
1257
+ grade: o.string().nullable(),
1258
+ score: o.number().nullable(),
1259
+ submissionType: o.string(),
1260
+ state: o.string(),
1261
+ attempt: o.number(),
1241
1262
  attachment: ve.nullable(),
1242
- attachments: i.array(ve).nullable()
1243
- }), qi = i.object({
1244
- node: i.object({
1245
- submissionHistoriesConnection: i.object({
1246
- nodes: i.array(Wi)
1263
+ attachments: o.array(ve).nullable()
1264
+ }), qi = o.object({
1265
+ node: o.object({
1266
+ submissionHistoriesConnection: o.object({
1267
+ nodes: o.array(Wi)
1247
1268
  })
1248
1269
  })
1249
- }), Le = i.object({
1250
- attribute: i.string(),
1251
- message: i.string()
1252
- }), Yi = i.object({
1253
- createSubmissionComment: i.object({
1254
- submissionComment: i.object({
1255
- _id: i.string(),
1256
- attachments: i.array(
1257
- i.object({
1258
- _id: i.string(),
1259
- displayName: i.string(),
1260
- id: i.string(),
1261
- mimeClass: i.string(),
1262
- url: i.string()
1270
+ }), Le = o.object({
1271
+ attribute: o.string(),
1272
+ message: o.string()
1273
+ }), Yi = o.object({
1274
+ createSubmissionComment: o.object({
1275
+ submissionComment: o.object({
1276
+ _id: o.string(),
1277
+ attachments: o.array(
1278
+ o.object({
1279
+ _id: o.string(),
1280
+ displayName: o.string(),
1281
+ id: o.string(),
1282
+ mimeClass: o.string(),
1283
+ url: o.string()
1263
1284
  })
1264
1285
  ).nullable(),
1265
- author: i.object({
1266
- avatarUrl: i.string().nullable(),
1267
- shortName: i.string()
1286
+ author: o.object({
1287
+ avatarUrl: o.string().nullable(),
1288
+ shortName: o.string()
1268
1289
  }),
1269
- htmlComment: i.string(),
1270
- mediaObject: i.object({
1271
- id: i.string(),
1272
- _id: i.string(),
1273
- mediaSources: i.array(
1274
- i.object({
1275
- height: i.string(),
1276
- src: i.string(),
1277
- type: i.string(),
1278
- width: i.string()
1290
+ htmlComment: o.string(),
1291
+ mediaObject: o.object({
1292
+ id: o.string(),
1293
+ _id: o.string(),
1294
+ mediaSources: o.array(
1295
+ o.object({
1296
+ height: o.string(),
1297
+ src: o.string(),
1298
+ type: o.string(),
1299
+ width: o.string()
1279
1300
  })
1280
1301
  ),
1281
- mediaTracks: i.array(
1282
- i.object({
1283
- _id: i.string(),
1284
- locale: i.string(),
1285
- content: i.string(),
1286
- kind: i.string()
1302
+ mediaTracks: o.array(
1303
+ o.object({
1304
+ _id: o.string(),
1305
+ locale: o.string(),
1306
+ content: o.string(),
1307
+ kind: o.string()
1287
1308
  })
1288
1309
  ),
1289
- mediaType: i.string(),
1290
- title: i.string()
1310
+ mediaType: o.string(),
1311
+ title: o.string()
1291
1312
  }).nullable(),
1292
- read: i.boolean(),
1293
- updatedAt: i.string()
1313
+ read: o.boolean(),
1314
+ updatedAt: o.string()
1294
1315
  }).nullable(),
1295
- errors: i.array(Le).nullable()
1316
+ errors: o.array(Le).nullable()
1296
1317
  })
1297
- }), Vi = i.object({
1298
- markSubmissionCommentsRead: i.object({
1299
- errors: i.array(Le).nullable()
1318
+ }), Vi = o.object({
1319
+ markSubmissionCommentsRead: o.object({
1320
+ errors: o.array(Le).nullable()
1300
1321
  })
1301
- }), zo = i.object({
1302
- createSubmission: i.object({
1303
- submission: i.object({
1304
- _id: i.string(),
1305
- createdAt: i.string(),
1306
- attempt: i.number(),
1307
- submittedAt: i.string().nullable(),
1308
- score: i.number().nullable()
1322
+ }), zo = o.object({
1323
+ createSubmission: o.object({
1324
+ submission: o.object({
1325
+ _id: o.string(),
1326
+ createdAt: o.string(),
1327
+ attempt: o.number(),
1328
+ submittedAt: o.string().nullable(),
1329
+ score: o.number().nullable()
1309
1330
  }).nullable(),
1310
- errors: i.array(Le).nullable()
1331
+ errors: o.array(Le).nullable()
1311
1332
  })
1312
- }), jo = i.object(
1333
+ }), jo = o.object(
1313
1334
  {
1314
- createSubmissionDraft: i.object({
1315
- submissionDraft: i.object({
1316
- _id: i.string()
1335
+ createSubmissionDraft: o.object({
1336
+ submissionDraft: o.object({
1337
+ _id: o.string()
1317
1338
  }).nullable(),
1318
- errors: i.array(Le).nullable()
1339
+ errors: o.array(Le).nullable()
1319
1340
  })
1320
1341
  }
1321
- ), Ho = i.object(
1342
+ ), Ho = o.object(
1322
1343
  {
1323
- deleteSubmissionDraft: i.object({
1324
- submissionDraftIds: i.array(i.string()).nullable(),
1325
- errors: i.array(Le).nullable()
1344
+ deleteSubmissionDraft: o.object({
1345
+ submissionDraftIds: o.array(o.string()).nullable(),
1346
+ errors: o.array(Le).nullable()
1326
1347
  })
1327
1348
  }
1328
1349
  );
1329
1350
  function Xi({
1330
- courseId: e,
1351
+ courseId: t,
1331
1352
  assignmentId: n,
1332
- userId: o,
1333
- executeQuery: a,
1353
+ userId: i,
1354
+ executeQuery: s,
1334
1355
  enabled: l = !0
1335
1356
  }) {
1336
1357
  return Ve({
1337
- queryKey: ["assignment-review", "assignment", e, n, o],
1358
+ queryKey: ["assignment-review", "assignment", t, n, i],
1338
1359
  queryFn: async () => {
1339
- const c = await a(Fi, {
1340
- courseId: e,
1360
+ const c = await s(Fi, {
1361
+ courseId: t,
1341
1362
  assignmentId: n,
1342
- userId: o
1363
+ userId: i
1343
1364
  }), d = Bi.parse(c);
1344
1365
  return {
1345
1366
  ...d.legacyNode,
@@ -1350,34 +1371,34 @@ function Xi({
1350
1371
  });
1351
1372
  }
1352
1373
  function Ki({
1353
- submissionId: e,
1374
+ submissionId: t,
1354
1375
  executeQuery: n,
1355
- enabled: o = !0
1376
+ enabled: i = !0
1356
1377
  }) {
1357
1378
  return Ve({
1358
- queryKey: ["assignment-review", "submissions", e],
1379
+ queryKey: ["assignment-review", "submissions", t],
1359
1380
  queryFn: async () => {
1360
- const a = await n(zi, { submissionId: e });
1361
- return qi.parse(a).node.submissionHistoriesConnection.nodes.slice().sort(
1381
+ const s = await n(zi, { submissionId: t });
1382
+ return qi.parse(s).node.submissionHistoriesConnection.nodes.slice().sort(
1362
1383
  (c, d) => new Date(d.submittedAt).getTime() - new Date(c.submittedAt).getTime()
1363
1384
  );
1364
1385
  },
1365
- enabled: o
1386
+ enabled: i
1366
1387
  });
1367
1388
  }
1368
- function Zi(e) {
1369
- if (!e) return "";
1370
- const n = new Date(e);
1389
+ function Zi(t) {
1390
+ if (!t) return "";
1391
+ const n = new Date(t);
1371
1392
  return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString();
1372
1393
  }
1373
1394
  function Qi({
1374
- submission: e,
1395
+ submission: t,
1375
1396
  isSelected: n,
1376
- isDraft: o = !1,
1377
- pointsPossible: a,
1397
+ isDraft: i = !1,
1398
+ pointsPossible: s,
1378
1399
  onClick: l
1379
1400
  }) {
1380
- const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }), f = e.score != null && a != null ? `${e.score}/${a}` : null;
1401
+ const c = q(), d = i ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: t.attempt }), p = t.score != null && s != null ? `${t.score}/${s}` : null;
1381
1402
  return /* @__PURE__ */ r(
1382
1403
  K,
1383
1404
  {
@@ -1398,47 +1419,47 @@ function Qi({
1398
1419
  /* @__PURE__ */ S(b, { direction: "column", gap: "xx-small", children: [
1399
1420
  /* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
1400
1421
  /* @__PURE__ */ r(_, { weight: "bold", children: d }),
1401
- o && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
1422
+ i && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
1402
1423
  ] }),
1403
- !o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Zi(e.submittedAt) })
1424
+ !i && t.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Zi(t.submittedAt) })
1404
1425
  ] }),
1405
- f && /* @__PURE__ */ r(_, { weight: "bold", children: f })
1426
+ p && /* @__PURE__ */ r(_, { weight: "bold", children: p })
1406
1427
  ] })
1407
1428
  }
1408
1429
  );
1409
1430
  }
1410
1431
  function Ji({
1411
- submissionId: e,
1432
+ submissionId: t,
1412
1433
  selectedAttempt: n,
1413
- onAttemptSelect: o,
1414
- pointsPossible: a,
1434
+ onAttemptSelect: i,
1435
+ pointsPossible: s,
1415
1436
  executeQuery: l
1416
1437
  }) {
1417
- const c = q(), { data: d, isLoading: f, isError: m } = Ki({
1418
- submissionId: e,
1438
+ const c = q(), { data: d, isLoading: p, isError: m } = Ki({
1439
+ submissionId: t,
1419
1440
  executeQuery: l
1420
1441
  });
1421
- if (f)
1442
+ if (p)
1422
1443
  return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: c.navigationAttempts(), size: "small" }) });
1423
1444
  if (m)
1424
1445
  return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: c.submissionLoadAttemptsError() }) });
1425
- const p = (d == null ? void 0 : d.filter((h) => h.attempt > 0)) ?? [];
1426
- return p.length === 0 ? /* @__PURE__ */ r(b, { padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", padding: "none none medium none", children: p.map((h) => /* @__PURE__ */ r(
1446
+ const f = (d == null ? void 0 : d.filter((h) => h.attempt > 0)) ?? [];
1447
+ return f.length === 0 ? /* @__PURE__ */ r(b, { padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", padding: "none none medium none", children: f.map((h) => /* @__PURE__ */ r(
1427
1448
  Qi,
1428
1449
  {
1429
1450
  submission: h,
1430
1451
  isSelected: n === h.attempt,
1431
- pointsPossible: a,
1432
- onClick: () => o(h)
1452
+ pointsPossible: s,
1453
+ onClick: () => i(h)
1433
1454
  },
1434
1455
  h.attempt
1435
1456
  )) });
1436
1457
  }
1437
1458
  function wn({
1438
- attachments: e,
1459
+ attachments: t,
1439
1460
  size: n = "medium"
1440
1461
  }) {
1441
- return e.length === 0 ? null : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: e.map((o) => /* @__PURE__ */ r(
1462
+ return t.length === 0 ? null : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: t.map((i) => /* @__PURE__ */ r(
1442
1463
  K,
1443
1464
  {
1444
1465
  as: "div",
@@ -1447,82 +1468,82 @@ function wn({
1447
1468
  borderWidth: "small",
1448
1469
  borderRadius: "medium",
1449
1470
  children: /* @__PURE__ */ S(b, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
1450
- /* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(hn, { children: o.displayName }) }),
1451
- /* @__PURE__ */ r(Zn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r(Hn, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${o.displayName}` }) })
1471
+ /* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(hn, { children: i.displayName }) }),
1472
+ /* @__PURE__ */ r(Zn, { href: i.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r(Hn, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${i.displayName}` }) })
1452
1473
  ] })
1453
1474
  },
1454
- o.id
1475
+ i.id
1455
1476
  )) });
1456
1477
  }
1457
- function eo(e) {
1458
- return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1478
+ function eo(t) {
1479
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(t) } });
1459
1480
  }
1460
1481
  function to({
1461
- submission: e,
1482
+ submission: t,
1462
1483
  isLastAttempt: n = !0,
1463
- showAttemptLabel: o = !0,
1464
- renderHTML: a
1484
+ showAttemptLabel: i = !0,
1485
+ renderHTML: s
1465
1486
  }) {
1466
- const l = q(), c = a ?? eo, d = (e == null ? void 0 : e.submissionType) === "online_text_entry", f = (e == null ? void 0 : e.submissionType) === "online_upload", m = d ? l.submissionTextHeading() : l.submissionUploadHeading(), p = qe(() => {
1467
- if (!e) return [];
1487
+ const l = q(), c = s ?? eo, d = (t == null ? void 0 : t.submissionType) === "online_text_entry", p = (t == null ? void 0 : t.submissionType) === "online_upload", m = d ? l.submissionTextHeading() : l.submissionUploadHeading(), f = qe(() => {
1488
+ if (!t) return [];
1468
1489
  const C = [];
1469
- if (e.attachment && C.push(e.attachment), e.attachments)
1470
- for (const I of e.attachments)
1490
+ if (t.attachment && C.push(t.attachment), t.attachments)
1491
+ for (const I of t.attachments)
1471
1492
  C.some((w) => w.id === I.id) || C.push(I);
1472
1493
  return C;
1473
- }, [e]), h = qe(() => c((e == null ? void 0 : e.body) ?? ""), [e == null ? void 0 : e.body, c]);
1474
- return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(b, { direction: "column", gap: "small", children: [
1475
- o && !n && e.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: e.attempt }) }),
1494
+ }, [t]), h = qe(() => c((t == null ? void 0 : t.body) ?? ""), [t == null ? void 0 : t.body, c]);
1495
+ return t ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(b, { direction: "column", gap: "small", children: [
1496
+ i && !n && t.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: t.attempt }) }),
1476
1497
  /* @__PURE__ */ S(b, { gap: "x-small", alignItems: "center", children: [
1477
1498
  /* @__PURE__ */ r($n, { color: "success" }),
1478
1499
  /* @__PURE__ */ r(St, { level: "h3", children: m })
1479
1500
  ] }),
1480
- d && e.body && /* @__PURE__ */ S(b, { alignItems: "stretch", gap: "small", children: [
1501
+ d && t.body && /* @__PURE__ */ S(b, { alignItems: "stretch", gap: "small", children: [
1481
1502
  /* @__PURE__ */ r(K, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
1482
1503
  /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children: h }) })
1483
1504
  ] }),
1484
- f && p.length > 0 && /* @__PURE__ */ r(wn, { attachments: p })
1505
+ p && f.length > 0 && /* @__PURE__ */ r(wn, { attachments: f })
1485
1506
  ] }) }) : null;
1486
1507
  }
1487
- function no(e) {
1488
- const n = new Date(e);
1508
+ function no(t) {
1509
+ const n = new Date(t);
1489
1510
  return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
1490
1511
  }
1491
1512
  function io() {
1492
1513
  return /* @__PURE__ */ r(_, { color: "secondary", size: "small", children: "|" });
1493
1514
  }
1494
1515
  function oo({
1495
- score: e,
1516
+ score: t,
1496
1517
  pointsPossible: n,
1497
- gradingType: o,
1498
- dueAt: a,
1518
+ gradingType: i,
1519
+ dueAt: s,
1499
1520
  allowedAttempts: l,
1500
1521
  currentAttempt: c,
1501
1522
  isOverdue: d,
1502
- estimatedDuration: f,
1523
+ estimatedDuration: p,
1503
1524
  labels: m
1504
1525
  }) {
1505
- const p = q(), h = [];
1506
- return f && h.push(
1507
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.duration) ?? p.headerDuration({ minutes: f }) }, "duration")
1508
- ), e != null && n != null ? h.push(
1509
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.score) ?? p.headerScore({ score: e, total: n }) }, "score")
1510
- ) : n != null && o !== "not_graded" && h.push(
1511
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.pointsPossible) ?? p.headerPointsPossible({ points: n }) }, "points")
1526
+ const f = q(), h = [];
1527
+ return p && h.push(
1528
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.duration) ?? f.headerDuration({ minutes: p }) }, "duration")
1529
+ ), t != null && n != null ? h.push(
1530
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.score) ?? f.headerScore({ score: t, total: n }) }, "score")
1531
+ ) : n != null && i !== "not_graded" && h.push(
1532
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.pointsPossible) ?? f.headerPointsPossible({ points: n }) }, "points")
1512
1533
  ), l != null && (l === -1 ? h.push(
1513
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsUnlimited() }, "attempts")
1534
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? f.headerAttemptsUnlimited() }, "attempts")
1514
1535
  ) : c != null ? h.push(
1515
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptOf({ current: c, total: l }) }, "attempts")
1536
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? f.headerAttemptOf({ current: c, total: l }) }, "attempts")
1516
1537
  ) : h.push(
1517
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsAllowed({ count: l }) }, "attempts")
1518
- )), a && h.push(
1519
- /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.dueDate) ?? p.headerDueDate({ date: no(a) }) }, "due")
1538
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? f.headerAttemptsAllowed({ count: l }) }, "attempts")
1539
+ )), s && h.push(
1540
+ /* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.dueDate) ?? f.headerDueDate({ date: no(s) }) }, "due")
1520
1541
  ), /* @__PURE__ */ S(b, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
1521
1542
  h.map((C, I) => /* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
1522
1543
  I > 0 && /* @__PURE__ */ r(io, {}),
1523
1544
  C
1524
1545
  ] }, `item-${String(I)}`)),
1525
- d && /* @__PURE__ */ r(_t, { color: "danger", children: (m == null ? void 0 : m.overdue) ?? p.headerOverdue() })
1546
+ d && /* @__PURE__ */ r(_t, { color: "danger", children: (m == null ? void 0 : m.overdue) ?? f.headerOverdue() })
1526
1547
  ] });
1527
1548
  }
1528
1549
  const ro = ae`
@@ -1698,31 +1719,31 @@ const ro = ae`
1698
1719
  }
1699
1720
  `;
1700
1721
  function ao({
1701
- executeQuery: e
1722
+ executeQuery: t
1702
1723
  }) {
1703
1724
  const n = un();
1704
1725
  return dn({
1705
- mutationFn: async ({ submissionId: o, attempt: a, comment: l, fileIds: c }) => {
1706
- const d = await e(ro, {
1707
- id: o,
1708
- submissionAttempt: a,
1726
+ mutationFn: async ({ submissionId: i, attempt: s, comment: l, fileIds: c }) => {
1727
+ const d = await t(ro, {
1728
+ id: i,
1729
+ submissionAttempt: s,
1709
1730
  comment: l,
1710
1731
  fileIds: c
1711
1732
  });
1712
1733
  return Yi.parse(d), d;
1713
1734
  },
1714
- onSuccess: (o, a) => {
1735
+ onSuccess: (i, s) => {
1715
1736
  n.invalidateQueries({
1716
- queryKey: ["assignment-review", "submission-comments", a.submissionId]
1737
+ queryKey: ["assignment-review", "submission-comments", s.submissionId]
1717
1738
  });
1718
1739
  }
1719
1740
  });
1720
1741
  }
1721
1742
  function lo({
1722
- submissionId: e,
1743
+ submissionId: t,
1723
1744
  courseId: n,
1724
- pageParams: o,
1725
- direction: a,
1745
+ pageParams: i,
1746
+ direction: s,
1726
1747
  executeQuery: l,
1727
1748
  enabled: c
1728
1749
  }) {
@@ -1730,65 +1751,65 @@ function lo({
1730
1751
  queryKey: [
1731
1752
  "assignment-review",
1732
1753
  "submission-comments",
1733
- e,
1754
+ t,
1734
1755
  n,
1735
- o == null ? void 0 : o.startCursor,
1736
- o == null ? void 0 : o.endCursor,
1737
- a
1756
+ i == null ? void 0 : i.startCursor,
1757
+ i == null ? void 0 : i.endCursor,
1758
+ s
1738
1759
  ],
1739
1760
  queryFn: async () => {
1740
1761
  const d = await l(Ui, {
1741
- submissionId: e,
1762
+ submissionId: t,
1742
1763
  courseId: n,
1743
- beforeCursor: a === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
1744
- afterCursor: a === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
1745
- first: a === "next" ? 5 : null,
1746
- last: a === "prev" || !a ? 5 : null
1747
- }), f = Gi.parse(d);
1764
+ beforeCursor: s === "prev" ? (i == null ? void 0 : i.startCursor) ?? null : null,
1765
+ afterCursor: s === "next" ? (i == null ? void 0 : i.endCursor) ?? null : null,
1766
+ first: s === "next" ? 5 : null,
1767
+ last: s === "prev" || !s ? 5 : null
1768
+ }), p = Gi.parse(d);
1748
1769
  return {
1749
- comments: [...f.submissionComments.commentsConnection.nodes].sort(
1750
- (p, h) => new Date(p.createdAt).getTime() - new Date(h.createdAt).getTime()
1770
+ comments: [...p.submissionComments.commentsConnection.nodes].sort(
1771
+ (f, h) => new Date(f.createdAt).getTime() - new Date(h.createdAt).getTime()
1751
1772
  ),
1752
- pageInfo: f.submissionComments.commentsConnection.pageInfo
1773
+ pageInfo: p.submissionComments.commentsConnection.pageInfo
1753
1774
  };
1754
1775
  },
1755
- enabled: c ?? !!e
1776
+ enabled: c ?? !!t
1756
1777
  });
1757
1778
  }
1758
1779
  function co({
1759
- executeQuery: e
1780
+ executeQuery: t
1760
1781
  }) {
1761
1782
  const n = un();
1762
1783
  return dn({
1763
- mutationFn: async ({ submissionId: o, submissionCommentIds: a }) => {
1764
- const l = await e(
1784
+ mutationFn: async ({ submissionId: i, submissionCommentIds: s }) => {
1785
+ const l = await t(
1765
1786
  so,
1766
- { submissionId: o, submissionCommentIds: a }
1787
+ { submissionId: i, submissionCommentIds: s }
1767
1788
  );
1768
1789
  return Vi.parse(l), l;
1769
1790
  },
1770
- onSuccess: (o, a) => {
1791
+ onSuccess: (i, s) => {
1771
1792
  n.invalidateQueries({
1772
1793
  queryKey: ["assignment-review", "assignment"],
1773
- predicate: (l) => l.queryKey.includes(a.assignmentId)
1794
+ predicate: (l) => l.queryKey.includes(s.assignmentId)
1774
1795
  });
1775
1796
  }
1776
1797
  });
1777
1798
  }
1778
- function mo(e) {
1779
- return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1799
+ function mo(t) {
1800
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(t) } });
1780
1801
  }
1781
- function uo(e) {
1782
- const n = new Date(e);
1802
+ function uo(t) {
1803
+ const n = new Date(t);
1783
1804
  return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
1784
1805
  }
1785
1806
  function fo({
1786
- comment: e,
1807
+ comment: t,
1787
1808
  isFullWidth: n,
1788
- renderHTML: o
1809
+ renderHTML: i
1789
1810
  }) {
1790
1811
  var m;
1791
- const a = q(), l = o ?? mo, c = ((m = e.author.courseRoles) == null ? void 0 : m.includes("StudentEnrollment")) ?? !1, d = qe(() => l(e.htmlComment), [e.htmlComment, l]);
1812
+ const s = q(), l = i ?? mo, c = ((m = t.author.courseRoles) == null ? void 0 : m.includes("StudentEnrollment")) ?? !1, d = qe(() => l(t.htmlComment), [t.htmlComment, l]);
1792
1813
  return /* @__PURE__ */ r(
1793
1814
  K,
1794
1815
  {
@@ -1801,19 +1822,19 @@ function fo({
1801
1822
  children: /* @__PURE__ */ S(b, { as: "div", direction: "column", gap: "small", children: [
1802
1823
  /* @__PURE__ */ S(b, { as: "div", direction: "column", gap: "xx-small", children: [
1803
1824
  /* @__PURE__ */ S(b, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
1804
- /* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(hn, { children: e.author.shortName }) }) }),
1805
- !e.read && /* @__PURE__ */ r(Tn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: a.commentsUnreadSingle() }) })
1825
+ /* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(hn, { children: t.author.shortName }) }) }),
1826
+ !t.read && /* @__PURE__ */ r(Tn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: s.commentsUnreadSingle() }) })
1806
1827
  ] }),
1807
- /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: uo(e.createdAt) }),
1808
- e.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: a.commentsAttempt({ number: e.attempt }) })
1828
+ /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: uo(t.createdAt) }),
1829
+ t.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: s.commentsAttempt({ number: t.attempt }) })
1809
1830
  ] }),
1810
1831
  /* @__PURE__ */ r(_, { size: "medium", children: d }),
1811
- e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r(
1832
+ t.attachments && t.attachments.length > 0 && /* @__PURE__ */ r(
1812
1833
  wn,
1813
1834
  {
1814
- attachments: e.attachments.map((p) => ({
1815
- ...p,
1816
- _id: p._id ?? p.id,
1835
+ attachments: t.attachments.map((f) => ({
1836
+ ...f,
1837
+ _id: f._id ?? f.id,
1817
1838
  submissionPreviewUrl: null
1818
1839
  })),
1819
1840
  size: "small"
@@ -1824,42 +1845,42 @@ function fo({
1824
1845
  );
1825
1846
  }
1826
1847
  function po({
1827
- submissionId: e,
1848
+ submissionId: t,
1828
1849
  courseId: n,
1829
- assignmentId: o,
1830
- attempt: a,
1850
+ assignmentId: i,
1851
+ attempt: s,
1831
1852
  canPostComment: l,
1832
1853
  onCommentPosted: c,
1833
1854
  renderHTML: d,
1834
- executeQuery: f
1855
+ executeQuery: p
1835
1856
  }) {
1836
- const m = q(), [p, h] = Ee(""), [C, I] = Ee({}), w = zn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = lo({
1837
- submissionId: e,
1857
+ const m = q(), [f, h] = Ee(""), [C, I] = Ee({}), w = zn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = lo({
1858
+ submissionId: t,
1838
1859
  courseId: n,
1839
1860
  pageParams: C.pageParams,
1840
1861
  direction: C.direction,
1841
- executeQuery: f
1842
- }), le = ao({ executeQuery: f }), k = co({ executeQuery: f });
1862
+ executeQuery: p
1863
+ }), le = ao({ executeQuery: p }), M = co({ executeQuery: p });
1843
1864
  Tt(() => {
1844
1865
  if (!(y != null && y.comments) || y.comments.length === 0) return;
1845
1866
  const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
1846
- var J;
1847
- return !((J = N.author.courseRoles) != null && J.includes("StudentEnrollment"));
1867
+ var ee;
1868
+ return !((ee = N.author.courseRoles) != null && ee.includes("StudentEnrollment"));
1848
1869
  }).map((N) => N._id);
1849
1870
  if (E.length > 0) {
1850
1871
  for (const N of E)
1851
1872
  w.current.add(N);
1852
- k.mutate({ submissionId: e, assignmentId: o, submissionCommentIds: E });
1873
+ M.mutate({ submissionId: t, assignmentId: i, submissionCommentIds: E });
1853
1874
  }
1854
- }, [y == null ? void 0 : y.comments, e, o, k]);
1855
- const ne = y == null ? void 0 : y.comments.some(
1875
+ }, [y == null ? void 0 : y.comments, t, i, M]);
1876
+ const ie = y == null ? void 0 : y.comments.some(
1856
1877
  (E) => {
1857
1878
  var N;
1858
1879
  return !((N = E.author.courseRoles) != null && N.includes("StudentEnrollment"));
1859
1880
  }
1860
1881
  ), O = () => {
1861
- p.trim() && le.mutate(
1862
- { submissionId: e, attempt: a, comment: p },
1882
+ f.trim() && le.mutate(
1883
+ { submissionId: t, attempt: s, comment: f },
1863
1884
  {
1864
1885
  onSuccess: () => {
1865
1886
  h(""), c == null || c();
@@ -1873,7 +1894,7 @@ function po({
1873
1894
  fo,
1874
1895
  {
1875
1896
  comment: E,
1876
- isFullWidth: !ne,
1897
+ isFullWidth: !ie,
1877
1898
  renderHTML: d
1878
1899
  },
1879
1900
  E._id
@@ -1907,7 +1928,7 @@ function po({
1907
1928
  {
1908
1929
  resize: "vertical",
1909
1930
  label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: m.commentsPlaceholder() }),
1910
- value: p,
1931
+ value: f,
1911
1932
  onChange: (E) => h(E.target.value)
1912
1933
  }
1913
1934
  ),
@@ -1916,73 +1937,73 @@ function po({
1916
1937
  {
1917
1938
  color: "primary",
1918
1939
  onClick: O,
1919
- interaction: p.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
1940
+ interaction: f.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
1920
1941
  children: m.commentsPost()
1921
1942
  }
1922
1943
  )
1923
1944
  ] })
1924
1945
  ] });
1925
1946
  }
1926
- function go(e) {
1927
- return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1947
+ function go(t) {
1948
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(t) } });
1928
1949
  }
1929
1950
  function Wo({
1930
- courseId: e,
1951
+ courseId: t,
1931
1952
  assignmentId: n,
1932
- userId: o,
1933
- feedbackMode: a = !1,
1953
+ userId: i,
1954
+ feedbackMode: s = !1,
1934
1955
  onError: l,
1935
1956
  renderHTML: c,
1936
1957
  renderPanels: d,
1937
- executeQuery: f
1958
+ executeQuery: p
1938
1959
  }) {
1939
- const m = q(), p = c ?? go, {
1960
+ const m = q(), f = c ?? go, {
1940
1961
  data: h,
1941
1962
  isLoading: C,
1942
1963
  isError: I,
1943
1964
  error: w
1944
- } = Xi({ courseId: e, assignmentId: n, userId: o, executeQuery: f }), [y, V] = Ee(null), [fe, le] = Ee(
1945
- a ? "comments" : null
1946
- ), k = qe(
1965
+ } = Xi({ courseId: t, assignmentId: n, userId: i, executeQuery: p }), [y, V] = Ee(null), [fe, le] = Ee(
1966
+ s ? "comments" : null
1967
+ ), M = qe(
1947
1968
  () => (h == null ? void 0 : h.submissionsConnection.nodes[0]) ?? null,
1948
1969
  [h]
1949
- ), ne = k != null && k.attempt > 0, O = y ?? k, ce = y == null || y.attempt === (k == null ? void 0 : k.attempt), E = ne && ce, N = ((h == null ? void 0 : h.allowedAttempts) ?? 0) !== 1, J = jn((Ze) => {
1970
+ ), ie = M != null && M.attempt > 0, O = y ?? M, ce = y == null || y.attempt === (M == null ? void 0 : M.attempt), E = ie && ce, N = ((h == null ? void 0 : h.allowedAttempts) ?? 0) !== 1, ee = jn((Ze) => {
1950
1971
  V(Ze);
1951
1972
  }, []);
1952
1973
  if (Tt(() => {
1953
1974
  I && w && l && l(w);
1954
1975
  }, [I, w, l]), Tt(() => {
1955
- a && ne && le("comments");
1956
- }, [a, ne]), C)
1976
+ s && ie && le("comments");
1977
+ }, [s, ie]), C)
1957
1978
  return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: m.progressLoading() }) });
1958
1979
  if (I || !h)
1959
1980
  return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: m.assignmentLoadError() }) });
1960
- const Ie = !!h.dueAt && new Date(h.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = k ? /* @__PURE__ */ r(
1981
+ const Ie = !!h.dueAt && new Date(h.dueAt) < /* @__PURE__ */ new Date() && !ie, xe = M ? /* @__PURE__ */ r(
1961
1982
  po,
1962
1983
  {
1963
- submissionId: k.id,
1964
- courseId: e,
1984
+ submissionId: M.id,
1985
+ courseId: t,
1965
1986
  assignmentId: n,
1966
1987
  attempt: (O == null ? void 0 : O.attempt) ?? 0,
1967
1988
  canPostComment: E,
1968
- renderHTML: p,
1969
- executeQuery: f
1989
+ renderHTML: f,
1990
+ executeQuery: p
1970
1991
  }
1971
- ) : null, Xe = N && k ? /* @__PURE__ */ r(
1992
+ ) : null, Xe = N && M ? /* @__PURE__ */ r(
1972
1993
  Ji,
1973
1994
  {
1974
- submissionId: k.id,
1995
+ submissionId: M.id,
1975
1996
  selectedAttempt: O == null ? void 0 : O.attempt,
1976
- onAttemptSelect: J,
1997
+ onAttemptSelect: ee,
1977
1998
  pointsPossible: h.pointsPossible,
1978
- executeQuery: f
1999
+ executeQuery: p
1979
2000
  }
1980
2001
  ) : null, Ke = {
1981
2002
  commentsPanel: xe,
1982
2003
  attemptsPanel: Xe,
1983
2004
  activePanel: fe,
1984
2005
  setActivePanel: le,
1985
- unreadCommentCount: (k == null ? void 0 : k.unreadCommentCount) ?? 0,
2006
+ unreadCommentCount: (M == null ? void 0 : M.unreadCommentCount) ?? 0,
1986
2007
  hasMultipleAttempts: N
1987
2008
  };
1988
2009
  return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
@@ -2000,35 +2021,35 @@ function Wo({
2000
2021
  ),
2001
2022
  h.description && /* @__PURE__ */ S(K, { as: "div", children: [
2002
2023
  /* @__PURE__ */ r(St, { level: "h3", children: m.assignmentInstructions() }),
2003
- /* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: p(h.description) })
2024
+ /* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: f(h.description) })
2004
2025
  ] }),
2005
2026
  /* @__PURE__ */ r(
2006
2027
  to,
2007
2028
  {
2008
2029
  submission: O,
2009
2030
  isLastAttempt: ce,
2010
- renderHTML: p
2031
+ renderHTML: f
2011
2032
  }
2012
2033
  ),
2013
2034
  d ? d(Ke) : null
2014
2035
  ] });
2015
2036
  }
2016
2037
  function qo({
2017
- existingFiles: e,
2038
+ existingFiles: t,
2018
2039
  onSubmit: n,
2019
- onSaveDraft: o,
2020
- onDiscardDraft: a,
2040
+ onSaveDraft: i,
2041
+ onDiscardDraft: s,
2021
2042
  onSelectFiles: l,
2022
2043
  isSubmitting: c = !1
2023
2044
  }) {
2024
- const d = q(), [f, m] = Ee(e ?? []), p = async () => {
2045
+ const d = q(), [p, m] = Ee(t ?? []), f = async () => {
2025
2046
  const w = await l();
2026
2047
  m((y) => [...y, ...w]);
2027
2048
  }, h = (w) => {
2028
2049
  m((y) => y.filter((V) => V.id !== w));
2029
- }, C = f.map((w) => w.id), I = f.length > 0 && !c;
2050
+ }, C = p.map((w) => w.id), I = p.length > 0 && !c;
2030
2051
  return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
2031
- f.length > 0 && /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: f.map((w) => /* @__PURE__ */ r(
2052
+ p.length > 0 && /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: p.map((w) => /* @__PURE__ */ r(
2032
2053
  K,
2033
2054
  {
2034
2055
  as: "div",
@@ -2054,7 +2075,7 @@ function qo({
2054
2075
  },
2055
2076
  w.id
2056
2077
  )) }),
2057
- /* @__PURE__ */ r($, { onClick: p, children: d.submissionFormAddFiles() }),
2078
+ /* @__PURE__ */ r($, { onClick: f, children: d.submissionFormAddFiles() }),
2058
2079
  /* @__PURE__ */ S(b, { gap: "small", children: [
2059
2080
  /* @__PURE__ */ r(
2060
2081
  $,
@@ -2065,36 +2086,36 @@ function qo({
2065
2086
  children: d.submissionFormSubmit()
2066
2087
  }
2067
2088
  ),
2068
- o && /* @__PURE__ */ r(
2089
+ i && /* @__PURE__ */ r(
2069
2090
  $,
2070
2091
  {
2071
- onClick: () => o(C),
2072
- interaction: f.length > 0 ? "enabled" : "disabled",
2092
+ onClick: () => i(C),
2093
+ interaction: p.length > 0 ? "enabled" : "disabled",
2073
2094
  children: d.submissionFormSaveDraft()
2074
2095
  }
2075
2096
  ),
2076
- a && e && e.length > 0 && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: d.submissionFormDiscardDraft() })
2097
+ s && t && t.length > 0 && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: s, children: d.submissionFormDiscardDraft() })
2077
2098
  ] })
2078
2099
  ] });
2079
2100
  }
2080
2101
  function Yo({
2081
- prevItem: e,
2102
+ prevItem: t,
2082
2103
  nextItem: n,
2083
- onNavigatePrev: o,
2084
- onNavigateNext: a,
2104
+ onNavigatePrev: i,
2105
+ onNavigateNext: s,
2085
2106
  labels: l
2086
2107
  }) {
2087
2108
  const c = q();
2088
- if (!e && !n)
2109
+ if (!t && !n)
2089
2110
  return null;
2090
- const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), f = (l == null ? void 0 : l.next) ?? c.navigationNext();
2111
+ const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), p = (l == null ? void 0 : l.next) ?? c.navigationNext();
2091
2112
  return /* @__PURE__ */ S(b, { justifyItems: "space-between", padding: "small none", children: [
2092
- e ? /* @__PURE__ */ r(
2113
+ t ? /* @__PURE__ */ r(
2093
2114
  $,
2094
2115
  {
2095
2116
  renderIcon: () => /* @__PURE__ */ r(fn, {}),
2096
- onClick: o,
2097
- "aria-label": `${d}: ${e.title}`,
2117
+ onClick: i,
2118
+ "aria-label": `${d}: ${t.title}`,
2098
2119
  children: d
2099
2120
  }
2100
2121
  ) : /* @__PURE__ */ r("div", {}),
@@ -2102,15 +2123,15 @@ function Yo({
2102
2123
  $,
2103
2124
  {
2104
2125
  renderIcon: () => /* @__PURE__ */ r(pn, {}),
2105
- onClick: a,
2106
- "aria-label": `${f}: ${n.title}`,
2107
- children: f
2126
+ onClick: s,
2127
+ "aria-label": `${p}: ${n.title}`,
2128
+ children: p
2108
2129
  }
2109
2130
  ) : /* @__PURE__ */ r("div", {})
2110
2131
  ] });
2111
2132
  }
2112
- function ho(e) {
2113
- switch (e) {
2133
+ function ho(t) {
2134
+ switch (t) {
2114
2135
  case "Assignment":
2115
2136
  return /* @__PURE__ */ r(Kn, {});
2116
2137
  case "Quiz":
@@ -2127,13 +2148,13 @@ function ho(e) {
2127
2148
  }
2128
2149
  }
2129
2150
  function bo({
2130
- item: e,
2151
+ item: t,
2131
2152
  isSelected: n,
2132
- isLoadingItem: o,
2133
- onClick: a
2153
+ isLoadingItem: i,
2154
+ onClick: s
2134
2155
  }) {
2135
- var m, p, h, C, I;
2136
- const l = q(), c = ((m = e.content_details) == null ? void 0 : m.locked_for_user) ?? !1, d = (p = e.content_details) == null ? void 0 : p.lock_explanation, f = /* @__PURE__ */ r(
2156
+ var m, f, h, C, I;
2157
+ const l = q(), c = ((m = t.content_details) == null ? void 0 : m.locked_for_user) ?? !1, d = (f = t.content_details) == null ? void 0 : f.lock_explanation, p = /* @__PURE__ */ r(
2137
2158
  K,
2138
2159
  {
2139
2160
  as: "div",
@@ -2141,60 +2162,60 @@ function bo({
2141
2162
  background: n ? "secondary" : "primary",
2142
2163
  borderRadius: "small",
2143
2164
  cursor: c ? "not-allowed" : "pointer",
2144
- onClick: c ? void 0 : a,
2165
+ onClick: c ? void 0 : s,
2145
2166
  role: c ? void 0 : "button",
2146
2167
  tabIndex: c ? void 0 : 0,
2147
2168
  onKeyDown: c ? void 0 : (w) => {
2148
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), a());
2169
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), s());
2149
2170
  },
2150
2171
  children: /* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
2151
- /* @__PURE__ */ r(b.Item, { children: c ? /* @__PURE__ */ r(gn, {}) : ho(e.type) }),
2172
+ /* @__PURE__ */ r(b.Item, { children: c ? /* @__PURE__ */ r(gn, {}) : ho(t.type) }),
2152
2173
  /* @__PURE__ */ r(b.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ S(b, { direction: "column", gap: "xx-small", children: [
2153
- /* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: e.title }),
2154
- ((h = e.content_details) == null ? void 0 : h.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
2155
- date: new Date(e.content_details.due_at).toLocaleDateString()
2174
+ /* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: t.title }),
2175
+ ((h = t.content_details) == null ? void 0 : h.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
2176
+ date: new Date(t.content_details.due_at).toLocaleDateString()
2156
2177
  }) }),
2157
- ((C = e.content_details) == null ? void 0 : C.points_possible) != null && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressPoints({ points: e.content_details.points_possible }) })
2178
+ ((C = t.content_details) == null ? void 0 : C.points_possible) != null && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressPoints({ points: t.content_details.points_possible }) })
2158
2179
  ] }) }),
2159
- o && /* @__PURE__ */ r(Ye, { size: "x-small", renderTitle: l.progressLoading() }),
2160
- ((I = e.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ r(_, { color: "success", size: "small", children: "✓" })
2180
+ i && /* @__PURE__ */ r(Ye, { size: "x-small", renderTitle: l.progressLoading() }),
2181
+ ((I = t.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ r(_, { color: "success", size: "small", children: "✓" })
2161
2182
  ] })
2162
2183
  }
2163
2184
  );
2164
- return c && d ? /* @__PURE__ */ r(Jn, { renderTip: d, placement: "end", children: f }) : f;
2185
+ return c && d ? /* @__PURE__ */ r(Jn, { renderTip: d, placement: "end", children: p }) : p;
2165
2186
  }
2166
2187
  function Vo({
2167
- module: e,
2188
+ module: t,
2168
2189
  currentItemId: n,
2169
- onItemClick: o,
2170
- onClose: a,
2190
+ onItemClick: i,
2191
+ onClose: s,
2171
2192
  onNavigateModule: l,
2172
2193
  hasPrevModule: c = !1,
2173
2194
  hasNextModule: d = !1,
2174
- isLoading: f = !1,
2195
+ isLoading: p = !1,
2175
2196
  title: m
2176
2197
  }) {
2177
2198
  var C;
2178
- const p = q(), h = m ?? p.navigationMyProgress();
2199
+ const f = q(), h = m ?? f.navigationMyProgress();
2179
2200
  return /* @__PURE__ */ S(b, { direction: "column", height: "100%", children: [
2180
2201
  /* @__PURE__ */ S(b, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
2181
2202
  /* @__PURE__ */ r(St, { level: "h3", children: h }),
2182
- /* @__PURE__ */ r(Qn, { screenReaderLabel: p.navigationClosePanel(), onClick: a, size: "small", children: /* @__PURE__ */ r(qn, {}) })
2203
+ /* @__PURE__ */ r(Qn, { screenReaderLabel: f.navigationClosePanel(), onClick: s, size: "small", children: /* @__PURE__ */ r(qn, {}) })
2183
2204
  ] }),
2184
2205
  /* @__PURE__ */ S(K, { as: "div", padding: "none small", overflowY: "auto", children: [
2185
- e.state === "locked" && /* @__PURE__ */ r(b, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
2206
+ t.state === "locked" && /* @__PURE__ */ r(b, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
2186
2207
  /* @__PURE__ */ r(gn, {}),
2187
2208
  " ",
2188
- p.progressLocked()
2209
+ f.progressLocked()
2189
2210
  ] }) }),
2190
- /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: e.name }),
2191
- /* @__PURE__ */ r(b, { direction: "column", gap: "xx-small", padding: "small none", children: (C = e.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
2211
+ /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: t.name }),
2212
+ /* @__PURE__ */ r(b, { direction: "column", gap: "xx-small", padding: "small none", children: (C = t.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
2192
2213
  bo,
2193
2214
  {
2194
2215
  item: I,
2195
2216
  isSelected: I.id === n,
2196
- isLoadingItem: f && I.id === n,
2197
- onClick: () => o(I)
2217
+ isLoadingItem: p && I.id === n,
2218
+ onClick: () => i(I)
2198
2219
  },
2199
2220
  I.id
2200
2221
  )) })
@@ -2207,8 +2228,8 @@ function Vo({
2207
2228
  size: "small",
2208
2229
  interaction: c ? "enabled" : "disabled",
2209
2230
  onClick: () => l("prev"),
2210
- "aria-label": p.navigationPreviousModule(),
2211
- children: p.navigationPrevious()
2231
+ "aria-label": f.navigationPreviousModule(),
2232
+ children: f.navigationPrevious()
2212
2233
  }
2213
2234
  ),
2214
2235
  /* @__PURE__ */ r(
@@ -2218,28 +2239,28 @@ function Vo({
2218
2239
  size: "small",
2219
2240
  interaction: d ? "enabled" : "disabled",
2220
2241
  onClick: () => l("next"),
2221
- "aria-label": p.navigationNextModule(),
2222
- children: p.navigationNext()
2242
+ "aria-label": f.navigationNextModule(),
2243
+ children: f.navigationNext()
2223
2244
  }
2224
2245
  )
2225
2246
  ] })
2226
2247
  ] });
2227
2248
  }
2228
2249
  function Xo({
2229
- existingDraft: e,
2250
+ existingDraft: t,
2230
2251
  onSubmit: n,
2231
- onSaveDraft: o,
2232
- onDiscardDraft: a,
2252
+ onSaveDraft: i,
2253
+ onDiscardDraft: s,
2233
2254
  isSubmitting: l = !1
2234
2255
  }) {
2235
- const c = q(), [d, f] = Ee(e ?? ""), m = d.trim().length > 0 && !l;
2256
+ const c = q(), [d, p] = Ee(t ?? ""), m = d.trim().length > 0 && !l;
2236
2257
  return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
2237
2258
  /* @__PURE__ */ r(
2238
2259
  bn,
2239
2260
  {
2240
2261
  label: c.submissionTextHeading(),
2241
2262
  value: d,
2242
- onChange: (p) => f(p.target.value),
2263
+ onChange: (f) => p(f.target.value),
2243
2264
  resize: "vertical",
2244
2265
  height: "200px"
2245
2266
  }
@@ -2254,37 +2275,37 @@ function Xo({
2254
2275
  children: c.submissionFormSubmit()
2255
2276
  }
2256
2277
  ),
2257
- o && /* @__PURE__ */ r(
2278
+ i && /* @__PURE__ */ r(
2258
2279
  $,
2259
2280
  {
2260
- onClick: () => o(d),
2281
+ onClick: () => i(d),
2261
2282
  interaction: d.trim().length > 0 ? "enabled" : "disabled",
2262
2283
  children: c.submissionFormSaveDraft()
2263
2284
  }
2264
2285
  ),
2265
- a && e && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: c.submissionFormDiscardDraft() })
2286
+ s && t && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: s, children: c.submissionFormDiscardDraft() })
2266
2287
  ] })
2267
2288
  ] });
2268
2289
  }
2269
2290
  function Ko({
2270
- unreadCount: e
2291
+ unreadCount: t
2271
2292
  }) {
2272
2293
  const n = q();
2273
- if (e === 0)
2294
+ if (t === 0)
2274
2295
  return null;
2275
- const o = e === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: e });
2276
- return /* @__PURE__ */ r(Tn, { count: e, standalone: !0, children: /* @__PURE__ */ r(Et, { children: o }) });
2296
+ const i = t === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: t });
2297
+ return /* @__PURE__ */ r(Tn, { count: t, standalone: !0, children: /* @__PURE__ */ r(Et, { children: i }) });
2277
2298
  }
2278
2299
  function Zo({
2279
- courseId: e,
2300
+ courseId: t,
2280
2301
  moduleItemId: n,
2281
- fetchSequence: o,
2282
- enabled: a = !0
2302
+ fetchSequence: i,
2303
+ enabled: s = !0
2283
2304
  }) {
2284
2305
  return Ve({
2285
- queryKey: ["assignment-review", "module-item-sequence", e, n],
2286
- queryFn: () => o(e, n),
2287
- enabled: a && !!n
2306
+ queryKey: ["assignment-review", "module-item-sequence", t, n],
2307
+ queryFn: () => i(t, n),
2308
+ enabled: s && !!n
2288
2309
  });
2289
2310
  }
2290
2311
  export {