@instructure/platform-assignment-review 0.4.1 → 0.4.10

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 +1457 -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,515 @@ 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
+ // Chrome's CSSOM expands border-radius to these four longhands when iterating
743
+ // element.style — the shorthand itself never appears in the iterator, so the
744
+ // hook would strip all four corners unless they are explicitly listed here.
745
+ "border-top-left-radius",
746
+ "border-top-right-radius",
747
+ "border-bottom-right-radius",
748
+ "border-bottom-left-radius",
749
+ "border-collapse",
750
+ "border-spacing",
751
+ "border-top",
752
+ "border-top-color",
753
+ "border-top-style",
754
+ "border-top-width",
755
+ "border-right",
756
+ "border-right-color",
757
+ "border-right-style",
758
+ "border-right-width",
759
+ "border-bottom",
760
+ "border-bottom-color",
761
+ "border-bottom-style",
762
+ "border-bottom-width",
763
+ "border-left",
764
+ "border-left-color",
765
+ "border-left-style",
766
+ "border-left-width",
767
+ // shadows & outline
768
+ "box-shadow",
769
+ "outline",
770
+ "outline-color",
771
+ "outline-style",
772
+ "outline-width",
773
+ // outline-offset is not part of the `outline` shorthand, so it must be listed
774
+ // separately or it is stripped when authored on its own (focus-ring styling).
775
+ "outline-offset",
776
+ // list
777
+ "list-style",
778
+ "list-style-image",
779
+ "list-style-position",
780
+ "list-style-type",
781
+ // table
782
+ "table-layout",
783
+ "caption-side",
784
+ "empty-cells",
785
+ // flex
786
+ "flex",
787
+ "flex-basis",
788
+ "flex-direction",
789
+ "flex-flow",
790
+ "flex-grow",
791
+ "flex-shrink",
792
+ "flex-wrap",
793
+ "align-content",
794
+ "align-items",
795
+ "align-self",
796
+ "justify-content",
797
+ "justify-items",
798
+ "justify-self",
799
+ "order",
800
+ "gap",
801
+ "row-gap",
802
+ "column-gap",
803
+ "place-content",
804
+ "place-items",
805
+ "place-self",
806
+ // grid
807
+ "grid",
808
+ "grid-area",
809
+ "grid-auto-columns",
810
+ "grid-auto-flow",
811
+ "grid-auto-rows",
812
+ "grid-column",
813
+ "grid-column-end",
814
+ "grid-column-gap",
815
+ "grid-column-start",
816
+ "grid-gap",
817
+ "grid-row",
818
+ "grid-row-end",
819
+ "grid-row-gap",
820
+ "grid-row-start",
821
+ "grid-template",
822
+ "grid-template-areas",
823
+ "grid-template-columns",
824
+ "grid-template-rows",
825
+ // transitions
826
+ "transition",
827
+ "transition-property",
828
+ "transition-duration",
829
+ "transition-timing-function",
830
+ "transition-delay",
831
+ // animations
832
+ "animation",
833
+ "animation-name",
834
+ "animation-duration",
835
+ "animation-timing-function",
836
+ "animation-delay",
837
+ "animation-iteration-count",
838
+ "animation-direction",
839
+ "animation-fill-mode",
840
+ "animation-play-state",
841
+ // columns
842
+ "column-count",
843
+ "column-width",
844
+ "columns",
845
+ "column-rule",
846
+ "column-rule-color",
847
+ "column-rule-style",
848
+ "column-rule-width",
849
+ "column-fill",
850
+ "column-span",
851
+ // page breaks
852
+ "break-before",
853
+ "break-after",
854
+ "break-inside",
855
+ "page-break-before",
856
+ "page-break-after",
857
+ "page-break-inside",
858
+ // generated content
859
+ "quotes",
860
+ "counter-reset",
861
+ "counter-increment",
862
+ "content",
863
+ // UI / interaction
864
+ // pointer-events is included: RCE uses it legitimately (e.g. non-interactive
865
+ // decorative overlays). It is not in the overlay-phishing class because it
866
+ // cannot reposition elements — position/z-index remain blocked.
867
+ "pointer-events",
868
+ "caret-color",
869
+ "accent-color",
870
+ "appearance"
871
+ ]), Li = /* @__PURE__ */ new Set([
872
+ "src",
873
+ "href",
874
+ "action",
875
+ "formaction",
876
+ "data",
877
+ "poster",
878
+ "background",
879
+ "cite",
880
+ "longdesc",
881
+ "xlink:href"
882
+ ]), un = /^\s*(\/\/|\\)/, xi = [
883
+ "background",
884
+ "background-image",
885
+ "list-style",
886
+ "list-style-image",
887
+ "cursor",
888
+ // content: url(...) triggers an HTTP GET even on non-pseudo elements in some
889
+ // browsers; strip it as defense-in-depth against tracking-pixel exfiltration.
890
+ "content"
891
+ ], ki = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, Mi = /* @__PURE__ */ new Set([
892
+ "allow-downloads",
893
+ "allow-forms",
894
+ "allow-modals",
895
+ "allow-orientation-lock",
896
+ "allow-pointer-lock",
897
+ "allow-popups",
898
+ "allow-popups-to-escape-sandbox",
899
+ "allow-presentation",
900
+ "allow-same-origin",
901
+ "allow-scripts",
902
+ "allow-storage-access-by-user-activation",
903
+ "allow-top-navigation-by-user-activation"
904
+ ]), Pi = {
905
+ ADD_TAGS: ["iframe"],
906
+ ADD_ATTR: [
907
+ "allowfullscreen",
908
+ "allow",
909
+ "frameborder",
910
+ "sandbox",
911
+ "data-media-id",
912
+ "data-media-type",
913
+ // RCE produces target="_blank" for external links. Modern browsers treat
914
+ // target="_blank" as implicit rel="noopener", and the backend allowlist
915
+ // already includes target.
916
+ "target",
917
+ "webkitallowfullscreen",
918
+ "mozallowfullscreen",
919
+ "scrolling",
920
+ // MathML 4 (W3C) annotation attributes for screen-reader accessibility.
921
+ // MathCAT, JAWS, and NVDA use `intent` to know how to pronounce
922
+ // expressions; `arg` labels sub-expressions referenced by intent.
923
+ // These are plain string annotations — no URL-loading, no code execution.
924
+ "intent",
925
+ "arg"
926
+ ],
927
+ // Rails UJS turns data-method/data-remote/etc. on clickable elements into
928
+ // state-changing requests carrying the victim's CSRF token. Strip them so
929
+ // user-authored HTML cannot become a CSRF gadget when UJS is on the page.
930
+ FORBID_ATTR: ["data-method", "data-remote", "data-url", "data-confirm", "data-disable-with"],
931
+ // In browsers that support the Trusted Types API (Chromium, Firefox),
932
+ // DOMPurify returns a TrustedHTML object rather than a plain string. The
933
+ // exported sanitizeHtml signature declares string — a deliberate lie that
934
+ // mirrors the same lie the browser DOM lib (Element.innerHTML: string),
935
+ // React (__html: string), and jQuery (html(string)) already tell. All those
936
+ // sinks runtime-accept TrustedHTML even though their TS signatures only
937
+ // declare string; lying here lets callers assign the result directly without
938
+ // a per-call cast. Do not perform string operations (.slice, .match, etc.)
939
+ // on the return value — those methods do not exist on TrustedHTML and will
940
+ // throw in modern browsers.
941
+ RETURN_TRUSTED_TYPE: !0,
942
+ // Wraps input in a body context during parsing, preventing namespace
943
+ // confusion attacks where fragments like <svg> could influence parse context.
944
+ FORCE_BODY: !0
945
+ };
946
+ let se = null;
947
+ function Fi() {
948
+ return se || (se = typeof bt == "function" ? bt(window) : bt, se.addHook("afterSanitizeAttributes", (e) => {
949
+ if (!(e instanceof Element) || !e.hasAttribute("style")) return;
950
+ const n = e.style, o = [];
951
+ for (let c = 0; c < n.length; c++) {
952
+ const d = n.item(c);
953
+ vi.has(d) || o.push(d);
954
+ }
955
+ for (const c of o) n.removeProperty(c);
956
+ const a = /* @__PURE__ */ new Set([
957
+ "static",
958
+ "relative",
959
+ "absolute",
960
+ "initial",
961
+ "inherit",
962
+ "unset",
963
+ "revert",
964
+ "revert-layer"
965
+ ]), l = n.getPropertyValue("position").trim().toLowerCase();
966
+ l && !a.has(l) && n.removeProperty("position");
967
+ for (const c of xi) {
968
+ const d = n.getPropertyValue(c);
969
+ d && ki.test(d) && n.removeProperty(c);
970
+ }
971
+ n.length === 0 && e.removeAttribute("style");
972
+ }), se.addHook("uponSanitizeAttribute", (e, n) => {
973
+ Li.has(n.attrName) && un.test(n.attrValue) && (n.keepAttr = !1);
974
+ }), se.addHook("afterSanitizeAttributes", (e) => {
975
+ !(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");
976
+ }), se.addHook("afterSanitizeAttributes", (e) => {
977
+ var n;
978
+ if (!(e instanceof Element) || e.tagName !== "A" && e.tagName !== "AREA" || ((n = e.getAttribute("target")) == null ? void 0 : n.toLowerCase()) !== "_blank") return;
979
+ const o = e.getAttribute("rel") ?? "", a = new Set(o.split(/\s+/).filter(Boolean));
980
+ a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
981
+ }), se.addHook("afterSanitizeAttributes", (e) => {
982
+ if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
983
+ const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => Mi.has(a));
984
+ o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
985
+ }), se);
986
+ }
987
+ function It(e, n) {
988
+ if (typeof window > "u")
989
+ throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
990
+ const o = Pi;
991
+ return Fi().sanitize(e ?? "", o);
992
+ }
993
+ const Ui = ae`
584
994
  query GetAssignment($courseId: ID!, $assignmentId: ID!, $userId: ID!) {
585
995
  legacyNode(_id: $assignmentId, type: Assignment) {
586
996
  ... on Assignment {
@@ -639,7 +1049,7 @@ const li = ne`
639
1049
  contentType
