@cuemath/leap 3.1.2-j2 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/assets/illustrations/illustrations.js +2 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/check.js +3 -3
  4. package/dist/assets/line-icons/icons/check.js.map +1 -1
  5. package/dist/assets/line-icons/icons/puzzle-icon.js +51 -0
  6. package/dist/assets/line-icons/icons/puzzle-icon.js.map +1 -0
  7. package/dist/assets/line-icons/icons/share.js +48 -0
  8. package/dist/assets/line-icons/icons/share.js.map +1 -0
  9. package/dist/assets/line-icons/icons/tile.js +54 -0
  10. package/dist/assets/line-icons/icons/tile.js.map +1 -0
  11. package/dist/features/auth/account-selector/account-selector.js +36 -56
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  13. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
  14. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
  15. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +9 -8
  16. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  17. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
  18. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
  19. package/dist/features/auth/forgot-password/forgot-password-styled.js +3 -15
  20. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  21. package/dist/features/auth/forgot-password/otp-form/otp-form.js +29 -29
  22. package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
  23. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +18 -14
  24. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
  25. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +24 -23
  26. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
  27. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +2 -4
  28. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  29. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +75 -85
  30. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
  31. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +20 -26
  32. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
  33. package/dist/features/auth/login/social-login-methods/social-login-methods.js +34 -43
  34. package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
  35. package/dist/features/auth/login/username-password-form/username-password-form.js +21 -22
  36. package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
  37. package/dist/features/auth/user-list/user-item/user-item.js +24 -25
  38. package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
  39. package/dist/features/auth/user-list/user-list.js +51 -60
  40. package/dist/features/auth/user-list/user-list.js.map +1 -1
  41. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +74 -74
  42. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
  43. package/dist/features/cue-canvas/bottombar/homework-controls.js +73 -0
  44. package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -0
  45. package/dist/features/cue-canvas/cue-canvas-context.js +8 -5
  46. package/dist/features/cue-canvas/cue-canvas-context.js.map +1 -1
  47. package/dist/features/cue-canvas/cue-canvas-core.js +84 -74
  48. package/dist/features/cue-canvas/cue-canvas-core.js.map +1 -1
  49. package/dist/features/cue-canvas/cue-canvas-helpers.js +31 -25
  50. package/dist/features/cue-canvas/cue-canvas-helpers.js.map +1 -1
  51. package/dist/features/cue-canvas/cue-canvas-provider.js +14 -12
  52. package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
  53. package/dist/features/cue-canvas/cue-canvas.js +66 -59
  54. package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
  55. package/dist/features/cue-canvas/cue-cavas-styled.js +45 -42
  56. package/dist/features/cue-canvas/cue-cavas-styled.js.map +1 -1
  57. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +61 -54
  58. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  59. package/dist/features/cue-canvas/hooks/use-config-updater.js +12 -0
  60. package/dist/features/cue-canvas/hooks/use-config-updater.js.map +1 -0
  61. package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js +18 -14
  62. package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js.map +1 -1
  63. package/dist/features/cue-canvas/hooks/use-upload-helper.js +23 -0
  64. package/dist/features/cue-canvas/hooks/use-upload-helper.js.map +1 -0
  65. package/dist/features/cue-canvas/sidebar/homework/helper.js +20 -0
  66. package/dist/features/cue-canvas/sidebar/homework/helper.js.map +1 -0
  67. package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +33 -0
  68. package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +1 -0
  69. package/dist/features/cue-canvas/sidebar/homework/homework-request.js +68 -0
  70. package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +1 -0
  71. package/dist/features/cue-canvas/sidebar/homework/homework-styled.js +25 -0
  72. package/dist/features/cue-canvas/sidebar/homework/homework-styled.js.map +1 -0
  73. package/dist/features/cue-canvas/sidebar/homework/homework.js +39 -0
  74. package/dist/features/cue-canvas/sidebar/homework/homework.js.map +1 -0
  75. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js +13 -0
  76. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -0
  77. package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +60 -0
  78. package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +1 -0
  79. package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +44 -0
  80. package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +1 -0
  81. package/dist/features/cue-canvas/sidebar/puzzles/filters.js +107 -0
  82. package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +1 -0
  83. package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js +42 -0
  84. package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js.map +1 -0
  85. package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js +84 -0
  86. package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +1 -0
  87. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +36 -0
  88. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +1 -0
  89. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +133 -0
  90. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +1 -0
  91. package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js +96 -0
  92. package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js.map +1 -0
  93. package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js +29 -0
  94. package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +1 -0
  95. package/dist/features/cue-canvas/sidebar/puzzles/utils.js +120 -0
  96. package/dist/features/cue-canvas/sidebar/puzzles/utils.js.map +1 -0
  97. package/dist/features/cue-canvas/sidebar/sidebar-styled.js +32 -0
  98. package/dist/features/cue-canvas/sidebar/sidebar-styled.js.map +1 -0
  99. package/dist/features/cue-canvas/sidebar/sidebar.js +29 -0
  100. package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -0
  101. package/dist/features/cue-canvas/sidebar/tiles/tile.js +16 -0
  102. package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +1 -0
  103. package/dist/features/cue-canvas/toolbar/grid-menu.js +13 -13
  104. package/dist/features/cue-canvas/toolbar/grid-menu.js.map +1 -1
  105. package/dist/features/cue-canvas/toolbar/tool.js +22 -20
  106. package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
  107. package/dist/features/homework/styles.js +5 -4
  108. package/dist/features/homework/styles.js.map +1 -1
  109. package/dist/features/hooks/use-debounce.js +16 -0
  110. package/dist/features/hooks/use-debounce.js.map +1 -0
  111. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +38 -36
  112. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
  113. package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +24 -22
  114. package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
  115. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +23 -22
  116. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
  117. package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +49 -47
  118. package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
  119. package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +94 -87
  120. package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
  121. package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +13 -12
  122. package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
  123. package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +23 -21
  124. package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
  125. package/dist/features/milestone/create/milestone-create-helpers.js +165 -162
  126. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  127. package/dist/features/trial-session/comps/pricing/india-pricing/index.js +96 -0
  128. package/dist/features/trial-session/comps/pricing/india-pricing/index.js.map +1 -0
  129. package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js +59 -0
  130. package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js.map +1 -0
  131. package/dist/features/trial-session/comps/pricing/pricing.js +36 -35
  132. package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
  133. package/dist/features/ui/buttons/button/button-styled.js +29 -29
  134. package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
  135. package/dist/features/ui/stepper/stepper.js +7 -7
  136. package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js +22 -19
  137. package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js.map +1 -1
  138. package/dist/index.d.ts +54 -24
  139. package/dist/index.js +202 -202
  140. package/dist/static/ellipse-clip.dfb25608.svg +1 -0
  141. package/package.json +1 -1
  142. package/dist/features/auth/account-selector/account-selector-styled.js +0 -9
  143. package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
  144. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +0 -21
  145. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +0 -1
  146. package/dist/features/auth/login/login-styled.js +0 -13
  147. package/dist/features/auth/login/login-styled.js.map +0 -1
  148. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +0 -9
  149. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +0 -1
  150. package/dist/features/hooks/use-device-type.js +0 -25
  151. package/dist/features/hooks/use-device-type.js.map +0 -1
  152. package/dist/features/utils/media.js +0 -16
  153. package/dist/features/utils/media.js.map +0 -1
  154. package/dist/static/cuemath-app-qr-code.7205ee79.svg +0 -1
