@cuemath/leap 2.9.5-j10 → 2.9.5-j11
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.
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +74 -59
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input/student-password/student-password.js +1 -1
- package/dist/features/auth/signup/custom-input/student-password/student-password.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +29 -28
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc-helpers.js +14 -0
- package/dist/features/ui/animated-arc/animated-arc-helpers.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js +21 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc.js +49 -0
- package/dist/features/ui/animated-arc/animated-arc.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth-page-layout-styles.js","sources":["../../../../../src/features/auth/comps/auth-page-layout/auth-page-layout-styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n min-height: 100vh;\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n overflow
|
1
|
+
{"version":3,"file":"auth-page-layout-styles.js","sources":["../../../../../src/features/auth/comps/auth-page-layout/auth-page-layout-styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n min-height: 100vh;\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n overflow: hidden;\n`;\n"],"names":["Container","styled","FlexView","ContentWrapper"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,GAI3BC,IAAiBF,EAAOC,CAAQ;AAAA;AAAA;"}
|
@@ -1,49 +1,51 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { forwardRef as v, useRef as f, useState as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import N from "../../../ui/
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { forwardRef as v, useRef as f, useState as h, useCallback as k, useImperativeHandle as E, useLayoutEffect as H } from "react";
|
3
|
+
import B from "../../../../assets/line-icons/icons/back2.js";
|
4
|
+
import j from "../../../../assets/line-icons/icons/next2.js";
|
5
|
+
import { AnimatedArc as T } from "../../../ui/animated-arc/animated-arc.js";
|
6
|
+
import g from "../../../ui/buttons/icon-button/icon-button.js";
|
7
|
+
import N from "../../../ui/layout/flex-view.js";
|
8
|
+
import z from "../../../ui/lottie-animation/lottie-animation.js";
|
9
|
+
import F from "../../../ui/separator/separator.js";
|
10
|
+
import M from "../../../ui/text/text.js";
|
11
|
+
import { Container as O, CircularStepContainer as P, ContentWrapper as V, InputContainer as X, PrevButtonWrapper as D, NextButtonWrapper as K } from "./circular-step-wrapper-styled.js";
|
12
|
+
const Y = {
|
12
13
|
autoplay: !1,
|
13
14
|
loop: !1,
|
14
15
|
renderer: "svg",
|
15
16
|
rendererSettings: {
|
16
17
|
preserveAspectRatio: "xMidYMin slice"
|
17
18
|
}
|
18
|
-
},
|
19
|
+
}, _ = v(
|
19
20
|
({
|
20
|
-
children:
|
21
|
+
children: $,
|
21
22
|
onGoBack: C,
|
22
|
-
onNext:
|
23
|
+
onNext: y,
|
23
24
|
label: i,
|
24
|
-
showNext:
|
25
|
-
showPrevious:
|
26
|
-
animation:
|
27
|
-
introFrames:
|
25
|
+
showNext: x,
|
26
|
+
showPrevious: I,
|
27
|
+
animation: n,
|
28
|
+
introFrames: A,
|
28
29
|
outroFrames: S,
|
29
|
-
isNextLoading:
|
30
|
+
isNextLoading: a,
|
31
|
+
progressAngle: c
|
30
32
|
}, w) => {
|
31
|
-
const t = f(null),
|
32
|
-
|
33
|
-
}, [
|
34
|
-
return
|
33
|
+
const t = f(null), o = f(null), [s, L] = h(), [R, l] = h(!1), W = k(() => {
|
34
|
+
n && t.current && (t.current.playSegments(A, !0), setTimeout(() => l(!0), 500));
|
35
|
+
}, [n]);
|
36
|
+
return E(w, () => ({
|
35
37
|
playOutroAndFadeOut: async () => new Promise((b) => {
|
36
|
-
var
|
37
|
-
const
|
38
|
-
var
|
39
|
-
b(), (
|
38
|
+
var d, m;
|
39
|
+
const u = () => {
|
40
|
+
var p;
|
41
|
+
b(), (p = t.current) == null || p.removeEventListener("complete", u);
|
40
42
|
};
|
41
|
-
(
|
43
|
+
(d = t.current) == null || d.playSegments(S, !0), l(!1), (m = t.current) == null || m.addEventListener("complete", u);
|
42
44
|
})
|
43
|
-
})),
|
44
|
-
|
45
|
-
}, []), /* @__PURE__ */
|
46
|
-
|
45
|
+
})), H(() => {
|
46
|
+
o.current && L(o.current.offsetHeight);
|
47
|
+
}, []), /* @__PURE__ */ r(
|
48
|
+
O,
|
47
49
|
{
|
48
50
|
$flex: 1,
|
49
51
|
$flexDirection: "column",
|
@@ -51,64 +53,77 @@ const D = {
|
|
51
53
|
$justifyContent: "center",
|
52
54
|
$width: "100%",
|
53
55
|
$height: "100%",
|
54
|
-
ref:
|
56
|
+
ref: o,
|
55
57
|
children: [
|
56
|
-
|
57
|
-
|
58
|
+
s && /* @__PURE__ */ e(
|
59
|
+
z,
|
58
60
|
{
|
59
61
|
width: 1280,
|
60
|
-
height:
|
61
|
-
src:
|
62
|
+
height: s,
|
63
|
+
src: n,
|
62
64
|
ref: t,
|
63
|
-
onRender:
|
64
|
-
settings:
|
65
|
+
onRender: W,
|
66
|
+
settings: Y
|
65
67
|
}
|
66
68
|
),
|
67
|
-
/* @__PURE__ */
|
68
|
-
|
69
|
+
/* @__PURE__ */ r(
|
70
|
+
P,
|
69
71
|
{
|
70
72
|
$width: 400,
|
71
73
|
$height: 400,
|
72
74
|
$background: "REAL_BLACK",
|
73
75
|
$alignItems: "center",
|
74
76
|
$justifyContent: "center",
|
75
|
-
children:
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
children: [
|
78
|
+
c && /* @__PURE__ */ e(
|
79
|
+
T,
|
80
|
+
{
|
81
|
+
radius: 200,
|
82
|
+
strokeWidth: 2,
|
83
|
+
color: "WHITE",
|
84
|
+
targetAngle: c,
|
85
|
+
mode: "fade",
|
86
|
+
duration: 1
|
87
|
+
}
|
88
|
+
),
|
89
|
+
/* @__PURE__ */ r(V, { $isVisible: R, $width: "100%", children: [
|
90
|
+
i ? /* @__PURE__ */ r(N, { $gutterX: 3.5, children: [
|
91
|
+
/* @__PURE__ */ e(M, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: i }),
|
92
|
+
/* @__PURE__ */ e(F, { heightX: 1 })
|
93
|
+
] }) : null,
|
94
|
+
/* @__PURE__ */ e(X, { children: $ })
|
95
|
+
] })
|
96
|
+
]
|
82
97
|
}
|
83
98
|
),
|
84
|
-
|
85
|
-
|
99
|
+
I && /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(
|
100
|
+
g,
|
86
101
|
{
|
87
|
-
Icon:
|
102
|
+
Icon: B,
|
88
103
|
renderAs: "secondary",
|
89
104
|
analyticsLabel: "Next",
|
90
105
|
onClick: C,
|
91
|
-
disabled:
|
106
|
+
disabled: a,
|
92
107
|
size: "regular"
|
93
108
|
}
|
94
109
|
) }),
|
95
|
-
|
96
|
-
|
110
|
+
x && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
|
111
|
+
g,
|
97
112
|
{
|
98
113
|
size: "regular",
|
99
|
-
Icon:
|
114
|
+
Icon: j,
|
100
115
|
renderAs: "secondary",
|
101
116
|
analyticsLabel: "Next",
|
102
|
-
onClick:
|
103
|
-
busy:
|
117
|
+
onClick: y,
|
118
|
+
busy: a
|
104
119
|
}
|
105
120
|
) })
|
106
121
|
]
|
107
122
|
}
|
108
123
|
);
|
109
124
|
}
|
110
|
-
),
|
125
|
+
), ie = _;
|
111
126
|
export {
|
112
|
-
|
127
|
+
ie as default
|
113
128
|
};
|
114
129
|
//# sourceMappingURL=circular-step-wrapper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'svg',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setTimeout(() => setShowContent(true), 500);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n setShowContent(false);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.ContentWrapper $isVisible={showContent}>\n {label ? (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n ) : null}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"regular\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"regular\"\n Icon={Next2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default CircularStepWrapper;\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","onLottieRender","useCallback","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","CircularStepWrapper$1"],"mappings":"
|
1
|
+
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport { AnimatedArc } from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'svg',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setTimeout(() => setShowContent(true), 500);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n setShowContent(false);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label ? (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n ) : null}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"regular\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"regular\"\n Icon={Next2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default CircularStepWrapper;\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","onLottieRender","useCallback","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","CircularStepWrapper$1"],"mappings":";;;;;;;;;;;AAuBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAeD,EAAuB,IAAI,GAC1C,CAACE,GAAiBC,CAAkB,IAAIC,EAA6B,GACrE,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAK,GAE9CG,IAAiBC,EAAY,MAAM;AACnC,MAAAf,KAAaM,EAAa,YACfA,EAAA,QAAQ,aAAaL,GAAa,EAAI,GACnD,WAAW,MAAMY,EAAe,EAAI,GAAG,GAAG;AAAA,IAC5C,GAEC,CAACb,CAAS,CAAC;AAEd,WAAAgB,EAAoBX,GAAK,OAAO;AAAA,MAC9B,qBAAqB,YACZ,IAAI,QAAc,CAAWY,MAAA;;AAClC,cAAMC,IAAiB,MAAM;;AACnB,UAAAD,MACKE,IAAAb,EAAA,YAAA,QAAAa,EAAS,oBAAoB,YAAYD;AAAA,QAAc;AAGzD,SAAAC,IAAAb,EAAA,YAAA,QAAAa,EAAS,aAAajB,GAAa,KAChDW,EAAe,EAAK,IACPO,IAAAd,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GAAA,EAAuB,UAAAtC,GAAS;AAAA,gBAAA,GACnC;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,UACCK,KACC,gBAAAyB,EAACS,GAAA,EACC,UAAA,gBAAAT;AAAA,YAACU;AAAA,YAAA;AAAA,cACC,MAAMC;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASxC;AAAA,cACT,UAAUQ;AAAA,cACV,MAAK;AAAA,YAAA;AAAA,UAAA,GAET;AAAA,UAEDL,KACC,gBAAA0B,EAACY,GAAA,EACC,UAAA,gBAAAZ;AAAA,YAACU;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASzC;AAAA,cACT,MAAMO;AAAA,YAAA;AAAA,UAAA,GAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEAmC,KAAe9C;"}
|
@@ -42,7 +42,7 @@ const b = ({
|
|
42
42
|
onKeyDown: m
|
43
43
|
}
|
44
44
|
),
|
45
|
-
/* @__PURE__ */ t(g, { label: "password-toggle", onClick: () => c((e) => !e), children: s ? /* @__PURE__ */ t(
|
45
|
+
/* @__PURE__ */ t(g, { label: "password-toggle", onClick: () => c((e) => !e), children: s ? /* @__PURE__ */ t(w, { color: "WHITE", width: 24, height: 24 }) : /* @__PURE__ */ t(I, { color: "WHITE", width: 24, height: 24 }) })
|
46
46
|
]
|
47
47
|
}
|
48
48
|
) });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-password.js","sources":["../../../../../../src/features/auth/signup/custom-input/student-password/student-password.tsx"],"sourcesContent":["import type { ICustomInputProps } from '../custom-input-types';\n\nimport { useCallback, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport EyeIcon from '../../../../../assets/line-icons/icons/eye';\nimport StrikedEyeIcon from '../../../../../assets/line-icons/icons/striked-eye';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from '../custom-input-styled';\nimport { InputWrapper } from '../input-wrapper/input-wrapper';\n\nconst StudentPasswordInput: FC<ICustomInputProps> = ({\n onEnter,\n value,\n onChange,\n error,\n helperText,\n}) => {\n const theme = useTheme();\n const [isVisible, setIsVisible] = useState(false);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n return (\n <InputWrapper helperText={error || helperText}>\n <Styled.PasswordInputWrapper\n $width={220}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n autoFocus\n placeholder=\"password\"\n align=\"left\"\n color={theme.colors?.[error ? 'RED' : 'WHITE']}\n autoCapitalize=\"none\"\n type={isVisible ? 'text' : 'password'}\n onKeyDown={handleKeyDown}\n />\n <Clickable label=\"password-toggle\" onClick={() => setIsVisible(prev => !prev)}>\n {isVisible ? (\n <StrikedEyeIcon color=\"WHITE\" width={24} height={24} />\n ) : (\n <EyeIcon color=\"WHITE\" width={24} height={24} />\n )}\n </Clickable>\n </Styled.PasswordInputWrapper>\n </InputWrapper>\n );\n};\n\nexport default StudentPasswordInput;\n"],"names":["StudentPasswordInput","onEnter","value","onChange","error","helperText","theme","useTheme","isVisible","setIsVisible","useState","handleKeyDown","useCallback","event","jsx","InputWrapper","jsxs","Styled.PasswordInputWrapper","Styled.CustomInput","_a","Clickable","prev","
|
1
|
+
{"version":3,"file":"student-password.js","sources":["../../../../../../src/features/auth/signup/custom-input/student-password/student-password.tsx"],"sourcesContent":["import type { ICustomInputProps } from '../custom-input-types';\n\nimport { useCallback, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport EyeIcon from '../../../../../assets/line-icons/icons/eye';\nimport StrikedEyeIcon from '../../../../../assets/line-icons/icons/striked-eye';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from '../custom-input-styled';\nimport { InputWrapper } from '../input-wrapper/input-wrapper';\n\nconst StudentPasswordInput: FC<ICustomInputProps> = ({\n onEnter,\n value,\n onChange,\n error,\n helperText,\n}) => {\n const theme = useTheme();\n const [isVisible, setIsVisible] = useState(false);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n return (\n <InputWrapper helperText={error || helperText}>\n <Styled.PasswordInputWrapper\n $width={220}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n autoFocus\n placeholder=\"password\"\n align=\"left\"\n color={theme.colors?.[error ? 'RED' : 'WHITE']}\n autoCapitalize=\"none\"\n type={isVisible ? 'text' : 'password'}\n onKeyDown={handleKeyDown}\n />\n <Clickable label=\"password-toggle\" onClick={() => setIsVisible(prev => !prev)}>\n {!isVisible ? (\n <StrikedEyeIcon color=\"WHITE\" width={24} height={24} />\n ) : (\n <EyeIcon color=\"WHITE\" width={24} height={24} />\n )}\n </Clickable>\n </Styled.PasswordInputWrapper>\n </InputWrapper>\n );\n};\n\nexport default StudentPasswordInput;\n"],"names":["StudentPasswordInput","onEnter","value","onChange","error","helperText","theme","useTheme","isVisible","setIsVisible","useState","handleKeyDown","useCallback","event","jsx","InputWrapper","jsxs","Styled.PasswordInputWrapper","Styled.CustomInput","_a","Clickable","prev","EyeIcon","StrikedEyeIcon","StudentPasswordInput$1"],"mappings":";;;;;;;;AAWA,MAAMA,IAA8C,CAAC;AAAA,EACnD,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AACF,MAAM;;AACJ,QAAMC,IAAQC,KACR,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAE1CC,IAAgBC;AAAA,IACpB,CAACC,MAA2C;AACtC,MAAAA,EAAM,QAAQ,YACNZ,KAAA,QAAAA;AAAA,IAEd;AAAA,IACA,CAACA,CAAO;AAAA,EAAA;AAGV,SACG,gBAAAa,EAAAC,GAAA,EAAa,YAAYX,KAASC,GACjC,UAAA,gBAAAW;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR,aAAY;AAAA,MACZ,gBAAe;AAAA,MACf,WAAW;AAAA,MAEX,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACI;AAAAA,UAAA;AAAA,YACC,OAAAhB;AAAA,YACA,UAAU,CAAAW,MAASV,EAASU,EAAM,OAAO,KAAK;AAAA,YAC9C,WAAS;AAAA,YACT,aAAY;AAAA,YACZ,OAAM;AAAA,YACN,QAAOM,IAAAb,EAAM,WAAN,gBAAAa,EAAef,IAAQ,QAAQ;AAAA,YACtC,gBAAe;AAAA,YACf,MAAMI,IAAY,SAAS;AAAA,YAC3B,WAAWG;AAAA,UAAA;AAAA,QACb;AAAA,QACC,gBAAAG,EAAAM,GAAA,EAAU,OAAM,mBAAkB,SAAS,MAAMX,EAAa,CAAAY,MAAQ,CAACA,CAAI,GACzE,UAACb,IAGA,gBAAAM,EAACQ,GAAQ,EAAA,OAAM,SAAQ,OAAO,IAAI,QAAQ,GAAI,CAAA,IAF7C,gBAAAR,EAAAS,GAAA,EAAe,OAAM,SAAQ,OAAO,IAAI,QAAQ,GAAI,CAAA,GAIzD;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAC,IAAexB;"}
|
@@ -15,31 +15,31 @@ import { DigitalMeter as z, ContentContainer as J, NumberCountContainer as Q, Ra
|
|
15
15
|
const sr = w(
|
16
16
|
({
|
17
17
|
show: I,
|
18
|
-
value:
|
19
|
-
maxValue:
|
20
|
-
targetValue:
|
18
|
+
value: a,
|
19
|
+
maxValue: o,
|
20
|
+
targetValue: t = 0,
|
21
21
|
displayText: O,
|
22
22
|
progressType: s,
|
23
23
|
helperTextPrimary: F,
|
24
24
|
helperTextSecondary: W,
|
25
25
|
onComplete: S,
|
26
|
-
actAsTimer:
|
26
|
+
actAsTimer: T
|
27
27
|
}) => {
|
28
28
|
const [A, y] = Y(!1), { play: E } = j(), _ = B(
|
29
|
-
(i) =>
|
30
|
-
[
|
29
|
+
(i) => t ? T ? i <= t : i >= t : !1,
|
30
|
+
[t, T]
|
31
31
|
);
|
32
32
|
return K(() => {
|
33
33
|
let i, e;
|
34
|
-
const l = _(
|
35
|
-
return I && (E(
|
36
|
-
E(
|
34
|
+
const l = _(a);
|
35
|
+
return I && (E(T ? m.TIME_INTRO : m.ACCURACY_INTRO), E(m.METER_FILL), l && (i = setTimeout(() => {
|
36
|
+
E(T ? m.TIME_TARGET : m.ACCURACY_TARGET), y(!0);
|
37
37
|
}, D * 1e3)), e = setTimeout(() => {
|
38
38
|
S();
|
39
39
|
}, (l ? q : D) * 1e3)), () => {
|
40
40
|
i && clearTimeout(i), e && clearTimeout(e);
|
41
41
|
};
|
42
|
-
}, [I,
|
42
|
+
}, [I, a, S, _, T, E]), I ? /* @__PURE__ */ n(z, { $isTargetAchieved: A, children: [
|
43
43
|
/* @__PURE__ */ r(
|
44
44
|
g,
|
45
45
|
{
|
@@ -47,7 +47,8 @@ const sr = w(
|
|
47
47
|
strokeWidth: C,
|
48
48
|
color: "BLACK_5",
|
49
49
|
radius: p,
|
50
|
-
duration: 0
|
50
|
+
duration: 0,
|
51
|
+
startAngle: -150
|
51
52
|
}
|
52
53
|
),
|
53
54
|
/* @__PURE__ */ r(J, { children: /* @__PURE__ */ n(R, { $flexDirection: "column", $alignItems: "center", children: [
|
@@ -62,7 +63,7 @@ const sr = w(
|
|
62
63
|
X,
|
63
64
|
{
|
64
65
|
initialValue: 0,
|
65
|
-
targetValue: Math.floor(
|
66
|
+
targetValue: Math.floor(a),
|
66
67
|
durationInSec: f,
|
67
68
|
delayInSec: L
|
68
69
|
}
|
@@ -76,7 +77,7 @@ const sr = w(
|
|
76
77
|
$color: "WHITE",
|
77
78
|
children: [
|
78
79
|
"/",
|
79
|
-
|
80
|
+
o
|
80
81
|
]
|
81
82
|
}
|
82
83
|
)
|
@@ -91,8 +92,8 @@ const sr = w(
|
|
91
92
|
}
|
92
93
|
)
|
93
94
|
] }) }),
|
94
|
-
s === "stepper" && Array.from({ length:
|
95
|
-
const l = h /
|
95
|
+
s === "stepper" && Array.from({ length: a }, (i, e) => {
|
96
|
+
const l = h / o;
|
96
97
|
return /* @__PURE__ */ r(
|
97
98
|
g,
|
98
99
|
{
|
@@ -102,23 +103,23 @@ const sr = w(
|
|
102
103
|
color: "GREEN_4",
|
103
104
|
radius: p,
|
104
105
|
mode: "fade",
|
105
|
-
duration: f /
|
106
|
-
delay: L + f /
|
106
|
+
duration: f / o,
|
107
|
+
delay: L + f / o * e,
|
107
108
|
playRainbowColors: A
|
108
109
|
},
|
109
110
|
e
|
110
111
|
);
|
111
112
|
}),
|
112
|
-
s === "stepper" && Array.from({ length:
|
113
|
-
const l = h /
|
113
|
+
s === "stepper" && Array.from({ length: o + 1 }, (i, e) => {
|
114
|
+
const l = h / o;
|
114
115
|
return /* @__PURE__ */ n(U.Fragment, { children: [
|
115
116
|
/* @__PURE__ */ r(G, { $angle: l * e }),
|
116
117
|
/* @__PURE__ */ r(H, { $angle: l * e, children: /* @__PURE__ */ r(M, { $angle: l * e, children: /* @__PURE__ */ r(
|
117
118
|
b,
|
118
119
|
{
|
119
120
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
120
|
-
$color:
|
121
|
-
$isTargetAchieved:
|
121
|
+
$color: t && t === e ? "GREEN_4" : "WHITE_T_60",
|
122
|
+
$isTargetAchieved: t === e && _(e) && A,
|
122
123
|
children: e
|
123
124
|
}
|
124
125
|
) }) }, e)
|
@@ -128,7 +129,7 @@ const sr = w(
|
|
128
129
|
/* @__PURE__ */ r(
|
129
130
|
g,
|
130
131
|
{
|
131
|
-
targetAngle:
|
132
|
+
targetAngle: a * h / o,
|
132
133
|
strokeWidth: C,
|
133
134
|
color: "GREEN_4",
|
134
135
|
radius: p,
|
@@ -138,17 +139,17 @@ const sr = w(
|
|
138
139
|
}
|
139
140
|
),
|
140
141
|
/* @__PURE__ */ n(k, { children: [
|
141
|
-
|
142
|
-
Array.from(/* @__PURE__ */ new Set([0,
|
142
|
+
t && /* @__PURE__ */ r(G, { $angle: t * h / o }),
|
143
|
+
Array.from(/* @__PURE__ */ new Set([0, t, o])).map((i, e) => /* @__PURE__ */ r(
|
143
144
|
H,
|
144
145
|
{
|
145
|
-
$angle: i * h /
|
146
|
-
children: /* @__PURE__ */ r(M, { $angle: i * h /
|
146
|
+
$angle: i * h / o,
|
147
|
+
children: /* @__PURE__ */ r(M, { $angle: i * h / o, children: /* @__PURE__ */ r(
|
147
148
|
b,
|
148
149
|
{
|
149
150
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
150
|
-
$color:
|
151
|
-
$isTargetAchieved:
|
151
|
+
$color: t && t === i ? "GREEN_4" : "WHITE_T_60",
|
152
|
+
$isTargetAchieved: t === i && A && _(i),
|
152
153
|
children: i
|
153
154
|
}
|
154
155
|
) })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"digital-meter.js","sources":["../../../../src/features/post-game-stats/digital-meter/digital-meter.tsx"],"sourcesContent":["import type { IDigitalMeterProps } from './digital-meter-types';\nimport type { FC } from 'react';\n\nimport React, { memo, useCallback, useEffect, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {\n GAME_LAUNCHER_SIZE,\n GAME_LAUNCHER_SIZE_LARGE,\n} from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { NumberCountAnimation } from '../number-count-animation/number-count-animation';\nimport { AnimatedArc } from './comp/animated-arc/animated-arc';\nimport {\n ARC_RADIUS,\n PROGRESS_FILL_DELAY,\n PROGRESS_FILL_DURATION,\n STROKE_WIDTH,\n TARGET_ACHIEVED_DELAY,\n TOTAL_ANIMATION_DURATION,\n TOTAL_ARC_AVAILABLE,\n} from './constants';\nimport * as Styled from './digital-meter-styled';\n\nexport const DigitalMeter: FC<IDigitalMeterProps> = memo(\n ({\n show,\n value,\n maxValue,\n targetValue = 0,\n displayText,\n progressType,\n helperTextPrimary,\n helperTextSecondary,\n onComplete,\n actAsTimer,\n }) => {\n const [isTargetAchieved, setIsTargetAchieved] = useState(false);\n const { play } = useCircleSounds();\n\n const isTargetValueAchieved = useCallback(\n (valueToCompare: number) => {\n if (targetValue) {\n if (actAsTimer) {\n return valueToCompare <= targetValue;\n }\n\n return valueToCompare >= targetValue;\n }\n\n return false;\n },\n [targetValue, actAsTimer],\n );\n\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout>;\n let timerForAnimationComplete: ReturnType<typeof setTimeout>;\n const isTargetAchievedFlag = isTargetValueAchieved(value);\n\n if (show) {\n play(actAsTimer ? CircleSoundKey.TIME_INTRO : CircleSoundKey.ACCURACY_INTRO);\n play(CircleSoundKey.METER_FILL);\n if (isTargetAchievedFlag) {\n timer = setTimeout(() => {\n play(actAsTimer ? CircleSoundKey.TIME_TARGET : CircleSoundKey.ACCURACY_TARGET);\n setIsTargetAchieved(true);\n }, TARGET_ACHIEVED_DELAY * 1000);\n }\n\n const timeToFinishAnimation = isTargetAchievedFlag\n ? TOTAL_ANIMATION_DURATION\n : TARGET_ACHIEVED_DELAY;\n\n timerForAnimationComplete = setTimeout(() => {\n onComplete();\n }, timeToFinishAnimation * 1000);\n }\n\n return () => {\n timer && clearTimeout(timer);\n timerForAnimationComplete && clearTimeout(timerForAnimationComplete);\n };\n }, [show, value, onComplete, isTargetValueAchieved, actAsTimer, play]);\n\n if (!show) return null;\n\n return (\n <Styled.DigitalMeter $isTargetAchieved={isTargetAchieved}>\n {/* complete arc area to be filled */}\n <AnimatedArc\n targetAngle={TOTAL_ARC_AVAILABLE}\n strokeWidth={STROKE_WIDTH}\n color=\"BLACK_5\"\n radius={ARC_RADIUS}\n duration={0}\n />\n\n {/* center area for the content */}\n <Styled.ContentContainer>\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Styled.NumberCountContainer>\n <Styled.RainboxColorText\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah1' : 'ah2'}\n $color=\"GREEN_4\"\n $isTargetAchieved={isTargetAchieved}\n >\n <NumberCountAnimation\n initialValue={0}\n targetValue={Math.floor(value)}\n durationInSec={PROGRESS_FILL_DURATION}\n delayInSec={PROGRESS_FILL_DELAY}\n />\n </Styled.RainboxColorText>\n </Styled.NumberCountContainer>\n {progressType === 'stepper' && (\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n /{maxValue}\n </Text>\n )}\n </FlexView>\n <Separator height={8} />\n <Text\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {displayText}\n </Text>\n </FlexView>\n </Styled.ContentContainer>\n\n {/* stepper animation */}\n {progressType === 'stepper' &&\n Array.from({ length: value }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <AnimatedArc\n key={index}\n startAngle={arcLength * index}\n targetAngle={arcLength}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n mode=\"fade\"\n duration={PROGRESS_FILL_DURATION / maxValue}\n delay={PROGRESS_FILL_DELAY + (PROGRESS_FILL_DURATION / maxValue) * index}\n playRainbowColors={isTargetAchieved}\n />\n );\n })}\n\n {/* numbers with markings */}\n {progressType === 'stepper' &&\n Array.from({ length: maxValue + 1 }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <React.Fragment key={index}>\n <Styled.LineMarking $angle={arcLength * index} />\n <Styled.MarkingContainer key={index} $angle={arcLength * index}>\n <Styled.MarkingText $angle={arcLength * index}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === index ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === index && isTargetValueAchieved(index) && isTargetAchieved\n }\n >\n {index}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n </React.Fragment>\n );\n })}\n\n {/* progress of linear */}\n {progressType === 'linear' && (\n <>\n <AnimatedArc\n targetAngle={(value * TOTAL_ARC_AVAILABLE) / maxValue}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n duration={PROGRESS_FILL_DURATION}\n delay={PROGRESS_FILL_DELAY}\n playRainbowColors={isTargetAchieved}\n />\n <>\n {/* target line marking */}\n {targetValue && (\n <Styled.LineMarking $angle={(targetValue * TOTAL_ARC_AVAILABLE) / maxValue} />\n )}\n\n {/* all markings */}\n {Array.from(new Set([0, targetValue, maxValue])).map((val, index) => (\n <Styled.MarkingContainer\n key={index}\n $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}\n >\n <Styled.MarkingText $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === val ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === val && isTargetAchieved && isTargetValueAchieved(val)\n }\n >\n {val}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n ))}\n </>\n </>\n )}\n\n {/* helper text below the animation */}\n {isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <LottieAnimation src={LOTTIE.TARGET_ACHIEVED_TEXT} />\n </Styled.BottomAbsoluteView>\n )}\n {!isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <Separator height={25} />\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <Styled.HelperTextPrimary\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {helperTextPrimary}\n <Separator height={GAME_LAUNCHER_SIZE * 0.03} />\n </Styled.HelperTextPrimary>\n <Styled.HelperTextSecondary\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n {helperTextSecondary}\n </Styled.HelperTextSecondary>\n </FlexView>\n </Styled.BottomAbsoluteView>\n )}\n </Styled.DigitalMeter>\n );\n },\n);\n"],"names":["DigitalMeter","memo","show","value","maxValue","targetValue","displayText","progressType","helperTextPrimary","helperTextSecondary","onComplete","actAsTimer","isTargetAchieved","setIsTargetAchieved","useState","play","useCircleSounds","isTargetValueAchieved","useCallback","valueToCompare","useEffect","timer","timerForAnimationComplete","isTargetAchievedFlag","CircleSoundKey","TARGET_ACHIEVED_DELAY","TOTAL_ANIMATION_DURATION","jsxs","Styled.DigitalMeter","jsx","AnimatedArc","TOTAL_ARC_AVAILABLE","STROKE_WIDTH","ARC_RADIUS","Styled.ContentContainer","FlexView","Styled.NumberCountContainer","Styled.RainboxColorText","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","NumberCountAnimation","PROGRESS_FILL_DURATION","PROGRESS_FILL_DELAY","Text","Separator","_","index","arcLength","React","Styled.LineMarking","Styled.MarkingContainer","Styled.MarkingText","Fragment","val","Styled.BottomAbsoluteView","LottieAnimation","LOTTIE","Styled.HelperTextPrimary","Styled.HelperTextSecondary"],"mappings":";;;;;;;;;;;;;;AA6BO,MAAMA,KAAuCC;AAAA,EAClD,CAAC;AAAA,IACC,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,MACI;AACJ,UAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxD,EAAE,MAAAC,MAASC,KAEXC,IAAwBC;AAAA,MAC5B,CAACC,MACKd,IACEM,IACKQ,KAAkBd,IAGpBc,KAAkBd,IAGpB;AAAA,MAET,CAACA,GAAaM,CAAU;AAAA,IAAA;AAiCtB,WA9BJS,EAAU,MAAM;AACV,UAAAC,GACAC;AACE,YAAAC,IAAuBN,EAAsBd,CAAK;AAExD,aAAID,MACFa,EAAKJ,IAAaa,EAAe,aAAaA,EAAe,cAAc,GAC3ET,EAAKS,EAAe,UAAU,GAC1BD,MACFF,IAAQ,WAAW,MAAM;AACvB,QAAAN,EAAKJ,IAAaa,EAAe,cAAcA,EAAe,eAAe,GAC7EX,EAAoB,EAAI;AAAA,MAAA,GACvBY,IAAwB,GAAI,IAOjCH,IAA4B,WAAW,MAAM;AAChC,QAAAZ;MAAA,IALiBa,IAC1BG,IACAD,KAIuB,GAAI,IAG1B,MAAM;AACX,QAAAJ,KAAS,aAAaA,CAAK,GAC3BC,KAA6B,aAAaA,CAAyB;AAAA,MAAA;AAAA,IACrE,GACC,CAACpB,GAAMC,GAAOO,GAAYO,GAAuBN,GAAYI,CAAI,CAAC,GAEhEb,IAGF,gBAAAyB,EAAAC,GAAA,EAAo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BC,IAA2B,cAAc;AAAA,cAElE,QAAO;AAAA,cAEN,UAAA;AAAA,gBAAA/B;AAAA,gBACA,gBAAAqB,EAAAe,GAAA,EAAU,QAAQN,IAAqB,KAAM,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAChD;AAAA,UACA,gBAAAT;AAAA,YAAC6B;AAAAA,YAAA;AAAA,cACC,WAAWpB,MAAuBC,IAA2B,QAAQ;AAAA,cACrE,QAAO;AAAA,cAEN,UAAA9B;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAEJ,EAAA,CAAA,IA3KgB;AAAA,EA6KpB;AACF;"}
|
1
|
+
{"version":3,"file":"digital-meter.js","sources":["../../../../src/features/post-game-stats/digital-meter/digital-meter.tsx"],"sourcesContent":["import type { IDigitalMeterProps } from './digital-meter-types';\nimport type { FC } from 'react';\n\nimport React, { memo, useCallback, useEffect, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {\n GAME_LAUNCHER_SIZE,\n GAME_LAUNCHER_SIZE_LARGE,\n} from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { NumberCountAnimation } from '../number-count-animation/number-count-animation';\nimport { AnimatedArc } from './comp/animated-arc/animated-arc';\nimport {\n ARC_RADIUS,\n PROGRESS_FILL_DELAY,\n PROGRESS_FILL_DURATION,\n STROKE_WIDTH,\n TARGET_ACHIEVED_DELAY,\n TOTAL_ANIMATION_DURATION,\n TOTAL_ARC_AVAILABLE,\n} from './constants';\nimport * as Styled from './digital-meter-styled';\n\nexport const DigitalMeter: FC<IDigitalMeterProps> = memo(\n ({\n show,\n value,\n maxValue,\n targetValue = 0,\n displayText,\n progressType,\n helperTextPrimary,\n helperTextSecondary,\n onComplete,\n actAsTimer,\n }) => {\n const [isTargetAchieved, setIsTargetAchieved] = useState(false);\n const { play } = useCircleSounds();\n\n const isTargetValueAchieved = useCallback(\n (valueToCompare: number) => {\n if (targetValue) {\n if (actAsTimer) {\n return valueToCompare <= targetValue;\n }\n\n return valueToCompare >= targetValue;\n }\n\n return false;\n },\n [targetValue, actAsTimer],\n );\n\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout>;\n let timerForAnimationComplete: ReturnType<typeof setTimeout>;\n const isTargetAchievedFlag = isTargetValueAchieved(value);\n\n if (show) {\n play(actAsTimer ? CircleSoundKey.TIME_INTRO : CircleSoundKey.ACCURACY_INTRO);\n play(CircleSoundKey.METER_FILL);\n if (isTargetAchievedFlag) {\n timer = setTimeout(() => {\n play(actAsTimer ? CircleSoundKey.TIME_TARGET : CircleSoundKey.ACCURACY_TARGET);\n setIsTargetAchieved(true);\n }, TARGET_ACHIEVED_DELAY * 1000);\n }\n\n const timeToFinishAnimation = isTargetAchievedFlag\n ? TOTAL_ANIMATION_DURATION\n : TARGET_ACHIEVED_DELAY;\n\n timerForAnimationComplete = setTimeout(() => {\n onComplete();\n }, timeToFinishAnimation * 1000);\n }\n\n return () => {\n timer && clearTimeout(timer);\n timerForAnimationComplete && clearTimeout(timerForAnimationComplete);\n };\n }, [show, value, onComplete, isTargetValueAchieved, actAsTimer, play]);\n\n if (!show) return null;\n\n return (\n <Styled.DigitalMeter $isTargetAchieved={isTargetAchieved}>\n {/* complete arc area to be filled */}\n <AnimatedArc\n targetAngle={TOTAL_ARC_AVAILABLE}\n strokeWidth={STROKE_WIDTH}\n color=\"BLACK_5\"\n radius={ARC_RADIUS}\n duration={0}\n startAngle={-150}\n />\n\n {/* center area for the content */}\n <Styled.ContentContainer>\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Styled.NumberCountContainer>\n <Styled.RainboxColorText\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah1' : 'ah2'}\n $color=\"GREEN_4\"\n $isTargetAchieved={isTargetAchieved}\n >\n <NumberCountAnimation\n initialValue={0}\n targetValue={Math.floor(value)}\n durationInSec={PROGRESS_FILL_DURATION}\n delayInSec={PROGRESS_FILL_DELAY}\n />\n </Styled.RainboxColorText>\n </Styled.NumberCountContainer>\n {progressType === 'stepper' && (\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n /{maxValue}\n </Text>\n )}\n </FlexView>\n <Separator height={8} />\n <Text\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {displayText}\n </Text>\n </FlexView>\n </Styled.ContentContainer>\n\n {/* stepper animation */}\n {progressType === 'stepper' &&\n Array.from({ length: value }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <AnimatedArc\n key={index}\n startAngle={arcLength * index}\n targetAngle={arcLength}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n mode=\"fade\"\n duration={PROGRESS_FILL_DURATION / maxValue}\n delay={PROGRESS_FILL_DELAY + (PROGRESS_FILL_DURATION / maxValue) * index}\n playRainbowColors={isTargetAchieved}\n />\n );\n })}\n\n {/* numbers with markings */}\n {progressType === 'stepper' &&\n Array.from({ length: maxValue + 1 }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <React.Fragment key={index}>\n <Styled.LineMarking $angle={arcLength * index} />\n <Styled.MarkingContainer key={index} $angle={arcLength * index}>\n <Styled.MarkingText $angle={arcLength * index}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === index ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === index && isTargetValueAchieved(index) && isTargetAchieved\n }\n >\n {index}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n </React.Fragment>\n );\n })}\n\n {/* progress of linear */}\n {progressType === 'linear' && (\n <>\n <AnimatedArc\n targetAngle={(value * TOTAL_ARC_AVAILABLE) / maxValue}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n duration={PROGRESS_FILL_DURATION}\n delay={PROGRESS_FILL_DELAY}\n playRainbowColors={isTargetAchieved}\n />\n <>\n {/* target line marking */}\n {targetValue && (\n <Styled.LineMarking $angle={(targetValue * TOTAL_ARC_AVAILABLE) / maxValue} />\n )}\n\n {/* all markings */}\n {Array.from(new Set([0, targetValue, maxValue])).map((val, index) => (\n <Styled.MarkingContainer\n key={index}\n $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}\n >\n <Styled.MarkingText $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === val ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === val && isTargetAchieved && isTargetValueAchieved(val)\n }\n >\n {val}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n ))}\n </>\n </>\n )}\n\n {/* helper text below the animation */}\n {isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <LottieAnimation src={LOTTIE.TARGET_ACHIEVED_TEXT} />\n </Styled.BottomAbsoluteView>\n )}\n {!isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <Separator height={25} />\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <Styled.HelperTextPrimary\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {helperTextPrimary}\n <Separator height={GAME_LAUNCHER_SIZE * 0.03} />\n </Styled.HelperTextPrimary>\n <Styled.HelperTextSecondary\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n {helperTextSecondary}\n </Styled.HelperTextSecondary>\n </FlexView>\n </Styled.BottomAbsoluteView>\n )}\n </Styled.DigitalMeter>\n );\n },\n);\n"],"names":["DigitalMeter","memo","show","value","maxValue","targetValue","displayText","progressType","helperTextPrimary","helperTextSecondary","onComplete","actAsTimer","isTargetAchieved","setIsTargetAchieved","useState","play","useCircleSounds","isTargetValueAchieved","useCallback","valueToCompare","useEffect","timer","timerForAnimationComplete","isTargetAchievedFlag","CircleSoundKey","TARGET_ACHIEVED_DELAY","TOTAL_ANIMATION_DURATION","jsxs","Styled.DigitalMeter","jsx","AnimatedArc","TOTAL_ARC_AVAILABLE","STROKE_WIDTH","ARC_RADIUS","Styled.ContentContainer","FlexView","Styled.NumberCountContainer","Styled.RainboxColorText","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","NumberCountAnimation","PROGRESS_FILL_DURATION","PROGRESS_FILL_DELAY","Text","Separator","_","index","arcLength","React","Styled.LineMarking","Styled.MarkingContainer","Styled.MarkingText","Fragment","val","Styled.BottomAbsoluteView","LottieAnimation","LOTTIE","Styled.HelperTextPrimary","Styled.HelperTextSecondary"],"mappings":";;;;;;;;;;;;;;AA6BO,MAAMA,KAAuCC;AAAA,EAClD,CAAC;AAAA,IACC,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AA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EN,UAAA9B;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAEJ,EAAA,CAAA,IA5KgB;AAAA,EA8KpB;AACF;"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
const r = (o, a, t, s) => {
|
2
|
+
const n = (s - 90) * (Math.PI / 180);
|
3
|
+
return {
|
4
|
+
x: o + t * Math.cos(n),
|
5
|
+
y: a + t * Math.sin(n)
|
6
|
+
};
|
7
|
+
}, M = (o, a, t, s, n) => {
|
8
|
+
const $ = s + n, c = r(o, a, t, s), e = r(o, a, t, $), d = n > 180 ? 1 : 0;
|
9
|
+
return `M ${c.x} ${c.y} A ${t} ${t} 0 ${d} 1 ${e.x} ${e.y}`;
|
10
|
+
};
|
11
|
+
export {
|
12
|
+
M as describeArc
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=animated-arc-helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-helpers.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-helpers.ts"],"sourcesContent":["const polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {\n const angleRad = (angleDeg - 90) * (Math.PI / 180);\n\n return {\n x: cx + r * Math.cos(angleRad),\n y: cy + r * Math.sin(angleRad),\n };\n};\n\nexport const describeArc = (\n cx: number,\n cy: number,\n r: number,\n startAngle: number,\n sweepAngle: number,\n) => {\n const endAngle = startAngle + sweepAngle;\n const start = polarToCartesian(cx, cy, r, startAngle);\n const end = polarToCartesian(cx, cy, r, endAngle);\n const largeArcFlag = sweepAngle > 180 ? 1 : 0;\n\n return `M ${start.x} ${start.y} A ${r} ${r} 0 ${largeArcFlag} 1 ${end.x} ${end.y}`;\n};\n"],"names":["polarToCartesian","cx","cy","r","angleDeg","angleRad","describeArc","startAngle","sweepAngle","endAngle","start","end","largeArcFlag"],"mappings":"AAAA,MAAMA,IAAmB,CAACC,GAAYC,GAAYC,GAAWC,MAAqB;AAChF,QAAMC,KAAYD,IAAW,OAAO,KAAK,KAAK;AAEvC,SAAA;AAAA,IACL,GAAGH,IAAKE,IAAI,KAAK,IAAIE,CAAQ;AAAA,IAC7B,GAAGH,IAAKC,IAAI,KAAK,IAAIE,CAAQ;AAAA,EAAA;AAEjC,GAEaC,IAAc,CACzBL,GACAC,GACAC,GACAI,GACAC,MACG;AACH,QAAMC,IAAWF,IAAaC,GACxBE,IAAQV,EAAiBC,GAAIC,GAAIC,GAAGI,CAAU,GAC9CI,IAAMX,EAAiBC,GAAIC,GAAIC,GAAGM,CAAQ,GAC1CG,IAAeJ,IAAa,MAAM,IAAI;AAE5C,SAAO,KAAKE,EAAM,CAAC,IAAIA,EAAM,CAAC,MAAMP,CAAC,IAAIA,CAAC,MAAMS,CAAY,MAAMD,EAAI,CAAC,IAAIA,EAAI,CAAC;AAClF;"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import s, { css as t } from "styled-components";
|
2
|
+
const n = s.svg`
|
3
|
+
position: absolute;
|
4
|
+
z-index: 1;
|
5
|
+
pointer-events: none;
|
6
|
+
`, c = s.path`
|
7
|
+
stroke: ${({ theme: e, stroke: o }) => e.colors[o]};
|
8
|
+
${({ $animationConfig: e }) => e ? t`
|
9
|
+
animation: ${e.keyframes} ${e.duration ?? 2}s
|
10
|
+
${e.timingFunction ?? "ease"}
|
11
|
+
${e.iterationCount ?? "infinite"}
|
12
|
+
${e.fillMode ?? "forwards"};
|
13
|
+
` : t`
|
14
|
+
animation: none;
|
15
|
+
`}
|
16
|
+
`;
|
17
|
+
export {
|
18
|
+
c as Path,
|
19
|
+
n as Svg
|
20
|
+
};
|
21
|
+
//# sourceMappingURL=animated-arc-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-styled.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\nimport type { TAnimationConfig } from './animated-arc-types';\n\nimport styled, { css } from 'styled-components';\n\nexport const Svg = styled.svg`\n position: absolute;\n z-index: 1;\n pointer-events: none;\n`;\n\nexport const Path = styled.path<{\n stroke: TColorNames;\n $animationConfig?: TAnimationConfig;\n}>`\n stroke: ${({ theme, stroke }) => theme.colors[stroke]};\n ${({ $animationConfig }) =>\n $animationConfig\n ? css`\n animation: ${$animationConfig.keyframes} ${$animationConfig.duration ?? 2}s\n ${$animationConfig.timingFunction ?? 'ease'}\n ${$animationConfig.iterationCount ?? 'infinite'}\n ${$animationConfig.fillMode ?? 'forwards'};\n `\n : css`\n animation: none;\n `}\n`;\n"],"names":["Svg","styled","Path","theme","stroke","$animationConfig","css"],"mappings":";AAKO,MAAMA,IAAMC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAOD,EAAO;AAAA,YAIf,CAAC,EAAE,OAAAE,GAAO,QAAAC,EAAA,MAAaD,EAAM,OAAOC,CAAM,CAAC;AAAA,IACnD,CAAC,EAAE,kBAAAC,QACHA,IACIC;AAAA,uBACeD,EAAiB,SAAS,IAAIA,EAAiB,YAAY,CAAC;AAAA,cACrEA,EAAiB,kBAAkB,MAAM;AAAA,cACzCA,EAAiB,kBAAkB,UAAU;AAAA,cAC7CA,EAAiB,YAAY,UAAU;AAAA,YAE7CC;AAAA;AAAA,SAEC;AAAA;"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
2
|
+
import { useRef as u, useMemo as g, useLayoutEffect as k } from "react";
|
3
|
+
import { describeArc as R } from "./animated-arc-helpers.js";
|
4
|
+
import { Svg as w, Path as x } from "./animated-arc-styled.js";
|
5
|
+
const L = ({
|
6
|
+
radius: e,
|
7
|
+
strokeWidth: i,
|
8
|
+
color: y,
|
9
|
+
targetAngle: a,
|
10
|
+
startAngle: c = 0,
|
11
|
+
duration: o = 2,
|
12
|
+
mode: n = "draw",
|
13
|
+
delay: s = 0,
|
14
|
+
animationConfig: $
|
15
|
+
}) => {
|
16
|
+
const f = u(null), r = e, h = e - i / 2, l = g(
|
17
|
+
() => R(r, r, h, c, a),
|
18
|
+
[a, c, h, r]
|
19
|
+
);
|
20
|
+
return k(() => {
|
21
|
+
const t = f.current;
|
22
|
+
if (t) {
|
23
|
+
if (n === "draw") {
|
24
|
+
const m = t.getTotalLength();
|
25
|
+
t.style.strokeDasharray = `${m}`, t.style.strokeDashoffset = `${m}`, t.getBoundingClientRect(), requestAnimationFrame(() => {
|
26
|
+
t.style.transition = `stroke-dashoffset ${o}s linear ${s}s`, t.style.strokeDashoffset = "0";
|
27
|
+
});
|
28
|
+
}
|
29
|
+
n === "fade" && (t.style.opacity = "0", t.getBoundingClientRect(), requestAnimationFrame(() => {
|
30
|
+
t.style.transition = `opacity ${o} ease-in-out ${s}s`, t.style.opacity = "1";
|
31
|
+
}));
|
32
|
+
}
|
33
|
+
}, [l, n, o, s]), /* @__PURE__ */ p(w, { width: 2 * e, height: 2 * e, viewBox: `0 0 ${2 * e} ${2 * e}`, children: /* @__PURE__ */ p(
|
34
|
+
x,
|
35
|
+
{
|
36
|
+
ref: f,
|
37
|
+
d: l,
|
38
|
+
fill: "none",
|
39
|
+
stroke: y,
|
40
|
+
strokeWidth: i,
|
41
|
+
strokeLinecap: "butt",
|
42
|
+
$animationConfig: $
|
43
|
+
}
|
44
|
+
) });
|
45
|
+
};
|
46
|
+
export {
|
47
|
+
L as AnimatedArc
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=animated-arc.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nexport const AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n animationConfig,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration} ease-in-out ${delay}s`;\n path.style.opacity = '1';\n });\n }\n }, [arcPath, mode, duration, delay]);\n\n return (\n <Styled.Svg width={2 * radius} height={2 * radius} viewBox={`0 0 ${2 * radius} ${2 * radius}`}>\n <Styled.Path\n ref={pathRef}\n d={arcPath}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"butt\"\n $animationConfig={animationConfig}\n />\n </Styled.Svg>\n );\n};\n"],"names":["AnimatedArc","radius","strokeWidth","color","targetAngle","startAngle","duration","mode","delay","animationConfig","pathRef","useRef","center","arcRadius","arcPath","useMemo","describeArc","useLayoutEffect","path","length","Styled.Svg","jsx","Styled.Path"],"mappings":";;;;AAOO,MAAMA,IAA2C,CAAC;AAAA,EACvD,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,iBAAAC;AACF,MAAM;AACE,QAAAC,IAAUC,EAAuB,IAAI,GAErCC,IAASX,GACTY,IAAYZ,IAASC,IAAc,GACnCY,IAAUC;AAAA,IACd,MAAMC,EAAYJ,GAAQA,GAAQC,GAAWR,GAAYD,CAAW;AAAA,IACpE,CAACA,GAAaC,GAAYQ,GAAWD,CAAM;AAAA,EAAA;AAG7C,SAAAK,EAAgB,MAAM;AACpB,UAAMC,IAAOR,EAAQ;AAErB,QAAKQ,GAEL;AAAA,UAAIX,MAAS,QAAQ;AACb,cAAAY,IAASD,EAAK;AAEf,QAAAA,EAAA,MAAM,kBAAkB,GAAGC,CAAM,IACjCD,EAAA,MAAM,mBAAmB,GAAGC,CAAM,IACvCD,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,UAAAA,EAAK,MAAM,aAAa,qBAAqBZ,CAAQ,YAAYE,CAAK,KACtEU,EAAK,MAAM,mBAAmB;AAAA,QAAA,CAC/B;AAAA,MACH;AAEA,MAAIX,MAAS,WACXW,EAAK,MAAM,UAAU,KACrBA,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,QAAAA,EAAK,MAAM,aAAa,WAAWZ,CAAQ,gBAAgBE,CAAK,KAChEU,EAAK,MAAM,UAAU;AAAA,MAAA,CACtB;AAAA;AAAA,KAEF,CAACJ,GAASP,GAAMD,GAAUE,CAAK,CAAC,qBAGhCY,GAAA,EAAW,OAAO,IAAInB,GAAQ,QAAQ,IAAIA,GAAQ,SAAS,OAAO,IAAIA,CAAM,IAAI,IAAIA,CAAM,IACzF,UAAA,gBAAAoB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAKZ;AAAA,MACL,GAAGI;AAAA,MACH,MAAK;AAAA,MACL,QAAQX;AAAA,MACR,aAAAD;AAAA,MACA,eAAc;AAAA,MACd,kBAAkBO;AAAA,IAAA;AAAA,EAEtB,EAAA,CAAA;AAEJ;"}
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import b from "
|
1
|
+
import b from "./node_modules/decode-uri-component/index.js";
|
2
2
|
import l from "../split-on-first/index.js";
|
3
3
|
import { includeKeys as N } from "../filter-obj/index.js";
|
4
4
|
const j = (r) => r == null, A = (r) => encodeURIComponent(r).replace(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), u = Symbol("encodeFragmentIdentifier");
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/query-string/node_modules/decode-uri-component/index.js"],"sourcesContent":["const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n"],"names":["token","singleMatcher","multiMatcher","decodeComponents","components","split","left","right","decode","input","tokens","i","customDecodeURIComponent","replaceMap","match","result","entries","key","decodeUriComponent","encodedURI"],"mappings":"AAAA,MAAMA,IAAQ,gBACRC,IAAgB,IAAI,OAAO,MAAMD,IAAQ,cAAc,IAAI,GAC3DE,IAAe,IAAI,OAAO,MAAMF,IAAQ,MAAM,IAAI;AAExD,SAASG,EAAiBC,GAAYC,GAAO;AAC5C,MAAI;AAEH,WAAO,CAAC,mBAAmBD,EAAW,KAAK,EAAE,CAAC,CAAC;AAAA,EACjD,QAAS;AAAA,EAEP;AAED,MAAIA,EAAW,WAAW;AACzB,WAAOA;AAGR,EAAAC,IAAQA,KAAS;AAGjB,QAAMC,IAAOF,EAAW,MAAM,GAAGC,CAAK,GAChCE,IAAQH,EAAW,MAAMC,CAAK;AAEpC,SAAO,MAAM,UAAU,OAAO,KAAK,CAAA,GAAIF,EAAiBG,CAAI,GAAGH,EAAiBI,CAAK,CAAC;AACvF;AAEA,SAASC,EAAOC,GAAO;AACtB,MAAI;AACH,WAAO,mBAAmBA,CAAK;AAAA,EACjC,QAAS;AACP,QAAIC,IAASD,EAAM,MAAMR,CAAa,KAAK,CAAA;AAE3C,aAASU,IAAI,GAAGA,IAAID,EAAO,QAAQC;AAClC,MAAAF,IAAQN,EAAiBO,GAAQC,CAAC,EAAE,KAAK,EAAE,GAE3CD,IAASD,EAAM,MAAMR,CAAa,KAAK,CAAA;AAGxC,WAAOQ;AAAA,EACP;AACF;AAEA,SAASG,EAAyBH,GAAO;AAExC,QAAMI,IAAa;AAAA,IAClB,UAAU;AAAA,IACV,UAAU;AAAA,EACZ;AAEC,MAAIC,IAAQZ,EAAa,KAAKO,CAAK;AACnC,SAAOK,KAAO;AACb,QAAI;AAEH,MAAAD,EAAWC,EAAM,CAAC,CAAC,IAAI,mBAAmBA,EAAM,CAAC,CAAC;AAAA,IACrD,QAAU;AACP,YAAMC,IAASP,EAAOM,EAAM,CAAC,CAAC;AAE9B,MAAIC,MAAWD,EAAM,CAAC,MACrBD,EAAWC,EAAM,CAAC,CAAC,IAAIC;AAAA,IAExB;AAED,IAAAD,IAAQZ,EAAa,KAAKO,CAAK;AAAA,EAC/B;AAGD,EAAAI,EAAW,KAAK,IAAI;AAEpB,QAAMG,IAAU,OAAO,KAAKH,CAAU;AAEtC,aAAWI,KAAOD;AAEjB,IAAAP,IAAQA,EAAM,QAAQ,IAAI,OAAOQ,GAAK,GAAG,GAAGJ,EAAWI,CAAG,CAAC;AAG5D,SAAOR;AACR;AAEe,SAASS,EAAmBC,GAAY;AACtD,MAAI,OAAOA,KAAe;AACzB,UAAM,IAAI,UAAU,wDAAwD,OAAOA,IAAa,GAAG;AAGpG,MAAI;AAEH,WAAO,mBAAmBA,CAAU;AAAA,EACtC,QAAS;AAEP,WAAOP,EAAyBO,CAAU;AAAA,EAC1C;AACF;","x_google_ignoreList":[0]}
|
@@ -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
|
-
|
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()).\
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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\
|
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
|
2
|
-
import
|
3
|
-
|
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
|
-
|
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
|
-
|
11
|
-
for (
|
12
|
-
m[
|
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
|
12
|
+
return f(r);
|
16
13
|
}
|
17
14
|
export {
|
18
|
-
|
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
|
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 @@
|
|
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 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/decode-uri-component/index.js"],"sourcesContent":["const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n"],"names":["token","singleMatcher","multiMatcher","decodeComponents","components","split","left","right","decode","input","tokens","i","customDecodeURIComponent","replaceMap","match","result","entries","key","decodeUriComponent","encodedURI"],"mappings":"AAAA,MAAMA,IAAQ,gBACRC,IAAgB,IAAI,OAAO,MAAMD,IAAQ,cAAc,IAAI,GAC3DE,IAAe,IAAI,OAAO,MAAMF,IAAQ,MAAM,IAAI;AAExD,SAASG,EAAiBC,GAAYC,GAAO;AAC5C,MAAI;AAEH,WAAO,CAAC,mBAAmBD,EAAW,KAAK,EAAE,CAAC,CAAC;AAAA,EACjD,QAAS;AAAA,EAEP;AAED,MAAIA,EAAW,WAAW;AACzB,WAAOA;AAGR,EAAAC,IAAQA,KAAS;AAGjB,QAAMC,IAAOF,EAAW,MAAM,GAAGC,CAAK,GAChCE,IAAQH,EAAW,MAAMC,CAAK;AAEpC,SAAO,MAAM,UAAU,OAAO,KAAK,CAAA,GAAIF,EAAiBG,CAAI,GAAGH,EAAiBI,CAAK,CAAC;AACvF;AAEA,SAASC,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uid/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]}
|
File without changes
|