640
1050
  submissionPreviewUrl
641
1051
  }
642
- `, ci = ne`
1052
+ `, zi = ae`
643
1053
  query GetSubmissionComments(
644
1054
  $submissionId: ID!
645
1055
  $courseId: String
@@ -688,7 +1098,7 @@ const li = ne`
688
1098
  }
689
1099
  }
690
1100
  }
691
- `, mi = ne`
1101
+ `, ji = ae`
692
1102
  query getSubmissions($submissionId: ID!) {
693
1103
  node(id: $submissionId) {
694
1104
  ... on Submission {
@@ -722,382 +1132,382 @@ const li = ne`
722
1132
  contentType
723
1133
  submissionPreviewUrl
724
1134
  }
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)
1135
+ `, ve = i.object({
1136
+ _id: i.string(),
1137
+ displayName: i.string(),
1138
+ id: i.string(),
1139
+ mimeClass: i.string(),
1140
+ url: i.string(),
1141
+ contentType: i.string(),
1142
+ submissionPreviewUrl: i.string().nullable()
1143
+ }), Hi = i.object({
1144
+ _id: i.string(),
1145
+ activeSubmissionType: i.string(),
1146
+ body: i.string().nullable(),
1147
+ attachments: i.array(ve).nullable()
1148
+ }), $i = i.object({
1149
+ id: i.string(),
1150
+ submittedAt: i.string(),
1151
+ body: i.string().nullable(),
1152
+ grade: i.string().nullable(),
1153
+ score: i.number().nullable(),
1154
+ submissionType: i.string(),
1155
+ attempt: i.number(),
1156
+ unreadCommentCount: i.number(),
1157
+ attachment: ve.nullable(),
1158
+ attachments: i.array(ve).nullable(),
1159
+ submissionDraft: Hi.nullable()
1160
+ }), Bi = i.object({
1161
+ _id: i.string(),
1162
+ name: i.string(),
1163
+ description: i.string().nullable(),
1164
+ allowedExtensions: i.array(i.string()).nullable(),
1165
+ allowedAttempts: i.number().nullable(),
1166
+ dueAt: i.string().nullable(),
1167
+ pointsPossible: i.number().nullable(),
1168
+ submissionTypes: i.array(i.string()),
1169
+ gradingType: i.string(),
1170
+ published: i.boolean().nullable().optional(),
1171
+ submissionsConnection: i.object({
1172
+ nodes: i.array($i)
763
1173
  })
764
- }), pi = n.object({
765
- legacyNode: fi,
766
- course: n.object({
767
- name: n.string()
1174
+ }), Gi = i.object({
1175
+ legacyNode: Bi,
1176
+ course: i.object({
1177
+ name: i.string()
768
1178
  })
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()
1179
+ }), In = i.object({
1180
+ startCursor: i.string(),
1181
+ endCursor: i.string(),
1182
+ hasPreviousPage: i.boolean(),
1183
+ hasNextPage: i.boolean()
1184
+ }), wn = i.object({
1185
+ _id: i.string(),
1186
+ attempt: i.number(),
1187
+ author: i.object({
1188
+ avatarUrl: i.string().nullable(),
1189
+ shortName: i.string(),
1190
+ courseRoles: i.string().nullable()
781
1191
  }),
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()
1192
+ htmlComment: i.string(),
1193
+ read: i.boolean(),
1194
+ updatedAt: i.string(),
1195
+ createdAt: i.string(),
1196
+ attachments: i.array(
1197
+ i.object({
1198
+ url: i.string(),
1199
+ mimeClass: i.string(),
1200
+ displayName: i.string(),
1201
+ contentType: i.string(),
1202
+ id: i.string()
793
1203
  })
794
1204
  ).nullable()
795
- }), gi = n.object({
796
- submissionComments: n.object({
797
- commentsConnection: n.object({
798
- pageInfo: cn,
799
- nodes: n.array(mn)
1205
+ }), Wi = i.object({
1206
+ submissionComments: i.object({
1207
+ commentsConnection: i.object({
1208
+ pageInfo: In,
1209
+ nodes: i.array(wn)
800
1210
  })
801
1211
  })
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)
1212
+ }), zo = i.object({
1213
+ comments: i.array(wn),
1214
+ pageInfo: In
1215
+ }), qi = i.object({
1216
+ submittedAt: i.string(),
1217
+ body: i.string().nullable(),
1218
+ grade: i.string().nullable(),
1219
+ score: i.number().nullable(),
1220
+ submissionType: i.string(),
1221
+ state: i.string(),
1222
+ attempt: i.number(),
1223
+ attachment: ve.nullable(),
1224
+ attachments: i.array(ve).nullable()
1225
+ }), Yi = i.object({
1226
+ node: i.object({
1227
+ submissionHistoriesConnection: i.object({
1228
+ nodes: i.array(qi)
819
1229
  })
820
1230
  })
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()
1231
+ }), Le = i.object({
1232
+ attribute: i.string(),
1233
+ message: i.string()
1234
+ }), Vi = i.object({
1235
+ createSubmissionComment: i.object({
1236
+ submissionComment: i.object({
1237
+ _id: i.string(),
1238
+ attachments: i.array(
1239
+ i.object({
1240
+ _id: i.string(),
1241
+ displayName: i.string(),
1242
+ id: i.string(),
1243
+ mimeClass: i.string(),
1244
+ url: i.string()
835
1245
  })
836
1246
  ).nullable(),
837
- author: n.object({
838
- avatarUrl: n.string().nullable(),
839
- shortName: n.string()
1247
+ author: i.object({
1248
+ avatarUrl: i.string().nullable(),
1249
+ shortName: i.string()
840
1250
  }),
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()
1251
+ htmlComment: i.string(),
1252
+ mediaObject: i.object({
1253
+ id: i.string(),
1254
+ _id: i.string(),
1255
+ mediaSources: i.array(
1256
+ i.object({
1257
+ height: i.string(),
1258
+ src: i.string(),
1259
+ type: i.string(),
1260
+ width: i.string()
851
1261
  })
852
1262
  ),
853
- mediaTracks: n.array(
854
- n.object({
855
- _id: n.string(),
856
- locale: n.string(),
857
- content: n.string(),
858
- kind: n.string()
1263
+ mediaTracks: i.array(
1264
+ i.object({
1265
+ _id: i.string(),
1266
+ locale: i.string(),
1267
+ content: i.string(),
1268
+ kind: i.string()
859
1269
  })
860
1270
  ),
861
- mediaType: n.string(),
862
- title: n.string()
1271
+ mediaType: i.string(),
1272
+ title: i.string()
863
1273
  }).nullable(),
864
- read: n.boolean(),
865
- updatedAt: n.string()
1274
+ read: i.boolean(),
1275
+ updatedAt: i.string()
866
1276
  }).nullable(),
867
- errors: n.array(Re).nullable()
1277
+ errors: i.array(Le).nullable()
868
1278
  })
869
- }), Ai = n.object({
870
- markSubmissionCommentsRead: n.object({
871
- errors: n.array(Re).nullable()
1279
+ }), Xi = i.object({
1280
+ markSubmissionCommentsRead: i.object({
1281
+ errors: i.array(Le).nullable()
872
1282
  })
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()
1283
+ }), jo = i.object({
1284
+ createSubmission: i.object({
1285
+ submission: i.object({
1286
+ _id: i.string(),
1287
+ createdAt: i.string(),
1288
+ attempt: i.number(),
1289
+ submittedAt: i.string().nullable(),
1290
+ score: i.number().nullable()
881
1291
  }).nullable(),
882
- errors: n.array(Re).nullable()
1292
+ errors: i.array(Le).nullable()
883
1293
  })
884
- }), mr = n.object(
1294
+ }), Ho = i.object(
885
1295
  {
886
- createSubmissionDraft: n.object({
887
- submissionDraft: n.object({
888
- _id: n.string()
1296
+ createSubmissionDraft: i.object({
1297
+ submissionDraft: i.object({
1298
+ _id: i.string()
889
1299
  }).nullable(),
890
- errors: n.array(Re).nullable()
1300
+ errors: i.array(Le).nullable()
891
1301
  })
892
1302
  }
893
- ), ur = n.object(
1303
+ ), $o = i.object(
894
1304
  {
895
- deleteSubmissionDraft: n.object({
896
- submissionDraftIds: n.array(n.string()).nullable(),
897
- errors: n.array(Re).nullable()
1305
+ deleteSubmissionDraft: i.object({
1306
+ submissionDraftIds: i.array(i.string()).nullable(),
1307
+ errors: i.array(Le).nullable()
898
1308
  })
899
1309
  }
900
1310
  );
901
- function _i({
902
- courseId: t,
903
- assignmentId: r,
1311
+ function Ki({
1312
+ courseId: e,
1313
+ assignmentId: n,
904
1314
  userId: o,
905
- executeQuery: s,
1315
+ executeQuery: a,
906
1316
  enabled: l = !0
907
1317
  }) {
908
- return $e({
909
- queryKey: ["assignment-review", "assignment", t, r, o],
1318
+ return Ve({
1319
+ queryKey: ["assignment-review", "assignment", e, n, o],
910
1320
  queryFn: async () => {
911
- const c = await s(li, {
912
- courseId: t,
913
- assignmentId: r,
1321
+ const c = await a(Ui, {
1322
+ courseId: e,
1323
+ assignmentId: n,
914
1324
  userId: o
915
- }), f = pi.parse(c);
1325
+ }), d = Gi.parse(c);
916
1326
  return {
917
- ...f.legacyNode,
918
- courseName: f.course.name
1327
+ ...d.legacyNode,
1328
+ courseName: d.course.name
919
1329
  };
920
1330
  },
921
1331
  enabled: l
922
1332
  });
923
1333
  }
924
- function Si({
925
- submissionId: t,
926
- executeQuery: r,
1334
+ function Zi({
1335
+ submissionId: e,
1336
+ executeQuery: n,
927
1337
  enabled: o = !0
928
1338
  }) {
929
- return $e({
930
- queryKey: ["assignment-review", "submissions", t],
1339
+ return Ve({
1340
+ queryKey: ["assignment-review", "submissions", e],
931
1341
  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()
1342
+ const a = await n(ji, { submissionId: e });
1343
+ return Yi.parse(a).node.submissionHistoriesConnection.nodes.slice().sort(
1344
+ (c, d) => new Date(d.submittedAt).getTime() - new Date(c.submittedAt).getTime()
935
1345
  );
936
1346
  },
937
1347
  enabled: o
938
1348
  });
939
1349
  }
940
- function yi(t) {
941
- if (!t) return "";
942
- const r = new Date(t);
943
- return Number.isNaN(r.getTime()) ? "" : r.toLocaleDateString();
1350
+ function Qi(e) {
1351
+ if (!e) return "";
1352
+ const n = new Date(e);
1353
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString();
944
1354
  }
945
- function Ei({
946
- submission: t,
947
- isSelected: r,
1355
+ function Ji({
1356
+ submission: e,
1357
+ isSelected: n,
948
1358
  isDraft: o = !1,
949
- pointsPossible: s,
1359
+ pointsPossible: a,
950
1360
  onClick: l
951
1361
  }) {
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,
1362
+ const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }), b = e.score != null && a != null ? `${e.score}/${a}` : null;
1363
+ return /* @__PURE__ */ r(
1364
+ K,
955
1365
  {
956
1366
  as: "div",
957
1367
  padding: "small medium",
958
1368
  borderWidth: "small",
959
- borderColor: r ? "brand" : "primary",
1369
+ borderColor: n ? "brand" : "primary",
960
1370
  borderRadius: "medium",
961
- background: r ? "secondary" : "primary",
1371
+ background: n ? "secondary" : "primary",
962
1372
  cursor: "pointer",
963
1373
  onClick: l,
964
1374
  role: "button",
965
1375
  tabIndex: 0,
966
- onKeyDown: (m) => {
967
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), l());
1376
+ onKeyDown: (u) => {
1377
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), l());
968
1378
  },
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() })
1379
+ children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
1380
+ /* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
1381
+ /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
1382
+ /* @__PURE__ */ r(_, { weight: "bold", children: d }),
1383
+ o && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
974
1384
  ] }),
975
- !o && t.submittedAt && /* @__PURE__ */ i(y, { size: "small", color: "secondary", children: yi(t.submittedAt) })
1385
+ !o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Qi(e.submittedAt) })
976
1386
  ] }),
977
- b && /* @__PURE__ */ i(y, { weight: "bold", children: b })
1387
+ b && /* @__PURE__ */ r(_, { weight: "bold", children: b })
978
1388
  ] })
979
1389
  }
980
1390
  );
981
1391
  }
982
- function Ii({
983
- submissionId: t,
984
- selectedAttempt: r,
1392
+ function eo({
1393
+ submissionId: e,
1394
+ selectedAttempt: n,
985
1395
  onAttemptSelect: o,
986
- pointsPossible: s,
1396
+ pointsPossible: a,
987
1397
  executeQuery: l
988
1398
  }) {
989
- const c = B(), { data: f, isLoading: b, isError: m } = Si({
990
- submissionId: t,
1399
+ const c = q(), { data: d, isLoading: b, isError: u } = Zi({
1400
+ submissionId: e,
991
1401
  executeQuery: l
992
1402
  });
993
1403
  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,
1404
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: c.navigationAttempts(), size: "small" }) });
1405
+ if (u)
1406
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: c.submissionLoadAttemptsError() }) });
1407
+ const f = (d == null ? void 0 : d.filter((g) => g.attempt > 0)) ?? [];
1408
+ 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(
1409
+ Ji,
1000
1410
  {
1001
1411
  submission: g,
1002
- isSelected: r === g.attempt,
1003
- pointsPossible: s,
1412
+ isSelected: n === g.attempt,
1413
+ pointsPossible: a,
1004
1414
  onClick: () => o(g)
1005
1415
  },
1006
1416
  g.attempt
1007
1417
  )) });
1008
1418
  }
1009
- function un({
1010
- attachments: t,
1011
- size: r = "medium"
1419
+ function Cn({
1420
+ attachments: e,
1421
+ size: n = "medium"
1012
1422
  }) {
1013
- return t.length === 0 ? null : /* @__PURE__ */ i(h, { direction: "column", gap: "x-small", children: t.map((o) => /* @__PURE__ */ i(
1014
- Y,
1423
+ return e.length === 0 ? null : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: e.map((o) => /* @__PURE__ */ r(
1424
+ K,
1015
1425
  {
1016
1426
  as: "div",
1017
- padding: r === "small" ? "x-small" : "small medium",
1427
+ padding: n === "small" ? "x-small" : "small medium",
1018
1428
  borderColor: "primary",
1019
1429
  borderWidth: "small",
1020
1430
  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}` }) })
