@cuemath/leap 2.9.7-akm-2 → 2.9.7-gg1

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