@cuemath/leap 3.5.65 → 3.5.66

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.
@@ -3,10 +3,10 @@ import { memo as F, useMemo as G, useState as j, useRef as _, useCallback as w,
3
3
  import U from "../../assets/line-icons/icons/closed-eye.js";
4
4
  import y from "../chapters-v2/comps/node-card/node-card-tags.js";
5
5
  import { getNodeTypeBasedBgImage as V } from "../chapters-v2/utils/index.js";
6
- import { getNodeCardBasedIcon as Z } from "../chapters-v2/utils/node-card-utils.js";
7
- import Y from "../math-fit/math-fit-card/math-fit-card.js";
6
+ import { getNodeCardBasedIcon as Y } from "../chapters-v2/utils/node-card-utils.js";
7
+ import Z from "../math-fit/math-fit-card/math-fit-card.js";
8
8
  import q from "../puzzles/comps/puzzle-card.js";
9
- import u from "../ui/arrow-tooltip/arrow-tooltip.js";
9
+ import p from "../ui/arrow-tooltip/arrow-tooltip.js";
10
10
  import c from "../ui/layout/flex-view.js";
11
11
  import J from "../ui/lottie-animation/lottie-animation.js";
12
12
  import Q from "./card-title.js";
@@ -18,26 +18,26 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
18
18
  isInQueue: k,
19
19
  nodeData: i,
20
20
  studentContainerRef: h,
21
- subHeader: C,
21
+ subHeader: b,
22
22
  userType: n,
23
23
  isMilestone: d = !1,
24
24
  puzzleHWCardRef: x,
25
- entityType: N,
25
+ entityType: v,
26
26
  state: t,
27
- score: O,
27
+ score: N,
28
28
  imageUrl: f,
29
- mathFitCardRef: v
29
+ mathFitCardRef: O
30
30
  }) => {
31
31
  const {
32
32
  node_type: r,
33
- accuracy: I,
33
+ accuracy: C,
34
34
  due_date_ts: o,
35
35
  image_hue: s,
36
36
  card_header: z = "",
37
- unlocked_on_ts: m,
37
+ unlocked_on_ts: u,
38
38
  course_type: D,
39
39
  title: H
40
- } = i, L = r === "PUZZLE_CARD", $ = N === ee.MATHFIT_TEST, g = n === "STUDENT" && t === "LOCKED", b = t === "LOCKED" || n === "TEACHER" && t !== "COMPLETED" && t !== "EXPIRED", S = G(() => t === "LOCKED" ? $ ? "Take test after class" : "Not available to student" : "Sheet is not completed yet", [t, $]), [X, R] = j(!1), p = _(null), B = V(r), T = _(null), { lottie: P } = Z(r), W = w(() => {
40
+ } = i, L = r === "PUZZLE_CARD", $ = v === ee.MATHFIT_TEST, g = n === "STUDENT" && t === "LOCKED", I = t === "LOCKED" || n === "TEACHER" && t !== "COMPLETED" && t !== "EXPIRED", S = G(() => t === "LOCKED" ? $ ? "Take test after class" : "Not available to student" : "You’ll be able to review the test after your student submits it", [t, $]), [X, R] = j(!1), m = _(null), B = V(r), T = _(null), { lottie: P } = Y(r), W = w(() => {
41
41
  var a;
42
42
  (a = T.current) == null || a.play();
43
43
  }, []), M = w(() => {
@@ -45,9 +45,9 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
45
45
  (a = T.current) == null || a.stop();
46
46
  }, []);
47
47
  return K(() => {
48
- p.current && p.current.scrollHeight > p.current.clientHeight && R(!0);
48
+ m.current && m.current.scrollHeight > m.current.clientHeight && R(!0);
49
49
  }, []), L ? /* @__PURE__ */ e(
50
- u,
50
+ p,
51
51
  {
52
52
  renderAs: "primary",
53
53
  tooltipItem: "Solve puzzle after class",
@@ -77,17 +77,17 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
77
77
  {
78
78
  nodeType: r,
79
79
  state: t,
80
- accuracy: I,
80
+ accuracy: C,
81
81
  dueDateTs: o,
82
82
  isStudent: n === "STUDENT",
83
83
  isMilestone: d
84
84
  }
85
85
  ),
86
- !d && o && m && /* @__PURE__ */ e(
86
+ !d && o && u && /* @__PURE__ */ e(
87
87
  A,
88
88
  {
89
89
  dueDate: o * 1e3,
90
- unlockedOn: m * 1e3,
90
+ unlockedOn: u * 1e3,
91
91
  progressBg: `${s || "ORANGE"}_5`
92
92
  }
93
93
  )
@@ -96,23 +96,24 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
96
96
  ) })
97
97
  }
