@cuemath/leap 3.2.33-beta-0.2 → 3.2.33-beta-0.3

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