@@ -1,66 +1,66 @@
1
- import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
- import { memo as d, useCallback as c } from "react";
3
- import l from "../../../ui/inputs/text-input/text-input.js";
4
- import f from "../../../ui/layout/flex-view.js";
5
- import b from "../../comps/input-status-icon/input-status-icon.js";
6
- import g from "../../comps/resend-otp/resend-otp.js";
7
- import { Wrapper as h } from "../forgot-password-styled.js";
8
- const $ = ({
9
- onSubmit: n,
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { memo as p, useCallback as l } from "react";
3
+ import f from "../../../ui/inputs/text-input/text-input.js";
4
+ import o from "../../../ui/layout/flex-view.js";
5
+ import g from "../../comps/input-status-icon/input-status-icon.js";
6
+ import b from "../../comps/resend-otp/resend-otp.js";
7
+ const h = ({
8
+ onSubmit: a,
10
9
  onChange: r,
11
- value: a,
10
+ value: i,
12
11
  error: t,
13
- isProcessing: o,
12
+ isProcessing: n,
14
13
  isValid: s = !1,
15
- helperText: i
14
+ helperText: m
16
15
  }) => {
17
- const m = c(
18
- (u) => {
19
- r("otp", u.target.value);
16
+ const u = l(
17
+ (d) => {
18
+ r("otp", d.target.value);
20
19
  },
21
20
  [r]
22
21
  );
23
22
  return /* @__PURE__ */ e(
24
- f,
23
+ o,
25
24
  {
26
- $gutterX: 1.5,
25
+ $gutterX: 2,
27
26
  $gapX: 1.5,
28
27
  $alignItems: "center",
29
28
  $justifyContent: "center",
30
29
  $background: "BLACK_2",
31
30
  $height: 308,
32
- children: /* @__PURE__ */ p(h, { $flex: 1, $justifyContent: "space-between", children: [
31
+ children: /* @__PURE__ */ c(o, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
33
32
  /* @__PURE__ */ e(
34
- l,
33
+ f,
35
34
  {
36
35
  renderAs: t ? "error-dark" : s ? "success-dark" : "primary-dark",
37
36
  autoFocus: !0,
38
37
  label: "Verification code",
39
- value: a,
40
- onChange: m,
38
+ value: i,
39
+ onChange: u,
40
+ width: 330,
41
41
  required: !0,
42
42
  shape: "borderLess",
43
43
  type: "number",
44
44
  errorMessage: t,
45
- siblingElement: /* @__PURE__ */ e(b, { isError: !!t, isValid: s, isLoading: o }),
46
- helperText: i
45
+ siblingElement: /* @__PURE__ */ e(g, { isError: !!t, isValid: s, isLoading: n }),
46
+ helperText: m
47
47
  }
48
48
  ),
49
49
  /* @__PURE__ */ e(
50
- g,
50
+ b,
51
51
  {
52
52
  renderAs: "submit",
53
53
  timerSeconds: 15,
54
- onResendOTP: n,
55
- disabled: o,
56
- width: "100%"
54
+ onResendOTP: a,
55
+ width: 336,
56
+ disabled: n
57
57
  }
58
58
  )
59
59
  ] })
60
60
  }
61
61
  );
62
- }, T = d($);
62
+ }, y = p(h);
63
63
  export {
64
- T as default
64
+ y as default
65
65
  };
66
66
  //# sourceMappingURL=otp-form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"otp-form.js","sources":["../../../../../src/features/auth/forgot-password/otp-form/otp-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOtp from '../../comps/resend-otp/resend-otp';\nimport * as Styled from '../forgot-password-styled';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isProcessing,\n isValid = false,\n helperText,\n}: ISingleFieldFormProps) => {\n const handleOTPChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n const statusVariant = isValid ? 'success-dark' : 'primary-dark';\n\n return (\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.Wrapper $flex={1} $justifyContent=\"space-between\">\n <TextInput\n renderAs={error ? 'error-dark' : statusVariant}\n autoFocus\n label=\"Verification code\"\n value={value}\n onChange={handleOTPChange}\n required\n shape=\"borderLess\"\n type=\"number\"\n errorMessage={error}\n siblingElement={\n <InputStatusIcon isError={!!error} isValid={isValid} isLoading={isProcessing} />\n }\n helperText={helperText}\n />\n <ResendOtp\n renderAs=\"submit\"\n timerSeconds={15}\n onResendOTP={onSubmit}\n disabled={isProcessing}\n width=\"100%\"\n />\n </Styled.Wrapper>\n </FlexView>\n );\n};\n\nexport default memo(OTPForm);\n"],"names":["OTPForm","onSubmit","onChange","value","error","isProcessing","isValid","helperText","handleOTPChange","useCallback","e","jsx","FlexView","Styled.Wrapper","TextInput","InputStatusIcon","ResendOtp","otpForm","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAU,CAAC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,YAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAkBC;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAR,EAAA,OAAOQ,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACR,CAAQ;AAAA,EAAA;AAMT,SAAA,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,4BAACC,GAAA,EAAe,OAAO,GAAG,iBAAgB,iBACxC,UAAA;AAAA,QAAA,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,UAAUV,IAAQ,eAbJE,IAAU,iBAAiB;AAAA,YAczC,WAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAAH;AAAA,YACA,UAAUK;AAAA,YACV,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,MAAK;AAAA,YACL,cAAcJ;AAAA,YACd,kCACGW,GAAgB,EAAA,SAAS,CAAC,CAACX,GAAO,SAAAE,GAAkB,WAAWD,GAAc;AAAA,YAEhF,YAAAE;AAAA,UAAA;AAAA,QACF;AAAA,QACA,gBAAAI;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,cAAc;AAAA,YACd,aAAaf;AAAA,YACb,UAAUI;AAAA,YACV,OAAM;AAAA,UAAA;AAAA,QACR;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeY,IAAAC,EAAKlB,CAAO;"}
1
+ {"version":3,"file":"otp-form.js","sources":["../../../../../src/features/auth/forgot-password/otp-form/otp-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOtp from '../../comps/resend-otp/resend-otp';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isProcessing,\n isValid = false,\n helperText,\n}: ISingleFieldFormProps) => {\n const handleOTPChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n const statusVariant = isValid ? 'success-dark' : 'primary-dark';\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <FlexView $alignItems=\"center\" $justifyContent=\"space-between\" $flex={1}>\n <TextInput\n renderAs={error ? 'error-dark' : statusVariant}\n autoFocus\n label=\"Verification code\"\n value={value}\n onChange={handleOTPChange}\n width={330}\n required\n shape=\"borderLess\"\n type=\"number\"\n errorMessage={error}\n siblingElement={\n <InputStatusIcon isError={!!error} isValid={isValid} isLoading={isProcessing} />\n }\n helperText={helperText}\n />\n <ResendOtp\n renderAs=\"submit\"\n timerSeconds={15}\n onResendOTP={onSubmit}\n width={336}\n disabled={isProcessing}\n />\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(OTPForm);\n"],"names":["OTPForm","onSubmit","onChange","value","error","isProcessing","isValid","helperText","handleOTPChange","useCallback","e","jsx","FlexView","TextInput","InputStatusIcon","ResendOtp","otpForm","memo"],"mappings":";;;;;;AASA,MAAMA,IAAU,CAAC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,YAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAkBC;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAR,EAAA,OAAOQ,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACR,CAAQ;AAAA,EAAA;AAMT,SAAA,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,4BAACA,GAAS,EAAA,aAAY,UAAS,iBAAgB,iBAAgB,OAAO,GACpE,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,UAAUT,IAAQ,eAbJE,IAAU,iBAAiB;AAAA,YAczC,WAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAAH;AAAA,YACA,UAAUK;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,MAAK;AAAA,YACL,cAAcJ;AAAA,YACd,kCACGU,GAAgB,EAAA,SAAS,CAAC,CAACV,GAAO,SAAAE,GAAkB,WAAWD,GAAc;AAAA,YAEhF,YAAAE;AAAA,UAAA;AAAA,QACF;AAAA,QACA,gBAAAI;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,cAAc;AAAA,YACd,aAAad;AAAA,YACb,OAAO;AAAA,YACP,UAAUI;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeW,IAAAC,EAAKjB,CAAO;"}
@@ -4,15 +4,15 @@ import P from "../../../ui/buttons/button/button.js";
4
4
  import n from "../../../ui/inputs/text-input/text-input.js";
5
5
  import m from "../../../ui/layout/flex-view.js";
6
6
  import b from "../../../ui/separator/separator.js";
7
- import l from "../../comps/input-status-icon/input-status-icon.js";
8
- import { FormWrapper as y } from "../forgot-password-styled.js";
9
- const k = ({
10
- onSubmit: p,
7
+ import p from "../../comps/input-status-icon/input-status-icon.js";
8
+ import { FormWrapper as C } from "../forgot-password-styled.js";
9
+ const y = ({
10
+ onSubmit: l,
11
11
  onChange: e,
12
12
  formData: o,
13
13
  errors: s,
14
- isSubmitDisabled: u,
15
- isProcessing: w,
14
+ isSubmitDisabled: w,
15
+ isProcessing: u,
16
16
  isValid: t = !1
17
17
  }) => {
18
18
  const c = t && o.password === o.confirmPassword, f = i(
@@ -29,27 +29,29 @@ const k = ({
29
29
  return /* @__PURE__ */ r(
30
30
  m,
31
31
  {
32
- $gutterX: 1.5,
32
+ $gutterX: 2,
33
33
  $gapX: 1.5,
34
34
  $alignItems: "center",
35
35
  $justifyContent: "center",
36
36
  $background: "BLACK_2",
37
37
  $height: 308,
38
- children: /* @__PURE__ */ d(y, { onSubmit: p, children: [
38
+ children: /* @__PURE__ */ d(C, { onSubmit: l, children: [
39
39
  /* @__PURE__ */ d(m, { children: [
40
40
  /* @__PURE__ */ r(
41
41
  n,
42
42
  {
43
43
  type: "password",
44
44
  renderAs: s.password ? "error-dark" : "primary-dark",
45
+ autoComplete: "new-password",
45
46
  label: "New Password",
46
47
  value: o.password,
47
48
  onChange: f,
49
+ width: 330,
48
50
  autoFocus: !0,
49
51
  required: !0,
50
52
  shape: "borderLess",
51
53
  errorMessage: s.password,
52
- siblingElement: /* @__PURE__ */ r(l, { isError: !!s.password, isValid: t, isLoading: !1 })
54
+ siblingElement: /* @__PURE__ */ r(p, { isError: !!s.password, isValid: t, isLoading: !1 })
53
55
  }
54
56
  ),
55
57
  /* @__PURE__ */ r(b, { height: 36 }),
@@ -58,14 +60,16 @@ const k = ({
58
60
  {
59
61
  type: "password",
60
62
  renderAs: s.confirmPassword ? "error-dark" : "primary-dark",
63
+ autoComplete: "new-password",
61
64
  label: "Re-enter Password",
62
65
  value: o.confirmPassword,
63
66
  onChange: g,
67
+ width: 330,
64
68
  required: !0,
65
69
  shape: "borderLess",
66
70
  errorMessage: s.confirmPassword,
67
71
  siblingElement: /* @__PURE__ */ r(
68
- l,
72
+ p,
69
73
  {
70
74
  isError: !!s.confirmPassword,
71
75
  isValid: c,
@@ -82,15 +86,15 @@ const k = ({
82
86
  renderAs: "secondary-dark",
83
87
  type: "submit",
84
88
  label: "Continue",
85
- width: "100%",
86
- busy: w,
87
- disabled: u
89
+ width: 336,
90
+ busy: u,
91
+ disabled: w
88
92
  }
89
93
  )
90
94
  ] })
91
95
  }
92
96
  );
93
- }, I = h(k);
97
+ }, I = h(y);
94
98
  export {
95
99
  I as default
96
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"reset-password-form.js","sources":["../../../../../src/features/auth/forgot-password/reset-password-form/reset-password-form.tsx"],"sourcesContent":["import type { IResetPasswordFormProps } from './reset-password-form-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst ResetPasswordForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IResetPasswordFormProps) => {\n const isConfirmPasswordValid = isValid && formData.password === formData.confirmPassword;\n\n const handlePasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('password', e.target.value);\n },\n [onChange],\n );\n\n const handleConfirmPasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('confirmPassword', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView>\n <TextInput\n type={'password'}\n renderAs={errors.password ? 'error-dark' : 'primary-dark'}\n label=\"New Password\"\n value={formData.password}\n onChange={handlePasswordChange}\n autoFocus\n required\n shape=\"borderLess\"\n errorMessage={errors.password}\n siblingElement={\n <InputStatusIcon isError={!!errors.password} isValid={isValid} isLoading={false} />\n }\n />\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.confirmPassword ? 'error-dark' : 'primary-dark'}\n label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={handleConfirmPasswordChange}\n required\n shape=\"borderLess\"\n errorMessage={errors.confirmPassword}\n siblingElement={\n <InputStatusIcon\n isError={!!errors.confirmPassword}\n isValid={isConfirmPasswordValid}\n isLoading={false}\n />\n }\n />\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Continue\"\n width=\"100%\"\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(ResetPasswordForm);\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","isConfirmPasswordValid","handlePasswordChange","useCallback","e","handleConfirmPasswordChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Separator","Button","resetPasswordForm","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAoB,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAA+B;AAC7B,QAAMC,IAAyBD,KAAWJ,EAAS,aAAaA,EAAS,iBAEnEM,IAAuBC;AAAA,IAC3B,CAACC,MAAqC;AAC3B,MAAAT,EAAA,YAAYS,EAAE,OAAO,KAAK;AAAA,IACrC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA,GAGLU,IAA8BF;AAAA,IAClC,CAACC,MAAqC;AAC3B,MAAAT,EAAA,mBAAmBS,EAAE,OAAO,KAAK;AAAA,IAC5C;AAAA,IACA,CAACT,CAA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ACN,OAAM;AAAA,YACN,MAAMd;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEegB,IAAAC,EAAKtB,CAAiB;"}
1
+ {"version":3,"file":"reset-password-form.js","sources":["../../../../../src/features/auth/forgot-password/reset-password-form/reset-password-form.tsx"],"sourcesContent":["import type { IResetPasswordFormProps } from './reset-password-form-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst ResetPasswordForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IResetPasswordFormProps) => {\n const isConfirmPasswordValid = isValid && formData.password === formData.confirmPassword;\n\n const handlePasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('password', e.target.value);\n },\n [onChange],\n );\n\n const handleConfirmPasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('confirmPassword', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView>\n <TextInput\n type={'password'}\n renderAs={errors.password ? 'error-dark' : 'primary-dark'}\n autoComplete=\"new-password\"\n label=\"New Password\"\n value={formData.password}\n onChange={handlePasswordChange}\n width={330}\n autoFocus\n required\n shape=\"borderLess\"\n errorMessage={errors.password}\n siblingElement={\n <InputStatusIcon isError={!!errors.password} isValid={isValid} isLoading={false} />\n }\n />\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.confirmPassword ? 'error-dark' : 'primary-dark'}\n autoComplete=\"new-password\"\n label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={handleConfirmPasswordChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.confirmPassword}\n siblingElement={\n <InputStatusIcon\n isError={!!errors.confirmPassword}\n isValid={isConfirmPasswordValid}\n isLoading={false}\n />\n }\n />\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Continue\"\n width={336}\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(ResetPasswordForm);\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","isConfirmPasswordValid","handlePasswordChange","useCallback","e","handleConfirmPasswordChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Separator","Button","resetPasswordForm","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAoB,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAA+B;AAC7B,QAAMC,IAAyBD,KAAWJ,EAAS,aAAaA,EAAS,iBAEnEM,IAAuBC;AAAA,IAC3B,CAACC,MAAqC;AAC3B,MAAAT,EAAA,YAAYS,EAAE,OAAO,KAAK;AAAA,IACrC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA,GAGLU,IAA8BF;AAAA,IAClC,CAACC,MAAqC;AAC3B,MAAAT,EAAA,mBAAmBS,EAAE,OAAO,KAAK;AAAA,IAC5C;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AA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Z;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEegB,IAAAC,EAAKtB,CAAiB;"}
@@ -1,66 +1,67 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { memo as p, useCallback as f } from "react";
3
- import c from "../../../ui/inputs/text-input/text-input.js";
4
- import g from "../../../ui/layout/flex-view.js";
3
+ import c from "../../../ui/buttons/button/button.js";
4
+ import g from "../../../ui/inputs/text-input/text-input.js";
5
+ import h from "../../../ui/layout/flex-view.js";
5
6
  import b from "../../comps/input-status-icon/input-status-icon.js";
6
- import { FormWrapper as h, ButtonWrapper as I } from "../forgot-password-styled.js";
7
- const C = ({
8
- onSubmit: o,
7
+ import { FormWrapper as I } from "../forgot-password-styled.js";
8
+ const $ = ({
9
+ onSubmit: i,
9
10
  onChange: t,
10
- value: i,
11
+ value: o,
11
12
  error: r,
12
13
  isSubmitDisabled: s,
13
- isProcessing: a,
14
- isValid: n = !1,
14
+ isProcessing: n,
15
+ isValid: a = !1,
15
16
  label: m
16
17
  }) => {
17
- const u = f(
18
- (d) => {
19
- t("identifier", d.target.value);
18
+ const d = f(
19
+ (u) => {
20
+ t("identifier", u.target.value);
20
21
  },
21
22
  [t]
22
23
  );
23
24
  return /* @__PURE__ */ e(
24
- g,
25
+ h,
25
26
  {
26
- $gutterX: 1.5,
27
+ $gutterX: 2,
27
28
  $gapX: 1.5,
28
29
  $alignItems: "center",
29
30
  $justifyContent: "center",
30
31
  $background: "BLACK_2",
31
32
  $height: 308,
32
- children: /* @__PURE__ */ l(h, { onSubmit: o, children: [
33
+ children: /* @__PURE__ */ l(I, { onSubmit: i, children: [
33
34
  /* @__PURE__ */ e(
34
- c,
35
+ g,
35
36
  {
36
37
  renderAs: r ? "error-dark" : "primary-dark",
37
38
  autoFocus: !0,
38
39
  label: m,
39
- value: i,
40
- onChange: u,
40
+ value: o,
41
+ onChange: d,
42
+ width: 330,
41
43
  required: !0,
42
44
  shape: "borderLess",
43
- autoComplete: "username",
44
45
  errorMessage: r,
45
- siblingElement: /* @__PURE__ */ e(b, { isError: !!r, isValid: n, isLoading: !1 })
46
+ siblingElement: /* @__PURE__ */ e(b, { isError: !!r, isValid: a, isLoading: !1 })
46
47
  }
47
48
  ),
48
49
  /* @__PURE__ */ e(
49
- I,
50
+ c,
50
51
  {
51
52
  size: "small",
52
53
  renderAs: "secondary-dark",
53
54
  type: "submit",
54
- width: "100%",
55
55
  label: "Get Verification Code",
56
- busy: a,
56
+ width: 336,
57
+ busy: n,
57
58
  disabled: s
58
59
  }
59
60
  )
60
61
  ] })
61
62
  }
62
63
  );
63
- }, A = p(C);
64
+ }, A = p($);
64
65
  export {
65
66
  A as default
66
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"user-identifier-form.js","sources":["../../../../../src/features/auth/forgot-password/user-identifier-form/user-identifier-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { memo, useCallback, type ChangeEvent } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst UserIdentifierForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n label,\n}: ISingleFieldFormProps) => {\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <TextInput\n renderAs={error ? 'error-dark' : 'primary-dark'}\n autoFocus\n label={label}\n value={value}\n onChange={handleInputChange}\n required\n shape=\"borderLess\"\n autoComplete=\"username\"\n errorMessage={error}\n siblingElement={<InputStatusIcon isError={!!error} isValid={isValid} isLoading={false} />}\n />\n <Styled.ButtonWrapper\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n width=\"100%\"\n label=\"Get Verification Code\"\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(UserIdentifierForm);\n"],"names":["UserIdentifierForm","onSubmit","onChange","value","error","isSubmitDisabled","isProcessing","isValid","label","handleInputChange","useCallback","e","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Styled.ButtonWrapper","userIdentifierForm","memo"],"mappings":";;;;;;AASA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,OAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAoBC;AAAA,IACxB,CAACC,MAAqC;AAC3B,MAAAT,EAAA,cAAcS,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAd,GAClB,UAAA;AAAA,QAAA,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAUZ,IAAQ,eAAe;AAAA,YACjC,WAAS;AAAA,YACT,OAAAI;AAAA,YACA,OAAAL;AAAA,YACA,UAAUM;AAAA,YACV,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAa;AAAA,YACb,cAAcL;AAAA,YACd,kCAAiBa,GAAgB,EAAA,SAAS,CAAC,CAACb,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,UAAA;AAAA,QACzF;AAAA,QACA,gBAAAK;AAAA,UAACM;AAAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAM;AAAA,YACN,MAAMZ;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEec,IAAAC,EAAKpB,CAAkB;"}
1
+ {"version":3,"file":"user-identifier-form.js","sources":["../../../../../src/features/auth/forgot-password/user-identifier-form/user-identifier-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { memo, useCallback, type ChangeEvent } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst UserIdentifierForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n label,\n}: ISingleFieldFormProps) => {\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <TextInput\n renderAs={error ? 'error-dark' : 'primary-dark'}\n autoFocus\n label={label}\n value={value}\n onChange={handleInputChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={error}\n siblingElement={<InputStatusIcon isError={!!error} isValid={isValid} isLoading={false} />}\n />\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Get Verification Code\"\n width={336}\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(UserIdentifierForm);\n"],"names":["UserIdentifierForm","onSubmit","onChange","value","error","isSubmitDisabled","isProcessing","isValid","label","handleInputChange","useCallback","e","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Button","userIdentifierForm","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,OAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAoBC;AAAA,IACxB,CAACC,MAAqC;AAC3B,MAAAT,EAAA,cAAcS,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAd,GAClB,UAAA;AAAA,QAAA,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAUZ,IAAQ,eAAe;AAAA,YACjC,WAAS;AAAA,YACT,OAAAI;AAAA,YACA,OAAAL;AAAA,YACA,UAAUM;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcL;AAAA,YACd,kCAAiBa,GAAgB,EAAA,SAAS,CAAC,CAACb,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,UAAA;AAAA,QACzF;AAAA,QACA,gBAAAK;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAO;AAAA,YACP,MAAMZ;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEec,IAAAC,EAAKpB,CAAkB;"}
@@ -1,14 +1,12 @@
1
1
  import e from "styled-components";
2
- const o = e.form`
2
+ const t = e.form`
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  justify-content: space-between;
6
6
  margin-top: 8px;
7
7
  flex: 1;
8
- max-width: 336px;
9
- width: 100%;
10
8
  `;
11
9
  export {
12
- o as FormWrapper
10
+ t as FormWrapper
13
11
  };
14
12
  //# sourceMappingURL=identifier-otp-form-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 8px;\n flex: 1;\n max-width: 336px;\n width: 100%;\n`;\n\nexport { FormWrapper };\n"],"names":["FormWrapper","styled"],"mappings":";AAEA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 8px;\n flex: 1;\n`;\n\nexport { FormWrapper };\n"],"names":["FormWrapper","styled"],"mappings":";AAEA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,110 +1,100 @@
1
- import { jsx as e, jsxs as d, Fragment as x } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as n, Fragment as x } from "react/jsx-runtime";
2
2
  import { memo as C, useCallback as c } from "react";
3
3
  import E from "../../../ui/buttons/button/button.js";
4
4
  import u from "../../../ui/inputs/text-input/text-input.js";
5
5
  import s from "../../../ui/layout/flex-view.js";
6
6
  import l from "../../../ui/separator/separator.js";
7
- import f from "../../comps/input-status-icon/input-status-icon.js";
8
- import j from "../../comps/resend-otp/resend-otp.js";
9
- import { FormWrapper as v } from "./identifier-otp-form-styled.js";
10
- const A = ({
11
- identifier: h,
7
+ import p from "../../comps/input-status-icon/input-status-icon.js";
8
+ import v from "../../comps/resend-otp/resend-otp.js";
9
+ import { FormWrapper as A } from "./identifier-otp-form-styled.js";
10
+ const S = ({
11
+ identifier: f,
12
12
  otp: m,
13
13
  errors: r,
14
14
  isOtpVerified: i,
15
- isLoading: n,
16
- isSubmitDisabled: g,
15
+ isLoading: o,
16
+ isSubmitDisabled: h,
17
17
  showOtpInput: t,
18
18
  onChange: a,
19
- onSubmit: p,
19
+ onSubmit: g,
20
20
  onSendOtp: b
21
21
  }) => {
22
- const $ = t ? "success-dark" : "primary-dark", k = i ? "success-dark" : "primary-dark", y = c(
23
- (o) => {
24
- a("identifier", o.target.value);
22
+ const k = t ? "success-dark" : "primary-dark", $ = i ? "success-dark" : "primary-dark", y = c(
23
+ (d) => {
24
+ a("identifier", d.target.value);
25
25
  },
26
26
  [a]
27
27
  ), F = c(
28
- (o) => {
29
- a("otp", o.target.value);
28
+ (d) => {
29
+ a("otp", d.target.value);
30
30
  },
31
31
  [a]
32
32
  );
33
- return /* @__PURE__ */ e(
34
- s,
35
- {
36
- $gutterX: 1.5,
37
- $gapX: 1.5,
38
- $background: "BLACK_2",
39
- $height: 308,
40
- $alignItems: "center",
41
- $justifyContent: "center",
42
- children: /* @__PURE__ */ d(v, { onSubmit: p, children: [
43
- /* @__PURE__ */ d(s, { $alignItems: "center", $justifyContent: "center", children: [
44
- /* @__PURE__ */ e(
45
- u,
46
- {
47
- renderAs: r.identifier ? "error-dark" : $,
48
- autoFocus: !0,
49
- label: "Email or Phone",
50
- value: h,
51
- onChange: y,
52
- required: !0,
53
- width: "100%",
54
- shape: "borderLess",
55
- errorMessage: r.identifier,
56
- disabled: t,
57
- siblingElement: /* @__PURE__ */ e(f, { isValid: t, isError: !!r.identifier })
58
- }
59
- ),
60
- t && /* @__PURE__ */ d(x, { children: [
61
- /* @__PURE__ */ e(l, { height: 36 }),
62
- /* @__PURE__ */ e(
63
- u,
64
- {
65
- type: "password",
66
- renderAs: r.otp ? "error-dark" : k,
67
- label: "Verification code",
68
- value: m,
69
- onChange: F,
70
- width: "100%",
71
- required: !0,
72
- autoFocus: !0,
73
- shape: "borderLess",
74
- errorMessage: r.otp,
75
- disabled: i || m.length === 4 && n,
76
- siblingElement: /* @__PURE__ */ e(
77
- f,
78
- {
79
- isLoading: n,
80
- isValid: i,
81
- isError: !!r.otp
82
- }
83
- )
84
- }
85
- ),
86
- /* @__PURE__ */ e(l, { heightX: 1.25 }),
87
- /* @__PURE__ */ e(s, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(j, { onResendOTP: b, disabled: i }) }),
88
- /* @__PURE__ */ e(l, { heightX: 2 })
89
- ] })
90
- ] }),
33
+ return /* @__PURE__ */ e(s, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */ n(A, { onSubmit: g, children: [
34
+ /* @__PURE__ */ n(s, { $alignItems: "center", $justifyContent: "center", children: [
35
+ /* @__PURE__ */ e(
36
+ u,
37
+ {
38
+ renderAs: r.identifier ? "error-dark" : k,
39
+ autoFocus: !0,
40
+ label: "Email or Phone",
41
+ value: f,
42
+ onChange: y,
43
+ width: 330,
44
+ required: !0,
45
+ shape: "borderLess",
46
+ errorMessage: r.identifier,
47
+ disabled: t,
48
+ siblingElement: /* @__PURE__ */ e(p, { isValid: t, isError: !!r.identifier })
49
+ }
50
+ ),
51
+ t && /* @__PURE__ */ n(x, { children: [
52
+ /* @__PURE__ */ e(l, { height: 36 }),
91
53
  /* @__PURE__ */ e(
92
- E,
54
+ u,
93
55
  {
94
- size: "small",
95
- renderAs: "secondary-dark",
96
- type: "submit",
97
- label: t ? "Log In" : "Get Verification Code",
98
- width: "100%",
99
- busy: !t && n,
100
- disabled: g
56
+ type: "password",
57
+ renderAs: r.otp ? "error-dark" : $,
58
+ autoComplete: "password",
59
+ label: "Verification code",
60
+ value: m,
61
+ onChange: F,
62
+ width: 330,
63
+ required: !0,
64
+ autoFocus: !0,
65
+ shape: "borderLess",
66
+ errorMessage: r.otp,
67
+ disabled: i || m.length === 4 && o,
68
+ siblingElement: /* @__PURE__ */ e(
69
+ p,
70
+ {
71
+ isLoading: o,
72
+ isValid: i,
73
+ isError: !!r.otp
74
+ }
75
+ )
101
76
  }
102
- )
77
+ ),
78
+ /* @__PURE__ */ e(l, { heightX: 1.25 }),
79
+ /* @__PURE__ */ e(s, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(v, { onResendOTP: b, disabled: i }) }),
80
+ /* @__PURE__ */ e(l, { heightX: 2 })
103
81
  ] })
104
- }
105
- );
106
- }, R = C(A);
82
+ ] }),
83
+ /* @__PURE__ */ e(
84
+ E,
85
+ {
86
+ size: "small",
87
+ renderAs: "secondary-dark",
88
+ type: "submit",
89
+ label: t ? "Log In" : "Get Verification Code",
90
+ width: 336,
91
+ busy: !t && o,
92
+ disabled: h
93
+ }
94
+ )
95
+ ] }) });
96
+ }, P = C(S);
107
97
  export {
108
- R as default
98
+ P as default
109
99
  };
110
100
  //# sourceMappingURL=identifier-otp-form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n const handleIdentifierChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n const handleOtpChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $background=\"BLACK_2\"\n $height={308}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : identifierStatusVariant}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={handleIdentifierChange}\n required\n width=\"100%\"\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={\n <InputStatusIcon isValid={showOtpInput} isError={!!errors.identifier} />\n }\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error-dark' : otpStatusVariant}\n label=\"Verification code\"\n value={otp}\n onChange={handleOtpChange}\n width=\"100%\"\n required\n autoFocus\n shape=\"borderLess\"\n errorMessage={errors.otp}\n disabled={isOtpVerified || (otp.length === 4 && isLoading)}\n siblingElement={\n <InputStatusIcon\n isLoading={isLoading}\n isValid={isOtpVerified}\n isError={!!errors.otp}\n />\n }\n />\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\" $width=\"100%\">\n <ResendOTP onResendOTP={onSendOtp} disabled={isOtpVerified} />\n </FlexView>\n <Separator heightX={2} />\n </>\n )}\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={showOtpInput ? 'Log In' : 'Get Verification Code'}\n width=\"100%\"\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(IdentifierOtpForm);\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","handleIdentifierChange","useCallback","e","handleOtpChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Fragment","Separator","ResendOTP","Button","identifierOtpForm","memo"],"mappings":";;;;;;;;;AAcA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,YAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACE,QAAAC,IAA0BJ,IAAe,iBAAiB,gBAC1DK,IAAmBR,IAAgB,iBAAiB,gBAEpDS,IAAyBC;AAAA,IAC7B,CAACC,MAAqC;AAC3B,MAAAP,EAAA,cAAcO,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA,GAGLQ,IAAkBF;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAP,EAAA,OAAOO,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,SAAS;AAAA,MAC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ACtC,UAAC,gBAAAD,EAAAQ,GAAA,EAAU,aAAaf,GAAW,UAAUN,EAAe,CAAA,GAC9D;AAAA,YACA,gBAAAa,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAAA,GACzB;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAP;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAOnB,IAAe,WAAW;AAAA,YACjC,OAAM;AAAA,YACN,MAAM,CAACA,KAAgBF;AAAA,YACvB,UAAUC;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeqB,IAAAC,EAAK5B,CAAiB;"}
1
+ {"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n const handleIdentifierChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n const handleOtpChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView $gutterX={2} $gapX={1.5} $background=\"BLACK_2\" $height={308}>\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : identifierStatusVariant}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={handleIdentifierChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={\n <InputStatusIcon isValid={showOtpInput} isError={!!errors.identifier} />\n }\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error-dark' : otpStatusVariant}\n autoComplete=\"password\"\n label=\"Verification code\"\n value={otp}\n onChange={handleOtpChange}\n width={330}\n required\n autoFocus\n shape=\"borderLess\"\n errorMessage={errors.otp}\n disabled={isOtpVerified || (otp.length === 4 && isLoading)}\n siblingElement={\n <InputStatusIcon\n isLoading={isLoading}\n isValid={isOtpVerified}\n isError={!!errors.otp}\n />\n }\n />\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\" $width=\"100%\">\n <ResendOTP onResendOTP={onSendOtp} disabled={isOtpVerified} />\n </FlexView>\n <Separator heightX={2} />\n </>\n )}\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={showOtpInput ? 'Log In' : 'Get Verification Code'}\n width={336}\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(IdentifierOtpForm);\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","handleIdentifierChange","useCallback","e","handleOtpChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Fragment","Separator","ResendOTP","Button","identifierOtpForm","memo"],"mappings":";;;;;;;;;AAcA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,YAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACE,QAAAC,IAA0BJ,IAAe,iBAAiB,gBAC1DK,IAAmBR,IAAgB,iBAAiB,gBAEpDS,IAAyBC;AAAA,IAC7B,CAACC,MAAqC;AAC3B,MAAAP,EAAA,cAAcO,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA,GAGLQ,IAAkBF;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAP,EAAA,OAAOO,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA;AAGX,SACG,gBAAAS,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,aAAY,WAAU,SAAS,KAChE,UAAA,gBAAAC,EAACC,GAAA,EAAmB,UAAAX,GAClB,UAAA;AAAA,IAAA,gBAAAU,EAACD,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUlB,EAAO,aAAa,eAAeQ;AAAA,UAC7C,WAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAOV;AAAA,UACP,UAAUY;AAAA,UACV,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,cAAcV,EAAO;AAAA,UACrB,UAAUI;AAAA,UACV,kCACGe,GAAgB,EAAA,SAASf,GAAc,SAAS,CAAC,CAACJ,EAAO,YAAY;AAAA,QAAA;AAAA,MAE1E;AAAA,MACCI,KAEG,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