1431
+ children: /* @__PURE__ */ S(h, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
1432
+ /* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(bn, { children: o.displayName }) }),
1433
+ /* @__PURE__ */ r(Qn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r($n, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${o.displayName}` }) })
1024
1434
  ] })
1025
1435
  },
1026
1436
  o.id
1027
1437
  )) });
1028
1438
  }
1029
- function Ci(t) {
1030
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1439
+ function to(e) {
1440
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1031
1441
  }
1032
- function Di({
1033
- submission: t,
1034
- isLastAttempt: r = !0,
1442
+ function no({
1443
+ submission: e,
1444
+ isLastAttempt: n = !0,
1035
1445
  showAttemptLabel: o = !0,
1036
- renderHTML: s
1446
+ renderHTML: a
1037
1447
  }) {
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 })
1448
+ 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(() => {
1449
+ if (!e) return [];
1450
+ const C = [];
1451
+ if (e.attachment && C.push(e.attachment), e.attachments)
1452
+ for (const I of e.attachments)
1453
+ C.some((w) => w.id === I.id) || C.push(I);
1454
+ return C;
1455
+ }, [e]), g = qe(() => c((e == null ? void 0 : e.body) ?? ""), [e == null ? void 0 : e.body, c]);
1456
+ return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(h, { direction: "column", gap: "small", children: [
1457
+ o && !n && e.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: e.attempt }) }),
1458
+ /* @__PURE__ */ S(h, { gap: "x-small", alignItems: "center", children: [
1459
+ /* @__PURE__ */ r(Bn, { color: "success" }),
1460
+ /* @__PURE__ */ r(St, { level: "h3", children: u })
1051
1461
  ] }),
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 }) })
1462
+ d && e.body && /* @__PURE__ */ S(h, { alignItems: "stretch", gap: "small", children: [
1463
+ /* @__PURE__ */ r(K, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
1464
+ /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children: g }) })
1055
1465
  ] }),
1056
- b && p.length > 0 && /* @__PURE__ */ i(un, { attachments: p })
1466
+ b && f.length > 0 && /* @__PURE__ */ r(Cn, { attachments: f })
1057
1467
  ] }) }) : null;
1058
1468
  }
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" });
1469
+ function io(e) {
1470
+ const n = new Date(e);
1471
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
1062
1472
  }
1063
- function Li() {
1064
- return /* @__PURE__ */ i(y, { color: "secondary", size: "small", children: "|" });
1473
+ function oo() {
1474
+ return /* @__PURE__ */ r(_, { color: "secondary", size: "small", children: "|" });
1065
1475
  }
1066
- function wi({
1067
- score: t,
1068
- pointsPossible: r,
1476
+ function ro({
1477
+ score: e,
1478
+ pointsPossible: n,
1069
1479
  gradingType: o,
1070
- dueAt: s,
1480
+ dueAt: a,
1071
1481
  allowedAttempts: l,
1072
1482
  currentAttempt: c,
1073
- isOverdue: f,
1483
+ isOverdue: d,
1074
1484
  estimatedDuration: b,
1075
- labels: m
1485
+ labels: u
1076
1486
  }) {
1077
- const p = B(), g = [];
1487
+ const f = q(), g = [];
1078
1488
  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")
1489
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.duration) ?? f.headerDuration({ minutes: b }) }, "duration")
1490
+ ), e != null && n != null ? g.push(
1491
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.score) ?? f.headerScore({ score: e, total: n }) }, "score")
1492
+ ) : n != null && o !== "not_graded" && g.push(
1493
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.pointsPossible) ?? f.headerPointsPossible({ points: n }) }, "points")
1084
1494
  ), l != null && (l === -1 ? g.push(
1085
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsUnlimited() }, "attempts")
1495
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsUnlimited() }, "attempts")
1086
1496
  ) : c != null ? g.push(
1087
- /* @__PURE__ */ i(y, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptOf({ current: c, total: l }) }, "attempts")
1497
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptOf({ current: c, total: l }) }, "attempts")
1088
1498
  ) : 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
1499
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsAllowed({ count: l }) }, "attempts")
1500
+ )), a && g.push(
1501
+ /* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.dueDate) ?? f.headerDueDate({ date: io(a) }) }, "due")
1502
+ ), /* @__PURE__ */ S(h, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
1503
+ g.map((C, I) => /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
1504
+ I > 0 && /* @__PURE__ */ r(oo, {}),
1505
+ C
1096
1506
  ] }, `item-${String(I)}`)),
1097
- f && /* @__PURE__ */ i(ft, { color: "danger", children: (m == null ? void 0 : m.overdue) ?? p.headerOverdue() })
1507
+ d && /* @__PURE__ */ r(_t, { color: "danger", children: (u == null ? void 0 : u.overdue) ?? f.headerOverdue() })
1098
1508
  ] });
1099
1509
  }
1100
- const vi = ne`
1510
+ const so = ae`
1101
1511
  mutation CreateSubmissionComment(
1102
1512
  $id: ID!
1103
1513
  $submissionAttempt: Int!
@@ -1187,7 +1597,7 @@ const vi = ne`
1187
1597
  mimeClass
1188
1598
  url
1189
1599
  }
1190
- `, Ni = ne`
1600
+ `, ao = ae`
1191
1601
  mutation MarkSubmissionCommentsRead(
1192
1602
  $submissionId: ID!
1193
1603
  $submissionCommentIds: [ID!]!
@@ -1204,7 +1614,7 @@ const vi = ne`
1204
1614
  }
1205
1615
  }
1206
1616
  }
1207
- `, dr = ne`
1617
+ `, Bo = ae`
1208
1618
  mutation CreateSubmission(
1209
1619
  $assignmentLid: ID!
1210
1620
  $submissionType: OnlineSubmissionType!
@@ -1232,7 +1642,7 @@ const vi = ne`
1232
1642
  }
1233
1643
  }
1234
1644
  }
