@instructure/platform-assignment-review 0.4.11 → 0.4.14
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.
- package/dist/index.js +465 -440
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Flex as
|
|
2
|
+
import { createContext as Fn, useContext as Un, useMemo as qe, useState as Ee, useRef as zn, useEffect as Tt, useCallback as jn } from "react";
|
|
3
|
+
import { Flex as b } from "@instructure/ui-flex";
|
|
4
4
|
import { Heading as St } from "@instructure/ui-heading";
|
|
5
5
|
import { Spinner as Ye } from "@instructure/ui-spinner";
|
|
6
6
|
import { Text as _ } from "@instructure/ui-text";
|
|
7
7
|
import { View as K } from "@instructure/ui-view";
|
|
8
|
-
import { useQuery as Ve, useQueryClient as
|
|
8
|
+
import { useQuery as Ve, useQueryClient as un, useMutation as dn } from "@tanstack/react-query";
|
|
9
9
|
import ae from "graphql-tag";
|
|
10
10
|
import { z as i } from "zod";
|
|
11
11
|
import { Pill as _t } from "@instructure/ui-pill";
|
|
12
|
-
import { IconDownloadLine as
|
|
12
|
+
import { IconDownloadLine as Hn, IconCheckMarkSolid as $n, IconArrowStartLine as Bn, IconArrowEndLine as Gn, IconTrashLine as Wn, IconArrowOpenStartLine as fn, IconArrowOpenEndLine as pn, IconXLine as qn, IconLockLine as gn, IconDocumentLine as Kt, IconLinkLine as Yn, IconDiscussionLine as Vn, IconQuizLine as Xn, IconAssignmentLine as Kn } from "@instructure/ui-icons";
|
|
13
13
|
import { ScreenReaderContent as Et } from "@instructure/ui-a11y-content";
|
|
14
|
-
import { Link as
|
|
15
|
-
import { TruncateText as
|
|
16
|
-
import { Button as $, IconButton as
|
|
17
|
-
import { TextArea as
|
|
18
|
-
import { Badge as
|
|
19
|
-
import { Tooltip as
|
|
20
|
-
const
|
|
21
|
-
function
|
|
14
|
+
import { Link as Zn } from "@instructure/ui-link";
|
|
15
|
+
import { TruncateText as hn } from "@instructure/ui-truncate-text";
|
|
16
|
+
import { Button as $, IconButton as Qn } from "@instructure/ui-buttons";
|
|
17
|
+
import { TextArea as bn } from "@instructure/ui-text-area";
|
|
18
|
+
import { Badge as Tn } from "@instructure/ui-badge";
|
|
19
|
+
import { Tooltip as Jn } from "@instructure/ui-tooltip";
|
|
20
|
+
const yn = Fn(void 0);
|
|
21
|
+
function Fo({
|
|
22
22
|
translations: e,
|
|
23
23
|
children: n
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */ r(
|
|
25
|
+
return /* @__PURE__ */ r(yn.Provider, { value: e, children: n });
|
|
26
26
|
}
|
|
27
27
|
function q() {
|
|
28
|
-
const e =
|
|
28
|
+
const e = Un(yn);
|
|
29
29
|
if (!e)
|
|
30
30
|
throw new Error("useTranslations must be used within TranslationsProvider");
|
|
31
31
|
return e;
|
|
@@ -36,43 +36,43 @@ function Zt(e, n) {
|
|
|
36
36
|
for (var o = 0, a = Array(n); o < n; o++) a[o] = e[o];
|
|
37
37
|
return a;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ei(e) {
|
|
40
40
|
if (Array.isArray(e)) return e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ti(e, n) {
|
|
43
43
|
var o = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
44
44
|
if (o != null) {
|
|
45
|
-
var a, l, c, d,
|
|
45
|
+
var a, l, c, d, f = [], m = !0, p = !1;
|
|
46
46
|
try {
|
|
47
|
-
if (c = (o = o.call(e)).next, n !== 0) for (; !(
|
|
48
|
-
} catch (
|
|
49
|
-
|
|
47
|
+
if (c = (o = o.call(e)).next, n !== 0) for (; !(m = (a = c.call(o)).done) && (f.push(a.value), f.length !== n); m = !0) ;
|
|
48
|
+
} catch (h) {
|
|
49
|
+
p = !0, l = h;
|
|
50
50
|
} finally {
|
|
51
51
|
try {
|
|
52
|
-
if (!
|
|
52
|
+
if (!m && o.return != null && (d = o.return(), Object(d) !== d)) return;
|
|
53
53
|
} finally {
|
|
54
|
-
if (
|
|
54
|
+
if (p) throw l;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
return
|
|
57
|
+
return f;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function ni() {
|
|
61
61
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
62
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function ii(e, n) {
|
|
65
|
+
return ei(e) || ti(e, n) || oi(e, n) || ni();
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function oi(e, n) {
|
|
68
68
|
if (e) {
|
|
69
69
|
if (typeof e == "string") return Zt(e, n);
|
|
70
70
|
var o = {}.toString.call(e).slice(8, -1);
|
|
71
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
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
let B = Object.freeze, Y = Object.seal, _e = Object.create,
|
|
74
|
+
const An = Object.entries, Qt = Object.setPrototypeOf, ri = Object.isFrozen, si = Object.getPrototypeOf, ai = Object.getOwnPropertyDescriptor;
|
|
75
|
+
let B = Object.freeze, Y = Object.seal, _e = Object.create, Sn = typeof Reflect < "u" && Reflect, yt = Sn.apply, At = Sn.construct;
|
|
76
76
|
B || (B = function(n) {
|
|
77
77
|
return n;
|
|
78
78
|
});
|
|
@@ -89,7 +89,7 @@ At || (At = function(n) {
|
|
|
89
89
|
a[l - 1] = arguments[l];
|
|
90
90
|
return new n(...a);
|
|
91
91
|
});
|
|
92
|
-
const Te = x(Array.prototype.forEach),
|
|
92
|
+
const Te = x(Array.prototype.forEach), li = x(Array.prototype.lastIndexOf), Jt = x(Array.prototype.pop), ye = x(Array.prototype.push), ci = x(Array.prototype.splice), H = Array.isArray, Ne = x(String.prototype.toLowerCase), dt = x(String.prototype.toString), en = x(String.prototype.match), Ae = x(String.prototype.replace), tn = x(String.prototype.indexOf), mi = x(String.prototype.trim), ui = x(Number.prototype.toString), di = x(Boolean.prototype.toString), nn = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), on = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), D = x(Object.prototype.hasOwnProperty), Oe = x(Object.prototype.toString), z = x(RegExp.prototype.test), Ge = fi(TypeError);
|
|
93
93
|
function x(e) {
|
|
94
94
|
return function(n) {
|
|
95
95
|
n instanceof RegExp && (n.lastIndex = 0);
|
|
@@ -98,7 +98,7 @@ function x(e) {
|
|
|
98
98
|
return yt(e, n, a);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function fi(e) {
|
|
102
102
|
return function() {
|
|
103
103
|
for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++)
|
|
104
104
|
o[a] = arguments[a];
|
|
@@ -114,34 +114,34 @@ function T(e, n) {
|
|
|
114
114
|
let l = n[a];
|
|
115
115
|
if (typeof l == "string") {
|
|
116
116
|
const c = o(l);
|
|
117
|
-
c !== l && (
|
|
117
|
+
c !== l && (ri(n) || (n[a] = c), l = c);
|
|
118
118
|
}
|
|
119
119
|
e[l] = !0;
|
|
120
120
|
}
|
|
121
121
|
return e;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function pi(e) {
|
|
124
124
|
for (let n = 0; n < e.length; n++)
|
|
125
125
|
D(e, n) || (e[n] = null);
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
128
|
function W(e) {
|
|
129
129
|
const n = _e(null);
|
|
130
|
-
for (const a of
|
|
131
|
-
var o =
|
|
130
|
+
for (const a of An(e)) {
|
|
131
|
+
var o = ii(a, 2);
|
|
132
132
|
const l = o[0], c = o[1];
|
|
133
|
-
D(e, l) && (H(c) ? n[l] =
|
|
133
|
+
D(e, l) && (H(c) ? n[l] = pi(c) : c && typeof c == "object" && c.constructor === Object ? n[l] = W(c) : n[l] = c);
|
|
134
134
|
}
|
|
135
135
|
return n;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function gi(e) {
|
|
138
138
|
switch (typeof e) {
|
|
139
139
|
case "string":
|
|
140
140
|
return e;
|
|
141
141
|
case "number":
|
|
142
|
-
return
|
|
142
|
+
return ui(e);
|
|
143
143
|
case "boolean":
|
|
144
|
-
return
|
|
144
|
+
return di(e);
|
|
145
145
|
case "bigint":
|
|
146
146
|
return nn ? nn(e) : "0";
|
|
147
147
|
case "symbol":
|
|
@@ -165,43 +165,43 @@ function hi(e) {
|
|
|
165
165
|
}
|
|
166
166
|
function de(e, n) {
|
|
167
167
|
for (; e !== null; ) {
|
|
168
|
-
const a =
|
|
168
|
+
const a = ai(e, n);
|
|
169
169
|
if (a) {
|
|
170
170
|
if (a.get)
|
|
171
171
|
return x(a.get);
|
|
172
172
|
if (typeof a.value == "function")
|
|
173
173
|
return x(a.value);
|
|
174
174
|
}
|
|
175
|
-
e =
|
|
175
|
+
e = si(e);
|
|
176
176
|
}
|
|
177
177
|
function o() {
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
180
180
|
return o;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function hi(e) {
|
|
183
183
|
try {
|
|
184
184
|
return z(e, ""), !0;
|
|
185
185
|
} catch {
|
|
186
186
|
return !1;
|
|
187
187
|
}
|
|
188
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"]),
|
|
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"]), bi = 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"]), Ti = 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"]), yi = Y(/{{[\w\W]*|^[\w\W]*}}/g), Ai = Y(/<%[\w\W]*|^[\w\W]*%>/g), Si = Y(/\${[\w\W]*/g), _i = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ei = Y(/^aria-[\-\w]+$/), cn = Y(
|
|
190
190
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
191
191
|
// eslint-disable-line no-useless-escape
|
|
192
|
-
),
|
|
192
|
+
), Ii = Y(/^(?:\w+script|data):/i), wi = Y(
|
|
193
193
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
194
194
|
// eslint-disable-line no-control-regex
|
|
195
|
-
),
|
|
195
|
+
), Ci = Y(/^html$/i), Di = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), Se = {
|
|
196
196
|
element: 1,
|
|
197
197
|
text: 3,
|
|
198
198
|
// Deprecated
|
|
199
199
|
progressingInstruction: 7,
|
|
200
200
|
comment: 8,
|
|
201
201
|
document: 9
|
|
202
|
-
},
|
|
202
|
+
}, Ri = function() {
|
|
203
203
|
return typeof window > "u" ? null : window;
|
|
204
|
-
},
|
|
204
|
+
}, Oi = function(n, o) {
|
|
205
205
|
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
206
206
|
return null;
|
|
207
207
|
let a = null;
|
|
@@ -233,22 +233,22 @@ const rn = B(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
233
233
|
uponSanitizeShadowNode: []
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
|
-
function
|
|
237
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
238
|
-
const n = (
|
|
236
|
+
function _n() {
|
|
237
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ri();
|
|
238
|
+
const n = (g) => _n(g);
|
|
239
239
|
if (n.version = "3.4.5", n.removed = [], !e || !e.document || e.document.nodeType !== Se.document || !e.Element)
|
|
240
240
|
return n.isSupported = !1, n;
|
|
241
241
|
let o = e.document;
|
|
242
|
-
const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement,
|
|
242
|
+
const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, f = e.Node, m = e.Element, p = e.NodeFilter, h = e.NamedNodeMap, C = h === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : h, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = m.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), M = de(V, "nextSibling"), ne = de(V, "childNodes"), O = de(V, "parentNode"), ce = f && f.prototype ? de(f.prototype, "nodeType") : null;
|
|
243
243
|
if (typeof d == "function") {
|
|
244
|
-
const
|
|
245
|
-
|
|
244
|
+
const g = o.createElement("template");
|
|
245
|
+
g.content && g.content.ownerDocument && (o = g.content.ownerDocument);
|
|
246
246
|
}
|
|
247
247
|
let E, N = "";
|
|
248
248
|
const J = o, Ie = J.implementation, xe = J.createNodeIterator, Xe = J.createDocumentFragment, Ke = J.getElementsByTagName, Ze = a.importNode;
|
|
249
249
|
let j = mn();
|
|
250
|
-
n.isSupported = typeof
|
|
251
|
-
const ke =
|
|
250
|
+
n.isSupported = typeof An == "function" && typeof O == "function" && Ie && Ie.createHTMLDocument !== void 0;
|
|
251
|
+
const ke = yi, Me = Ai, Pe = Si, Cn = _i, Dn = Ei, Rn = Ii, wt = wi, On = Di;
|
|
252
252
|
let Ct = cn, P = null;
|
|
253
253
|
const Dt = T({}, [...rn, ...ft, ...pt, ...gt, ...sn]);
|
|
254
254
|
let U = null;
|
|
@@ -296,20 +296,20 @@ function En() {
|
|
|
296
296
|
let it = null;
|
|
297
297
|
const Ft = T({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), je = "http://www.w3.org/1998/Math/MathML", He = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
|
|
298
298
|
let he = Q, ot = !1, rt = null;
|
|
299
|
-
const
|
|
299
|
+
const Nn = T({}, [je, He, Q], dt);
|
|
300
300
|
let st = T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = T({}, ["annotation-xml"]);
|
|
301
|
-
const
|
|
301
|
+
const vn = T({}, ["title", "style", "font", "a", "script"]);
|
|
302
302
|
let Re = null;
|
|
303
|
-
const
|
|
303
|
+
const Ln = ["application/xhtml+xml", "text/html"], xn = "text/html";
|
|
304
304
|
let k = null, be = null;
|
|
305
|
-
const
|
|
305
|
+
const kn = o.createElement("form"), Ut = function(t) {
|
|
306
306
|
return t instanceof RegExp || t instanceof Function;
|
|
307
307
|
}, lt = function() {
|
|
308
308
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
309
309
|
if (be && be === t)
|
|
310
310
|
return;
|
|
311
311
|
(!t || typeof t != "object") && (t = {}), t = W(t), Re = // eslint-disable-next-line unicorn/prefer-includes
|
|
312
|
-
|
|
312
|
+
Ln.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? xn : 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) : Nn, 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 = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : cn, he = typeof t.NAMESPACE == "string" ? t.NAMESPACE : Q, st = D(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? W(t.MATHML_TEXT_INTEGRATION_POINTS) : T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = D(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? W(t.HTML_INTEGRATION_POINTS) : T({}, ["annotation-xml"]);
|
|
313
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
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
315
|
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
@@ -318,16 +318,16 @@ function En() {
|
|
|
318
318
|
throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
319
319
|
E = t.TRUSTED_TYPES_POLICY, N = E.createHTML("");
|
|
320
320
|
} else
|
|
321
|
-
E === void 0 && (E =
|
|
321
|
+
E === void 0 && (E = Oi(y, l)), E !== null && typeof N == "string" && (N = E.createHTML(""));
|
|
322
322
|
B && B(t), be = t;
|
|
323
|
-
}, zt = T({}, [...ft, ...pt, ...
|
|
323
|
+
}, zt = T({}, [...ft, ...pt, ...bi]), jt = T({}, [...gt, ...Ti]), Mn = function(t) {
|
|
324
324
|
let s = O(t);
|
|
325
325
|
(!s || !s.tagName) && (s = {
|
|
326
326
|
namespaceURI: he,
|
|
327
327
|
tagName: "template"
|
|
328
328
|
});
|
|
329
|
-
const
|
|
330
|
-
return rt[t.namespaceURI] ? t.namespaceURI === He ? s.namespaceURI === Q ?
|
|
329
|
+
const u = Ne(t.tagName), A = Ne(s.tagName);
|
|
330
|
+
return rt[t.namespaceURI] ? t.namespaceURI === He ? s.namespaceURI === Q ? u === "svg" : s.namespaceURI === je ? u === "svg" && (A === "annotation-xml" || st[A]) : !!zt[u] : t.namespaceURI === je ? s.namespaceURI === Q ? u === "math" : s.namespaceURI === He ? u === "math" && at[A] : !!jt[u] : t.namespaceURI === Q ? s.namespaceURI === He && !at[A] || s.namespaceURI === je && !st[A] ? !1 : !jt[u] && (vn[u] || !zt[u]) : !!(Re === "application/xhtml+xml" && rt[t.namespaceURI]) : !1;
|
|
331
331
|
}, X = function(t) {
|
|
332
332
|
ye(n.removed, {
|
|
333
333
|
element: t
|
|
@@ -361,12 +361,12 @@ function En() {
|
|
|
361
361
|
} catch {
|
|
362
362
|
}
|
|
363
363
|
}, Ht = function(t) {
|
|
364
|
-
let s = null,
|
|
364
|
+
let s = null, u = null;
|
|
365
365
|
if (et)
|
|
366
366
|
t = "<remove></remove>" + t;
|
|
367
367
|
else {
|
|
368
368
|
const L = en(t, /^[\r\n\t ]+/);
|
|
369
|
-
|
|
369
|
+
u = L && L[0];
|
|
370
370
|
}
|
|
371
371
|
Re === "application/xhtml+xml" && he === Q && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
372
372
|
const A = E ? E.createHTML(t) : t;
|
|
@@ -383,13 +383,13 @@ function En() {
|
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
const v = s.body || s.documentElement;
|
|
386
|
-
return t &&
|
|
386
|
+
return t && u && v.insertBefore(o.createTextNode(u), v.childNodes[0] || null), he === Q ? Ke.call(s, me ? "html" : "body")[0] : me ? s.documentElement : v;
|
|
387
387
|
}, $t = function(t) {
|
|
388
388
|
return xe.call(
|
|
389
389
|
t.ownerDocument || t,
|
|
390
390
|
t,
|
|
391
391
|
// eslint-disable-next-line no-bitwise
|
|
392
|
-
|
|
392
|
+
p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
|
|
393
393
|
null
|
|
394
394
|
);
|
|
395
395
|
}, Bt = function(t) {
|
|
@@ -398,15 +398,15 @@ function En() {
|
|
|
398
398
|
t.ownerDocument || t,
|
|
399
399
|
t,
|
|
400
400
|
// eslint-disable-next-line no-bitwise
|
|
401
|
-
|
|
401
|
+
p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION,
|
|
402
402
|
null
|
|
403
403
|
);
|
|
404
|
-
let
|
|
405
|
-
for (;
|
|
406
|
-
let A =
|
|
404
|
+
let u = s.nextNode();
|
|
405
|
+
for (; u; ) {
|
|
406
|
+
let A = u.data;
|
|
407
407
|
Te([ke, Me, Pe], (v) => {
|
|
408
408
|
A = Ae(A, v, " ");
|
|
409
|
-
}),
|
|
409
|
+
}), u.data = A, u = s.nextNode();
|
|
410
410
|
}
|
|
411
411
|
}, ct = function(t) {
|
|
412
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");
|
|
@@ -419,25 +419,25 @@ function En() {
|
|
|
419
419
|
return !1;
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
|
-
function ee(
|
|
423
|
-
Te(
|
|
424
|
-
|
|
422
|
+
function ee(g, t, s) {
|
|
423
|
+
Te(g, (u) => {
|
|
424
|
+
u.call(n, t, s, be);
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
const Gt = function(t) {
|
|
428
428
|
let s = null;
|
|
429
429
|
if (ee(j.beforeSanitizeElements, t, null), ct(t))
|
|
430
430
|
return X(t), !0;
|
|
431
|
-
const
|
|
431
|
+
const u = k(t.nodeName);
|
|
432
432
|
if (ee(j.uponSanitizeElement, t, {
|
|
433
|
-
tagName:
|
|
433
|
+
tagName: u,
|
|
434
434
|
allowedTags: P
|
|
435
|
-
}), Ce && t.hasChildNodes() && !$e(t.firstElementChild) && z(/<[/\w!]/g, t.innerHTML) && z(/<[/\w!]/g, t.textContent) || Ce && t.namespaceURI === Q &&
|
|
435
|
+
}), Ce && t.hasChildNodes() && !$e(t.firstElementChild) && z(/<[/\w!]/g, t.innerHTML) && z(/<[/\w!]/g, t.textContent) || Ce && t.namespaceURI === Q && u === "style" && $e(t.firstElementChild) || t.nodeType === Se.progressingInstruction || Ce && t.nodeType === Se.comment && z(/<[/\w]/g, t.data))
|
|
436
436
|
return X(t), !0;
|
|
437
|
-
if (we[
|
|
438
|
-
if (!we[
|
|
437
|
+
if (we[u] || !(ie.tagCheck instanceof Function && ie.tagCheck(u)) && !P[u]) {
|
|
438
|
+
if (!we[u] && qt(u) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
|
|
439
439
|
return !1;
|
|
440
|
-
if (tt && !Z[
|
|
440
|
+
if (tt && !Z[u]) {
|
|
441
441
|
const A = O(t) || t.parentNode, v = ne(t) || t.childNodes;
|
|
442
442
|
if (v && A) {
|
|
443
443
|
const L = v.length;
|
|
@@ -449,17 +449,17 @@ function En() {
|
|
|
449
449
|
}
|
|
450
450
|
return X(t), !0;
|
|
451
451
|
}
|
|
452
|
-
return t instanceof
|
|
452
|
+
return t instanceof m && !Mn(t) || (u === "noscript" || u === "noembed" || u === "noframes") && z(/<\/no(script|embed|frames)/i, t.innerHTML) ? (X(t), !0) : (oe && t.nodeType === Se.text && (s = t.textContent, Te([ke, Me, Pe], (A) => {
|
|
453
453
|
s = Ae(s, A, " ");
|
|
454
454
|
}), t.textContent !== s && (ye(n.removed, {
|
|
455
455
|
element: t.cloneNode()
|
|
456
456
|
}), t.textContent = s)), ee(j.afterSanitizeElements, t, null), !1);
|
|
457
|
-
}, Wt = function(t, s,
|
|
458
|
-
if (Fe[s] || Lt && (s === "id" || s === "name") && (
|
|
457
|
+
}, Wt = function(t, s, u) {
|
|
458
|
+
if (Fe[s] || Lt && (s === "id" || s === "name") && (u in o || u in kn))
|
|
459
459
|
return !1;
|
|
460
460
|
const A = U[s] || ie.attributeCheck instanceof Function && ie.attributeCheck(s, t);
|
|
461
|
-
if (!(Qe && !Fe[s] && z(
|
|
462
|
-
if (!(Ot && z(
|
|
461
|
+
if (!(Qe && !Fe[s] && z(Cn, s))) {
|
|
462
|
+
if (!(Ot && z(Dn, s))) {
|
|
463
463
|
if (!A || Fe[s]) {
|
|
464
464
|
if (
|
|
465
465
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
@@ -467,13 +467,13 @@ function En() {
|
|
|
467
467
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
468
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
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,
|
|
470
|
+
s === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, u) || R.tagNameCheck instanceof Function && R.tagNameCheck(u)))
|
|
471
471
|
) return !1;
|
|
472
472
|
} else if (!it[s]) {
|
|
473
|
-
if (!z(Ct, Ae(
|
|
474
|
-
if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(
|
|
475
|
-
if (!(Nt && !z(
|
|
476
|
-
if (
|
|
473
|
+
if (!z(Ct, Ae(u, wt, ""))) {
|
|
474
|
+
if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(u, "data:") === 0 && Mt[t])) {
|
|
475
|
+
if (!(Nt && !z(Rn, Ae(u, wt, "")))) {
|
|
476
|
+
if (u)
|
|
477
477
|
return !1;
|
|
478
478
|
}
|
|
479
479
|
}
|
|
@@ -482,14 +482,14 @@ function En() {
|
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
return !0;
|
|
485
|
-
},
|
|
486
|
-
return !
|
|
485
|
+
}, Pn = T({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qt = function(t) {
|
|
486
|
+
return !Pn[Ne(t)] && z(On, t);
|
|
487
487
|
}, Yt = function(t) {
|
|
488
488
|
ee(j.beforeSanitizeAttributes, t, null);
|
|
489
489
|
const s = t.attributes;
|
|
490
490
|
if (!s || ct(t))
|
|
491
491
|
return;
|
|
492
|
-
const
|
|
492
|
+
const u = {
|
|
493
493
|
attrName: "",
|
|
494
494
|
attrValue: "",
|
|
495
495
|
keepAttr: !0,
|
|
@@ -499,8 +499,8 @@ function En() {
|
|
|
499
499
|
let A = s.length;
|
|
500
500
|
for (; A--; ) {
|
|
501
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 :
|
|
503
|
-
if (
|
|
502
|
+
let F = L === "value" ? ut : mi(ut);
|
|
503
|
+
if (u.attrName = te, u.attrValue = F, u.keepAttr = !0, u.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, u), F = u.attrValue, xt && (te === "id" || te === "name") && tn(F, kt) !== 0 && (ue(L, t), F = kt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
|
|
504
504
|
ue(L, t);
|
|
505
505
|
continue;
|
|
506
506
|
}
|
|
@@ -508,9 +508,9 @@ function En() {
|
|
|
508
508
|
ue(L, t);
|
|
509
509
|
continue;
|
|
510
510
|
}
|
|
511
|
-
if (
|
|
511
|
+
if (u.forceKeepAttr)
|
|
512
512
|
continue;
|
|
513
|
-
if (!
|
|
513
|
+
if (!u.keepAttr) {
|
|
514
514
|
ue(L, t);
|
|
515
515
|
continue;
|
|
516
516
|
}
|
|
@@ -547,8 +547,8 @@ function En() {
|
|
|
547
547
|
ee(j.afterSanitizeAttributes, t, null);
|
|
548
548
|
}, mt = function(t) {
|
|
549
549
|
let s = null;
|
|
550
|
-
const
|
|
551
|
-
for (ee(j.beforeSanitizeShadowDOM, t, null); s =
|
|
550
|
+
const u = $t(t);
|
|
551
|
+
for (ee(j.beforeSanitizeShadowDOM, t, null); s = u.nextNode(); )
|
|
552
552
|
ee(j.uponSanitizeShadowNode, s, null), Gt(s), Yt(s), s.content instanceof c && mt(s.content);
|
|
553
553
|
ee(j.afterSanitizeShadowDOM, t, null);
|
|
554
554
|
}, Be = function(t) {
|
|
@@ -559,42 +559,42 @@ function En() {
|
|
|
559
559
|
const s = t.childNodes;
|
|
560
560
|
if (!s)
|
|
561
561
|
return;
|
|
562
|
-
const
|
|
562
|
+
const u = [];
|
|
563
563
|
Te(s, (A) => {
|
|
564
|
-
ye(
|
|
564
|
+
ye(u, A);
|
|
565
565
|
});
|
|
566
|
-
for (const A of
|
|
566
|
+
for (const A of u)
|
|
567
567
|
Be(A);
|
|
568
568
|
};
|
|
569
|
-
return n.sanitize = function(
|
|
570
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null,
|
|
571
|
-
if (ot = !
|
|
569
|
+
return n.sanitize = function(g) {
|
|
570
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, u = null, A = null, v = null;
|
|
571
|
+
if (ot = !g, ot && (g = "<!-->"), typeof g != "string" && !$e(g) && (g = gi(g), typeof g != "string"))
|
|
572
572
|
throw Ge("dirty is not a string, aborting");
|
|
573
573
|
if (!n.isSupported)
|
|
574
|
-
return
|
|
575
|
-
if (Je || lt(t), n.removed = [], typeof
|
|
576
|
-
const re =
|
|
574
|
+
return g;
|
|
575
|
+
if (Je || lt(t), n.removed = [], typeof g == "string" && (De = !1), De) {
|
|
576
|
+
const re = g.nodeName;
|
|
577
577
|
if (typeof re == "string") {
|
|
578
578
|
const te = k(re);
|
|
579
579
|
if (!P[te] || we[te])
|
|
580
580
|
throw Ge("root node is forbidden and cannot be sanitized in-place");
|
|
581
581
|
}
|
|
582
|
-
Be(
|
|
583
|
-
} else if ($e(
|
|
584
|
-
s = Ht("<!---->"),
|
|
582
|
+
Be(g);
|
|
583
|
+
} else if ($e(g))
|
|
584
|
+
s = Ht("<!---->"), u = s.ownerDocument.importNode(g, !0), u.nodeType === Se.element && u.nodeName === "BODY" || u.nodeName === "HTML" ? s = u : s.appendChild(u), Be(u);
|
|
585
585
|
else {
|
|
586
586
|
if (!pe && !oe && !me && // eslint-disable-next-line unicorn/prefer-includes
|
|
587
|
-
|
|
588
|
-
return E && ze ? E.createHTML(
|
|
589
|
-
if (s = Ht(
|
|
587
|
+
g.indexOf("<") === -1)
|
|
588
|
+
return E && ze ? E.createHTML(g) : g;
|
|
589
|
+
if (s = Ht(g), !s)
|
|
590
590
|
return pe ? null : ze ? N : "";
|
|
591
591
|
}
|
|
592
592
|
s && et && X(s.firstChild);
|
|
593
|
-
const L = $t(De ?
|
|
593
|
+
const L = $t(De ? g : s);
|
|
594
594
|
for (; A = L.nextNode(); )
|
|
595
595
|
Gt(A), Yt(A), A.content instanceof c && mt(A.content);
|
|
596
596
|
if (De)
|
|
597
|
-
return oe && Bt(
|
|
597
|
+
return oe && Bt(g), g;
|
|
598
598
|
if (pe) {
|
|
599
599
|
if (oe && Bt(s), Ue)
|
|
600
600
|
for (v = Xe.call(s.ownerDocument); s.firstChild; )
|
|
@@ -604,35 +604,35 @@ function En() {
|
|
|
604
604
|
return (U.shadowroot || U.shadowrootmode) && (v = Ze.call(a, v, !0)), v;
|
|
605
605
|
}
|
|
606
606
|
let G = me ? s.outerHTML : s.innerHTML;
|
|
607
|
-
return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(
|
|
607
|
+
return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(Ci, s.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
|
|
608
608
|
` + G), oe && Te([ke, Me, Pe], (re) => {
|
|
609
609
|
G = Ae(G, re, " ");
|
|
610
610
|
}), E && ze ? E.createHTML(G) : G;
|
|
611
611
|
}, n.setConfig = function() {
|
|
612
|
-
let
|
|
613
|
-
lt(
|
|
612
|
+
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
613
|
+
lt(g), Je = !0;
|
|
614
614
|
}, n.clearConfig = function() {
|
|
615
615
|
be = null, Je = !1;
|
|
616
|
-
}, n.isValidAttribute = function(
|
|
616
|
+
}, n.isValidAttribute = function(g, t, s) {
|
|
617
617
|
be || lt({});
|
|
618
|
-
const
|
|
619
|
-
return Wt(
|
|
620
|
-
}, n.addHook = function(
|
|
621
|
-
typeof t == "function" && ye(j[
|
|
622
|
-
}, n.removeHook = function(
|
|
618
|
+
const u = k(g), A = k(t);
|
|
619
|
+
return Wt(u, A, s);
|
|
620
|
+
}, n.addHook = function(g, t) {
|
|
621
|
+
typeof t == "function" && ye(j[g], t);
|
|
622
|
+
}, n.removeHook = function(g, t) {
|
|
623
623
|
if (t !== void 0) {
|
|
624
|
-
const s =
|
|
625
|
-
return s === -1 ? void 0 :
|
|
624
|
+
const s = li(j[g], t);
|
|
625
|
+
return s === -1 ? void 0 : ci(j[g], s, 1)[0];
|
|
626
626
|
}
|
|
627
|
-
return Jt(j[
|
|
628
|
-
}, n.removeHooks = function(
|
|
629
|
-
j[
|
|
627
|
+
return Jt(j[g]);
|
|
628
|
+
}, n.removeHooks = function(g) {
|
|
629
|
+
j[g] = [];
|
|
630
630
|
}, n.removeAllHooks = function() {
|
|
631
631
|
j = mn();
|
|
632
632
|
}, n;
|
|
633
633
|
}
|
|
634
|
-
var bt =
|
|
635
|
-
const
|
|
634
|
+
var bt = _n();
|
|
635
|
+
const Ni = /* @__PURE__ */ new Set([
|
|
636
636
|
// layout
|
|
637
637
|
"display",
|
|
638
638
|
"float",
|
|
@@ -641,6 +641,7 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
641
641
|
"overflow-x",
|
|
642
642
|
"overflow-y",
|
|
643
643
|
"visibility",
|
|
644
|
+
"opacity",
|
|
644
645
|
"cursor",
|
|
645
646
|
"direction",
|
|
646
647
|
"user-select",
|
|
@@ -838,6 +839,10 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
838
839
|
"animation-direction",
|
|
839
840
|
"animation-fill-mode",
|
|
840
841
|
"animation-play-state",
|
|
842
|
+
// transforms — no value filter needed; .user_content has overflow-y:hidden and overflow-x:auto
|
|
843
|
+
// (canvas-lms g/412928), which together contain transformed content within the container on
|
|
844
|
+
// both axes and prevent overlay of Canvas UI.
|
|
845
|
+
"transform",
|
|
841
846
|
// columns
|
|
842
847
|
"column-count",
|
|
843
848
|
"column-width",
|
|
@@ -869,7 +874,7 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
869
874
|
"caret-color",
|
|
870
875
|
"accent-color",
|
|
871
876
|
"appearance"
|
|
872
|
-
]),
|
|
877
|
+
]), vi = /* @__PURE__ */ new Set([
|
|
873
878
|
"src",
|
|
874
879
|
"href",
|
|
875
880
|
"action",
|
|
@@ -880,7 +885,7 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
880
885
|
"cite",
|
|
881
886
|
"longdesc",
|
|
882
887
|
"xlink:href"
|
|
883
|
-
]),
|
|
888
|
+
]), Li = [
|
|
884
889
|
"background",
|
|
885
890
|
"background-image",
|
|
886
891
|
"list-style",
|
|
@@ -889,7 +894,7 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
889
894
|
// content: url(...) triggers an HTTP GET even on non-pseudo elements in some
|
|
890
895
|
// browsers; strip it as defense-in-depth against tracking-pixel exfiltration.
|
|
891
896
|
"content"
|
|
892
|
-
],
|
|
897
|
+
], xi = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, ki = /* @__PURE__ */ new Set([
|
|
893
898
|
"allow-downloads",
|
|
894
899
|
"allow-forms",
|
|
895
900
|
"allow-modals",
|
|
@@ -902,7 +907,7 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
902
907
|
"allow-scripts",
|
|
903
908
|
"allow-storage-access-by-user-activation",
|
|
904
909
|
"allow-top-navigation-by-user-activation"
|
|
905
|
-
]),
|
|
910
|
+
]), Mi = {
|
|
906
911
|
ADD_TAGS: ["iframe"],
|
|
907
912
|
ADD_ATTR: [
|
|
908
913
|
"allowfullscreen",
|
|
@@ -918,13 +923,15 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
918
923
|
"webkitallowfullscreen",
|
|
919
924
|
"mozallowfullscreen",
|
|
920
925
|
"scrolling",
|
|
926
|
+
// loading="lazy" is not in DOMPurify's default ALLOWED_ATTR and must be
|
|
927
|
+
// explicitly added. No security concern — it is a performance hint only.
|
|
928
|
+
"loading",
|
|
921
929
|
// MathML 4 (W3C) annotation attributes for screen-reader accessibility.
|
|
922
930
|
// MathCAT, JAWS, and NVDA use `intent` to know how to pronounce
|
|
923
931
|
// expressions; `arg` labels sub-expressions referenced by intent.
|
|
924
932
|
// These are plain string annotations — no URL-loading, no code execution.
|
|
925
933
|
"intent",
|
|
926
|
-
"arg"
|
|
927
|
-
"loading"
|
|
934
|
+
"arg"
|
|
928
935
|
],
|
|
929
936
|
// Rails UJS turns data-method/data-remote/etc. on clickable elements into
|
|
930
937
|
// state-changing requests carrying the victim's CSRF token. Strip them so
|
|
@@ -946,15 +953,15 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
946
953
|
FORCE_BODY: !0
|
|
947
954
|
};
|
|
948
955
|
let se = null;
|
|
949
|
-
function
|
|
956
|
+
function Pi() {
|
|
950
957
|
return se || (se = typeof bt == "function" ? bt(window) : bt, se.addHook("afterSanitizeAttributes", (e) => {
|
|
951
958
|
if (!(e instanceof Element) || !e.hasAttribute("style")) return;
|
|
952
959
|
const n = e.style, o = [];
|
|
953
|
-
for (let
|
|
954
|
-
const
|
|
955
|
-
|
|
960
|
+
for (let f = 0; f < n.length; f++) {
|
|
961
|
+
const m = n.item(f);
|
|
962
|
+
Ni.has(m) || o.push(m);
|
|
956
963
|
}
|
|
957
|
-
for (const
|
|
964
|
+
for (const f of o) n.removeProperty(f);
|
|
958
965
|
const a = /* @__PURE__ */ new Set([
|
|
959
966
|
"static",
|
|
960
967
|
"relative",
|
|
@@ -966,15 +973,33 @@ function Fi() {
|
|
|
966
973
|
"revert-layer"
|
|
967
974
|
]), l = n.getPropertyValue("position").trim().toLowerCase();
|
|
968
975
|
l && !a.has(l) && n.removeProperty("position");
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
976
|
+
const c = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert", "revert-layer"]), d = n.getPropertyValue("opacity").trim().toLowerCase();
|
|
977
|
+
d && !c.has(d) && (d.endsWith("%") ? parseFloat(d) / 100 : parseFloat(d)) < 0.05 && n.removeProperty("opacity");
|
|
978
|
+
for (const f of Li) {
|
|
979
|
+
const m = n.getPropertyValue(f);
|
|
980
|
+
m && xi.test(m) && n.removeProperty(f);
|
|
972
981
|
}
|
|
973
982
|
n.length === 0 && e.removeAttribute("style");
|
|
974
983
|
}), se.addHook("uponSanitizeAttribute", (e, n) => {
|
|
975
|
-
|
|
984
|
+
if (!vi.has(n.attrName)) return;
|
|
985
|
+
const o = n.attrValue;
|
|
986
|
+
/^\s*\/\//.test(o) ? (n.attrValue = o.trimStart().replace(/^\/\//, "https://"), n.keepAttr = !0) : /^\s*\\/.test(o) && (n.keepAttr = !1);
|
|
976
987
|
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
977
|
-
!(e instanceof Element) || !e.hasAttribute("srcset")
|
|
988
|
+
if (!(e instanceof Element) || !e.hasAttribute("srcset")) return;
|
|
989
|
+
const n = (e.getAttribute("srcset") ?? "").split(","), o = (c) => c.trim().split(/\s+/)[0];
|
|
990
|
+
if (n.some((c) => /^\s*\\/.test(o(c)))) {
|
|
991
|
+
e.removeAttribute("srcset");
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
let a = !1;
|
|
995
|
+
const l = n.map((c) => {
|
|
996
|
+
const d = o(c);
|
|
997
|
+
if (!d.startsWith("//")) return c;
|
|
998
|
+
a = !0;
|
|
999
|
+
const f = c.indexOf(d);
|
|
1000
|
+
return c.slice(0, f) + "https://" + d.slice(2) + c.slice(f + d.length);
|
|
1001
|
+
});
|
|
1002
|
+
a && e.setAttribute("srcset", l.join(","));
|
|
978
1003
|
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
979
1004
|
var n;
|
|
980
1005
|
if (!(e instanceof Element) || e.tagName !== "A" && e.tagName !== "AREA" || ((n = e.getAttribute("target")) == null ? void 0 : n.toLowerCase()) !== "_blank") return;
|
|
@@ -982,17 +1007,17 @@ function Fi() {
|
|
|
982
1007
|
a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
|
|
983
1008
|
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
984
1009
|
if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
|
|
985
|
-
const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) =>
|
|
1010
|
+
const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => ki.has(a));
|
|
986
1011
|
o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
|
|
987
1012
|
}), se);
|
|
988
1013
|
}
|
|
989
1014
|
function It(e, n) {
|
|
990
1015
|
if (typeof window > "u")
|
|
991
1016
|
throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
|
|
992
|
-
const o =
|
|
993
|
-
return
|
|
1017
|
+
const o = Mi;
|
|
1018
|
+
return Pi().sanitize(e ?? "", o);
|
|
994
1019
|
}
|
|
995
|
-
const
|
|
1020
|
+
const Fi = ae`
|
|
996
1021
|
query GetAssignment($courseId: ID!, $assignmentId: ID!, $userId: ID!) {
|
|
997
1022
|
legacyNode(_id: $assignmentId, type: Assignment) {
|
|
998
1023
|
... on Assignment {
|
|
@@ -1051,7 +1076,7 @@ const Ui = ae`
|
|
|
1051
1076
|
contentType
|
|
1052
1077
|
submissionPreviewUrl
|
|
1053
1078
|
}
|
|
1054
|
-
`,
|
|
1079
|
+
`, Ui = ae`
|
|
1055
1080
|
query GetSubmissionComments(
|
|
1056
1081
|
$submissionId: ID!
|
|
1057
1082
|
$courseId: String
|
|
@@ -1100,7 +1125,7 @@ const Ui = ae`
|
|
|
1100
1125
|
}
|
|
1101
1126
|
}
|
|
1102
1127
|
}
|
|
1103
|
-
`,
|
|
1128
|
+
`, zi = ae`
|
|
1104
1129
|
query getSubmissions($submissionId: ID!) {
|
|
1105
1130
|
node(id: $submissionId) {
|
|
1106
1131
|
... on Submission {
|
|
@@ -1142,12 +1167,12 @@ const Ui = ae`
|
|
|
1142
1167
|
url: i.string(),
|
|
1143
1168
|
contentType: i.string(),
|
|
1144
1169
|
submissionPreviewUrl: i.string().nullable()
|
|
1145
|
-
}),
|
|
1170
|
+
}), ji = i.object({
|
|
1146
1171
|
_id: i.string(),
|
|
1147
1172
|
activeSubmissionType: i.string(),
|
|
1148
1173
|
body: i.string().nullable(),
|
|
1149
1174
|
attachments: i.array(ve).nullable()
|
|
1150
|
-
}),
|
|
1175
|
+
}), Hi = i.object({
|
|
1151
1176
|
id: i.string(),
|
|
1152
1177
|
submittedAt: i.string(),
|
|
1153
1178
|
body: i.string().nullable(),
|
|
@@ -1158,8 +1183,8 @@ const Ui = ae`
|
|
|
1158
1183
|
unreadCommentCount: i.number(),
|
|
1159
1184
|
attachment: ve.nullable(),
|
|
1160
1185
|
attachments: i.array(ve).nullable(),
|
|
1161
|
-
submissionDraft:
|
|
1162
|
-
}),
|
|
1186
|
+
submissionDraft: ji.nullable()
|
|
1187
|
+
}), $i = i.object({
|
|
1163
1188
|
_id: i.string(),
|
|
1164
1189
|
name: i.string(),
|
|
1165
1190
|
description: i.string().nullable(),
|
|
@@ -1171,19 +1196,19 @@ const Ui = ae`
|
|
|
1171
1196
|
gradingType: i.string(),
|
|
1172
1197
|
published: i.boolean().nullable().optional(),
|
|
1173
1198
|
submissionsConnection: i.object({
|
|
1174
|
-
nodes: i.array(
|
|
1199
|
+
nodes: i.array(Hi)
|
|
1175
1200
|
})
|
|
1176
|
-
}),
|
|
1177
|
-
legacyNode:
|
|
1201
|
+
}), Bi = i.object({
|
|
1202
|
+
legacyNode: $i,
|
|
1178
1203
|
course: i.object({
|
|
1179
1204
|
name: i.string()
|
|
1180
1205
|
})
|
|
1181
|
-
}),
|
|
1206
|
+
}), En = i.object({
|
|
1182
1207
|
startCursor: i.string(),
|
|
1183
1208
|
endCursor: i.string(),
|
|
1184
1209
|
hasPreviousPage: i.boolean(),
|
|
1185
1210
|
hasNextPage: i.boolean()
|
|
1186
|
-
}),
|
|
1211
|
+
}), In = i.object({
|
|
1187
1212
|
_id: i.string(),
|
|
1188
1213
|
attempt: i.number(),
|
|
1189
1214
|
author: i.object({
|
|
@@ -1204,17 +1229,17 @@ const Ui = ae`
|
|
|
1204
1229
|
id: i.string()
|
|
1205
1230
|
})
|
|
1206
1231
|
).nullable()
|
|
1207
|
-
}),
|
|
1232
|
+
}), Gi = i.object({
|
|
1208
1233
|
submissionComments: i.object({
|
|
1209
1234
|
commentsConnection: i.object({
|
|
1210
|
-
pageInfo:
|
|
1211
|
-
nodes: i.array(
|
|
1235
|
+
pageInfo: En,
|
|
1236
|
+
nodes: i.array(In)
|
|
1212
1237
|
})
|
|
1213
1238
|
})
|
|
1214
|
-
}),
|
|
1215
|
-
comments: i.array(
|
|
1216
|
-
pageInfo:
|
|
1217
|
-
}),
|
|
1239
|
+
}), Uo = i.object({
|
|
1240
|
+
comments: i.array(In),
|
|
1241
|
+
pageInfo: En
|
|
1242
|
+
}), Wi = i.object({
|
|
1218
1243
|
submittedAt: i.string(),
|
|
1219
1244
|
body: i.string().nullable(),
|
|
1220
1245
|
grade: i.string().nullable(),
|
|
@@ -1224,16 +1249,16 @@ const Ui = ae`
|
|
|
1224
1249
|
attempt: i.number(),
|
|
1225
1250
|
attachment: ve.nullable(),
|
|
1226
1251
|
attachments: i.array(ve).nullable()
|
|
1227
|
-
}),
|
|
1252
|
+
}), qi = i.object({
|
|
1228
1253
|
node: i.object({
|
|
1229
1254
|
submissionHistoriesConnection: i.object({
|
|
1230
|
-
nodes: i.array(
|
|
1255
|
+
nodes: i.array(Wi)
|
|
1231
1256
|
})
|
|
1232
1257
|
})
|
|
1233
1258
|
}), Le = i.object({
|
|
1234
1259
|
attribute: i.string(),
|
|
1235
1260
|
message: i.string()
|
|
1236
|
-
}),
|
|
1261
|
+
}), Yi = i.object({
|
|
1237
1262
|
createSubmissionComment: i.object({
|
|
1238
1263
|
submissionComment: i.object({
|
|
1239
1264
|
_id: i.string(),
|
|
@@ -1278,11 +1303,11 @@ const Ui = ae`
|
|
|
1278
1303
|
}).nullable(),
|
|
1279
1304
|
errors: i.array(Le).nullable()
|
|
1280
1305
|
})
|
|
1281
|
-
}),
|
|
1306
|
+
}), Vi = i.object({
|
|
1282
1307
|
markSubmissionCommentsRead: i.object({
|
|
1283
1308
|
errors: i.array(Le).nullable()
|
|
1284
1309
|
})
|
|
1285
|
-
}),
|
|
1310
|
+
}), zo = i.object({
|
|
1286
1311
|
createSubmission: i.object({
|
|
1287
1312
|
submission: i.object({
|
|
1288
1313
|
_id: i.string(),
|
|
@@ -1293,7 +1318,7 @@ const Ui = ae`
|
|
|
1293
1318
|
}).nullable(),
|
|
1294
1319
|
errors: i.array(Le).nullable()
|
|
1295
1320
|
})
|
|
1296
|
-
}),
|
|
1321
|
+
}), jo = i.object(
|
|
1297
1322
|
{
|
|
1298
1323
|
createSubmissionDraft: i.object({
|
|
1299
1324
|
submissionDraft: i.object({
|
|
@@ -1302,7 +1327,7 @@ const Ui = ae`
|
|
|
1302
1327
|
errors: i.array(Le).nullable()
|
|
1303
1328
|
})
|
|
1304
1329
|
}
|
|
1305
|
-
),
|
|
1330
|
+
), Ho = i.object(
|
|
1306
1331
|
{
|
|
1307
1332
|
deleteSubmissionDraft: i.object({
|
|
1308
1333
|
submissionDraftIds: i.array(i.string()).nullable(),
|
|
@@ -1310,7 +1335,7 @@ const Ui = ae`
|
|
|
1310
1335
|
})
|
|
1311
1336
|
}
|
|
1312
1337
|
);
|
|
1313
|
-
function
|
|
1338
|
+
function Xi({
|
|
1314
1339
|
courseId: e,
|
|
1315
1340
|
assignmentId: n,
|
|
1316
1341
|
userId: o,
|
|
@@ -1320,11 +1345,11 @@ function Ki({
|
|
|
1320
1345
|
return Ve({
|
|
1321
1346
|
queryKey: ["assignment-review", "assignment", e, n, o],
|
|
1322
1347
|
queryFn: async () => {
|
|
1323
|
-
const c = await a(
|
|
1348
|
+
const c = await a(Fi, {
|
|
1324
1349
|
courseId: e,
|
|
1325
1350
|
assignmentId: n,
|
|
1326
1351
|
userId: o
|
|
1327
|
-
}), d =
|
|
1352
|
+
}), d = Bi.parse(c);
|
|
1328
1353
|
return {
|
|
1329
1354
|
...d.legacyNode,
|
|
1330
1355
|
courseName: d.course.name
|
|
@@ -1333,7 +1358,7 @@ function Ki({
|
|
|
1333
1358
|
enabled: l
|
|
1334
1359
|
});
|
|
1335
1360
|
}
|
|
1336
|
-
function
|
|
1361
|
+
function Ki({
|
|
1337
1362
|
submissionId: e,
|
|
1338
1363
|
executeQuery: n,
|
|
1339
1364
|
enabled: o = !0
|
|
@@ -1341,27 +1366,27 @@ function Zi({
|
|
|
1341
1366
|
return Ve({
|
|
1342
1367
|
queryKey: ["assignment-review", "submissions", e],
|
|
1343
1368
|
queryFn: async () => {
|
|
1344
|
-
const a = await n(
|
|
1345
|
-
return
|
|
1369
|
+
const a = await n(zi, { submissionId: e });
|
|
1370
|
+
return qi.parse(a).node.submissionHistoriesConnection.nodes.slice().sort(
|
|
1346
1371
|
(c, d) => new Date(d.submittedAt).getTime() - new Date(c.submittedAt).getTime()
|
|
1347
1372
|
);
|
|
1348
1373
|
},
|
|
1349
1374
|
enabled: o
|
|
1350
1375
|
});
|
|
1351
1376
|
}
|
|
1352
|
-
function
|
|
1377
|
+
function Zi(e) {
|
|
1353
1378
|
if (!e) return "";
|
|
1354
1379
|
const n = new Date(e);
|
|
1355
1380
|
return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString();
|
|
1356
1381
|
}
|
|
1357
|
-
function
|
|
1382
|
+
function Qi({
|
|
1358
1383
|
submission: e,
|
|
1359
1384
|
isSelected: n,
|
|
1360
1385
|
isDraft: o = !1,
|
|
1361
1386
|
pointsPossible: a,
|
|
1362
1387
|
onClick: l
|
|
1363
1388
|
}) {
|
|
1364
|
-
const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }),
|
|
1389
|
+
const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }), f = e.score != null && a != null ? `${e.score}/${a}` : null;
|
|
1365
1390
|
return /* @__PURE__ */ r(
|
|
1366
1391
|
K,
|
|
1367
1392
|
{
|
|
@@ -1375,54 +1400,54 @@ function Ji({
|
|
|
1375
1400
|
onClick: l,
|
|
1376
1401
|
role: "button",
|
|
1377
1402
|
tabIndex: 0,
|
|
1378
|
-
onKeyDown: (
|
|
1379
|
-
(
|
|
1403
|
+
onKeyDown: (m) => {
|
|
1404
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), l());
|
|
1380
1405
|
},
|
|
1381
|
-
children: /* @__PURE__ */ S(
|
|
1382
|
-
/* @__PURE__ */ S(
|
|
1383
|
-
/* @__PURE__ */ S(
|
|
1406
|
+
children: /* @__PURE__ */ S(b, { justifyItems: "space-between", alignItems: "center", children: [
|
|
1407
|
+
/* @__PURE__ */ S(b, { direction: "column", gap: "xx-small", children: [
|
|
1408
|
+
/* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
|
|
1384
1409
|
/* @__PURE__ */ r(_, { weight: "bold", children: d }),
|
|
1385
1410
|
o && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
|
|
1386
1411
|
] }),
|
|
1387
|
-
!o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children:
|
|
1412
|
+
!o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Zi(e.submittedAt) })
|
|
1388
1413
|
] }),
|
|
1389
|
-
|
|
1414
|
+
f && /* @__PURE__ */ r(_, { weight: "bold", children: f })
|
|
1390
1415
|
] })
|
|
1391
1416
|
}
|
|
1392
1417
|
);
|
|
1393
1418
|
}
|
|
1394
|
-
function
|
|
1419
|
+
function Ji({
|
|
1395
1420
|
submissionId: e,
|
|
1396
1421
|
selectedAttempt: n,
|
|
1397
1422
|
onAttemptSelect: o,
|
|
1398
1423
|
pointsPossible: a,
|
|
1399
1424
|
executeQuery: l
|
|
1400
1425
|
}) {
|
|
1401
|
-
const c = q(), { data: d, isLoading:
|
|
1426
|
+
const c = q(), { data: d, isLoading: f, isError: m } = Ki({
|
|
1402
1427
|
submissionId: e,
|
|
1403
1428
|
executeQuery: l
|
|
1404
1429
|
});
|
|
1405
|
-
if (
|
|
1406
|
-
return /* @__PURE__ */ r(
|
|
1407
|
-
if (
|
|
1408
|
-
return /* @__PURE__ */ r(
|
|
1409
|
-
const
|
|
1410
|
-
return
|
|
1411
|
-
|
|
1430
|
+
if (f)
|
|
1431
|
+
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: c.navigationAttempts(), size: "small" }) });
|
|
1432
|
+
if (m)
|
|
1433
|
+
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: c.submissionLoadAttemptsError() }) });
|
|
1434
|
+
const p = (d == null ? void 0 : d.filter((h) => h.attempt > 0)) ?? [];
|
|
1435
|
+
return p.length === 0 ? /* @__PURE__ */ r(b, { padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", padding: "none none medium none", children: p.map((h) => /* @__PURE__ */ r(
|
|
1436
|
+
Qi,
|
|
1412
1437
|
{
|
|
1413
|
-
submission:
|
|
1414
|
-
isSelected: n ===
|
|
1438
|
+
submission: h,
|
|
1439
|
+
isSelected: n === h.attempt,
|
|
1415
1440
|
pointsPossible: a,
|
|
1416
|
-
onClick: () => o(
|
|
1441
|
+
onClick: () => o(h)
|
|
1417
1442
|
},
|
|
1418
|
-
|
|
1443
|
+
h.attempt
|
|
1419
1444
|
)) });
|
|
1420
1445
|
}
|
|
1421
|
-
function
|
|
1446
|
+
function wn({
|
|
1422
1447
|
attachments: e,
|
|
1423
1448
|
size: n = "medium"
|
|
1424
1449
|
}) {
|
|
1425
|
-
return e.length === 0 ? null : /* @__PURE__ */ r(
|
|
1450
|
+
return e.length === 0 ? null : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: e.map((o) => /* @__PURE__ */ r(
|
|
1426
1451
|
K,
|
|
1427
1452
|
{
|
|
1428
1453
|
as: "div",
|
|
@@ -1430,52 +1455,52 @@ function Cn({
|
|
|
1430
1455
|
borderColor: "primary",
|
|
1431
1456
|
borderWidth: "small",
|
|
1432
1457
|
borderRadius: "medium",
|
|
1433
|
-
children: /* @__PURE__ */ S(
|
|
1434
|
-
/* @__PURE__ */ r(
|
|
1435
|
-
/* @__PURE__ */ r(
|
|
1458
|
+
children: /* @__PURE__ */ S(b, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
|
|
1459
|
+
/* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(hn, { children: o.displayName }) }),
|
|
1460
|
+
/* @__PURE__ */ r(Zn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r(Hn, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${o.displayName}` }) })
|
|
1436
1461
|
] })
|
|
1437
1462
|
},
|
|
1438
1463
|
o.id
|
|
1439
1464
|
)) });
|
|
1440
1465
|
}
|
|
1441
|
-
function
|
|
1466
|
+
function eo(e) {
|
|
1442
1467
|
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1443
1468
|
}
|
|
1444
|
-
function
|
|
1469
|
+
function to({
|
|
1445
1470
|
submission: e,
|
|
1446
1471
|
isLastAttempt: n = !0,
|
|
1447
1472
|
showAttemptLabel: o = !0,
|
|
1448
1473
|
renderHTML: a
|
|
1449
1474
|
}) {
|
|
1450
|
-
const l = q(), c = a ??
|
|
1475
|
+
const l = q(), c = a ?? eo, d = (e == null ? void 0 : e.submissionType) === "online_text_entry", f = (e == null ? void 0 : e.submissionType) === "online_upload", m = d ? l.submissionTextHeading() : l.submissionUploadHeading(), p = qe(() => {
|
|
1451
1476
|
if (!e) return [];
|
|
1452
1477
|
const C = [];
|
|
1453
1478
|
if (e.attachment && C.push(e.attachment), e.attachments)
|
|
1454
1479
|
for (const I of e.attachments)
|
|
1455
1480
|
C.some((w) => w.id === I.id) || C.push(I);
|
|
1456
1481
|
return C;
|
|
1457
|
-
}, [e]),
|
|
1458
|
-
return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(
|
|
1482
|
+
}, [e]), h = qe(() => c((e == null ? void 0 : e.body) ?? ""), [e == null ? void 0 : e.body, c]);
|
|
1483
|
+
return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(b, { direction: "column", gap: "small", children: [
|
|
1459
1484
|
o && !n && e.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: e.attempt }) }),
|
|
1460
|
-
/* @__PURE__ */ S(
|
|
1461
|
-
/* @__PURE__ */ r(
|
|
1462
|
-
/* @__PURE__ */ r(St, { level: "h3", children:
|
|
1485
|
+
/* @__PURE__ */ S(b, { gap: "x-small", alignItems: "center", children: [
|
|
1486
|
+
/* @__PURE__ */ r($n, { color: "success" }),
|
|
1487
|
+
/* @__PURE__ */ r(St, { level: "h3", children: m })
|
|
1463
1488
|
] }),
|
|
1464
|
-
d && e.body && /* @__PURE__ */ S(
|
|
1489
|
+
d && e.body && /* @__PURE__ */ S(b, { alignItems: "stretch", gap: "small", children: [
|
|
1465
1490
|
/* @__PURE__ */ r(K, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
|
|
1466
|
-
/* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children:
|
|
1491
|
+
/* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children: h }) })
|
|
1467
1492
|
] }),
|
|
1468
|
-
|
|
1493
|
+
f && p.length > 0 && /* @__PURE__ */ r(wn, { attachments: p })
|
|
1469
1494
|
] }) }) : null;
|
|
1470
1495
|
}
|
|
1471
|
-
function
|
|
1496
|
+
function no(e) {
|
|
1472
1497
|
const n = new Date(e);
|
|
1473
1498
|
return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
1474
1499
|
}
|
|
1475
|
-
function
|
|
1500
|
+
function io() {
|
|
1476
1501
|
return /* @__PURE__ */ r(_, { color: "secondary", size: "small", children: "|" });
|
|
1477
1502
|
}
|
|
1478
|
-
function
|
|
1503
|
+
function oo({
|
|
1479
1504
|
score: e,
|
|
1480
1505
|
pointsPossible: n,
|
|
1481
1506
|
gradingType: o,
|
|
@@ -1483,33 +1508,33 @@ function ro({
|
|
|
1483
1508
|
allowedAttempts: l,
|
|
1484
1509
|
currentAttempt: c,
|
|
1485
1510
|
isOverdue: d,
|
|
1486
|
-
estimatedDuration:
|
|
1487
|
-
labels:
|
|
1511
|
+
estimatedDuration: f,
|
|
1512
|
+
labels: m
|
|
1488
1513
|
}) {
|
|
1489
|
-
const
|
|
1490
|
-
return
|
|
1491
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1492
|
-
), e != null && n != null ?
|
|
1493
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1494
|
-
) : n != null && o !== "not_graded" &&
|
|
1495
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1496
|
-
), l != null && (l === -1 ?
|
|
1497
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1498
|
-
) : c != null ?
|
|
1499
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1500
|
-
) :
|
|
1501
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1502
|
-
)), a &&
|
|
1503
|
-
/* @__PURE__ */ r(_, { size: "small", children: (
|
|
1504
|
-
), /* @__PURE__ */ S(
|
|
1505
|
-
|
|
1506
|
-
I > 0 && /* @__PURE__ */ r(
|
|
1514
|
+
const p = q(), h = [];
|
|
1515
|
+
return f && h.push(
|
|
1516
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.duration) ?? p.headerDuration({ minutes: f }) }, "duration")
|
|
1517
|
+
), e != null && n != null ? h.push(
|
|
1518
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.score) ?? p.headerScore({ score: e, total: n }) }, "score")
|
|
1519
|
+
) : n != null && o !== "not_graded" && h.push(
|
|
1520
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.pointsPossible) ?? p.headerPointsPossible({ points: n }) }, "points")
|
|
1521
|
+
), l != null && (l === -1 ? h.push(
|
|
1522
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsUnlimited() }, "attempts")
|
|
1523
|
+
) : c != null ? h.push(
|
|
1524
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptOf({ current: c, total: l }) }, "attempts")
|
|
1525
|
+
) : h.push(
|
|
1526
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.attempts) ?? p.headerAttemptsAllowed({ count: l }) }, "attempts")
|
|
1527
|
+
)), a && h.push(
|
|
1528
|
+
/* @__PURE__ */ r(_, { size: "small", children: (m == null ? void 0 : m.dueDate) ?? p.headerDueDate({ date: no(a) }) }, "due")
|
|
1529
|
+
), /* @__PURE__ */ S(b, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
|
|
1530
|
+
h.map((C, I) => /* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
|
|
1531
|
+
I > 0 && /* @__PURE__ */ r(io, {}),
|
|
1507
1532
|
C
|
|
1508
1533
|
] }, `item-${String(I)}`)),
|
|
1509
|
-
d && /* @__PURE__ */ r(_t, { color: "danger", children: (
|
|
1534
|
+
d && /* @__PURE__ */ r(_t, { color: "danger", children: (m == null ? void 0 : m.overdue) ?? p.headerOverdue() })
|
|
1510
1535
|
] });
|
|
1511
1536
|
}
|
|
1512
|
-
const
|
|
1537
|
+
const ro = ae`
|
|
1513
1538
|
mutation CreateSubmissionComment(
|
|
1514
1539
|
$id: ID!
|
|
1515
1540
|
$submissionAttempt: Int!
|
|
@@ -1599,7 +1624,7 @@ const so = ae`
|
|
|
1599
1624
|
mimeClass
|
|
1600
1625
|
url
|
|
1601
1626
|
}
|
|
1602
|
-
`,
|
|
1627
|
+
`, so = ae`
|
|
1603
1628
|
mutation MarkSubmissionCommentsRead(
|
|
1604
1629
|
$submissionId: ID!
|
|
1605
1630
|
$submissionCommentIds: [ID!]!
|
|
@@ -1616,7 +1641,7 @@ const so = ae`
|
|
|
1616
1641
|
}
|
|
1617
1642
|
}
|
|
1618
1643
|
}
|
|
1619
|
-
`,
|
|
1644
|
+
`, $o = ae`
|
|
1620
1645
|
mutation CreateSubmission(
|
|
1621
1646
|
$assignmentLid: ID!
|
|
1622
1647
|
$submissionType: OnlineSubmissionType!
|
|
@@ -1644,7 +1669,7 @@ const so = ae`
|
|
|
1644
1669
|
}
|
|
1645
1670
|
}
|
|
1646
1671
|
}
|
|
1647
|
-
`,
|
|
1672
|
+
`, Bo = ae`
|
|
1648
1673
|
mutation CreateSubmissionDraft(
|
|
1649
1674
|
$submissionId: ID!
|
|
1650
1675
|
$submissionType: DraftableSubmissionType!
|
|
@@ -1670,7 +1695,7 @@ const so = ae`
|
|
|
1670
1695
|
}
|
|
1671
1696
|
}
|
|
1672
1697
|
}
|
|
1673
|
-
`,
|
|
1698
|
+
`, Go = ae`
|
|
1674
1699
|
mutation DeleteSubmissionDraft($submissionId: ID!) {
|
|
1675
1700
|
deleteSubmissionDraft(input: { submissionId: $submissionId }) {
|
|
1676
1701
|
submissionDraftIds
|
|
@@ -1681,19 +1706,19 @@ const so = ae`
|
|
|
1681
1706
|
}
|
|
1682
1707
|
}
|
|
1683
1708
|
`;
|
|
1684
|
-
function
|
|
1709
|
+
function ao({
|
|
1685
1710
|
executeQuery: e
|
|
1686
1711
|
}) {
|
|
1687
|
-
const n =
|
|
1688
|
-
return
|
|
1712
|
+
const n = un();
|
|
1713
|
+
return dn({
|
|
1689
1714
|
mutationFn: async ({ submissionId: o, attempt: a, comment: l, fileIds: c }) => {
|
|
1690
|
-
const d = await e(
|
|
1715
|
+
const d = await e(ro, {
|
|
1691
1716
|
id: o,
|
|
1692
1717
|
submissionAttempt: a,
|
|
1693
1718
|
comment: l,
|
|
1694
1719
|
fileIds: c
|
|
1695
1720
|
});
|
|
1696
|
-
return
|
|
1721
|
+
return Yi.parse(d), d;
|
|
1697
1722
|
},
|
|
1698
1723
|
onSuccess: (o, a) => {
|
|
1699
1724
|
n.invalidateQueries({
|
|
@@ -1702,7 +1727,7 @@ function lo({
|
|
|
1702
1727
|
}
|
|
1703
1728
|
});
|
|
1704
1729
|
}
|
|
1705
|
-
function
|
|
1730
|
+
function lo({
|
|
1706
1731
|
submissionId: e,
|
|
1707
1732
|
courseId: n,
|
|
1708
1733
|
pageParams: o,
|
|
@@ -1721,35 +1746,35 @@ function co({
|
|
|
1721
1746
|
a
|
|
1722
1747
|
],
|
|
1723
1748
|
queryFn: async () => {
|
|
1724
|
-
const d = await l(
|
|
1749
|
+
const d = await l(Ui, {
|
|
1725
1750
|
submissionId: e,
|
|
1726
1751
|
courseId: n,
|
|
1727
1752
|
beforeCursor: a === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
|
|
1728
1753
|
afterCursor: a === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
|
|
1729
1754
|
first: a === "next" ? 5 : null,
|
|
1730
1755
|
last: a === "prev" || !a ? 5 : null
|
|
1731
|
-
}),
|
|
1756
|
+
}), f = Gi.parse(d);
|
|
1732
1757
|
return {
|
|
1733
|
-
comments: [...
|
|
1734
|
-
(
|
|
1758
|
+
comments: [...f.submissionComments.commentsConnection.nodes].sort(
|
|
1759
|
+
(p, h) => new Date(p.createdAt).getTime() - new Date(h.createdAt).getTime()
|
|
1735
1760
|
),
|
|
1736
|
-
pageInfo:
|
|
1761
|
+
pageInfo: f.submissionComments.commentsConnection.pageInfo
|
|
1737
1762
|
};
|
|
1738
1763
|
},
|
|
1739
1764
|
enabled: c ?? !!e
|
|
1740
1765
|
});
|
|
1741
1766
|
}
|
|
1742
|
-
function
|
|
1767
|
+
function co({
|
|
1743
1768
|
executeQuery: e
|
|
1744
1769
|
}) {
|
|
1745
|
-
const n =
|
|
1746
|
-
return
|
|
1770
|
+
const n = un();
|
|
1771
|
+
return dn({
|
|
1747
1772
|
mutationFn: async ({ submissionId: o, submissionCommentIds: a }) => {
|
|
1748
1773
|
const l = await e(
|
|
1749
|
-
|
|
1774
|
+
so,
|
|
1750
1775
|
{ submissionId: o, submissionCommentIds: a }
|
|
1751
1776
|
);
|
|
1752
|
-
return
|
|
1777
|
+
return Vi.parse(l), l;
|
|
1753
1778
|
},
|
|
1754
1779
|
onSuccess: (o, a) => {
|
|
1755
1780
|
n.invalidateQueries({
|
|
@@ -1759,20 +1784,20 @@ function mo({
|
|
|
1759
1784
|
}
|
|
1760
1785
|
});
|
|
1761
1786
|
}
|
|
1762
|
-
function
|
|
1787
|
+
function mo(e) {
|
|
1763
1788
|
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1764
1789
|
}
|
|
1765
|
-
function
|
|
1790
|
+
function uo(e) {
|
|
1766
1791
|
const n = new Date(e);
|
|
1767
1792
|
return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
|
|
1768
1793
|
}
|
|
1769
|
-
function
|
|
1794
|
+
function fo({
|
|
1770
1795
|
comment: e,
|
|
1771
1796
|
isFullWidth: n,
|
|
1772
1797
|
renderHTML: o
|
|
1773
1798
|
}) {
|
|
1774
|
-
var
|
|
1775
|
-
const a = q(), l = o ??
|
|
1799
|
+
var m;
|
|
1800
|
+
const a = q(), l = o ?? mo, c = ((m = e.author.courseRoles) == null ? void 0 : m.includes("StudentEnrollment")) ?? !1, d = qe(() => l(e.htmlComment), [e.htmlComment, l]);
|
|
1776
1801
|
return /* @__PURE__ */ r(
|
|
1777
1802
|
K,
|
|
1778
1803
|
{
|
|
@@ -1782,22 +1807,22 @@ function po({
|
|
|
1782
1807
|
borderColor: "primary",
|
|
1783
1808
|
borderRadius: "medium",
|
|
1784
1809
|
margin: n ? "none" : c ? "none none none medium" : "none medium none none",
|
|
1785
|
-
children: /* @__PURE__ */ S(
|
|
1786
|
-
/* @__PURE__ */ S(
|
|
1787
|
-
/* @__PURE__ */ S(
|
|
1788
|
-
/* @__PURE__ */ r(
|
|
1789
|
-
!e.read && /* @__PURE__ */ r(
|
|
1810
|
+
children: /* @__PURE__ */ S(b, { as: "div", direction: "column", gap: "small", children: [
|
|
1811
|
+
/* @__PURE__ */ S(b, { as: "div", direction: "column", gap: "xx-small", children: [
|
|
1812
|
+
/* @__PURE__ */ S(b, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
|
|
1813
|
+
/* @__PURE__ */ r(b.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(hn, { children: e.author.shortName }) }) }),
|
|
1814
|
+
!e.read && /* @__PURE__ */ r(Tn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: a.commentsUnreadSingle() }) })
|
|
1790
1815
|
] }),
|
|
1791
|
-
/* @__PURE__ */ r(_, { size: "small", color: "secondary", children:
|
|
1816
|
+
/* @__PURE__ */ r(_, { size: "small", color: "secondary", children: uo(e.createdAt) }),
|
|
1792
1817
|
e.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: a.commentsAttempt({ number: e.attempt }) })
|
|
1793
1818
|
] }),
|
|
1794
1819
|
/* @__PURE__ */ r(_, { size: "medium", children: d }),
|
|
1795
1820
|
e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r(
|
|
1796
|
-
|
|
1821
|
+
wn,
|
|
1797
1822
|
{
|
|
1798
|
-
attachments: e.attachments.map((
|
|
1799
|
-
...
|
|
1800
|
-
_id:
|
|
1823
|
+
attachments: e.attachments.map((p) => ({
|
|
1824
|
+
...p,
|
|
1825
|
+
_id: p._id ?? p.id,
|
|
1801
1826
|
submissionPreviewUrl: null
|
|
1802
1827
|
})),
|
|
1803
1828
|
size: "small"
|
|
@@ -1807,7 +1832,7 @@ function po({
|
|
|
1807
1832
|
}
|
|
1808
1833
|
);
|
|
1809
1834
|
}
|
|
1810
|
-
function
|
|
1835
|
+
function po({
|
|
1811
1836
|
submissionId: e,
|
|
1812
1837
|
courseId: n,
|
|
1813
1838
|
assignmentId: o,
|
|
@@ -1815,15 +1840,15 @@ function go({
|
|
|
1815
1840
|
canPostComment: l,
|
|
1816
1841
|
onCommentPosted: c,
|
|
1817
1842
|
renderHTML: d,
|
|
1818
|
-
executeQuery:
|
|
1843
|
+
executeQuery: f
|
|
1819
1844
|
}) {
|
|
1820
|
-
const
|
|
1845
|
+
const m = q(), [p, h] = Ee(""), [C, I] = Ee({}), w = zn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = lo({
|
|
1821
1846
|
submissionId: e,
|
|
1822
1847
|
courseId: n,
|
|
1823
1848
|
pageParams: C.pageParams,
|
|
1824
1849
|
direction: C.direction,
|
|
1825
|
-
executeQuery:
|
|
1826
|
-
}), le =
|
|
1850
|
+
executeQuery: f
|
|
1851
|
+
}), le = ao({ executeQuery: f }), M = co({ executeQuery: f });
|
|
1827
1852
|
Tt(() => {
|
|
1828
1853
|
if (!(y != null && y.comments) || y.comments.length === 0) return;
|
|
1829
1854
|
const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
|
|
@@ -1842,19 +1867,19 @@ function go({
|
|
|
1842
1867
|
return !((N = E.author.courseRoles) != null && N.includes("StudentEnrollment"));
|
|
1843
1868
|
}
|
|
1844
1869
|
), O = () => {
|
|
1845
|
-
|
|
1846
|
-
{ submissionId: e, attempt: a, comment:
|
|
1870
|
+
p.trim() && le.mutate(
|
|
1871
|
+
{ submissionId: e, attempt: a, comment: p },
|
|
1847
1872
|
{
|
|
1848
1873
|
onSuccess: () => {
|
|
1849
|
-
|
|
1874
|
+
h(""), c == null || c();
|
|
1850
1875
|
}
|
|
1851
1876
|
}
|
|
1852
1877
|
);
|
|
1853
1878
|
}, ce = (y == null ? void 0 : y.pageInfo.hasNextPage) || (y == null ? void 0 : y.pageInfo.hasPreviousPage);
|
|
1854
|
-
return V || !y && !fe ? /* @__PURE__ */ r(
|
|
1855
|
-
/* @__PURE__ */ S(
|
|
1856
|
-
y.comments.length === 0 ? /* @__PURE__ */ r(
|
|
1857
|
-
|
|
1879
|
+
return V || !y && !fe ? /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: m.commentsPanelTitle(), size: "small" }) }) : fe ? /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: m.commentsLoadError() }) }) : /* @__PURE__ */ S(b, { as: "div", direction: "column", justifyItems: "space-between", height: "100%", children: [
|
|
1880
|
+
/* @__PURE__ */ S(b, { as: "div", direction: "column", children: [
|
|
1881
|
+
y.comments.length === 0 ? /* @__PURE__ */ r(b, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: m.commentsEmpty() }) }) : /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: y.comments.map((E) => /* @__PURE__ */ r(
|
|
1882
|
+
fo,
|
|
1858
1883
|
{
|
|
1859
1884
|
comment: E,
|
|
1860
1885
|
isFullWidth: !ne,
|
|
@@ -1862,37 +1887,37 @@ function go({
|
|
|
1862
1887
|
},
|
|
1863
1888
|
E._id
|
|
1864
1889
|
)) }),
|
|
1865
|
-
ce && /* @__PURE__ */ S(
|
|
1890
|
+
ce && /* @__PURE__ */ S(b, { justifyItems: "space-between", padding: "small none", children: [
|
|
1866
1891
|
/* @__PURE__ */ r(
|
|
1867
1892
|
$,
|
|
1868
1893
|
{
|
|
1869
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
1894
|
+
renderIcon: () => /* @__PURE__ */ r(Bn, {}),
|
|
1870
1895
|
size: "small",
|
|
1871
1896
|
interaction: y.pageInfo.hasPreviousPage ? "enabled" : "disabled",
|
|
1872
1897
|
onClick: () => I({ pageParams: y.pageInfo, direction: "prev" }),
|
|
1873
|
-
children:
|
|
1898
|
+
children: m.commentsPreviousComments()
|
|
1874
1899
|
}
|
|
1875
1900
|
),
|
|
1876
1901
|
/* @__PURE__ */ r(
|
|
1877
1902
|
$,
|
|
1878
1903
|
{
|
|
1879
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
1904
|
+
renderIcon: () => /* @__PURE__ */ r(Gn, {}),
|
|
1880
1905
|
size: "small",
|
|
1881
1906
|
interaction: y.pageInfo.hasNextPage ? "enabled" : "disabled",
|
|
1882
1907
|
onClick: () => I({ pageParams: y.pageInfo, direction: "next" }),
|
|
1883
|
-
children:
|
|
1908
|
+
children: m.commentsNextComments()
|
|
1884
1909
|
}
|
|
1885
1910
|
)
|
|
1886
1911
|
] })
|
|
1887
1912
|
] }),
|
|
1888
|
-
l && /* @__PURE__ */ S(
|
|
1913
|
+
l && /* @__PURE__ */ S(b, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
|
|
1889
1914
|
/* @__PURE__ */ r(
|
|
1890
|
-
|
|
1915
|
+
bn,
|
|
1891
1916
|
{
|
|
1892
1917
|
resize: "vertical",
|
|
1893
|
-
label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children:
|
|
1894
|
-
value:
|
|
1895
|
-
onChange: (E) =>
|
|
1918
|
+
label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: m.commentsPlaceholder() }),
|
|
1919
|
+
value: p,
|
|
1920
|
+
onChange: (E) => h(E.target.value)
|
|
1896
1921
|
}
|
|
1897
1922
|
),
|
|
1898
1923
|
/* @__PURE__ */ r(
|
|
@@ -1900,17 +1925,17 @@ function go({
|
|
|
1900
1925
|
{
|
|
1901
1926
|
color: "primary",
|
|
1902
1927
|
onClick: O,
|
|
1903
|
-
interaction:
|
|
1904
|
-
children:
|
|
1928
|
+
interaction: p.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
|
|
1929
|
+
children: m.commentsPost()
|
|
1905
1930
|
}
|
|
1906
1931
|
)
|
|
1907
1932
|
] })
|
|
1908
1933
|
] });
|
|
1909
1934
|
}
|
|
1910
|
-
function
|
|
1935
|
+
function go(e) {
|
|
1911
1936
|
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1912
1937
|
}
|
|
1913
|
-
function
|
|
1938
|
+
function Wo({
|
|
1914
1939
|
courseId: e,
|
|
1915
1940
|
assignmentId: n,
|
|
1916
1941
|
userId: o,
|
|
@@ -1918,19 +1943,19 @@ function qo({
|
|
|
1918
1943
|
onError: l,
|
|
1919
1944
|
renderHTML: c,
|
|
1920
1945
|
renderPanels: d,
|
|
1921
|
-
executeQuery:
|
|
1946
|
+
executeQuery: f
|
|
1922
1947
|
}) {
|
|
1923
|
-
const
|
|
1924
|
-
data:
|
|
1948
|
+
const m = q(), p = c ?? go, {
|
|
1949
|
+
data: h,
|
|
1925
1950
|
isLoading: C,
|
|
1926
1951
|
isError: I,
|
|
1927
1952
|
error: w
|
|
1928
|
-
} =
|
|
1953
|
+
} = Xi({ courseId: e, assignmentId: n, userId: o, executeQuery: f }), [y, V] = Ee(null), [fe, le] = Ee(
|
|
1929
1954
|
a ? "comments" : null
|
|
1930
1955
|
), M = qe(
|
|
1931
|
-
() => (
|
|
1932
|
-
[
|
|
1933
|
-
), ne = M != null && M.attempt > 0, O = y ?? M, ce = y == null || y.attempt === (M == null ? void 0 : M.attempt), E = ne && ce, N = ((
|
|
1956
|
+
() => (h == null ? void 0 : h.submissionsConnection.nodes[0]) ?? null,
|
|
1957
|
+
[h]
|
|
1958
|
+
), ne = M != null && M.attempt > 0, O = y ?? M, ce = y == null || y.attempt === (M == null ? void 0 : M.attempt), E = ne && ce, N = ((h == null ? void 0 : h.allowedAttempts) ?? 0) !== 1, J = jn((Ze) => {
|
|
1934
1959
|
V(Ze);
|
|
1935
1960
|
}, []);
|
|
1936
1961
|
if (Tt(() => {
|
|
@@ -1938,28 +1963,28 @@ function qo({
|
|
|
1938
1963
|
}, [I, w, l]), Tt(() => {
|
|
1939
1964
|
a && ne && le("comments");
|
|
1940
1965
|
}, [a, ne]), C)
|
|
1941
|
-
return /* @__PURE__ */ r(
|
|
1942
|
-
if (I || !
|
|
1943
|
-
return /* @__PURE__ */ r(
|
|
1944
|
-
const Ie = !!
|
|
1945
|
-
|
|
1966
|
+
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: m.progressLoading() }) });
|
|
1967
|
+
if (I || !h)
|
|
1968
|
+
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: m.assignmentLoadError() }) });
|
|
1969
|
+
const Ie = !!h.dueAt && new Date(h.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = M ? /* @__PURE__ */ r(
|
|
1970
|
+
po,
|
|
1946
1971
|
{
|
|
1947
1972
|
submissionId: M.id,
|
|
1948
1973
|
courseId: e,
|
|
1949
1974
|
assignmentId: n,
|
|
1950
1975
|
attempt: (O == null ? void 0 : O.attempt) ?? 0,
|
|
1951
1976
|
canPostComment: E,
|
|
1952
|
-
renderHTML:
|
|
1953
|
-
executeQuery:
|
|
1977
|
+
renderHTML: p,
|
|
1978
|
+
executeQuery: f
|
|
1954
1979
|
}
|
|
1955
1980
|
) : null, Xe = N && M ? /* @__PURE__ */ r(
|
|
1956
|
-
|
|
1981
|
+
Ji,
|
|
1957
1982
|
{
|
|
1958
1983
|
submissionId: M.id,
|
|
1959
1984
|
selectedAttempt: O == null ? void 0 : O.attempt,
|
|
1960
1985
|
onAttemptSelect: J,
|
|
1961
|
-
pointsPossible:
|
|
1962
|
-
executeQuery:
|
|
1986
|
+
pointsPossible: h.pointsPossible,
|
|
1987
|
+
executeQuery: f
|
|
1963
1988
|
}
|
|
1964
1989
|
) : null, Ke = {
|
|
1965
1990
|
commentsPanel: xe,
|
|
@@ -1969,35 +1994,35 @@ function qo({
|
|
|
1969
1994
|
unreadCommentCount: (M == null ? void 0 : M.unreadCommentCount) ?? 0,
|
|
1970
1995
|
hasMultipleAttempts: N
|
|
1971
1996
|
};
|
|
1972
|
-
return /* @__PURE__ */ S(
|
|
1997
|
+
return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
|
|
1973
1998
|
/* @__PURE__ */ r(
|
|
1974
|
-
|
|
1999
|
+
oo,
|
|
1975
2000
|
{
|
|
1976
2001
|
score: O == null ? void 0 : O.score,
|
|
1977
|
-
pointsPossible:
|
|
1978
|
-
gradingType:
|
|
1979
|
-
dueAt:
|
|
1980
|
-
allowedAttempts:
|
|
2002
|
+
pointsPossible: h.pointsPossible,
|
|
2003
|
+
gradingType: h.gradingType,
|
|
2004
|
+
dueAt: h.dueAt,
|
|
2005
|
+
allowedAttempts: h.allowedAttempts,
|
|
1981
2006
|
currentAttempt: O == null ? void 0 : O.attempt,
|
|
1982
2007
|
isOverdue: Ie
|
|
1983
2008
|
}
|
|
1984
2009
|
),
|
|
1985
|
-
|
|
1986
|
-
/* @__PURE__ */ r(St, { level: "h3", children:
|
|
1987
|
-
/* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children:
|
|
2010
|
+
h.description && /* @__PURE__ */ S(K, { as: "div", children: [
|
|
2011
|
+
/* @__PURE__ */ r(St, { level: "h3", children: m.assignmentInstructions() }),
|
|
2012
|
+
/* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: p(h.description) })
|
|
1988
2013
|
] }),
|
|
1989
2014
|
/* @__PURE__ */ r(
|
|
1990
|
-
|
|
2015
|
+
to,
|
|
1991
2016
|
{
|
|
1992
2017
|
submission: O,
|
|
1993
2018
|
isLastAttempt: ce,
|
|
1994
|
-
renderHTML:
|
|
2019
|
+
renderHTML: p
|
|
1995
2020
|
}
|
|
1996
2021
|
),
|
|
1997
2022
|
d ? d(Ke) : null
|
|
1998
2023
|
] });
|
|
1999
2024
|
}
|
|
2000
|
-
function
|
|
2025
|
+
function qo({
|
|
2001
2026
|
existingFiles: e,
|
|
2002
2027
|
onSubmit: n,
|
|
2003
2028
|
onSaveDraft: o,
|
|
@@ -2005,14 +2030,14 @@ function Yo({
|
|
|
2005
2030
|
onSelectFiles: l,
|
|
2006
2031
|
isSubmitting: c = !1
|
|
2007
2032
|
}) {
|
|
2008
|
-
const d = q(), [
|
|
2033
|
+
const d = q(), [f, m] = Ee(e ?? []), p = async () => {
|
|
2009
2034
|
const w = await l();
|
|
2010
|
-
|
|
2011
|
-
},
|
|
2012
|
-
|
|
2013
|
-
}, C =
|
|
2014
|
-
return /* @__PURE__ */ S(
|
|
2015
|
-
|
|
2035
|
+
m((y) => [...y, ...w]);
|
|
2036
|
+
}, h = (w) => {
|
|
2037
|
+
m((y) => y.filter((V) => V.id !== w));
|
|
2038
|
+
}, C = f.map((w) => w.id), I = f.length > 0 && !c;
|
|
2039
|
+
return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
|
|
2040
|
+
f.length > 0 && /* @__PURE__ */ r(b, { direction: "column", gap: "x-small", children: f.map((w) => /* @__PURE__ */ r(
|
|
2016
2041
|
K,
|
|
2017
2042
|
{
|
|
2018
2043
|
as: "div",
|
|
@@ -2020,14 +2045,14 @@ function Yo({
|
|
|
2020
2045
|
borderWidth: "small",
|
|
2021
2046
|
borderColor: "primary",
|
|
2022
2047
|
borderRadius: "medium",
|
|
2023
|
-
children: /* @__PURE__ */ S(
|
|
2048
|
+
children: /* @__PURE__ */ S(b, { justifyItems: "space-between", alignItems: "center", children: [
|
|
2024
2049
|
/* @__PURE__ */ r(_, { children: w.name }),
|
|
2025
2050
|
/* @__PURE__ */ r(
|
|
2026
2051
|
$,
|
|
2027
2052
|
{
|
|
2028
2053
|
size: "small",
|
|
2029
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
2030
|
-
onClick: () =>
|
|
2054
|
+
renderIcon: () => /* @__PURE__ */ r(Wn, {}),
|
|
2055
|
+
onClick: () => h(w.id),
|
|
2031
2056
|
children: /* @__PURE__ */ S("span", { className: "screenreader-only", children: [
|
|
2032
2057
|
"Remove ",
|
|
2033
2058
|
w.name
|
|
@@ -2038,8 +2063,8 @@ function Yo({
|
|
|
2038
2063
|
},
|
|
2039
2064
|
w.id
|
|
2040
2065
|
)) }),
|
|
2041
|
-
/* @__PURE__ */ r($, { onClick:
|
|
2042
|
-
/* @__PURE__ */ S(
|
|
2066
|
+
/* @__PURE__ */ r($, { onClick: p, children: d.submissionFormAddFiles() }),
|
|
2067
|
+
/* @__PURE__ */ S(b, { gap: "small", children: [
|
|
2043
2068
|
/* @__PURE__ */ r(
|
|
2044
2069
|
$,
|
|
2045
2070
|
{
|
|
@@ -2053,7 +2078,7 @@ function Yo({
|
|
|
2053
2078
|
$,
|
|
2054
2079
|
{
|
|
2055
2080
|
onClick: () => o(C),
|
|
2056
|
-
interaction:
|
|
2081
|
+
interaction: f.length > 0 ? "enabled" : "disabled",
|
|
2057
2082
|
children: d.submissionFormSaveDraft()
|
|
2058
2083
|
}
|
|
2059
2084
|
),
|
|
@@ -2061,7 +2086,7 @@ function Yo({
|
|
|
2061
2086
|
] })
|
|
2062
2087
|
] });
|
|
2063
2088
|
}
|
|
2064
|
-
function
|
|
2089
|
+
function Yo({
|
|
2065
2090
|
prevItem: e,
|
|
2066
2091
|
nextItem: n,
|
|
2067
2092
|
onNavigatePrev: o,
|
|
@@ -2071,12 +2096,12 @@ function Vo({
|
|
|
2071
2096
|
const c = q();
|
|
2072
2097
|
if (!e && !n)
|
|
2073
2098
|
return null;
|
|
2074
|
-
const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(),
|
|
2075
|
-
return /* @__PURE__ */ S(
|
|
2099
|
+
const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), f = (l == null ? void 0 : l.next) ?? c.navigationNext();
|
|
2100
|
+
return /* @__PURE__ */ S(b, { justifyItems: "space-between", padding: "small none", children: [
|
|
2076
2101
|
e ? /* @__PURE__ */ r(
|
|
2077
2102
|
$,
|
|
2078
2103
|
{
|
|
2079
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
2104
|
+
renderIcon: () => /* @__PURE__ */ r(fn, {}),
|
|
2080
2105
|
onClick: o,
|
|
2081
2106
|
"aria-label": `${d}: ${e.title}`,
|
|
2082
2107
|
children: d
|
|
@@ -2085,39 +2110,39 @@ function Vo({
|
|
|
2085
2110
|
n ? /* @__PURE__ */ r(
|
|
2086
2111
|
$,
|
|
2087
2112
|
{
|
|
2088
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
2113
|
+
renderIcon: () => /* @__PURE__ */ r(pn, {}),
|
|
2089
2114
|
onClick: a,
|
|
2090
|
-
"aria-label": `${
|
|
2091
|
-
children:
|
|
2115
|
+
"aria-label": `${f}: ${n.title}`,
|
|
2116
|
+
children: f
|
|
2092
2117
|
}
|
|
2093
2118
|
) : /* @__PURE__ */ r("div", {})
|
|
2094
2119
|
] });
|
|
2095
2120
|
}
|
|
2096
|
-
function
|
|
2121
|
+
function ho(e) {
|
|
2097
2122
|
switch (e) {
|
|
2098
2123
|
case "Assignment":
|
|
2099
|
-
return /* @__PURE__ */ r(Zn, {});
|
|
2100
|
-
case "Quiz":
|
|
2101
2124
|
return /* @__PURE__ */ r(Kn, {});
|
|
2102
|
-
case "
|
|
2125
|
+
case "Quiz":
|
|
2103
2126
|
return /* @__PURE__ */ r(Xn, {});
|
|
2127
|
+
case "Discussion":
|
|
2128
|
+
return /* @__PURE__ */ r(Vn, {});
|
|
2104
2129
|
case "Page":
|
|
2105
2130
|
return /* @__PURE__ */ r(Kt, {});
|
|
2106
2131
|
case "ExternalUrl":
|
|
2107
2132
|
case "ExternalTool":
|
|
2108
|
-
return /* @__PURE__ */ r(
|
|
2133
|
+
return /* @__PURE__ */ r(Yn, {});
|
|
2109
2134
|
default:
|
|
2110
2135
|
return /* @__PURE__ */ r(Kt, {});
|
|
2111
2136
|
}
|
|
2112
2137
|
}
|
|
2113
|
-
function
|
|
2138
|
+
function bo({
|
|
2114
2139
|
item: e,
|
|
2115
2140
|
isSelected: n,
|
|
2116
2141
|
isLoadingItem: o,
|
|
2117
2142
|
onClick: a
|
|
2118
2143
|
}) {
|
|
2119
|
-
var
|
|
2120
|
-
const l = q(), c = ((
|
|
2144
|
+
var m, p, h, C, I;
|
|
2145
|
+
const l = q(), c = ((m = e.content_details) == null ? void 0 : m.locked_for_user) ?? !1, d = (p = e.content_details) == null ? void 0 : p.lock_explanation, f = /* @__PURE__ */ r(
|
|
2121
2146
|
K,
|
|
2122
2147
|
{
|
|
2123
2148
|
as: "div",
|
|
@@ -2131,11 +2156,11 @@ function To({
|
|
|
2131
2156
|
onKeyDown: c ? void 0 : (w) => {
|
|
2132
2157
|
(w.key === "Enter" || w.key === " ") && (w.preventDefault(), a());
|
|
2133
2158
|
},
|
|
2134
|
-
children: /* @__PURE__ */ S(
|
|
2135
|
-
/* @__PURE__ */ r(
|
|
2136
|
-
/* @__PURE__ */ r(
|
|
2159
|
+
children: /* @__PURE__ */ S(b, { gap: "small", alignItems: "center", children: [
|
|
2160
|
+
/* @__PURE__ */ r(b.Item, { children: c ? /* @__PURE__ */ r(gn, {}) : ho(e.type) }),
|
|
2161
|
+
/* @__PURE__ */ r(b.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ S(b, { direction: "column", gap: "xx-small", children: [
|
|
2137
2162
|
/* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: e.title }),
|
|
2138
|
-
((
|
|
2163
|
+
((h = e.content_details) == null ? void 0 : h.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
|
|
2139
2164
|
date: new Date(e.content_details.due_at).toLocaleDateString()
|
|
2140
2165
|
}) }),
|
|
2141
2166
|
((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 }) })
|
|
@@ -2145,9 +2170,9 @@ function To({
|
|
|
2145
2170
|
] })
|
|
2146
2171
|
}
|
|
2147
2172
|
);
|
|
2148
|
-
return c && d ? /* @__PURE__ */ r(
|
|
2173
|
+
return c && d ? /* @__PURE__ */ r(Jn, { renderTip: d, placement: "end", children: f }) : f;
|
|
2149
2174
|
}
|
|
2150
|
-
function
|
|
2175
|
+
function Vo({
|
|
2151
2176
|
module: e,
|
|
2152
2177
|
currentItemId: n,
|
|
2153
2178
|
onItemClick: o,
|
|
@@ -2155,86 +2180,86 @@ function Xo({
|
|
|
2155
2180
|
onNavigateModule: l,
|
|
2156
2181
|
hasPrevModule: c = !1,
|
|
2157
2182
|
hasNextModule: d = !1,
|
|
2158
|
-
isLoading:
|
|
2159
|
-
title:
|
|
2183
|
+
isLoading: f = !1,
|
|
2184
|
+
title: m
|
|
2160
2185
|
}) {
|
|
2161
2186
|
var C;
|
|
2162
|
-
const
|
|
2163
|
-
return /* @__PURE__ */ S(
|
|
2164
|
-
/* @__PURE__ */ S(
|
|
2165
|
-
/* @__PURE__ */ r(St, { level: "h3", children:
|
|
2166
|
-
/* @__PURE__ */ r(
|
|
2187
|
+
const p = q(), h = m ?? p.navigationMyProgress();
|
|
2188
|
+
return /* @__PURE__ */ S(b, { direction: "column", height: "100%", children: [
|
|
2189
|
+
/* @__PURE__ */ S(b, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
|
|
2190
|
+
/* @__PURE__ */ r(St, { level: "h3", children: h }),
|
|
2191
|
+
/* @__PURE__ */ r(Qn, { screenReaderLabel: p.navigationClosePanel(), onClick: a, size: "small", children: /* @__PURE__ */ r(qn, {}) })
|
|
2167
2192
|
] }),
|
|
2168
2193
|
/* @__PURE__ */ S(K, { as: "div", padding: "none small", overflowY: "auto", children: [
|
|
2169
|
-
e.state === "locked" && /* @__PURE__ */ r(
|
|
2170
|
-
/* @__PURE__ */ r(
|
|
2194
|
+
e.state === "locked" && /* @__PURE__ */ r(b, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
|
|
2195
|
+
/* @__PURE__ */ r(gn, {}),
|
|
2171
2196
|
" ",
|
|
2172
|
-
|
|
2197
|
+
p.progressLocked()
|
|
2173
2198
|
] }) }),
|
|
2174
2199
|
/* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: e.name }),
|
|
2175
|
-
/* @__PURE__ */ r(
|
|
2176
|
-
|
|
2200
|
+
/* @__PURE__ */ r(b, { direction: "column", gap: "xx-small", padding: "small none", children: (C = e.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
|
|
2201
|
+
bo,
|
|
2177
2202
|
{
|
|
2178
2203
|
item: I,
|
|
2179
2204
|
isSelected: I.id === n,
|
|
2180
|
-
isLoadingItem:
|
|
2205
|
+
isLoadingItem: f && I.id === n,
|
|
2181
2206
|
onClick: () => o(I)
|
|
2182
2207
|
},
|
|
2183
2208
|
I.id
|
|
2184
2209
|
)) })
|
|
2185
2210
|
] }),
|
|
2186
|
-
l && /* @__PURE__ */ S(
|
|
2211
|
+
l && /* @__PURE__ */ S(b, { justifyItems: "space-between", padding: "small", children: [
|
|
2187
2212
|
/* @__PURE__ */ r(
|
|
2188
2213
|
$,
|
|
2189
2214
|
{
|
|
2190
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
2215
|
+
renderIcon: () => /* @__PURE__ */ r(fn, {}),
|
|
2191
2216
|
size: "small",
|
|
2192
2217
|
interaction: c ? "enabled" : "disabled",
|
|
2193
2218
|
onClick: () => l("prev"),
|
|
2194
|
-
"aria-label":
|
|
2195
|
-
children:
|
|
2219
|
+
"aria-label": p.navigationPreviousModule(),
|
|
2220
|
+
children: p.navigationPrevious()
|
|
2196
2221
|
}
|
|
2197
2222
|
),
|
|
2198
2223
|
/* @__PURE__ */ r(
|
|
2199
2224
|
$,
|
|
2200
2225
|
{
|
|
2201
|
-
renderIcon: () => /* @__PURE__ */ r(
|
|
2226
|
+
renderIcon: () => /* @__PURE__ */ r(pn, {}),
|
|
2202
2227
|
size: "small",
|
|
2203
2228
|
interaction: d ? "enabled" : "disabled",
|
|
2204
2229
|
onClick: () => l("next"),
|
|
2205
|
-
"aria-label":
|
|
2206
|
-
children:
|
|
2230
|
+
"aria-label": p.navigationNextModule(),
|
|
2231
|
+
children: p.navigationNext()
|
|
2207
2232
|
}
|
|
2208
2233
|
)
|
|
2209
2234
|
] })
|
|
2210
2235
|
] });
|
|
2211
2236
|
}
|
|
2212
|
-
function
|
|
2237
|
+
function Xo({
|
|
2213
2238
|
existingDraft: e,
|
|
2214
2239
|
onSubmit: n,
|
|
2215
2240
|
onSaveDraft: o,
|
|
2216
2241
|
onDiscardDraft: a,
|
|
2217
2242
|
isSubmitting: l = !1
|
|
2218
2243
|
}) {
|
|
2219
|
-
const c = q(), [d,
|
|
2220
|
-
return /* @__PURE__ */ S(
|
|
2244
|
+
const c = q(), [d, f] = Ee(e ?? ""), m = d.trim().length > 0 && !l;
|
|
2245
|
+
return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
|
|
2221
2246
|
/* @__PURE__ */ r(
|
|
2222
|
-
|
|
2247
|
+
bn,
|
|
2223
2248
|
{
|
|
2224
2249
|
label: c.submissionTextHeading(),
|
|
2225
2250
|
value: d,
|
|
2226
|
-
onChange: (
|
|
2251
|
+
onChange: (p) => f(p.target.value),
|
|
2227
2252
|
resize: "vertical",
|
|
2228
2253
|
height: "200px"
|
|
2229
2254
|
}
|
|
2230
2255
|
),
|
|
2231
|
-
/* @__PURE__ */ S(
|
|
2256
|
+
/* @__PURE__ */ S(b, { gap: "small", children: [
|
|
2232
2257
|
/* @__PURE__ */ r(
|
|
2233
2258
|
$,
|
|
2234
2259
|
{
|
|
2235
2260
|
color: "primary",
|
|
2236
2261
|
onClick: () => n(d),
|
|
2237
|
-
interaction:
|
|
2262
|
+
interaction: m ? "enabled" : "disabled",
|
|
2238
2263
|
children: c.submissionFormSubmit()
|
|
2239
2264
|
}
|
|
2240
2265
|
),
|
|
@@ -2250,16 +2275,16 @@ function Ko({
|
|
|
2250
2275
|
] })
|
|
2251
2276
|
] });
|
|
2252
2277
|
}
|
|
2253
|
-
function
|
|
2278
|
+
function Ko({
|
|
2254
2279
|
unreadCount: e
|
|
2255
2280
|
}) {
|
|
2256
2281
|
const n = q();
|
|
2257
2282
|
if (e === 0)
|
|
2258
2283
|
return null;
|
|
2259
2284
|
const o = e === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: e });
|
|
2260
|
-
return /* @__PURE__ */ r(
|
|
2285
|
+
return /* @__PURE__ */ r(Tn, { count: e, standalone: !0, children: /* @__PURE__ */ r(Et, { children: o }) });
|
|
2261
2286
|
}
|
|
2262
|
-
function
|
|
2287
|
+
function Zo({
|
|
2263
2288
|
courseId: e,
|
|
2264
2289
|
moduleItemId: n,
|
|
2265
2290
|
fetchSequence: o,
|
|
@@ -2272,42 +2297,42 @@ function Qo({
|
|
|
2272
2297
|
});
|
|
2273
2298
|
}
|
|
2274
2299
|
export {
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2300
|
+
Bi as AssignmentResponseSchema,
|
|
2301
|
+
Wo as AssignmentReview,
|
|
2302
|
+
Qi as AttemptCard,
|
|
2303
|
+
to as AttemptView,
|
|
2304
|
+
Ji as AttemptsHistory,
|
|
2305
|
+
$o as CREATE_SUBMISSION,
|
|
2306
|
+
ro as CREATE_SUBMISSION_COMMENT,
|
|
2307
|
+
Bo as CREATE_SUBMISSION_DRAFT,
|
|
2308
|
+
fo as CommentCard,
|
|
2309
|
+
Yi as CreateSubmissionCommentResponseSchema,
|
|
2310
|
+
jo as CreateSubmissionDraftResponseSchema,
|
|
2311
|
+
zo as CreateSubmissionResponseSchema,
|
|
2312
|
+
Go as DELETE_SUBMISSION_DRAFT,
|
|
2313
|
+
Ho as DeleteSubmissionDraftResponseSchema,
|
|
2314
|
+
wn as DownloadButtons,
|
|
2315
|
+
qo as FileUploadSubmissionForm,
|
|
2316
|
+
Fi as GET_ASSIGNMENT,
|
|
2317
|
+
zi as GET_SUBMISSIONS,
|
|
2318
|
+
Ui as GET_SUBMISSION_COMMENTS,
|
|
2319
|
+
oo as LearningContentHeader,
|
|
2320
|
+
so as MARK_SUBMISSION_COMMENTS_READ,
|
|
2321
|
+
Vi as MarkSubmissionCommentsReadResponseSchema,
|
|
2322
|
+
Yo as ModuleNavigation,
|
|
2323
|
+
Vo as MyProgressPanel,
|
|
2324
|
+
po as SubmissionComments,
|
|
2325
|
+
Uo as SubmissionCommentsDataSchema,
|
|
2326
|
+
Gi as SubmissionCommentsQueryResponseSchema,
|
|
2327
|
+
qi as SubmissionsQueryResponseSchema,
|
|
2328
|
+
Xo as TextEntrySubmissionForm,
|
|
2329
|
+
Fo as TranslationsProvider,
|
|
2330
|
+
Ko as UnreadCommentsBadge,
|
|
2331
|
+
ao as useCreateSubmissionComment,
|
|
2332
|
+
Xi as useGetAssignment,
|
|
2333
|
+
lo as useGetSubmissionComments,
|
|
2334
|
+
Ki as useGetSubmissions,
|
|
2335
|
+
co as useMarkSubmissionCommentsRead,
|
|
2336
|
+
Zo as useModuleItemSequence,
|
|
2312
2337
|
q as useTranslations
|
|
2313
2338
|
};
|