98
98
  ) : $ ? /* @__PURE__ */ e(
99
- u,
99
+ p,
100
100
  {
101
101
  renderAs: "primary",
102
102
  tooltipItem: S,
103
103
  position: "bottom",
104
- hidden: !b,
105
- children: /* @__PURE__ */ e("div", { ref: v, children: /* @__PURE__ */ e(
106
- Y,
104
+ widthX: 13,
105
+ hidden: !I,
106
+ children: /* @__PURE__ */ e("div", { ref: O, children: /* @__PURE__ */ e(
107
+ Z,
107
108
  {
108
- score: O,
109
+ score: N,
109
110
  dueDateTs: i.due_date_ts,
110
111
  nodeType: "DYNAMIC",
111
112
  state: t,
112
- subHeader: C,
113
+ subHeader: b,
113
114
  unlockedOnTs: i == null ? void 0 : i.unlocked_on_ts,
114
115
  userType: n,
115
- isMathFitDisabled: b,
116
+ isMathFitDisabled: I,
116
117
  isMilestone: d,
117
118
  studentContainerRef: h
118
119
  }
@@ -155,7 +156,7 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
155
156
  ),
156
157
  /* @__PURE__ */ e(Q, { cardHeader: z, nodeType: r, courseType: D }),
157
158
  k && /* @__PURE__ */ e(
158
- u,
159
+ p,
159
160
  {
160
161
  renderAs: "primary",
161
162
  tooltipItem: "Not visible to student",
@@ -173,23 +174,23 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
173
174
  {
174
175
  nodeType: r,
175
176
  state: t,
176
- accuracy: I,
177
+ accuracy: C,
177
178
  dueDateTs: o,
178
179
  isStudent: n === "STUDENT",
179
180
  isMilestone: d
180
181
  }
181
182
  ),
182
- !d && o && m && /* @__PURE__ */ e(
183
+ !d && o && u && /* @__PURE__ */ e(
183
184
  A,
184
185
  {
185
186
  dueDate: o * 1e3,
186
- unlockedOn: m * 1e3,
187
+ unlockedOn: u * 1e3,
187
188
  progressBg: `${s || "ORANGE"}_4`
188
189
  }
189
190
  ),
190
191
  /* @__PURE__ */ l(c, { $gutterX: 0.75, $gapX: 1, $flexRowGapX: 0.5, $background: "WHITE", children: [
191
192
  /* @__PURE__ */ e(
192
- u,
193
+ p,
193
194
  {
194
195
  renderAs: "primary",
195
196
  position: "bottom",
@@ -198,7 +199,7 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
198
199
  hidden: !X,
199
200
  parentWidth: "auto",
200
201
  zIndex: 6,
201
- children: /* @__PURE__ */ e(c, { $heightX: 2.5, children: /* @__PURE__ */ e(de, { ref: p, $renderAs: "ab3", children: E }) })
202
+ children: /* @__PURE__ */ e(c, { $heightX: 2.5, children: /* @__PURE__ */ e(de, { ref: m, $renderAs: "ab3", children: E }) })
202
203
  }
203
204
  ),
204
205
  /* @__PURE__ */ l(
@@ -209,7 +210,7 @@ const ae = { renderer: "canvas", autoplay: !1 }, le = ({
209
210
  $alignItems: "center",
210
211
  $justifyContent: "space-between",
211
212
  children: [
212
- /* @__PURE__ */ e(se, { $renderAs: "ub3", $color: "BLACK_T_60", children: C }),
213
+ /* @__PURE__ */ e(se, { $renderAs: "ub3", $color: "BLACK_T_60", children: b }),
213
214
  /* @__PURE__ */ e(c, { $width: 32 })
214
215
  ]
215
216
  }
@@ -1 +1 @@
1
- {"version":3,"file":"homework-card-view.js","sources":["../../../src/features/homework/homework-card-view.tsx"],"sourcesContent":["import { memo, useCallback, useLayoutEffect, useMemo, useRef, useState, type FC } from 'react';\n\nimport ClosedEyeIcon from '../../assets/line-icons/icons/closed-eye';\nimport NodeCardTags from '../chapters-v2/comps/node-card/node-card-tags';\nimport type { INodeDataProps, TSheetStates } from '../chapters-v2/comps/node-card/node-card-types';\nimport { getNodeTypeBasedBgImage } from '../chapters-v2/utils';\nimport { getNodeCardBasedIcon } from '../chapters-v2/utils/node-card-utils';\nimport MathFitCard from '../math-fit/math-fit-card/math-fit-card';\nimport PuzzleCard from '../puzzles/comps/puzzle-card';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../ui/layout/flex-view';\nimport LottieAnimation from '../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../ui/lottie-animation/types';\nimport type { TUserTypes } from '../ui/types';\nimport CardTitle from './card-title';\nimport { EHWCardListEntityType } from './hw-card-list/hw-card-list-types';\nimport NodeProgress from './node-progress';\nimport * as Styled from './styles';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\ninterface IHomeworkCardViewProps {\n header: string;\n isInQueue?: boolean;\n nodeData: INodeDataProps;\n studentContainerRef: React.RefObject<HTMLDivElement>;\n subHeader: string;\n userType: TUserTypes;\n isMilestone?: boolean;\n puzzleHWCardRef?: React.RefObject<HTMLDivElement>;\n mathFitCardRef?: React.RefObject<HTMLDivElement>;\n entityType?: EHWCardListEntityType;\n state: TSheetStates;\n score: number | null;\n imageUrl?: string;\n}\n\nconst HomeworkView: FC<IHomeworkCardViewProps> = ({\n header,\n isInQueue,\n nodeData,\n studentContainerRef,\n subHeader,\n userType,\n isMilestone = false,\n puzzleHWCardRef,\n entityType,\n state,\n score,\n imageUrl,\n mathFitCardRef,\n}) => {\n const {\n node_type: nodeType,\n accuracy,\n due_date_ts: dueDateTs,\n image_hue: imageHue,\n card_header: cardHeader = '',\n unlocked_on_ts: unlockedOnTs,\n course_type: courseType,\n title,\n } = nodeData;\n const isPuzzleCard = nodeType === 'PUZZLE_CARD';\n const isMathFitCard = entityType === EHWCardListEntityType.MATHFIT_TEST;\n const isPuzzleDisabled = userType === 'STUDENT' && state === 'LOCKED';\n const isMathFitDisabled =\n state === 'LOCKED' || (userType === 'TEACHER' && state !== 'COMPLETED' && state !== 'EXPIRED');\n\n const tooltipText = useMemo(() => {\n if (state === 'LOCKED') {\n if (isMathFitCard) return 'Take test after class';\n\n return 'Not available to student';\n }\n\n return 'Sheet is not completed yet';\n }, [state, isMathFitCard]);\n\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const bgImage = getNodeTypeBasedBgImage(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, []);\n\n if (isPuzzleCard) {\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Solve puzzle after class\"\n position=\"bottom\"\n hidden={!isPuzzleDisabled}\n >\n <div ref={puzzleHWCardRef}>\n <Styled.PuzzleCardWrapper\n ref={studentContainerRef}\n $position=\"relative\"\n $background={`${imageHue}_2`}\n $disabled={isPuzzleDisabled}\n >\n <PuzzleCard\n imageHue={imageHue}\n imageUrl={imageUrl ?? ''}\n title={title}\n width={126}\n height={159}\n disabled={isPuzzleDisabled}\n />\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {!isMilestone && dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_5`}\n />\n )}\n </Styled.PuzzleCardWrapper>\n </div>\n </ArrowTooltip>\n );\n }\n\n // MathFit Assessment Card\n if (isMathFitCard) {\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={tooltipText}\n position=\"bottom\"\n hidden={!isMathFitDisabled}\n >\n <div ref={mathFitCardRef}>\n <MathFitCard\n score={score}\n dueDateTs={nodeData.due_date_ts}\n nodeType=\"DYNAMIC\"\n state={state}\n subHeader={subHeader}\n unlockedOnTs={nodeData?.unlocked_on_ts}\n userType={userType}\n isMathFitDisabled={isMathFitDisabled}\n isMilestone={isMilestone}\n studentContainerRef={studentContainerRef}\n />\n </div>\n </ArrowTooltip>\n );\n }\n\n return (\n <FlexView\n ref={studentContainerRef}\n $widthX={12.38}\n $position=\"relative\"\n $background={`${imageHue || 'ORANGE'}_2`}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.CardWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={bgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $position=\"relative\"\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n </Styled.IconWrapper>\n <CardTitle cardHeader={cardHeader} nodeType={nodeType} courseType={courseType} />\n {isInQueue && (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Not visible to student\"\n position=\"bottom\"\n zIndex={6}\n >\n <ClosedEyeIcon />\n </ArrowTooltip>\n )}\n {!!imageUrl && (\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n )}\n </Styled.CardWrapper>\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {!isMilestone && dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_4`}\n />\n )}\n <FlexView $gutterX={0.75} $gapX={1} $flexRowGapX={0.5} $background=\"WHITE\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={header}\n width={300}\n hidden={!showTitleTooltip}\n parentWidth=\"auto\"\n zIndex={6}\n >\n <FlexView $heightX={2.5}>\n <Styled.HeaderText ref={titleTextRef} $renderAs=\"ab3\">\n {header}\n </Styled.HeaderText>\n </FlexView>\n </ArrowTooltip>\n <FlexView\n $flexDirection=\"row\"\n $heightX={1.25}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Styled.SubHeaderText $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subHeader}\n </Styled.SubHeaderText>\n <FlexView $width={32} />\n </FlexView>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(HomeworkView);\n"],"names":["renderSettings","HomeworkView","header","isInQueue","nodeData","studentContainerRef","subHeader","userType","isMilestone","puzzleHWCardRef","entityType","state","score","imageUrl","mathFitCardRef","nodeType","accuracy","dueDateTs","imageHue","cardHeader","unlockedOnTs","courseType","title","isPuzzleCard","isMathFitCard","EHWCardListEntityType","isPuzzleDisabled","isMathFitDisabled","tooltipText","useMemo","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","bgImage","getNodeTypeBasedBgImage","animationRef","nodeCardLottie","getNodeCardBasedIcon","handleOnMouseEnter","useCallback","_a","handleOnMouseLeave","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.PuzzleCardWrapper","PuzzleCard","NodeCardTags","NodeProgress","MathFitCard","FlexView","Styled.CardWrapper","Styled.IconWrapper","LottieAnimation","CardTitle","ClosedEyeIcon","Styled.BannerImageWrapper","Styled.BannerImage","Styled.HeaderText","Styled.SubHeaderText","HomeworkCardView","memo"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAkBvDC,KAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,WAAWC;A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AAA,UAAA;AAAA,QACF;AAAA,QACC,CAACA,KAAeS,KAAaG,KAC5B,gBAAAyB;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAASlC,IAAY;AAAA,YACrB,YAAYG,IAAe;AAAA,YAC3B,YAAY,GAAGF,KAAY,QAAQ;AAAA,UAAA;AAAA,QACrC;AAAA,QAEF,gBAAA6B,EAACM,KAAS,UAAU,MAAM,OAAO,GAAG,cAAc,KAAK,aAAY,SACjE,UAAA;AAAA,UAAA,gBAAAR;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,aAAa5C;AAAA,cACb,OAAO;AAAA,cACP,QAAQ,CAAC4B;AAAA,cACT,aAAY;AAAA,cACZ,QAAQ;AAAA,cAER,UAAC,gBAAAe,EAAAQ,GAAA,EAAS,UAAU,KAClB,UAAC,gBAAAR,EAAAgB,IAAA,EAAkB,KAAK5B,GAAc,WAAU,OAC7C,YACH,CAAA,GACF;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAc;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,gBAAe;AAAA,cACf,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAEhB,UAAA;AAAA,gBAAA,gBAAAR,EAACiB,IAAA,EAAqB,WAAU,OAAM,QAAO,cAC1C,UACHxD,GAAA;AAAA,gBACA,gBAAAuC,EAACQ,GAAS,EAAA,QAAQ,GAAI,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACxB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeU,KAAAC,EAAK/D,EAAY;"}
1
+ {"version":3,"file":"homework-card-view.js","sources":["../../../src/features/homework/homework-card-view.tsx"],"sourcesContent":["import { memo, useCallback, useLayoutEffect, useMemo, useRef, useState, type FC } from 'react';\n\nimport ClosedEyeIcon from '../../assets/line-icons/icons/closed-eye';\nimport NodeCardTags from '../chapters-v2/comps/node-card/node-card-tags';\nimport type { INodeDataProps, TSheetStates } from '../chapters-v2/comps/node-card/node-card-types';\nimport { getNodeTypeBasedBgImage } from '../chapters-v2/utils';\nimport { getNodeCardBasedIcon } from '../chapters-v2/utils/node-card-utils';\nimport MathFitCard from '../math-fit/math-fit-card/math-fit-card';\nimport PuzzleCard from '../puzzles/comps/puzzle-card';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../ui/layout/flex-view';\nimport LottieAnimation from '../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../ui/lottie-animation/types';\nimport type { TUserTypes } from '../ui/types';\nimport CardTitle from './card-title';\nimport { EHWCardListEntityType } from './hw-card-list/hw-card-list-types';\nimport NodeProgress from './node-progress';\nimport * as Styled from './styles';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\ninterface IHomeworkCardViewProps {\n header: string;\n isInQueue?: boolean;\n nodeData: INodeDataProps;\n studentContainerRef: React.RefObject<HTMLDivElement>;\n subHeader: string;\n userType: TUserTypes;\n isMilestone?: boolean;\n puzzleHWCardRef?: React.RefObject<HTMLDivElement>;\n mathFitCardRef?: React.RefObject<HTMLDivElement>;\n entityType?: EHWCardListEntityType;\n state: TSheetStates;\n score: number | null;\n imageUrl?: string;\n}\n\nconst HomeworkView: FC<IHomeworkCardViewProps> = ({\n header,\n isInQueue,\n nodeData,\n studentContainerRef,\n subHeader,\n userType,\n isMilestone = false,\n puzzleHWCardRef,\n entityType,\n state,\n score,\n imageUrl,\n mathFitCardRef,\n}) => {\n const {\n node_type: nodeType,\n accuracy,\n due_date_ts: dueDateTs,\n image_hue: imageHue,\n card_header: cardHeader = '',\n unlocked_on_ts: unlockedOnTs,\n course_type: courseType,\n title,\n } = nodeData;\n const isPuzzleCard = nodeType === 'PUZZLE_CARD';\n const isMathFitCard = entityType === EHWCardListEntityType.MATHFIT_TEST;\n const isPuzzleDisabled = userType === 'STUDENT' && state === 'LOCKED';\n const isMathFitDisabled =\n state === 'LOCKED' || (userType === 'TEACHER' && state !== 'COMPLETED' && state !== 'EXPIRED');\n\n const tooltipText = useMemo(() => {\n if (state === 'LOCKED') {\n if (isMathFitCard) return 'Take test after class';\n\n return 'Not available to student';\n }\n\n return `You’ll be able to review the test after your student submits it`;\n }, [state, isMathFitCard]);\n\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const bgImage = getNodeTypeBasedBgImage(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, []);\n\n if (isPuzzleCard) {\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Solve puzzle after class\"\n position=\"bottom\"\n hidden={!isPuzzleDisabled}\n >\n <div ref={puzzleHWCardRef}>\n <Styled.PuzzleCardWrapper\n ref={studentContainerRef}\n $position=\"relative\"\n $background={`${imageHue}_2`}\n $disabled={isPuzzleDisabled}\n >\n <PuzzleCard\n imageHue={imageHue}\n imageUrl={imageUrl ?? ''}\n title={title}\n width={126}\n height={159}\n disabled={isPuzzleDisabled}\n />\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {!isMilestone && dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_5`}\n />\n )}\n </Styled.PuzzleCardWrapper>\n </div>\n </ArrowTooltip>\n );\n }\n\n // MathFit Assessment Card\n if (isMathFitCard) {\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={tooltipText}\n position=\"bottom\"\n widthX={13}\n hidden={!isMathFitDisabled}\n >\n <div ref={mathFitCardRef}>\n <MathFitCard\n score={score}\n dueDateTs={nodeData.due_date_ts}\n nodeType=\"DYNAMIC\"\n state={state}\n subHeader={subHeader}\n unlockedOnTs={nodeData?.unlocked_on_ts}\n userType={userType}\n isMathFitDisabled={isMathFitDisabled}\n isMilestone={isMilestone}\n studentContainerRef={studentContainerRef}\n />\n </div>\n </ArrowTooltip>\n );\n }\n\n return (\n <FlexView\n ref={studentContainerRef}\n $widthX={12.38}\n $position=\"relative\"\n $background={`${imageHue || 'ORANGE'}_2`}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.CardWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={bgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $position=\"relative\"\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n </Styled.IconWrapper>\n <CardTitle cardHeader={cardHeader} nodeType={nodeType} courseType={courseType} />\n {isInQueue && (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Not visible to student\"\n position=\"bottom\"\n zIndex={6}\n >\n <ClosedEyeIcon />\n </ArrowTooltip>\n )}\n {!!imageUrl && (\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n )}\n </Styled.CardWrapper>\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {!isMilestone && dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_4`}\n />\n )}\n <FlexView $gutterX={0.75} $gapX={1} $flexRowGapX={0.5} $background=\"WHITE\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={header}\n width={300}\n hidden={!showTitleTooltip}\n parentWidth=\"auto\"\n zIndex={6}\n >\n <FlexView $heightX={2.5}>\n <Styled.HeaderText ref={titleTextRef} $renderAs=\"ab3\">\n {header}\n </Styled.HeaderText>\n </FlexView>\n </ArrowTooltip>\n <FlexView\n $flexDirection=\"row\"\n $heightX={1.25}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Styled.SubHeaderText $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subHeader}\n </Styled.SubHeaderText>\n <FlexView $width={32} />\n </FlexView>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(HomeworkView);\n"],"names":["renderSettings","HomeworkView","header","isInQueue","nodeData","studentContainerRef","subHeader","userType","isMilestone","puzzleHWCardRef","entityType","state","score","imageUrl","mathFitCardRef","nodeType","accuracy","dueDateTs","imageHue","cardHeader","unlockedOnTs","courseType","title","isPuzzleCard","isMathFitCard","EHWCardListEntityType","isPuzzleDisabled","isMathFitDisabled","tooltipText","useMemo","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","bgImage","getNodeTypeBasedBgImage","animationRef","nodeCardLottie","getNodeCardBasedIcon","handleOnMouseEnter","useCallback","_a","handleOnMouseLeave","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.PuzzleCardWrapper","PuzzleCard","NodeCardTags","NodeProgress","MathFitCard","FlexView","Styled.CardWrapper","Styled.IconWrapper","LottieAnimation","CardTitle","ClosedEyeIcon","Styled.BannerImageWrapper","Styled.BannerImage","Styled.HeaderText","Styled.SubHeaderText","HomeworkCardView","memo"],"mappings":";;;;;;;;;;;;;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AA,gBACA,gBAAAuC,EAACQ,GAAS,EAAA,QAAQ,GAAI,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACxB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeU,KAAAC,EAAK/D,EAAY;"}
@@ -0,0 +1,5 @@
1
+ const a = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
2
+ export {
3
+ a as default
4
+ };
5
+ //# sourceMappingURL=regex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regex.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/regex.js"],"sourcesContent":["export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;"],"names":["REGEX"],"mappings":"AAAA,MAAAA,IAAe;","x_google_ignoreList":[0]}
@@ -1,7 +1,6 @@
1
- let t;
2
- const e = new Uint8Array(16);
1
+ var t, e = new Uint8Array(16);
3
2
  function o() {
4
- if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
3
+ if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !t))
5
4
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
6
5
  return t(e);
7
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA;AACJ,MAAMC,IAAQ,IAAI,WAAW,EAAE;AAChB,SAASC,IAAM;AAE5B,MAAI,CAACF,MAEHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAE3G,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA,GACAC,IAAQ,IAAI,WAAW,EAAE;AACd,SAASC,IAAM;AAE5B,MAAI,CAACF,MAGHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,KAAK,OAAO,WAAa,OAAe,OAAO,SAAS,mBAAoB,cAAc,SAAS,gBAAgB,KAAK,QAAQ,GAE3O,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
@@ -1,10 +1,14 @@
1
- const i = [];
2
- for (let n = 0; n < 256; ++n)
3
- i.push((n + 256).toString(16).slice(1));
4
- function c(n, u = 0) {
5
- return (i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]]).toLowerCase();
1
+ import s from "./validate.js";
2
+ var t = [];
3
+ for (var n = 0; n < 256; ++n)
4
+ t.push((n + 256).toString(16).substr(1));
5
+ function f(e) {
6
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, o = (t[e[i + 0]] + t[e[i + 1]] + t[e[i + 2]] + t[e[i + 3]] + "-" + t[e[i + 4]] + t[e[i + 5]] + "-" + t[e[i + 6]] + t[e[i + 7]] + "-" + t[e[i + 8]] + t[e[i + 9]] + "-" + t[e[i + 10]] + t[e[i + 11]] + t[e[i + 12]] + t[e[i + 13]] + t[e[i + 14]] + t[e[i + 15]]).toLowerCase();
7
+ if (!s(o))
8
+ throw TypeError("Stringified UUID is invalid");
9
+ return o;
6
10
  }
7
11
  export {
8
- c as unsafeStringify
12
+ f as default
9
13
  };
10
14
  //# sourceMappingURL=stringify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","unsafeStringify","arr","offset"],"mappings":"AAMA,MAAMA,IAAY,CAAA;AAElB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAG3C,SAASC,EAAgBC,GAAKC,IAAS,GAAG;AAG/C,UAAQJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,GAAG;AACvf;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","stringify","arr","offset","uuid","validate"],"mappings":";AAMA,IAAIA,IAAY,CAAA;AAEhB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;AAGnD,SAASC,EAAUC,GAAK;AACtB,MAAIC,IAAS,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAY,UAAU,CAAC,IAAI,GAG7EC,KAAQL,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,GAAG;AAMzf,MAAI,CAACE,EAASD,CAAI;AAChB,UAAM,UAAU,6BAA6B;AAG/C,SAAOA;AACT;","x_google_ignoreList":[0]}
@@ -1,20 +1,17 @@
1
- import e from "./native.js";
2
- import i from "./rng.js";
3
- import { unsafeStringify as d } from "./stringify.js";
4
- function g(n, m, t) {
5
- if (e.randomUUID && !m && !n)
6
- return e.randomUUID();
1
+ import d from "./rng.js";
2
+ import f from "./stringify.js";
3
+ function v(n, m, x) {
7
4
  n = n || {};
8
- const r = n.random || (n.rng || i)();
5
+ var r = n.random || (n.rng || d)();
9
6
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, m) {
10
- t = t || 0;
11
- for (let a = 0; a < 16; ++a)
12
- m[t + a] = r[a];
7
+ x = x || 0;
8
+ for (var a = 0; a < 16; ++a)
9
+ m[x + a] = r[a];
13
10
  return m;
14
11
  }
15
- return d(r);
12
+ return f(r);
16
13
  }
17
14
  export {
18
- g as default
15
+ v as default
19
16
  };
20
17
  //# sourceMappingURL=v4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","native","rnds","rng","i","unsafeStringify"],"mappings":";;;AAIA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,MAAIC,EAAO,cAAc,CAACF,KAAO,CAACD;AAChC,WAAOG,EAAO;AAGhB,EAAAH,IAAUA,KAAW;AACrB,QAAMI,IAAOJ,EAAQ,WAAWA,EAAQ,OAAOK;AAK/C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBH,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASI,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAL,EAAIC,IAASI,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOL;AAAA,EACR;AAED,SAAOM,EAAgBH,CAAI;AAC7B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","rnds","rng","i","stringify"],"mappings":";;AAGA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,EAAAF,IAAUA,KAAW;AACrB,MAAIG,IAAOH,EAAQ,WAAWA,EAAQ,OAAOI;AAK7C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBF,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASG,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAJ,EAAIC,IAASG,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOJ;AAAA,EACR;AAED,SAAOK,EAAUH,CAAI;AACvB;","x_google_ignoreList":[0]}
@@ -0,0 +1,8 @@
1
+ import e from "./regex.js";
2
+ function o(t) {
3
+ return typeof t == "string" && e.test(t);
4
+ }
5
+ export {
6
+ o as default
7
+ };
8
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/validate.js"],"sourcesContent":["import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;"],"names":["validate","uuid","REGEX"],"mappings":";AAEA,SAASA,EAASC,GAAM;AACtB,SAAO,OAAOA,KAAS,YAAYC,EAAM,KAAKD,CAAI;AACpD;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.5.65",
3
+ "version": "3.5.66",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,7 +0,0 @@
1
- const o = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), t = {
2
- randomUUID: o
3
- };
4
- export {
5
- t as default
6
- };
7
- //# sourceMappingURL=native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"native.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}