1235
- `, fr = ne`
1645
+ `, Go = ae`
1236
1646
  mutation CreateSubmissionDraft(
1237
1647
  $submissionId: ID!
1238
1648
  $submissionType: DraftableSubmissionType!
@@ -1258,7 +1668,7 @@ const vi = ne`
1258
1668
  }
1259
1669
  }
1260
1670
  }
1261
- `, pr = ne`
1671
+ `, Wo = ae`
1262
1672
  mutation DeleteSubmissionDraft($submissionId: ID!) {
1263
1673
  deleteSubmissionDraft(input: { submissionId: $submissionId }) {
1264
1674
  submissionDraftIds
@@ -1269,123 +1679,123 @@ const vi = ne`
1269
1679
  }
1270
1680
  }
1271
1681
  `;
1272
- function Oi({
1273
- executeQuery: t
1682
+ function lo({
1683
+ executeQuery: e
1274
1684
  }) {
1275
- const r = Xt();
1276
- return Kt({
1277
- mutationFn: async ({ submissionId: o, attempt: s, comment: l, fileIds: c }) => {
1278
- const f = await t(vi, {
1685
+ const n = dn();
1686
+ return fn({
1687
+ mutationFn: async ({ submissionId: o, attempt: a, comment: l, fileIds: c }) => {
1688
+ const d = await e(so, {
1279
1689
  id: o,
1280
- submissionAttempt: s,
1690
+ submissionAttempt: a,
1281
1691
  comment: l,
1282
1692
  fileIds: c
1283
1693
  });
1284
- return Ti.parse(f), f;
1694
+ return Vi.parse(d), d;
1285
1695
  },
1286
- onSuccess: (o, s) => {
1287
- r.invalidateQueries({
1288
- queryKey: ["assignment-review", "submission-comments", s.submissionId]
1696
+ onSuccess: (o, a) => {
1697
+ n.invalidateQueries({
1698
+ queryKey: ["assignment-review", "submission-comments", a.submissionId]
1289
1699
  });
1290
1700
  }
1291
1701
  });
1292
1702
  }
1293
- function Mi({
1294
- submissionId: t,
1295
- courseId: r,
1703
+ function co({
1704
+ submissionId: e,
1705
+ courseId: n,
1296
1706
  pageParams: o,
1297
- direction: s,
1707
+ direction: a,
1298
1708
  executeQuery: l,
1299
1709
  enabled: c
1300
1710
  }) {
1301
- return $e({
1711
+ return Ve({
1302
1712
  queryKey: [
1303
1713
  "assignment-review",
1304
1714
  "submission-comments",
1305
- t,
1306
- r,
1715
+ e,
1716
+ n,
1307
1717
  o == null ? void 0 : o.startCursor,
1308
1718
  o == null ? void 0 : o.endCursor,
1309
- s
1719
+ a
1310
1720
  ],
1311
1721
  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);
1722
+ const d = await l(zi, {
1723
+ submissionId: e,
1724
+ courseId: n,
1725
+ beforeCursor: a === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
1726
+ afterCursor: a === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
1727
+ first: a === "next" ? 5 : null,
1728
+ last: a === "prev" || !a ? 5 : null
1729
+ }), b = Wi.parse(d);
1320
1730
  return {
1321
1731
  comments: [...b.submissionComments.commentsConnection.nodes].sort(
1322
- (p, g) => new Date(p.createdAt).getTime() - new Date(g.createdAt).getTime()
1732
+ (f, g) => new Date(f.createdAt).getTime() - new Date(g.createdAt).getTime()
1323
1733
  ),
1324
1734
  pageInfo: b.submissionComments.commentsConnection.pageInfo
1325
1735
  };
1326
1736
  },
1327
- enabled: c ?? !!t
1737
+ enabled: c ?? !!e
1328
1738
  });
1329
1739
  }
1330
- function xi({
1331
- executeQuery: t
1740
+ function mo({
1741
+ executeQuery: e
1332
1742
  }) {
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 }
1743
+ const n = dn();
1744
+ return fn({
1745
+ mutationFn: async ({ submissionId: o, submissionCommentIds: a }) => {
1746
+ const l = await e(
1747
+ ao,
1748
+ { submissionId: o, submissionCommentIds: a }
1339
1749
  );
1340
- return Ai.parse(l), l;
1750
+ return Xi.parse(l), l;
1341
1751
  },
1342
- onSuccess: (o, s) => {
1343
- r.invalidateQueries({
1752
+ onSuccess: (o, a) => {
1753
+ n.invalidateQueries({
1344
1754
  queryKey: ["assignment-review", "assignment"],
1345
- predicate: (l) => l.queryKey.includes(s.assignmentId)
1755
+ predicate: (l) => l.queryKey.includes(a.assignmentId)
1346
1756
  });
1347
1757
  }
1348
1758
  });
1349
1759
  }
1350
- function ki(t) {
1351
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1760
+ function uo(e) {
1761
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1352
1762
  }
1353
- function Pi(t) {
1354
- const r = new Date(t);
1355
- return Number.isNaN(r.getTime()) ? "" : r.toLocaleString();
1763
+ function fo(e) {
1764
+ const n = new Date(e);
1765
+ return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
1356
1766
  }
1357
- function Ui({
1358
- comment: t,
1359
- isFullWidth: r,
1767
+ function po({
1768
+ comment: e,
1769
+ isFullWidth: n,
1360
1770
  renderHTML: o
1361
1771
  }) {
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,
1772
+ var u;
1773
+ 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]);
1774
+ return /* @__PURE__ */ r(
1775
+ K,
1366
1776
  {
1367
1777
  as: "div",
1368
1778
  padding: "small medium",
1369
1779
  borderWidth: "small",
1370
1780
  borderColor: "primary",
1371
1781
  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() }) })
1782
+ margin: n ? "none" : c ? "none none none medium" : "none medium none none",
1783
+ children: /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", children: [
1784
+ /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "xx-small", children: [
1785
+ /* @__PURE__ */ S(h, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
1786
+ /* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(bn, { children: e.author.shortName }) }) }),
1787
+ !e.read && /* @__PURE__ */ r(yn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: a.commentsUnreadSingle() }) })
1378
1788
  ] }),
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 }) })
1789
+ /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: fo(e.createdAt) }),
1790
+ e.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: a.commentsAttempt({ number: e.attempt }) })
1381
1791
  ] }),
1382
- /* @__PURE__ */ i(y, { size: "medium", children: f }),
1383
- t.attachments && t.attachments.length > 0 && /* @__PURE__ */ i(
1384
- un,
1792
+ /* @__PURE__ */ r(_, { size: "medium", children: d }),
1793
+ e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r(
1794
+ Cn,
1385
1795
  {
1386
- attachments: t.attachments.map((p) => ({
1387
- ...p,
1388
- _id: p._id ?? p.id,
1796
+ attachments: e.attachments.map((f) => ({
1797
+ ...f,
1798
+ _id: f._id ?? f.id,
1389
1799
  submissionPreviewUrl: null
1390
1800
  })),
1391
1801
  size: "small"
@@ -1395,507 +1805,507 @@ function Ui({
1395
1805
  }
1396
1806
  );
1397
1807
  }
1398
- function Fi({
1399
- submissionId: t,
1400
- courseId: r,
1808
+ function go({
1809
+ submissionId: e,
1810
+ courseId: n,
1401
1811
  assignmentId: o,
1402
- attempt: s,
1812
+ attempt: a,
1403
1813
  canPostComment: l,
1404
1814
  onCommentPosted: c,
1405
- renderHTML: f,
1815
+ renderHTML: d,
1406
1816
  executeQuery: b
1407
1817
  }) {
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,
1818
+ const u = q(), [f, g] = Ee(""), [C, I] = Ee({}), w = jn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = co({
1819
+ submissionId: e,
1820
+ courseId: n,
1821
+ pageParams: C.pageParams,
1822
+ direction: C.direction,
1413
1823
  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 });
1824
+ }), le = lo({ executeQuery: b }), M = mo({ executeQuery: b });
1825
+ Tt(() => {
1826
+ if (!(y != null && y.comments) || y.comments.length === 0) return;
1827
+ const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
1828
+ var J;
1829
+ return !((J = N.author.courseRoles) != null && J.includes("StudentEnrollment"));
1830
+ }).map((N) => N._id);
1831
+ if (E.length > 0) {
1832
+ for (const N of E)
1833
+ w.current.add(N);
1834
+ M.mutate({ submissionId: e, assignmentId: o, submissionCommentIds: E });
1425
1835
  }
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"));
1836
+ }, [y == null ? void 0 : y.comments, e, o, M]);
1837
+ const ne = y == null ? void 0 : y.comments.some(
1838
+ (E) => {
1839
+ var N;
1840
+ return !((N = E.author.courseRoles) != null && N.includes("StudentEnrollment"));
1431
1841
  }
1432
- ), S = () => {
1433
- p.trim() && re.mutate(
1434
- { submissionId: t, attempt: s, comment: p },
1842
+ ), O = () => {
1843
+ f.trim() && le.mutate(
1844
+ { submissionId: e, attempt: a, comment: f },
1435
1845
  {
1436
1846
  onSuccess: () => {
1437
1847
  g(""), c == null || c();
1438
1848
  }
1439
1849
  }
1440
1850
  );
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,
1851
+ }, ce = (y == null ? void 0 : y.pageInfo.hasNextPage) || (y == null ? void 0 : y.pageInfo.hasPreviousPage);
1852
+ 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: [
1853
+ /* @__PURE__ */ S(h, { as: "div", direction: "column", children: [
1854
+ 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(
1855
+ po,
1446
1856
  {
1447
- comment: k,
1448
- isFullWidth: !q,
1449
- renderHTML: f
1857
+ comment: E,
1858
+ isFullWidth: !ne,
1859
+ renderHTML: d
1450
1860
  },
1451
- k._id
1861
+ E._id
1452
1862
  )) }),
1453
- V && /* @__PURE__ */ _(h, { justifyItems: "space-between", padding: "small none", children: [
1454
- /* @__PURE__ */ i(
1455
- z,
1863
+ ce && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
1864
+ /* @__PURE__ */ r(
1865
+ $,
1456
1866
  {
1457
- renderIcon: () => /* @__PURE__ */ i(vn, {}),
1867
+ renderIcon: () => /* @__PURE__ */ r(Gn, {}),
1458
1868
  size: "small",
1459
- interaction: T.pageInfo.hasPreviousPage ? "enabled" : "disabled",
1460
- onClick: () => I({ pageParams: T.pageInfo, direction: "prev" }),
1461
- children: m.commentsPreviousComments()
1869
+ interaction: y.pageInfo.hasPreviousPage ? "enabled" : "disabled",
1870
+ onClick: () => I({ pageParams: y.pageInfo, direction: "prev" }),
1871
+ children: u.commentsPreviousComments()
1462
1872
  }
1463
1873
  ),
1464
- /* @__PURE__ */ i(
1465
- z,
1874
+ /* @__PURE__ */ r(
1875
+ $,
1466
1876
  {
1467
- renderIcon: () => /* @__PURE__ */ i(Nn, {}),
1877
+ renderIcon: () => /* @__PURE__ */ r(Wn, {}),
1468
1878
  size: "small",
1469
- interaction: T.pageInfo.hasNextPage ? "enabled" : "disabled",
1470
- onClick: () => I({ pageParams: T.pageInfo, direction: "next" }),
1471
- children: m.commentsNextComments()
1879
+ interaction: y.pageInfo.hasNextPage ? "enabled" : "disabled",
1880
+ onClick: () => I({ pageParams: y.pageInfo, direction: "next" }),
1881
+ children: u.commentsNextComments()
1472
1882
  }
1473
1883
  )
1474
1884
  ] })
1475
1885
  ] }),
1476
- l && /* @__PURE__ */ _(h, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
1477
- /* @__PURE__ */ i(
1478
- tn,
1886
+ l && /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
1887
+ /* @__PURE__ */ r(
1888
+ Tn,
1479
1889
  {
1480
1890
  resize: "vertical",
1481
- label: /* @__PURE__ */ i(y, { weight: "bold", size: "medium", children: m.commentsPlaceholder() }),
1482
- value: p,
1483
- onChange: (k) => g(k.target.value)
1891
+ label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: u.commentsPlaceholder() }),
1892
+ value: f,
1893
+ onChange: (E) => g(E.target.value)
1484
1894
  }
1485
1895
  ),
1486
- /* @__PURE__ */ i(
1487
- z,
1896
+ /* @__PURE__ */ r(
1897
+ $,
1488
1898
  {
1489
1899
  color: "primary",
1490
- onClick: S,
1491
- interaction: p.trim().length > 0 && !re.isPending ? "enabled" : "disabled",
1492
- children: m.commentsPost()
1900
+ onClick: O,
1901
+ interaction: f.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
1902
+ children: u.commentsPost()
1493
1903
  }
1494
1904
  )
1495
1905
  ] })
1496
1906
  ] });
1497
1907
  }
1498
- function zi(t) {
1499
- return /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: gt.sanitize(t) } });
1908
+ function ho(e) {
1909
+ return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
1500
1910
  }
1501
- function gr({
1502
- courseId: t,
1503
- assignmentId: r,
1911
+ function qo({
1912
+ courseId: e,
1913
+ assignmentId: n,
1504
1914
  userId: o,
1505
- feedbackMode: s = !1,
1915
+ feedbackMode: a = !1,
1506
1916
  onError: l,
1507
1917
  renderHTML: c,
1508
- renderPanels: f,
1918
+ renderPanels: d,
1509
1919
  executeQuery: b
1510
1920
  }) {
1511
- const m = B(), p = c ?? zi, {
1921
+ const u = q(), f = c ?? ho, {
1512
1922
  data: g,
1513
- isLoading: D,
1923
+ isLoading: C,
1514
1924
  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(
1925
+ error: w
1926
+ } = Ki({ courseId: e, assignmentId: n, userId: o, executeQuery: b }), [y, V] = Ee(null), [fe, le] = Ee(
1927
+ a ? "comments" : null
1928
+ ), M = qe(
1519
1929
  () => (g == null ? void 0 : g.submissionsConnection.nodes[0]) ?? null,
1520
1930
  [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);
1931
+ ), 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) => {
1932
+ V(Ze);
1523
1933
  }, []);
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() }) });
1934
+ if (Tt(() => {
1935
+ I && w && l && l(w);
1936
+ }, [I, w, l]), Tt(() => {
1937
+ a && ne && le("comments");
1938
+ }, [a, ne]), C)
1939
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: u.progressLoading() }) });
1530
1940
  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,
1941
+ return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: u.assignmentLoadError() }) });
1942
+ const Ie = !!g.dueAt && new Date(g.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = M ? /* @__PURE__ */ r(
1943
+ go,
1534
1944
  {
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,
1945
+ submissionId: M.id,
1946
+ courseId: e,
1947
+ assignmentId: n,
1948
+ attempt: (O == null ? void 0 : O.attempt) ?? 0,
1949
+ canPostComment: E,
1950
+ renderHTML: f,
1541
1951
  executeQuery: b
1542
1952
  }
1543
- ) : null, O = P && v ? /* @__PURE__ */ i(
1544
- Ii,
1953
+ ) : null, Xe = N && M ? /* @__PURE__ */ r(
1954
+ eo,
1545
1955
  {
1546
- submissionId: v.id,
1547
- selectedAttempt: S == null ? void 0 : S.attempt,
1548
- onAttemptSelect: le,
1956
+ submissionId: M.id,
1957
+ selectedAttempt: O == null ? void 0 : O.attempt,
1958
+ onAttemptSelect: J,
1549
1959
  pointsPossible: g.pointsPossible,
1550
1960
  executeQuery: b
1551
1961
  }
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
1962
+ ) : null, Ke = {
1963
+ commentsPanel: xe,
1964
+ attemptsPanel: Xe,
1965
+ activePanel: fe,
1966
+ setActivePanel: le,
1967
+ unreadCommentCount: (M == null ? void 0 : M.unreadCommentCount) ?? 0,
1968
+ hasMultipleAttempts: N
1559
1969
  };
1560
- return /* @__PURE__ */ _(h, { direction: "column", gap: "medium", children: [
1561
- /* @__PURE__ */ i(
1562
- wi,
1970
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
1971
+ /* @__PURE__ */ r(
1972
+ ro,
1563
1973
  {
1564
- score: S == null ? void 0 : S.score,
1974
+ score: O == null ? void 0 : O.score,
1565
1975
  pointsPossible: g.pointsPossible,
1566
1976
  gradingType: g.gradingType,
1567
1977
  dueAt: g.dueAt,
1568
1978
  allowedAttempts: g.allowedAttempts,
1569
- currentAttempt: S == null ? void 0 : S.attempt,
1570
- isOverdue: Ge
1979
+ currentAttempt: O == null ? void 0 : O.attempt,
1980
+ isOverdue: Ie
1571
1981
  }
1572
1982
  ),
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) })
1983
+ g.description && /* @__PURE__ */ S(K, { as: "div", children: [
1984
+ /* @__PURE__ */ r(St, { level: "h3", children: u.assignmentInstructions() }),
1985
+ /* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: f(g.description) })
1576
1986
  ] }),
1577
- /* @__PURE__ */ i(
1578
- Di,
1987
+ /* @__PURE__ */ r(
1988
+ no,
1579
1989
  {
1580
- submission: S,
1581
- isLastAttempt: V,
1582
- renderHTML: p
1990
+ submission: O,
1991
+ isLastAttempt: ce,
1992
+ renderHTML: f
1583
1993
  }
1584
1994
  ),
1585
- f ? f(he) : null
1995
+ d ? d(Ke) : null
1586
1996
  ] });
1587
1997
  }
1588
- function hr({
1589
- existingFiles: t,
1590
- onSubmit: r,
1998
+ function Yo({
1999
+ existingFiles: e,
2000
+ onSubmit: n,
1591
2001
  onSaveDraft: o,
1592
- onDiscardDraft: s,
2002
+ onDiscardDraft: a,
1593
2003
  onSelectFiles: l,
1594
2004
  isSubmitting: c = !1
1595
2005
  }) {
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,
2006
+ const d = q(), [b, u] = Ee(e ?? []), f = async () => {
2007
+ const w = await l();
2008
+ u((y) => [...y, ...w]);
2009
+ }, g = (w) => {
2010
+ u((y) => y.filter((V) => V.id !== w));
2011
+ }, C = b.map((w) => w.id), I = b.length > 0 && !c;
2012
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
2013
+ b.length > 0 && /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: b.map((w) => /* @__PURE__ */ r(
2014
+ K,
1605
2015
  {
1606
2016
  as: "div",
1607
2017
  padding: "small",
1608
2018
  borderWidth: "small",
1609
2019
  borderColor: "primary",
1610
2020
  borderRadius: "medium",
1611
- children: /* @__PURE__ */ _(h, { justifyItems: "space-between", alignItems: "center", children: [
1612
- /* @__PURE__ */ i(y, { children: E.name }),
1613
- /* @__PURE__ */ i(
1614
- z,
2021
+ children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
2022
+ /* @__PURE__ */ r(_, { children: w.name }),
2023
+ /* @__PURE__ */ r(
2024
+ $,
1615
2025
  {
1616
2026
  size: "small",
1617
- renderIcon: () => /* @__PURE__ */ i(On, {}),
1618
- onClick: () => g(E.id),
1619
- children: /* @__PURE__ */ _("span", { className: "screenreader-only", children: [
2027
+ renderIcon: () => /* @__PURE__ */ r(qn, {}),
2028
+ onClick: () => g(w.id),
2029
+ children: /* @__PURE__ */ S("span", { className: "screenreader-only", children: [
1620
2030
  "Remove ",
1621
- E.name
2031
+ w.name
1622
2032
  ] })
1623
2033
  }
1624
2034
  )
1625
2035
  ] })
1626
2036
  },
1627
- E.id
2037
+ w.id
1628
2038
  )) }),
1629
- /* @__PURE__ */ i(z, { onClick: p, children: f.submissionFormAddFiles() }),
1630
- /* @__PURE__ */ _(h, { gap: "small", children: [
1631
- /* @__PURE__ */ i(
1632
- z,
2039
+ /* @__PURE__ */ r($, { onClick: f, children: d.submissionFormAddFiles() }),
2040
+ /* @__PURE__ */ S(h, { gap: "small", children: [
2041
+ /* @__PURE__ */ r(
2042
+ $,
1633
2043
  {
1634
2044
  color: "primary",
1635
- onClick: () => r(D),
2045
+ onClick: () => n(C),
1636
2046
  interaction: I ? "enabled" : "disabled",
1637
- children: f.submissionFormSubmit()
2047
+ children: d.submissionFormSubmit()
1638
2048
  }
1639
2049
  ),
1640
- o && /* @__PURE__ */ i(
1641
- z,
2050
+ o && /* @__PURE__ */ r(
2051
+ $,
1642
2052
  {
1643
- onClick: () => o(D),
2053
+ onClick: () => o(C),
1644
2054
  interaction: b.length > 0 ? "enabled" : "disabled",
1645
- children: f.submissionFormSaveDraft()
2055
+ children: d.submissionFormSaveDraft()
1646
2056
  }
1647
2057
  ),
1648
- s && t && t.length > 0 && /* @__PURE__ */ i(z, { color: "primary-inverse", onClick: s, children: f.submissionFormDiscardDraft() })
2058
+ a && e && e.length > 0 && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: d.submissionFormDiscardDraft() })
1649
2059
  ] })
1650
2060
  ] });
1651
2061
  }
1652
- function br({
1653
- prevItem: t,
1654
- nextItem: r,
2062
+ function Vo({
2063
+ prevItem: e,
2064
+ nextItem: n,
1655
2065
  onNavigatePrev: o,
1656
- onNavigateNext: s,
2066
+ onNavigateNext: a,
1657
2067
  labels: l
1658
2068
  }) {
1659
- const c = B();
1660
- if (!t && !r)
2069
+ const c = q();
2070
+ if (!e && !n)
1661
2071
  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,
2072
+ const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), b = (l == null ? void 0 : l.next) ?? c.navigationNext();
2073
+ return /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
2074
+ e ? /* @__PURE__ */ r(
2075
+ $,
1666
2076
  {
1667
- renderIcon: () => /* @__PURE__ */ i(Zt, {}),
2077
+ renderIcon: () => /* @__PURE__ */ r(pn, {}),
1668
2078
  onClick: o,
1669
- "aria-label": `${f}: ${t.title}`,
1670
- children: f
2079
+ "aria-label": `${d}: ${e.title}`,
2080
+ children: d
1671
2081
  }
1672
- ) : /* @__PURE__ */ i("div", {}),
1673
- r ? /* @__PURE__ */ i(
1674
- z,
2082
+ ) : /* @__PURE__ */ r("div", {}),
2083
+ n ? /* @__PURE__ */ r(
2084
+ $,
1675
2085
  {
1676
- renderIcon: () => /* @__PURE__ */ i(Qt, {}),
1677
- onClick: s,
1678
- "aria-label": `${b}: ${r.title}`,
2086
+ renderIcon: () => /* @__PURE__ */ r(gn, {}),
2087
+ onClick: a,
2088
+ "aria-label": `${b}: ${n.title}`,
1679
2089
  children: b
1680
2090
  }
1681
- ) : /* @__PURE__ */ i("div", {})
2091
+ ) : /* @__PURE__ */ r("div", {})
1682
2092
  ] });
1683
2093
  }
1684
- function ji(t) {
1685
- switch (t) {
2094
+ function bo(e) {
2095
+ switch (e) {
1686
2096
  case "Assignment":
1687
- return /* @__PURE__ */ i(Un, {});
2097
+ return /* @__PURE__ */ r(Zn, {});
1688
2098
  case "Quiz":
1689
- return /* @__PURE__ */ i(Pn, {});
2099
+ return /* @__PURE__ */ r(Kn, {});
1690
2100
  case "Discussion":
1691
- return /* @__PURE__ */ i(kn, {});
2101
+ return /* @__PURE__ */ r(Xn, {});
1692
2102
  case "Page":
1693
- return /* @__PURE__ */ i(jt, {});
2103
+ return /* @__PURE__ */ r(Kt, {});
1694
2104
  case "ExternalUrl":
1695
2105
  case "ExternalTool":
1696
- return /* @__PURE__ */ i(xn, {});
2106
+ return /* @__PURE__ */ r(Vn, {});
1697
2107
  default:
1698
- return /* @__PURE__ */ i(jt, {});
2108
+ return /* @__PURE__ */ r(Kt, {});
1699
2109
  }
1700
2110
  }
1701
- function Hi({
1702
- item: t,
1703
- isSelected: r,
2111
+ function To({
2112
+ item: e,
2113
+ isSelected: n,
1704
2114
  isLoadingItem: o,
1705
- onClick: s
2115
+ onClick: a
1706
2116
  }) {
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,
2117
+ var u, f, g, C, I;
2118
+ 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(
2119
+ K,
1710
2120
  {
1711
2121
  as: "div",
1712
2122
  padding: "small",
1713
- background: r ? "secondary" : "primary",
2123
+ background: n ? "secondary" : "primary",
1714
2124
  borderRadius: "small",
1715
2125
  cursor: c ? "not-allowed" : "pointer",
1716
- onClick: c ? void 0 : s,
2126
+ onClick: c ? void 0 : a,
1717
2127
  role: c ? void 0 : "button",
1718
2128
  tabIndex: c ? void 0 : 0,
1719
- onKeyDown: c ? void 0 : (E) => {
1720
- (E.key === "Enter" || E.key === " ") && (E.preventDefault(), s());
2129
+ onKeyDown: c ? void 0 : (w) => {
2130
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), a());
1721
2131
  },
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()
2132
+ children: /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
2133
+ /* @__PURE__ */ r(h.Item, { children: c ? /* @__PURE__ */ r(hn, {}) : bo(e.type) }),
2134
+ /* @__PURE__ */ r(h.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
2135
+ /* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: e.title }),
2136
+ ((g = e.content_details) == null ? void 0 : g.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
2137
+ date: new Date(e.content_details.due_at).toLocaleDateString()
1728
2138
  }) }),
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 }) })
2139
+ ((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
2140
  ] }) }),
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: "✓" })
2141
+ o && /* @__PURE__ */ r(Ye, { size: "x-small", renderTitle: l.progressLoading() }),
2142
+ ((I = e.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ r(_, { color: "success", size: "small", children: "✓" })
1733
2143
  ] })
1734
2144
  }
1735
2145
  );
1736
- return c && f ? /* @__PURE__ */ i(jn, { renderTip: f, placement: "end", children: b }) : b;
2146
+ return c && d ? /* @__PURE__ */ r(ei, { renderTip: d, placement: "end", children: b }) : b;
1737
2147
  }
1738
- function Tr({
1739
- module: t,
1740
- currentItemId: r,
2148
+ function Xo({
2149
+ module: e,
2150
+ currentItemId: n,
1741
2151
  onItemClick: o,
1742
- onClose: s,
2152
+ onClose: a,
1743
2153
  onNavigateModule: l,
1744
2154
  hasPrevModule: c = !1,
1745
- hasNextModule: f = !1,
2155
+ hasNextModule: d = !1,
1746
2156
  isLoading: b = !1,
1747
- title: m
2157
+ title: u
1748
2158
  }) {
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, {}) })
2159
+ var C;
2160
+ const f = q(), g = u ?? f.navigationMyProgress();
2161
+ return /* @__PURE__ */ S(h, { direction: "column", height: "100%", children: [
2162
+ /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
2163
+ /* @__PURE__ */ r(St, { level: "h3", children: g }),
2164
+ /* @__PURE__ */ r(Jn, { screenReaderLabel: f.navigationClosePanel(), onClick: a, size: "small", children: /* @__PURE__ */ r(Yn, {}) })
1755
2165
  ] }),
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, {}),
2166
+ /* @__PURE__ */ S(K, { as: "div", padding: "none small", overflowY: "auto", children: [
2167
+ e.state === "locked" && /* @__PURE__ */ r(h, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
2168
+ /* @__PURE__ */ r(hn, {}),
1759
2169
  " ",
1760
- p.progressLocked()
2170
+ f.progressLocked()
1761
2171
  ] }) }),
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,
2172
+ /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: e.name }),
2173
+ /* @__PURE__ */ r(h, { direction: "column", gap: "xx-small", padding: "small none", children: (C = e.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
2174
+ To,
1765
2175
  {
1766
2176
  item: I,
1767
- isSelected: I.id === r,
1768
- isLoadingItem: b && I.id === r,
2177
+ isSelected: I.id === n,
2178
+ isLoadingItem: b && I.id === n,
1769
2179
  onClick: () => o(I)
1770
2180
  },
1771
2181
  I.id
1772
2182
  )) })
1773
2183
  ] }),
1774
- l && /* @__PURE__ */ _(h, { justifyItems: "space-between", padding: "small", children: [
1775
- /* @__PURE__ */ i(
1776
- z,
2184
+ l && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small", children: [
2185
+ /* @__PURE__ */ r(
2186
+ $,
1777
2187
  {
1778
- renderIcon: () => /* @__PURE__ */ i(Zt, {}),
2188
+ renderIcon: () => /* @__PURE__ */ r(pn, {}),
1779
2189
  size: "small",
1780
2190
  interaction: c ? "enabled" : "disabled",
1781
2191
  onClick: () => l("prev"),
1782
- "aria-label": p.navigationPreviousModule(),
1783
- children: p.navigationPrevious()
2192
+ "aria-label": f.navigationPreviousModule(),
2193
+ children: f.navigationPrevious()
1784
2194
  }
1785
2195
  ),
1786
- /* @__PURE__ */ i(
1787
- z,
2196
+ /* @__PURE__ */ r(
2197
+ $,
1788
2198
  {
1789
- renderIcon: () => /* @__PURE__ */ i(Qt, {}),
2199
+ renderIcon: () => /* @__PURE__ */ r(gn, {}),
1790
2200
  size: "small",
1791
- interaction: f ? "enabled" : "disabled",
2201
+ interaction: d ? "enabled" : "disabled",
1792
2202
  onClick: () => l("next"),
1793
- "aria-label": p.navigationNextModule(),
1794
- children: p.navigationNext()
2203
+ "aria-label": f.navigationNextModule(),
2204
+ children: f.navigationNext()
1795
2205
  }
1796
2206
  )
1797
2207
  ] })
1798
2208
  ] });
1799
2209
  }
1800
- function Ar({
1801
- existingDraft: t,
1802
- onSubmit: r,
2210
+ function Ko({
2211
+ existingDraft: e,
2212
+ onSubmit: n,
1803
2213
  onSaveDraft: o,
1804
- onDiscardDraft: s,
2214
+ onDiscardDraft: a,
1805
2215
  isSubmitting: l = !1
1806
2216
  }) {
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,
2217
+ const c = q(), [d, b] = Ee(e ?? ""), u = d.trim().length > 0 && !l;
2218
+ return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
2219
+ /* @__PURE__ */ r(
2220
+ Tn,
1811
2221
  {
1812
2222
  label: c.submissionTextHeading(),
1813
- value: f,
1814
- onChange: (p) => b(p.target.value),
2223
+ value: d,
2224
+ onChange: (f) => b(f.target.value),
1815
2225
  resize: "vertical",
1816
2226
  height: "200px"
1817
2227
  }
1818
2228
  ),
1819
- /* @__PURE__ */ _(h, { gap: "small", children: [
1820
- /* @__PURE__ */ i(
1821
- z,
2229
+ /* @__PURE__ */ S(h, { gap: "small", children: [
2230
+ /* @__PURE__ */ r(
2231
+ $,
1822
2232
  {
1823
2233
  color: "primary",
1824
- onClick: () => r(f),
1825
- interaction: m ? "enabled" : "disabled",
2234
+ onClick: () => n(d),
2235
+ interaction: u ? "enabled" : "disabled",
1826
2236
  children: c.submissionFormSubmit()
1827
2237
  }
1828
2238
  ),
1829
- o && /* @__PURE__ */ i(
1830
- z,
2239
+ o && /* @__PURE__ */ r(
2240
+ $,
1831
2241
  {
1832
- onClick: () => o(f),
1833
- interaction: f.trim().length > 0 ? "enabled" : "disabled",
2242
+ onClick: () => o(d),
2243
+ interaction: d.trim().length > 0 ? "enabled" : "disabled",
1834
2244
  children: c.submissionFormSaveDraft()
1835
2245
  }
1836
2246
  ),
1837
- s && t && /* @__PURE__ */ i(z, { color: "primary-inverse", onClick: s, children: c.submissionFormDiscardDraft() })
2247
+ a && e && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: c.submissionFormDiscardDraft() })
1838
2248
  ] })
1839
2249
  ] });
1840
2250
  }
1841
- function _r({
1842
- unreadCount: t
2251
+ function Zo({
2252
+ unreadCount: e
1843
2253
  }) {
1844
- const r = B();
1845
- if (t === 0)
2254
+ const n = q();
2255
+ if (e === 0)
1846
2256
  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 }) });
2257
+ const o = e === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: e });
2258
+ return /* @__PURE__ */ r(yn, { count: e, standalone: !0, children: /* @__PURE__ */ r(Et, { children: o }) });
1849
2259
  }
1850
- function Sr({
1851
- courseId: t,
1852
- moduleItemId: r,
2260
+ function Qo({
2261
+ courseId: e,
2262
+ moduleItemId: n,
1853
2263
  fetchSequence: o,
1854
- enabled: s = !0
2264
+ enabled: a = !0
1855
2265
  }) {
1856
- return $e({
1857
- queryKey: ["assignment-review", "module-item-sequence", t, r],
1858
- queryFn: () => o(t, r),
1859
- enabled: s && !!r
2266
+ return Ve({
2267
+ queryKey: ["assignment-review", "module-item-sequence", e, n],
2268
+ queryFn: () => o(e, n),
2269
+ enabled: a && !!n
1860
2270
  });
1861
2271
  }
1862
2272
  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
2273
+ Gi as AssignmentResponseSchema,
2274
+ qo as AssignmentReview,
2275
+ Ji as AttemptCard,
2276
+ no as AttemptView,
2277
+ eo as AttemptsHistory,
2278
+ Bo as CREATE_SUBMISSION,
2279
+ so as CREATE_SUBMISSION_COMMENT,
2280
+ Go as CREATE_SUBMISSION_DRAFT,
2281
+ po as CommentCard,
2282
+ Vi as CreateSubmissionCommentResponseSchema,
2283
+ Ho as CreateSubmissionDraftResponseSchema,
2284
+ jo as CreateSubmissionResponseSchema,
2285
+ Wo as DELETE_SUBMISSION_DRAFT,
2286
+ $o as DeleteSubmissionDraftResponseSchema,
2287
+ Cn as DownloadButtons,
2288
+ Yo as FileUploadSubmissionForm,
2289
+ Ui as GET_ASSIGNMENT,
2290
+ ji as GET_SUBMISSIONS,
2291
+ zi as GET_SUBMISSION_COMMENTS,
2292
+ ro as LearningContentHeader,
2293
+ ao as MARK_SUBMISSION_COMMENTS_READ,
2294
+ Xi as MarkSubmissionCommentsReadResponseSchema,
2295
+ Vo as ModuleNavigation,
2296
+ Xo as MyProgressPanel,
2297
+ go as SubmissionComments,
2298
+ zo as SubmissionCommentsDataSchema,
2299
+ Wi as SubmissionCommentsQueryResponseSchema,
2300
+ Yi as SubmissionsQueryResponseSchema,
2301
+ Ko as TextEntrySubmissionForm,
2302
+ Uo as TranslationsProvider,
2303
+ Zo as UnreadCommentsBadge,
2304
+ lo as useCreateSubmissionComment,
2305
+ Ki as useGetAssignment,
2306
+ co as useGetSubmissionComments,
2307
+ Zi as useGetSubmissions,
2308
+ mo as useMarkSubmissionCommentsRead,
2309
+ Qo as useModuleItemSequence,
2310
+ q as useTranslations
1901
2311
  };