@cuemath/leap 3.1.44-as3 → 3.1.44-beta-0.1

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