@cuemath/leap 3.0.11-j4 → 3.0.12-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 +0 -3
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +0 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +27 -16
- 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 +32 -30
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +16 -15
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +2 -2
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +30 -30
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +35 -35
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +44 -44
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/homework/homework-card.js +146 -131
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +28 -28
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +40 -38
- 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/milestone-tabs/milestone-tabs.js +53 -50
- 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-widget.js +64 -62
- 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-container.js +44 -42
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +39 -37
- 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 +38 -31
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/index.d.ts +2 -284
- package/dist/index.js +321 -367
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/assets/illustrations/loader-1.svg.js +0 -6
- package/dist/assets/illustrations/loader-1.svg.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon.js +0 -48
- package/dist/assets/line-icons/icons/apple-icon.js.map +0 -1
- package/dist/assets/line-icons/icons/google-icon.js +0 -42
- package/dist/assets/line-icons/icons/google-icon.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector.js +0 -43
- package/dist/features/auth/account-selector/account-selector.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +0 -12
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +0 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +0 -18
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +0 -1
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +0 -21
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +0 -29
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +0 -9
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/hooks/use-resend-timer.js +0 -24
- package/dist/features/auth/comps/resend-otp/hooks/use-resend-timer.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +0 -65
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +0 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +0 -23
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +0 -23
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs.js +0 -9
- package/dist/features/auth/comps/tabs/tabs.js.map +0 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +0 -12
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +0 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +0 -63
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +0 -1
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +0 -100
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +0 -1
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +0 -68
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +0 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +0 -12
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +0 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +0 -89
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +0 -1
- package/dist/features/auth/login/login-constants.js +0 -14
- package/dist/features/auth/login/login-constants.js.map +0 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +0 -32
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +0 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +0 -47
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +0 -1
- package/dist/features/auth/login/username-password-form/username-password-form.js +0 -88
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +0 -56
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +0 -131
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +0 -53
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js +0 -33
- package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +0 -98
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js +0 -57
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js +0 -26
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +0 -30
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +0 -95
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js +0 -88
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js +0 -59
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js +0 -31
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js +0 -31
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js +0 -11
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +0 -29
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js +0 -9
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js.map +0 -1
- package/dist/features/auth/signup/signup-constants.js +0 -1031
- package/dist/features/auth/signup/signup-constants.js.map +0 -1
- package/dist/features/auth/signup/signup-methods/signup-methods.js +0 -69
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +0 -19
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +0 -62
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +0 -24
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +0 -85
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +0 -1
- package/dist/features/auth/user-list/user-item/user-item-styled.js +0 -21
- package/dist/features/auth/user-list/user-item/user-item-styled.js.map +0 -1
- package/dist/features/auth/user-list/user-item/user-item.js +0 -48
- package/dist/features/auth/user-list/user-item/user-item.js.map +0 -1
- package/dist/features/auth/user-list/user-list-styled.js +0 -19
- package/dist/features/auth/user-list/user-list-styled.js.map +0 -1
- package/dist/features/auth/user-list/user-list.js +0 -56
- package/dist/features/auth/user-list/user-list.js.map +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -332
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -370
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -252
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -24
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -192
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -19
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -18
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/dist/index.es.js +0 -2700
- package/dist/node_modules/react-datepicker/dist/index.es.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +0 -518
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +0 -53
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +0 -17
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +0 -18
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -32
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -156
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +0 -111
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +0 -42
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -46
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -31
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -100
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +0 -68
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +0 -104
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +0 -88
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +0 -123
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +0 -1
- package/dist/static/avatar-selected.860ee923.json +0 -1
- package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +0 -1
- package/dist/static/cuemath-app-qr-code.4beefe48.svg +0 -1
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +0 -1
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/dob.9ce3c15b.json +0 -1
- package/dist/static/error.cbe1ddde.json +0 -1
- package/dist/static/grade.b3730524.json +0 -1
- package/dist/static/key.d6846476.json +0 -1
- package/dist/static/mail.c30e8708.json +0 -1
- package/dist/static/otp.2d08f874.json +0 -1
- package/dist/static/otp.a3029760.json +0 -1
- package/dist/static/parent-avatar.772d53e0.json +0 -1
- package/dist/static/phone-number.0be312ea.json +0 -1
- package/dist/static/phone-number.84f55562.json +0 -1
- package/dist/static/student-avatar.524226bd.json +0 -1
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.aad0b059.svg +0 -1
- package/dist/static/username.9e034d51.json +0 -1
@@ -1,18 +1,18 @@
|
|
1
|
-
import { jsx as e, jsxs as l, Fragment as
|
2
|
-
import { memo as
|
1
|
+
import { jsx as e, jsxs as l, Fragment as B } from "react/jsx-runtime";
|
2
|
+
import { memo as D, useCallback as d, useEffect as H } from "react";
|
3
3
|
import { IMAGES as v } from "../../../../assets/images/images.js";
|
4
4
|
import G from "../../../../assets/line-icons/icons/plus.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
5
|
+
import O from "../../../../assets/line-icons/icons/search.js";
|
6
|
+
import X from "../../../sheet-v2/resource-list/resource-list.js";
|
7
|
+
import q from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
8
|
+
import R from "../../../ui/buttons/button/button.js";
|
9
|
+
import z from "../../../ui/buttons/icon-button/icon-button.js";
|
10
|
+
import b from "../../../ui/layout/flex-view.js";
|
11
|
+
import F from "../../../ui/loader/app-loader/app-loader.js";
|
12
12
|
import C from "../../../ui/text/text.js";
|
13
|
-
import { useGetMilestoneResources as
|
14
|
-
import { MilestoneResourcesWrapper as m, SearchButtonWrapper as
|
15
|
-
const
|
13
|
+
import { useGetMilestoneResources as L } from "../../milestone-list-container/api/get-milestone-resources.js";
|
14
|
+
import { MilestoneResourcesWrapper as m, SearchButtonWrapper as U, SearchButtonCover as V, DefaultWrapper as E } from "./resources-list-styled.js";
|
15
|
+
const ce = D((M) => {
|
16
16
|
const {
|
17
17
|
isDraftMilestone: u,
|
18
18
|
isMilestoneActive: t,
|
@@ -26,40 +26,41 @@ const ae = B((M) => {
|
|
26
26
|
onNodeReview: S,
|
27
27
|
onNodeReset: x,
|
28
28
|
onNodeUnassign: W,
|
29
|
-
onNodeReattempt: j
|
29
|
+
onNodeReattempt: j,
|
30
|
+
onNodeAssignAsHomework: k
|
30
31
|
} = M, f = p === "TEACHER", g = !h || !t || t && u, {
|
31
32
|
get: $,
|
32
33
|
isProcessed: n,
|
33
34
|
isProcessing: A,
|
34
35
|
isProcessingFailed: i,
|
35
|
-
isStale:
|
36
|
+
isStale: w,
|
36
37
|
data: a
|
37
|
-
} =
|
38
|
+
} = L(), y = d(() => {
|
38
39
|
r && $(r, void 0, {
|
39
40
|
studentId: o
|
40
41
|
});
|
41
42
|
}, [o, r, $]), c = d(() => {
|
42
|
-
|
43
|
-
}, [
|
44
|
-
|
45
|
-
!A && (!n && !i ||
|
46
|
-
}, [c, n, A, i,
|
47
|
-
const
|
43
|
+
y();
|
44
|
+
}, [y]);
|
45
|
+
H(() => {
|
46
|
+
!A && (!n && !i || w) && c();
|
47
|
+
}, [c, n, A, i, w]);
|
48
|
+
const I = d(() => {
|
48
49
|
if (typeof s != "function")
|
49
50
|
throw new Error("onAssignResources must be a function");
|
50
51
|
if (!r) throw new Error("userMilestoneId is required");
|
51
52
|
s(r);
|
52
|
-
}, [s, r]),
|
53
|
+
}, [s, r]), N = a && a.length > 0;
|
53
54
|
return i ? /* @__PURE__ */ e(
|
54
55
|
m,
|
55
56
|
{
|
56
57
|
$alignItems: "center",
|
57
58
|
$justifyContent: "center",
|
58
59
|
$background: "WHITE",
|
59
|
-
children: /* @__PURE__ */ l(
|
60
|
+
children: /* @__PURE__ */ l(b, { $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
|
60
61
|
/* @__PURE__ */ e(C, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
61
62
|
/* @__PURE__ */ e(
|
62
|
-
|
63
|
+
R,
|
63
64
|
{
|
64
65
|
widthX: 14,
|
65
66
|
size: "small",
|
@@ -71,9 +72,9 @@ const ae = B((M) => {
|
|
71
72
|
)
|
72
73
|
] })
|
73
74
|
}
|
74
|
-
) : n ? /* @__PURE__ */ e(m, { $justifyContent: "space-between", children:
|
75
|
+
) : n ? /* @__PURE__ */ e(m, { $justifyContent: "space-between", children: N ? /* @__PURE__ */ l(B, { children: [
|
75
76
|
/* @__PURE__ */ e(
|
76
|
-
|
77
|
+
X,
|
77
78
|
{
|
78
79
|
sheets: a,
|
79
80
|
userType: p,
|
@@ -83,32 +84,33 @@ const ae = B((M) => {
|
|
83
84
|
onNodeReattempt: j,
|
84
85
|
onNodeReset: x,
|
85
86
|
onNodeUnassign: W,
|
87
|
+
onNodeAssignAsHomework: k,
|
86
88
|
studentId: o,
|
87
89
|
userMilestoneId: r
|
88
90
|
}
|
89
91
|
),
|
90
92
|
f && h && /* @__PURE__ */ e(
|
91
|
-
|
93
|
+
U,
|
92
94
|
{
|
93
95
|
$flexDirection: "row",
|
94
96
|
$justifyContent: "flex-end",
|
95
97
|
$gapX: 1,
|
96
98
|
$gutterX: 1,
|
97
|
-
children: /* @__PURE__ */ e(
|
98
|
-
|
99
|
+
children: /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
|
100
|
+
z,
|
99
101
|
{
|
100
|
-
Icon:
|
102
|
+
Icon: O,
|
101
103
|
renderAs: "secondary",
|
102
104
|
size: "small",
|
103
105
|
analyticsLabel: "Milestone Resource Search",
|
104
|
-
onClick:
|
106
|
+
onClick: I,
|
105
107
|
disabled: !t
|
106
108
|
}
|
107
109
|
) })
|
108
110
|
}
|
109
111
|
)
|
110
112
|
] }) : /* @__PURE__ */ l(
|
111
|
-
|
113
|
+
b,
|
112
114
|
{
|
113
115
|
$width: "100%",
|
114
116
|
$height: "100%",
|
@@ -118,21 +120,21 @@ const ae = B((M) => {
|
|
118
120
|
children: [
|
119
121
|
/* @__PURE__ */ e(E, { $isImageWrapper: !0, children: /* @__PURE__ */ e("img", { src: v.BG_EMPTY_RESOURCES, alt: "Empty resources", width: 420, height: 420 }) }),
|
120
122
|
/* @__PURE__ */ e(E, { children: f ? /* @__PURE__ */ e(
|
121
|
-
|
123
|
+
q,
|
122
124
|
{
|
123
125
|
renderAs: "primary",
|
124
126
|
position: "bottom",
|
125
127
|
hidden: !g,
|
126
128
|
tooltipItem: u ? "Allowed after plan is published" : "Plan is completed",
|
127
129
|
children: /* @__PURE__ */ e(
|
128
|
-
|
130
|
+
R,
|
129
131
|
{
|
130
132
|
renderAs: "primary",
|
131
133
|
label: "Assign Resource",
|
132
134
|
Icon: G,
|
133
135
|
shape: "square",
|
134
136
|
size: "small",
|
135
|
-
onClick:
|
137
|
+
onClick: I,
|
136
138
|
disabled: g
|
137
139
|
}
|
138
140
|
)
|
@@ -140,9 +142,9 @@ const ae = B((M) => {
|
|
140
142
|
) : /* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: "Wait for the teacher to assign a resource" }) })
|
141
143
|
]
|
142
144
|
}
|
143
|
-
) }) : /* @__PURE__ */ e(m, { $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ e(
|
145
|
+
) }) : /* @__PURE__ */ e(m, { $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ e(F, { height: "100%" }) });
|
144
146
|
});
|
145
147
|
export {
|
146
|
-
|
148
|
+
ce as default
|
147
149
|
};
|
148
150
|
//# sourceMappingURL=resources-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resources-list.js","sources":["../../../../../src/features/milestone/milestone-resources/resources-list/resources-list.tsx"],"sourcesContent":["import type { IMilestoneWidgetResourcesProps } from './resources-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport SearchIcon from '../../../../assets/line-icons/icons/search';\nimport ResourcesList from '../../../sheet-v2/resource-list/resource-list';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useGetMilestoneResources } from '../../milestone-list-container/api/get-milestone-resources';\nimport * as Styled from './resources-list-styled';\n\nconst MilestoneWidgetResources: FC<IMilestoneWidgetResourcesProps> = memo(props => {\n const {\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReset,\n onNodeUnassign,\n onNodeReattempt,\n } = props;\n\n const isTeacher = userType === 'TEACHER';\n const isEPSheetCreationDisabled =\n !canUpdatePlan || !isMilestoneActive || (isMilestoneActive && isDraftMilestone);\n\n const {\n get: getMilestoneResources,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n isStale,\n data: sheets,\n } = useGetMilestoneResources();\n\n const fetchMilestoneResources = useCallback(() => {\n if (userMilestoneId) {\n getMilestoneResources(userMilestoneId, undefined, {\n studentId,\n });\n }\n }, [studentId, userMilestoneId, getMilestoneResources]);\n\n const handleOnTryAgain = useCallback(() => {\n fetchMilestoneResources();\n }, [fetchMilestoneResources]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnAssignResources = useCallback(() => {\n if (typeof onAssignResources !== 'function')\n throw new Error('onAssignResources must be a function');\n\n if (!userMilestoneId) throw new Error('userMilestoneId is required');\n\n onAssignResources(userMilestoneId);\n }, [onAssignResources, userMilestoneId]);\n\n const sheetsDataPresent = sheets && sheets.length > 0;\n\n if (isProcessingFailed) {\n return (\n <Styled.MilestoneResourcesWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <FlexView $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n if (isProcessed) {\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"space-between\">\n {sheetsDataPresent ? (\n <>\n <ResourcesList\n sheets={sheets}\n userType={userType}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n studentId={studentId}\n userMilestoneId={userMilestoneId}\n />\n\n {isTeacher && canUpdatePlan && (\n <Styled.SearchButtonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.SearchButtonCover>\n <IconButton\n Icon={SearchIcon}\n renderAs=\"secondary\"\n size=\"small\"\n analyticsLabel=\"Milestone Resource Search\"\n onClick={handleOnAssignResources}\n disabled={!isMilestoneActive}\n />\n </Styled.SearchButtonCover>\n </Styled.SearchButtonWrapper>\n )}\n </>\n ) : (\n <FlexView\n $width=\"100%\"\n $height=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $background=\"WHITE\"\n >\n <Styled.DefaultWrapper $isImageWrapper>\n <img src={IMAGES.BG_EMPTY_RESOURCES} alt=\"Empty resources\" width={420} height={420} />\n </Styled.DefaultWrapper>\n\n <Styled.DefaultWrapper>\n {isTeacher ? (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isEPSheetCreationDisabled}\n tooltipItem={\n isDraftMilestone ? 'Allowed after plan is published' : 'Plan is completed'\n }\n >\n <Button\n renderAs=\"primary\"\n label=\"Assign Resource\"\n Icon={PlusIcon}\n shape=\"square\"\n size=\"small\"\n onClick={handleOnAssignResources}\n disabled={isEPSheetCreationDisabled}\n />\n </ArrowTooltip>\n ) : (\n <Text $renderAs=\"ab2-bold\">Wait for the teacher to assign a resource</Text>\n )}\n </Styled.DefaultWrapper>\n </FlexView>\n )}\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"center\" $background=\"WHITE\">\n <AppLoader height=\"100%\" />\n </Styled.MilestoneResourcesWrapper>\n );\n});\n\nexport default MilestoneWidgetResources;\n"],"names":["MilestoneWidgetResources","memo","props","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReset","onNodeUnassign","onNodeReattempt","isTeacher","isEPSheetCreationDisabled","getMilestoneResources","isProcessed","isProcessing","isProcessingFailed","isStale","sheets","useGetMilestoneResources","fetchMilestoneResources","useCallback","handleOnTryAgain","useEffect","handleOnAssignResources","sheetsDataPresent","jsx","Styled.MilestoneResourcesWrapper","FlexView","Text","Button","jsxs","Fragment","ResourcesList","Styled.SearchButtonWrapper","Styled.SearchButtonCover","IconButton","SearchIcon","Styled.DefaultWrapper","IMAGES","ArrowTooltip","PlusIcon","AppLoader"],"mappings":";;;;;;;;;;;;;;AAkBM,MAAAA,KAA+DC,EAAK,CAASC,MAAA;AAC3E,QAAA;AAAA,IACJ,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;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AAO,oBAAoB,KAAI,mBAAkB,OAAO,KAAK,QAAQ,IAAK,CAAA,GACtF;AAAA,QAEC,gBAAAb,EAAAY,GAAA,EACE,UACC3B,IAAA,gBAAAe;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,QAAQ,CAAC5B;AAAA,YACT,aACEd,IAAmB,oCAAoC;AAAA,YAGzD,UAAA,gBAAA4B;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,OAAM;AAAA,gBACN,MAAMW;AAAA,gBACN,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,SAASjB;AAAA,gBACT,UAAUZ;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QAAA,IAGD,gBAAAc,EAAAG,GAAA,EAAK,WAAU,YAAW,sDAAyC,CAAA,GAExE;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA,IAKD,gBAAAH,EAAAC,GAAA,EAAiC,iBAAgB,UAAS,aAAY,SACrE,UAAC,gBAAAD,EAAAgB,GAAA,EAAU,QAAO,OAAO,CAAA,EAC3B,CAAA;AAEJ,CAAC;"}
|
1
|
+
{"version":3,"file":"resources-list.js","sources":["../../../../../src/features/milestone/milestone-resources/resources-list/resources-list.tsx"],"sourcesContent":["import type { IMilestoneWidgetResourcesProps } from './resources-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport SearchIcon from '../../../../assets/line-icons/icons/search';\nimport ResourcesList from '../../../sheet-v2/resource-list/resource-list';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useGetMilestoneResources } from '../../milestone-list-container/api/get-milestone-resources';\nimport * as Styled from './resources-list-styled';\n\nconst MilestoneWidgetResources: FC<IMilestoneWidgetResourcesProps> = memo(props => {\n const {\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReset,\n onNodeUnassign,\n onNodeReattempt,\n onNodeAssignAsHomework,\n } = props;\n\n const isTeacher = userType === 'TEACHER';\n const isEPSheetCreationDisabled =\n !canUpdatePlan || !isMilestoneActive || (isMilestoneActive && isDraftMilestone);\n\n const {\n get: getMilestoneResources,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n isStale,\n data: sheets,\n } = useGetMilestoneResources();\n\n const fetchMilestoneResources = useCallback(() => {\n if (userMilestoneId) {\n getMilestoneResources(userMilestoneId, undefined, {\n studentId,\n });\n }\n }, [studentId, userMilestoneId, getMilestoneResources]);\n\n const handleOnTryAgain = useCallback(() => {\n fetchMilestoneResources();\n }, [fetchMilestoneResources]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnAssignResources = useCallback(() => {\n if (typeof onAssignResources !== 'function')\n throw new Error('onAssignResources must be a function');\n\n if (!userMilestoneId) throw new Error('userMilestoneId is required');\n\n onAssignResources(userMilestoneId);\n }, [onAssignResources, userMilestoneId]);\n\n const sheetsDataPresent = sheets && sheets.length > 0;\n\n if (isProcessingFailed) {\n return (\n <Styled.MilestoneResourcesWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <FlexView $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n if (isProcessed) {\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"space-between\">\n {sheetsDataPresent ? (\n <>\n <ResourcesList\n sheets={sheets}\n userType={userType}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n studentId={studentId}\n userMilestoneId={userMilestoneId}\n />\n\n {isTeacher && canUpdatePlan && (\n <Styled.SearchButtonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.SearchButtonCover>\n <IconButton\n Icon={SearchIcon}\n renderAs=\"secondary\"\n size=\"small\"\n analyticsLabel=\"Milestone Resource Search\"\n onClick={handleOnAssignResources}\n disabled={!isMilestoneActive}\n />\n </Styled.SearchButtonCover>\n </Styled.SearchButtonWrapper>\n )}\n </>\n ) : (\n <FlexView\n $width=\"100%\"\n $height=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $background=\"WHITE\"\n >\n <Styled.DefaultWrapper $isImageWrapper>\n <img src={IMAGES.BG_EMPTY_RESOURCES} alt=\"Empty resources\" width={420} height={420} />\n </Styled.DefaultWrapper>\n\n <Styled.DefaultWrapper>\n {isTeacher ? (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isEPSheetCreationDisabled}\n tooltipItem={\n isDraftMilestone ? 'Allowed after plan is published' : 'Plan is completed'\n }\n >\n <Button\n renderAs=\"primary\"\n label=\"Assign Resource\"\n Icon={PlusIcon}\n shape=\"square\"\n size=\"small\"\n onClick={handleOnAssignResources}\n disabled={isEPSheetCreationDisabled}\n />\n </ArrowTooltip>\n ) : (\n <Text $renderAs=\"ab2-bold\">Wait for the teacher to assign a resource</Text>\n )}\n </Styled.DefaultWrapper>\n </FlexView>\n )}\n </Styled.MilestoneResourcesWrapper>\n );\n }\n\n return (\n <Styled.MilestoneResourcesWrapper $justifyContent=\"center\" $background=\"WHITE\">\n <AppLoader height=\"100%\" />\n </Styled.MilestoneResourcesWrapper>\n );\n});\n\nexport default MilestoneWidgetResources;\n"],"names":["MilestoneWidgetResources","memo","props","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReset","onNodeUnassign","onNodeReattempt","onNodeAssignAsHomework","isTeacher","isEPSheetCreationDisabled","getMilestoneResources","isProcessed","isProcessing","isProcessingFailed","isStale","sheets","useGetMilestoneResources","fetchMilestoneResources","useCallback","handleOnTryAgain","useEffect","handleOnAssignResources","sheetsDataPresent","jsx","Styled.MilestoneResourcesWrapper","FlexView","Text","Button","jsxs","Fragment","ResourcesList","Styled.SearchButtonWrapper","Styled.SearchButtonCover","IconButton","SearchIcon","Styled.DefaultWrapper","IMAGES","ArrowTooltip","PlusIcon","AppLoader"],"mappings":";;;;;;;;;;;;;;AAkBM,MAAAA,KAA+DC,EAAK,CAASC,MAAA;AAC3E,QAAA;AAAA,IACJ,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,wBAAAC;AAAA,EACE,IAAAd,GAEEe,IAAYZ,MAAa,WACzBa,IACJ,CAACV,KAAiB,CAACJ,KAAsBA,KAAqBD,GAE1D;AAAA,IACJ,KAAKgB;AAAA,IACL,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAA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AAAA,gBACN,MAAMW;AAAA,gBACN,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,SAASjB;AAAA,gBACT,UAAUZ;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QAAA,IAGD,gBAAAc,EAAAG,GAAA,EAAK,WAAU,YAAW,sDAAyC,CAAA,GAExE;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA,IAKD,gBAAAH,EAAAC,GAAA,EAAiC,iBAAgB,UAAS,aAAY,SACrE,UAAC,gBAAAD,EAAAgB,GAAA,EAAU,QAAO,OAAO,CAAA,EAC3B,CAAA;AAEJ,CAAC;"}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as x } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import { IMAGES as
|
4
|
-
import
|
2
|
+
import { memo as L, useCallback as l, useEffect as X } from "react";
|
3
|
+
import { IMAGES as D } from "../../../../assets/images/images.js";
|
4
|
+
import j from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
5
|
import S from "../../../ui/buttons/button/button.js";
|
6
6
|
import T from "../../../ui/layout/flex-view.js";
|
7
|
-
import
|
7
|
+
import G from "../../../ui/loader/app-loader/app-loader.js";
|
8
8
|
import _ from "../../../ui/separator/separator.js";
|
9
9
|
import N from "../../../ui/text/text.js";
|
10
10
|
import { MILESTONE_WIDGET_MIN_HEIGHT as v } from "../../constants.js";
|
11
|
-
import { useGetTestHelpData as
|
12
|
-
import { TESTS_CREATION_ANALYTICS_EVENTS as
|
13
|
-
import
|
14
|
-
const
|
11
|
+
import { useGetTestHelpData as R } from "../../milestone-list-container/api/get-tests-list.js";
|
12
|
+
import { TESTS_CREATION_ANALYTICS_EVENTS as W } from "../tests-creation/tests-creation-analytics-events.js";
|
13
|
+
import F from "./test-list-view.js";
|
14
|
+
const oe = L((c) => {
|
15
15
|
const {
|
16
16
|
isChaptersAvailable: g,
|
17
17
|
isDraftMilestone: E,
|
@@ -20,37 +20,43 @@ const re = H((c) => {
|
|
20
20
|
studentId: m,
|
21
21
|
userMilestoneId: t,
|
22
22
|
canUpdatePlan: I
|
23
|
-
} = c, {
|
23
|
+
} = c, {
|
24
|
+
onCreateMilestoneTest: o,
|
25
|
+
onTestPreview: i,
|
26
|
+
onTestStart: n,
|
27
|
+
onTestReview: s,
|
28
|
+
onNodeAssignAsHomework: k
|
29
|
+
} = c, {
|
24
30
|
get: A,
|
25
31
|
data: r,
|
26
32
|
isProcessingFailed: p,
|
27
33
|
isProcessed: f,
|
28
|
-
isStale:
|
29
|
-
isProcessing:
|
30
|
-
} =
|
34
|
+
isStale: w,
|
35
|
+
isProcessing: C
|
36
|
+
} = R(), y = !I || !g || !d || d && E, M = d && !g ? "Chapters need to be assigned" : E ? "Allowed after plan is published" : "Plan is completed", h = l(() => {
|
31
37
|
A(t, void 0, {
|
32
38
|
studentId: m
|
33
39
|
});
|
34
40
|
}, [A, m, t]);
|
35
|
-
|
36
|
-
!
|
37
|
-
}, [h, f,
|
41
|
+
X(() => {
|
42
|
+
!C && (!f && !p || w) && h();
|
43
|
+
}, [h, f, C, p, w]);
|
38
44
|
const $ = l(() => {
|
39
|
-
if (typeof
|
40
|
-
|
45
|
+
if (typeof o == "function") {
|
46
|
+
o == null || o(t, ((r == null ? void 0 : r.length) || 0) + 1);
|
41
47
|
return;
|
42
48
|
}
|
43
49
|
throw new Error("No callback provided. If provided it must be a function");
|
44
|
-
}, [
|
50
|
+
}, [o, t, r]), O = l(
|
45
51
|
(a) => {
|
46
|
-
if (typeof
|
47
|
-
|
52
|
+
if (typeof i == "function") {
|
53
|
+
i == null || i(a, t);
|
48
54
|
return;
|
49
55
|
}
|
50
56
|
throw new Error("No callback provided. If provided it must be a function");
|
51
57
|
},
|
52
|
-
[
|
53
|
-
),
|
58
|
+
[i, t]
|
59
|
+
), H = l(
|
54
60
|
(a) => {
|
55
61
|
if (typeof n == "function") {
|
56
62
|
n == null || n(a);
|
@@ -93,12 +99,13 @@ const re = H((c) => {
|
|
93
99
|
]
|
94
100
|
}
|
95
101
|
) : f ? r != null && r.length ? /* @__PURE__ */ e(
|
96
|
-
|
102
|
+
F,
|
97
103
|
{
|
98
104
|
...c,
|
99
|
-
onNodeAttempt:
|
100
|
-
onNodeView:
|
105
|
+
onNodeAttempt: H,
|
106
|
+
onNodeView: O,
|
101
107
|
onNodeReview: P,
|
108
|
+
onNodeAssignAsHomework: k,
|
102
109
|
milestoneId: t,
|
103
110
|
sheets: r,
|
104
111
|
userType: b,
|
@@ -116,16 +123,16 @@ const re = H((c) => {
|
|
116
123
|
$background: "WHITE",
|
117
124
|
$height: v,
|
118
125
|
children: [
|
119
|
-
/* @__PURE__ */ e("img", { src:
|
126
|
+
/* @__PURE__ */ e("img", { src: D.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
|
120
127
|
/* @__PURE__ */ e(_, { heightX: 2 }),
|
121
128
|
b === "TEACHER" ? /* @__PURE__ */ u(x, { children: [
|
122
129
|
/* @__PURE__ */ e(
|
123
|
-
|
130
|
+
j,
|
124
131
|
{
|
125
132
|
renderAs: "primary",
|
126
133
|
position: "bottom",
|
127
134
|
hidden: !y,
|
128
|
-
tooltipItem:
|
135
|
+
tooltipItem: M,
|
129
136
|
children: /* @__PURE__ */ e(
|
130
137
|
S,
|
131
138
|
{
|
@@ -136,7 +143,7 @@ const re = H((c) => {
|
|
136
143
|
label: "Create a Test",
|
137
144
|
onClick: $,
|
138
145
|
disabled: y,
|
139
|
-
analyticsLabel:
|
146
|
+
analyticsLabel: W.CUSTOM_TEST_CREATION_STARTED,
|
140
147
|
analyticsProps: {
|
141
148
|
milestone_id: t
|
142
149
|
}
|
@@ -155,11 +162,11 @@ const re = H((c) => {
|
|
155
162
|
$alignItems: "center",
|
156
163
|
$justifyContent: "center",
|
157
164
|
$background: "WHITE",
|
158
|
-
children: /* @__PURE__ */ e(
|
165
|
+
children: /* @__PURE__ */ e(G, { height: "100%" })
|
159
166
|
}
|
160
167
|
);
|
161
168
|
});
|
162
169
|
export {
|
163
|
-
|
170
|
+
oe as default
|
164
171
|
};
|
165
172
|
//# sourceMappingURL=test-list-container.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"test-list-container.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-container.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestsListProps } from './types';\n\nimport { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\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 { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { useGetTestHelpData } from '../../milestone-list-container/api/get-tests-list';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestSheetsList from './test-list-view';\n\nconst MilestoneTestsList: FC<ITestsListProps> = memo(props => {\n const {\n isChaptersAvailable,\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n } = props;\n const { onCreateMilestoneTest, onTestPreview, onTestStart, onTestReview } = props;\n\n const {\n get: getTestHelpData,\n data,\n isProcessingFailed,\n isProcessed,\n isStale,\n isProcessing,\n } = useGetTestHelpData();\n\n const isTestSheetCreationDisabled =\n !canUpdatePlan ||\n !isChaptersAvailable ||\n !isMilestoneActive ||\n (isMilestoneActive && isDraftMilestone);\n const testCreationCtaTooltipText =\n isMilestoneActive && !isChaptersAvailable\n ? 'Chapters need to be assigned'\n : isDraftMilestone\n ? 'Allowed after plan is published'\n : 'Plan is completed';\n\n const handleOnTryAgain = useCallback(() => {\n getTestHelpData(userMilestoneId, undefined, {\n studentId,\n });\n }, [getTestHelpData, studentId, userMilestoneId]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnCreateMilestoneTest = useCallback(() => {\n if (typeof onCreateMilestoneTest === 'function') {\n onCreateMilestoneTest?.(userMilestoneId, (data?.length || 0) + 1);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [onCreateMilestoneTest, userMilestoneId, data]);\n\n const handleOnTestPreview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestPreview === 'function') {\n onTestPreview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestPreview, userMilestoneId],\n );\n\n const handleOnTestStart = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestStart === 'function') {\n onTestStart?.(sheetData);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestStart],\n );\n\n const handleOnTestReview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestReview === 'function') {\n onTestReview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestReview, userMilestoneId],\n );\n\n if (isProcessingFailed) {\n return (\n <FlexView\n $flexGapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100%\"\n $background=\"WHITE\"\n >\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n );\n }\n\n if (isProcessed) {\n if (data?.length) {\n return (\n <TestSheetsList\n {...props}\n onNodeAttempt={handleOnTestStart}\n onNodeView={handleOnTestPreview}\n onNodeReview={handleOnTestReview}\n milestoneId={userMilestoneId}\n sheets={data}\n userType={userType}\n studentId={studentId}\n onCreateNewTest={handleOnCreateMilestoneTest}\n canUpdatedPlan={canUpdatePlan}\n isMilestoneActive={isMilestoneActive}\n />\n );\n }\n\n return (\n <FlexView\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isTestSheetCreationDisabled}\n tooltipItem={testCreationCtaTooltipText}\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Create a Test\"\n onClick={handleOnCreateMilestoneTest}\n disabled={isTestSheetCreationDisabled}\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n analyticsProps={{\n milestone_id: userMilestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to create a test\n </Text>\n )}\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n});\n\nexport default MilestoneTestsList;\n"],"names":["MilestoneTestsList","memo","props","isChaptersAvailable","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onCreateMilestoneTest","onTestPreview","onTestStart","onTestReview","getTestHelpData","data","isProcessingFailed","isProcessed","isStale","isProcessing","useGetTestHelpData","isTestSheetCreationDisabled","testCreationCtaTooltipText","handleOnTryAgain","useCallback","useEffect","handleOnCreateMilestoneTest","handleOnTestPreview","sheetData","handleOnTestStart","handleOnTestReview","jsxs","FlexView","jsx","Text","Button","TestSheetsList","MILESTONE_WIDGET_MIN_HEIGHT","IMAGES","Separator","Fragment","ArrowTooltip","TESTS_CREATION_ANALYTICS_EVENTS","AppLoader"],"mappings":";;;;;;;;;;;;;AAiBM,MAAAA,KAA0CC,EAAK,CAASC,MAAA;AACtD,QAAA;AAAA,IACJ,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAP,GACE,EAAE,uBAAAQ,GAAuB,eAAAC,GAAe,aAAAC,GAAa,cAAAC,MAAiBX,GAEtE;AAAA,IACJ,KAAKY;AAAA,IACL,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,MACEC,EAAmB,GAEjBC,IACJ,CAACZ,KACD,CAACN,KACD,CAACE,KACAA,KAAqBD,GAClBkB,IACJjB,KAAqB,CAACF,IAClB,iCACAC,IACE,oCACA,qBAEFmB,IAAmBC,EAAY,MAAM;AACzC,IAAAV,EAAgBN,GAAiB,QAAW;AAAA,MAC1C,WAAAD;AAAA,IAAA,CACD;AAAA,EACA,GAAA,CAACO,GAAiBP,GAAWC,CAAe,CAAC;AAEhD,EAAAiB,EAAU,MAAM;AACd,IAAI,CAACN,MAAkB,CAACF,KAAe,CAACD,KAAuBE,MAC5CK;EACnB,GACC,CAACA,GAAkBN,GAAaE,GAAcH,GAAoBE,CAAO,CAAC;AAEvE,QAAAQ,IAA8BF,EAAY,MAAM;AAChD,QAAA,OAAOd,KAA0B,YAAY;AAC/C,MAAAA,KAAA,QAAAA,EAAwBF,KAAkBO,KAAA,gBAAAA,EAAM,WAAU,KAAK;AAE/D;AAAA,IACF;AAEM,UAAA,IAAI,MAAM,yDAAyD;AAAA,EACxE,GAAA,CAACL,GAAuBF,GAAiBO,CAAI,CAAC,GAE3CY,IAAsBH;AA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AAAA,MAEZ,UAAA,gBAAAJ,EAACU,GAAU,EAAA,QAAO,OAAO,CAAA;AAAA,IAAA;AAAA,EAAA;AAG/B,CAAC;"}
|
1
|
+
{"version":3,"file":"test-list-container.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-container.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestsListProps } from './types';\n\nimport { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\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 { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { useGetTestHelpData } from '../../milestone-list-container/api/get-tests-list';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestSheetsList from './test-list-view';\n\nconst MilestoneTestsList: FC<ITestsListProps> = memo(props => {\n const {\n isChaptersAvailable,\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n } = props;\n const {\n onCreateMilestoneTest,\n onTestPreview,\n onTestStart,\n onTestReview,\n onNodeAssignAsHomework,\n } = props;\n\n const {\n get: getTestHelpData,\n data,\n isProcessingFailed,\n isProcessed,\n isStale,\n isProcessing,\n } = useGetTestHelpData();\n\n const isTestSheetCreationDisabled =\n !canUpdatePlan ||\n !isChaptersAvailable ||\n !isMilestoneActive ||\n (isMilestoneActive && isDraftMilestone);\n const testCreationCtaTooltipText =\n isMilestoneActive && !isChaptersAvailable\n ? 'Chapters need to be assigned'\n : isDraftMilestone\n ? 'Allowed after plan is published'\n : 'Plan is completed';\n\n const handleOnTryAgain = useCallback(() => {\n getTestHelpData(userMilestoneId, undefined, {\n studentId,\n });\n }, [getTestHelpData, studentId, userMilestoneId]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnCreateMilestoneTest = useCallback(() => {\n if (typeof onCreateMilestoneTest === 'function') {\n onCreateMilestoneTest?.(userMilestoneId, (data?.length || 0) + 1);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [onCreateMilestoneTest, userMilestoneId, data]);\n\n const handleOnTestPreview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestPreview === 'function') {\n onTestPreview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestPreview, userMilestoneId],\n );\n\n const handleOnTestStart = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestStart === 'function') {\n onTestStart?.(sheetData);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestStart],\n );\n\n const handleOnTestReview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestReview === 'function') {\n onTestReview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestReview, userMilestoneId],\n );\n\n if (isProcessingFailed) {\n return (\n <FlexView\n $flexGapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100%\"\n $background=\"WHITE\"\n >\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n );\n }\n\n if (isProcessed) {\n if (data?.length) {\n return (\n <TestSheetsList\n {...props}\n onNodeAttempt={handleOnTestStart}\n onNodeView={handleOnTestPreview}\n onNodeReview={handleOnTestReview}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n milestoneId={userMilestoneId}\n sheets={data}\n userType={userType}\n studentId={studentId}\n onCreateNewTest={handleOnCreateMilestoneTest}\n canUpdatedPlan={canUpdatePlan}\n isMilestoneActive={isMilestoneActive}\n />\n );\n }\n\n return (\n <FlexView\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isTestSheetCreationDisabled}\n tooltipItem={testCreationCtaTooltipText}\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Create a Test\"\n onClick={handleOnCreateMilestoneTest}\n disabled={isTestSheetCreationDisabled}\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n analyticsProps={{\n milestone_id: userMilestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to create a test\n </Text>\n )}\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n});\n\nexport default MilestoneTestsList;\n"],"names":["MilestoneTestsList","memo","props","isChaptersAvailable","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onCreateMilestoneTest","onTestPreview","onTestStart","onTestReview","onNodeAssignAsHomework","getTestHelpData","data","isProcessingFailed","isProcessed","isStale","isProcessing","useGetTestHelpData","isTestSheetCreationDisabled","testCreationCtaTooltipText","handleOnTryAgain","useCallback","useEffect","handleOnCreateMilestoneTest","handleOnTestPreview","sheetData","handleOnTestStart","handleOnTestReview","jsxs","FlexView","jsx","Text","Button","TestSheetsList","MILESTONE_WIDGET_MIN_HEIGHT","IMAGES","Separator","Fragment","ArrowTooltip","TESTS_CREATION_ANALYTICS_EVENTS","AppLoader"],"mappings":";;;;;;;;;;;;;AAiBM,MAAAA,KAA0CC,EAAK,CAASC,MAAA;AACtD,QAAA;AAAA,IACJ,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAP,GACE;AAAA,IACJ,uBAAAQ;AAAA,IACA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,wBAAAC;AAAA,EACE,IAAAZ,GAEE;AAAA,IACJ,KAAKa;AAAA,IACL,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,MACEC,EAAmB,GAEjBC,IACJ,CAACb,KACD,CAACN,KACD,CAACE,KACAA,KAAqBD,GAClBmB,IACJlB,KAAqB,CAACF,IAClB,iCACAC,IACE,oCACA,qBAEFoB,IAAmBC,EAAY,MAAM;AACzC,IAAAV,EAAgBP,GAAiB,QAAW;AAAA,MAC1C,WAAAD;AAAA,IAAA,CACD;AAAA,EACA,GAAA,CAACQ,GAAiBR,GAAWC,CAAe,CAAC;AAEhD,EAAAkB,EAAU,MAAM;AACd,IAAI,CAACN,MAAkB,CAACF,KAAe,CAACD,KAAuBE,MAC5CK;EACnB,GACC,CAACA,GAAkBN,GAAaE,GAAcH,GAAoBE,CAAO,CAAC;AAEvE,QAAAQ,IAA8BF,EAAY,MAAM;AAChD,QAAA,OAAOf,KAA0B,YAAY;AAC/C,MAAAA,KAAA,QAAAA,EAAwBF,KAAkBQ,KAAA,gBAAAA,EAAM,WAAU,KAAK;AAE/D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