@cuemath/leap 2.9.3 → 2.9.4-as2
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/assets/illustrations/illustrations.js +9 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/alarm.js +41 -0
- package/dist/assets/line-icons/icons/alarm.js.map +1 -0
- package/dist/assets/line-icons/icons/bin2.js +7 -8
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
- package/dist/assets/line-icons/icons/dart.js +23 -0
- package/dist/assets/line-icons/icons/dart.js.map +1 -0
- package/dist/assets/line-icons/icons/exclamation.js +26 -0
- package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
- package/dist/assets/line-icons/icons/home2.js +25 -0
- package/dist/assets/line-icons/icons/home2.js.map +1 -0
- package/dist/assets/line-icons/icons/important.js +23 -0
- package/dist/assets/line-icons/icons/important.js.map +1 -0
- package/dist/assets/line-icons/icons/puzzle.js +25 -0
- package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
- package/dist/assets/line-icons/icons/recap.js +32 -0
- package/dist/assets/line-icons/icons/recap.js.map +1 -0
- package/dist/assets/line-icons/icons/skip-colored.js +43 -0
- package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
- package/dist/assets/line-icons/icons/status.js +41 -0
- package/dist/assets/line-icons/icons/status.js.map +1 -0
- package/dist/assets/line-icons/icons/testtube.js +33 -0
- package/dist/assets/line-icons/icons/testtube.js.map +1 -0
- package/dist/assets/lottie/lottie.js +9 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +3 -2
- package/dist/constants/api.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
- package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters-v2/api/chapter.js +10 -0
- package/dist/features/chapters-v2/api/chapter.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +73 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +97 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +52 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +103 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +153 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +171 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +192 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +20 -0
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
- package/dist/features/chapters-v2/constants/node-constants.js +14 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +41 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +144 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/communication/pub-sub/constants.js +5 -2
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/card-menu-options.js +38 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/card-title.js +15 -0
- package/dist/features/homework/card-title.js.map +1 -0
- package/dist/features/homework/homework-card-view.js +131 -0
- package/dist/features/homework/homework-card-view.js.map +1 -0
- package/dist/features/homework/homework-card.js +205 -0
- package/dist/features/homework/homework-card.js.map +1 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +71 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +199 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
- package/dist/features/homework/node-progress.js +29 -0
- package/dist/features/homework/node-progress.js.map +1 -0
- package/dist/features/homework/styles.js +130 -0
- package/dist/features/homework/styles.js.map +1 -0
- package/dist/features/journey/comps/coachmark/coachmark-styled.js +12 -5
- package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey.js +145 -0
- package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +10 -5
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/milestone/create/api/goal-submit.js +1 -1
- package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +49 -43
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js +33 -38
- package/dist/features/milestone/create/utils/index.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +64 -62
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +136 -104
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +155 -175
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +19 -23
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +96 -100
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +114 -112
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +85 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +6 -34
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters.js +85 -0
- package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js +39 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
- package/dist/features/trial-session/api/trial-pricing.js +1 -1
- package/dist/features/trial-session/api/trial-pricing.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +21 -21
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing-cards.js +144 -0
- package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -0
- package/dist/features/trial-session/comps/pricing/pricing.js +51 -128
- package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +1 -1
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +30 -15
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/theme/button.js +22 -107
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +299 -32
- package/dist/index.js +498 -470
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/differenceInDays.js +17 -0
- package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
- package/dist/static/competitive-arena.b9c40801.json +1 -0
- package/dist/static/learn.71b13323.json +1 -0
- package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
- package/dist/static/node-learn-bg.b61f815c.svg +1 -0
- package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
- package/dist/static/node-project-bg.e6a33e28.svg +1 -0
- package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
- package/dist/static/node-recap-bg.546154e4.svg +1 -0
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
- package/dist/static/node-video-bg.3df3f73a.svg +1 -0
- package/dist/static/practice.158dd488.json +1 -0
- package/dist/static/project.eb665827.json +1 -0
- package/dist/static/puzzle.b298c7e4.json +1 -0
- package/dist/static/recap.0dd2c1e2.json +1 -0
- package/dist/static/test.803d6036.json +1 -0
- package/dist/static/video.b41451e2.json +1 -0
- package/package.json +1 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
@@ -1,140 +1,63 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { ILLUSTRATIONS as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import { useGetTrialPricing as
|
11
|
-
import { useTrialSessionContext as
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import { Container as
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
}, se = w(() => {
|
19
|
-
const { isTeacher: A, studentId: t, updateButtonState: m } = j(), {
|
20
|
-
data: o,
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { memo as P, useCallback as x, useEffect as m } from "react";
|
3
|
+
import { ILLUSTRATIONS as T } from "../../../../assets/illustrations/illustrations.js";
|
4
|
+
import v from "../../../ui/error/error.js";
|
5
|
+
import y from "../../../ui/image/image.js";
|
6
|
+
import C from "../../../ui/layout/flex-view.js";
|
7
|
+
import I from "../../../ui/loader/app-loader/app-loader.js";
|
8
|
+
import d from "../../../ui/separator/separator.js";
|
9
|
+
import L from "../../../ui/text/text.js";
|
10
|
+
import { useGetTrialPricing as S } from "../../api/trial-pricing.js";
|
11
|
+
import { useTrialSessionContext as $ } from "../../context/use-trial-session-context.js";
|
12
|
+
import w from "../slide-header/index.js";
|
13
|
+
import A from "./pricing-cards.js";
|
14
|
+
import { Container as b, PricingWrapper as D, PolicyWrapper as E, RefundImageWrapper as W } from "./pricing-styled.js";
|
15
|
+
const z = P(() => {
|
16
|
+
const { isTeacher: f, studentId: i, updateButtonState: s } = $(), {
|
17
|
+
data: g,
|
21
18
|
get: p,
|
22
|
-
isProcessed:
|
23
|
-
isProcessing:
|
24
|
-
isProcessingFailed:
|
25
|
-
} =
|
26
|
-
student_id:
|
27
|
-
}), c =
|
28
|
-
|
29
|
-
}, [p,
|
30
|
-
return
|
31
|
-
|
32
|
-
}, [
|
33
|
-
|
34
|
-
}, [
|
35
|
-
/* @__PURE__ */
|
36
|
-
/* @__PURE__ */
|
37
|
-
/* @__PURE__ */
|
38
|
-
/* @__PURE__ */
|
39
|
-
|
19
|
+
isProcessed: e,
|
20
|
+
isProcessing: t,
|
21
|
+
isProcessingFailed: h
|
22
|
+
} = S("trial-v3-pricing", {
|
23
|
+
student_id: i
|
24
|
+
}), { plans: o, intent_level: c } = g || {}, n = x(() => {
|
25
|
+
i && !e && p("trial-v3-pricing", { student_id: i });
|
26
|
+
}, [p, e, i]);
|
27
|
+
return m(() => {
|
28
|
+
n();
|
29
|
+
}, [n]), m(() => {
|
30
|
+
s("right", { isDisabled: t, isLoading: !1 });
|
31
|
+
}, [t, f, s]), t ? /* @__PURE__ */ r(I, { height: "100vh" }) : h ? /* @__PURE__ */ r(v, { height: "100vh", onTryAgain: n }) : e ? /* @__PURE__ */ a(b, { children: [
|
32
|
+
/* @__PURE__ */ r(d, { height: 60 }),
|
33
|
+
/* @__PURE__ */ r(w, { marginBottom: 38 }),
|
34
|
+
/* @__PURE__ */ a(D, { children: [
|
35
|
+
/* @__PURE__ */ r(
|
36
|
+
C,
|
40
37
|
{
|
41
38
|
$width: "100%",
|
42
39
|
$flexDirection: "row",
|
43
40
|
$justifyContent: "space-between",
|
44
41
|
$flexGap: 20,
|
45
42
|
$flexWrap: !0,
|
46
|
-
children: o && Array.isArray(o) && o.map((
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
meta_text: g,
|
56
|
-
no_of_classes: x
|
57
|
-
} = T || {}, {
|
58
|
-
discount_duration: $,
|
59
|
-
original_plan_details: I
|
60
|
-
} = C || {}, { duration: k } = I || {};
|
61
|
-
return /* @__PURE__ */ r(
|
62
|
-
M,
|
63
|
-
{
|
64
|
-
$width: 287,
|
65
|
-
$height: 393,
|
66
|
-
$gutterX: 2.5,
|
67
|
-
$gapX: 2.125,
|
68
|
-
$justifyContent: "space-between",
|
69
|
-
children: [
|
70
|
-
/* @__PURE__ */ e(U, { $color: u[n % 2] ?? "WHITE_4", children: /* @__PURE__ */ e(F, { width: 287, height: 393 }) }),
|
71
|
-
/* @__PURE__ */ r("div", { children: [
|
72
|
-
/* @__PURE__ */ e(h, { height: 30 }),
|
73
|
-
/* @__PURE__ */ r(i, { $renderAs: "ah2-black", children: [
|
74
|
-
k || y,
|
75
|
-
" ",
|
76
|
-
/* @__PURE__ */ e(i, { $renderAs: "ac2-black", $inline: !0, children: "Months" })
|
77
|
-
] }),
|
78
|
-
$ && /* @__PURE__ */ r(
|
79
|
-
b,
|
80
|
-
{
|
81
|
-
$renderAs: "ub3-bold",
|
82
|
-
$background: u[n % 2] ?? "WHITE_4",
|
83
|
-
children: [
|
84
|
-
"Get extra ",
|
85
|
-
$,
|
86
|
-
" Months FREE"
|
87
|
-
]
|
88
|
-
}
|
89
|
-
)
|
90
|
-
] }),
|
91
|
-
/* @__PURE__ */ r("div", { children: [
|
92
|
-
l !== f ? /* @__PURE__ */ r(i, { $renderAs: "ab1", $textDecoration: "line-through", children: [
|
93
|
-
d + f,
|
94
|
-
/* @__PURE__ */ r(i, { $renderAs: "ab1-black", $inline: !0, children: [
|
95
|
-
" ",
|
96
|
-
d + l
|
97
|
-
] })
|
98
|
-
] }) : /* @__PURE__ */ e(i, { $renderAs: "ab1-black", $inline: !0, children: d + l }),
|
99
|
-
/* @__PURE__ */ r(i, { $renderAs: "ub3", children: [
|
100
|
-
"(",
|
101
|
-
W,
|
102
|
-
"/class)"
|
103
|
-
] })
|
104
|
-
] }),
|
105
|
-
/* @__PURE__ */ r("div", { children: [
|
106
|
-
/* @__PURE__ */ r(i, { $renderAs: "ab1", children: [
|
107
|
-
x,
|
108
|
-
" classes"
|
109
|
-
] }),
|
110
|
-
/* @__PURE__ */ r(i, { $renderAs: "ub2", children: [
|
111
|
-
"(",
|
112
|
-
E * 4,
|
113
|
-
" classes/mo)"
|
114
|
-
] })
|
115
|
-
] }),
|
116
|
-
g && /* @__PURE__ */ e(
|
117
|
-
b,
|
118
|
-
{
|
119
|
-
$renderAs: "ub3-bold",
|
120
|
-
$background: u[n % 2] ?? "WHITE_4",
|
121
|
-
children: g
|
122
|
-
}
|
123
|
-
)
|
124
|
-
]
|
125
|
-
},
|
126
|
-
`price-${n}`
|
127
|
-
);
|
128
|
-
})
|
43
|
+
children: c && o && Array.isArray(o) && o.map((u, l) => /* @__PURE__ */ r(
|
44
|
+
A,
|
45
|
+
{
|
46
|
+
colorIndex: l,
|
47
|
+
intentType: c,
|
48
|
+
pricingConfig: u
|
49
|
+
},
|
50
|
+
l
|
51
|
+
))
|
129
52
|
}
|
130
53
|
),
|
131
|
-
/* @__PURE__ */
|
132
|
-
/* @__PURE__ */
|
133
|
-
/* @__PURE__ */
|
134
|
-
/* @__PURE__ */
|
135
|
-
|
54
|
+
/* @__PURE__ */ r(d, { height: 50 }),
|
55
|
+
/* @__PURE__ */ a(E, { children: [
|
56
|
+
/* @__PURE__ */ r(L, { $renderAs: "ab1-bold", $color: "GREEN_6", children: "We have a no-questions-asked refund policy" }),
|
57
|
+
/* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(
|
58
|
+
y,
|
136
59
|
{
|
137
|
-
src:
|
60
|
+
src: T.REFUND_POLICY,
|
138
61
|
width: 168,
|
139
62
|
height: 100,
|
140
63
|
withLoader: !1
|
@@ -145,6 +68,6 @@ const u = {
|
|
145
68
|
] }) : null;
|
146
69
|
});
|
147
70
|
export {
|
148
|
-
|
71
|
+
z as default
|
149
72
|
};
|
150
73
|
//# sourceMappingURL=pricing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricing.js","sources":["../../../../../src/features/trial-session/comps/pricing/pricing.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetTrialPricing } from '../../api/trial-pricing';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport HangingBoardComp from './board-comp';\nimport * as Styled from './pricing-styled';\n\nconst layoutPrimaryColor: Record<number, TColorNames> = {\n 0: 'WHITE_4',\n 1: 'GREEN_1',\n};\n\nconst SessionPricing = memo(() => {\n const { isTeacher, studentId, updateButtonState } = useTrialSessionContext();\n\n const {\n data: pricingData,\n get: getTrialPricing,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n } = useGetTrialPricing('trial-v3-pricing', {\n student_id: studentId,\n });\n\n const fetchData = useCallback(() => {\n if (studentId && !isProcessed) {\n getTrialPricing('trial-v3-pricing', { student_id: studentId });\n }\n }, [getTrialPricing, isProcessed, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, isTeacher, updateButtonState]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed) {\n return <Error height=\"100vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessed) {\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={38} />\n <Styled.PricingWrapper>\n <FlexView\n $width=\"100%\"\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $flexGap={20}\n $flexWrap\n >\n {pricingData &&\n Array.isArray(pricingData) &&\n pricingData.map((pricing, index) => {\n const {\n amount,\n duration: durationWithoutCoupon,\n amount_after_coupon: amountAfterCoupon,\n classes_per_week: classesPerWeek,\n currency_symbol: currencySymbol,\n discount_details: discountDetails,\n fee_per_class_after_discount: feePerClassAfterDiscount,\n meta_text: metaText,\n no_of_classes: noOfClasses,\n } = pricing || {};\n const {\n discount_duration: discountDuration,\n original_plan_details: originalPlanDetails,\n } = discountDetails || {};\n const { duration } = originalPlanDetails || {};\n\n return (\n <Styled.PricingBoard\n key={`price-${index}`}\n $width={287}\n $height={393}\n $gutterX={2.5}\n $gapX={2.125}\n $justifyContent=\"space-between\"\n >\n <Styled.ImageWrapper $color={layoutPrimaryColor[index % 2] ?? 'WHITE_4'}>\n <HangingBoardComp width={287} height={393} />\n </Styled.ImageWrapper>\n <div>\n <Separator height={30} />\n <Text $renderAs=\"ah2-black\">\n {duration || durationWithoutCoupon} \n <Text $renderAs=\"ac2-black\" $inline>\n Months\n </Text>\n </Text>\n {discountDuration && (\n <Styled.OfferText\n $renderAs=\"ub3-bold\"\n $background={layoutPrimaryColor[index % 2] ?? 'WHITE_4'}\n >\n Get extra {discountDuration} Months FREE\n </Styled.OfferText>\n )}\n </div>\n\n <div>\n {amountAfterCoupon !== amount ? (\n <Text $renderAs=\"ab1\" $textDecoration=\"line-through\">\n {currencySymbol + amount}\n <Text $renderAs=\"ab1-black\" $inline>\n \n {currencySymbol + amountAfterCoupon}\n </Text>\n </Text>\n ) : (\n <Text $renderAs=\"ab1-black\" $inline>\n {currencySymbol + amountAfterCoupon}\n </Text>\n )}\n <Text $renderAs=\"ub3\">({feePerClassAfterDiscount}/class)</Text>\n </div>\n\n <div>\n <Text $renderAs=\"ab1\">{noOfClasses} classes</Text>\n <Text $renderAs=\"ub2\">({classesPerWeek * 4} classes/mo)</Text>\n </div>\n\n {metaText && (\n <Styled.OfferText\n $renderAs=\"ub3-bold\"\n $background={layoutPrimaryColor[index % 2] ?? 'WHITE_4'}\n >\n {metaText}\n </Styled.OfferText>\n )}\n </Styled.PricingBoard>\n );\n })}\n </FlexView>\n <Separator height={50} />\n <Styled.PolicyWrapper>\n <Text $renderAs=\"ab1-bold\" $color=\"GREEN_6\">\n We have a no-questions-asked refund policy\n </Text>\n <Styled.RefundImageWrapper>\n <Image\n src={ILLUSTRATIONS.REFUND_POLICY}\n width={168}\n height={100}\n withLoader={false}\n />\n </Styled.RefundImageWrapper>\n </Styled.PolicyWrapper>\n </Styled.PricingWrapper>\n </Styled.Container>\n );\n }\n\n return null;\n});\n\nexport default SessionPricing;\n"],"names":["layoutPrimaryColor","SessionPricing","memo","isTeacher","studentId","updateButtonState","useTrialSessionContext","pricingData","getTrialPricing","isProcessed","isProcessing","isProcessingFailed","useGetTrialPricing","fetchData","useCallback","useEffect","jsx","AppLoader","Error","jsxs","Styled.Container","Separator","SlideHeader","Styled.PricingWrapper","FlexView","pricing","index","amount","durationWithoutCoupon","amountAfterCoupon","classesPerWeek","currencySymbol","discountDetails","feePerClassAfterDiscount","metaText","noOfClasses","discountDuration","originalPlanDetails","duration","Styled.PricingBoard","Styled.ImageWrapper","HangingBoardComp","Text","Styled.OfferText","Styled.PolicyWrapper","Styled.RefundImageWrapper","Image","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAMA,IAAkD;A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UAAC8B;AAAA,UAAA;AAAA,YACC,KAAKC,EAAc;AAAA,YACnB,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UAAA;AAAA,QAAA,GAEhB;AAAA,MAAA,GACF;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA,IAIG;AACT,CAAC;"}
|
1
|
+
{"version":3,"file":"pricing.js","sources":["../../../../../src/features/trial-session/comps/pricing/pricing.tsx"],"sourcesContent":["import { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetTrialPricing } from '../../api/trial-pricing';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport PricingCards from './pricing-cards';\nimport * as Styled from './pricing-styled';\n\nconst SessionPricing = memo(() => {\n const { isTeacher, studentId, updateButtonState } = useTrialSessionContext();\n\n const {\n data: pricingData,\n get: getTrialPricing,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n } = useGetTrialPricing('trial-v3-pricing', {\n student_id: studentId,\n });\n\n const { plans: pricingPlans, intent_level: intentLevel } = pricingData || {};\n const fetchData = useCallback(() => {\n if (studentId && !isProcessed) {\n getTrialPricing('trial-v3-pricing', { student_id: studentId });\n }\n }, [getTrialPricing, isProcessed, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, isTeacher, updateButtonState]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed) {\n return <Error height=\"100vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessed) {\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={38} />\n <Styled.PricingWrapper>\n <FlexView\n $width=\"100%\"\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $flexGap={20}\n $flexWrap\n >\n {intentLevel &&\n pricingPlans &&\n Array.isArray(pricingPlans) &&\n pricingPlans.map((pricing, index) => {\n return (\n <PricingCards\n key={index}\n colorIndex={index}\n intentType={intentLevel}\n pricingConfig={pricing}\n />\n );\n })}\n </FlexView>\n <Separator height={50} />\n <Styled.PolicyWrapper>\n <Text $renderAs=\"ab1-bold\" $color=\"GREEN_6\">\n We have a no-questions-asked refund policy\n </Text>\n <Styled.RefundImageWrapper>\n <Image\n src={ILLUSTRATIONS.REFUND_POLICY}\n width={168}\n height={100}\n withLoader={false}\n />\n </Styled.RefundImageWrapper>\n </Styled.PolicyWrapper>\n </Styled.PricingWrapper>\n </Styled.Container>\n );\n }\n\n return null;\n});\n\nexport default SessionPricing;\n"],"names":["SessionPricing","memo","isTeacher","studentId","updateButtonState","useTrialSessionContext","pricingData","getTrialPricing","isProcessed","isProcessing","isProcessingFailed","useGetTrialPricing","pricingPlans","intentLevel","fetchData","useCallback","useEffect","jsx","AppLoader","Error","jsxs","Styled.Container","Separator","SlideHeader","Styled.PricingWrapper","FlexView","pricing","index","PricingCards","Styled.PolicyWrapper","Text","Styled.RefundImageWrapper","Image","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,IAAiBC,EAAK,MAAM;AAChC,QAAM,EAAE,WAAAC,GAAW,WAAAC,GAAW,mBAAAC,MAAsBC,EAAuB,GAErE;AAAA,IACJ,MAAMC;AAAA,IACN,KAAKC;AAAA,IACL,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,EAAmB,oBAAoB;AAAA,IACzC,YAAYR;AAAA,EAAA,CACb,GAEK,EAAE,OAAOS,GAAc,cAAcC,EAAY,IAAIP,KAAe,IACpEQ,IAAYC,EAAY,MAAM;AAC9B,IAAAZ,K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GAAA,EACC,UAAA,gBAAAd;AAAA,UAACe;AAAA,UAAA;AAAA,YACC,KAAKC,EAAc;AAAA,YACnB,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UAAA;AAAA,QAAA,GAEhB;AAAA,MAAA,GACF;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA,IAIG;AACT,CAAC;"}
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import { useRef as
|
4
|
-
import { useTheme as
|
1
|
+
import { jsxs as I, Fragment as U, jsx as r } from "react/jsx-runtime";
|
2
|
+
import W from "../../../node_modules/lodash.throttle/index.js";
|
3
|
+
import { useRef as Y, useState as m, useCallback as $, useEffect as H } from "react";
|
4
|
+
import { useTheme as P } from "styled-components";
|
5
5
|
import C from "../layout/flex-view.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { TooltipBody as
|
9
|
-
import { computeTooltipNewCoOrdinates as
|
10
|
-
const
|
6
|
+
import V from "../portal/portal.js";
|
7
|
+
import Z from "../text/text.js";
|
8
|
+
import { TooltipBody as q } from "./arrow-tooltip-styled.js";
|
9
|
+
import { computeTooltipNewCoOrdinates as y } from "./arrow-tooltip-util.js";
|
10
|
+
const G = 8, J = 100, K = ({
|
11
11
|
isAnimated: O,
|
12
12
|
alwaysVisible: o = !1,
|
13
13
|
arrowColor: T,
|
14
|
-
arrowSize: h =
|
14
|
+
arrowSize: h = G,
|
15
15
|
arrowXCoOrdinates: g,
|
16
16
|
arrowYCoOrdinates: w,
|
17
17
|
backgroundColor: R,
|
@@ -27,61 +27,62 @@ const y = 8, G = 100, J = ({
|
|
27
27
|
tooltipYCoOrdinates: k,
|
28
28
|
width: F,
|
29
29
|
widthX: L,
|
30
|
-
zIndex: M
|
30
|
+
zIndex: M,
|
31
|
+
parentWidth: S
|
31
32
|
}) => {
|
32
|
-
const { arrowTooltip:
|
33
|
+
const { arrowTooltip: X } = P(), { tooltipVariants: a } = X, { backgroundColorName: _ } = a[i], u = Y(null), [j, p] = m(o), [v, z] = m(
|
33
34
|
null
|
34
35
|
), s = $(
|
35
36
|
(e, n) => {
|
36
|
-
|
37
|
+
z(e), p(n);
|
37
38
|
},
|
38
39
|
[]
|
39
|
-
),
|
40
|
+
), B = $(() => {
|
40
41
|
if (t || o)
|
41
42
|
return null;
|
42
43
|
s(null, !1);
|
43
|
-
}, [o, s, t]), d =
|
44
|
+
}, [o, s, t]), d = W(() => {
|
44
45
|
var f;
|
45
46
|
const { current: e } = u;
|
46
47
|
if (t || !e) return null;
|
47
|
-
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(),
|
48
|
-
return s(
|
49
|
-
},
|
50
|
-
return
|
48
|
+
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(), D = n ? y(c, n) : null;
|
49
|
+
return s(D, !0), null;
|
50
|
+
}, J);
|
51
|
+
return H(() => {
|
51
52
|
t && p(!1), o && d();
|
52
|
-
}, [o, t]), /* @__PURE__ */
|
53
|
+
}, [o, t]), /* @__PURE__ */ I(U, { children: [
|
53
54
|
/* @__PURE__ */ r(
|
54
55
|
C,
|
55
56
|
{
|
56
|
-
$width: "fit-content",
|
57
|
+
$width: S || "fit-content",
|
57
58
|
ref: u,
|
58
59
|
onMouseEnter: d,
|
59
|
-
onMouseLeave:
|
60
|
+
onMouseLeave: B,
|
60
61
|
children: /* @__PURE__ */ r(C, { children: x })
|
61
62
|
}
|
62
63
|
),
|
63
|
-
|
64
|
-
|
64
|
+
j && /* @__PURE__ */ r(V, { portalId: "tooltip-root", children: /* @__PURE__ */ r(
|
65
|
+
q,
|
65
66
|
{
|
66
67
|
$arrowSize: h,
|
67
68
|
$arrowXCoOrdinates: g,
|
68
69
|
$arrowYCoOrdinates: w,
|
69
70
|
$position: c,
|
70
71
|
$renderAs: i,
|
71
|
-
$tooltipCoOrdinates:
|
72
|
+
$tooltipCoOrdinates: v,
|
72
73
|
$tooltipOffset: E,
|
73
74
|
$tooltipXCoOrdinates: N,
|
74
75
|
$tooltipYCoOrdinates: k,
|
75
76
|
$width: F,
|
76
77
|
$widthX: L,
|
77
78
|
$zIndex: M,
|
78
|
-
$background:
|
79
|
+
$background: _,
|
79
80
|
$backgroundColor: R,
|
80
81
|
$arrowColor: T,
|
81
82
|
$borderColor: b,
|
82
83
|
$isAnimated: O,
|
83
84
|
children: typeof l == "string" ? /* @__PURE__ */ r(
|
84
|
-
|
85
|
+
Z,
|
85
86
|
{
|
86
87
|
$renderAs: A || "body3",
|
87
88
|
$color: a[i].textColorName,
|
@@ -92,8 +93,8 @@ const y = 8, G = 100, J = ({
|
|
92
93
|
}
|
93
94
|
) })
|
94
95
|
] });
|
95
|
-
},
|
96
|
+
}, co = K;
|
96
97
|
export {
|
97
|
-
|
98
|
+
co as default
|
98
99
|
};
|
99
100
|
//# sourceMappingURL=arrow-tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width
|
1
|
+
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n parentWidth,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width={parentWidth || 'fit-content'}\n ref={tooltipWrapperRef}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleVisibility}\n >\n <FlexView>{children}</FlexView>\n </FlexView>\n {visible && (\n <Portal portalId=\"tooltip-root\">\n <Styled.TooltipBody\n $arrowSize={arrowSize}\n $arrowXCoOrdinates={arrowXCoOrdinates}\n $arrowYCoOrdinates={arrowYCoOrdinates}\n $position={position}\n $renderAs={renderAs}\n $tooltipCoOrdinates={tooltipCoOrdinates}\n $tooltipOffset={tooltipOffset}\n $tooltipXCoOrdinates={tooltipXCoOrdinates}\n $tooltipYCoOrdinates={tooltipYCoOrdinates}\n $width={width}\n $widthX={widthX}\n $zIndex={zIndex}\n $background={backgroundColorName}\n $backgroundColor={backgroundColor}\n $arrowColor={arrowColor}\n $borderColor={borderColor}\n $isAnimated={isAnimated}\n >\n {typeof tooltipItem === 'string' ? (\n <Text\n $renderAs={textVariant || 'body3'}\n $color={tooltipVariants[renderAs].textColorName}\n $align=\"center\"\n >\n {tooltipItem}\n </Text>\n ) : (\n tooltipItem\n )}\n </Styled.TooltipBody>\n </Portal>\n )}\n </>\n );\n};\n\nexport default ArrowTooltip;\n"],"names":["DEFAULT_ARROW_SIZE","THROTTLE_DURATION","ArrowTooltip","isAnimated","alwaysVisible","arrowColor","arrowSize","arrowXCoOrdinates","arrowYCoOrdinates","backgroundColor","borderColor","children","hidden","position","renderAs","textVariant","tooltipItem","tooltipOffset","tooltipXCoOrdinates","tooltipYCoOrdinates","width","widthX","zIndex","parentWidth","arrowTooltip","useTheme","tooltipVariants","backgroundColorName","tooltipWrapperRef","useRef","visible","setVisible","useState","tooltipCoOrdinates","setTooltipCoOrdinates","handleVisibleNCoOrdinates","useCallback","newCoOrdinates","visibility","handleVisibility","handleOnMouseEnter","throttle","current","boundingClientRect","_a","computeTooltipNewCoOrdinates","useEffect","jsxs","Fragment","jsx","FlexView","Portal","Styled.T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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG:
|
1
|
+
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG: 2,\n LPAR_SHEET_ITEM_BOTTOM_DASH_BOX: 1,\n LPAR_SHEET_ITEM_TOP_VERTICAL_ICON: 2,\n MODAL: 20,\n SAT_SUMMARY_SCORE: 25, //* SAT_SUMMARY_SCORE > MODAL\n CANVAS_SCRIBBLING: 26, //* CANVAS_SCRIBBLING > Learnosity\n TILE_CONTAINER: 30, //whiteboard\n QUESTION_TIPS: -1,\n DESMOS_CALCULATOR: 2,\n GOAL_CHAPTER_SHEETS_MENU: 4,\n} as const;\n\nexport { ZINDEX };\n"],"names":["ZINDEX"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACb,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,mCAAmC;AAAA,EACnC,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EACnB,mBAAmB;AAAA;AAAA,EACnB,gBAAgB;AAAA;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;"}
|
@@ -1,27 +1,41 @@
|
|
1
|
-
import
|
2
|
-
const
|
3
|
-
width:
|
1
|
+
import o from "styled-components";
|
2
|
+
const d = o.div`
|
3
|
+
width: auto;
|
4
4
|
height: fit-content;
|
5
5
|
position: relative;
|
6
6
|
border-radius: 50%;
|
7
|
-
`,
|
8
|
-
({
|
7
|
+
`, f = o.div(
|
8
|
+
({
|
9
|
+
$visible: t,
|
10
|
+
$menuOffset: a,
|
11
|
+
$startLeft: i,
|
12
|
+
$menuZIndex: s,
|
13
|
+
$placeTop: e,
|
14
|
+
$menuWidth: r,
|
15
|
+
$menuWidthX: n,
|
16
|
+
theme: p
|
17
|
+
}) => {
|
18
|
+
const { layout: u } = p;
|
19
|
+
return `
|
9
20
|
position: absolute;
|
10
|
-
|
11
|
-
${n ?
|
12
|
-
|
21
|
+
width: ${r ? `${r}` : "auto"}${typeof r == "number" ? "px" : ""};
|
22
|
+
${n ? `width: ${n * u.gutter}px;` : ""}
|
23
|
+
top: calc(${e ? "0% -" : "100% +"} ${a ?? 0}px);
|
24
|
+
${i ? "left: 0" : "right: 0"};
|
25
|
+
z-index: ${s ?? "unset"};
|
13
26
|
|
14
27
|
transform-origin: top;
|
15
|
-
transform: scaleY(${t ? 1 : 0}) rotate(${
|
28
|
+
transform: scaleY(${t ? 1 : 0}) rotate(${e ? 180 : 0}deg);
|
16
29
|
opacity: ${t ? 1 : 0};
|
17
30
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
18
|
-
|
19
|
-
|
31
|
+
`;
|
32
|
+
}
|
33
|
+
), $ = o.div(({ $placeTop: t }) => `
|
20
34
|
transform: rotate(${t ? 180 : 0}deg);
|
21
35
|
`);
|
22
36
|
export {
|
23
|
-
|
24
|
-
|
25
|
-
|
37
|
+
$ as MenuElementWrapper,
|
38
|
+
f as OptionsMenuWrapper,
|
39
|
+
d as TargetElementWrapper
|
26
40
|
};
|
27
41
|
//# sourceMappingURL=context-menu-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width:
|
1
|
+
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width: auto;\n height: fit-content;\n position: relative;\n border-radius: 50%;\n`;\n\ninterface IOptionsMenuWrapperProps {\n $visible: boolean;\n $startLeft?: boolean;\n $menuOffset?: number;\n $menuZIndex?: number;\n $placeTop?: boolean;\n $menuWidth?: number | string;\n $menuWidthX?: number;\n}\n\nconst OptionsMenuWrapper = styled.div<IOptionsMenuWrapperProps>(\n ({\n $visible,\n $menuOffset,\n $startLeft,\n $menuZIndex,\n $placeTop,\n $menuWidth,\n $menuWidthX,\n theme,\n }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n width: ${$menuWidth ? `${$menuWidth}` : 'auto'}${typeof $menuWidth === 'number' ? 'px' : ''};\n ${$menuWidthX ? `width: ${$menuWidthX * layout.gutter}px;` : ''}\n top: calc(${$placeTop ? '0% -' : '100% +'} ${$menuOffset ?? 0}px);\n ${$startLeft ? 'left: 0' : 'right: 0'};\n z-index: ${$menuZIndex ?? 'unset'};\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0}) rotate(${$placeTop ? 180 : 0}deg);\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n `;\n },\n);\n\ninterface IMenuElementWrapperProps {\n $placeTop?: boolean;\n}\n\nconst MenuElementWrapper = styled.div<IMenuElementWrapperProps>(({ $placeTop }) => {\n return `\n transform: rotate(${$placeTop ? 180 : 0}deg);\n `;\n});\n\nexport { TargetElementWrapper, OptionsMenuWrapper, MenuElementWrapper };\n"],"names":["TargetElementWrapper","styled","OptionsMenuWrapper","$visible","$menuOffset","$startLeft","$menuZIndex","$placeTop","$menuWidth","$menuWidthX","theme","layout","MenuElementWrapper"],"mappings":";AAEA,MAAMA,IAAuBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAiB9BC,IAAqBD,EAAO;AAAA,EAChC,CAAC;AAAA,IACC,UAAAE;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,WAAA;AAAA;AAAA,aAEEF,IAAa,GAAGA,CAAU,KAAK,MAAM,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,MACzFC,IAAc,UAAUA,IAAcE,EAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDJ,IAAY,SAAS,QAAQ,IAAIH,KAAe,CAAC;AAAA,MAC3DC,IAAa,YAAY,UAAU;AAAA,eAC1BC,KAAe,OAAO;AAAA;AAAA;AAAA,wBAGbH,IAAW,IAAI,CAAC,YAAYI,IAAY,MAAM,CAAC;AAAA,eACxDJ,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA,EAG7B;AACF,GAMMS,IAAqBX,EAAO,IAA8B,CAAC,EAAE,WAAAM,QAC1D;AAAA,wBACeA,IAAY,MAAM,CAAC;AAAA,GAE1C;"}
|
@@ -1,27 +1,42 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
8
|
-
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as $, useRef as d } from "react";
|
3
|
+
import x from "../hooks/use-context-menu-click-handler.js";
|
4
|
+
import { TargetElementWrapper as C, OptionsMenuWrapper as M, MenuElementWrapper as h } from "./context-menu-styled.js";
|
5
|
+
const W = $(
|
6
|
+
({
|
7
|
+
targetElement: r,
|
8
|
+
menuElement: o,
|
9
|
+
menuOffset: i,
|
10
|
+
startLeft: m,
|
11
|
+
menuZIndex: u,
|
12
|
+
placeTop: e,
|
13
|
+
menuWidth: l,
|
14
|
+
menuWidthX: s,
|
15
|
+
handleOnMenuClick: p
|
16
|
+
}) => {
|
17
|
+
const n = d(null), { menuVisible: c, onMenuClick: f } = x(
|
18
|
+
n,
|
19
|
+
p
|
20
|
+
);
|
21
|
+
return /* @__PURE__ */ a(C, { ref: n, onClick: f, children: [
|
9
22
|
r,
|
10
23
|
/* @__PURE__ */ t(
|
11
|
-
|
24
|
+
M,
|
12
25
|
{
|
13
26
|
$menuOffset: i,
|
14
|
-
$visible:
|
15
|
-
$startLeft:
|
16
|
-
$menuZIndex:
|
27
|
+
$visible: c,
|
28
|
+
$startLeft: m,
|
29
|
+
$menuZIndex: u,
|
17
30
|
$placeTop: e,
|
18
|
-
|
31
|
+
$menuWidth: l,
|
32
|
+
$menuWidthX: s,
|
33
|
+
children: /* @__PURE__ */ t(h, { $placeTop: e, children: o })
|
19
34
|
}
|
20
35
|
)
|
21
36
|
] });
|
22
37
|
}
|
23
|
-
),
|
38
|
+
), O = W;
|
24
39
|
export {
|
25
|
-
|
40
|
+
O as default
|
26
41
|
};
|
27
42
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n menuWidth,\n menuWidthX,\n handleOnMenuClick,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(\n containerRef,\n handleOnMenuClick,\n );\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n $menuWidth={menuWidth}\n $menuWidthX={menuWidthX}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","menuWidth","menuWidthX","handleOnMenuClick","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAA,IAAgBC;AAAA,MACnCJ;AAAA,MACAD;AAAA,IAAA;AAGF,6BACGM,GAAA,EAA4B,KAAKL,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAZ;AAAA,MAED,gBAAAe;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAad;AAAA,UACb,UAAUS;AAAA,UACV,YAAYR;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UACX,YAAYC;AAAA,UACZ,aAAaC;AAAA,UAEb,4BAACU,GAAA,EAA0B,WAAWZ,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAiB,IAAepB;"}
|