@instructure/platform-assignment-review 0.4.1 → 0.4.9

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 +1447 -1047
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,173 +1,226 @@
1
- import { jsx as i, jsxs as _ } from "react/jsx-runtime";
2
- import { createContext as In, useContext as Cn, useMemo as je, useState as ge, useRef as Dn, useEffect as ct, useCallback as Rn } from "react";
1
+ import { jsx as r, jsxs as S } from "react/jsx-runtime";
2
+ import { createContext as Un, useContext as zn, useMemo as qe, useState as Ee, useRef as jn, useEffect as Tt, useCallback as Hn } from "react";
3
3
  import { Flex as h } from "@instructure/ui-flex";
4
- import { Heading as dt } from "@instructure/ui-heading";
5
- import { Spinner as He } from "@instructure/ui-spinner";
6
- import { Text as y } from "@instructure/ui-text";
7
- import { View as Y } from "@instructure/ui-view";
8
- import { useQuery as $e, useQueryClient as Xt, useMutation as Kt } from "@tanstack/react-query";
9
- import ne from "graphql-tag";
10
- import { z as n } from "zod";
11
- import { Pill as ft } from "@instructure/ui-pill";
12
- import { IconDownloadLine as Ln, IconCheckMarkSolid as wn, IconArrowStartLine as vn, IconArrowEndLine as Nn, IconTrashLine as On, IconArrowOpenStartLine as Zt, IconArrowOpenEndLine as Qt, IconXLine as Mn, IconLockLine as Jt, IconDocumentLine as jt, IconLinkLine as xn, IconDiscussionLine as kn, IconQuizLine as Pn, IconAssignmentLine as Un } from "@instructure/ui-icons";
13
- import { ScreenReaderContent as pt } from "@instructure/ui-a11y-content";
14
- import { Link as Fn } from "@instructure/ui-link";
15
- import { TruncateText as en } from "@instructure/ui-truncate-text";
16
- import { Button as z, IconButton as zn } from "@instructure/ui-buttons";
17
- import { TextArea as tn } from "@instructure/ui-text-area";
18
- import { Badge as nn } from "@instructure/ui-badge";
19
- import { Tooltip as jn } from "@instructure/ui-tooltip";
20
- const rn = In(void 0);
21
- function ar({
22
- translations: t,
23
- children: r
4
+ import { Heading as St } from "@instructure/ui-heading";
5
+ import { Spinner as Ye } from "@instructure/ui-spinner";
6
+ import { Text as _ } from "@instructure/ui-text";
7
+ import { View as K } from "@instructure/ui-view";
8
+ import { useQuery as Ve, useQueryClient as dn, useMutation as fn } from "@tanstack/react-query";
9
+ import ae from "graphql-tag";
10
+ import { z as i } from "zod";
11
+ import { Pill as _t } from "@instructure/ui-pill";
12
+ import { IconDownloadLine as $n, IconCheckMarkSolid as Bn, IconArrowStartLine as Gn, IconArrowEndLine as Wn, IconTrashLine as qn, IconArrowOpenStartLine as pn, IconArrowOpenEndLine as gn, IconXLine as Yn, IconLockLine as hn, IconDocumentLine as Kt, IconLinkLine as Vn, IconDiscussionLine as Xn, IconQuizLine as Kn, IconAssignmentLine as Zn } from "@instructure/ui-icons";
13
+ import { ScreenReaderContent as Et } from "@instructure/ui-a11y-content";
14
+ import { Link as Qn } from "@instructure/ui-link";
15
+ import { TruncateText as bn } from "@instructure/ui-truncate-text";
16
+ import { Button as $, IconButton as Jn } from "@instructure/ui-buttons";
17
+ import { TextArea as Tn } from "@instructure/ui-text-area";
18
+ import { Badge as yn } from "@instructure/ui-badge";
19
+ import { Tooltip as ei } from "@instructure/ui-tooltip";
20
+ const An = Un(void 0);
21
+ function Uo({
22
+ translations: e,
23
+ children: n
24
24
  }) {
25
- return /* @__PURE__ */ i(rn.Provider, { value: t, children: r });
25
+ return /* @__PURE__ */ r(An.Provider, { value: e, children: n });
26
26
  }
27
- function B() {
28
- const t = Cn(rn);
29
- if (!t)
27
+ function q() {
28
+ const e = zn(An);
29
+ if (!e)
30
30
  throw new Error("useTranslations must be used within TranslationsProvider");
31
- return t;
31
+ return e;
32
32
  }
33
- /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
34
- const {
35
- entries: on,
36
- setPrototypeOf: Ht,
37
- isFrozen: Hn,
38
- getPrototypeOf: $n,
39
- getOwnPropertyDescriptor: Gn
40
- } = Object;
41
- let {
42
- freeze: j,
43
- seal: W,
44
- create: Fe
45
- } = Object, {
46
- apply: mt,
47
- construct: ut
48
- } = typeof Reflect < "u" && Reflect;
49
- j || (j = function(r) {
50
- return r;
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;
38
+ }
39
+ function ti(e) {
40
+ if (Array.isArray(e)) return e;
41
+ }
42
+ function ni(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, b = [], u = !0, f = !1;
46
+ try {
47
+ if (c = (o = o.call(e)).next, n !== 0) for (; !(u = (a = c.call(o)).done) && (b.push(a.value), b.length !== n); u = !0) ;
48
+ } catch (g) {
49
+ f = !0, l = g;
50
+ } finally {
51
+ try {
52
+ if (!u && o.return != null && (d = o.return(), Object(d) !== d)) return;
53
+ } finally {
54
+ if (f) throw l;
55
+ }
56
+ }
57
+ return b;
58
+ }
59
+ }
60
+ function ii() {
61
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
63
+ }
64
+ function oi(e, n) {
65
+ return ti(e) || ni(e, n) || ri(e, n) || ii();
66
+ }
67
+ function ri(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;
72
+ }
73
+ }
74
+ const Sn = Object.entries, Qt = Object.setPrototypeOf, si = Object.isFrozen, ai = Object.getPrototypeOf, li = Object.getOwnPropertyDescriptor;
75
+ let B = Object.freeze, Y = Object.seal, _e = Object.create, _n = typeof Reflect < "u" && Reflect, yt = _n.apply, At = _n.construct;
76
+ B || (B = function(n) {
77
+ return n;
51
78
  });
52
- W || (W = function(r) {
53
- return r;
79
+ Y || (Y = function(n) {
80
+ return n;
54
81
  });
55
- mt || (mt = function(r, o) {
56
- for (var s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), c = 2; c < s; c++)
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++)
57
84
  l[c - 2] = arguments[c];
58
- return r.apply(o, l);
85
+ return n.apply(o, l);
59
86
  });
60
- ut || (ut = function(r) {
61
- for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
62
- s[l - 1] = arguments[l];
63
- return new r(...s);
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);
64
91
  });
65
- const Pe = H(Array.prototype.forEach), Bn = H(Array.prototype.lastIndexOf), $t = H(Array.prototype.pop), Se = H(Array.prototype.push), Wn = H(Array.prototype.splice), ze = H(String.prototype.toLowerCase), it = H(String.prototype.toString), rt = H(String.prototype.match), ye = H(String.prototype.replace), qn = H(String.prototype.indexOf), Yn = H(String.prototype.trim), G = H(Object.prototype.hasOwnProperty), F = H(RegExp.prototype.test), Ee = Vn(TypeError);
66
- function H(t) {
67
- return function(r) {
68
- r instanceof RegExp && (r.lastIndex = 0);
69
- for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
70
- s[l - 1] = arguments[l];
71
- return mt(t, r, s);
92
+ const Te = x(Array.prototype.forEach), ci = x(Array.prototype.lastIndexOf), Jt = x(Array.prototype.pop), ye = x(Array.prototype.push), mi = 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), ui = x(String.prototype.trim), di = x(Number.prototype.toString), fi = 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 = pi(TypeError);
93
+ function x(e) {
94
+ return function(n) {
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);
72
99
  };
73
100
  }
74
- function Vn(t) {
101
+ function pi(e) {
75
102
  return function() {
76
- for (var r = arguments.length, o = new Array(r), s = 0; s < r; s++)
77
- o[s] = arguments[s];
78
- return ut(t, o);
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);
79
106
  };
80
107
  }
81
- function A(t, r) {
82
- let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ze;
83
- Ht && Ht(t, null);
84
- let s = r.length;
85
- for (; s--; ) {
86
- let l = r[s];
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];
87
115
  if (typeof l == "string") {
88
116
  const c = o(l);
89
- c !== l && (Hn(r) || (r[s] = c), l = c);
117
+ c !== l && (si(n) || (n[a] = c), l = c);
90
118
  }
91
- t[l] = !0;
119
+ e[l] = !0;
92
120
  }
93
- return t;
121
+ return e;
94
122
  }
95
- function Xn(t) {
96
- for (let r = 0; r < t.length; r++)
97
- G(t, r) || (t[r] = null);
98
- return t;
123
+ function gi(e) {
124
+ for (let n = 0; n < e.length; n++)
125
+ D(e, n) || (e[n] = null);
126
+ return e;
99
127
  }
100
- function Z(t) {
101
- const r = Fe(null);
102
- for (const [o, s] of on(t))
103
- G(t, o) && (Array.isArray(s) ? r[o] = Xn(s) : s && typeof s == "object" && s.constructor === Object ? r[o] = Z(s) : r[o] = s);
104
- return r;
128
+ function W(e) {
129
+ const n = _e(null);
130
+ for (const a of Sn(e)) {
131
+ var o = oi(a, 2);
132
+ const l = o[0], c = o[1];
133
+ D(e, l) && (H(c) ? n[l] = gi(c) : c && typeof c == "object" && c.constructor === Object ? n[l] = W(c) : n[l] = c);
134
+ }
135
+ return n;
136
+ }
137
+ function hi(e) {
138
+ switch (typeof e) {
139
+ case "string":
140
+ return e;
141
+ case "number":
142
+ return di(e);
143
+ case "boolean":
144
+ return fi(e);
145
+ case "bigint":
146
+ return nn ? nn(e) : "0";
147
+ case "symbol":
148
+ return on ? on(e) : "Symbol()";
149
+ case "undefined":
150
+ return Oe(e);
151
+ case "function":
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);
159
+ }
160
+ return Oe(e);
161
+ }
162
+ default:
163
+ return Oe(e);
164
+ }
105
165
  }
