@cuemath/leap 3.2.18-mb → 3.2.19-beta-0.1
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 +11 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +34 -0
- package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board.js +23 -0
- package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
- package/dist/assets/line-icons/icons/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.js.map +1 -0
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/assets/line-icons/icons/morning.js +35 -0
- package/dist/assets/line-icons/icons/morning.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab.js +23 -0
- package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
- package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker.js +46 -0
- package/dist/assets/line-icons/icons/sticker.js.map +1 -0
- package/dist/assets/lottie/lottie.js +16 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +2 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +6 -4
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +10 -8
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +26 -25
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +52 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +93 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +10 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +17 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -14
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +26 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +50 -0
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button.js +74 -0
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +35 -34
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +8 -9
- package/dist/features/auth/login/login-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +54 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +83 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +3 -1
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +7 -4
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +85 -97
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -42
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +54 -48
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +33 -27
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -4
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js +85 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +120 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +62 -0
- package/dist/features/puzzles/app/puzzle-app.js.map +1 -0
- package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +79 -30
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/constants/puzzle-container.js +8 -0
- package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
- package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
- package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
- package/dist/features/ui/buttons/button/button.js +41 -38
- package/dist/features/ui/buttons/button/button.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +31 -27
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/buttons/text-button/text-button.js +26 -22
- package/dist/features/ui/buttons/text-button/text-button.js.map +1 -1
- package/dist/features/ui/drawer/drawer-styled.js +34 -0
- package/dist/features/ui/drawer/drawer-styled.js.map +1 -0
- package/dist/features/ui/drawer/drawer.js +42 -0
- package/dist/features/ui/drawer/drawer.js.map +1 -0
- package/dist/features/ui/error/error.js +65 -27
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/grade-selector/grade-selector.js +33 -27
- package/dist/features/ui/grade-selector/grade-selector.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +25 -29
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +34 -58
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +40 -14
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +14 -7
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +13 -12
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/{stickers/sticker-selector/sticker-selector-styles.js → ui/sticker-grid/sticker-grid-styles.js} +3 -4
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker.js +57 -0
- package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
- package/dist/features/ui/stickers/constants.js +6 -0
- package/dist/features/ui/stickers/constants.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/effects.js → ui/stickers/stickers-effects.js} +6 -6
- package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/stickers-effects-styled.js → ui/stickers/stickers-styled.js} +2 -2
- package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
- package/dist/features/ui/stickers/stickers-utils.js +91 -0
- package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
- package/dist/features/ui/stickers/stickers.js +40 -0
- package/dist/features/ui/stickers/stickers.js.map +1 -0
- package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
- package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon.js +17 -15
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/tab/tab.js +30 -26
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/text/text.js +40 -36
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/constants.js +4 -2
- package/dist/features/ui/theme/constants.js.map +1 -1
- package/dist/features/ui/theme/get-device.js +3 -3
- package/dist/features/ui/theme/get-device.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +12 -13
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +29 -25
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +244 -255
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +45 -36
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +321 -325
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +281 -61
- package/dist/index.js +585 -537
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/calendar-purple.1a840b41.svg +1 -0
- package/dist/static/flying-disk.c7f6ed39.json +1 -0
- package/dist/static/graduation-cap.3be3340a.json +1 -0
- package/dist/static/handshake.287e7dfb.svg +1 -0
- package/dist/static/light-bulb.c6db0b23.json +1 -0
- package/dist/static/money.332aacf1.svg +1 -0
- package/dist/static/muscle.9bcfb8a7.json +1 -0
- package/dist/static/nudge-tap.0591aef4.json +1 -0
- package/dist/static/parent-avatar.822c7b9b.svg +1 -0
- package/dist/static/pencil.23df9da0.json +1 -0
- package/dist/static/plus-sign.de6af957.json +1 -0
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
- package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
- package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
- package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
- package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
- package/dist/static/racing-car.2cbf864e.json +1 -0
- package/dist/static/rocket.0a3ccab0.json +1 -0
- package/dist/static/shovel.abeec04c.json +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +1 -1
- package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
- package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
- package/dist/features/stickers/sticker-data.js +0 -234
- package/dist/features/stickers/sticker-data.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +0 -25
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker.js +0 -57
- package/dist/features/stickers/sticker-selector/sticker.js.map +0 -1
- package/dist/features/stickers/stickers-effects/effects.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js +0 -93
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +0 -39
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +0 -1
- package/dist/static/nudge-tap.5cb30093.json +0 -1057
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -0,0 +1,91 @@
|
|
1
|
+
const f = (n, s) => {
|
2
|
+
const t = Math.ceil(s / 4), r = Math.floor(n / t), d = n % t, M = ["top", "right", "bottom", "left"][r] ?? "left", h = (d + 0.5) / t * 100, i = (Math.random() - 0.5) * 25, o = Math.min(Math.max(h + i, 0), 100), a = 45 + Math.random() * 10, e = 45 + Math.random() * 10;
|
3
|
+
let l = 0, m = 0;
|
4
|
+
switch (M) {
|
5
|
+
case "top":
|
6
|
+
l = o - a, m = -e + i;
|
7
|
+
break;
|
8
|
+
case "right":
|
9
|
+
l = 100 - a + i, m = o - e;
|
10
|
+
break;
|
11
|
+
case "bottom":
|
12
|
+
l = o - a, m = 100 - e + i;
|
13
|
+
break;
|
14
|
+
case "left":
|
15
|
+
l = -a + i, m = o - e;
|
16
|
+
break;
|
17
|
+
}
|
18
|
+
return {
|
19
|
+
fromX: `${l}vw`,
|
20
|
+
fromY: `${m}vh`,
|
21
|
+
x: a,
|
22
|
+
y: e
|
23
|
+
};
|
24
|
+
}, g = (n, s = 10) => {
|
25
|
+
const t = [];
|
26
|
+
let r = 0;
|
27
|
+
const d = n;
|
28
|
+
for (; t.length < n && r < d; ) {
|
29
|
+
const c = Math.floor(Math.random() * (100 - 2 * s) + s);
|
30
|
+
t.every((M) => Math.abs(M - c) >= s) && t.push(c), r++;
|
31
|
+
}
|
32
|
+
for (; t.length < n; )
|
33
|
+
t.push(Math.floor(Math.random() * (100 - 2 * s) + s));
|
34
|
+
return t;
|
35
|
+
};
|
36
|
+
function x({
|
37
|
+
count: n,
|
38
|
+
effect: s,
|
39
|
+
stickers: t,
|
40
|
+
minSize: r,
|
41
|
+
maxSize: d
|
42
|
+
}) {
|
43
|
+
const c = 100 / n * 2, M = () => Math.random() * (d - r) + r, h = [], i = ["float_up", "fall_down"].includes(s) ? g(n, c) : [];
|
44
|
+
for (let o = 0; o < n; o++) {
|
45
|
+
const a = t[o % t.length] ?? "", e = M();
|
46
|
+
if (s === "float_up")
|
47
|
+
h.push({
|
48
|
+
id: o,
|
49
|
+
sticker: a,
|
50
|
+
x: i[o],
|
51
|
+
y: 110 + (Math.random() - 0.5) * e,
|
52
|
+
size: e
|
53
|
+
});
|
54
|
+
else if (s === "fall_down")
|
55
|
+
h.push({
|
56
|
+
id: o,
|
57
|
+
sticker: a,
|
58
|
+
x: i[o],
|
59
|
+
y: -10 + (Math.random() - 0.5) * e,
|
60
|
+
size: e
|
61
|
+
});
|
62
|
+
else if (s === "burst_from_edges") {
|
63
|
+
const { x: l, y: m, fromX: p, fromY: u } = f(o, n);
|
64
|
+
h.push({ id: o, sticker: a, x: l, y: m, fromX: p, fromY: u, size: e });
|
65
|
+
} else s === "pop_expand" ? h.push({
|
66
|
+
id: o,
|
67
|
+
sticker: a,
|
68
|
+
x: 50,
|
69
|
+
y: 100,
|
70
|
+
fromX: `${(Math.random() - 0.5) * 27.5}vw`,
|
71
|
+
fromY: `${-50 - Math.random() * 27.5}vh`,
|
72
|
+
size: e
|
73
|
+
}) : h.push({
|
74
|
+
id: o,
|
75
|
+
sticker: a,
|
76
|
+
x: Math.random() * 100,
|
77
|
+
y: Math.random() * 100,
|
78
|
+
size: e
|
79
|
+
});
|
80
|
+
}
|
81
|
+
return h;
|
82
|
+
}
|
83
|
+
const v = (n, s = 0.2) => {
|
84
|
+
const t = n * s, r = n - t, d = n + t;
|
85
|
+
return Math.floor(Math.random() * (d - r + 1)) + r;
|
86
|
+
};
|
87
|
+
export {
|
88
|
+
x as generateStickerData,
|
89
|
+
v as randomizeDuration
|
90
|
+
};
|
91
|
+
//# sourceMappingURL=stickers-utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-utils.js","sources":["../../../../src/features/ui/stickers/stickers-utils.ts"],"sourcesContent":["import type { StickerDatum, StickersProps } from './stickers-types';\n\nconst getBurstPosition = (\n index: number,\n total: number,\n): {\n fromX: string;\n fromY: string;\n x: number;\n y: number;\n} => {\n const countPerSide = Math.ceil(total / 4);\n const sideIndex = Math.floor(index / countPerSide);\n const pos = index % countPerSide;\n\n const sides = ['top', 'right', 'bottom', 'left'] as const;\n const side = sides[sideIndex] ?? 'left';\n\n const basePercent = ((pos + 0.5) / countPerSide) * 100;\n const jitter = (Math.random() - 0.5) * 25;\n const edgePercent = Math.min(Math.max(basePercent + jitter, 0), 100);\n\n const centerX = 45 + Math.random() * 10;\n const centerY = 45 + Math.random() * 10;\n\n let fromX = 0;\n let fromY = 0;\n\n switch (side) {\n case 'top':\n fromX = edgePercent - centerX;\n fromY = -centerY + jitter;\n break;\n case 'right':\n fromX = 100 - centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n case 'bottom':\n fromX = edgePercent - centerX;\n fromY = 100 - centerY + jitter;\n break;\n case 'left':\n fromX = -centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n }\n\n return {\n fromX: `${fromX}vw`,\n fromY: `${fromY}vh`,\n x: centerX,\n y: centerY,\n };\n};\n\nconst getRandomNonOverlappingPositions = (count: number, buffer = 10): number[] => {\n const used: number[] = [];\n let attempts = 0;\n const maxAttempts = count;\n\n while (used.length < count && attempts < maxAttempts) {\n const value = Math.floor(Math.random() * (100 - 2 * buffer) + buffer);\n\n if (used.every(v => Math.abs(v - value) >= buffer)) {\n used.push(value);\n }\n attempts++;\n }\n\n while (used.length < count) {\n used.push(Math.floor(Math.random() * (100 - 2 * buffer) + buffer));\n }\n\n return used;\n};\n\nexport function generateStickerData({\n count,\n effect,\n stickers,\n minSize,\n maxSize,\n}: {\n count: number;\n effect: StickersProps['effect'];\n stickers: string[];\n minSize: number;\n maxSize: number;\n}): StickerDatum[] {\n const buffer = (100 / count) * 2;\n const getSize = () => Math.random() * (maxSize - minSize) + minSize;\n const result: StickerDatum[] = [];\n const xPositions = ['float_up', 'fall_down'].includes(effect)\n ? getRandomNonOverlappingPositions(count, buffer)\n : [];\n\n for (let i = 0; i < count; i++) {\n const sticker = stickers[i % stickers.length] ?? '';\n const size = getSize();\n\n if (effect === 'float_up') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: 110 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'fall_down') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: -10 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'burst_from_edges') {\n const { x, y, fromX, fromY } = getBurstPosition(i, count);\n\n result.push({ id: i, sticker, x, y, fromX, fromY, size });\n } else if (effect === 'pop_expand') {\n result.push({\n id: i,\n sticker,\n x: 50,\n y: 100,\n fromX: `${(Math.random() - 0.5) * 27.5}vw`,\n fromY: `${-50 - Math.random() * 27.5}vh`,\n size,\n });\n } else {\n result.push({\n id: i,\n sticker,\n x: Math.random() * 100,\n y: Math.random() * 100,\n size,\n });\n }\n }\n\n return result;\n}\n\nexport const randomizeDuration = (base: number, variancePercent = 0.2): number => {\n const delta = base * variancePercent;\n const min = base - delta;\n const max = base + delta;\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n"],"names":["getBurstPosition","index","total","countPerSide","sideIndex","pos","side","basePercent","jitter","edgePercent","centerX","centerY","fromX","fromY","getRandomNonOverlappingPositions","count","buffer","used","attempts","maxAttempts","value","v","generateStickerData","effect","stickers","minSize","maxSize","getSize","result","xPositions","i","sticker","size","x","y","randomizeDuration","base","variancePercent","delta","min","max"],"mappings":"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"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
2
|
+
import { memo as E, useState as I, useLayoutEffect as l } from "react";
|
3
|
+
import { STICKER_MIN_SIZE as x, STICKER_MAX_SIZE as D } from "./constants.js";
|
4
|
+
import { Container as T, Sticker as _ } from "./stickers-styled.js";
|
5
|
+
import { generateStickerData as z } from "./stickers-utils.js";
|
6
|
+
const C = ({ stickers: i, effect: t, count: m, duration: r }) => {
|
7
|
+
const [c, s] = I([]);
|
8
|
+
return l(() => {
|
9
|
+
const e = z({
|
10
|
+
count: m,
|
11
|
+
effect: t,
|
12
|
+
stickers: i,
|
13
|
+
minSize: x,
|
14
|
+
maxSize: D
|
15
|
+
});
|
16
|
+
s(e);
|
17
|
+
const o = setTimeout(() => s([]), r);
|
18
|
+
return () => clearTimeout(o);
|
19
|
+
}, [i, t, m, r]), /* @__PURE__ */ a(T, { children: c.map((e) => {
|
20
|
+
const { id: o, sticker: n, x: S, y: k, size: p, fromX: u, fromY: f } = e;
|
21
|
+
return /* @__PURE__ */ a(
|
22
|
+
_,
|
23
|
+
{
|
24
|
+
effect: t,
|
25
|
+
duration: r,
|
26
|
+
fromX: u,
|
27
|
+
fromY: f,
|
28
|
+
x: S,
|
29
|
+
y: k,
|
30
|
+
size: p,
|
31
|
+
children: n
|
32
|
+
},
|
33
|
+
o
|
34
|
+
);
|
35
|
+
}) });
|
36
|
+
}, R = E(C);
|
37
|
+
export {
|
38
|
+
R as default
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=stickers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers.js","sources":["../../../../src/features/ui/stickers/stickers.tsx"],"sourcesContent":["import type { StickerDatum, StickersProps } from './stickers-types';\n\nimport React, { memo, useLayoutEffect, useState } from 'react';\n\nimport { STICKER_MAX_SIZE, STICKER_MIN_SIZE } from './constants';\nimport { Container, Sticker } from './stickers-styled';\nimport { generateStickerData } from './stickers-utils';\n\nconst Stickers: React.FC<StickersProps> = ({ stickers, effect, count, duration }) => {\n const [stickersData, setStickersData] = useState<ReturnType<typeof generateStickerData>>([]);\n\n useLayoutEffect(() => {\n const stickerData = generateStickerData({\n count,\n effect,\n stickers,\n minSize: STICKER_MIN_SIZE,\n maxSize: STICKER_MAX_SIZE,\n });\n\n setStickersData(stickerData);\n\n const timeout = setTimeout(() => setStickersData([]), duration);\n\n return () => clearTimeout(timeout);\n }, [stickers, effect, count, duration]);\n\n return (\n <Container>\n {stickersData.map((data: StickerDatum) => {\n const { id, sticker, x, y, size, fromX, fromY } = data;\n\n return (\n <Sticker\n key={id}\n effect={effect}\n duration={duration}\n fromX={fromX}\n fromY={fromY}\n x={x}\n y={y}\n size={size}\n >\n {sticker}\n </Sticker>\n );\n })}\n </Container>\n );\n};\n\nexport default memo(Stickers);\n"],"names":["Stickers","stickers","effect","count","duration","stickersData","setStickersData","useState","useLayoutEffect","stickerData","generateStickerData","STICKER_MIN_SIZE","STICKER_MAX_SIZE","timeout","jsx","Container","data","id","sticker","x","y","size","fromX","fromY","Sticker","memo"],"mappings":";;;;;AAQA,MAAMA,IAAoC,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,OAAAC,GAAO,UAAAC,QAAe;AACnF,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAiD,CAAE,CAAA;AAE3F,SAAAC,EAAgB,MAAM;AACpB,UAAMC,IAAcC,EAAoB;AAAA,MACtC,OAAAP;AAAA,MACA,QAAAD;AAAA,MACA,UAAAD;AAAA,MACA,SAASU;AAAA,MACT,SAASC;AAAA,IAAA,CACV;AAED,IAAAN,EAAgBG,CAAW;AAE3B,UAAMI,IAAU,WAAW,MAAMP,EAAgB,CAAE,CAAA,GAAGF,CAAQ;AAEvD,WAAA,MAAM,aAAaS,CAAO;AAAA,KAChC,CAACZ,GAAUC,GAAQC,GAAOC,CAAQ,CAAC,GAGnC,gBAAAU,EAAAC,GAAA,EACE,UAAaV,EAAA,IAAI,CAACW,MAAuB;AAClC,UAAA,EAAE,IAAAC,GAAI,SAAAC,GAAS,GAAAC,GAAG,GAAAC,GAAG,MAAAC,GAAM,OAAAC,GAAO,OAAAC,EAAU,IAAAP;AAGhD,WAAA,gBAAAF;AAAA,MAACU;AAAA,MAAA;AAAA,QAEC,QAAAtB;AAAA,QACA,UAAAE;AAAA,QACA,OAAAkB;AAAA,QACA,OAAAC;AAAA,QACA,GAAAJ;AAAA,QACA,GAAAC;AAAA,QACA,MAAAC;AAAA,QAEC,UAAAH;AAAA,MAAA;AAAA,MATID;AAAA,IAAA;AAAA,EAYV,CAAA,EACH,CAAA;AAEJ,GAEehB,IAAAwB,EAAKzB,CAAQ;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import i, { keyframes as o } from "styled-components";
|
2
2
|
const n = o`
|
3
3
|
66%{
|
4
4
|
opacity: 0;
|
@@ -6,29 +6,29 @@ const n = o`
|
|
6
6
|
33%{
|
7
7
|
opacity: 1;
|
8
8
|
}
|
9
|
-
`, a =
|
9
|
+
`, a = i.div`
|
10
10
|
height: 32px;
|
11
11
|
width: 32px;
|
12
12
|
display: flex;
|
13
13
|
align-items: center;
|
14
14
|
justify-content: center;
|
15
15
|
position: relative;
|
16
|
-
cursor: pointer;
|
17
|
-
`, s =
|
16
|
+
cursor: ${({ isInteractive: t }) => t ? "pointer" : "default"};
|
17
|
+
`, s = i.div`
|
18
18
|
height: 90%;
|
19
19
|
width: 90%;
|
20
20
|
position: absolute;
|
21
|
-
background: ${({ theme:
|
21
|
+
background: ${({ theme: t }) => t.colors.BLACK_1};
|
22
22
|
border-radius: 24px;
|
23
|
-
`, d =
|
23
|
+
`, d = i.div`
|
24
24
|
height: 90%;
|
25
25
|
width: 90%;
|
26
26
|
position: absolute;
|
27
|
-
background: ${({ theme:
|
27
|
+
background: ${({ theme: t }) => t.colors.RED};
|
28
28
|
border-radius: 32px;
|
29
29
|
animation: ${n}
|
30
|
-
${({ $blinkDelay:
|
31
|
-
`, c =
|
30
|
+
${({ $blinkDelay: t, $blinkDuration: e }) => `${e + t}ms linear infinite`};
|
31
|
+
`, c = i.div`
|
32
32
|
height: 100%;
|
33
33
|
width: 100%;
|
34
34
|
display: flex;
|
@@ -38,22 +38,22 @@ const n = o`
|
|
38
38
|
align-self: center;
|
39
39
|
padding-top: 6px;
|
40
40
|
z-index: 1;
|
41
|
-
`,
|
41
|
+
`, l = i.div`
|
42
42
|
position: absolute;
|
43
43
|
top: 0;
|
44
44
|
left: 0;
|
45
45
|
bottom: 0;
|
46
46
|
right: 0;
|
47
|
-
`,
|
47
|
+
`, p = i.img`
|
48
48
|
width: 100%;
|
49
49
|
height: 100%;
|
50
50
|
`;
|
51
51
|
export {
|
52
52
|
d as StreakBg,
|
53
53
|
c as StreakContent,
|
54
|
-
|
54
|
+
l as StreakImg,
|
55
55
|
s as StreakStaticBg,
|
56
56
|
a as StreakWrapper,
|
57
|
-
|
57
|
+
p as StyledImg
|
58
58
|
};
|
59
59
|
//# sourceMappingURL=streak-icon-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streak-icon-styled.js","sources":["../../../../src/features/ui/streak-icon/streak-icon-styled.tsx"],"sourcesContent":["import styled, { keyframes } from 'styled-components';\n\nconst fadeInFadeOut = keyframes`\n66%{\n opacity: 0;\n}\n33%{\n opacity: 1;\n}\n`;\n\nexport const StreakWrapper = styled.div
|
1
|
+
{"version":3,"file":"streak-icon-styled.js","sources":["../../../../src/features/ui/streak-icon/streak-icon-styled.tsx"],"sourcesContent":["import type { IStreakWrapperProps } from './streak-icon-types';\n\nimport styled, { keyframes } from 'styled-components';\n\nconst fadeInFadeOut = keyframes`\n66%{\n opacity: 0;\n}\n33%{\n opacity: 1;\n}\n`;\n\nexport const StreakWrapper = styled.div<IStreakWrapperProps>`\n height: 32px;\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: ${({ isInteractive }) => (isInteractive ? 'pointer' : 'default')};\n`;\n\nexport const StreakStaticBg = styled.div`\n height: 90%;\n width: 90%;\n position: absolute;\n background: ${({ theme }) => theme.colors.BLACK_1};\n border-radius: 24px;\n`;\n\nexport const StreakBg = styled.div<{ $blinkDuration: number; $blinkDelay: number }>`\n height: 90%;\n width: 90%;\n position: absolute;\n background: ${({ theme }) => theme.colors.RED};\n border-radius: 32px;\n animation: ${fadeInFadeOut}\n ${({ $blinkDelay, $blinkDuration }) => `${$blinkDuration + $blinkDelay}ms linear infinite`};\n`;\n\nexport const StreakContent = styled.div`\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n align-self: center;\n padding-top: 6px;\n z-index: 1;\n`;\n\nexport const StreakImg = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n`;\n\nexport const StyledImg = styled.img`\n width: 100%;\n height: 100%;\n`;\n"],"names":["fadeInFadeOut","keyframes","StreakWrapper","styled","isInteractive","StreakStaticBg","theme","StreakBg","$blinkDelay","$blinkDuration","StreakContent","StreakImg","StyledImg"],"mappings":";AAIA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOxB,CAAC,EAAE,eAAAC,EAAA,MAAqBA,IAAgB,YAAY,SAAU;AAAA,GAG7DC,IAAiBF,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIrB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAItCC,IAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA,gBAIf,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,GAAG;AAAA;AAAA,eAEhCN,CAAa;AAAA,MACtB,CAAC,EAAE,aAAAQ,GAAa,gBAAAC,QAAqB,GAAGA,IAAiBD,CAAW,oBAAoB;AAAA,GAGjFE,IAAgBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYvBQ,IAAYR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBS,IAAYT,EAAO;AAAA;AAAA;AAAA;"}
|
@@ -1,20 +1,22 @@
|
|
1
1
|
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import { BLINK_DURATION as
|
7
|
-
import { StreakWrapper as
|
8
|
-
const
|
9
|
-
/* @__PURE__ */
|
10
|
-
|
11
|
-
|
12
|
-
/* @__PURE__ */
|
13
|
-
|
2
|
+
import { memo as i } from "react";
|
3
|
+
import S from "../../../assets/illustrations/streak-green.svg.js";
|
4
|
+
import l from "../../../assets/illustrations/streak-white.svg.js";
|
5
|
+
import c from "../text/text.js";
|
6
|
+
import { BLINK_DURATION as k, BLINK_DELAY as p } from "./constants.js";
|
7
|
+
import { StreakWrapper as s, StreakStaticBg as f, StreakBg as d, StreakContent as I, StreakImg as $, StyledImg as o } from "./streak-icon-styled.js";
|
8
|
+
const g = i(
|
9
|
+
({ value: a, blink: t = !1, isInteractive: m = !0, ...n }) => /* @__PURE__ */ e(s, { isInteractive: m, ...n, children: [
|
10
|
+
/* @__PURE__ */ r(f, {}),
|
11
|
+
t && /* @__PURE__ */ r(d, { $blinkDuration: k, $blinkDelay: p }),
|
12
|
+
/* @__PURE__ */ e(I, { children: [
|
13
|
+
/* @__PURE__ */ r($, { children: t ? /* @__PURE__ */ r(o, { src: l, alt: "Streak" }) : /* @__PURE__ */ r(o, { src: S, alt: "Streak" }) }),
|
14
|
+
/* @__PURE__ */ r(c, { $renderAs: "ab3-bold", $color: "WHITE", $align: "center", children: a })
|
15
|
+
] })
|
14
16
|
] })
|
15
|
-
|
17
|
+
), G = g;
|
16
18
|
export {
|
17
|
-
|
18
|
-
|
19
|
+
g as StreakIcon,
|
20
|
+
G as default
|
19
21
|
};
|
20
22
|
//# sourceMappingURL=streak-icon.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streak-icon.js","sources":["../../../../src/features/ui/streak-icon/streak-icon.tsx"],"sourcesContent":["import type { IStreakIconProps } from './streak-icon-types';\n\nimport React, { memo } from 'react';\n\nimport StreakGreenSVG from '../../../assets/illustrations/streak-green.svg';\nimport StreakWhiteSVG from '../../../assets/illustrations/streak-white.svg';\nimport Text from '../text/text';\nimport { BLINK_DELAY, BLINK_DURATION } from './constants';\nimport * as S from './streak-icon-styled';\n\nexport const StreakIcon: React.FC<IStreakIconProps> = memo(({ value, blink = false, ...rest }) => {\n
|
1
|
+
{"version":3,"file":"streak-icon.js","sources":["../../../../src/features/ui/streak-icon/streak-icon.tsx"],"sourcesContent":["import type { IStreakIconProps } from './streak-icon-types';\n\nimport React, { memo } from 'react';\n\nimport StreakGreenSVG from '../../../assets/illustrations/streak-green.svg';\nimport StreakWhiteSVG from '../../../assets/illustrations/streak-white.svg';\nimport Text from '../text/text';\nimport { BLINK_DELAY, BLINK_DURATION } from './constants';\nimport * as S from './streak-icon-styled';\n\nexport const StreakIcon: React.FC<IStreakIconProps> = memo(\n ({ value, blink = false, isInteractive = true, ...rest }) => {\n return (\n <S.StreakWrapper isInteractive={isInteractive} {...rest}>\n <S.StreakStaticBg />\n {blink && <S.StreakBg $blinkDuration={BLINK_DURATION} $blinkDelay={BLINK_DELAY} />}\n <S.StreakContent>\n <S.StreakImg>\n {blink ? (\n <S.StyledImg src={StreakWhiteSVG} alt=\"Streak\" />\n ) : (\n <S.StyledImg src={StreakGreenSVG} alt=\"Streak\" />\n )}\n </S.StreakImg>\n <Text $renderAs=\"ab3-bold\" $color=\"WHITE\" $align=\"center\">\n {value}\n </Text>\n </S.StreakContent>\n </S.StreakWrapper>\n );\n },\n);\n\nexport default StreakIcon;\n"],"names":["StreakIcon","memo","value","blink","isInteractive","rest","S.StreakWrapper","jsx","S.StreakStaticBg","S.StreakBg","BLINK_DURATION","BLINK_DELAY","jsxs","S.StreakContent","S.StreakImg","S.StyledImg","StreakWhiteSVG","StreakGreenSVG","Text","StreakIcon$1"],"mappings":";;;;;;;AAUO,MAAMA,IAAyCC;AAAA,EACpD,CAAC,EAAE,OAAAC,GAAO,OAAAC,IAAQ,IAAO,eAAAC,IAAgB,IAAM,GAAGC,0BAE7CC,GAAA,EAAgB,eAAAF,GAA+B,GAAGC,GACjD,UAAA;AAAA,IAAC,gBAAAE,EAAAC,GAAA,EAAiB;AAAA,IACjBL,uBAAUM,GAAA,EAAW,gBAAgBC,GAAgB,aAAaC,GAAa;AAAA,IAChF,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EACE,UAAAX,sBACEY,GAAA,EAAY,KAAKC,GAAgB,KAAI,UAAS,sBAE9CD,GAAA,EAAY,KAAKE,GAAgB,KAAI,SAAS,CAAA,GAEnD;AAAA,MACA,gBAAAV,EAACW,KAAK,WAAU,YAAW,QAAO,SAAQ,QAAO,UAC9C,UACHhB,EAAA,CAAA;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAGN,GAEAiB,IAAenB;"}
|
@@ -1,40 +1,44 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { useTheme as
|
4
|
-
import
|
5
|
-
import {
|
6
|
-
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { memo as h, useMemo as C } from "react";
|
3
|
+
import { useTheme as E } from "styled-components";
|
4
|
+
import y from "../text/text.js";
|
5
|
+
import { EDeviceType as a } from "../theme/constants.js";
|
6
|
+
import { TabWrapper as A } from "./tab-styled.js";
|
7
|
+
const B = h(
|
7
8
|
({
|
8
|
-
$renderAs:
|
9
|
+
$renderAs: p = "primary",
|
9
10
|
$size: r = "regular",
|
10
|
-
|
11
|
-
$
|
12
|
-
|
13
|
-
$
|
14
|
-
|
15
|
-
|
11
|
+
$sizeOnMobile: o,
|
12
|
+
$sizeOnTablet: t,
|
13
|
+
label: c,
|
14
|
+
$selected: n,
|
15
|
+
$width: i,
|
16
|
+
$disabled: f,
|
17
|
+
onClick: u,
|
18
|
+
shape: s = "square"
|
16
19
|
}) => {
|
17
20
|
const {
|
18
|
-
tab: { sizes:
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
tab: { sizes: T },
|
22
|
+
device: e
|
23
|
+
} = E(), d = C(() => e <= a.MOBILE ? o || t || r : e <= a.TABLET && t || r, [e, r, o, t]), x = T[d].textVariant;
|
24
|
+
return /* @__PURE__ */ m(
|
25
|
+
A,
|
22
26
|
{
|
23
|
-
$selected:
|
24
|
-
$width:
|
25
|
-
onClick:
|
27
|
+
$selected: n,
|
28
|
+
$width: i,
|
29
|
+
onClick: u,
|
26
30
|
$size: r,
|
27
|
-
$renderAs:
|
28
|
-
$disabled:
|
31
|
+
$renderAs: p,
|
32
|
+
$disabled: f,
|
29
33
|
$justifyContent: "center",
|
30
34
|
$alignItems: "center",
|
31
|
-
$shape:
|
32
|
-
children: /* @__PURE__ */
|
35
|
+
$shape: s,
|
36
|
+
children: /* @__PURE__ */ m(y, { $renderAs: x, color: n ? "WHITE" : "BLACK", children: c })
|
33
37
|
}
|
34
38
|
);
|
35
39
|
}
|
36
|
-
),
|
40
|
+
), V = B;
|
37
41
|
export {
|
38
|
-
|
42
|
+
V as default
|
39
43
|
};
|
40
44
|
//# sourceMappingURL=tab.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/tab/tab.tsx"],"sourcesContent":["import type { ITabProps } from './tab-types';\n\nimport React, { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../text/text';\nimport * as Styled from './tab-styled';\n\nconst TabComponent: React.FC<ITabProps> = memo(\n ({\n $renderAs = 'primary',\n $size = 'regular',\n label,\n $selected,\n $width,\n $disabled,\n onClick,\n shape = 'square',\n }) => {\n const {\n tab: { sizes },\n } = useTheme();\n\n return (\n <Styled.TabWrapper\n $selected={$selected}\n $width={$width}\n onClick={onClick}\n $size={$size}\n $renderAs={$renderAs}\n $disabled={$disabled}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $shape={shape}\n >\n <Text $renderAs={
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/tab/tab.tsx"],"sourcesContent":["import type { ITabProps } from './tab-types';\n\nimport React, { memo, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../text/text';\nimport { EDeviceType } from '../theme/constants';\nimport * as Styled from './tab-styled';\n\nconst TabComponent: React.FC<ITabProps> = memo(\n ({\n $renderAs = 'primary',\n $size = 'regular',\n $sizeOnMobile,\n $sizeOnTablet,\n label,\n $selected,\n $width,\n $disabled,\n onClick,\n shape = 'square',\n }) => {\n const {\n tab: { sizes },\n device,\n } = useTheme();\n\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return $sizeOnMobile || $sizeOnTablet || $size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return $sizeOnTablet || $size;\n }\n\n return $size;\n }, [device, $size, $sizeOnMobile, $sizeOnTablet]);\n\n const textVariant = sizes[renderSize].textVariant;\n\n return (\n <Styled.TabWrapper\n $selected={$selected}\n $width={$width}\n onClick={onClick}\n $size={$size}\n $renderAs={$renderAs}\n $disabled={$disabled}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $shape={shape}\n >\n <Text $renderAs={textVariant} color={$selected ? 'WHITE' : 'BLACK'}>\n {label}\n </Text>\n </Styled.TabWrapper>\n );\n },\n);\n\nexport default TabComponent;\n"],"names":["TabComponent","memo","$renderAs","$size","$sizeOnMobile","$sizeOnTablet","label","$selected","$width","$disabled","onClick","shape","sizes","device","useTheme","renderSize","useMemo","EDeviceType","textVariant","jsx","Styled.TabWrapper","Text","TabComponent$1"],"mappings":";;;;;;AASA,MAAMA,IAAoCC;AAAA,EACxC,CAAC;AAAA,IACC,WAAAC,IAAY;AAAA,IACZ,OAAAC,IAAQ;AAAA,IACR,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EAAA,MACJ;AACE,UAAA;AAAA,MACJ,KAAK,EAAE,OAAAC,EAAM;AAAA,MACb,QAAAC;AAAA,QACEC,EAAS,GAEPC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBb,KAAiBC,KAAiBF,IAGvCU,KAAUI,EAAY,UACjBZ,KAAiBF,GAIzB,CAACU,GAAQV,GAAOC,GAAeC,CAAa,CAAC,GAE1Ca,IAAcN,EAAMG,CAAU,EAAE;AAGpC,WAAA,gBAAAI;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,WAAAb;AAAA,QACA,QAAAC;AAAA,QACA,SAAAE;AAAA,QACA,OAAAP;AAAA,QACA,WAAAD;AAAA,QACA,WAAAO;AAAA,QACA,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,QAAQE;AAAA,QAER,UAAA,gBAAAQ,EAACE,KAAK,WAAWH,GAAa,OAAOX,IAAY,UAAU,SACxD,UACHD,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF,GAEAgB,IAAetB;"}
|
@@ -1,50 +1,54 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import { useMemo as C } from "react";
|
2
|
+
import F from "styled-components";
|
3
|
+
import { EDeviceType as y } from "../theme/constants.js";
|
4
|
+
const $ = F.div(
|
3
5
|
({
|
4
|
-
theme:
|
5
|
-
$renderAs:
|
6
|
+
theme: g,
|
7
|
+
$renderAs: t,
|
6
8
|
$color: n,
|
7
|
-
$align:
|
8
|
-
$width:
|
9
|
-
$widthX:
|
10
|
-
$marginBottom:
|
11
|
-
$marginBottomX:
|
9
|
+
$align: T = "left",
|
10
|
+
$width: e,
|
11
|
+
$widthX: f,
|
12
|
+
$marginBottom: o,
|
13
|
+
$marginBottomX: r,
|
12
14
|
$alignSelf: l,
|
13
|
-
$opacity:
|
14
|
-
$inline:
|
15
|
-
$textDecoration:
|
16
|
-
$whiteSpace:
|
15
|
+
$opacity: b = 1,
|
16
|
+
$inline: v,
|
17
|
+
$textDecoration: x,
|
18
|
+
$whiteSpace: a,
|
19
|
+
$renderOnMobileAs: c,
|
20
|
+
$renderOnTabletAs: i
|
17
21
|
}) => {
|
18
|
-
const { text:
|
19
|
-
fontFamily:
|
20
|
-
fontSize:
|
21
|
-
lineHeight:
|
22
|
+
const { text: E, colors: m, layout: u, device: p } = g, L = C(() => p <= y.MOBILE ? c || i || t : p <= y.TABLET && i || t, [p, t, c, i]), {
|
23
|
+
fontFamily: h,
|
24
|
+
fontSize: k,
|
25
|
+
lineHeight: z,
|
22
26
|
letterSpacing: s,
|
23
|
-
textTransform:
|
24
|
-
} =
|
27
|
+
textTransform: d = "none"
|
28
|
+
} = E[L];
|
25
29
|
return `
|
26
|
-
display: ${
|
27
|
-
font-family: ${
|
28
|
-
font-size: ${
|
29
|
-
text-align: ${
|
30
|
-
line-height: ${
|
31
|
-
text-transform: ${
|
30
|
+
display: ${v ? "inline-block" : "block"};
|
31
|
+
font-family: ${h};
|
32
|
+
font-size: ${k}px;
|
33
|
+
text-align: ${T};
|
34
|
+
line-height: ${z}px;
|
35
|
+
text-transform: ${d};
|
32
36
|
${typeof s == "number" ? `letter-spacing: ${s}px;` : ""}
|
33
|
-
color: ${n ?
|
34
|
-
opacity: ${
|
35
|
-
width: ${
|
36
|
-
${
|
37
|
-
margin-bottom: ${
|
38
|
-
${
|
37
|
+
color: ${n ? m[n] : m.BLACK};
|
38
|
+
opacity: ${b};
|
39
|
+
width: ${e ? `${e}` : "auto"}${typeof e == "number" ? "px" : ""};
|
40
|
+
${f ? `width: ${f * u.gutter}px;` : ""}
|
41
|
+
margin-bottom: ${o ? `${o}` : "initial"}${typeof o == "number" ? "px" : ""};
|
42
|
+
${r ? `margin-bottom: ${r * u.gutter}px;` : ""}
|
39
43
|
${l ? `align-self: ${l};` : ""}
|
40
|
-
${
|
41
|
-
${
|
44
|
+
${x ? `text-decoration: ${x};` : ""}
|
45
|
+
${a ? `white-space: ${a};` : ""}
|
42
46
|
`;
|
43
47
|
}
|
44
48
|
);
|
45
|
-
|
46
|
-
const
|
49
|
+
$.displayName = "Text";
|
50
|
+
const M = $;
|
47
51
|
export {
|
48
|
-
|
52
|
+
M as default
|
49
53
|
};
|
50
54
|
//# sourceMappingURL=text.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport styled from 'styled-components';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n}\n\n/**\n * @param $renderAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n }) => {\n const { text, colors, layout } = theme;\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport { useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n $renderOnMobileAs?: TTextVariants;\n $renderOnTabletAs?: TTextVariants;\n}\n\n/**\n * @param $renderAs (fallback for any device), @param $renderOnMobileAs, @param $renderOnTabletAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n $renderOnMobileAs,\n $renderOnTabletAs,\n }) => {\n const { text, colors, layout, device } = theme;\n const renderAs = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return $renderOnMobileAs || $renderOnTabletAs || $renderAs;\n }\n\n if (device <= EDeviceType.TABLET) {\n return $renderOnTabletAs || $renderAs;\n }\n\n return $renderAs;\n }, [device, $renderAs, $renderOnMobileAs, $renderOnTabletAs]);\n\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[renderAs];\n\n return `\n display: ${$inline ? 'inline-block' : 'block'};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n text-align: ${$align};\n line-height: ${lineHeight}px;\n text-transform: ${textTransform};\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n color: ${$color ? colors[$color] : colors.BLACK};\n opacity: ${$opacity};\n width: ${$width ? `${$width}` : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n margin-bottom: ${$marginBottom ? `${$marginBottom}` : 'initial'}${\n typeof $marginBottom === 'number' ? 'px' : ''\n };\n ${$marginBottomX ? `margin-bottom: ${$marginBottomX * layout.gutter}px;` : ''}\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n ${$textDecoration ? `text-decoration: ${$textDecoration};` : ''}\n ${$whiteSpace ? `white-space: ${$whiteSpace};` : ''}\n `;\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["Text","styled","theme","$renderAs","$color","$align","$width","$widthX","$marginBottom","$marginBottomX","$alignSelf","$opacity","$inline","$textDecoration","$whiteSpace","$renderOnMobileAs","$renderOnTabletAs","text","colors","layout","device","renderAs","useMemo","EDeviceType","fontFamily","fontSize","lineHeight","letterSpacing","textTransform","Text$1"],"mappings":";;;AA2BA,MAAMA,IAAOC,EAAO;AAAA,EAClB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,MAAAC,GAAM,QAAAC,GAAQ,QAAAC,GAAQ,QAAAC,MAAWlB,GACnCmB,IAAWC,EAAQ,MACnBF,KAAUG,EAAY,SACjBR,KAAqBC,KAAqBb,IAG/CiB,KAAUG,EAAY,UACjBP,KAAqBb,GAI7B,CAACiB,GAAQjB,GAAWY,GAAmBC,CAAiB,CAAC,GAEtD;AAAA,MACJ,YAAAQ;AAAA,MACA,UAAAC;AAAA,MACA,YAAAC;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC,IAAgB;AAAA,IAAA,IACdX,EAAKI,CAAQ;AAEV,WAAA;AAAA,iBACMT,IAAU,iBAAiB,OAAO;AAAA,qBAC9BY,CAAU;AAAA,mBACZC,CAAQ;AAAA,oBACPpB,CAAM;AAAA,qBACLqB,CAAU;AAAA,wBACPE,CAAa;AAAA,QAC7B,OAAOD,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA,eACvEvB,IAASc,EAAOd,CAAM,IAAIc,EAAO,KAAK;AAAA,iBACpCP,CAAQ;AAAA,eACVL,IAAS,GAAGA,CAAM,KAAK,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QAC7EC,IAAU,UAAUA,IAAUY,EAAO,MAAM,QAAQ,EAAE;AAAA,uBACtCX,IAAgB,GAAGA,CAAa,KAAK,SAAS,GAC7D,OAAOA,KAAkB,WAAW,OAAO,EAC7C;AAAA,QACEC,IAAiB,kBAAkBA,IAAiBU,EAAO,MAAM,QAAQ,EAAE;AAAA,QAC3ET,IAAa,eAAeA,CAAU,MAAM,EAAE;AAAA,QAC9CG,IAAkB,oBAAoBA,CAAe,MAAM,EAAE;AAAA,QAC7DC,IAAc,gBAAgBA,CAAW,MAAM,EAAE;AAAA;AAAA,EAEvD;AACF;AAEAd,EAAK,cAAc;AAEnB,MAAA6B,IAAe7B;"}
|