@cuemath/leap 3.2.29 → 3.2.30-aa0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/features/sheets/constants/sheet.js +12 -7
  2. package/dist/features/sheets/constants/sheet.js.map +1 -1
  3. package/dist/features/sheets/utils/is-v3-worksheet.js +17 -0
  4. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  5. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +141 -0
  6. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -0
  7. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  8. package/dist/features/worksheet/worksheet/worksheet.js +318 -367
  9. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  10. package/dist/index.d.ts +24 -17
  11. package/dist/index.js +40 -38
  12. package/dist/index.js.map +1 -1
  13. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  14. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  15. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  16. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  17. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  18. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  19. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  20. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  21. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  22. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  23. package/package.json +1 -1
  24. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  25. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
@@ -1,402 +1,353 @@
1
- import { jsxs as R, Fragment as mt, jsx as o } from "react/jsx-runtime";
2
- import { captureMessage as Y } from "@sentry/browser";
3
- import { memo as ft, forwardRef as pt, useMemo as Z, useState as v, useCallback as y, useEffect as b, useLayoutEffect as ht } from "react";
4
- import gt from "../../../assets/line-icons/icons/check2.js";
5
- import bt from "../../../assets/line-icons/icons/info2.js";
6
- import It from "../../../helpers/get-device-details.js";
7
- import St from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
8
- import fe from "../../ui/layout/flex-view.js";
9
- import Ct from "../../ui/text/text.js";
10
- import vt from "../constants/events.js";
11
- import yt from "../user-pointer-pin/user-pin.js";
12
- import { WORKSHEET_NUDGE_BANNER_HEIGHT as pe, TOP_NAVIGATION_HEIGHT as Tt, DESMOS_CALC_POSITION as $t } from "./constants.js";
13
- import _t from "./hooks/use-create-imperative-handle.js";
14
- import Et from "./hooks/use-get-active-question-id.js";
15
- import kt from "./hooks/use-time-on-questions.js";
16
- import wt from "./question-tips.js";
17
- import Nt from "./worksheet-action-bar/worksheet-action-bar.js";
18
- import At from "./worksheet-blocker/worksheet-blocker.js";
19
- import { getWorksheetDimensions as Bt, getQuestionsFromItems as Wt, getInitialResponses as Ot, getLastUnlockedQuestionIndex as he, getInitialQuestionId as Rt, getQuestionMetadata as ge, scrollToQuestion as Q, getRenderableQuestions as Dt, getWorksheetNudgeBannerInfo as Vt } from "./worksheet-helpers.js";
20
- import Mt from "./worksheet-navigation/worksheet-navigation.js";
21
- import xt from "./worksheet-question/worksheet-question.js";
22
- import Ht from "./worksheet-sidebar/navigator.js";
23
- import Pt from "./worksheet-sidebar/sidebar.js";
24
- import { NudgeBannerWrapper as qt, NudgeBannerIcon as be, WorksheetContainer as Qt, NavigationContainer as Gt, NavigationWrapper as Lt, BlockerWrapper as zt, DesmosCalcWrapper as Ft, ActionbarContainer as jt, ActionbarWrapper as Ut, StudentWorksheetSideBar as Kt, QuestionsWrapper as Xt } from "./worksheet-styled.js";
25
- import Jt from "./worksheet-summary/worksheet-summary.js";
26
- const Yt = (Ie, Se) => {
1
+ import { jsxs as y, Fragment as lt, jsx as i } from "react/jsx-runtime";
2
+ import { memo as dt, forwardRef as mt, useMemo as K, useState as I, useCallback as S, useEffect as T, useLayoutEffect as ut } from "react";
3
+ import ht from "../../../assets/line-icons/icons/check2.js";
4
+ import ft from "../../../assets/line-icons/icons/info2.js";
5
+ import pt from "../../../helpers/get-device-details.js";
6
+ import gt from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
7
+ import de from "../../ui/layout/flex-view.js";
8
+ import bt from "../../ui/text/text.js";
9
+ import Ct from "../user-pointer-pin/user-pin.js";
10
+ import { WORKSHEET_NUDGE_BANNER_HEIGHT as me, TOP_NAVIGATION_HEIGHT as It, DESMOS_CALC_POSITION as St } from "./constants.js";
11
+ import kt from "./hooks/use-create-imperative-handle.js";
12
+ import $t from "./hooks/use-get-active-question-id.js";
13
+ import Tt from "./hooks/use-time-on-questions.js";
14
+ import vt from "./question-tips.js";
15
+ import wt from "./worksheet-action-bar/worksheet-action-bar.js";
16
+ import Et from "./worksheet-blocker/worksheet-blocker.js";
17
+ import { getWorksheetDimensions as Nt, getQuestionsFromItems as At, getInitialResponses as Bt, getLastUnlockedQuestionIndex as ue, getInitialQuestionId as yt, getQuestionMetadata as he, scrollToQuestion as x, getRenderableQuestions as Wt, getWorksheetNudgeBannerInfo as _t } from "./worksheet-helpers.js";
18
+ import Ot from "./worksheet-navigation/worksheet-navigation.js";
19
+ import Dt from "./worksheet-question/worksheet-question.js";
20
+ import Vt from "./worksheet-sidebar/navigator.js";
21
+ import Ht from "./worksheet-sidebar/sidebar.js";
22
+ import { NudgeBannerWrapper as Mt, NudgeBannerIcon as fe, WorksheetContainer as xt, NavigationContainer as Rt, NavigationWrapper as Pt, BlockerWrapper as Qt, DesmosCalcWrapper as Gt, ActionbarContainer as Ft, ActionbarWrapper as jt, StudentWorksheetSideBar as zt, QuestionsWrapper as Lt } from "./worksheet-styled.js";
23
+ import qt from "./worksheet-summary/worksheet-summary.js";
24
+ const Xt = (pe, ge) => {
27
25
  const {
28
- userType: s,
29
- studentName: Ce = "Student",
30
- questionsSignedRequest: ve,
31
- worksheetName: ee,
32
- initialResponseId: ye,
33
- initialItemIndex: Te,
34
- learnosityActivityRef: E,
35
- learnosityItems: k,
36
- learnosityResponses: $e,
37
- layout: T,
38
- background: _e,
26
+ userType: r,
27
+ studentName: be = "Student",
28
+ questionsSignedRequest: Ce,
29
+ worksheetName: U,
30
+ initialResponseId: Ie,
31
+ initialItemIndex: Se,
32
+ // learnosityActivityRef,
33
+ learnosityItems: R,
34
+ learnosityResponses: ke,
35
+ layout: k,
36
+ background: $e,
39
37
  behavior: a,
40
- updatedResponses: G,
41
- showNudgeBanner: Ee,
42
- markedAsCompleted: te,
43
- onResponseChange: I,
44
- onBulkResponsesChange: ke,
45
- onResponsesChange: L,
46
- onMediaStateChange: z,
47
- onTeacherValidation: ie,
38
+ updatedResponses: P,
39
+ showNudgeBanner: Te,
40
+ markedAsCompleted: J,
41
+ onResponseChange: f,
42
+ onBulkResponsesChange: ve,
43
+ onResponsesChange: Q,
44
+ onMediaStateChange: G,
45
+ onTeacherValidation: Y,
48
46
  onOptionalItemAssignment: we,
49
- onOptionalItemSkip: Ne,
50
- onExitTicketStart: D,
51
- onExitTicketSubmit: V,
52
- onSubmit: Ae,
53
- learnosity: S,
54
- appendedQuestionIds: ne,
55
- worksheetCompleted: Be,
56
- userId: We,
57
- onPublishStrokes: Oe,
58
- onReceiveStrokes: Re,
59
- initialStrokesData: De,
60
- isCanvasEnabled: oe,
61
- onHelp: Ve,
62
- onPublishMouseMove: Me,
63
- onSubscribeMouseMove: xe,
47
+ onOptionalItemSkip: Ee,
48
+ onExitTicketStart: W,
49
+ onExitTicketSubmit: _,
50
+ onSubmit: Ne,
51
+ learnosity: p,
52
+ appendedQuestionIds: Z,
53
+ worksheetCompleted: Ae,
54
+ userId: Be,
55
+ onPublishStrokes: ye,
56
+ onReceiveStrokes: We,
57
+ initialStrokesData: _e,
58
+ isCanvasEnabled: ee,
59
+ onHelp: Oe,
60
+ onPublishMouseMove: De,
61
+ onSubscribeMouseMove: Ve,
64
62
  onActiveQuestionChange: F,
65
63
  openQuestionFeedbackModal: He,
66
- summaryDescription: Pe,
67
- canSubmitWorksheet: qe,
68
- loggerRef: w,
69
- canResolveDoubt: Qe,
70
- onResolveDoubt: Ge,
71
- onSkip: Le,
72
- onUnassign: ze,
64
+ summaryDescription: Me,
65
+ canSubmitWorksheet: xe,
66
+ loggerRef: j,
67
+ canResolveDoubt: Re,
68
+ onResolveDoubt: Pe,
69
+ onSkip: Qe,
70
+ onUnassign: Ge,
73
71
  onReview: Fe,
74
72
  canToggleScribbling: je = !0,
75
- studentId: Ue,
76
- subjectiveProps: Ke,
77
- canShowActionBar: Xe = !0
78
- } = Ie, { initialQuestion: Je, navigationMode: p, teacherValidationEnabled: j, maximumAttempts: re } = a, {
79
- containerStyle: M,
80
- containerWidth: Ye,
81
- minQuestionHeight: se,
82
- minSummaryHeight: Ze,
83
- questionsScrollable: x,
84
- navigationBar: et,
85
- topOffset: H,
86
- renderSideBar: tt,
87
- showUserPointer: it = !0
88
- } = T, ae = re === -2, { actionbarHeight: C, maxQuestionWidth: U, questionsContainerWidth: K } = Z(
89
- () => Bt(k, T),
90
- [T, k]
91
- ), [t] = v(
92
- () => Wt(k, {
93
- sectioned: j && p !== "ADAPTIVE" && p !== "CURRENT",
94
- adaptive: p === "ADAPTIVE"
73
+ studentId: ze,
74
+ subjectiveProps: Le,
75
+ canShowActionBar: qe = !0
76
+ } = pe, { initialQuestion: Xe, navigationMode: m, teacherValidationEnabled: Ke, maximumAttempts: te } = a, {
77
+ containerStyle: O,
78
+ containerWidth: Ue,
79
+ minQuestionHeight: ie,
80
+ minSummaryHeight: Je,
81
+ questionsScrollable: D,
82
+ navigationBar: Ye,
83
+ topOffset: V,
84
+ renderSideBar: Ze,
85
+ showUserPointer: et = !0
86
+ } = k, ne = te === -2, { actionbarHeight: g, maxQuestionWidth: z, questionsContainerWidth: L } = K(
87
+ () => Nt(R, k),
88
+ [k, R]
89
+ ), [t] = I(
90
+ () => At(R, {
91
+ sectioned: Ke && m !== "ADAPTIVE" && m !== "CURRENT",
92
+ adaptive: m === "ADAPTIVE"
95
93
  })
96
- ), [c, N] = v(
97
- () => $e ?? Ot(t)
98
- ), [ce, nt] = v(!1), h = Z(
99
- () => p !== "OPEN" ? he({
94
+ ), [c, v] = I(
95
+ () => ke ?? Bt(t)
96
+ ), [oe, tt] = I(!1), u = K(
97
+ () => m !== "OPEN" ? ue({
100
98
  questions: t,
101
99
  responses: c,
102
100
  behavior: a,
103
- userType: s
101
+ userType: r
104
102
  }) : t.length - 1,
105
- [a, p, t, c, s]
106
- ), l = t[h], r = c[(l == null ? void 0 : l.response_id) ?? ""], { bannerBackgroundColor: ot, label: rt } = Vt(s, !!te), [A] = v(
107
- () => Rt({
103
+ [a, m, t, c, r]
104
+ ), l = t[u], n = c[(l == null ? void 0 : l.response_id) ?? ""], { bannerBackgroundColor: it, label: nt } = _t(r, !!J), [w] = I(
105
+ () => yt({
108
106
  questions: t,
109
- initialQuestion: Je,
110
- lastUnlockedQuestionIndex: he({
107
+ initialQuestion: Xe,
108
+ lastUnlockedQuestionIndex: ue({
111
109
  questions: t,
112
110
  responses: c,
113
111
  behavior: a,
114
- userType: s
112
+ userType: r
115
113
  }),
116
- initialResponseId: ye,
117
- initialItemIndex: Te
114
+ initialResponseId: Ie,
115
+ initialItemIndex: Se
118
116
  })
119
- ), { activeQuestionId: B, setActiveQuestionId: P, intersectionObserver: X } = Et(A), f = Z(
120
- () => t.findIndex((e) => e.response_id === B),
121
- [B, t]
122
- ), [g, J] = v(!1), [le, W] = v(), [de, ue] = v(!1), me = kt(a, c, B), st = y(
123
- (e, i, n) => {
124
- const d = i === "SIMULATION" ? "simState" : void 0;
125
- d && (I ? N((u) => {
126
- const m = e.response_id, $ = ge(t, m);
127
- if (!$) return u;
128
- const _ = {
129
- ...$,
130
- ...u[m],
131
- [d]: n
117
+ ), { activeQuestionId: E, setActiveQuestionId: H, intersectionObserver: q } = $t(w), d = K(
118
+ () => t.findIndex((e) => e.response_id === E),
119
+ [E, t]
120
+ ), [h, X] = I(!1), [re, N] = I(), [se, ae] = I(!1), ce = Tt(a, c, E), ot = S(
121
+ (e, s, o) => {
122
+ const b = s === "SIMULATION" ? "simState" : void 0;
123
+ b && (f ? v(($) => {
124
+ const C = e.response_id, B = he(t, C);
125
+ if (!B) return $;
126
+ const le = {
127
+ ...B,
128
+ ...$[C],
129
+ [b]: o
132
130
  };
133
- return I == null || I({
134
- responseId: m,
135
- response: _,
131
+ return f == null || f({
132
+ responseId: C,
133
+ response: le,
136
134
  isNewAttempt: !1,
137
135
  question: e
138
136
  }), {
139
- ...u,
140
- [m]: _
137
+ ...$,
138
+ [C]: le
141
139
  };
142
- }) : z && z(e, i, n));
140
+ }) : G && G(e, s, o));
143
141
  },
144
- [z, I, t]
145
- ), at = y(
146
- (e, i) => {
147
- N((n) => {
148
- const d = ge(t, e);
149
- return d ? {
150
- ...n,
142
+ [G, f, t]
143
+ ), rt = S(
144
+ (e, s) => {
145
+ v((o) => {
146
+ const b = he(t, e);
147
+ return b ? {
148
+ ...o,
151
149
  [e]: {
152
- ...d,
153
- ...n[e],
154
- markedForReview: i
150
+ ...b,
151
+ ...o[e],
152
+ markedForReview: s
155
153
  }
156
- } : n;
154
+ } : o;
157
155
  });
158
156
  },
159
157
  [t]
160
- ), O = y(() => {
161
- W((e) => {
162
- var i;
158
+ ), A = S(() => {
159
+ N((e) => {
160
+ var s;
163
161
  if (e) {
164
- const n = (i = t[h]) == null ? void 0 : i.response_id;
165
- n && setTimeout(() => {
166
- Q(n);
162
+ const o = (s = t[u]) == null ? void 0 : s.response_id;
163
+ o && setTimeout(() => {
164
+ x(o);
167
165
  }, 50);
168
166
  }
169
167
  });
170
- }, [h, t]), q = y(
168
+ }, [u, t]), M = S(
171
169
  (e) => {
172
- J(!1), x ? requestAnimationFrame(() => Q(e)) : P(e);
170
+ X(!1), D ? requestAnimationFrame(() => x(e)) : H(e);
173
171
  },
174
- [x, P]
175
- ), ct = y(() => {
176
- ue(!1);
177
- }, []), lt = y(() => {
178
- ue(!0);
179
- }, []), dt = y(() => {
180
- J(!0);
172
+ [D, H]
173
+ ), st = S(() => {
174
+ ae(!1);
175
+ }, []), at = S(() => {
176
+ ae(!0);
177
+ }, []), ct = S(() => {
178
+ X(!0);
181
179
  }, []);
182
- return b(() => {
183
- const e = t[f];
180
+ return T(() => {
181
+ const e = t[d];
184
182
  e && F && F(e);
185
- }, [F, t, f]), _t(Se, {
183
+ }, [F, t, d]), kt(ge, {
186
184
  behavior: a,
187
185
  questions: t,
188
- setResponses: N,
189
- onResponseChange: I,
190
- onBulkResponsesChange: ke,
191
- getTimeSpentOnQuestion: me
192
- }), b(() => () => {
193
- X.disconnect();
194
- }, [X]), b(() => {
195
- L && c && L(c);
196
- }, [L, c]), b(() => {
197
- G && N(G);
198
- }, [G]), ht(() => {
186
+ setResponses: v,
187
+ onResponseChange: f,
188
+ onBulkResponsesChange: ve,
189
+ getTimeSpentOnQuestion: ce
190
+ }), T(() => () => {
191
+ q.disconnect();
192
+ }, [q]), T(() => {
193
+ Q && c && Q(c);
194
+ }, [Q, c]), T(() => {
195
+ P && v(P);
196
+ }, [P]), ut(() => {
199
197
  let e;
200
- return S && A && (It().browser_name === "Safari" ? e = setTimeout(() => {
201
- Q(A);
202
- }, 400) : Q(A)), () => {
198
+ return p && w && (pt().browser_name === "Safari" ? e = setTimeout(() => {
199
+ x(w);
200
+ }, 400) : x(w)), () => {
203
201
  clearTimeout(e);
204
202
  };
205
- }, [S, A, H]), b(() => {
203
+ }, [p, w, V]), T(() => {
206
204
  if (a.teacherValidationEnabled && l) {
207
- const { item_type: e, instructor_stimulus: i, is_optional: n } = l;
208
- s === "TEACHER" && (e === "exit-ticket" && i !== "SystemIntro" ? r != null && r.submittedByStudent && !(r != null && r.validatedByTeacher) ? W("exit-ticket-review-available") : r != null && r.validatedByTeacher ? O() : W("exit-ticket-teacher-intervention") : n ? r != null && r.assignStatus ? O() : W("optional-items-assignment") : n || O());
205
+ const { item_type: e, instructor_stimulus: s, is_optional: o } = l;
206
+ r === "TEACHER" && (e === "exit-ticket" && s !== "SystemIntro" ? n != null && n.submittedByStudent && !(n != null && n.validatedByTeacher) ? N("exit-ticket-review-available") : n != null && n.validatedByTeacher ? A() : N("exit-ticket-teacher-intervention") : o ? n != null && n.assignStatus ? A() : N("optional-items-assignment") : o || A());
209
207
  }
210
208
  }, [
211
209
  a.teacherValidationEnabled,
212
- O,
210
+ A,
213
211
  l,
214
- r,
215
- s
216
- ]), b(() => {
212
+ n,
213
+ r
214
+ ]), T(() => {
217
215
  if (a.teacherValidationEnabled && l) {
218
- const { item_type: e, instructor_stimulus: i } = l;
219
- s === "STUDENT" && e === "exit-ticket" && i !== "SystemIntro" && (r != null && r.submittedByStudent ? V == null || V() : D == null || D());
216
+ const { item_type: e, instructor_stimulus: s } = l;
217
+ r === "STUDENT" && e === "exit-ticket" && s !== "SystemIntro" && (n != null && n.submittedByStudent ? _ == null || _() : W == null || W());
220
218
  }
221
219
  }, [
222
220
  a.teacherValidationEnabled,
223
221
  l,
224
- r == null ? void 0 : r.submittedByStudent,
225
- D,
226
- V,
227
- s
228
- ]), b(() => {
229
- p === "CURRENT" && k.forEach(({ reference: e, questions: i }) => {
230
- var n, d, u;
231
- i.length < 3 ? Y(`Diagnostics item has Less than 3 questions: ${e}`, {
232
- tags: {
233
- "content-type": "learnosity",
234
- "activity-reference": E,
235
- "item-reference": e
236
- },
237
- fingerprint: [`diagnostics-item-questions-count-${e}`]
238
- // Add unique fingerprint
239
- }) : (((n = i[0]) == null ? void 0 : n.instructor_stimulus) !== "Try" || ((d = i[1]) == null ? void 0 : d.instructor_stimulus) !== "Learn" || ((u = i[2]) == null ? void 0 : u.instructor_stimulus) !== "Apply") && Y(
240
- `Diagnostics questions sequence is incorrect expected [Try, Learn, Apply]: ${e}`,
241
- {
242
- tags: {
243
- "content-type": "learnosity",
244
- "activity-reference": E,
245
- "item-reference": e
246
- },
247
- fingerprint: [`diagnostics-item-questions-sequence-${e}`]
248
- // Add unique fingerprint
249
- }
250
- );
251
- });
252
- }, [E, k, p]), b(() => {
253
- t.forEach((e) => {
254
- const { validation: i, item_reference: n, type: d, question_number: u, metadata: m } = e;
255
- if ((j ? d !== "clozetext" : !0) && (i != null && i.valid_response)) {
256
- const _ = i.valid_response.value ?? [];
257
- (_ == null ? void 0 : _.length) === 0 && ((i.alt_responses ?? []).some((ut) => ut.value.length > 0) || (Y(`Question has no valid response: ${m.widget_reference}`, {
258
- tags: {
259
- "content-type": "learnosity",
260
- "activity-reference": E,
261
- "item-reference": n,
262
- "question-number": u,
263
- "widget-reference": m.widget_reference
264
- },
265
- fingerprint: [`no-valid-response-${m.widget_reference}`]
266
- // Add unique fingerprint
267
- }), w.current(vt.WORKSHEET_V3_QUESTION_MISSING_VALIDATION, {
268
- item_reference: n,
269
- widget_reference: m.widget_reference,
270
- question_type: d,
271
- question_number: u
272
- })));
273
- }
274
- });
275
- }, [E, w, t, j]), S ? /* @__PURE__ */ R(mt, { children: [
276
- Ee && /* @__PURE__ */ R(
277
- qt,
222
+ n == null ? void 0 : n.submittedByStudent,
223
+ W,
224
+ _,
225
+ r
226
+ ]), p ? /* @__PURE__ */ y(lt, { children: [
227
+ Te && /* @__PURE__ */ y(
228
+ Mt,
278
229
  {
279
230
  $flexDirection: "row",
280
231
  $justifyContent: "center",
281
232
  $alignItems: "center",
282
233
  $width: "100%",
283
234
  $heightX: 1.75,
284
- $height: pe,
235
+ $height: me,
285
236
  $gap: 8,
286
237
  $gutter: 8,
287
238
  $flexGap: 8,
288
- $background: ot,
289
- $topOffset: T.topOffset - pe,
239
+ $background: it,
240
+ $topOffset: k.topOffset - me,
290
241
  children: [
291
- te ? /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(gt, { width: 16, height: 16 }) }) : /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(bt, { width: 16, height: 16 }) }),
292
- /* @__PURE__ */ o(Ct, { $renderAs: "ub3", children: rt })
242
+ J ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ht, { width: 16, height: 16 }) }) : /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ft, { width: 16, height: 16 }) }),
243
+ /* @__PURE__ */ i(bt, { $renderAs: "ub3", children: nt })
293
244
  ]
294
245
  }
295
246
  ),
296
- /* @__PURE__ */ R(Qt, { $background: "WHITE_1", $width: Ye, children: [
297
- et === "top" && /* @__PURE__ */ o(Gt, { $topOffset: H, $height: Tt, children: /* @__PURE__ */ o(Lt, { children: /* @__PURE__ */ o(
298
- Mt,
247
+ /* @__PURE__ */ y(xt, { $background: "WHITE_1", $width: Ue, children: [
248
+ Ye === "top" && /* @__PURE__ */ i(Rt, { $topOffset: V, $height: It, children: /* @__PURE__ */ i(Pt, { children: /* @__PURE__ */ i(
249
+ Ot,
299
250
  {
300
251
  placement: "top",
301
252
  questions: t,
302
253
  responses: c,
303
- activeQuestionIndex: f,
304
- lastUnlockedQuestionIndex: h,
254
+ activeQuestionIndex: d,
255
+ lastUnlockedQuestionIndex: u,
305
256
  behavior: a,
306
- onItemNumberClick: q,
307
- userType: s,
308
- summaryVisible: g
257
+ onItemNumberClick: M,
258
+ userType: r,
259
+ summaryVisible: h
309
260
  }
310
261
  ) }) }),
311
- le && l && /* @__PURE__ */ o(zt, { $minHeight: se, $topOffset: H, children: /* @__PURE__ */ o(fe, { $width: U, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ o(
312
- At,
262
+ re && l && /* @__PURE__ */ i(Qt, { $minHeight: ie, $topOffset: V, children: /* @__PURE__ */ i(de, { $width: z, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ i(
263
+ Et,
313
264
  {
314
- blocker: le,
265
+ blocker: re,
315
266
  lastUnlockedQuestion: l,
316
- studentName: Ce,
317
- onBlockerClose: O,
267
+ studentName: be,
268
+ onBlockerClose: A,
318
269
  onOptionalItemAssignment: we,
319
- onOptionalItemSkip: Ne,
320
- onTeacherValidation: ie
270
+ onOptionalItemSkip: Ee,
271
+ onTeacherValidation: Y
321
272
  }
322
273
  ) }) }),
323
- it && /* @__PURE__ */ o(
324
- yt,
274
+ et && /* @__PURE__ */ i(
275
+ Ct,
325
276
  {
326
- activeQuestionIndex: f,
327
- onClick: q,
277
+ activeQuestionIndex: d,
278
+ onClick: M,
328
279
  questions: t,
329
- bottomOffset: C,
330
- topOffset: H,
331
- userType: s
280
+ bottomOffset: g,
281
+ topOffset: V,
282
+ userType: r
332
283
  }
333
284
  ),
334
- de && /* @__PURE__ */ o(Ft, { children: /* @__PURE__ */ o(St, { initialPosition: $t, onClose: ct }) }),
335
- /* @__PURE__ */ R(
336
- jt,
285
+ se && /* @__PURE__ */ i(Gt, { children: /* @__PURE__ */ i(gt, { initialPosition: St, onClose: st }) }),
286
+ /* @__PURE__ */ y(
287
+ Ft,
337
288
  {
338
- $marginTop: s === "TEACHER" && g ? "0" : C,
339
- $height: C,
340
- $isCardView: M === "card",
341
- $isPuzzleCard: ae,
289
+ $marginTop: r === "TEACHER" && h ? "0" : g,
290
+ $height: g,
291
+ $isCardView: O === "card",
292
+ $isPuzzleCard: ne,
342
293
  children: [
343
- re !== -2 && /* @__PURE__ */ o(
344
- wt,
294
+ te !== -2 && /* @__PURE__ */ i(
295
+ vt,
345
296
  {
346
- width: K - 32,
347
- question: t[f],
348
- learnosity: S,
349
- userType: s
297
+ width: L - 32,
298
+ question: t[d],
299
+ learnosity: p,
300
+ userType: r
350
301
  }
351
302
  ),
352
- Xe && /* @__PURE__ */ o(
353
- Ut,
303
+ qe && /* @__PURE__ */ i(
304
+ jt,
354
305
  {
355
- $height: C,
356
- $width: M === "card" ? K - 32 : "100%",
357
- $isCardView: M === "card",
358
- children: /* @__PURE__ */ o(
359
- fe,
306
+ $height: g,
307
+ $width: O === "card" ? L - 32 : "100%",
308
+ $isCardView: O === "card",
309
+ children: /* @__PURE__ */ i(
310
+ de,
360
311
  {
361
312
  $gutterX: 1,
362
313
  $flexDirection: "row",
363
314
  $justifyContent: "space-between",
364
315
  $alignItems: "center",
365
- $width: K - 32,
366
- children: /* @__PURE__ */ o(
367
- Nt,
316
+ $width: L - 32,
317
+ children: /* @__PURE__ */ i(
318
+ wt,
368
319
  {
369
- userType: s,
370
- layout: T,
320
+ userType: r,
321
+ layout: k,
371
322
  behavior: a,
372
- worksheetName: ee,
323
+ worksheetName: U,
373
324
  questions: t,
374
325
  responses: c,
375
- onCalculatorOpen: lt,
376
- activeQuestionIndex: f,
377
- lastUnlockedQuestionIndex: h,
378
- appendedQuestionIds: ne,
379
- learnosity: S,
380
- isCanvasEnabled: oe,
381
- canSubmitWorksheet: qe,
382
- isScribblingEnabled: ce,
383
- isSummaryVisible: g,
384
- setResponses: N,
385
- getTimeSpentOnQuestion: me,
386
- setSummaryVisible: J,
387
- setBlocker: W,
388
- setIsScribblingEnabled: nt,
389
- setActiveQuestionId: P,
390
- onItemNumberClick: q,
391
- onGoToReview: dt,
392
- onResponseChange: I,
393
- onHelp: Ve,
394
- onTeacherValidation: ie,
395
- onSubmit: Ae,
396
- showCalculator: de,
397
- loggerRef: w,
398
- onSkip: Le,
399
- onUnassign: ze,
326
+ onCalculatorOpen: at,
327
+ activeQuestionIndex: d,
328
+ lastUnlockedQuestionIndex: u,
329
+ appendedQuestionIds: Z,
330
+ learnosity: p,
331
+ isCanvasEnabled: ee,
332
+ canSubmitWorksheet: xe,
333
+ isScribblingEnabled: oe,
334
+ isSummaryVisible: h,
335
+ setResponses: v,
336
+ getTimeSpentOnQuestion: ce,
337
+ setSummaryVisible: X,
338
+ setBlocker: N,
339
+ setIsScribblingEnabled: tt,
340
+ setActiveQuestionId: H,
341
+ onItemNumberClick: M,
342
+ onGoToReview: ct,
343
+ onResponseChange: f,
344
+ onHelp: Oe,
345
+ onTeacherValidation: Y,
346
+ onSubmit: Ne,
347
+ showCalculator: se,
348
+ loggerRef: j,
349
+ onSkip: Qe,
350
+ onUnassign: Ge,
400
351
  onReview: Fe,
401
352
  canToggleScribbling: je
402
353
  }
@@ -405,99 +356,99 @@ const Yt = (Ie, Se) => {
405
356
  )
406
357
  }
407
358
  ),
408
- !g && x && s === "STUDENT" && /* @__PURE__ */ o(Kt, { children: /* @__PURE__ */ o(Ht, {}) })
359
+ !h && D && r === "STUDENT" && /* @__PURE__ */ i(zt, { children: /* @__PURE__ */ i(Vt, {}) })
409
360
  ]
410
361
  }
411
362
  ),
412
- /* @__PURE__ */ R(
413
- Xt,
363
+ /* @__PURE__ */ y(
364
+ Lt,
414
365
  {
415
- $actionbarHeight: C,
416
- $isCardView: M === "card",
417
- $isPuzzleCard: ae,
366
+ $actionbarHeight: g,
367
+ $isCardView: O === "card",
368
+ $isPuzzleCard: ne,
418
369
  children: [
419
- Dt({ questions: t, lastUnlockedQuestionIndex: h, userType: s }).map(
420
- (e, i) => {
421
- var m, $;
422
- const { response_id: n, is_optional: d } = e, u = (m = c[n]) == null ? void 0 : m.assignStatus;
423
- return a.teacherValidationEnabled && (u === "skipped" || d && u !== "assigned" && s === "STUDENT") ? null : /* @__PURE__ */ o(
424
- xt,
370
+ Wt({ questions: t, lastUnlockedQuestionIndex: u, userType: r }).map(
371
+ (e, s) => {
372
+ var C, B;
373
+ const { response_id: o, is_optional: b } = e, $ = (C = c[o]) == null ? void 0 : C.assignStatus;
374
+ return a.teacherValidationEnabled && ($ === "skipped" || b && $ !== "assigned" && r === "STUDENT") ? null : /* @__PURE__ */ i(
375
+ Dt,
425
376
  {
426
- signedRequest: ve,
427
- userType: s,
428
- worksheetCompleted: Be,
377
+ signedRequest: Ce,
378
+ userType: r,
379
+ worksheetCompleted: Ae,
429
380
  question: e,
430
- response: c[n],
431
- nextQuestionId: p === "ADAPTIVE" || p === "CURRENT" ? l == null ? void 0 : l.response_id : i < h ? ($ = t[i + 1]) == null ? void 0 : $.response_id : void 0,
432
- maxQuestionWidth: U,
433
- learnosity: S,
434
- isActive: n === B,
435
- isHidden: !x && n !== B || g,
436
- canRender: f > -1 && (i === f || p !== "CURRENT" && i === f + 1),
437
- background: _e,
438
- appended: ne.includes(n),
381
+ response: c[o],
382
+ nextQuestionId: m === "ADAPTIVE" || m === "CURRENT" ? l == null ? void 0 : l.response_id : s < u ? (B = t[s + 1]) == null ? void 0 : B.response_id : void 0,
383
+ maxQuestionWidth: z,
384
+ learnosity: p,
385
+ isActive: o === E,
386
+ isHidden: !D && o !== E || h,
387
+ canRender: d > -1 && (s === d || m !== "CURRENT" && s === d + 1),
388
+ background: $e,
389
+ appended: Z.includes(o),
439
390
  behavior: a,
440
- layout: T,
441
- actionbarHeight: C,
442
- intersectionObserver: X,
443
- onMarkForReview: at,
444
- onMediaStateChange: st,
445
- userId: We,
446
- isScribblingEnabled: ce,
447
- onPublishStrokes: Oe,
448
- onReceiveStrokes: Re,
449
- initialStrokesData: De,
450
- isCanvasEnabled: oe,
451
- onPublishMouseMove: Me,
452
- onSubscribeMouseMove: xe,
453
- setActiveQuestionId: P,
454
- canResolveDoubt: Qe,
455
- onResolveDoubt: Ge,
456
- studentId: Ue,
457
- subjectiveProps: Ke,
391
+ layout: k,
392
+ actionbarHeight: g,
393
+ intersectionObserver: q,
394
+ onMarkForReview: rt,
395
+ onMediaStateChange: ot,
396
+ userId: Be,
397
+ isScribblingEnabled: oe,
398
+ onPublishStrokes: ye,
399
+ onReceiveStrokes: We,
400
+ initialStrokesData: _e,
401
+ isCanvasEnabled: ee,
402
+ onPublishMouseMove: De,
403
+ onSubscribeMouseMove: Ve,
404
+ setActiveQuestionId: H,
405
+ canResolveDoubt: Re,
406
+ onResolveDoubt: Pe,
407
+ studentId: ze,
408
+ subjectiveProps: Le,
458
409
  responses: c,
459
- loggerRef: w
410
+ loggerRef: j
460
411
  },
461
- n
412
+ o
462
413
  );
463
414
  }
464
415
  ),
465
- g && /* @__PURE__ */ o(
466
- Jt,
416
+ h && /* @__PURE__ */ i(
417
+ qt,
467
418
  {
468
- worksheetName: ee,
419
+ worksheetName: U,
469
420
  questions: t,
470
421
  responses: c,
471
- activeQuestionIndex: f,
472
- lastUnlockedQuestionIndex: h,
473
- onItemNumberClick: q,
422
+ activeQuestionIndex: d,
423
+ lastUnlockedQuestionIndex: u,
424
+ onItemNumberClick: M,
474
425
  behavior: a,
475
- minHeight: Ze,
476
- summaryDescription: Pe,
477
- summaryVisible: g
426
+ minHeight: Je,
427
+ summaryDescription: Me,
428
+ summaryVisible: h
478
429
  }
479
430
  )
480
431
  ]
481
432
  }
482
433
  ),
483
- !g && tt && /* @__PURE__ */ o(
484
- Pt,
434
+ !h && Ze && /* @__PURE__ */ i(
435
+ Ht,
485
436
  {
486
- questionWidth: U,
437
+ questionWidth: z,
487
438
  questions: t,
488
- activeQuestionIndex: f,
489
- learnosity: S,
490
- userType: s,
491
- height: se,
492
- actionbarHeight: C,
439
+ activeQuestionIndex: d,
440
+ learnosity: p,
441
+ userType: r,
442
+ height: ie,
443
+ actionbarHeight: g,
493
444
  openQuestionFeedbackModal: He,
494
- loggerRef: w
445
+ loggerRef: j
495
446
  }
496
447
  )
497
448
  ] })
498
449
  ] }) : null;
499
- }, Ei = ft(pt(Yt));
450
+ }, Ci = dt(mt(Xt));
500
451
  export {
501
- Ei as default
452
+ Ci as default
502
453
  };
503
454
  //# sourceMappingURL=worksheet.js.map