106
- function Ie(t, r) {
107
- for (; t !== null; ) {
108
- const s = Gn(t, r);
109
- if (s) {
110
- if (s.get)
111
- return H(s.get);
112
- if (typeof s.value == "function")
113
- return H(s.value);
166
+ function de(e, n) {
167
+ for (; e !== null; ) {
168
+ const a = li(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);
114
174
  }
115
- t = $n(t);
175
+ e = ai(e);
116
176
  }
117
177
  function o() {
118
178
  return null;
119
179
  }
120
180
  return o;
121
181
  }
122
- const Gt = j(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ot = j(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), st = j(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Kn = j(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), at = j(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Zn = j(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Bt = j(["#text"]), Wt = j(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), lt = j(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), qt = j(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ue = j(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Qn = W(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Jn = W(/<%[\w\W]*|[\w\W]*%>/gm), ei = W(/\$\{[\w\W]*/gm), ti = W(/^data-[\-\w.\u00B7-\uFFFF]+$/), ni = W(/^aria-[\-\w]+$/), sn = W(
182
+ function bi(e) {
183
+ try {
184
+ return z(e, ""), !0;
185
+ } catch {
186
+ return !1;
187
+ }
188
+ }
189
+ const rn = B(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ft = B(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), pt = B(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ti = B(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), gt = B(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), yi = B(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), sn = B(["#text"]), an = B(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ht = B(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ln = B(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), We = B(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ai = Y(/{{[\w\W]*|^[\w\W]*}}/g), Si = Y(/<%[\w\W]*|^[\w\W]*%>/g), _i = Y(/\${[\w\W]*/g), Ei = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ii = Y(/^aria-[\-\w]+$/), cn = Y(
123
190
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
124
191
  // eslint-disable-line no-useless-escape
125
- ), ii = W(/^(?:\w+script|data):/i), ri = W(
192
+ ), wi = Y(/^(?:\w+script|data):/i), Ci = Y(
126
193
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
127
194
  // eslint-disable-line no-control-regex
128
- ), an = W(/^html$/i), oi = W(/^[a-z][.\w]*(-[.\w]+)+$/i);
129
- var Yt = /* @__PURE__ */ Object.freeze({
130
- __proto__: null,
131
- ARIA_ATTR: ni,
132
- ATTR_WHITESPACE: ri,
133
- CUSTOM_ELEMENT: oi,
134
- DATA_ATTR: ti,
135
- DOCTYPE_NAME: an,
136
- ERB_EXPR: Jn,
137
- IS_ALLOWED_URI: sn,
138
- IS_SCRIPT_OR_DATA: ii,
139
- MUSTACHE_EXPR: Qn,
140
- TMPLIT_EXPR: ei
141
- });
142
- const Ce = {
195
+ ), Di = Y(/^html$/i), Ri = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), Se = {
143
196
  element: 1,
144
197
  text: 3,
145
198
  // Deprecated
146
199
  progressingInstruction: 7,
147
200
  comment: 8,
148
201
  document: 9
149
- }, si = function() {
202
+ }, Oi = function() {
150
203
  return typeof window > "u" ? null : window;
151
- }, ai = function(r, o) {
152
- if (typeof r != "object" || typeof r.createPolicy != "function")
204
+ }, Ni = function(n, o) {
205
+ if (typeof n != "object" || typeof n.createPolicy != "function")
153
206
  return null;
154
- let s = null;
207
+ let a = null;
155
208
  const l = "data-tt-policy-suffix";
156
- o && o.hasAttribute(l) && (s = o.getAttribute(l));
157
- const c = "dompurify" + (s ? "#" + s : "");
209
+ o && o.hasAttribute(l) && (a = o.getAttribute(l));
210
+ const c = "dompurify" + (a ? "#" + a : "");
158
211
  try {
159
- return r.createPolicy(c, {
160
- createHTML(f) {
161
- return f;
212
+ return n.createPolicy(c, {
213
+ createHTML(d) {
214
+ return d;
162
215
  },
163
- createScriptURL(f) {
164
- return f;
216
+ createScriptURL(d) {
217
+ return d;
165
218
  }
166
219
  });
167
220
  } catch {
168
221
  return console.warn("TrustedTypes policy " + c + " could not be created."), null;
169
222
  }
170
- }, Vt = function() {
223
+ }, mn = function() {
171
224
  return {
172
225
  afterSanitizeAttributes: [],
173
226
  afterSanitizeElements: [],
@@ -180,57 +233,27 @@ const Ce = {
180
233
  uponSanitizeShadowNode: []
181
234
  };
182
235
  };
183
- function ln() {
184
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : si();
185
- const r = (d) => ln(d);
186
- if (r.version = "3.3.3", r.removed = [], !t || !t.document || t.document.nodeType !== Ce.document || !t.Element)
187
- return r.isSupported = !1, r;
188
- let {
189
- document: o
190
- } = t;
191
- const s = o, l = s.currentScript, {
192
- DocumentFragment: c,
193
- HTMLTemplateElement: f,
194
- Node: b,
195
- Element: m,
196
- NodeFilter: p,
197
- NamedNodeMap: g = t.NamedNodeMap || t.MozNamedAttrMap,
198
- HTMLFormElement: D,
199
- DOMParser: I,
200
- trustedTypes: E
201
- } = t, T = m.prototype, ie = Ie(T, "cloneNode"), ae = Ie(T, "remove"), re = Ie(T, "nextSibling"), v = Ie(T, "childNodes"), q = Ie(T, "parentNode");
202
- if (typeof f == "function") {
203
- const d = o.createElement("template");
204
- d.content && d.content.ownerDocument && (o = d.content.ownerDocument);
236
+ function En() {
237
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Oi();
238
+ const n = (p) => En(p);
239
+ if (n.version = "3.4.5", n.removed = [], !e || !e.document || e.document.nodeType !== Se.document || !e.Element)
240
+ return n.isSupported = !1, n;
241
+ let o = e.document;
242
+ const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, b = e.Node, u = e.Element, f = e.NodeFilter, g = e.NamedNodeMap, C = g === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : g, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = u.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), M = de(V, "nextSibling"), ne = de(V, "childNodes"), O = de(V, "parentNode"), ce = b && b.prototype ? de(b.prototype, "nodeType") : null;
243
+ if (typeof d == "function") {
244
+ const p = o.createElement("template");
245
+ p.content && p.content.ownerDocument && (o = p.content.ownerDocument);
205
246
  }
206
- let S, V = "";
207
- const {
208
- implementation: k,
209
- createNodeIterator: P,
210
- createDocumentFragment: le,
211
- getElementsByTagName: Ge
212
- } = o, {
213
- importNode: Be
214
- } = s;
215
- let O = Vt();
216
- r.isSupported = typeof on == "function" && typeof q == "function" && k && k.createHTMLDocument !== void 0;
217
- const {
218
- MUSTACHE_EXPR: he,
219
- ERB_EXPR: be,
220
- TMPLIT_EXPR: We,
221
- DATA_ATTR: dn,
222
- ARIA_ATTR: fn,
223
- IS_SCRIPT_OR_DATA: pn,
224
- ATTR_WHITESPACE: ht,
225
- CUSTOM_ELEMENT: gn
226
- } = Yt;
227
- let {
228
- IS_ALLOWED_URI: bt
229
- } = Yt, N = null;
230
- const Tt = A({}, [...Gt, ...ot, ...st, ...at, ...Bt]);
231
- let M = null;
232
- const At = A({}, [...Wt, ...lt, ...qt, ...Ue]);
233
- let R = Object.seal(Fe(null, {
247
+ let E, N = "";
248
+ const J = o, Ie = J.implementation, xe = J.createNodeIterator, Xe = J.createDocumentFragment, Ke = J.getElementsByTagName, Ze = a.importNode;
249
+ let j = mn();
250
+ n.isSupported = typeof Sn == "function" && typeof O == "function" && Ie && Ie.createHTMLDocument !== void 0;
251
+ const ke = Ai, Me = Si, Pe = _i, Dn = Ei, Rn = Ii, On = wi, wt = Ci, Nn = Ri;
252
+ let Ct = cn, P = null;
253
+ const Dt = T({}, [...rn, ...ft, ...pt, ...gt, ...sn]);
254
+ let U = null;
255
+ const Rt = T({}, [...an, ...ht, ...ln, ...We]);
256
+ let R = Object.seal(_e(null, {
234
257
  tagNameCheck: {
235
258
  writable: !0,
236
259
  configurable: !1,
@@ -249,8 +272,8 @@ function ln() {
249
272
  enumerable: !0,
250
273
  value: !1
251
274
  }
252
- })), Te = null, Le = null;
253
- const te = Object.seal(Fe(null, {
275
+ })), we = null, Fe = null;
276
+ const ie = Object.seal(_e(null, {
254
277
  tagCheck: {
255
278
  writable: !0,
256
279
  configurable: !1,
@@ -264,171 +287,194 @@ function ln() {
264
287
  value: null
265
288
  }
266
289
  }));
267
- let _t = !0, qe = !0, St = !1, yt = !0, ce = !1, we = !0, oe = !1, Ye = !1, Ve = !1, me = !1, ve = !1, Ne = !1, Et = !0, It = !1;
268
- const hn = "user-content-";
269
- let Xe = !0, Ae = !1, ue = {}, X = null;
270
- const Ke = A({}, ["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"]);
271
- let Ct = null;
272
- const Dt = A({}, ["audio", "video", "img", "source", "image", "track"]);
273
- let Ze = null;
274
- const Rt = A({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Oe = "http://www.w3.org/1998/Math/MathML", Me = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
275
- let de = Q, Qe = !1, Je = null;
276
- const bn = A({}, [Oe, Me, Q], it);
277
- let xe = A({}, ["mi", "mo", "mn", "ms", "mtext"]), ke = A({}, ["annotation-xml"]);
278
- const Tn = A({}, ["title", "style", "font", "a", "script"]);
279
- let _e = null;
280
- const An = ["application/xhtml+xml", "text/html"], _n = "text/html";
281
- let w = null, fe = null;
282
- const Sn = o.createElement("form"), Lt = function(e) {
283
- return e instanceof RegExp || e instanceof Function;
284
- }, et = function() {
285
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
286
- if (!(fe && fe === e)) {
287
- if ((!e || typeof e != "object") && (e = {}), e = Z(e), _e = // eslint-disable-next-line unicorn/prefer-includes
288
- An.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? _n : e.PARSER_MEDIA_TYPE, w = _e === "application/xhtml+xml" ? it : ze, N = G(e, "ALLOWED_TAGS") ? A({}, e.ALLOWED_TAGS, w) : Tt, M = G(e, "ALLOWED_ATTR") ? A({}, e.ALLOWED_ATTR, w) : At, Je = G(e, "ALLOWED_NAMESPACES") ? A({}, e.ALLOWED_NAMESPACES, it) : bn, Ze = G(e, "ADD_URI_SAFE_ATTR") ? A(Z(Rt), e.ADD_URI_SAFE_ATTR, w) : Rt, Ct = G(e, "ADD_DATA_URI_TAGS") ? A(Z(Dt), e.ADD_DATA_URI_TAGS, w) : Dt, X = G(e, "FORBID_CONTENTS") ? A({}, e.FORBID_CONTENTS, w) : Ke, Te = G(e, "FORBID_TAGS") ? A({}, e.FORBID_TAGS, w) : Z({}), Le = G(e, "FORBID_ATTR") ? A({}, e.FORBID_ATTR, w) : Z({}), ue = G(e, "USE_PROFILES") ? e.USE_PROFILES : !1, _t = e.ALLOW_ARIA_ATTR !== !1, qe = e.ALLOW_DATA_ATTR !== !1, St = e.ALLOW_UNKNOWN_PROTOCOLS || !1, yt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = e.SAFE_FOR_TEMPLATES || !1, we = e.SAFE_FOR_XML !== !1, oe = e.WHOLE_DOCUMENT || !1, me = e.RETURN_DOM || !1, ve = e.RETURN_DOM_FRAGMENT || !1, Ne = e.RETURN_TRUSTED_TYPE || !1, Ve = e.FORCE_BODY || !1, Et = e.SANITIZE_DOM !== !1, It = e.SANITIZE_NAMED_PROPS || !1, Xe = e.KEEP_CONTENT !== !1, Ae = e.IN_PLACE || !1, bt = e.ALLOWED_URI_REGEXP || sn, de = e.NAMESPACE || Q, xe = e.MATHML_TEXT_INTEGRATION_POINTS || xe, ke = e.HTML_INTEGRATION_POINTS || ke, R = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Lt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Lt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (R.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ce && (qe = !1), ve && (me = !0), ue && (N = A({}, Bt), M = Fe(null), ue.html === !0 && (A(N, Gt), A(M, Wt)), ue.svg === !0 && (A(N, ot), A(M, lt), A(M, Ue)), ue.svgFilters === !0 && (A(N, st), A(M, lt), A(M, Ue)), ue.mathMl === !0 && (A(N, at), A(M, qt), A(M, Ue))), G(e, "ADD_TAGS") || (te.tagCheck = null), G(e, "ADD_ATTR") || (te.attributeCheck = null), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? te.tagCheck = e.ADD_TAGS : (N === Tt && (N = Z(N)), A(N, e.ADD_TAGS, w))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? te.attributeCheck = e.ADD_ATTR : (M === At && (M = Z(M)), A(M, e.ADD_ATTR, w))), e.ADD_URI_SAFE_ATTR && A(Ze, e.ADD_URI_SAFE_ATTR, w), e.FORBID_CONTENTS && (X === Ke && (X = Z(X)), A(X, e.FORBID_CONTENTS, w)), e.ADD_FORBID_CONTENTS && (X === Ke && (X = Z(X)), A(X, e.ADD_FORBID_CONTENTS, w)), Xe && (N["#text"] = !0), oe && A(N, ["html", "head", "body"]), N.table && (A(N, ["tbody"]), delete Te.tbody), e.TRUSTED_TYPES_POLICY) {
289
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
290
- throw Ee('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
291
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
292
- throw Ee('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
293
- S = e.TRUSTED_TYPES_POLICY, V = S.createHTML("");
294
- } else
295
- S === void 0 && (S = ai(E, l)), S !== null && typeof V == "string" && (V = S.createHTML(""));
296
- j && j(e), fe = e;
297
- }
298
- }, wt = A({}, [...ot, ...st, ...Kn]), vt = A({}, [...at, ...Zn]), yn = function(e) {
299
- let a = q(e);
300
- (!a || !a.tagName) && (a = {
301
- namespaceURI: de,
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 kt = "user-content-";
292
+ let tt = !0, De = !1, ge = {}, Z = null;
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 Mt = null;
295
+ const Pt = T({}, ["audio", "video", "img", "source", "image", "track"]);
296
+ let it = null;
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";
298
+ let he = Q, ot = !1, rt = null;
299
+ const vn = T({}, [je, He, Q], dt);
300
+ let st = T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = T({}, ["annotation-xml"]);
301
+ const Ln = T({}, ["title", "style", "font", "a", "script"]);
302
+ let Re = null;
303
+ const xn = ["application/xhtml+xml", "text/html"], kn = "text/html";
304
+ let k = null, be = null;
305
+ const Mn = o.createElement("form"), Ut = function(t) {
306
+ return t instanceof RegExp || t instanceof Function;
307
+ }, lt = function() {
308
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
309
+ if (be && be === t)
310
+ return;
311
+ (!t || typeof t != "object") && (t = {}), t = W(t), Re = // eslint-disable-next-line unicorn/prefer-includes
312
+ xn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? kn : t.PARSER_MEDIA_TYPE, k = Re === "application/xhtml+xml" ? dt : Ne, P = D(t, "ALLOWED_TAGS") && H(t.ALLOWED_TAGS) ? T({}, t.ALLOWED_TAGS, k) : Dt, U = D(t, "ALLOWED_ATTR") && H(t.ALLOWED_ATTR) ? T({}, t.ALLOWED_ATTR, k) : Rt, rt = D(t, "ALLOWED_NAMESPACES") && H(t.ALLOWED_NAMESPACES) ? T({}, t.ALLOWED_NAMESPACES, dt) : vn, it = D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) ? T(W(Ft), t.ADD_URI_SAFE_ATTR, k) : Ft, Mt = D(t, "ADD_DATA_URI_TAGS") && H(t.ADD_DATA_URI_TAGS) ? T(W(Pt), t.ADD_DATA_URI_TAGS, k) : Pt, Z = D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) ? T({}, t.FORBID_CONTENTS, k) : nt, we = D(t, "FORBID_TAGS") && H(t.FORBID_TAGS) ? T({}, t.FORBID_TAGS, k) : W({}), Fe = D(t, "FORBID_ATTR") && H(t.FORBID_ATTR) ? T({}, t.FORBID_ATTR, k) : 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 = bi(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, k))), 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, k))), D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) && T(it, t.ADD_URI_SAFE_ATTR, k), D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.FORBID_CONTENTS, k)), D(t, "ADD_FORBID_CONTENTS") && H(t.ADD_FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.ADD_FORBID_CONTENTS, k)), 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")
316
+ throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
317
+ if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
318
+ throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
319
+ E = t.TRUSTED_TYPES_POLICY, N = E.createHTML("");
320
+ } else
321
+ E === void 0 && (E = Ni(y, l)), E !== null && typeof N == "string" && (N = E.createHTML(""));
322
+ B && B(t), be = t;
323
+ }, zt = T({}, [...ft, ...pt, ...Ti]), jt = T({}, [...gt, ...yi]), Pn = function(t) {
324
+ let s = O(t);
325
+ (!s || !s.tagName) && (s = {
326
+ namespaceURI: he,
302
327
  tagName: "template"
303
328
  });
304
- const u = ze(e.tagName), C = ze(a.tagName);
305
- return Je[e.namespaceURI] ? e.namespaceURI === Me ? a.namespaceURI === Q ? u === "svg" : a.namespaceURI === Oe ? u === "svg" && (C === "annotation-xml" || xe[C]) : !!wt[u] : e.namespaceURI === Oe ? a.namespaceURI === Q ? u === "math" : a.namespaceURI === Me ? u === "math" && ke[C] : !!vt[u] : e.namespaceURI === Q ? a.namespaceURI === Me && !ke[C] || a.namespaceURI === Oe && !xe[C] ? !1 : !vt[u] && (Tn[u] || !wt[u]) : !!(_e === "application/xhtml+xml" && Je[e.namespaceURI]) : !1;
306
- }, K = function(e) {
307
- Se(r.removed, {
308
- element: e
329
+ const m = Ne(t.tagName), A = Ne(s.tagName);
330
+ return rt[t.namespaceURI] ? t.namespaceURI === He ? s.namespaceURI === Q ? m === "svg" : s.namespaceURI === je ? m === "svg" && (A === "annotation-xml" || st[A]) : !!zt[m] : t.namespaceURI === je ? s.namespaceURI === Q ? m === "math" : s.namespaceURI === He ? m === "math" && at[A] : !!jt[m] : t.namespaceURI === Q ? s.namespaceURI === He && !at[A] || s.namespaceURI === je && !st[A] ? !1 : !jt[m] && (Ln[m] || !zt[m]) : !!(Re === "application/xhtml+xml" && rt[t.namespaceURI]) : !1;
331
+ }, X = function(t) {
332
+ ye(n.removed, {
333
+ element: t
309
334
  });
310
335
  try {
311
- q(e).removeChild(e);
336
+ O(t).removeChild(t);
312
337
  } catch {
313
- ae(e);
338
+ le(t);
314
339
  }
315
- }, se = function(e, a) {
340
+ }, ue = function(t, s) {
316
341
  try {
317
- Se(r.removed, {
318
- attribute: a.getAttributeNode(e),
319
- from: a
342
+ ye(n.removed, {
343
+ attribute: s.getAttributeNode(t),
344
+ from: s
320
345
  });
321
346
  } catch {
322
- Se(r.removed, {
347
+ ye(n.removed, {
323
348
  attribute: null,
324
- from: a
349
+ from: s
325
350
  });
326
351
  }
327
- if (a.removeAttribute(e), e === "is")
328
- if (me || ve)
352
+ if (s.removeAttribute(t), t === "is")
353
+ if (pe || Ue)
329
354
  try {
330
- K(a);
355
+ X(s);
331
356
  } catch {
332
357
  }
333
358
  else
334
359
  try {
335
- a.setAttribute(e, "");
360
+ s.setAttribute(t, "");
336
361
  } catch {
337
362
  }
338
- }, Nt = function(e) {
339
- let a = null, u = null;
340
- if (Ve)
341
- e = "<remove></remove>" + e;
363
+ }, Ht = function(t) {
364
+ let s = null, m = null;
365
+ if (et)
366
+ t = "<remove></remove>" + t;
342
367
  else {
343
- const L = rt(e, /^[\r\n\t ]+/);
344
- u = L && L[0];
368
+ const L = en(t, /^[\r\n\t ]+/);
369
+ m = L && L[0];
345
370
  }
346
- _e === "application/xhtml+xml" && de === Q && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
347
- const C = S ? S.createHTML(e) : e;
348
- if (de === Q)
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;
373
+ if (he === Q)
349
374
  try {
350
- a = new I().parseFromString(C, _e);
375
+ s = new w().parseFromString(A, Re);
351
376
  } catch {
352
377
  }
353
- if (!a || !a.documentElement) {
354
- a = k.createDocument(de, "template", null);
378
+ if (!s || !s.documentElement) {
379
+ s = Ie.createDocument(he, "template", null);
355
380
  try {
356
- a.documentElement.innerHTML = Qe ? V : C;
381
+ s.documentElement.innerHTML = ot ? N : A;
357
382
  } catch {
358
383
  }
359
384
  }
360
- const U = a.body || a.documentElement;
361
- return e && u && U.insertBefore(o.createTextNode(u), U.childNodes[0] || null), de === Q ? Ge.call(a, oe ? "html" : "body")[0] : oe ? a.documentElement : U;
362
- }, Ot = function(e) {
363
- return P.call(
364
- e.ownerDocument || e,
365
- e,
385
+ const v = s.body || s.documentElement;
386
+ return t && m && v.insertBefore(o.createTextNode(m), v.childNodes[0] || null), he === Q ? Ke.call(s, me ? "html" : "body")[0] : me ? s.documentElement : v;
387
+ }, $t = function(t) {
388
+ return xe.call(
389
+ t.ownerDocument || t,
390
+ t,
391
+ // eslint-disable-next-line no-bitwise
392
+ f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
393
+ null
394
+ );
395
+ }, Bt = function(t) {
396
+ t.normalize();
397
+ const s = xe.call(
398
+ t.ownerDocument || t,
399
+ t,
366
400
  // eslint-disable-next-line no-bitwise
367
- p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
401
+ f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION,
368
402
  null
369
403
  );
370
- }, tt = function(e) {
371
- return e instanceof D && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof g) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
372
- }, Mt = function(e) {
373
- return typeof b == "function" && e instanceof b;
404
+ let m = s.nextNode();
405
+ for (; m; ) {
406
+ let A = m.data;
407
+ Te([ke, Me, Pe], (v) => {
408
+ A = Ae(A, v, " ");
409
+ }), m.data = A, m = s.nextNode();
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)
415
+ return !1;
416
+ try {
417
+ return typeof ce(t) == "number";
418
+ } catch {
419
+ return !1;
420
+ }
374
421
  };
375
- function J(d, e, a) {
376
- Pe(d, (u) => {
377
- u.call(r, e, a, fe);
422
+ function ee(p, t, s) {
423
+ Te(p, (m) => {
424
+ m.call(n, t, s, be);
378
425
  });
379
426
  }
380
- const xt = function(e) {
381
- let a = null;
382
- if (J(O.beforeSanitizeElements, e, null), tt(e))
383
- return K(e), !0;
384
- const u = w(e.nodeName);
385
- if (J(O.uponSanitizeElement, e, {
386
- tagName: u,
387
- allowedTags: N
388
- }), we && e.hasChildNodes() && !Mt(e.firstElementChild) && F(/<[/\w!]/g, e.innerHTML) && F(/<[/\w!]/g, e.textContent) || e.nodeType === Ce.progressingInstruction || we && e.nodeType === Ce.comment && F(/<[/\w]/g, e.data))
389
- return K(e), !0;
390
- if (!(te.tagCheck instanceof Function && te.tagCheck(u)) && (!N[u] || Te[u])) {
391
- if (!Te[u] && Pt(u) && (R.tagNameCheck instanceof RegExp && F(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
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 m = k(t.nodeName);
432
+ if (ee(j.uponSanitizeElement, t, {
433
+ tagName: m,
434
+ allowedTags: P
435
+ }), Ce && t.hasChildNodes() && !$e(t.firstElementChild) && z(/<[/\w!]/g, t.innerHTML) && z(/<[/\w!]/g, t.textContent) || Ce && t.namespaceURI === Q && m === "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[m] || !(ie.tagCheck instanceof Function && ie.tagCheck(m)) && !P[m]) {
438
+ if (!we[m] && qt(m) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, m) || R.tagNameCheck instanceof Function && R.tagNameCheck(m)))
392
439
  return !1;
393
- if (Xe && !X[u]) {
394
- const C = q(e) || e.parentNode, U = v(e) || e.childNodes;
395
- if (U && C) {
396
- const L = U.length;
397
- for (let $ = L - 1; $ >= 0; --$) {
398
- const ee = ie(U[$], !0);
399
- ee.__removalCount = (e.__removalCount || 0) + 1, C.insertBefore(ee, re(e));
440
+ if (tt && !Z[m]) {
441
+ const A = O(t) || t.parentNode, v = ne(t) || t.childNodes;
442
+ if (v && A) {
443
+ const L = v.length;
444
+ for (let G = L - 1; G >= 0; --G) {
445
+ const re = fe(v[G], !0);
446
+ A.insertBefore(re, M(t));
400
447
  }
401
448
  }
402
449
  }
403
- return K(e), !0;
450
+ return X(t), !0;
404
451
  }
405
- return e instanceof m && !yn(e) || (u === "noscript" || u === "noembed" || u === "noframes") && F(/<\/no(script|embed|frames)/i, e.innerHTML) ? (K(e), !0) : (ce && e.nodeType === Ce.text && (a = e.textContent, Pe([he, be, We], (C) => {
406
- a = ye(a, C, " ");
407
- }), e.textContent !== a && (Se(r.removed, {
408
- element: e.cloneNode()
409
- }), e.textContent = a)), J(O.afterSanitizeElements, e, null), !1);
410
- }, kt = function(e, a, u) {
411
- if (Le[a] || Et && (a === "id" || a === "name") && (u in o || u in Sn))
452
+ return t instanceof u && !Pn(t) || (m === "noscript" || m === "noembed" || m === "noframes") && z(/<\/no(script|embed|frames)/i, t.innerHTML) ? (X(t), !0) : (oe && t.nodeType === Se.text && (s = t.textContent, Te([ke, Me, 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, m) {
458
+ if (Fe[s] || Lt && (s === "id" || s === "name") && (m in o || m in Mn))
412
459
  return !1;
413
- if (!(qe && !Le[a] && F(dn, a))) {
414
- if (!(_t && F(fn, a))) {
415
- if (!(te.attributeCheck instanceof Function && te.attributeCheck(a, e))) {
416
- if (!M[a] || Le[a]) {
417
- if (
418
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
419
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
420
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
421
- !(Pt(e) && (R.tagNameCheck instanceof RegExp && F(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && F(R.attributeNameCheck, a) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(a, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
422
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
423
- a === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && F(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
424
- ) return !1;
425
- } else if (!Ze[a]) {
426
- if (!F(bt, ye(u, ht, ""))) {
427
- if (!((a === "src" || a === "xlink:href" || a === "href") && e !== "script" && qn(u, "data:") === 0 && Ct[e])) {
428
- if (!(St && !F(pn, ye(u, ht, "")))) {
429
- if (u)
430
- return !1;
431
- }
460
+ const A = U[s] || ie.attributeCheck instanceof Function && ie.attributeCheck(s, t);
461
+ if (!(Qe && !Fe[s] && z(Dn, s))) {
462
+ if (!(Ot && z(Rn, s))) {
463
+ if (!A || Fe[s]) {
464
+ if (
465
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
466
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
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
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, m) || R.tagNameCheck instanceof Function && R.tagNameCheck(m)))
471
+ ) return !1;
472
+ } else if (!it[s]) {
473
+ if (!z(Ct, Ae(m, wt, ""))) {
474
+ if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(m, "data:") === 0 && Mt[t])) {
475
+ if (!(Nt && !z(On, Ae(m, wt, "")))) {
476
+ if (m)
477
+ return !1;
432
478
  }
433
479
  }
434
480
  }
@@ -436,151 +482,505 @@ function ln() {
436
482
  }
437
483
  }
438
484
  return !0;
439
- }, Pt = function(e) {
440
- return e !== "annotation-xml" && rt(e, gn);
441
- }, Ut = function(e) {
442
- J(O.beforeSanitizeAttributes, e, null);
443
- const {
444
- attributes: a
445
- } = e;
446
- if (!a || tt(e))
485
+ }, Fn = 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 !Fn[Ne(t)] && z(Nn, t);
487
+ }, Yt = function(t) {
488
+ ee(j.beforeSanitizeAttributes, t, null);
489
+ const s = t.attributes;
490
+ if (!s || ct(t))
447
491
  return;
448
- const u = {
492
+ const m = {
449
493
  attrName: "",
450
494
  attrValue: "",
451
495
  keepAttr: !0,
452
- allowedAttributes: M,
496
+ allowedAttributes: U,
453
497
  forceKeepAttr: void 0
454
498
  };
455
- let C = a.length;
456
- for (; C--; ) {
457
- const U = a[C], {
458
- name: L,
459
- namespaceURI: $,
460
- value: ee
461
- } = U, pe = w(L), nt = ee;
462
- let x = L === "value" ? nt : Yn(nt);
463
- if (u.attrName = pe, u.attrValue = x, u.keepAttr = !0, u.forceKeepAttr = void 0, J(O.uponSanitizeAttribute, e, u), x = u.attrValue, It && (pe === "id" || pe === "name") && (se(L, e), x = hn + x), we && F(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, x)) {
464
- se(L, e);
499
+ let A = s.length;
500
+ for (; A--; ) {
501
+ const v = s[A], L = v.name, G = v.namespaceURI, re = v.value, te = k(L), ut = re;
502
+ let F = L === "value" ? ut : ui(ut);
503
+ if (m.attrName = te, m.attrValue = F, m.keepAttr = !0, m.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, m), F = m.attrValue, xt && (te === "id" || te === "name") && tn(F, kt) !== 0 && (ue(L, t), F = kt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
504
+ ue(L, t);
465
505
  continue;
466
506
  }
467
- if (pe === "attributename" && rt(x, "href")) {
468
- se(L, e);
507
+ if (te === "attributename" && en(F, "href")) {
508
+ ue(L, t);
469
509
  continue;
470
510
  }
471
- if (u.forceKeepAttr)
511
+ if (m.forceKeepAttr)
472
512
  continue;
473
- if (!u.keepAttr) {
474
- se(L, e);
513
+ if (!m.keepAttr) {
514
+ ue(L, t);
475
515
  continue;
476
516
  }
477
- if (!yt && F(/\/>/i, x)) {
478
- se(L, e);
517
+ if (!vt && z(/\/>/i, F)) {
518
+ ue(L, t);
479
519
  continue;
480
520
  }
481
- ce && Pe([he, be, We], (zt) => {
482
- x = ye(x, zt, " ");
521
+ oe && Te([ke, Me, Pe], (Xt) => {
522
+ F = Ae(F, Xt, " ");
483
523
  });
484
- const Ft = w(e.nodeName);
485
- if (!kt(Ft, pe, x)) {
486
- se(L, e);
524
+ const Vt = k(t.nodeName);
525
+ if (!Wt(Vt, te, F)) {
526
+ ue(L, t);
487
527
  continue;
488
528
  }
489
- if (S && typeof E == "object" && typeof E.getAttributeType == "function" && !$)
490
- switch (E.getAttributeType(Ft, pe)) {
529
+ if (E && typeof y == "object" && typeof y.getAttributeType == "function" && !G)
530
+ switch (y.getAttributeType(Vt, te)) {
491
531
  case "TrustedHTML": {
492
- x = S.createHTML(x);
532
+ F = E.createHTML(F);
493
533
  break;
494
534
  }
495
535
  case "TrustedScriptURL": {
496
- x = S.createScriptURL(x);
536
+ F = E.createScriptURL(F);
497
537
  break;
498
538
  }
499
539
  }
500
- if (x !== nt)
540
+ if (F !== ut)
501
541
  try {
502
- $ ? e.setAttributeNS($, L, x) : e.setAttribute(L, x), tt(e) ? K(e) : $t(r.removed);
542
+ G ? t.setAttributeNS(G, L, F) : t.setAttribute(L, F), ct(t) ? X(t) : Jt(n.removed);
503
543
  } catch {
504
- se(L, e);
544
+ ue(L, t);
505
545
  }
506
546
  }
507
- J(O.afterSanitizeAttributes, e, null);
508
- }, En = function d(e) {
509
- let a = null;
510
- const u = Ot(e);
511
- for (J(O.beforeSanitizeShadowDOM, e, null); a = u.nextNode(); )
512
- J(O.uponSanitizeShadowNode, a, null), xt(a), Ut(a), a.content instanceof c && d(a.content);
513
- J(O.afterSanitizeShadowDOM, e, null);
547
+ ee(j.afterSanitizeAttributes, t, null);
548
+ }, mt = function(t) {
549
+ let s = null;
550
+ const m = $t(t);
551
+ for (ee(j.beforeSanitizeShadowDOM, t, null); s = m.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;
557
+ Be(A), mt(A);
558
+ }
559
+ const s = t.childNodes;
560
+ if (!s)
561
+ return;
562
+ const m = [];
563
+ Te(s, (A) => {
564
+ ye(m, A);
565
+ });
566
+ for (const A of m)
567
+ Be(A);
514
568
  };
515
- return r.sanitize = function(d) {
516
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, u = null, C = null, U = null;
517
- if (Qe = !d, Qe && (d = "<!-->"), typeof d != "string" && !Mt(d))
518
- if (typeof d.toString == "function") {
519
- if (d = d.toString(), typeof d != "string")
520
- throw Ee("dirty is not a string, aborting");
521
- } else
522
- throw Ee("toString is not a function");
523
- if (!r.isSupported)
524
- return d;
525
- if (Ye || et(e), r.removed = [], typeof d == "string" && (Ae = !1), Ae) {
526
- if (d.nodeName) {
527
- const ee = w(d.nodeName);
528
- if (!N[ee] || Te[ee])
529
- throw Ee("root node is forbidden and cannot be sanitized in-place");
569
+ return n.sanitize = function(p) {
570
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, m = null, A = null, v = null;
571
+ if (ot = !p, ot && (p = "<!-->"), typeof p != "string" && !$e(p) && (p = hi(p), typeof p != "string"))
572
+ throw Ge("dirty is not a string, aborting");
573
+ if (!n.isSupported)
574
+ return p;
575
+ if (Je || lt(t), n.removed = [], typeof p == "string" && (De = !1), De) {
576
+ const re = p.nodeName;
577
+ if (typeof re == "string") {
578
+ const te = k(re);
579
+ if (!P[te] || we[te])
580
+ throw Ge("root node is forbidden and cannot be sanitized in-place");
530
581
  }
531
- } else if (d instanceof b)
532
- a = Nt("<!---->"), u = a.ownerDocument.importNode(d, !0), u.nodeType === Ce.element && u.nodeName === "BODY" || u.nodeName === "HTML" ? a = u : a.appendChild(u);
582
+ Be(p);
583
+ } else if ($e(p))
584
+ s = Ht("<!---->"), m = s.ownerDocument.importNode(p, !0), m.nodeType === Se.element && m.nodeName === "BODY" || m.nodeName === "HTML" ? s = m : s.appendChild(m), Be(m);
533
585
  else {
534
- if (!me && !ce && !oe && // eslint-disable-next-line unicorn/prefer-includes
535
- d.indexOf("<") === -1)
536
- return S && Ne ? S.createHTML(d) : d;
537
- if (a = Nt(d), !a)
538
- return me ? null : Ne ? V : "";
586
+ if (!pe && !oe && !me && // eslint-disable-next-line unicorn/prefer-includes
587
+ p.indexOf("<") === -1)
588
+ return E && ze ? E.createHTML(p) : p;
589
+ if (s = Ht(p), !s)
590
+ return pe ? null : ze ? N : "";
539
591
  }
540
- a && Ve && K(a.firstChild);
541
- const L = Ot(Ae ? d : a);
542
- for (; C = L.nextNode(); )
543
- xt(C), Ut(C), C.content instanceof c && En(C.content);
544
- if (Ae)
545
- return d;
546
- if (me) {
547
- if (ve)
548
- for (U = le.call(a.ownerDocument); a.firstChild; )
549
- U.appendChild(a.firstChild);
592
+ s && et && X(s.firstChild);
593
+ const L = $t(De ? p : s);
594
+ for (; A = L.nextNode(); )
595
+ Gt(A), Yt(A), A.content instanceof c && mt(A.content);
596
+ if (De)
597
+ return oe && Bt(p), p;
598
+ if (pe) {
599
+ if (oe && Bt(s), Ue)
600
+ for (v = Xe.call(s.ownerDocument); s.firstChild; )
601
+ v.appendChild(s.firstChild);
550
602
  else
551
- U = a;
552
- return (M.shadowroot || M.shadowrootmode) && (U = Be.call(s, U, !0)), U;
603
+ v = s;
604
+ return (U.shadowroot || U.shadowrootmode) && (v = Ze.call(a, v, !0)), v;
553
605
  }
554
- let $ = oe ? a.outerHTML : a.innerHTML;
555
- return oe && N["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && F(an, a.ownerDocument.doctype.name) && ($ = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
556
- ` + $), ce && Pe([he, be, We], (ee) => {
557
- $ = ye($, ee, " ");
558
- }), S && Ne ? S.createHTML($) : $;
559
- }, r.setConfig = function() {
560
- let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
561
- et(d), Ye = !0;
562
- }, r.clearConfig = function() {
563
- fe = null, Ye = !1;
564
- }, r.isValidAttribute = function(d, e, a) {
565
- fe || et({});
566
- const u = w(d), C = w(e);
567
- return kt(u, C, a);
568
- }, r.addHook = function(d, e) {
569
- typeof e == "function" && Se(O[d], e);
570
- }, r.removeHook = function(d, e) {
571
- if (e !== void 0) {
572
- const a = Bn(O[d], e);
573
- return a === -1 ? void 0 : Wn(O[d], a, 1)[0];
606
+ let G = me ? s.outerHTML : s.innerHTML;
607
+ return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(Di, s.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
608
+ ` + G), oe && Te([ke, Me, Pe], (re) => {
609
+ G = Ae(G, re, " ");
610
+ }), E && ze ? E.createHTML(G) : G;
611
+ }, n.setConfig = function() {
612
+ let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
613
+ lt(p), Je = !0;
614
+ }, n.clearConfig = function() {
615
+ be = null, Je = !1;
616
+ }, n.isValidAttribute = function(p, t, s) {
617
+ be || lt({});
618
+ const m = k(p), A = k(t);
619
+ return Wt(m, A, s);
620
+ }, n.addHook = function(p, t) {
621
+ typeof t == "function" && ye(j[p], t);
622
+ }, n.removeHook = function(p, t) {
623
+ if (t !== void 0) {
624
+ const s = ci(j[p], t);
625
+ return s === -1 ? void 0 : mi(j[p], s, 1)[0];
574
626
  }
575
- return $t(O[d]);
576
- }, r.removeHooks = function(d) {
577
- O[d] = [];
578
- }, r.removeAllHooks = function() {
579
- O = Vt();
580
- }, r;
627
+ return Jt(j[p]);
628
+ }, n.removeHooks = function(p) {
629
+ j[p] = [];
630
+ }, n.removeAllHooks = function() {
631
+ j = mn();
632
+ }, n;
581
633
  }
582
- var gt = ln();
583
- const li = ne`
634
+ var bt = En();
635
+ const vi = /* @__PURE__ */ new Set([
636
+ // layout
637
+ "display",
638
+ "float",
639
+ "clear",
640
+ "overflow",
641
+ "overflow-x",
642
+ "overflow-y",
643
+ "visibility",
644
+ "cursor",
645
+ "direction",
646
+ "user-select",
647
+ "zoom",
648
+ // positioning — values filtered by allowlist hook below
649
+ "position",
650
+ "top",
651
+ "right",
652
+ "bottom",
653
+ "left",
654
+ // sizing
655
+ "width",
656
+ "height",
657
+ "min-width",
658
+ "min-height",
659
+ "max-width",
660
+ "max-height",
661
+ // box model extensions
662
+ "box-sizing",
663
+ "aspect-ratio",
664
+ "resize",
665
+ "object-fit",
666
+ "object-position",
667
+ // spacing
668
+ "margin",
669
+ "margin-top",
670
+ "margin-right",
671
+ "margin-bottom",
672
+ "margin-left",
673
+ "margin-offset",
674
+ "padding",
675
+ "padding-top",
676
+ "padding-right",
677
+ "padding-bottom",
678
+ "padding-left",
679
+ // typography
680
+ "font",
681
+ "font-family",
682
+ "font-size",
683
+ "font-style",
684
+ "font-variant",
685
+ "font-weight",
686
+ "font-stretch",
687
+ "font-width",
688
+ "line-height",
689
+ "text-align",
690
+ "text-decoration",
691
+ "text-indent",
692
+ "white-space",
693
+ "vertical-align",
694
+ "text-transform",
695
+ "letter-spacing",
696
+ "word-spacing",
697
+ "text-shadow",
698
+ "text-overflow",
699
+ "text-decoration-color",
700
+ "text-decoration-line",
701
+ "text-decoration-style",
702
+ "text-decoration-thickness",
703
+ "text-underline-offset",
704
+ "text-align-last",
705
+ "unicode-bidi",
706
+ // font extensions
707
+ "font-feature-settings",
708
+ "font-kerning",
709
+ "font-optical-sizing",
710
+ "font-variant-caps",
711
+ "font-variant-ligatures",
712
+ "font-variant-numeric",
713
+ // text flow
714
+ "word-break",
715
+ "overflow-wrap",
716
+ "word-wrap",
717
+ "hyphens",
718
+ "line-break",
719
+ "tab-size",
720
+ "writing-mode",
721
+ "text-orientation",
722
+ "text-combine-upright",
723
+ // color & background
724
+ "color",
725
+ "background",
726
+ "background-color",
727
+ "background-image",
728
+ "background-attachment",
729
+ "background-position",
730
+ "background-position-x",
731
+ "background-position-y",
732
+ "background-repeat",
733
+ "background-size",
734
+ "background-clip",
735
+ "background-origin",
736
+ // border
737
+ "border",
738
+ "border-color",
739
+ "border-style",
740
+ "border-width",
741
+ "border-radius",
742
+ "border-collapse",
743
+ "border-spacing",
744
+ "border-top",
745
+ "border-top-color",
746
+ "border-top-style",
747
+ "border-top-width",
748
+ "border-right",
749
+ "border-right-color",
750
+ "border-right-style",
751
+ "border-right-width",
752
+ "border-bottom",
753
+ "border-bottom-color",
754
+ "border-bottom-style",
755
+ "border-bottom-width",
756
+ "border-left",
757
+ "border-left-color",
758
+ "border-left-style",
759
+ "border-left-width",
760
+ // shadows & outline
761
+ "box-shadow",
762
+ "outline",
763
+ "outline-color",
764
+ "outline-style",
765
+ "outline-width",
766
+ // list
767
+ "list-style",
768
+ "list-style-image",
769
+ "list-style-position",
770
+ "list-style-type",
771
+ // table
772
+ "table-layout",
773
+ "caption-side",
774
+ "empty-cells",
775
+ // flex
776
+ "flex",
777
+ "flex-basis",
778
+ "flex-direction",
779
+ "flex-flow",
780
+ "flex-grow",
781
+ "flex-shrink",
782
+ "flex-wrap",
783
+ "align-content",
784
+ "align-items",
785
+ "align-self",
786
+ "justify-content",
787
+ "justify-items",
788
+ "justify-self",
789
+ "order",
790
+ "gap",
791
+ "row-gap",
792
+ "column-gap",
793
+ "place-content",
794
+ "place-items",
795
+ "place-self",
796
+ // grid
797
+ "grid",
798
+ "grid-area",
799
+ "grid-auto-columns",
800
+ "grid-auto-flow",
801
+ "grid-auto-rows",
802
+ "grid-column",
803
+ "grid-column-end",
804
+ "grid-column-gap",
805
+ "grid-column-start",
806
+ "grid-gap",
807
+ "grid-row",
808
+ "grid-row-end",
809
+ "grid-row-gap",
810
+ "grid-row-start",
811
+ "grid-template",
812
+ "grid-template-areas",
813
+ "grid-template-columns",
814
+ "grid-template-rows",
815
+ // transitions
816
+ "transition",
817
+ "transition-property",
818
+ "transition-duration",
819
+ "transition-timing-function",
820
+ "transition-delay",
821
+ // animations
822
+ "animation",
823
+ "animation-name",
824
+ "animation-duration",
825
+ "animation-timing-function",
826
+ "animation-delay",
827
+ "animation-iteration-count",
828
+ "animation-direction",
829
+ "animation-fill-mode",
830
+ "animation-play-state",
831
+ // columns
832
+ "column-count",
833
+ "column-width",
834
+ "columns",
835
+ "column-rule",
836
+ "column-rule-color",
837
+ "column-rule-style",
838
+ "column-rule-width",
839
+ "column-fill",
840
+ "column-span",
841
+ // page breaks
842
+ "break-before",
843
+ "break-after",
844
+ "break-inside",
845
+ "page-break-before",
846
+ "page-break-after",
847
+ "page-break-inside",
848
+ // generated content
849
+ "quotes",
850
+ "counter-reset",
851
+ "counter-increment",
852
+ "content",
853
+ // UI / interaction
854
+ // pointer-events is included: RCE uses it legitimately (e.g. non-interactive
855
+ // decorative overlays). It is not in the overlay-phishing class because it
856
+ // cannot reposition elements — position/z-index remain blocked.
857
+ "pointer-events",
858
+ "caret-color",
859
+ "accent-color",
860
+ "appearance"
861
+ ]), Li = /* @__PURE__ */ new Set([
862
+ "src",
863
+ "href",
864
+ "action",
865
+ "formaction",
866
+ "data",
867
+ "poster",
868
+ "background",
869
+ "cite",
870
+ "longdesc",
871
+ "xlink:href"
872
+ ]), un = /^\s*(\/\/|\\)/, xi = [
873
+ "background",
874
+ "background-image",
875
+ "list-style",
876
+ "list-style-image",
877
+ "cursor",
878
+ // content: url(...) triggers an HTTP GET even on non-pseudo elements in some
879
+ // browsers; strip it as defense-in-depth against tracking-pixel exfiltration.
880
+ "content"
881
+ ], ki = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, Mi = /* @__PURE__ */ new Set([
882
+ "allow-downloads",
883
+ "allow-forms",
884
+ "allow-modals",
885
+ "allow-orientation-lock",
886
+ "allow-pointer-lock",
887
+ "allow-popups",
888
+ "allow-popups-to-escape-sandbox",
889
+ "allow-presentation",
890
+ "allow-same-origin",
891
+ "allow-scripts",
892
+ "allow-storage-access-by-user-activation",
893
+ "allow-top-navigation-by-user-activation"
894
+ ]), Pi = {
895
+ ADD_TAGS: ["iframe"],
896
+ ADD_ATTR: [
897
+ "allowfullscreen",
898
+ "allow",
899
+ "frameborder",
900
+ "sandbox",
901
+ "data-media-id",
902
+ "data-media-type",
903
+ // RCE produces target="_blank" for external links. Modern browsers treat
904
+ // target="_blank" as implicit rel="noopener", and the backend allowlist
905
+ // already includes target.
906
+ "target",
907
+ "webkitallowfullscreen",
908
+ "mozallowfullscreen",
909
+ "scrolling",
910
+ // MathML 4 (W3C) annotation attributes for screen-reader accessibility.
911
+ // MathCAT, JAWS, and NVDA use `intent` to know how to pronounce
912
+ // expressions; `arg` labels sub-expressions referenced by intent.
913
+ // These are plain string annotations — no URL-loading, no code execution.
914
+ "intent",
915
+ "arg"
916
+ ],
917
+ // Rails UJS turns data-method/data-remote/etc. on clickable elements into
918
+ // state-changing requests carrying the victim's CSRF token. Strip them so
919
+ // user-authored HTML cannot become a CSRF gadget when UJS is on the page.
920
+ FORBID_ATTR: ["data-method", "data-remote", "data-url", "data-confirm", "data-disable-with"],
921
+ // In browsers that support the Trusted Types API (Chromium, Firefox),
922
+ // DOMPurify returns a TrustedHTML object rather than a plain string. The
923
+ // exported sanitizeHtml signature declares string — a deliberate lie that
924
+ // mirrors the same lie the browser DOM lib (Element.innerHTML: string),
925
+ // React (__html: string), and jQuery (html(string)) already tell. All those
926
+ // sinks runtime-accept TrustedHTML even though their TS signatures only
927
+ // declare string; lying here lets callers assign the result directly without
928
+ // a per-call cast. Do not perform string operations (.slice, .match, etc.)
929
+ // on the return value — those methods do not exist on TrustedHTML and will
930
+ // throw in modern browsers.
931
+ RETURN_TRUSTED_TYPE: !0,
932
+ // Wraps input in a body context during parsing, preventing namespace
933
+ // confusion attacks where fragments like <svg> could influence parse context.
934
+ FORCE_BODY: !0
935
+ };
936
+ let se = null;
937
+ function Fi() {
938
+ return se || (se = typeof bt == "function" ? bt(window) : bt, se.addHook("afterSanitizeAttributes", (e) => {
939
+ if (!(e instanceof Element) || !e.hasAttribute("style")) return;
940
+ const n = e.style, o = [];
941
+ for (let c = 0; c < n.length; c++) {
942
+ const d = n.item(c);
943
+ vi.has(d) || o.push(d);
944
+ }
945
+ for (const c of o) n.removeProperty(c);
946
+ const a = /* @__PURE__ */ new Set([
947
+ "static",
948
+ "relative",
949
+ "absolute",
950
+ "initial",
951
+ "inherit",
952
+ "unset",
953
+ "revert",
954
+ "revert-layer"
955
+ ]), l = n.getPropertyValue("position").trim().toLowerCase();
956
+ l && !a.has(l) && n.removeProperty("position");
957
+ for (const c of xi) {
958
+ const d = n.getPropertyValue(c);
959
+ d && ki.test(d) && n.removeProperty(c);
960
+ }
961
+ n.length === 0 && e.removeAttribute("style");
962
+ }), se.addHook("uponSanitizeAttribute", (e, n) => {
963
+ Li.has(n.attrName) && un.test(n.attrValue) && (n.keepAttr = !1);
964
+ }), se.addHook("afterSanitizeAttributes", (e) => {
965
+ !(e instanceof Element) || !e.hasAttribute("srcset") || (e.getAttribute("srcset") ?? "").split(",").map((n) => n.trim().split(/\s+/)[0]).some((n) => un.test(n)) && e.removeAttribute("srcset");
966
+ }), se.addHook("afterSanitizeAttributes", (e) => {
967
+ var n;
968
+ if (!(e instanceof Element) || e.tagName !== "A" && e.tagName !== "AREA" || ((n = e.getAttribute("target")) == null ? void 0 : n.toLowerCase()) !== "_blank") return;
969
+ const o = e.getAttribute("rel") ?? "", a = new Set(o.split(/\s+/).filter(Boolean));
970
+ a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
971
+ }), se.addHook("afterSanitizeAttributes", (e) => {
972
+ if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
973
+ const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => Mi.has(a));
974
+ o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
975
+ }), se);
976
+ }
977
+ function It(e, n) {
978
+ if (typeof window > "u")
979
+ throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
980
+ const o = Pi;
981
+ return Fi().sanitize(e ?? "", o);
982
+ }
983
+ const Ui = ae`
584
984
  query GetAssignment($courseId: ID!, $assignmentId: ID!, $userId: ID!) {
585
985
  legacyNode(_id: $assignmentId, type: Assignment) {
586
986
  ... on Assignment {
@@ -639,7 +1039,7 @@ const li = ne`
639
1039
  contentType
640
1040
  submissionPreviewUrl
641
1041
  }
642
- `, ci = ne`
1042
+ `, zi = ae`
643
1043
  query GetSubmissionComments(
644
1044
  $submissionId: ID!
645
1045
  $courseId: String
@@ -688,7 +1088,7 @@ const li = ne`
688
1088
  }
689
1089
  }
690
1090
  }
691
- `, mi = ne`
1091
+ `, ji = ae`
692
1092
  query getSubmissions($submissionId: ID!) {
693
1093
  node(id: $submissionId) {
694
1094
  ... on Submission {
@@ -722,382 +1122,382 @@ const li = ne`
722
1122
  contentType
723
1123
  submissionPreviewUrl
724
1124
  }
725
- `, De = n.object({
726
- _id: n.string(),
727
- displayName: n.string(),
728
- id: n.string(),
729
- mimeClass: n.string(),
730
- url: n.string(),
731
- contentType: n.string(),
732
- submissionPreviewUrl: n.string().nullable()
733
- }), ui = n.object({
734
- _id: n.string(),
735
- activeSubmissionType: n.string(),
736
- body: n.string().nullable(),
737
- attachments: n.array(De).nullable()
738
- }), di = n.object({
739
- id: n.string(),
740
- submittedAt: n.string(),
741
- body: n.string().nullable(),
742
- grade: n.string().nullable(),
743
- score: n.number().nullable(),
744
- submissionType: n.string(),
745
- attempt: n.number(),
746
- unreadCommentCount: n.number(),
747
- attachment: De.nullable(),
748
- attachments: n.array(De).nullable(),
749
- submissionDraft: ui.nullable()
750
- }), fi = n.object({
751
- _id: n.string(),
752
- name: n.string(),
753
- description: n.string().nullable(),
754
- allowedExtensions: n.array(n.string()).nullable(),
755
- allowedAttempts: n.number().nullable(),
756
- dueAt: n.string().nullable(),
757
- pointsPossible: n.number().nullable(),
758
- submissionTypes: n.array(n.string()),
759
- gradingType: n.string(),
760
- published: n.boolean().nullable().optional(),
761
- submissionsConnection: n.object({
762
- nodes: n.array(di)
1125
+ `, ve = i.object({
1126
+ _id: i.string(),
1127
+ displayName: i.string(),
1128
+ id: i.string(),
1129
+ mimeClass: i.string(),
1130
+ url: i.string(),
1131
+ contentType: i.string(),
1132
+ submissionPreviewUrl: i.string().nullable()
1133
+ }), Hi = i.object({
1134
+ _id: i.string(),
1135
+ activeSubmissionType: i.string(),
1136
+ body: i.string().nullable(),
1137
+ attachments: i.array(ve).nullable()
1138
+ }), $i = i.object({
1139
+ id: i.string(),
1140
+ submittedAt: i.string(),
1141
+ body: i.string().nullable(),
1142
+ grade: i.string().nullable(),
1143
+ score: i.number().nullable(),
1144
+ submissionType: i.string(),
1145
+ attempt: i.number(),
1146
+ unreadCommentCount: i.number(),
1147
+ attachment: ve.nullable(),
1148
+ attachments: i.array(ve).nullable(),
1149
+ submissionDraft: Hi.nullable()
1150
+ }), Bi = i.object({
1151
+ _id: i.string(),
1152
+ name: i.string(),
1153
+ description: i.string().nullable(),
1154
+ allowedExtensions: i.array(i.string()).nullable(),
1155
+ allowedAttempts: i.number().nullable(),
1156
+ dueAt: i.string().nullable(),
1157
+ pointsPossible: i.number().nullable(),
1158
+ submissionTypes: i.array(i.string()),
1159
+ gradingType: i.string(),
1160
+ published: i.boolean().nullable().optional(),
1161
+ submissionsConnection: i.object({
1162
+ nodes: i.array($i)
763
1163
  })
764
- }), pi = n.object({
765
- legacyNode: fi,
766
- course: n.object({
767
- name: n.string()
1164
+ }), Gi = i.object({
1165
+ legacyNode: Bi,
1166
+ course: i.object({
1167
+ name: i.string()
768
1168
  })
769
- }), cn = n.object({
770
- startCursor: n.string(),
771
- endCursor: n.string(),
772
- hasPreviousPage: n.boolean(),
773
- hasNextPage: n.boolean()
774
- }), mn = n.object({
775
- _id: n.string(),
776
- attempt: n.number(),
777
- author: n.object({
778
- avatarUrl: n.string().nullable(),
779
- shortName: n.string(),
780
- courseRoles: n.string().nullable()
1169
+ }), In = i.object({
1170
+ startCursor: i.string(),
1171
+ endCursor: i.string(),
1172
+ hasPreviousPage: i.boolean(),
1173
+ hasNextPage: i.boolean()
1174
+ }), wn = i.object({
1175
+ _id: i.string(),
1176
+ attempt: i.number(),
1177
+ author: i.object({
1178
+ avatarUrl: i.string().nullable(),
1179
+ shortName: i.string(),
1180
+ courseRoles: i.string().nullable()
781
1181
  }),
782
- htmlComment: n.string(),
783
- read: n.boolean(),
784
- updatedAt: n.string(),
785
- createdAt: n.string(),
786
- attachments: n.array(
787
- n.object({
788
- url: n.string(),
789
- mimeClass: n.string(),
790
- displayName: n.string(),
791
- contentType: n.string(),
792
- id: n.string()
1182
+ htmlComment: i.string(),
1183
+ read: i.boolean(),
1184
+ updatedAt: i.string(),
1185
+ createdAt: i.string(),
1186
+ attachments: i.array(
1187
+ i.object({
1188
+ url: i.string(),
1189
+ mimeClass: i.string(),
1190
+ displayName: i.string(),
1191
+ contentType: i.string(),
1192
+ id: i.string()
793
1193
  })
794
1194
  ).nullable()
795
- }), gi = n.object({
796
- submissionComments: n.object({
797
- commentsConnection: n.object({
798
- pageInfo: cn,
799
- nodes: n.array(mn)
1195
+ }), Wi = i.object({
1196
+ submissionComments: i.object({
1197
+ commentsConnection: i.object({
1198
+ pageInfo: In,
1199
+ nodes: i.array(wn)
800
1200
  })
801
1201
  })
802
- }), lr = n.object({
803
- comments: n.array(mn),
804
- pageInfo: cn
805
- }), hi = n.object({
806
- submittedAt: n.string(),
807
- body: n.string().nullable(),
808
- grade: n.string().nullable(),
809
- score: n.number().nullable(),
810
- submissionType: n.string(),
811
- state: n.string(),
812
- attempt: n.number(),
813
- attachment: De.nullable(),
814
- attachments: n.array(De).nullable()
815
- }), bi = n.object({
816
- node: n.object({
817
- submissionHistoriesConnection: n.object({
818
- nodes: n.array(hi)
1202
+ }), zo = i.object({
1203
+ comments: i.array(wn),
1204
+ pageInfo: In
1205
+ }), qi = i.object({
1206
+ submittedAt: i.string(),
1207
+ body: i.string().nullable(),
1208
+ grade: i.string().nullable(),
1209
+ score: i.number().nullable(),
1210
+ submissionType: i.string(),
1211
+ state: i.string(),
1212
+ attempt: i.number(),
1213
+ attachment: ve.nullable(),
1214
+ attachments: i.array(ve).nullable()
1215
+ }), Yi = i.object({
1216
+ node: i.object({
1217
+ submissionHistoriesConnection: i.object({
1218
+ nodes: i.array(qi)
819
1219
  })
820
1220
  })
821
- }), Re = n.object({
822
- attribute: n.string(),
823
- message: n.string()
824
- }), Ti = n.object({
825
- createSubmissionComment: n.object({
826
- submissionComment: n.object({
827
- _id: n.string(),
828
- attachments: n.array(
829
- n.object({
830
- _id: n.string(),
831
- displayName: n.string(),
832
- id: n.string(),
833
- mimeClass: n.string(),
834
- url: n.string()
1221
+ }), Le = i.object({
1222
+ attribute: i.string(),
1223
+ message: i.string()
1224
+ }), Vi = i.object({
1225
+ createSubmissionComment: i.object({
1226
+ submissionComment: i.object({
1227
+ _id: i.string(),
1228
+ attachments: i.array(
1229
+ i.object({
1230
+ _id: i.string(),
1231
+ displayName: i.string(),
1232
+ id: i.string(),
1233
+ mimeClass: i.string(),
1234
+ url: i.string()
835
1235
  })
836
1236
  ).nullable(),
837
- author: n.object({
838
- avatarUrl: n.string().nullable(),
839
- shortName: n.string()
1237
+ author: i.object({
1238
+ avatarUrl: i.string().nullable(),
1239
+ shortName: i.string()
840
1240
  }),
841
- htmlComment: n.string(),
842
- mediaObject: n.object({
843
- id: n.string(),
844
- _id: n.string(),
845
- mediaSources: n.array(
846
- n.object({
847
- height: n.string(),
848
- src: n.string(),
849
- type: n.string(),
850
- width: n.string()
1241
+ htmlComment: i.string(),
1242
+ mediaObject: i.object({
1243
+ id: i.string(),
1244
+ _id: i.string(),
1245
+ mediaSources: i.array(
1246
+ i.object({
1247
+ height: i.string(),
1248
+ src: i.string(),
1249
+ type: i.string(),
1250
+ width: i.string()
851
1251
  })
852
1252
  ),
853
- mediaTracks: n.array(
854
- n.object({
855
- _id: n.string(),
856
- locale: n.string(),
857
- content: n.string(),
858
- kind: n.string()
1253
+ mediaTracks: i.array(
1254
+ i.object({
1255
+ _id: i.string(),
1256
+ locale: i.string(),
1257
+ content: i.string(),
1258
+ kind: i.string()
859
1259
  })
860
1260
  ),
861
- mediaType: n.string(),
862
- title: n.string()
1261
+ mediaType: i.string(),
1262
+ title: i.string()
863
1263
  }).nullable(),
864
- read: n.boolean(),
865
- updatedAt: n.string()
1264
+ read: i.boolean(),
1265
+ updatedAt: i.string()
866
1266
  }).nullable(),
867
- errors: n.array(Re).nullable()
1267
+ errors: i.array(Le).nullable()
868
1268
  })
869
- }), Ai = n.object({
870
- markSubmissionCommentsRead: n.object({
871
- errors: n.array(Re).nullable()
1269
+ }), Xi = i.object({
1270
+ markSubmissionCommentsRead: i.object({
1271
+ errors: i.array(Le).nullable()
872
1272
  })
873
- }), cr = n.object({
874
- createSubmission: n.object({
875
- submission: n.object({
876
- _id: n.string(),
877
- createdAt: n.string(),
878
- attempt: n.number(),
879
- submittedAt: n.string().nullable(),
880
- score: n.number().nullable()
1273
+ }), jo = i.object({
1274
+ createSubmission: i.object({
1275
+ submission: i.object({
1276
+ _id: i.string(),
1277
+ createdAt: i.string(),
1278
+ attempt: i.number(),
1279
+ submittedAt: i.string().nullable(),
1280
+ score: i.number().nullable()
881
1281
  }).nullable(),
882
- errors: n.array(Re).nullable()
1282
+ errors: i.array(Le).nullable()
883
1283
  })
884
- }), mr = n.object(
1284
+ }), Ho = i.object(
885
1285
  {
886
- createSubmissionDraft: n.object({
887
- submissionDraft: n.object({
888
- _id: n.string()
1286
+ createSubmissionDraft: i.object({
1287
+ submissionDraft: i.object({
1288
+ _id: i.string()
889
1289
  }).nullable(),
890
- errors: n.array(Re).nullable()
1290
+ errors: i.array(Le).nullable()
891
1291
  })
892
1292
  }
893
- ), ur = n.object(
1293
+ ), $o = i.object(
894
1294
  {
895
- deleteSubmissionDraft: n.object({
896
- submissionDraftIds: n.array(n.string()).nullable(),
897
- errors: n.array(Re).nullable()
1295
+ deleteSubmissionDraft: i.object({
1296
+ submissionDraftIds: i.array(i.string()).nullable(),
1297
+ errors: i.array(Le).nullable()
898
1298
  })
899
1299
  }
900
1300
  );
901
- function _i({
902
- courseId: t,
903
- assignmentId: r,
1301
+ function Ki({
1302
+ courseId: e,
1303
+ assignmentId: n,
904
1304
  userId: o,
905
- executeQuery: s,
1305
+ executeQuery: a,
906
1306
  enabled: l = !0
907
1307
  }) {
908
- return $e({
909
- queryKey: ["assignment-review", "assignment", t, r, o],
1308
+ return Ve({
1309
+ queryKey: ["assignment-review", "assignment", e, n, o],
910
1310
  queryFn: async () => {
911
- const c = await s(li, {
912
- courseId: t,
913
- assignmentId: r,
1311
+ const c = await a(Ui, {
1312
+ courseId: e,
1313
+ assignmentId: n,
914
1314
  userId: o
915
- }), f = pi.parse(c);
1315
+ }), d = Gi.parse(c);
916
1316
  return {
917
- ...f.legacyNode,
918
- courseName: f.course.name
1317
+ ...d.legacyNode,
1318
+ courseName: d.course.name
919
1319
  };
920
1320
  },
921
1321
  enabled: l
922
1322
  });
923
1323
  }
924
- function Si({
925
- submissionId: t,
926
- executeQuery: r,
1324
+ function Zi({
1325
+ submissionId: e,
1326
+ executeQuery: n,
927
1327
  enabled: o = !0
928
1328
  }) {
929
- return $e({
930
- queryKey: ["assignment-review", "submissions", t],
1329
+ return Ve({
1330
+ queryKey: ["assignment-review", "submissions", e],
931
1331
  queryFn: async () => {
932
- const s = await r(mi, { submissionId: t });
933
- return bi.parse(s).node.submissionHistoriesConnection.nodes.slice().sort(
934
- (c, f) => new Date(f.submittedAt).getTime() - new Date(c.submittedAt).getTime()
1332
+ const a = await n(ji, { submissionId: e });
1333
+ return Yi.parse(a).node.submissionHistoriesConnection.nodes.slice().sort(
1334
+ (c, d) => new Date(d.submittedAt).getTime() - new Date(c.submittedAt).getTime()
935
1335
  );
936
1336
  },
937
1337
  enabled: o
938
1338
  });
939
1339
  }
940
- function yi(t) {
941
- if (!t) return "";
942
- const r = new Date(t);
943
- return Number.isNaN(r.getTime()) ? "" : r.toLocaleDateString();
1340
+ function Qi(e) {
1341
+ if (!e) return "";
1342
+ const n = new Date(e);
1343
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString();
944
1344
  }
945
- function Ei({
946
- submission: t,
947
- isSelected: r,
1345
+ function Ji({
1346
+ submission: e,
1347
+ isSelected: n,
948
1348
  isDraft: o = !1,
949
- pointsPossible: s,
1349
+ pointsPossible: a,
950
1350
  onClick: l
951
1351
  }) {
952
- const c = B(), f = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: t.attempt }), b = t.score != null && s != null ? `${t.score}/${s}` : null;
953
- return /* @__PURE__ */ i(
954
- Y,
1352
+ const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }), b = e.score != null && a != null ? `${e.score}/${a}` : null;
1353
+ return /* @__PURE__ */ r(
1354
+ K,
955
1355
  {
956
1356
  as: "div",
957
1357
  padding: "small medium",
958
1358
  borderWidth: "small",
959
- borderColor: r ? "brand" : "primary",
1359
+ borderColor: n ? "brand" : "primary",
960
1360
  borderRadius: "medium",
961
- background: r ? "secondary" : "primary",
1361
+ background: n ? "secondary" : "primary",
962
1362
  cursor: "pointer",
963
1363
  onClick: l,
964
1364
  role: "button",
965
1365
  tabIndex: 0,
966
- onKeyDown: (m) => {
967
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), l());
1366
+ onKeyDown: (u) => {
1367
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), l());
968
1368
  },
969
- children: /* @__PURE__ */ _(h, { justifyItems: "space-between", alignItems: "center", children: [
970
- /* @__PURE__ */ _(h, { direction: "column", gap: "xx-small", children: [
971
- /* @__PURE__ */ _(h, { gap: "small", alignItems: "center", children: [
972
- /* @__PURE__ */ i(y, { weight: "bold", children: f }),
973
- o && /* @__PURE__ */ i(ft, { color: "info", children: c.submissionDraft() })
1369
+ children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
1370
+ /* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
1371
+ /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
1372
+ /* @__PURE__ */ r(_, { weight: "bold", children: d }),
1373
+ o && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
974
1374
  ] }),
975
- !o && t.submittedAt && /* @__PURE__ */ i(y, { size: "small", color: "secondary", children: yi(t.submittedAt) })
1375
+ !o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Qi(e.submittedAt) })
976
1376
  ] }),
977
- b && /* @__PURE__ */ i(y, { weight: "bold", children: b })
1377
+ b && /* @__PURE__ */ r(_, { weight: "bold", children: b })
978
1378
  ] })
979
1379
  }
980
1380
  );
981
1381
  }
982
- function Ii({
983
- submissionId: t,
984
- selectedAttempt: r,
1382
+ function eo({
1383
+ submissionId: e,
1384
+ selectedAttempt: n,
985
1385
  onAttemptSelect: o,
986
- pointsPossible: s,
1386
+ pointsPossible: a,
987
1387
  executeQuery: l
988
1388
  }) {
989
- const c = B(), { data: f, isLoading: b, isError: m } = Si({
990
- submissionId: t,
1389
+ const c = q(), { data: d, isLoading: b, isError: u } = Zi({
1390
+ submissionId: e,
991
1391
  executeQuery: l
992
1392
  });
993
1393
  if (b)
994
- return /* @__PURE__ */ i(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ i(He, { renderTitle: c.navigationAttempts(), size: "small" }) });
995
- if (m)
996
- return /* @__PURE__ */ i(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ i(y, { color: "danger", children: c.submissionLoadAttemptsError() }) });
997
- const p = (f == null ? void 0 : f.filter((g) => g.attempt > 0)) ?? [];
998
- return p.length === 0 ? /* @__PURE__ */ i(h, { padding: "medium", children: /* @__PURE__ */ i(y, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ i(h, { direction: "column", gap: "x-small", padding: "none none medium none", children: p.map((g) => /* @__PURE__ */ i(
999
- Ei,
1394
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: c.navigationAttempts(), size: "small" }) });
1395
+ if (u)
1396
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: c.submissionLoadAttemptsError() }) });
1397
+ const f = (d == null ? void 0 : d.filter((g) => g.attempt > 0)) ?? [];
1398
+ return f.length === 0 ? /* @__PURE__ */ r(h, { padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", padding: "none none medium none", children: f.map((g) => /* @__PURE__ */ r(
1399
+ Ji,
1000
1400
  {
1001
1401
  submission: g,
1002
- isSelected: r === g.attempt,
1003
- pointsPossible: s,
1402
+ isSelected: n === g.attempt,
1403
+ pointsPossible: a,
1004
1404
  onClick: () => o(g)
1005
1405
  },
1006
1406
  g.attempt
1007
1407
  )) });
1008
1408
  }
1009
- function un({
1010
- attachments: t,
1011
- size: r = "medium"
1409
+ function Cn({
1410
+ attachments: e,
1411
+ size: n = "medium"
1012
1412
  }) {
1013
- return t.length === 0 ? null : /* @__PURE__ */ i(h, { direction: "column", gap: "x-small", children: t.map((o) => /* @__PURE__ */ i(
1014
- Y,
1413
+ return e.length === 0 ? null : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: e.map((o) => /* @__PURE__ */ r(
1414
+ K,
1015
1415
  {
1016
1416
  as: "div",
1017
- padding: r === "small" ? "x-small" : "small medium",
1417
+ padding: n === "small" ? "x-small" : "small medium",
1018
1418
  borderColor: "primary",
1019
1419
  borderWidth: "small",
1020
1420
  borderRadius: "medium",
1021
- children: /* @__PURE__ */ _(h, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
1022
- /* @__PURE__ */ i(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ i(en, { children: o.displayName }) }),
1023
- /* @__PURE__ */ i(Fn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ i(Ln, {}), children: /* @__PURE__ */ i(pt, { children: `Download ${o.displayName}` }) })
1421
+ children: /* @__PURE__ */ S(h, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
1422
+ /* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(bn, { children: o.displayName }) }),
1423
+ /* @__PURE__ */ r(Qn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r($n, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${o.displayName}` }) })
1024
1424
  ] })
1025
1425
  },
1026
1426
  o.id
1027
1427
  )) });
1028
1428
  }
1029
- function Ci(t) {
1030
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1429
+ function to(e) {
1430
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1031
1431
  }
1032
- function Di({
1033
- submission: t,
1034
- isLastAttempt: r = !0,
1432
+ function no({
1433
+ submission: e,
1434
+ isLastAttempt: n = !0,
1035
1435
  showAttemptLabel: o = !0,
1036
- renderHTML: s
1436
+ renderHTML: a
1037
1437
  }) {
1038
- const l = B(), c = s ?? Ci, f = (t == null ? void 0 : t.submissionType) === "online_text_entry", b = (t == null ? void 0 : t.submissionType) === "online_upload", m = f ? l.submissionTextHeading() : l.submissionUploadHeading(), p = je(() => {
1039
- if (!t) return [];
1040
- const D = [];
1041
- if (t.attachment && D.push(t.attachment), t.attachments)
1042
- for (const I of t.attachments)
1043
- D.some((E) => E.id === I.id) || D.push(I);
1044
- return D;
1045
- }, [t]), g = je(() => c((t == null ? void 0 : t.body) ?? ""), [t == null ? void 0 : t.body, c]);
1046
- return t ? /* @__PURE__ */ i(Y, { as: "div", children: /* @__PURE__ */ _(h, { direction: "column", gap: "small", children: [
1047
- o && !r && t.attempt != null && /* @__PURE__ */ i(y, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: t.attempt }) }),
1048
- /* @__PURE__ */ _(h, { gap: "x-small", alignItems: "center", children: [
1049
- /* @__PURE__ */ i(wn, { color: "success" }),
1050
- /* @__PURE__ */ i(dt, { level: "h3", children: m })
1438
+ const l = q(), c = a ?? to, d = (e == null ? void 0 : e.submissionType) === "online_text_entry", b = (e == null ? void 0 : e.submissionType) === "online_upload", u = d ? l.submissionTextHeading() : l.submissionUploadHeading(), f = qe(() => {
1439
+ if (!e) return [];
1440
+ const C = [];
1441
+ if (e.attachment && C.push(e.attachment), e.attachments)
1442
+ for (const I of e.attachments)
1443
+ C.some((w) => w.id === I.id) || C.push(I);
1444
+ return C;
1445
+ }, [e]), g = qe(() => c((e == null ? void 0 : e.body) ?? ""), [e == null ? void 0 : e.body, c]);
1446
+ return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(h, { direction: "column", gap: "small", children: [
1447
+ o && !n && e.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: e.attempt }) }),
1448
+ /* @__PURE__ */ S(h, { gap: "x-small", alignItems: "center", children: [
1449
+ /* @__PURE__ */ r(Bn, { color: "success" }),
1450
+ /* @__PURE__ */ r(St, { level: "h3", children: u })
1051
1451
  ] }),
1052
- f && t.body && /* @__PURE__ */ _(h, { alignItems: "stretch", gap: "small", children: [
1053
- /* @__PURE__ */ i(Y, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
1054
- /* @__PURE__ */ i(Y, { as: "div", children: /* @__PURE__ */ i(y, { children: g }) })
1452
+ d && e.body && /* @__PURE__ */ S(h, { alignItems: "stretch", gap: "small", children: [
1453
+ /* @__PURE__ */ r(K, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
1454
+ /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children: g }) })
1055
1455
  ] }),
1056
- b && p.length > 0 && /* @__PURE__ */ i(un, { attachments: p })
1456
+ b && f.length > 0 && /* @__PURE__ */ r(Cn, { attachments: f })
1057
1457
  ] }) }) : null;
1058
1458
  }
1059
- function Ri(t) {
1060
- const r = new Date(t);
1061
- return Number.isNaN(r.getTime()) ? "" : r.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
1459
+ function io(e) {
1460
+ const n = new Date(e);
1461
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
1062
1462
  }
1063
- function Li() {
1064
- return /* @__PURE__ */ i(y, { color: "secondary", size: "small", children: "|" });
1463
+ function oo() {
1464
+ return /* @__PURE__ */ r(_, { color: "secondary", size: "small", children: "|" });
1065
1465
  }
1066
- function wi({
1067
- score: t,
1068
- pointsPossible: r,
1466
+ function ro({
1467
+ score: e,
1468
+ pointsPossible: n,
1069
1469
  gradingType: o,
1070
- dueAt: s,
1470
+ dueAt: a,
1071
1471
  allowedAttempts: l,
1072
1472
  currentAttempt: c,
1073
- isOverdue: f,
1473
+ isOverdue: d,
1074
1474
  estimatedDuration: b,
1075
- labels: m
1475
+ labels: u
1076
1476
  }) {
1077
- const p = B(), g = [];
1477
+ const f = q(), g = [];
1078
1478
  return b && g.push(
1079
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.duration) ?? p.headerDuration({ minutes: b }) }, "duration")
1080
- ), t != null && r != null ? g.push(
1081
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.score) ?? p.headerScore({ score: t, total: r }) }, "score")
1082
- ) : r != null && o !== "not_graded" && g.push(
1083
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.pointsPossible) ?? p.headerPointsPossible({ points: r }) }, "points")
1479
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.duration) ?? f.headerDuration({ minutes: b }) }, "duration")
1480
+ ), e != null && n != null ? g.push(
1481
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.score) ?? f.headerScore({ score: e, total: n }) }, "score")
1482
+ ) : n != null && o !== "not_graded" && g.push(
1483
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.pointsPossible) ?? f.headerPointsPossible({ points: n }) }, "points")
1084
1484
  ), l != null && (l === -1 ? g.push(
1085
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsUnlimited() }, "attempts")
1485
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsUnlimited() }, "attempts")
1086
1486
  ) : c != null ? g.push(
1087
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptOf({ current: c, total: l }) }, "attempts")
1487
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptOf({ current: c, total: l }) }, "attempts")
1088
1488
  ) : g.push(
1089
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsAllowed({ count: l }) }, "attempts")
1090
- )), s && g.push(
1091
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.dueDate) ?? p.headerDueDate({ date: Ri(s) }) }, "due")
1092
- ), /* @__PURE__ */ _(h, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
1093
- g.map((D, I) => /* @__PURE__ */ _(h, { gap: "small", alignItems: "center", children: [
1094
- I > 0 && /* @__PURE__ */ i(Li, {}),
1095
- D
1489
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsAllowed({ count: l }) }, "attempts")
1490
+ )), a && g.push(
1491
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.dueDate) ?? f.headerDueDate({ date: io(a) }) }, "due")
1492
+ ), /* @__PURE__ */ S(h, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
1493
+ g.map((C, I) => /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
1494
+ I > 0 && /* @__PURE__ */ r(oo, {}),
1495
+ C
1096
1496
  ] }, `item-${String(I)}`)),
1097
- f && /* @__PURE__ */ i(ft, { color: "danger", children: (m == null ? void 0 : m.overdue) ?? p.headerOverdue() })
1497
+ d && /* @__PURE__ */ r(_t, { color: "danger", children: (u == null ? void 0 : u.overdue) ?? f.headerOverdue() })
1098
1498
  ] });
1099
1499
  }
1100
- const vi = ne`
1500
+ const so = ae`
1101
1501
  mutation CreateSubmissionComment(
1102
1502
  $id: ID!
1103
1503
  $submissionAttempt: Int!
@@ -1187,7 +1587,7 @@ const vi = ne`
1187
1587
  mimeClass
1188
1588
  url
1189
1589
  }
1190
- `, Ni = ne`
1590
+ `, ao = ae`
1191
1591
  mutation MarkSubmissionCommentsRead(
1192
1592
  $submissionId: ID!
1193
1593
  $submissionCommentIds: [ID!]!
@@ -1204,7 +1604,7 @@ const vi = ne`
1204
1604
  }
1205
1605
  }
1206
1606
  }
1207
- `, dr = ne`
1607
+ `, Bo = ae`
1208
1608
  mutation CreateSubmission(
1209
1609
  $assignmentLid: ID!
1210
1610
  $submissionType: OnlineSubmissionType!
@@ -1232,7 +1632,7 @@ const vi = ne`
1232
1632
  }
1233
1633
  }
1234
1634
  }
1235
- `, fr = ne`
1635
+ `, Go = ae`
1236
1636
  mutation CreateSubmissionDraft(
1237
1637
  $submissionId: ID!
1238
1638
  $submissionType: DraftableSubmissionType!
@@ -1258,7 +1658,7 @@ const vi = ne`
1258
1658
  }
1259
1659
  }
1260
1660
  }
1261
- `, pr = ne`
1661
+ `, Wo = ae`
1262
1662
  mutation DeleteSubmissionDraft($submissionId: ID!) {
1263
1663
  deleteSubmissionDraft(input: { submissionId: $submissionId }) {
1264
1664
  submissionDraftIds
@@ -1269,123 +1669,123 @@ const vi = ne`
1269
1669
  }
1270
1670
  }
1271
1671
  `;
1272
- function Oi({
1273
- executeQuery: t
1672
+ function lo({
1673
+ executeQuery: e
1274
1674
  }) {
1275
- const r = Xt();
1276
- return Kt({
1277
- mutationFn: async ({ submissionId: o, attempt: s, comment: l, fileIds: c }) => {
1278
- const f = await t(vi, {
1675
+ const n = dn();
1676
+ return fn({
1677
+ mutationFn: async ({ submissionId: o, attempt: a, comment: l, fileIds: c }) => {
1678
+ const d = await e(so, {
1279
1679
  id: o,
1280
- submissionAttempt: s,
1680
+ submissionAttempt: a,
1281
1681
  comment: l,
1282
1682
  fileIds: c
1283
1683
  });
1284
- return Ti.parse(f), f;
1684
+ return Vi.parse(d), d;
1285
1685
  },
1286
- onSuccess: (o, s) => {
1287
- r.invalidateQueries({
1288
- queryKey: ["assignment-review", "submission-comments", s.submissionId]
1686
+ onSuccess: (o, a) => {
1687
+ n.invalidateQueries({
1688
+ queryKey: ["assignment-review", "submission-comments", a.submissionId]
1289
1689
  });
1290
1690
  }
1291
1691
  });
1292
1692
  }
1293
- function Mi({
1294
- submissionId: t,
1295
- courseId: r,
1693
+ function co({
1694
+ submissionId: e,
1695
+ courseId: n,
1296
1696
  pageParams: o,
1297
- direction: s,
1697
+ direction: a,
1298
1698
  executeQuery: l,
1299
1699
  enabled: c
1300
1700
  }) {
1301
- return $e({
1701
+ return Ve({
1302
1702
  queryKey: [
1303
1703
  "assignment-review",
1304
1704
  "submission-comments",
1305
- t,
1306
- r,
1705
+ e,
1706
+ n,
1307
1707
  o == null ? void 0 : o.startCursor,
1308
1708
  o == null ? void 0 : o.endCursor,
1309
- s
1709
+ a
1310
1710
  ],
1311
1711
  queryFn: async () => {
1312
- const f = await l(ci, {
1313
- submissionId: t,
1314
- courseId: r,
1315
- beforeCursor: s === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
1316
- afterCursor: s === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
1317
- first: s === "next" ? 5 : null,
1318
- last: s === "prev" || !s ? 5 : null
1319
- }), b = gi.parse(f);
1712
+ const d = await l(zi, {
1713
+ submissionId: e,
1714
+ courseId: n,
1715
+ beforeCursor: a === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
1716
+ afterCursor: a === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
1717
+ first: a === "next" ? 5 : null,
1718
+ last: a === "prev" || !a ? 5 : null
1719
+ }), b = Wi.parse(d);
1320
1720
  return {
1321
1721
  comments: [...b.submissionComments.commentsConnection.nodes].sort(
1322
- (p, g) => new Date(p.createdAt).getTime() - new Date(g.createdAt).getTime()
1722
+ (f, g) => new Date(f.createdAt).getTime() - new Date(g.createdAt).getTime()
1323
1723
  ),
1324
1724
  pageInfo: b.submissionComments.commentsConnection.pageInfo
1325
1725
  };
1326
1726
  },
1327
- enabled: c ?? !!t
1727
+ enabled: c ?? !!e
1328
1728
  });
1329
1729
  }
1330
- function xi({
1331
- executeQuery: t
1730
+ function mo({
1731
+ executeQuery: e
1332
1732
  }) {
1333
- const r = Xt();
1334
- return Kt({
1335
- mutationFn: async ({ submissionId: o, submissionCommentIds: s }) => {
1336
- const l = await t(
1337
- Ni,
1338
- { submissionId: o, submissionCommentIds: s }
1733
+ const n = dn();
1734
+ return fn({
1735
+ mutationFn: async ({ submissionId: o, submissionCommentIds: a }) => {
1736
+ const l = await e(
1737
+ ao,
1738
+ { submissionId: o, submissionCommentIds: a }
1339
1739
  );
1340
- return Ai.parse(l), l;
1740
+ return Xi.parse(l), l;
1341
1741
  },
1342
- onSuccess: (o, s) => {
1343
- r.invalidateQueries({
1742
+ onSuccess: (o, a) => {
1743
+ n.invalidateQueries({
1344
1744
  queryKey: ["assignment-review", "assignment"],
1345
- predicate: (l) => l.queryKey.includes(s.assignmentId)
1745
+ predicate: (l) => l.queryKey.includes(a.assignmentId)
1346
1746
  });
1347
1747
  }
1348
1748
  });
1349
1749
  }
1350
- function ki(t) {
1351
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1750
+ function uo(e) {
1751
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1352
1752
  }
1353
- function Pi(t) {
1354
- const r = new Date(t);
1355
- return Number.isNaN(r.getTime()) ? "" : r.toLocaleString();
1753
+ function fo(e) {
1754
+ const n = new Date(e);
1755
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
1356
1756
  }
1357
- function Ui({
1358
- comment: t,
1359
- isFullWidth: r,
1757
+ function po({
1758
+ comment: e,
1759
+ isFullWidth: n,
1360
1760
  renderHTML: o
1361
1761
  }) {
1362
- var m;
1363
- const s = B(), l = o ?? ki, c = ((m = t.author.courseRoles) == null ? void 0 : m.includes("StudentEnrollment")) ?? !1, f = je(() => l(t.htmlComment), [t.htmlComment, l]);
1364
- return /* @__PURE__ */ i(
1365
- Y,
1762
+ var u;
1763
+ const a = q(), l = o ?? uo, c = ((u = e.author.courseRoles) == null ? void 0 : u.includes("StudentEnrollment")) ?? !1, d = qe(() => l(e.htmlComment), [e.htmlComment, l]);
1764
+ return /* @__PURE__ */ r(
1765
+ K,
1366
1766
  {
1367
1767
  as: "div",
1368
1768
  padding: "small medium",
1369
1769
  borderWidth: "small",
1370
1770
  borderColor: "primary",
1371
1771
  borderRadius: "medium",
1372
- margin: r ? "none" : c ? "none none none medium" : "none medium none none",
1373
- children: /* @__PURE__ */ _(h, { as: "div", direction: "column", gap: "small", children: [
1374
- /* @__PURE__ */ _(h, { as: "div", direction: "column", gap: "xx-small", children: [
1375
- /* @__PURE__ */ _(h, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
1376
- /* @__PURE__ */ i(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ i(y, { weight: "bold", size: "medium", children: /* @__PURE__ */ i(en, { children: t.author.shortName }) }) }),
1377
- !t.read && /* @__PURE__ */ i(nn, { type: "notification", standalone: !0, children: /* @__PURE__ */ i(pt, { children: s.commentsUnreadSingle() }) })
1772
+ margin: n ? "none" : c ? "none none none medium" : "none medium none none",
1773
+ children: /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", children: [
1774
+ /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "xx-small", children: [
1775
+ /* @__PURE__ */ S(h, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
1776
+ /* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(bn, { children: e.author.shortName }) }) }),
1777
+ !e.read && /* @__PURE__ */ r(yn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: a.commentsUnreadSingle() }) })
1378
1778
  ] }),
1379
- /* @__PURE__ */ i(y, { size: "small", color: "secondary", children: Pi(t.createdAt) }),
1380
- t.attempt > 0 && /* @__PURE__ */ i(y, { size: "small", color: "secondary", children: s.commentsAttempt({ number: t.attempt }) })
1779
+ /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: fo(e.createdAt) }),
1780
+ e.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: a.commentsAttempt({ number: e.attempt }) })
1381
1781
  ] }),
1382
- /* @__PURE__ */ i(y, { size: "medium", children: f }),
1383
- t.attachments && t.attachments.length > 0 && /* @__PURE__ */ i(
1384
- un,
1782
+ /* @__PURE__ */ r(_, { size: "medium", children: d }),
1783
+ e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r(
1784
+ Cn,
1385
1785
  {
1386
- attachments: t.attachments.map((p) => ({
1387
- ...p,
1388
- _id: p._id ?? p.id,
1786
+ attachments: e.attachments.map((f) => ({
1787
+ ...f,
1788
+ _id: f._id ?? f.id,
1389
1789
  submissionPreviewUrl: null
1390
1790
  })),
1391
1791
  size: "small"
@@ -1395,507 +1795,507 @@ function Ui({
1395
1795
  }
1396
1796
  );
1397
1797
  }
1398
- function Fi({
1399
- submissionId: t,
1400
- courseId: r,
1798
+ function go({
1799
+ submissionId: e,
1800
+ courseId: n,
1401
1801
  assignmentId: o,
1402
- attempt: s,
1802
+ attempt: a,
1403
1803
  canPostComment: l,
1404
1804
  onCommentPosted: c,
1405
- renderHTML: f,
1805
+ renderHTML: d,
1406
1806
  executeQuery: b
1407
1807
  }) {
1408
- const m = B(), [p, g] = ge(""), [D, I] = ge({}), E = Dn(/* @__PURE__ */ new Set()), { data: T, isLoading: ie, isError: ae } = Mi({
1409
- submissionId: t,
1410
- courseId: r,
1411
- pageParams: D.pageParams,
1412
- direction: D.direction,
1808
+ const u = q(), [f, g] = Ee(""), [C, I] = Ee({}), w = jn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = co({
1809
+ submissionId: e,
1810
+ courseId: n,
1811
+ pageParams: C.pageParams,
1812
+ direction: C.direction,
1413
1813
  executeQuery: b
1414
- }), re = Oi({ executeQuery: b }), v = xi({ executeQuery: b });
1415
- ct(() => {
1416
- if (!(T != null && T.comments) || T.comments.length === 0) return;
1417
- const k = T.comments.filter((P) => !P.read && !E.current.has(P._id)).filter((P) => {
1418
- var le;
1419
- return !((le = P.author.courseRoles) != null && le.includes("StudentEnrollment"));
1420
- }).map((P) => P._id);
1421
- if (k.length > 0) {
1422
- for (const P of k)
1423
- E.current.add(P);
1424
- v.mutate({ submissionId: t, assignmentId: o, submissionCommentIds: k });
1814
+ }), le = lo({ executeQuery: b }), M = mo({ executeQuery: b });
1815
+ Tt(() => {
1816
+ if (!(y != null && y.comments) || y.comments.length === 0) return;
1817
+ const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
1818
+ var J;
1819
+ return !((J = N.author.courseRoles) != null && J.includes("StudentEnrollment"));
1820
+ }).map((N) => N._id);
1821
+ if (E.length > 0) {
1822
+ for (const N of E)
1823
+ w.current.add(N);
1824
+ M.mutate({ submissionId: e, assignmentId: o, submissionCommentIds: E });
1425
1825
  }
1426
- }, [T == null ? void 0 : T.comments, t, o, v]);
1427
- const q = T == null ? void 0 : T.comments.some(
1428
- (k) => {
1429
- var P;
1430
- return !((P = k.author.courseRoles) != null && P.includes("StudentEnrollment"));
1826
+ }, [y == null ? void 0 : y.comments, e, o, M]);
1827
+ const ne = y == null ? void 0 : y.comments.some(
1828
+ (E) => {
1829
+ var N;
1830
+ return !((N = E.author.courseRoles) != null && N.includes("StudentEnrollment"));
1431
1831
  }
1432
- ), S = () => {
1433
- p.trim() && re.mutate(
1434
- { submissionId: t, attempt: s, comment: p },
1832
+ ), O = () => {
1833
+ f.trim() && le.mutate(
1834
+ { submissionId: e, attempt: a, comment: f },
1435
1835
  {
1436
1836
  onSuccess: () => {
1437
1837
  g(""), c == null || c();
1438
1838
  }
1439
1839
  }
1440
1840
  );
1441
- }, V = (T == null ? void 0 : T.pageInfo.hasNextPage) || (T == null ? void 0 : T.pageInfo.hasPreviousPage);
1442
- return ie || !T && !ae ? /* @__PURE__ */ i(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ i(He, { renderTitle: m.commentsPanelTitle(), size: "small" }) }) : ae ? /* @__PURE__ */ i(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ i(y, { color: "danger", children: m.commentsLoadError() }) }) : /* @__PURE__ */ _(h, { as: "div", direction: "column", justifyItems: "space-between", height: "100%", children: [
1443
- /* @__PURE__ */ _(h, { as: "div", direction: "column", children: [
1444
- T.comments.length === 0 ? /* @__PURE__ */ i(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ i(y, { color: "secondary", children: m.commentsEmpty() }) }) : /* @__PURE__ */ i(h, { direction: "column", gap: "x-small", children: T.comments.map((k) => /* @__PURE__ */ i(
1445
- Ui,
1841
+ }, ce = (y == null ? void 0 : y.pageInfo.hasNextPage) || (y == null ? void 0 : y.pageInfo.hasPreviousPage);
1842
+ return V || !y && !fe ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: u.commentsPanelTitle(), size: "small" }) }) : fe ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: u.commentsLoadError() }) }) : /* @__PURE__ */ S(h, { as: "div", direction: "column", justifyItems: "space-between", height: "100%", children: [
1843
+ /* @__PURE__ */ S(h, { as: "div", direction: "column", children: [
1844
+ y.comments.length === 0 ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: u.commentsEmpty() }) }) : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: y.comments.map((E) => /* @__PURE__ */ r(
1845
+ po,
1446
1846
  {
1447
- comment: k,
1448
- isFullWidth: !q,
1449
- renderHTML: f
1847
+ comment: E,
1848
+ isFullWidth: !ne,
1849
+ renderHTML: d
1450
1850
  },
1451
- k._id
1851
+ E._id
1452
1852
  )) }),
1453
- V && /* @__PURE__ */ _(h, { justifyItems: "space-between", padding: "small none", children: [
1454
- /* @__PURE__ */ i(
1455
- z,
1853
+ ce && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
1854
+ /* @__PURE__ */ r(
1855
+ $,
1456
1856
  {
1457
- renderIcon: () => /* @__PURE__ */ i(vn, {}),
1857
+ renderIcon: () => /* @__PURE__ */ r(Gn, {}),
1458
1858
  size: "small",
1459
- interaction: T.pageInfo.hasPreviousPage ? "enabled" : "disabled",
1460
- onClick: () => I({ pageParams: T.pageInfo, direction: "prev" }),
1461
- children: m.commentsPreviousComments()
1859
+ interaction: y.pageInfo.hasPreviousPage ? "enabled" : "disabled",
1860
+ onClick: () => I({ pageParams: y.pageInfo, direction: "prev" }),
1861
+ children: u.commentsPreviousComments()
1462
1862
  }
1463
1863
  ),
1464
- /* @__PURE__ */ i(
1465
- z,
1864
+ /* @__PURE__ */ r(
1865
+ $,
1466
1866
  {
1467
- renderIcon: () => /* @__PURE__ */ i(Nn, {}),
1867
+ renderIcon: () => /* @__PURE__ */ r(Wn, {}),
1468
1868
  size: "small",
1469
- interaction: T.pageInfo.hasNextPage ? "enabled" : "disabled",
1470
- onClick: () => I({ pageParams: T.pageInfo, direction: "next" }),
1471
- children: m.commentsNextComments()
1869
+ interaction: y.pageInfo.hasNextPage ? "enabled" : "disabled",
1870
+ onClick: () => I({ pageParams: y.pageInfo, direction: "next" }),
1871
+ children: u.commentsNextComments()
1472
1872
  }
1473
1873
  )
1474
1874
  ] })
1475
1875
  ] }),
1476
- l && /* @__PURE__ */ _(h, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
1477
- /* @__PURE__ */ i(
1478
- tn,
1876
+ l && /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
1877
+ /* @__PURE__ */ r(
1878
+ Tn,
1479
1879
  {
1480
1880
  resize: "vertical",
1481
- label: /* @__PURE__ */ i(y, { weight: "bold", size: "medium", children: m.commentsPlaceholder() }),
1482
- value: p,
1483
- onChange: (k) => g(k.target.value)
1881
+ label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: u.commentsPlaceholder() }),
1882
+ value: f,
1883
+ onChange: (E) => g(E.target.value)
1484
1884
  }
1485
1885
  ),
1486
- /* @__PURE__ */ i(
1487
- z,
1886
+ /* @__PURE__ */ r(
1887
+ $,
1488
1888
  {
1489
1889
  color: "primary",
1490
- onClick: S,
1491
- interaction: p.trim().length > 0 && !re.isPending ? "enabled" : "disabled",
1492
- children: m.commentsPost()
1890
+ onClick: O,
1891
+ interaction: f.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
1892
+ children: u.commentsPost()
1493
1893
  }
1494
1894
  )
1495
1895
  ] })
1496
1896
  ] });
1497
1897
  }
1498
- function zi(t) {
1499
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1898
+ function ho(e) {
1899
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1500
1900
  }
1501
- function gr({
1502
- courseId: t,
1503
- assignmentId: r,
1901
+ function qo({
1902
+ courseId: e,
1903
+ assignmentId: n,
1504
1904
  userId: o,
1505
- feedbackMode: s = !1,
1905
+ feedbackMode: a = !1,
1506
1906
  onError: l,
1507
1907
  renderHTML: c,
1508
- renderPanels: f,
1908
+ renderPanels: d,
1509
1909
  executeQuery: b
1510
1910
  }) {
1511
- const m = B(), p = c ?? zi, {
1911
+ const u = q(), f = c ?? ho, {
1512
1912
  data: g,
1513
- isLoading: D,
1913
+ isLoading: C,
1514
1914
  isError: I,
1515
- error: E
1516
- } = _i({ courseId: t, assignmentId: r, userId: o, executeQuery: b }), [T, ie] = ge(null), [ae, re] = ge(
1517
- s ? "comments" : null
1518
- ), v = je(
1915
+ error: w
1916
+ } = Ki({ courseId: e, assignmentId: n, userId: o, executeQuery: b }), [y, V] = Ee(null), [fe, le] = Ee(
1917
+ a ? "comments" : null
1918
+ ), M = qe(
1519
1919
  () => (g == null ? void 0 : g.submissionsConnection.nodes[0]) ?? null,
1520
1920
  [g]
1521
- ), q = v != null && v.attempt > 0, S = T ?? v, V = T == null || T.attempt === (v == null ? void 0 : v.attempt), k = q && V, P = ((g == null ? void 0 : g.allowedAttempts) ?? 0) !== 1, le = Rn((be) => {
1522
- ie(be);
1921
+ ), ne = M != null && M.attempt > 0, O = y ?? M, ce = y == null || y.attempt === (M == null ? void 0 : M.attempt), E = ne && ce, N = ((g == null ? void 0 : g.allowedAttempts) ?? 0) !== 1, J = Hn((Ze) => {
1922
+ V(Ze);
1523
1923
  }, []);
1524
- if (ct(() => {
1525
- I && E && l && l(E);
1526
- }, [I, E, l]), ct(() => {
1527
- s && q && re("comments");
1528
- }, [s, q]), D)
1529
- return /* @__PURE__ */ i(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ i(He, { renderTitle: m.progressLoading() }) });
1924
+ if (Tt(() => {
1925
+ I && w && l && l(w);
1926
+ }, [I, w, l]), Tt(() => {
1927
+ a && ne && le("comments");
1928
+ }, [a, ne]), C)
1929
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: u.progressLoading() }) });
1530
1930
  if (I || !g)
1531
- return /* @__PURE__ */ i(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ i(y, { color: "danger", children: m.assignmentLoadError() }) });
1532
- const Ge = !!g.dueAt && new Date(g.dueAt) < /* @__PURE__ */ new Date() && !q, Be = v ? /* @__PURE__ */ i(
1533
- Fi,
1931
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: u.assignmentLoadError() }) });
1932
+ const Ie = !!g.dueAt && new Date(g.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = M ? /* @__PURE__ */ r(
1933
+ go,
1534
1934
  {
1535
- submissionId: v.id,
1536
- courseId: t,
1537
- assignmentId: r,
1538
- attempt: (S == null ? void 0 : S.attempt) ?? 0,
1539
- canPostComment: k,
1540
- renderHTML: p,
1935
+ submissionId: M.id,
1936
+ courseId: e,
1937
+ assignmentId: n,
1938
+ attempt: (O == null ? void 0 : O.attempt) ?? 0,
1939
+ canPostComment: E,
1940
+ renderHTML: f,
1541
1941
  executeQuery: b
1542
1942
  }
1543
- ) : null, O = P && v ? /* @__PURE__ */ i(
1544
- Ii,
1943
+ ) : null, Xe = N && M ? /* @__PURE__ */ r(
1944
+ eo,
1545
1945
  {
1546
- submissionId: v.id,
1547
- selectedAttempt: S == null ? void 0 : S.attempt,
1548
- onAttemptSelect: le,
1946
+ submissionId: M.id,
1947
+ selectedAttempt: O == null ? void 0 : O.attempt,
1948
+ onAttemptSelect: J,
1549
1949
  pointsPossible: g.pointsPossible,
1550
1950
  executeQuery: b
1551
1951
  }
1552
- ) : null, he = {
1553
- commentsPanel: Be,
1554
- attemptsPanel: O,
1555
- activePanel: ae,
1556
- setActivePanel: re,
1557
- unreadCommentCount: (v == null ? void 0 : v.unreadCommentCount) ?? 0,
1558
- hasMultipleAttempts: P
1952
+ ) : null, Ke = {
1953
+ commentsPanel: xe,
1954
+ attemptsPanel: Xe,
1955
+ activePanel: fe,
1956
+ setActivePanel: le,
1957
+ unreadCommentCount: (M == null ? void 0 : M.unreadCommentCount) ?? 0,
1958
+ hasMultipleAttempts: N
1559
1959
  };
1560
- return /* @__PURE__ */ _(h, { direction: "column", gap: "medium", children: [
1561
- /* @__PURE__ */ i(
1562
- wi,
1960
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
1961
+ /* @__PURE__ */ r(
1962
+ ro,
1563
1963
  {
1564
- score: S == null ? void 0 : S.score,
1964
+ score: O == null ? void 0 : O.score,
1565
1965
  pointsPossible: g.pointsPossible,
1566
1966
  gradingType: g.gradingType,
1567
1967
  dueAt: g.dueAt,
1568
1968
  allowedAttempts: g.allowedAttempts,
1569
- currentAttempt: S == null ? void 0 : S.attempt,
1570
- isOverdue: Ge
1969
+ currentAttempt: O == null ? void 0 : O.attempt,
1970
+ isOverdue: Ie
1571
1971
  }
1572
1972
  ),
1573
- g.description && /* @__PURE__ */ _(Y, { as: "div", children: [
1574
- /* @__PURE__ */ i(dt, { level: "h3", children: m.assignmentInstructions() }),
1575
- /* @__PURE__ */ i(Y, { as: "div", margin: "small none large none", children: p(g.description) })
1973
+ g.description && /* @__PURE__ */ S(K, { as: "div", children: [
1974
+ /* @__PURE__ */ r(St, { level: "h3", children: u.assignmentInstructions() }),
1975
+ /* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: f(g.description) })
1576
1976
  ] }),
1577
- /* @__PURE__ */ i(
1578
- Di,
1977
+ /* @__PURE__ */ r(
1978
+ no,
1579
1979
  {
1580
- submission: S,
1581
- isLastAttempt: V,
1582
- renderHTML: p
1980
+ submission: O,
1981
+ isLastAttempt: ce,
1982
+ renderHTML: f
1583
1983
  }
1584
1984
  ),
1585
- f ? f(he) : null
1985
+ d ? d(Ke) : null
1586
1986
  ] });
1587
1987
  }
1588
- function hr({
1589
- existingFiles: t,
1590
- onSubmit: r,
1988
+ function Yo({
1989
+ existingFiles: e,
1990
+ onSubmit: n,
1591
1991
  onSaveDraft: o,
1592
- onDiscardDraft: s,
1992
+ onDiscardDraft: a,
1593
1993
  onSelectFiles: l,
1594
1994
  isSubmitting: c = !1
1595
1995
  }) {
1596
- const f = B(), [b, m] = ge(t ?? []), p = async () => {
1597
- const E = await l();
1598
- m((T) => [...T, ...E]);
1599
- }, g = (E) => {
1600
- m((T) => T.filter((ie) => ie.id !== E));
1601
- }, D = b.map((E) => E.id), I = b.length > 0 && !c;
1602
- return /* @__PURE__ */ _(h, { direction: "column", gap: "medium", children: [
1603
- b.length > 0 && /* @__PURE__ */ i(h, { direction: "column", gap: "x-small", children: b.map((E) => /* @__PURE__ */ i(
1604
- Y,
1996
+ const d = q(), [b, u] = Ee(e ?? []), f = async () => {
1997
+ const w = await l();
1998
+ u((y) => [...y, ...w]);
1999
+ }, g = (w) => {
2000
+ u((y) => y.filter((V) => V.id !== w));
2001
+ }, C = b.map((w) => w.id), I = b.length > 0 && !c;
2002
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
2003
+ b.length > 0 && /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: b.map((w) => /* @__PURE__ */ r(
2004
+ K,
1605
2005
  {
1606
2006
  as: "div",
1607
2007
  padding: "small",
1608
2008
  borderWidth: "small",
1609
2009
  borderColor: "primary",
1610
2010
  borderRadius: "medium",
1611
- children: /* @__PURE__ */ _(h, { justifyItems: "space-between", alignItems: "center", children: [
1612
- /* @__PURE__ */ i(y, { children: E.name }),
1613
- /* @__PURE__ */ i(
1614
- z,
2011
+ children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
2012
+ /* @__PURE__ */ r(_, { children: w.name }),
2013
+ /* @__PURE__ */ r(
2014
+ $,
1615
2015
  {
1616
2016
  size: "small",
1617
- renderIcon: () => /* @__PURE__ */ i(On, {}),
1618
- onClick: () => g(E.id),
1619
- children: /* @__PURE__ */ _("span", { className: "screenreader-only", children: [
2017
+ renderIcon: () => /* @__PURE__ */ r(qn, {}),
2018
+ onClick: () => g(w.id),
2019
+ children: /* @__PURE__ */ S("span", { className: "screenreader-only", children: [
1620
2020
  "Remove ",
1621
- E.name
2021
+ w.name
1622
2022
  ] })
1623
2023
  }
1624
2024
  )
1625
2025
  ] })
1626
2026
  },
1627
- E.id
2027
+ w.id
1628
2028
  )) }),
1629
- /* @__PURE__ */ i(z, { onClick: p, children: f.submissionFormAddFiles() }),
1630
- /* @__PURE__ */ _(h, { gap: "small", children: [
1631
- /* @__PURE__ */ i(
1632
- z,
2029
+ /* @__PURE__ */ r($, { onClick: f, children: d.submissionFormAddFiles() }),
2030
+ /* @__PURE__ */ S(h, { gap: "small", children: [
2031
+ /* @__PURE__ */ r(
2032
+ $,
1633
2033
  {
1634
2034
  color: "primary",
1635
- onClick: () => r(D),
2035
+ onClick: () => n(C),
1636
2036
  interaction: I ? "enabled" : "disabled",
1637
- children: f.submissionFormSubmit()
2037
+ children: d.submissionFormSubmit()
1638
2038
  }
1639
2039
  ),
1640
- o && /* @__PURE__ */ i(
1641
- z,
2040
+ o && /* @__PURE__ */ r(
2041
+ $,
1642
2042
  {
1643
- onClick: () => o(D),
2043
+ onClick: () => o(C),
1644
2044
  interaction: b.length > 0 ? "enabled" : "disabled",
1645
- children: f.submissionFormSaveDraft()
2045
+ children: d.submissionFormSaveDraft()
1646
2046
  }
1647
2047
  ),
1648
- s && t && t.length > 0 && /* @__PURE__ */ i(z, { color: "primary-inverse", onClick: s, children: f.submissionFormDiscardDraft() })
2048
+ a && e && e.length > 0 && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: d.submissionFormDiscardDraft() })
1649
2049
  ] })
1650
2050
  ] });
1651
2051
  }
1652
- function br({
1653
- prevItem: t,
1654
- nextItem: r,
2052
+ function Vo({
2053
+ prevItem: e,
2054
+ nextItem: n,
1655
2055
  onNavigatePrev: o,
1656
- onNavigateNext: s,
2056
+ onNavigateNext: a,
1657
2057
  labels: l
1658
2058
  }) {
1659
- const c = B();
1660
- if (!t && !r)
2059
+ const c = q();
2060
+ if (!e && !n)
1661
2061
  return null;
1662
- const f = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), b = (l == null ? void 0 : l.next) ?? c.navigationNext();
1663
- return /* @__PURE__ */ _(h, { justifyItems: "space-between", padding: "small none", children: [
1664
- t ? /* @__PURE__ */ i(
1665
- z,
2062
+ const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), b = (l == null ? void 0 : l.next) ?? c.navigationNext();
2063
+ return /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
2064
+ e ? /* @__PURE__ */ r(
2065
+ $,
1666
2066
  {
1667
- renderIcon: () => /* @__PURE__ */ i(Zt, {}),
2067
+ renderIcon: () => /* @__PURE__ */ r(pn, {}),
1668
2068
  onClick: o,
1669
- "aria-label": `${f}: ${t.title}`,
1670
- children: f
2069
+ "aria-label": `${d}: ${e.title}`,
2070
+ children: d
1671
2071
  }
1672
- ) : /* @__PURE__ */ i("div", {}),
1673
- r ? /* @__PURE__ */ i(
1674
- z,
2072
+ ) : /* @__PURE__ */ r("div", {}),
2073
+ n ? /* @__PURE__ */ r(
2074
+ $,
1675
2075
  {
1676
- renderIcon: () => /* @__PURE__ */ i(Qt, {}),
1677
- onClick: s,
1678
- "aria-label": `${b}: ${r.title}`,
2076
+ renderIcon: () => /* @__PURE__ */ r(gn, {}),
2077
+ onClick: a,
2078
+ "aria-label": `${b}: ${n.title}`,
1679
2079
  children: b
1680
2080
  }
1681
- ) : /* @__PURE__ */ i("div", {})
2081
+ ) : /* @__PURE__ */ r("div", {})
1682
2082
  ] });
1683
2083
  }
1684
- function ji(t) {
1685
- switch (t) {
2084
+ function bo(e) {
2085
+ switch (e) {
1686
2086
  case "Assignment":
1687
- return /* @__PURE__ */ i(Un, {});
2087
+ return /* @__PURE__ */ r(Zn, {});
1688
2088
  case "Quiz":
1689
- return /* @__PURE__ */ i(Pn, {});
2089
+ return /* @__PURE__ */ r(Kn, {});
1690
2090
  case "Discussion":
1691
- return /* @__PURE__ */ i(kn, {});
2091
+ return /* @__PURE__ */ r(Xn, {});
1692
2092
  case "Page":
1693
- return /* @__PURE__ */ i(jt, {});
2093
+ return /* @__PURE__ */ r(Kt, {});
1694
2094
  case "ExternalUrl":
1695
2095
  case "ExternalTool":
1696
- return /* @__PURE__ */ i(xn, {});
2096
+ return /* @__PURE__ */ r(Vn, {});
1697
2097
  default:
1698
- return /* @__PURE__ */ i(jt, {});
2098
+ return /* @__PURE__ */ r(Kt, {});
1699
2099
  }
1700
2100
  }
1701
- function Hi({
1702
- item: t,
1703
- isSelected: r,
2101
+ function To({
2102
+ item: e,
2103
+ isSelected: n,
1704
2104
  isLoadingItem: o,
1705
- onClick: s
2105
+ onClick: a
1706
2106
  }) {
1707
- var m, p, g, D, I;
1708
- const l = B(), c = ((m = t.content_details) == null ? void 0 : m.locked_for_user) ?? !1, f = (p = t.content_details) == null ? void 0 : p.lock_explanation, b = /* @__PURE__ */ i(
1709
- Y,
2107
+ var u, f, g, C, I;
2108
+ const l = q(), c = ((u = e.content_details) == null ? void 0 : u.locked_for_user) ?? !1, d = (f = e.content_details) == null ? void 0 : f.lock_explanation, b = /* @__PURE__ */ r(
2109
+ K,
1710
2110
  {
1711
2111
  as: "div",
1712
2112
  padding: "small",
1713
- background: r ? "secondary" : "primary",
2113
+ background: n ? "secondary" : "primary",
1714
2114
  borderRadius: "small",
1715
2115
  cursor: c ? "not-allowed" : "pointer",
1716
- onClick: c ? void 0 : s,
2116
+ onClick: c ? void 0 : a,
1717
2117
  role: c ? void 0 : "button",
1718
2118
  tabIndex: c ? void 0 : 0,
1719
- onKeyDown: c ? void 0 : (E) => {
1720
- (E.key === "Enter" || E.key === " ") && (E.preventDefault(), s());
2119
+ onKeyDown: c ? void 0 : (w) => {
2120
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), a());
1721
2121
  },
1722
- children: /* @__PURE__ */ _(h, { gap: "small", alignItems: "center", children: [
1723
- /* @__PURE__ */ i(h.Item, { children: c ? /* @__PURE__ */ i(Jt, {}) : ji(t.type) }),
1724
- /* @__PURE__ */ i(h.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ _(h, { direction: "column", gap: "xx-small", children: [
1725
- /* @__PURE__ */ i(y, { weight: r ? "bold" : "normal", size: "small", children: t.title }),
1726
- ((g = t.content_details) == null ? void 0 : g.due_at) && /* @__PURE__ */ i(y, { size: "x-small", color: "secondary", children: l.progressDueDate({
1727
- date: new Date(t.content_details.due_at).toLocaleDateString()
2122
+ children: /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
2123
+ /* @__PURE__ */ r(h.Item, { children: c ? /* @__PURE__ */ r(hn, {}) : bo(e.type) }),
2124
+ /* @__PURE__ */ r(h.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
2125
+ /* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: e.title }),
2126
+ ((g = e.content_details) == null ? void 0 : g.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
2127
+ date: new Date(e.content_details.due_at).toLocaleDateString()
1728
2128
  }) }),
1729
- ((D = t.content_details) == null ? void 0 : D.points_possible) != null && /* @__PURE__ */ i(y, { size: "x-small", color: "secondary", children: l.progressPoints({ points: t.content_details.points_possible }) })
2129
+ ((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 }) })
1730
2130
  ] }) }),
1731
- o && /* @__PURE__ */ i(He, { size: "x-small", renderTitle: l.progressLoading() }),
1732
- ((I = t.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ i(y, { color: "success", size: "small", children: "✓" })
2131
+ o && /* @__PURE__ */ r(Ye, { size: "x-small", renderTitle: l.progressLoading() }),
2132
+ ((I = e.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ r(_, { color: "success", size: "small", children: "✓" })
1733
2133
  ] })
1734
2134
  }
1735
2135
  );
1736
- return c && f ? /* @__PURE__ */ i(jn, { renderTip: f, placement: "end", children: b }) : b;
2136
+ return c && d ? /* @__PURE__ */ r(ei, { renderTip: d, placement: "end", children: b }) : b;
1737
2137
  }
1738
- function Tr({
1739
- module: t,
1740
- currentItemId: r,
2138
+ function Xo({
2139
+ module: e,
2140
+ currentItemId: n,
1741
2141
  onItemClick: o,
1742
- onClose: s,
2142
+ onClose: a,
1743
2143
  onNavigateModule: l,
1744
2144
  hasPrevModule: c = !1,
1745
- hasNextModule: f = !1,
2145
+ hasNextModule: d = !1,
1746
2146
  isLoading: b = !1,
1747
- title: m
2147
+ title: u
1748
2148
  }) {
1749
- var D;
1750
- const p = B(), g = m ?? p.navigationMyProgress();
1751
- return /* @__PURE__ */ _(h, { direction: "column", height: "100%", children: [
1752
- /* @__PURE__ */ _(h, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
1753
- /* @__PURE__ */ i(dt, { level: "h3", children: g }),
1754
- /* @__PURE__ */ i(zn, { screenReaderLabel: p.navigationClosePanel(), onClick: s, size: "small", children: /* @__PURE__ */ i(Mn, {}) })
2149
+ var C;
2150
+ const f = q(), g = u ?? f.navigationMyProgress();
2151
+ return /* @__PURE__ */ S(h, { direction: "column", height: "100%", children: [
2152
+ /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
2153
+ /* @__PURE__ */ r(St, { level: "h3", children: g }),
2154
+ /* @__PURE__ */ r(Jn, { screenReaderLabel: f.navigationClosePanel(), onClick: a, size: "small", children: /* @__PURE__ */ r(Yn, {}) })
1755
2155
  ] }),
1756
- /* @__PURE__ */ _(Y, { as: "div", padding: "none small", overflowY: "auto", children: [
1757
- t.state === "locked" && /* @__PURE__ */ i(h, { padding: "none none small", children: /* @__PURE__ */ _(ft, { color: "warning", children: [
1758
- /* @__PURE__ */ i(Jt, {}),
2156
+ /* @__PURE__ */ S(K, { as: "div", padding: "none small", overflowY: "auto", children: [
2157
+ e.state === "locked" && /* @__PURE__ */ r(h, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
2158
+ /* @__PURE__ */ r(hn, {}),
1759
2159
  " ",
1760
- p.progressLocked()
2160
+ f.progressLocked()
1761
2161
  ] }) }),
1762
- /* @__PURE__ */ i(y, { weight: "bold", size: "medium", children: t.name }),
1763
- /* @__PURE__ */ i(h, { direction: "column", gap: "xx-small", padding: "small none", children: (D = t.items) == null ? void 0 : D.map((I) => /* @__PURE__ */ i(
1764
- Hi,
2162
+ /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: e.name }),
2163
+ /* @__PURE__ */ r(h, { direction: "column", gap: "xx-small", padding: "small none", children: (C = e.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
2164
+ To,
1765
2165
  {
1766
2166
  item: I,
1767
- isSelected: I.id === r,
1768
- isLoadingItem: b && I.id === r,
2167
+ isSelected: I.id === n,
2168
+ isLoadingItem: b && I.id === n,
1769
2169
  onClick: () => o(I)
1770
2170
  },
1771
2171
  I.id
1772
2172
  )) })
1773
2173
  ] }),
1774
- l && /* @__PURE__ */ _(h, { justifyItems: "space-between", padding: "small", children: [
1775
- /* @__PURE__ */ i(
1776
- z,
2174
+ l && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small", children: [
2175
+ /* @__PURE__ */ r(
2176
+ $,
1777
2177
  {
1778
- renderIcon: () => /* @__PURE__ */ i(Zt, {}),
2178
+ renderIcon: () => /* @__PURE__ */ r(pn, {}),
1779
2179
  size: "small",
1780
2180
  interaction: c ? "enabled" : "disabled",
1781
2181
  onClick: () => l("prev"),
1782
- "aria-label": p.navigationPreviousModule(),
1783
- children: p.navigationPrevious()
2182
+ "aria-label": f.navigationPreviousModule(),
2183
+ children: f.navigationPrevious()
1784
2184
  }
1785
2185
  ),
1786
- /* @__PURE__ */ i(
1787
- z,
2186
+ /* @__PURE__ */ r(
2187
+ $,
1788
2188
  {
1789
- renderIcon: () => /* @__PURE__ */ i(Qt, {}),
2189
+ renderIcon: () => /* @__PURE__ */ r(gn, {}),
1790
2190
  size: "small",
1791
- interaction: f ? "enabled" : "disabled",
2191
+ interaction: d ? "enabled" : "disabled",
1792
2192
  onClick: () => l("next"),
1793
- "aria-label": p.navigationNextModule(),
1794
- children: p.navigationNext()
2193
+ "aria-label": f.navigationNextModule(),
2194
+ children: f.navigationNext()
1795
2195
  }
1796
2196
  )
1797
2197
  ] })
1798
2198
  ] });
1799
2199
  }
1800
- function Ar({
1801
- existingDraft: t,
1802
- onSubmit: r,
2200
+ function Ko({
2201
+ existingDraft: e,
2202
+ onSubmit: n,
1803
2203
  onSaveDraft: o,
1804
- onDiscardDraft: s,
2204
+ onDiscardDraft: a,
1805
2205
  isSubmitting: l = !1
1806
2206
  }) {
1807
- const c = B(), [f, b] = ge(t ?? ""), m = f.trim().length > 0 && !l;
1808
- return /* @__PURE__ */ _(h, { direction: "column", gap: "medium", children: [
1809
- /* @__PURE__ */ i(
1810
- tn,
2207
+ const c = q(), [d, b] = Ee(e ?? ""), u = d.trim().length > 0 && !l;
2208
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
2209
+ /* @__PURE__ */ r(
2210
+ Tn,
1811
2211
  {
1812
2212
  label: c.submissionTextHeading(),
1813
- value: f,
1814
- onChange: (p) => b(p.target.value),
2213
+ value: d,
2214
+ onChange: (f) => b(f.target.value),
1815
2215
  resize: "vertical",
1816
2216
  height: "200px"
1817
2217
  }
1818
2218
  ),
1819
- /* @__PURE__ */ _(h, { gap: "small", children: [
1820
- /* @__PURE__ */ i(
1821
- z,
2219
+ /* @__PURE__ */ S(h, { gap: "small", children: [
2220
+ /* @__PURE__ */ r(
2221
+ $,
1822
2222
  {
1823
2223
  color: "primary",
1824
- onClick: () => r(f),
1825
- interaction: m ? "enabled" : "disabled",
2224
+ onClick: () => n(d),
2225
+ interaction: u ? "enabled" : "disabled",
1826
2226
  children: c.submissionFormSubmit()
1827
2227
  }
1828
2228
  ),
1829
- o && /* @__PURE__ */ i(
1830
- z,
2229
+ o && /* @__PURE__ */ r(
2230
+ $,
1831
2231
  {
1832
- onClick: () => o(f),
1833
- interaction: f.trim().length > 0 ? "enabled" : "disabled",
2232
+ onClick: () => o(d),
2233
+ interaction: d.trim().length > 0 ? "enabled" : "disabled",
1834
2234
  children: c.submissionFormSaveDraft()
1835
2235
  }
1836
2236
  ),
1837
- s && t && /* @__PURE__ */ i(z, { color: "primary-inverse", onClick: s, children: c.submissionFormDiscardDraft() })
2237
+ a && e && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: c.submissionFormDiscardDraft() })
1838
2238
  ] })
1839
2239
  ] });
1840
2240
  }
1841
- function _r({
1842
- unreadCount: t
2241
+ function Zo({
2242
+ unreadCount: e
1843
2243
  }) {
1844
- const r = B();
1845
- if (t === 0)
2244
+ const n = q();
2245
+ if (e === 0)
1846
2246
  return null;
1847
- const o = t === 1 ? r.commentsUnreadSingle() : r.commentsUnread({ count: t });
1848
- return /* @__PURE__ */ i(nn, { count: t, standalone: !0, children: /* @__PURE__ */ i(pt, { children: o }) });
2247
+ const o = e === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: e });
2248
+ return /* @__PURE__ */ r(yn, { count: e, standalone: !0, children: /* @__PURE__ */ r(Et, { children: o }) });
1849
2249
  }
1850
- function Sr({
1851
- courseId: t,
1852
- moduleItemId: r,
2250
+ function Qo({
2251
+ courseId: e,
2252
+ moduleItemId: n,
1853
2253
  fetchSequence: o,
1854
- enabled: s = !0
2254
+ enabled: a = !0
1855
2255
  }) {
1856
- return $e({
1857
- queryKey: ["assignment-review", "module-item-sequence", t, r],
1858
- queryFn: () => o(t, r),
1859
- enabled: s && !!r
2256
+ return Ve({
2257
+ queryKey: ["assignment-review", "module-item-sequence", e, n],
2258
+ queryFn: () => o(e, n),
2259
+ enabled: a && !!n
1860
2260
  });
1861
2261
  }
1862
2262
  export {
1863
- pi as AssignmentResponseSchema,
1864
- gr as AssignmentReview,
1865
- Ei as AttemptCard,
1866
- Di as AttemptView,
1867
- Ii as AttemptsHistory,
1868
- dr as CREATE_SUBMISSION,
1869
- vi as CREATE_SUBMISSION_COMMENT,
1870
- fr as CREATE_SUBMISSION_DRAFT,
1871
- Ui as CommentCard,
1872
- Ti as CreateSubmissionCommentResponseSchema,
1873
- mr as CreateSubmissionDraftResponseSchema,
1874
- cr as CreateSubmissionResponseSchema,
1875
- pr as DELETE_SUBMISSION_DRAFT,
1876
- ur as DeleteSubmissionDraftResponseSchema,
1877
- un as DownloadButtons,
1878
- hr as FileUploadSubmissionForm,
1879
- li as GET_ASSIGNMENT,
1880
- mi as GET_SUBMISSIONS,
1881
- ci as GET_SUBMISSION_COMMENTS,
1882
- wi as LearningContentHeader,
1883
- Ni as MARK_SUBMISSION_COMMENTS_READ,
1884
- Ai as MarkSubmissionCommentsReadResponseSchema,
1885
- br as ModuleNavigation,
1886
- Tr as MyProgressPanel,
1887
- Fi as SubmissionComments,
1888
- lr as SubmissionCommentsDataSchema,
1889
- gi as SubmissionCommentsQueryResponseSchema,
1890
- bi as SubmissionsQueryResponseSchema,
1891
- Ar as TextEntrySubmissionForm,
1892
- ar as TranslationsProvider,
1893
- _r as UnreadCommentsBadge,
1894
- Oi as useCreateSubmissionComment,
1895
- _i as useGetAssignment,
1896
- Mi as useGetSubmissionComments,
1897
- Si as useGetSubmissions,
1898
- xi as useMarkSubmissionCommentsRead,
1899
- Sr as useModuleItemSequence,
1900
- B as useTranslations
2263
+ Gi as AssignmentResponseSchema,
2264
+ qo as AssignmentReview,
2265
+ Ji as AttemptCard,
2266
+ no as AttemptView,
2267
+ eo as AttemptsHistory,
2268
+ Bo as CREATE_SUBMISSION,
2269
+ so as CREATE_SUBMISSION_COMMENT,
2270
+ Go as CREATE_SUBMISSION_DRAFT,
2271
+ po as CommentCard,
2272
+ Vi as CreateSubmissionCommentResponseSchema,
2273
+ Ho as CreateSubmissionDraftResponseSchema,
2274
+ jo as CreateSubmissionResponseSchema,
2275
+ Wo as DELETE_SUBMISSION_DRAFT,
2276
+ $o as DeleteSubmissionDraftResponseSchema,
2277
+ Cn as DownloadButtons,
2278
+ Yo as FileUploadSubmissionForm,
2279
+ Ui as GET_ASSIGNMENT,
2280
+ ji as GET_SUBMISSIONS,
2281
+ zi as GET_SUBMISSION_COMMENTS,
2282
+ ro as LearningContentHeader,
2283
+ ao as MARK_SUBMISSION_COMMENTS_READ,
2284
+ Xi as MarkSubmissionCommentsReadResponseSchema,
2285
+ Vo as ModuleNavigation,
2286
+ Xo as MyProgressPanel,
2287
+ go as SubmissionComments,
2288
+ zo as SubmissionCommentsDataSchema,
2289
+ Wi as SubmissionCommentsQueryResponseSchema,
2290
+ Yi as SubmissionsQueryResponseSchema,
2291
+ Ko as TextEntrySubmissionForm,
2292
+ Uo as TranslationsProvider,
2293
+ Zo as UnreadCommentsBadge,
2294
+ lo as useCreateSubmissionComment,
2295
+ Ki as useGetAssignment,
2296
+ co as useGetSubmissionComments,
2297
+ Zi as useGetSubmissions,
2298
+ mo as useMarkSubmissionCommentsRead,
2299
+ Qo as useModuleItemSequence,
2300
+ q as useTranslations
1901
2301
  };