@ctlyst.id/internal-ui 2.3.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@emotion+memoize@0.7.4/node_modules/@emotion/memoize/dist/memoize.esm.js","../../../node_modules/.pnpm/@emotion+is-prop-valid@0.8.8/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../src/index.ts","../src/components/accordion/components/accordion-eye.tsx","../src/components/accordion/components/accordion-indicator.tsx","../src/components/accordion/components/index.ts","../src/components/alert/components/alert.tsx","../src/components/alert/components/alert-context.ts","../src/components/alert/components/icons.tsx","../src/components/alert/components/alert-action.tsx","../src/components/button/components/button.tsx","../src/components/loader/components/loader.tsx","../src/components/loader/index.ts","../src/components/alert/components/alert-close.tsx","../src/components/alert/components/alert-description.tsx","../src/components/alert/components/alert-icon.tsx","../src/components/alert/components/alert-title.tsx","../src/components/anchor/components/anchor.tsx","../src/components/badge/components/badge.tsx","../src/components/breadcrumb/components/bread-crumb.tsx","../src/components/button/index.ts","../src/components/card/components/card.tsx","../src/components/checkbox/components/checkbox.tsx","../src/components/checkbox/components/checkbox-group.tsx","../src/components/field/components/field.tsx","../src/components/checkbox/index.ts","../src/components/chips/components/chips.tsx","../src/components/counter/components/counter.tsx","../src/components/form/components/input-addon.tsx","../src/components/form/components/input-element.tsx","../src/components/form/components/input-field.tsx","../src/components/form/components/textarea.tsx","../src/components/form/index.ts","../src/components/data-table/components/data-table.tsx","../src/components/datepicker/components/datepicker.tsx","../src/components/datepicker/components/styles.tsx","../src/components/datepicker/components/time-input.tsx","../src/components/datepicker/components/datepicker-month/datepicker-month.tsx","../src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx","../src/components/dialog/components/dialog.tsx","../src/components/empty-state/components/empty-state.tsx","../src/components/empty-state/components/layout.tsx","../src/components/header/components/header.tsx","../src/components/header/components/logo.tsx","../src/components/header/components/profile.tsx","../src/components/header/components/switch-mode.tsx","../src/components/header/components/version.tsx","../src/components/header/utils/formatter.ts","../src/components/image/index.ts","../src/components/layouting/index.ts","../src/components/list/index.tsx","../src/components/modal/components/modal-back-button.tsx","../src/components/modal/components/modal-body.tsx","../src/components/modal/components/modal-close-button.tsx","../src/components/modal/components/modal-footer.tsx","../src/components/modal/components/modal-header.tsx","../src/components/modal/index.ts","../src/components/nav-item/components/nav-item.tsx","../src/components/navigation/components/navigation.tsx","../src/components/navigation/components/mapping-icon.tsx","../src/components/navigation/components/navigation-bar.tsx","../src/components/pagination/components/pagination.tsx","../src/components/pagination/components/pagination-button.tsx","../src/components/pagination/components/pagination-button-trigger.tsx","../src/components/pagination/components/pagination-detail.tsx","../src/components/pagination/components/pagination-filter.tsx","../src/components/popover/index.ts","../src/components/radio/components/radio.tsx","../src/components/radio/components/radio-group.tsx","../src/components/radio/index.ts","../src/components/rating/components/rating.tsx","../src/components/select/components/select.tsx","../src/config/theme/foundations/shadows.ts","../src/config/theme/foundations/sizes.ts","../src/config/theme/foundations/spacing.ts","../src/config/theme/foundations/typography.ts","../src/components/select/components/utils.ts","../src/components/select/components/select-async.tsx","../src/components/select/components/select-async-creatable.tsx","../src/components/select/components/select-creatable.tsx","../src/components/select/components/select-with-checkbox.tsx","../src/components/sidebar/components/sidebar.tsx","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/use-features.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/process.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/PresenceContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-browser.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/variants.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-constant.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/id.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/use-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/utils.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/units.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/utils.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hsla.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/rgba.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hex.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/filter.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/types.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/use-dom-event.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/event-info.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/spring.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/clamp.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/progress.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-color.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/inc.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/pipe.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-complex.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/interpolate.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/utils.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/decay.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/on-next-frame.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/create-render-step.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/inertia.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point-3d.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/distance.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/cubic-bezier.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/warn-once.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-id.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/animation.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/easing.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/setters.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/array.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/PanSession.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/drag.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animate.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../src/components/sidebar/components/sidebar-header.tsx","../src/components/sidebar/components/sidebar-menu.tsx","../src/components/switch/components/switch.tsx","../src/components/table/index.tsx","../src/components/tabs/components/tab.tsx","../src/components/tabs/index.ts","../src/components/text/index.ts","../src/components/tooltip/index.ts","../src/components/uploader/components/uploader.tsx","../src/components/uploader/constants.ts","../src/components/index.ts","../src/config/theme/themeConfiguration.ts","../src/config/theme/components/index.ts","../src/config/theme/components/accordion.ts","../src/config/theme/components/alert.ts","../src/config/theme/components/badge.ts","../src/config/theme/components/button.ts","../src/config/theme/components/card.ts","../src/config/theme/components/checkbox.ts","../src/config/theme/components/chips.ts","../src/config/theme/components/form-label.ts","../src/config/theme/components/input.ts","../src/config/theme/components/loader.ts","../src/config/theme/components/modal.ts","../src/config/theme/components/popover.ts","../src/config/theme/components/radio.ts","../src/config/theme/components/switch.ts","../src/config/theme/components/table.ts","../src/config/theme/components/tabs.ts","../src/config/theme/components/textarea.ts","../src/config/theme/components/tooltip.ts","../src/hooks/useFetcher.ts","../src/provider/components/provider.tsx","../src/provider/index.ts","../src/hooks/index.ts"],"sourcesContent":["function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","export * from './components';\nexport * from './config';\nexport * from './hooks';\nexport * from './provider';\nexport { extendTheme, forwardRef } from '@chakra-ui/react';\n","import { Box } from '@chakra-ui/react';\nimport { Eye } from '@ctlyst.id/internal-icon';\n// eslint-disable-next-line import/prefer-default-export, react/require-default-props\nexport const AccordionEye = ({ position = 'left' }: { position?: 'left' | 'right' }) => {\n return (\n <Box\n className=\"eye-icon\"\n backgroundColor={'white'}\n {...(position === 'right' ? { position: 'absolute', right: 4, zIndex: 2 } : {})}\n >\n <Eye size={4} />\n </Box>\n );\n};\n","import { Box, useAccordionItemState } from '@chakra-ui/react';\n// eslint-disable-next-line import/prefer-default-export\nexport const AccordionIndicator = () => {\n const { isOpen } = useAccordionItemState();\n if (isOpen) {\n return <Box position=\"absolute\" left={0} width=\"2px\" height=\"100%\" bg=\"primary.500\" />;\n }\n return null;\n};\n","export * from './accordion-eye';\nexport * from './accordion-indicator';\nexport {\n Accordion,\n AccordionButton,\n AccordionButtonProps,\n AccordionIcon,\n AccordionIconProps,\n AccordionItem,\n AccordionItemProps,\n AccordionPanel,\n AccordionPanelProps,\n AccordionProps,\n AccordionProvider,\n useAccordion,\n useAccordionContext,\n useAccordionItem,\n UseAccordionItemProps,\n UseAccordionItemReturn,\n useAccordionItemState,\n UseAccordionProps,\n UseAccordionReturn,\n useAccordionStyles,\n} from '@chakra-ui/react';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps, SystemStyleObject, ThemingProps } from '@chakra-ui/system';\nimport { chakra, forwardRef, omitThemingProps, useMultiStyleConfig } from '@chakra-ui/system';\nimport React from 'react';\n\nimport type { AlertStatus } from './alert-context';\nimport { AlertProvider, AlertStylesProvider, getStatusColorScheme } from './alert-context';\n\ninterface AlertOptions {\n /**\n * The status of the alert\n * @default \"info\"\n */\n status?: AlertStatus;\n}\nexport type AlertVariant = 'solid' | 'light';\n\nexport interface AlertProps extends HTMLChakraProps<'div'>, AlertOptions, ThemingProps<'Alert'> {\n /**\n * @default false\n */\n addRole?: boolean;\n}\n\n/**\n * Alert is used to communicate the state or status of a\n * page, feature or action\n *\n * @see Docs https://chakra-ui.com/docs/components/alert\n * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/alert/\n */\nexport const Alert = forwardRef<AlertProps, 'div'>(function Alert(props, ref) {\n const { status = 'info', addRole = true, children, ...rest } = omitThemingProps(props);\n const colorScheme = props.colorScheme ?? getStatusColorScheme(status);\n\n const styles = useMultiStyleConfig('Alert', { ...props, colorScheme });\n\n const alertStyles: SystemStyleObject = {\n width: '100%',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto auto',\n alignItems: 'center',\n position: 'relative',\n overflow: 'hidden',\n ...styles.container,\n };\n\n return (\n <AlertProvider value={{ status }}>\n <AlertStylesProvider value={styles}>\n <chakra.div\n data-status={status}\n role={addRole ? 'alert' : undefined}\n ref={ref}\n {...rest}\n className={cx('chakra-alert', props.className)}\n __css={alertStyles}\n >\n {children}\n </chakra.div>\n </AlertStylesProvider>\n </AlertProvider>\n );\n});\n\nAlert.displayName = 'Alert';\n","import { createContext } from '@chakra-ui/react-context';\nimport type { SystemStyleObject } from '@chakra-ui/system';\n\nimport { CheckIcon, InfoIcon, WarningIcon } from './icons';\n\nexport const [AlertProvider, useAlertContext] = createContext<AlertContext>({\n name: 'AlertContext',\n hookName: 'useAlertContext',\n providerName: '<Alert />',\n});\n\nexport const [AlertStylesProvider, useAlertStyles] = createContext<Record<string, SystemStyleObject>>({\n name: `AlertStylesContext`,\n hookName: `useAlertStyles`,\n providerName: '<Alert />',\n});\n\nconst STATUSES = {\n info: { icon: InfoIcon, colorScheme: 'info' },\n warning: { icon: InfoIcon, colorScheme: 'warning' },\n success: { icon: CheckIcon, colorScheme: 'success' },\n error: { icon: WarningIcon, colorScheme: 'danger' },\n neutral: { icon: InfoIcon, colorScheme: 'neutral' },\n};\n\nexport function getStatusColorScheme(status: AlertStatus) {\n return STATUSES[status].colorScheme;\n}\n\nexport function getStatusIcon(status: AlertStatus) {\n return STATUSES[status].icon;\n}\n\nexport type AlertStatus = keyof typeof STATUSES;\n\nexport interface AlertContext {\n status: AlertStatus;\n}\n","/* eslint-disable react/require-default-props */\nimport { AlertTriangle, CheckCircle, Info } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nexport function CheckIcon() {\n return <CheckCircle color=\"inherit\" size={4} />;\n}\n\nexport function InfoIcon() {\n return <Info color=\"inherit\" size={4} />;\n}\n\nexport function WarningIcon() {\n return <AlertTriangle color=\"inherit\" size={4} />;\n}\n","/* eslint-disable import/prefer-default-export */\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\n\nimport Button from '../../button/components/button';\nimport { useAlertStyles } from './alert-context';\n\nexport type AlertActionProps = HTMLChakraProps<'button'>;\n\nexport function AlertAction({ children, className }: AlertActionProps) {\n const styles = useAlertStyles();\n const css = styles.action;\n\n return (\n <Button\n data-test-id=\"alert-action\"\n className={cx('chakra-alert__action', className)}\n variant=\"link\"\n fontWeight=\"semibold\"\n __css={css}\n >\n {children}\n </Button>\n );\n}\n\nAlertAction.displayName = 'AlertAction';\n","/* eslint-disable test-selectors/button */\nimport type { ButtonProps as ButtonChakraProps } from '@chakra-ui/react';\nimport { Button as ButtonChakra, forwardRef } from '@chakra-ui/react';\nimport React from 'react';\n\nimport { Loader } from '../../loader';\n\nexport type ButtonProps = ButtonChakraProps;\n\nconst Button = forwardRef<ButtonProps, 'button'>((props, ref) => {\n const { children, variant, size, ...rest } = props;\n\n const getLoaderSize = () => {\n if (size === 'lg') return 'md';\n if (size === 'md') return 'sm';\n return 'xs';\n };\n\n const getLoaderColor = () => {\n if (variant === 'primary' || variant === 'danger') return 'white';\n if (variant === 'outline-danger') return 'danger';\n return 'primary';\n };\n\n return (\n <ButtonChakra\n size={size}\n variant={variant}\n spinner={<Loader size={getLoaderSize()} color={getLoaderColor()} />}\n ref={ref}\n {...rest}\n >\n {children}\n </ButtonChakra>\n );\n});\n\nexport default Button;\n","import type { HTMLChakraProps, ThemingProps } from '@chakra-ui/react';\nimport { Box, forwardRef, useStyleConfig } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface LoaderProps {\n size?: string;\n variant?: string;\n thickness?: string;\n}\n\nexport interface CustomLoaderProps\n extends HTMLChakraProps<'span'>,\n Omit<ThemingProps, 'size' | 'variant'>,\n LoaderProps {}\n\nconst Loader = forwardRef<CustomLoaderProps, 'div'>((props: CustomLoaderProps, ref) => {\n const styles = useStyleConfig('LoaderStyle', props);\n\n return <Box ref={ref} __css={styles} />;\n});\n\nLoader.defaultProps = {\n size: 'md',\n};\n\nexport default Loader;\n","export { default as Loader } from './components/loader';\nexport * from './components/loader';\nexport { Skeleton } from '@chakra-ui/react';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra } from '@chakra-ui/system';\nimport { Close } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nimport { useAlertStyles } from './alert-context';\n\nexport type AlertCloseProps = HTMLChakraProps<'span'>;\n\nexport function AlertClose({ className, children, ...rest }: AlertCloseProps) {\n const styles = useAlertStyles();\n const css = styles.close;\n\n return (\n <chakra.span\n display=\"inherit\"\n data-status={'alert-close'}\n {...rest}\n className={cx('chakra-alert__close', className)}\n __css={css}\n >\n {children || <Close color=\"inherit\" size={4} />}\n </chakra.span>\n );\n}\n\nAlertClose.displayName = 'AlertClose';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps, SystemStyleObject } from '@chakra-ui/system';\nimport { chakra, forwardRef } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertDescriptionProps = HTMLChakraProps<'div'>;\n\nexport const AlertDescription = forwardRef<AlertDescriptionProps, 'div'>(function AlertDescription(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n const descriptionStyles: SystemStyleObject = {\n display: 'inline',\n ...styles.description,\n };\n\n return (\n <chakra.div\n ref={ref}\n data-status={status}\n {...props}\n className={cx('chakra-alert__desc', props.className)}\n __css={descriptionStyles}\n />\n );\n});\n\nAlertDescription.displayName = 'AlertDescription';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { getStatusIcon, useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertIconProps = HTMLChakraProps<'span'>;\n\nexport function AlertIcon({ className, children, ...rest }: AlertIconProps) {\n const { status } = useAlertContext();\n const BaseIcon = getStatusIcon(status);\n const styles = useAlertStyles();\n const css = styles.icon;\n\n return (\n <chakra.span\n display=\"inherit\"\n data-status={status}\n {...rest}\n className={cx('chakra-alert__icon', className)}\n __css={css}\n >\n {children || <BaseIcon />}\n </chakra.span>\n );\n}\n\nAlertIcon.displayName = 'AlertIcon';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra, forwardRef } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertTitleProps = HTMLChakraProps<'div'>;\n\nexport const AlertTitle = forwardRef<AlertTitleProps, 'div'>(function AlertTitle(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n\n return (\n <chakra.div\n ref={ref}\n data-status={status}\n {...props}\n className={cx('chakra-alert__title', props.className)}\n __css={styles.title}\n />\n );\n});\n\nAlertTitle.displayName = 'AlertTitle';\n","import type { LinkProps } from '@chakra-ui/react';\nimport { Link } from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { PropsWithChildren } from 'react';\nimport * as React from 'react';\n\nexport interface AnchorProps extends LinkProps, PropsWithChildren {\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n isActive?: boolean;\n isChild?: boolean;\n}\n\nexport const Anchor = ({ children, leftIcon, rightIcon, isActive, isChild, ...props }: AnchorProps) => {\n return (\n <Link\n display=\"inline-block\"\n w=\"full\"\n p=\"4\"\n pl={isChild ? '10' : '4'}\n borderLeft=\"1px solid\"\n borderLeftColor={isActive ? 'primary.500' : 'neutral.400'}\n color={isActive ? 'primary.500' : 'black.high'}\n bg={isActive ? 'neutral.100' : 'white'}\n className={cx('catalyst-anchor', props.className)}\n _hover={{\n textDecoration: 'none',\n }}\n {...props}\n >\n {leftIcon && leftIcon}\n {children}\n {rightIcon && rightIcon}\n </Link>\n );\n};\n\nAnchor.displayName = 'Anchor';\nAnchor.defaultProps = {\n leftIcon: undefined,\n rightIcon: undefined,\n isActive: false,\n isChild: false,\n};\n\nexport default Anchor;\n","/* eslint-disable test-selectors/button */\nimport type { BadgeProps as BadgeChakraProps } from '@chakra-ui/react';\nimport { Badge as BadgeChakra } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface BadgeProps extends BadgeChakraProps {\n pill?: boolean;\n}\n\nconst Badge = (props: BadgeProps) => {\n const { children, pill, ...rest } = props;\n\n return (\n <BadgeChakra\n borderRadius={pill ? 'xl' : 'sm'}\n display=\"inline-flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n textTransform=\"none\"\n {...rest}\n >\n {children}\n </BadgeChakra>\n );\n};\n\nBadge.defaultProps = {\n pill: false,\n};\n\nexport default Badge;\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport { Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Text, theme, useToken } from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiChevronLeft, FiChevronsRight, FiHome } from 'react-icons/fi';\n\nimport { Button } from '../../button';\n\nexport interface BreadCrumbParentProps {\n name: string;\n onClick?: () => void;\n disable?: boolean;\n link: string;\n}\n\nexport interface BreadCrumbProps {\n title: string;\n children?: React.ReactNode;\n parents?: BreadCrumbParentProps[];\n className?: string;\n disableHome?: boolean;\n spacing?: number;\n backButton?: () => void;\n}\n\nconst BreadCrumb: React.FC<BreadCrumbProps> = props => {\n const { title, children, parents, className, disableHome, spacing = 2, backButton } = props;\n const [neutral600, primary500] = useToken('colors', ['neutral.600', 'primary.500']);\n return (\n <Box\n data-test-id=\"CT_component_breadcrumb_breadcrumb\"\n className={className}\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n paddingY={2}\n >\n <Box display=\"flex\" alignItems=\"center\">\n {backButton && (\n <Button variant=\"icon\" data-test-id=\"button\" size=\"md\" mr=\"2\" onClick={backButton}>\n <FiChevronLeft size={theme.sizes[5]} />\n </Button>\n )}\n <Text pr=\"2\" textStyle=\"heading.6\" color=\"neutral.700\">\n {title}\n </Text>\n <Box h=\"5.5\" borderLeft=\"1px solid\" borderColor={neutral600} />\n <Breadcrumb\n separator={<FiChevronsRight color={neutral600} size={theme.sizes['3.5']} />}\n pl=\"2\"\n pr=\"4\"\n spacing={spacing}\n sx={{ ol: { display: 'flex', alignItems: 'center' } }}\n display=\"flex\"\n alignItems=\"center\"\n className=\"breadcrumb-wrapper\"\n >\n <BreadcrumbItem>\n <BreadcrumbLink href={!disableHome ? '/' : undefined} style={{ ...(disableHome && { cursor: 'default' }) }}>\n <FiHome className=\"align-top\" size={theme.sizes['3.5']} color={primary500} />\n </BreadcrumbLink>\n </BreadcrumbItem>\n {parents?.map(val => (\n <BreadcrumbItem key={val.name}>\n <BreadcrumbLink\n data-test-id=\"iadKcMAul3QAdvmfIQjRE\"\n href={!val.disable ? val.link : undefined}\n onClick={val.onClick}\n style={{\n ...(val.disable && {\n cursor: 'default',\n }),\n }}\n _hover={{ textDecoration: 'none' }}\n >\n <Text color={val.disable ? neutral600 : primary500} textStyle=\"text.sm\">\n {val.name}\n </Text>\n </BreadcrumbLink>\n </BreadcrumbItem>\n ))}\n <BreadcrumbItem>\n <BreadcrumbLink _hover={{ textDecor: 'none', cursor: 'default' }}>\n <Text color=\"neutral.600\" textStyle=\"text.sm\">\n {title}\n </Text>\n </BreadcrumbLink>\n </BreadcrumbItem>\n </Breadcrumb>\n </Box>\n {children && <Box>{children}</Box>}\n </Box>\n );\n};\n\nBreadCrumb.defaultProps = {\n children: undefined,\n parents: undefined,\n className: undefined,\n disableHome: undefined,\n spacing: 2,\n backButton: undefined,\n};\n\nexport default BreadCrumb;\n","export { default as Button } from './components/button';\nexport * from './components/button';\nexport {\n ButtonGroup,\n ButtonGroupProps,\n CloseButton,\n CloseButtonProps,\n IconButton,\n IconButtonProps,\n} from '@chakra-ui/react';\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Card, useStyleConfig } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nexport interface CardProps extends BoxProps {\n withShadow?: boolean;\n isRounded?: boolean;\n}\n\nconst CardCustom = forwardRef<HTMLDivElement, CardProps>(({ children, ...rest }, ref) => {\n const styles = useStyleConfig('Card', rest);\n\n return (\n <Card __css={styles} backgroundColor=\"white.high\" ref={ref} {...rest}>\n {children}\n </Card>\n );\n});\n\nCardCustom.defaultProps = {\n withShadow: true,\n isRounded: true,\n};\n\nexport default CardCustom;\n","/* eslint-disable no-nested-ternary */\nimport type { BoxProps, CheckboxProps } from '@chakra-ui/react';\nimport { Box, Checkbox, forwardRef, Text } from '@chakra-ui/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {\n isError?: boolean;\n helpText?: string;\n errorText?: string;\n boxProps?: BoxProps;\n}\n\nconst CheckboxComponent = forwardRef<CheckboxComponentProps, 'input'>(\n ({ isError = false, helpText = '', errorText = '', boxProps, children, isDisabled, ...rest }, ref) => {\n const variant = isError ? 'errors' : 'unstyled';\n return (\n <Box {...boxProps}>\n <Box display=\"flex\">\n <Checkbox variant={variant} ref={ref} {...rest} isDisabled={isDisabled}>\n {children && (\n <Text as=\"span\" display=\"block\" textStyle=\"text.sm\" color={isDisabled ? 'black.medium' : 'black.high'}>\n {children}\n </Text>\n )}\n </Checkbox>\n </Box>\n {(isError || helpText) && (\n <Box mt=\"5px\" ml=\"24px\">\n {isError ? (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"danger.500\">\n {errorText}\n </Text>\n ) : (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"black.medium\">\n {helpText}\n </Text>\n )}\n </Box>\n )}\n </Box>\n );\n }\n);\n\nCheckboxComponent.defaultProps = {\n isError: false,\n helpText: '',\n errorText: '',\n boxProps: {},\n};\n\nexport default CheckboxComponent;\n","/* eslint-disable no-nested-ternary */\nimport type { CheckboxGroupProps } from '@chakra-ui/react';\nimport { Box, CheckboxGroup, Stack } from '@chakra-ui/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\n\nexport interface CheckboxGroupComponentProps extends FieldProps, CheckboxGroupProps, PropsWithChildren {\n label: string;\n helpText?: string;\n isError?: boolean;\n errorMessage?: string;\n}\n\nfunction CheckboxGroupComponent(props: CheckboxGroupComponentProps) {\n const { children, label, helpText, isError, errorMessage, ...rest } = props;\n return (\n <Field {...rest} label={label} leftHelperText={helpText} isError={isError} errorMessage={errorMessage}>\n <Box mt=\"12px\">\n <CheckboxGroup {...rest}>\n <Stack spacing={[1, '16px']} direction={['column', 'row']}>\n {children}\n </Stack>\n </CheckboxGroup>\n </Box>\n </Field>\n );\n}\n\nCheckboxGroupComponent.defaultProps = {\n helpText: '',\n isError: false,\n errorMessage: '',\n};\n\nexport default CheckboxGroupComponent;\n","/* eslint-disable no-nested-ternary */\nimport type { FormControlProps } from '@chakra-ui/react';\nimport { Box, FormControl, FormErrorMessage, FormHelperText, FormLabel } from '@chakra-ui/react';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport React from 'react';\n\nexport interface Props {\n label?: string | ReactNode;\n isError?: boolean;\n isSuccess?: boolean;\n errorMessage?: string | ReactNode;\n leftHelperText?: string | ReactNode;\n rightHelperText?: string | ReactNode;\n isRequired?: boolean;\n boxProps?: FormControlProps;\n}\n\nexport type FieldProps<T = unknown> = Props & T;\n\nconst Field: FC<PropsWithChildren<Props>> = props => {\n const {\n label,\n isError,\n errorMessage,\n leftHelperText,\n rightHelperText,\n isRequired,\n children,\n isSuccess,\n boxProps = {},\n } = props;\n\n const getHelperColor = () => {\n if (isError) return 'danger.500';\n if (isSuccess) return 'success.500';\n return 'black.medium';\n };\n\n const getJustifyContentHelper = () => {\n if (rightHelperText && (!leftHelperText || (isError && !errorMessage))) return 'flex-end';\n return 'space-between';\n };\n\n const helperColor = getHelperColor();\n const justifyHelper = getJustifyContentHelper();\n\n return (\n <FormControl isInvalid={isError} {...boxProps}>\n {label &&\n (typeof label === 'string' ? (\n <FormLabel mb={1} fontSize=\"text.sm\" requiredIndicator={undefined}>\n {isRequired && (\n <Box as=\"span\" color=\"danger.500\" ml={0} mr={1}>\n *\n </Box>\n )}\n {label}\n </FormLabel>\n ) : (\n label\n ))}\n {children}\n {((isError && errorMessage) || leftHelperText || rightHelperText) && (\n <Box display=\"flex\" width=\"full\" justifyContent={justifyHelper}>\n {!isError ? (\n leftHelperText &&\n (typeof leftHelperText === 'string' ? (\n <FormHelperText fontSize=\"text.xs\" color={helperColor} mt={1}>\n {leftHelperText}\n </FormHelperText>\n ) : (\n leftHelperText\n ))\n ) : typeof errorMessage === 'string' ? (\n <FormErrorMessage fontSize=\"text.xs\" color=\"danger.500\" mt={1}>\n {errorMessage}\n </FormErrorMessage>\n ) : (\n errorMessage\n )}\n {rightHelperText &&\n (typeof rightHelperText === 'string' ? (\n <FormHelperText fontSize=\"text.xs\" color={helperColor} mt={1}>\n {rightHelperText}\n </FormHelperText>\n ) : (\n rightHelperText\n ))}\n </Box>\n )}\n </FormControl>\n );\n};\n\nField.defaultProps = {\n label: '',\n isError: false,\n isSuccess: false,\n errorMessage: undefined,\n leftHelperText: undefined,\n rightHelperText: undefined,\n isRequired: false,\n boxProps: {},\n};\n\nexport default Field;\n","export { default as Checkbox } from './components/checkbox';\nexport * from './components/checkbox';\nexport { default as CheckboxGroup } from './components/checkbox-group';\nexport * from './components/checkbox-group';\nexport {\n CheckboxGroupContext,\n CheckboxGroupProps,\n CheckboxIcon,\n CheckboxIconProps,\n CheckboxState,\n useCheckbox,\n useCheckboxGroup,\n UseCheckboxGroupProps,\n UseCheckboxGroupReturn,\n UseCheckboxProps,\n UseCheckboxReturn,\n} from '@chakra-ui/react';\n","import { Box, useStyleConfig } from '@chakra-ui/react';\nimport { Close } from '@ctlyst.id/internal-icon';\nimport type { ReactNode } from 'react';\nimport React, { useMemo } from 'react';\n\nexport interface ChipsProps {\n isDisabled?: boolean;\n isActive?: boolean;\n onClose?: () => void;\n children?: ReactNode;\n size?: 'sm' | 'md';\n}\n\nconst Chips = ({ children, ...rest }: ChipsProps) => {\n const { isActive, isDisabled, onClose } = rest;\n const styles = useStyleConfig('Chips', rest);\n\n const closeColor = useMemo(() => {\n if (isActive) return 'white.high';\n if (isDisabled) return 'black.low';\n return 'primary.500';\n }, [isActive, isDisabled]);\n\n return (\n <Box __css={styles} display=\"inline-flex\" alignItems=\"center\" justifyContent=\"center\" {...rest}>\n {children}\n {onClose && (\n <Box\n onClick={isDisabled ? undefined : onClose}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n ml={2}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <Close color={closeColor} size={4} />\n </Box>\n )}\n </Box>\n );\n};\n\nChips.defaultProps = {\n isDisabled: false,\n isActive: false,\n onClose: undefined,\n children: undefined,\n size: 'sm',\n};\n\nexport default Chips;\n","/* eslint-disable react/require-default-props */\nimport { Box, HStack, IconButton, Text } from '@chakra-ui/react';\nimport React from 'react';\nimport { FiMinus, FiPlus } from 'react-icons/fi';\n\nimport { InputField } from '../../form';\n\nexport interface CounterProps {\n value: number;\n size?: string;\n min?: number;\n max?: number;\n onChange: (val: number) => void;\n isError?: boolean;\n disabled?: boolean;\n error?: string | React.ReactNode;\n helperText?: string | React.ReactNode;\n isReadOnly?: boolean;\n}\n\nconst Counter = ({\n value,\n size = 'xs',\n min = 0,\n max = 9999,\n onChange,\n isError = false,\n disabled = false,\n error = '',\n helperText = '',\n isReadOnly = false,\n}: CounterProps) => {\n const decrement = () => {\n onChange(value - 1);\n };\n\n const increment = () => {\n onChange(value + 1);\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(+e.target.value);\n };\n\n return (\n <Box>\n <HStack gap=\"1\">\n <IconButton\n aria-label=\"minus\"\n data-test-id=\"CT_Component_Counter_decrement\"\n onClick={decrement}\n isDisabled={disabled || +value <= min}\n size={size}\n icon={<FiMinus />}\n />\n <InputField\n data-test-id=\"CT_Component_Counter_input\"\n value={value}\n isError={isError}\n isDisabled={disabled || max === 0}\n textAlign=\"center\"\n size={size}\n min={min}\n max={max}\n onChange={handleChange}\n isReadOnly={isReadOnly}\n width={12}\n type=\"number\"\n // borderColor={isError ? 'danger.500' : 'neutral.400'}\n />\n <IconButton\n aria-label=\"plus\"\n data-test-id=\"CT_Component_Counter_decrement\"\n onClick={increment}\n isDisabled={disabled || +value >= max}\n size={size}\n icon={<FiPlus />}\n />\n </HStack>\n {!isError ? (\n <Text mt={1} color=\"black.medium\" textStyle={'text.xs'}>\n {helperText}\n </Text>\n ) : (\n <Text mt={1} color=\"danger.500\" textStyle={'text.xs'}>\n {error}\n </Text>\n )}\n </Box>\n );\n};\n\nexport default Counter;\n","import { InputLeftAddon, InputRightAddon } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface InputAddonProps {\n children: React.ReactNode;\n}\n\nexport const InputAddonLeft = ({ children, ...props }: InputAddonProps) => {\n return (\n <InputLeftAddon backgroundColor=\"neutral.200\" px={3} py={2.5} style={{ border: 0, marginInlineEnd: 0 }} {...props}>\n {children}\n </InputLeftAddon>\n );\n};\n\nexport const InputAddonRight = ({ children, ...props }: InputAddonProps) => {\n return (\n <InputRightAddon\n backgroundColor=\"neutral.200\"\n px={3}\n py={2.5}\n style={{ border: 0, marginInlineStart: 0 }}\n {...props}\n >\n {children}\n </InputRightAddon>\n );\n};\n","export { InputLeftElement as InputElementLeft } from '@chakra-ui/react';\nexport { InputRightElement as InputElementRight } from '@chakra-ui/react';\n","import type { InputProps as ChakraInputProps } from '@chakra-ui/react';\nimport { Box, Input as ChakraInput, InputGroup } from '@chakra-ui/react';\nimport { Close, Eye, EyeOff } from '@ctlyst.id/internal-icon';\nimport type { ReactNode } from 'react';\nimport React, { useMemo, useState } from 'react';\n\nimport type { FieldProps } from '../../field/components/field';\nimport Field from '../../field/components/field';\nimport { Loader } from '../../loader';\n\nexport interface InputFieldProps extends ChakraInputProps, FieldProps {\n addOnLeft?: ReactNode;\n addOnRight?: ReactNode;\n withClear?: boolean;\n isLoading?: boolean;\n onClear?: () => void;\n}\n\nconst InputField = React.forwardRef<HTMLInputElement, InputFieldProps>((props, ref) => {\n const {\n value,\n type,\n addOnLeft,\n addOnRight,\n size,\n isRequired,\n label,\n isError,\n isSuccess,\n isDisabled,\n errorMessage,\n leftHelperText,\n rightHelperText,\n withClear,\n onClear,\n isLoading,\n ...inputProps\n } = props;\n\n const getProperties = () => {\n let outlineColor = 'neutral.400';\n let focusColor = 'primary.500';\n\n if (isError || isDisabled || isSuccess) {\n if (isError) outlineColor = 'danger.500';\n else if (isSuccess) outlineColor = 'success.500';\n focusColor = outlineColor;\n }\n\n return {\n outlineColor,\n focusColor,\n };\n };\n\n const [isShowPassword, setIsShowPassword] = useState(false);\n\n const inputType = useMemo(() => {\n return type === 'password' && isShowPassword ? 'text' : type;\n }, [isShowPassword, type]);\n\n const fontSize = useMemo(() => {\n if (type === 'password') {\n if (!isShowPassword && value) return 'text.xl';\n }\n return 'text.sm';\n }, [isShowPassword, type, value]);\n\n const iconColor = useMemo(() => {\n return isDisabled ? 'black.low' : 'black.medium';\n }, [isDisabled]);\n\n const { outlineColor, focusColor } = getProperties();\n\n return (\n <Field\n label={label}\n isSuccess={isSuccess}\n isError={isError}\n errorMessage={errorMessage}\n leftHelperText={leftHelperText}\n rightHelperText={rightHelperText}\n isRequired={isRequired}\n >\n <Box\n transition=\"all 0.15s\"\n boxShadow=\"none\"\n borderRadius=\"sm\"\n border=\"1px solid\"\n borderColor={outlineColor}\n _focusWithin={{\n borderColor: focusColor,\n }}\n >\n <InputGroup\n size={size}\n borderRadius=\"sm\"\n backgroundColor={isDisabled ? 'neutral.300' : 'white.high'}\n cursor={isDisabled ? 'not-allowed' : 'default'}\n >\n {addOnLeft}\n <ChakraInput\n ref={ref}\n type={inputType}\n value={value}\n isDisabled={isDisabled}\n isSuccess={isSuccess}\n {...inputProps}\n fontSize={fontSize}\n />\n {(withClear || isLoading || type === 'password') && (\n <Box\n data-test-id=\"CT_Component_ClearInput\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n width=\"16px\"\n mr=\"10px\"\n >\n {withClear && !isLoading && (\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n onClick={!isDisabled ? onClear : undefined}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n >\n <Close size={4} color={iconColor} />\n </Box>\n )}\n {type === 'password' && !isShowPassword && !isLoading && (\n <Box\n data-test-id=\"q2Bj2G4FlamXyHuRKMZ1Q\"\n onClick={() => {\n if (!isDisabled) setIsShowPassword(true);\n }}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n display=\"flex\"\n justifyContent=\"center\"\n >\n <EyeOff size={4} color={iconColor} />\n </Box>\n )}\n {type === 'password' && isShowPassword && !isLoading && (\n <Box\n data-test-id=\"sfc2388bmeXBmdla45Ibk\"\n onClick={() => {\n if (!isDisabled) setIsShowPassword(false);\n }}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n display=\"flex\"\n justifyContent=\"center\"\n >\n <Eye size={4} color={iconColor} />\n </Box>\n )}\n {isLoading && <Loader size=\"sm\" />}\n </Box>\n )}\n {addOnRight}\n </InputGroup>\n </Box>\n </Field>\n );\n});\n\nInputField.displayName = 'InputField';\nInputField.defaultProps = {\n addOnLeft: undefined,\n addOnRight: undefined,\n withClear: undefined,\n isLoading: undefined,\n onClear: undefined,\n};\n\nexport default InputField;\n","import type { TextareaProps as ChakraTextareaProps } from '@chakra-ui/react';\nimport { Box, Textarea as ChakraTextarea } from '@chakra-ui/react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\nimport { Loader } from '../../loader';\n\nexport interface TextAreaProps extends ChakraTextareaProps, FieldProps {\n isLoading?: boolean;\n}\n\nconst TextareaField = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, ref) => {\n const { value, isLoading, ...inputProps } = props;\n\n return (\n <Field {...inputProps}>\n <Box position=\"relative\">\n <ChakraTextarea ref={ref} value={value} {...inputProps} />\n {isLoading && (\n <Box zIndex={999} top={2} right={2} position=\"absolute\">\n <Loader size=\"sm\" />\n </Box>\n )}\n </Box>\n </Field>\n );\n});\n\nTextareaField.defaultProps = {\n isLoading: undefined,\n};\n\nexport default TextareaField;\n","export * from './components/input-addon';\nexport * from './components/input-element';\nexport { default as InputField } from './components/input-field';\nexport * from './components/input-field';\nexport { default as TextareaField } from './components/textarea';\nexport * from './components/textarea';\nexport {\n FormControl,\n FormControlProps,\n FormErrorMessage,\n FormHelperText,\n FormLabel,\n FormLabelProps,\n InputGroup,\n InputGroupProps,\n InputLeftAddon,\n InputLeftAddonProps,\n InputLeftElement,\n InputLeftElementProps,\n InputProps,\n InputRightAddon,\n InputRightAddonProps,\n InputRightElement,\n InputRightElementProps,\n RequiredIndicator,\n RequiredIndicatorProps,\n} from '@chakra-ui/react';\n","/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable react/no-unstable-nested-components */\nimport { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from '@chakra-ui/icons';\nimport type {\n BoxProps,\n SystemStyleObject,\n TableBodyProps,\n TableCellProps,\n TableColumnHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from '@chakra-ui/react';\nimport {\n Box,\n Checkbox,\n Flex,\n Skeleton,\n Table,\n Tbody,\n Td,\n Text,\n Th,\n Thead,\n Tr,\n useColorModeValue,\n} from '@chakra-ui/react';\nimport { css } from '@emotion/react';\nimport type {\n Column,\n ColumnDef,\n ColumnPinningState,\n OnChangeFn,\n RowSelectionInstance,\n RowSelectionState,\n SortingState,\n Updater,\n} from '@tanstack/react-table';\nimport { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';\nimport * as React from 'react';\nimport { useRef } from 'react';\n\nexport interface TableStyleProps {\n table?: TableProps;\n tableHead?: TableHeadProps;\n tableRow?: TableRowProps;\n tableBody?: TableBodyProps;\n tableColumnHeader?: TableColumnHeaderProps;\n tableCell?: TableCellProps;\n}\n\nexport interface DataTableProps<T = unknown> extends BoxProps {\n container?: BoxProps;\n styles?: TableStyleProps;\n columns: ColumnDef<T>[];\n dataSource: T[] | undefined;\n isLoading?: boolean;\n withSelectedRow?: boolean | undefined;\n onSelectedRow?: (data: T[]) => void;\n onSort?: (data: SortingState) => void;\n manualSorting?: boolean;\n sortingState?: SortingState;\n sortDescFirst?: boolean;\n headerSticky?: boolean;\n columnPinning?: ColumnPinningState;\n onRowClick?: (data: T) => void;\n}\n\nconst getCommonPinningStyles = <T,>(column: Column<T>): SystemStyleObject => {\n const isPinned = column.getIsPinned();\n const isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');\n const isFirstRightPinnedColumn = isPinned === 'right' && column.getIsFirstColumn('right');\n\n return {\n left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,\n right: isPinned === 'right' ? `${column.getAfter('right')}px` : undefined,\n position: isPinned ? 'sticky' : 'relative',\n zIndex: isPinned ? 1 : 0,\n backgroundColor: 'white',\n ...(isLastLeftPinnedColumn\n ? {\n padding: 0,\n '&:after': {\n content: \"''\",\n position: 'absolute',\n width: '30px',\n right: '0px',\n bottom: '-1px',\n top: 0,\n transform: 'translateX(100%)',\n boxShadow: 'inset 14px 0px 20px -10px #00000010',\n },\n }\n : {}),\n ...(isFirstRightPinnedColumn\n ? {\n padding: '0px 0px 0px 8px',\n '&:after': {\n content: \"''\",\n position: 'absolute',\n width: '30px',\n left: '0%',\n top: 0,\n bottom: '-1px',\n transform: 'translateX(-100%)',\n boxShadow: 'inset -14px 0px 20px -10px #00000010',\n },\n }\n : {}),\n };\n};\nexport type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;\n\nexport const useDataTable = <T,>({\n columns,\n dataSource = [],\n withSelectedRow,\n onSelectedRow,\n onSort,\n sortDescFirst,\n sortingState,\n manualSorting,\n columnPinning,\n}: DataTableProps<T>) => {\n const [isFirstLoad, setIsFirstLoad] = React.useState<boolean>(true);\n const [sorting, setSorting] = React.useState<SortingState>(sortingState ?? []);\n const [rowSelection, onRowSelectionChange] = React.useState<RowSelectionState>({});\n const dataColumns = React.useMemo<ColumnDef<T>[]>(() => columns, [columns]);\n const checkboxColumn = React.useMemo<ColumnDef<T>[]>(\n () => [\n {\n id: 'select',\n size: 32,\n header: ({ table }) => (\n <Checkbox\n data-test-id=\"select-header-data-table\"\n {...{\n isChecked: table.getIsAllRowsSelected(),\n isIndeterminate: table.getIsSomeRowsSelected(),\n onChange: table.getToggleAllRowsSelectedHandler(),\n }}\n />\n ),\n cell: ({ row }) => (\n <Checkbox\n data-test-id={`select-data-table-${row.index}`}\n {...{\n isChecked: row.getIsSelected(),\n isIndeterminate: row.getIsSomeSelected(),\n onChange: row.getToggleSelectedHandler(),\n }}\n />\n ),\n },\n ],\n []\n );\n\n const generateColumn = () => {\n if (withSelectedRow) {\n return [...checkboxColumn, ...dataColumns];\n }\n return dataColumns;\n };\n\n const onSortingChange: OnChangeFn<SortingState> = (data: Updater<SortingState>) => {\n setSorting(data);\n };\n\n const table = useReactTable({\n data: dataSource,\n columns: generateColumn(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n manualPagination: true,\n manualSorting,\n sortDescFirst,\n state: {\n sorting,\n rowSelection,\n ...(columnPinning ? { columnPinning } : {}),\n },\n onRowSelectionChange,\n onSortingChange,\n });\n\n const { getSelectedRowModel, toggleAllRowsSelected } = table;\n const { flatRows } = getSelectedRowModel();\n React.useEffect(() => {\n const rowData = flatRows.map(row => row.original);\n if (onSelectedRow) {\n onSelectedRow(rowData);\n }\n }, [flatRows]);\n\n React.useEffect(() => {\n if (onSort && !isFirstLoad) {\n onSort(sorting);\n }\n }, [sorting]);\n\n React.useEffect(() => {\n setIsFirstLoad(false);\n }, []);\n return {\n table,\n toggleAllRowsSelected,\n generateColumn,\n };\n};\n\nconst DataTable = React.forwardRef(<T,>(props: DataTableProps<T>, ref?: React.Ref<DataTableRefs<T>>) => {\n const { isLoading, styles, headerSticky, onRowClick, container } = props;\n const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);\n React.useImperativeHandle(ref, () => ({\n toggleAllRowsSelected,\n }));\n\n return (\n <Box overflowX=\"auto\" position=\"relative\" maxW=\"100%\" minH={400} w=\"full\" {...container}>\n {isLoading && (\n <Table {...styles?.table}>\n <Thead {...(styles?.tableHead, headerSticky ? { position: 'sticky', top: 0, bg: 'white', zIndex: 1 } : {})}>\n {table.getHeaderGroups().map(headerGroup => (\n <Tr mx=\"2\" key={headerGroup.id} {...styles?.tableRow}>\n {headerGroup.headers.map((header, index) => (\n <Th\n key={header.id}\n colSpan={header.colSpan}\n width={`${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`}\n {...styles?.tableColumnHeader}\n >\n <Flex\n data-test-id=\"CT_component_data-table_loader\"\n textTransform=\"capitalize\"\n align=\"center\"\n gap={2}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n </Flex>\n </Th>\n ))}\n </Tr>\n ))}\n </Thead>\n\n <Tbody>\n {[...Array(5)].map(num => (\n <Tr mx=\"2\" key={num}>\n {[...Array(generateColumn().length)].map(i => (\n <Td key={i} width={210}>\n <Skeleton startColor=\"gray.50\" endColor=\"gray.100\" key={i} h=\"30px\" w=\"100%\" />\n </Td>\n ))}\n </Tr>\n ))}\n </Tbody>\n </Table>\n )}\n\n <Table {...styles?.table}>\n <Thead {...(styles?.tableHead, headerSticky ? { position: 'sticky', top: 0, bg: 'white', zIndex: 1 } : {})}>\n {table.getHeaderGroups().map(headerGroup => (\n <Tr key={headerGroup.id} bg={useColorModeValue('initial', 'ebony-clay.700')} {...styles?.tableRow}>\n {headerGroup.headers.map((header, index) => (\n <Th\n key={header.id}\n colSpan={header.colSpan}\n sx={getCommonPinningStyles(header.column)}\n width={`${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`}\n {...styles?.tableColumnHeader}\n >\n <Flex\n backgroundColor=\"white\"\n height={'100%'}\n data-test-id={`CT_Container_TableHeader_${header.id}`}\n textTransform=\"capitalize\"\n userSelect=\"none\"\n align=\"center\"\n gap={2}\n >\n <Text>{flexRender(header.column.columnDef.header, header.getContext())}</Text>\n <Box\n as=\"span\"\n cursor={header.column.getCanSort() ? 'pointer' : 'default'}\n data-test-id={`CT_Container_SortingIcon_${header.id}`}\n onClick={header.column.getToggleSortingHandler()}\n >\n {(header.column.getCanSort() &&\n {\n asc: <ChevronUpIcon />,\n desc: <ChevronDownIcon />,\n }[header.column.getIsSorted() as string]) ?? <UpDownIcon h={2} />}\n </Box>\n </Flex>\n </Th>\n ))}\n </Tr>\n ))}\n </Thead>\n <Tbody {...styles?.tableBody}>\n {table.getRowModel().rows.map(row => {\n const trRef = useRef<HTMLTableRowElement>();\n return (\n <Tr\n data-test-id=\"-RU0hNYGRzeVM3HQ4cXHl\"\n tabindex=\"0\"\n ref={trRef}\n key={row.id}\n {...styles?.tableRow}\n css={css`\n &:last-child {\n td {\n border-bottom: none;\n }\n }\n `}\n onMouseDown={() => {\n trRef.current?.setAttribute('data-active', 'true');\n }}\n onMouseUp={() => {\n trRef.current?.removeAttribute('data-active');\n }}\n onClick={() => {\n if (onRowClick) {\n onRowClick(row.original);\n }\n }}\n >\n {row.getVisibleCells().map(cell => (\n <Td\n data-test-id={`CT_Component_TableCell_${cell.id}`}\n key={cell.id}\n fontSize=\"text.sm\"\n color={useColorModeValue('dark.800', 'dark.300')}\n sx={getCommonPinningStyles(cell.column)}\n {...styles?.tableCell}\n >\n <Flex height={'100%'} backgroundColor={'white'} align=\"center\">\n <Box\n tabIndex={0}\n display=\"inline-block\"\n cursor=\"auto\"\n data-test-id={`CT_Component_TableCell_Content-${cell.id}`}\n onMouseUp={e => e.stopPropagation()}\n onMouseDown={e => e.stopPropagation()}\n onClick={e => {\n e.stopPropagation();\n }}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Box>\n </Flex>\n </Td>\n ))}\n </Tr>\n );\n })}\n </Tbody>\n </Table>\n </Box>\n );\n});\n\n/* eslint-disable react/default-props-match-prop-types */\nDataTable.defaultProps = {\n container: undefined,\n withSelectedRow: false,\n styles: undefined,\n isLoading: undefined,\n onSelectedRow: undefined,\n onSort: undefined,\n manualSorting: false,\n sortingState: [],\n sortDescFirst: false,\n headerSticky: false,\n onRowClick: undefined,\n columnPinning: undefined,\n};\n\nexport default DataTable as <T>(\n props: DataTableProps<T> & {\n ref?: React.Ref<DataTableRefs<T>>;\n }\n) => JSX.Element;\n","import {\n FormControl,\n FormErrorMessage,\n FormHelperText,\n FormLabel,\n InputGroup,\n InputRightElement,\n} from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport React from 'react';\nimport type { DatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport { FiCalendar, FiX } from 'react-icons/fi';\n\nimport { InputField } from '../../form';\nimport Styles from './styles';\nimport TimeInput from './time-input';\n\nexport type DatepickerProps = DatePickerProps & {\n id?: string;\n isRequired?: boolean;\n label?: string;\n error?: string | React.ReactNode;\n isError?: boolean;\n helperText?: string | React.ReactNode;\n withTime?: boolean;\n onClear?: () => void;\n showMonth?: boolean;\n shortMonth?: boolean;\n};\n\nconst Datepicker: React.FC<DatepickerProps> = ({\n id,\n label,\n error,\n isError,\n helperText,\n isRequired,\n withTime,\n value,\n name,\n onClear,\n showMonth,\n shortMonth,\n ...props\n}) => {\n const selected = value ? new Date(value) : undefined;\n const dateFormat = props.dateFormat ?? withTime ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd';\n\n const getTimeProps = (): Pick<DatePickerProps, 'showTimeInput' | 'customTimeInput' | 'timeInputLabel'> => {\n if (!withTime) return {};\n return {\n timeInputLabel: '',\n showTimeInput: true,\n customTimeInput: <TimeInput />,\n };\n };\n\n const component = (\n <>\n <Styles />\n <ReactDatePicker\n id={id}\n name={name}\n selected={selected}\n customInput={<InputField autoComplete=\"off\" />}\n dateFormat={dateFormat}\n showPopperArrow={false}\n calendarClassName={cx({ inline: props.inline })}\n showMonthDropdown={showMonth}\n useShortMonthInDropdown={showMonth ? shortMonth : false}\n {...getTimeProps()}\n {...props}\n />\n </>\n );\n\n if (props.inline) {\n return component;\n }\n\n return (\n <FormControl isRequired={isRequired} data-test-id=\"CT_Component_datepicker_wrapper\" isInvalid={isError}>\n {label && <FormLabel fontSize=\"text.sm\">{label}</FormLabel>}\n <InputGroup>\n {component}\n <InputRightElement>\n {!value && <FiCalendar />}\n {value && <FiX data-test-id=\"bcpJJyCP0z_RIAGZXDU6s\" onClick={onClear} cursor=\"pointer\" />}\n </InputRightElement>\n </InputGroup>\n {!isError ? (\n <FormHelperText fontSize=\"text.xs\" mt={1}>\n {helperText}\n </FormHelperText>\n ) : (\n <FormErrorMessage fontSize=\"text.xs\" mt={1}>\n {error}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nDatepicker.defaultProps = {\n id: undefined,\n isRequired: undefined,\n label: undefined,\n error: undefined,\n isError: undefined,\n helperText: undefined,\n withTime: undefined,\n onClear: undefined,\n shortMonth: false,\n showMonth: false,\n};\n\nexport default Datepicker;\n","import { useColorMode } from '@chakra-ui/system';\nimport { Global } from '@emotion/react';\nimport React from 'react';\n\nconst Styles = () => {\n const { colorMode } = useColorMode();\n return (\n <Global\n styles={`\n @charset \"UTF-8\";\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {\n border-color: ${colorMode === 'light' ? '#6E6B7B' : '#d0d1d2'};\n border-style: solid;\n border-width: 1px 1px 0 0;\n content: \"\";\n display: block;\n height: 7px;\n position: absolute;\n top: 13px;\n width: 7px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {\n margin-left: -4px;\n position: absolute;\n width: 0;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n box-sizing: content-box;\n position: absolute;\n border: 8px solid transparent;\n height: 0;\n width: 1px;\n content: \"\";\n z-index: -1;\n border-width: 8px;\n left: -8px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {\n border-bottom-color: #aeaeae;\n }\n\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {\n top: 0;\n margin-top: -8px;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n border-top: none;\n border-bottom-color: #f0f0f0;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n top: 0;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {\n top: -1px;\n border-bottom-color: #aeaeae;\n }\n\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle {\n bottom: 0;\n margin-bottom: -8px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {\n border-bottom: none;\n border-top-color: #fff;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {\n bottom: 0;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before {\n bottom: -1px;\n border-top-color: #aeaeae;\n }\n\n .react-datepicker-wrapper {\n display: inline-block;\n padding: 0;\n border: 0;\n width: 100%;\n }\n\n .react-datepicker {\n font-family: \"inherit\", helvetica, arial, sans-serif;\n font-size: 0.75;\n background-color: ${colorMode === 'light' ? '#ffffff' : '#283046'};\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.08));\n border-radius: 0.3rem;\n display: inline-block;\n position: relative;\n }\n\n .react-datepicker.inline {\n filter: none;\n }\n\n .react-datepicker--time-only .react-datepicker__triangle {\n left: 35px;\n }\n .react-datepicker--time-only .react-datepicker__time-container {\n border-left: 0;\n }\n .react-datepicker--time-only .react-datepicker__time,\n .react-datepicker--time-only .react-datepicker__time-box {\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n }\n\n .react-datepicker__triangle {\n position: absolute;\n left: 50px;\n }\n\n .react-datepicker-popper {\n z-index: 1;\n }\n .react-datepicker-popper[data-placement^=bottom] {\n padding-top: 10px;\n }\n .react-datepicker-popper[data-placement=bottom-end] .react-datepicker__triangle, .react-datepicker-popper[data-placement=top-end] .react-datepicker__triangle {\n left: auto;\n right: 50px;\n }\n .react-datepicker-popper[data-placement^=top] {\n padding-bottom: 10px;\n }\n .react-datepicker-popper[data-placement^=right] {\n padding-left: 8px;\n }\n .react-datepicker-popper[data-placement^=right] .react-datepicker__triangle {\n left: auto;\n right: 42px;\n }\n .react-datepicker-popper[data-placement^=left] {\n padding-right: 8px;\n }\n .react-datepicker-popper[data-placement^=left] .react-datepicker__triangle {\n left: 42px;\n right: auto;\n }\n\n .react-datepicker__header {\n text-align: center;\n background-color: ${colorMode === 'light' ? '#ffffff' : '#131620'};\n border-top-left-radius: 0.3rem;\n padding: 8px 0;\n position: relative;\n }\n .react-datepicker__header--time {\n padding-bottom: 8px;\n padding-left: 5px;\n padding-right: 5px;\n }\n .react-datepicker__header--time:not(.react-datepicker__header--time--only) {\n border-top-left-radius: 0;\n }\n .react-datepicker__header:not(.react-datepicker__header--has-time-select) {\n border-top-right-radius: 0.3rem;\n }\n\n .react-datepicker__year-dropdown-container--select,\n .react-datepicker__month-dropdown-container--select,\n .react-datepicker__month-year-dropdown-container--select,\n .react-datepicker__year-dropdown-container--scroll,\n .react-datepicker__month-dropdown-container--scroll,\n .react-datepicker__month-year-dropdown-container--scroll {\n display: inline-block;\n margin: 0 2px;\n }\n .react-datepicker__header__dropdown.react-datepicker__header__dropdown--select {\n font-weight: 600;\n line-height: 22px;\n color: #111111;\n }\n\n .react-datepicker__current-month,\n .react-datepicker-time__header,\n .react-datepicker-year-header {\n margin-top: 0;\n color: ${colorMode === 'light' ? '#111111' : '#d0d1d2'};\n font-size: 0.75;\n }\n\n .react-datepicker-time__header {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n .react-datepicker__navigation {\n align-items: center;\n background: none;\n display: flex;\n justify-content: center;\n text-align: center;\n cursor: pointer;\n position: absolute;\n top: 2px;\n padding: 0;\n border: none;\n z-index: 1;\n height: 32px;\n width: 32px;\n text-indent: -999em;\n overflow: hidden;\n }\n .react-datepicker__navigation--previous {\n left: 2px;\n }\n .react-datepicker__navigation--next {\n right: 2px;\n }\n .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {\n right: 85px;\n }\n .react-datepicker__navigation--years {\n position: relative;\n top: 0;\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n .react-datepicker__navigation--years-previous {\n top: 4px;\n }\n .react-datepicker__navigation--years-upcoming {\n top: -4px;\n }\n .react-datepicker__navigation:hover *::before {\n border-color: #a6a6a6;\n }\n\n .react-datepicker__navigation-icon {\n position: relative;\n top: -1px;\n font-size: 20px;\n width: 0;\n }\n .react-datepicker__navigation-icon--next {\n left: -2px;\n }\n .react-datepicker__navigation-icon--next::before {\n transform: rotate(45deg);\n left: -7px;\n }\n .react-datepicker__navigation-icon--previous {\n right: -2px;\n }\n .react-datepicker__navigation-icon--previous::before {\n transform: rotate(225deg);\n right: -7px;\n }\n\n .react-datepicker__month-container {\n float: left;\n border-radius: 8px;\n }\n\n .react-datepicker__year {\n margin: 0.4rem;\n text-align: center;\n }\n .react-datepicker__year-wrapper {\n display: flex;\n flex-wrap: wrap;\n max-width: 180px;\n }\n .react-datepicker__year .react-datepicker__year-text {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n }\n\n .react-datepicker__month {\n margin: 0.4rem;\n text-align: center;\n }\n .react-datepicker__month .react-datepicker__month-text,\n .react-datepicker__month .react-datepicker__quarter-text {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n }\n\n .react-datepicker__input-time-container {\n width: 100%;\n }\n .react-datepicker__input-time-container .react-datepicker-time__caption {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {\n width: auto;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {\n -moz-appearance: textfield;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {\n width: 100%;\n display: inline-block;\n }\n\n .react-datepicker__time-container {\n float: right;\n border-left: 1px solid #aeaeae;\n width: 85px;\n }\n .react-datepicker__time-container--with-today-button {\n display: inline;\n border: 1px solid #aeaeae;\n border-radius: 0.3rem;\n position: absolute;\n right: -72px;\n top: 0;\n }\n .react-datepicker__time-container .react-datepicker__time {\n position: relative;\n background: white;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {\n width: 85px;\n overflow-x: hidden;\n margin: 0 auto;\n text-align: center;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {\n list-style: none;\n margin: 0;\n height: calc(195px + (1.7rem / 2));\n overflow-y: scroll;\n padding-right: 0;\n padding-left: 0;\n width: 100%;\n box-sizing: content-box;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {\n height: 30px;\n padding: 5px 10px;\n white-space: nowrap;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {\n cursor: pointer;\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: white;\n font-weight: bold;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {\n color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {\n cursor: default;\n background-color: transparent;\n }\n\n .react-datepicker__week-number {\n color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};\n display: inline-block;\n width: 1.7rem;\n line-height: 1.7rem;\n text-align: center;\n margin: 0.166rem;\n }\n .react-datepicker__week-number.react-datepicker__week-number--clickable {\n cursor: pointer;\n }\n .react-datepicker__week-number.react-datepicker__week-number--clickable:hover {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n\n .react-datepicker__day-names,\n .react-datepicker__week {\n white-space: nowrap;\n }\n\n .react-datepicker__day-names {\n margin-bottom: 0px;\n }\n\n .react-datepicker__day-name,\n .react-datepicker__day,\n .react-datepicker__time-name {\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n display: inline-block;\n width: 1.7rem;\n line-height: 1.7rem;\n text-align: center;\n padding: 0.166rem;\n }\n\n .react-datepicker__month--selected, .react-datepicker__month--in-selecting-range, .react-datepicker__month--in-range,\n .react-datepicker__quarter--selected,\n .react-datepicker__quarter--in-selecting-range,\n .react-datepicker__quarter--in-range {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: #fff;\n }\n .react-datepicker__month--selected:hover, .react-datepicker__month--in-selecting-range:hover, .react-datepicker__month--in-range:hover,\n .react-datepicker__quarter--selected:hover,\n .react-datepicker__quarter--in-selecting-range:hover,\n .react-datepicker__quarter--in-range:hover {\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n }\n .react-datepicker__month--disabled,\n .react-datepicker__quarter--disabled {\n color: #ccc;\n pointer-events: none;\n }\n .react-datepicker__month--disabled:hover,\n .react-datepicker__quarter--disabled:hover {\n cursor: default;\n background-color: transparent;\n }\n\n .react-datepicker__day,\n .react-datepicker__month-text,\n .react-datepicker__quarter-text,\n .react-datepicker__year-text {\n cursor: pointer;\n }\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n .react-datepicker__day--highlighted,\n .react-datepicker__month-text--highlighted,\n .react-datepicker__quarter-text--highlighted,\n .react-datepicker__year-text--highlighted {\n border-radius: 0.3rem;\n background-color: #3dcc4a;\n color: #fff;\n }\n .react-datepicker__day--highlighted:hover,\n .react-datepicker__month-text--highlighted:hover,\n .react-datepicker__quarter-text--highlighted:hover,\n .react-datepicker__year-text--highlighted:hover {\n background-color: #32be3f;\n }\n .react-datepicker__day--highlighted-custom-1,\n .react-datepicker__month-text--highlighted-custom-1,\n .react-datepicker__quarter-text--highlighted-custom-1,\n .react-datepicker__year-text--highlighted-custom-1 {\n color: magenta;\n }\n .react-datepicker__day--highlighted-custom-2,\n .react-datepicker__month-text--highlighted-custom-2,\n .react-datepicker__quarter-text--highlighted-custom-2,\n .react-datepicker__year-text--highlighted-custom-2 {\n color: green;\n }\n .react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,\n .react-datepicker__month-text--selected,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--selected,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--selected,\n .react-datepicker__year-text--in-selecting-range,\n .react-datepicker__year-text--in-range {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: #fff;\n }\n .react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,\n .react-datepicker__month-text--selected:hover,\n .react-datepicker__month-text--in-selecting-range:hover,\n .react-datepicker__month-text--in-range:hover,\n .react-datepicker__quarter-text--selected:hover,\n .react-datepicker__quarter-text--in-selecting-range:hover,\n .react-datepicker__quarter-text--in-range:hover,\n .react-datepicker__year-text--selected:hover,\n .react-datepicker__year-text--in-selecting-range:hover,\n .react-datepicker__year-text--in-range:hover {\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n }\n .react-datepicker__day--keyboard-selected,\n .react-datepicker__month-text--keyboard-selected,\n .react-datepicker__quarter-text--keyboard-selected,\n .react-datepicker__year-text--keyboard-selected {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n color: #fff;\n }\n .react-datepicker__day--keyboard-selected:hover,\n .react-datepicker__month-text--keyboard-selected:hover,\n .react-datepicker__quarter-text--keyboard-selected:hover,\n .react-datepicker__year-text--keyboard-selected:hover {\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n }\n .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range) {\n background-color: rgba(18, 120, 74, 0.1);\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n }\n .react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range) {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n }\n .react-datepicker__day--disabled,\n .react-datepicker__month-text--disabled,\n .react-datepicker__quarter-text--disabled,\n .react-datepicker__year-text--disabled {\n cursor: default;\n color: #ccc;\n }\n .react-datepicker__day--disabled:hover,\n .react-datepicker__month-text--disabled:hover,\n .react-datepicker__quarter-text--disabled:hover,\n .react-datepicker__year-text--disabled:hover {\n background-color: transparent;\n }\n\n .react-datepicker__month-text.react-datepicker__month--selected:hover, .react-datepicker__month-text.react-datepicker__month--in-range:hover, .react-datepicker__month-text.react-datepicker__quarter--selected:hover, .react-datepicker__month-text.react-datepicker__quarter--in-range:hover,\n .react-datepicker__quarter-text.react-datepicker__month--selected:hover,\n .react-datepicker__quarter-text.react-datepicker__month--in-range:hover,\n .react-datepicker__quarter-text.react-datepicker__quarter--selected:hover,\n .react-datepicker__quarter-text.react-datepicker__quarter--in-range:hover {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n }\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n\n .react-datepicker__input-container {\n position: relative;\n display: inline-block;\n width: 100%;\n }\n\n .react-datepicker__year-read-view,\n .react-datepicker__month-read-view,\n .react-datepicker__month-year-read-view {\n border: 1px solid transparent;\n border-radius: 0.3rem;\n position: relative;\n }\n .react-datepicker__year-read-view:hover,\n .react-datepicker__month-read-view:hover,\n .react-datepicker__month-year-read-view:hover {\n cursor: pointer;\n }\n .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {\n border-top-color: #b3b3b3;\n }\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow {\n transform: rotate(135deg);\n right: -16px;\n top: 5px;\n width: 5px;\n height: 5px;\n fill: #111111;\n\n }\n .react-datepicker__header:not(.react-datepicker__header--has-time-select) {\n background: ${colorMode === 'light' ? '#F5F5F5' : 'inherit'} ;\n\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n\n .react-datepicker__year-dropdown,\n .react-datepicker__month-dropdown,\n .react-datepicker__month-year-dropdown {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n position: absolute;\n width: 50%;\n left: 25%;\n top: 30px;\n z-index: 1;\n text-align: center;\n border-radius: 0.3rem;\n border: 1px solid #aeaeae;\n }\n .react-datepicker__year-dropdown:hover,\n .react-datepicker__month-dropdown:hover,\n .react-datepicker__month-year-dropdown:hover {\n cursor: pointer;\n }\n .react-datepicker__year-dropdown--scrollable,\n .react-datepicker__month-dropdown--scrollable,\n .react-datepicker__month-year-dropdown--scrollable {\n height: 150px;\n overflow-y: scroll;\n }\n\n .react-datepicker__year-option,\n .react-datepicker__month-option,\n .react-datepicker__month-year-option {\n line-height: 20px;\n width: 100%;\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n .react-datepicker__year-option:first-of-type,\n .react-datepicker__month-option:first-of-type,\n .react-datepicker__month-year-option:first-of-type {\n border-top-left-radius: 0.3rem;\n border-top-right-radius: 0.3rem;\n }\n .react-datepicker__year-option:last-of-type,\n .react-datepicker__month-option:last-of-type,\n .react-datepicker__month-year-option:last-of-type {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__year-option:hover,\n .react-datepicker__month-option:hover,\n .react-datepicker__month-year-option:hover {\n background-color: #ccc;\n }\n .react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,\n .react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,\n .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {\n border-bottom-color: #b3b3b3;\n }\n .react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,\n .react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,\n .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {\n border-top-color: #b3b3b3;\n }\n .react-datepicker__year-option--selected,\n .react-datepicker__month-option--selected,\n .react-datepicker__month-year-option--selected {\n position: absolute;\n left: 15px;\n }\n\n .react-datepicker__close-icon {\n cursor: pointer;\n background-color: transparent;\n border: 0;\n outline: 0;\n padding: 0 6px 0 0;\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n }\n .react-datepicker__close-icon::after {\n cursor: pointer;\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: #fff;\n border-radius: 50%;\n height: 16px;\n width: 16px;\n padding: 2px;\n font-size: 12px;\n line-height: 1;\n text-align: center;\n display: table-cell;\n vertical-align: middle;\n content: \"×\";\n }\n\n .react-datepicker__today-button {\n background: #f0f0f0;\n border-top: 1px solid #aeaeae;\n cursor: pointer;\n text-align: center;\n font-weight: bold;\n padding: 5px 0;\n clear: left;\n }\n\n .react-datepicker__portal {\n position: fixed;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.8);\n left: 0;\n top: 0;\n justify-content: center;\n align-items: center;\n display: flex;\n z-index: 2147483647;\n }\n .react-datepicker__portal .react-datepicker__day-name,\n .react-datepicker__portal .react-datepicker__day,\n .react-datepicker__portal .react-datepicker__time-name {\n width: 3rem;\n line-height: 3rem;\n }\n @media (max-width: 400px), (max-height: 550px) {\n .react-datepicker__portal .react-datepicker__day-name,\n .react-datepicker__portal .react-datepicker__day,\n .react-datepicker__portal .react-datepicker__time-name {\n width: 2rem;\n line-height: 2rem;\n }\n }\n .react-datepicker__portal .react-datepicker__current-month,\n .react-datepicker__portal .react-datepicker-time__header {\n font-size: 1.44rem;\n }\n\n /** injected styles **/\n .react-datepicker__day--outside-month {\n color: ${colorMode === 'light' ? '#B9B9C3' : '#4D4D4D'};\n }\n .react-datepicker__day.react-datepicker__day--in-range {\n border-radius: 0;\n background: rgba(18, 120, 74, 0.1);\n color: #12784A;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range,\n .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {\n background: #12784A;\n color: #fff;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range {\n border-radius: 100px 0px 0px 100px;\n }\n .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {\n border-radius: 0px 100px 100px 0px;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day.react-datepicker__day--range-end {\n border-radius: 100px;\n padding: 0;\n }\n .react-datepicker__day.react-datepicker__day--outside-month:empty {\n padding: 0;\n }\n .react-datepicker.inline .react-datepicker__header {\n background-color: inherit;\n }\n .react-datepicker__day--keyboard-selected, .react-datepicker__day--keyboard-selected:hover {\n background-color: inherit;\n color: inherit;\n }\n .react-datepicker__day--today, .react-datepicker__day--today:hover {\n color: #D82F23;\n }\n .react-datepicker__day--today:hover {\n background: #f0f0f0;\n }\n .react-datepicker__day--selected.react-datepicker__day--today {\n color: white;\n background: #12784A;\n }\n `}\n />\n );\n};\n\nexport default Styles;\n","import { Flex, Input, InputGroup, InputRightAddon, Text } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface TimeInputProps {\n value?: string;\n onChange?: (time: string) => void;\n label?: string;\n rightAddon?: React.ReactNode | string;\n}\n\nconst TimeInput: React.FC<TimeInputProps> = ({ value, onChange, label, rightAddon }) => {\n const [time, setTime] = React.useState(value || '00:00');\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setTime(e.target?.value || '00:00');\n if (onChange) onChange(e.target?.value || '00:00');\n };\n\n return (\n <Flex flexDir=\"column\" alignItems=\"center\" justifyContent=\"center\" p={4} pt={0}>\n <Text mb={2}>{label}</Text>\n <InputGroup alignItems=\"center\" justifyContent=\"center\">\n <Input onChange={handleChange} type=\"time\" value={time} data-test-id=\"CT_Component_datepicker_input_time\" />\n {rightAddon && <InputRightAddon>{rightAddon}</InputRightAddon>}\n </InputGroup>\n </Flex>\n );\n};\n\nTimeInput.displayName = 'DatepickerTimeInput';\n\nTimeInput.defaultProps = {\n value: '00:00',\n onChange: undefined,\n label: 'Pilih Waktu',\n rightAddon: 'WIB',\n};\nexport default TimeInput;\n","import { Box, Input } from '@chakra-ui/react';\nimport { css } from '@emotion/react';\nimport type { FC } from 'react';\nimport React from 'react';\n\nexport interface DatePickerMonthProps {\n onChange: (date: string) => void;\n\n 'data-test-id'?: string;\n min: string;\n max: string;\n}\n\nconst DatePickerMonth: FC<DatePickerMonthProps> = ({ onChange, min, max, ...props }) => {\n const [date, setDate] = React.useState<string | null>(null);\n return (\n <Box\n fontSize={'12px'}\n lineHeight={'18px'}\n css={css`\n input[type='date']::-webkit-inner-spin-button,\n input[type='date']::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n input[value=''] {\n width: 58px;\n }\n `}\n >\n <Input\n data-test-id={props['data-test-id']}\n type=\"date\"\n width={date ? '51px' : '58px'}\n onChange={e => {\n onChange(e.target.value);\n setDate(e.target.value);\n }}\n p={'8px'}\n min={min}\n max={max}\n required\n css={css`\n border: 1px solid transparent;\n\n &:focus,\n &:hover {\n border: 1px solid transparent;\n }\n\n &::placeholder {\n color: #111111;\n }\n `}\n value={date ?? ''}\n />\n </Box>\n );\n};\n\nDatePickerMonth.defaultProps = {\n 'data-test-id': '',\n};\n\nexport default DatePickerMonth;\n","import { Box } from '@chakra-ui/react';\nimport styled from '@emotion/styled';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport DatePickerMonth from './datepicker-month';\n\nexport interface MultiDatePickerMonthProps {\n onChange: (startDate: string | null, endDate: string | null) => void;\n\n min?: string;\n max?: string;\n isError?: boolean;\n}\n\nconst MultiDateWrapper = styled(Box)<{ isError: boolean }>`\n display: flex;\n align-items: center;\n width: fit-content;\n border: 1px solid;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);\n border-radius: 4px;\n border-color: ${({ isError }) => (isError ? 'var(--chakra-colors-danger-500)' : 'var(--chakra-colors-primary-500)')};\n`;\n\nconst MultiDatePickerMonth: FC<MultiDatePickerMonthProps> = ({\n onChange,\n isError = false,\n min = '2020-01-01',\n max = '2020-12-31',\n}) => {\n const [date, setDate] = React.useState<(string | null)[]>([null, null]);\n return (\n <MultiDateWrapper isError={isError}>\n <DatePickerMonth\n data-test-id=\"CT_DatePickerMonth_StartDate\"\n onChange={val => {\n onChange(val, date[1]);\n setDate([val, date[1]]);\n }}\n min={min}\n max={max}\n />\n <Box>-</Box>\n <DatePickerMonth\n data-test-id=\"CT_DatePickerMonth_EndDate\"\n onChange={val => {\n onChange(date[0], val);\n setDate([date[0], val]);\n }}\n min={min}\n max={max}\n />\n </MultiDateWrapper>\n );\n};\n\nMultiDatePickerMonth.defaultProps = {\n min: '2020-01-01',\n max: '2020-12-31',\n isError: false,\n};\n\nexport default MultiDatePickerMonth;\n","import type { ModalProps as ChakraModalProps } from '@chakra-ui/react';\nimport { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface DialogProps extends Omit<ChakraModalProps, 'children'> {\n title: string;\n content: React.ReactNode;\n footer: React.ReactNode;\n isModalOverlay?: boolean;\n width?: string;\n isOverlayClickable?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = ({\n title,\n content,\n footer,\n isModalOverlay,\n width,\n isOverlayClickable,\n ...props\n}) => {\n return (\n <Modal {...props}>\n {isModalOverlay && <ModalOverlay pointerEvents={isOverlayClickable ? 'auto' : 'none'} />}\n\n <ModalContent bgColor=\"neutral.50\" fontFamily=\"Poppins\" width={width} minW={'400px'}>\n <ModalHeader bgColor=\"neutral.200\" py={2} px={4} borderTopRadius={'sm'}>\n <Text textStyle=\"text.lg\" fontWeight=\"normal\">\n {title}\n </Text>\n </ModalHeader>\n <ModalBody p={4} textStyle=\"text.md\">\n {content}\n </ModalBody>\n <ModalFooter bgColor=\"neutral.200\" p={4} borderBottomRadius={'sm'}>\n {footer}\n </ModalFooter>\n </ModalContent>\n </Modal>\n );\n};\n\nDialog.defaultProps = {\n isModalOverlay: true,\n width: '400px',\n isOverlayClickable: true,\n};\n\nexport default Dialog;\n","/* eslint-disable import/prefer-default-export */\nimport * as Icon from '@ctlyst.id/internal-icon';\n\nimport EmptyStateLayout from './layout';\n\nconst EmptyState = () => {\n return (\n <EmptyStateLayout\n title=\"Belum ada data\"\n description=\"Jika data tersedia, akan tampil di sini.\"\n icon={<Icon.Folder size={110} />}\n />\n );\n};\n\nconst EmptyStatePage = () => {\n return (\n <EmptyStateLayout\n title=\"Halaman tidak ditemukan\"\n description=\"Halaman yang dituju mungkin telah berubah atau dihapus.\"\n icon={<Icon.Img404 size={110} />}\n buttonText=\"Kembali ke Home\"\n maxW={220}\n />\n );\n};\n\nconst EmptyStateFilter = () => {\n return (\n <EmptyStateLayout\n title=\"Halaman filter ditemukan\"\n description=\"Coba ubah atau reset filter.\"\n icon={<Icon.ImgNotFound size={110} />}\n />\n );\n};\n\nconst EmptyStateSearch = () => {\n return (\n <EmptyStateLayout\n title=\"Pencarian tidak ditemukan\"\n description=\"Keyword yang dicari tidak ditemukan. Coba gunakan keyword lainnya.\"\n icon={<Icon.ImgNotFound size={110} />}\n maxW={300}\n />\n );\n};\n\nconst EmptyStateConnection = () => {\n return (\n <EmptyStateLayout\n title=\"Koneksi terputus\"\n description=\"Silakan cek koneksi internet Anda dan coba lagi.\"\n icon={<Icon.ImgLostConnection size={110} />}\n buttonText=\"Coba Lagi\"\n maxW={250}\n />\n );\n};\n\nconst EmptyStateMaintenance = () => {\n return (\n <EmptyStateLayout\n title=\"Under maintenance\"\n description=\"Maaf, sistem kami sedang dalam perbaikan. Kami akan segera kembali.\"\n icon={<Icon.ImgWarning size={110} />}\n />\n );\n};\n\nconst EmptyStateNotAuthorize = () => {\n return (\n <EmptyStateLayout\n title=\"Halaman tidak dapat diakses\"\n description=\"Anda tidak memiliki izin untuk mengakses halaman ini.\"\n icon={<Icon.ImgWarning size={110} />}\n maxW={400}\n buttonText=\"Kembali ke Home\"\n />\n );\n};\n\nEmptyState.Page = EmptyStatePage;\nEmptyState.Filter = EmptyStateFilter;\nEmptyState.Search = EmptyStateSearch;\nEmptyState.Connection = EmptyStateConnection;\nEmptyState.Maintenance = EmptyStateMaintenance;\nEmptyState.NotAuthorize = EmptyStateNotAuthorize;\n\nexport default EmptyState;\n","/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable react/require-default-props */\nimport { Box, Button, Flex, Text, VStack } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface EmptyStateLayoutProps {\n icon: React.ReactNode;\n title: string;\n description: string;\n buttonText?: string;\n onClick?: () => void;\n maxW?: number;\n}\n\nconst EmptyStateLayout: React.FC<EmptyStateLayoutProps> = ({\n icon,\n title,\n description,\n buttonText,\n maxW = 320,\n onClick,\n}) => {\n const handleClick = () => {\n if (onClick) {\n onClick();\n }\n };\n\n return (\n <Flex align=\"center\" justify=\"center\">\n <VStack textAlign=\"center\">\n {icon}\n\n <VStack spacing={2} textAlign=\"center\" maxW={maxW} mt={3}>\n <Text textStyle=\"text.lg\" fontWeight=\"bold\">\n {title}\n </Text>\n <Text textStyle=\"text.md\" color=\"black.medium\">\n {description}\n </Text>\n </VStack>\n\n {buttonText && (\n <Box mt={3}>\n <Button size=\"lg\" data-test-id=\"CT_component-action-button\" onClick={handleClick}>\n {buttonText}\n </Button>\n </Box>\n )}\n </VStack>\n </Flex>\n );\n};\n\nexport default EmptyStateLayout;\n","import type { BadgeProps, BoxProps } from '@chakra-ui/react';\nimport { Flex, HStack } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport type { HeaderDataProps } from '../types';\nimport { Logo } from './logo';\nimport Profile from './profile';\nimport SwitchMode from './switch-mode';\nimport Version from './version';\n\nexport type HeaderProps = BoxProps & {\n brandColor?: BoxProps['bgColor'];\n data?: HeaderDataProps;\n onLogout?: () => void;\n onOpenModalRelease?: () => void;\n hideSwitchMode?: boolean;\n mainLogo?: string;\n mainLogoSize?: BoxProps['h'];\n centerLogo?: string;\n centerLogoSize?: BoxProps['h'];\n hideEnv?: boolean;\n urlLogo?: string;\n profile?: React.ReactNode;\n versionStyle?: BadgeProps;\n};\n\nconst Header: React.FC<HeaderProps> = ({\n brandColor,\n data,\n onLogout,\n onOpenModalRelease,\n hideSwitchMode,\n mainLogo,\n centerLogo,\n mainLogoSize,\n centerLogoSize = 4,\n hideEnv = false,\n urlLogo,\n children,\n profile,\n bg = 'white',\n versionStyle,\n ...props\n}) => (\n <Flex minH={15} bg={bg} shadow=\"raised\" px={6} py={3} alignItems=\"center\" {...props}>\n <Flex\n h=\"auto\"\n w=\"full\"\n alignItems=\"center\"\n justifyContent={!mainLogo ? 'flex-end' : 'space-between'}\n pos=\"relative\"\n >\n {mainLogo && (\n <Flex alignItems=\"center\">\n <Logo url={urlLogo} imageUrl={mainLogo} height={mainLogoSize} />\n {children && children}\n </Flex>\n )}\n\n {centerLogo && (\n <HStack w=\"fit-content\" spacing={2} alignItems=\"center\" pos=\"absolute\" left=\"50%\" transform=\"translate(-50%,0)\">\n <Logo url={urlLogo} imageUrl={centerLogo} height={centerLogoSize} />\n <Version\n hideEnv={hideEnv}\n version={data?.version}\n environment={data?.environment}\n onOpenModalRelease={onOpenModalRelease}\n versionStyle={versionStyle}\n />\n </HStack>\n )}\n\n {profile || (\n <Flex alignItems=\"center\">\n {!hideSwitchMode && <SwitchMode />}\n <Profile color={props.color} brandColor={brandColor} data={data} onLogout={onLogout} />\n </Flex>\n )}\n </Flex>\n </Flex>\n);\n\nHeader.defaultProps = {\n brandColor: undefined,\n data: undefined,\n onLogout: undefined,\n onOpenModalRelease: undefined,\n hideSwitchMode: true,\n mainLogo: undefined,\n mainLogoSize: undefined,\n centerLogo: undefined,\n centerLogoSize: undefined,\n hideEnv: false,\n urlLogo: undefined,\n profile: undefined,\n versionStyle: undefined,\n};\n\nexport default Header;\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Box, Image, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface LogoProps {\n url?: string;\n imageUrl: string;\n height?: BoxProps['h'];\n}\nexport const Logo: React.FC<LogoProps> = ({ url, imageUrl, height }) => {\n if (url)\n return (\n <Box as=\"a\" href={url} cursor=\"pointer\" target=\"_self\">\n <Image w=\"100%\" h={height ?? 9} maxH={height ?? 9} src={imageUrl} alt={imageUrl} />\n </Box>\n );\n\n return <Image w=\"100%\" h={height ?? 9} maxH={height ?? 9} src={imageUrl} alt={imageUrl} />;\n};\n\nexport const XMSLogo = () => (\n <Image\n height={8}\n src={useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')}\n />\n);\n\nexport const VoilaLogo = () => (\n <Image\n src=\"https://assets.voila.id/xms/logo-voila-black.png?v=1\"\n filter={useColorModeValue('none', 'invert(1)')}\n maxW={24}\n />\n);\n\nLogo.defaultProps = {\n url: undefined,\n height: undefined,\n};\n","import type { BoxProps } from '@chakra-ui/react';\nimport {\n Avatar,\n Box,\n Flex,\n HStack,\n Popover,\n PopoverArrow,\n PopoverBody,\n PopoverContent,\n PopoverTrigger,\n Text,\n useColorModeValue,\n useDisclosure,\n VStack,\n} from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiPower } from 'react-icons/fi';\n\nimport { Badge } from '../../badge';\nimport type { HeaderDataProps } from '../types';\n\nexport type ProfileProps = {\n color?: BoxProps['color'];\n brandColor?: BoxProps['bgColor'];\n data?: HeaderDataProps;\n onLogout?: () => void;\n};\n\nconst Profile: React.FC<ProfileProps> = ({ color, brandColor, data, onLogout }) => {\n const { isOpen, onToggle, onClose } = useDisclosure();\n\n return (\n <Popover placement=\"bottom-end\" isOpen={isOpen} onClose={onClose}>\n <Box\n data-test-id=\"WE0UYbA93LOZy6S09IhDO\"\n as=\"button\"\n cursor={'pointer'}\n minW={0}\n _hover={{ textDecor: 'none' }}\n m={0}\n onClick={onToggle}\n color={color}\n >\n <HStack>\n <VStack alignItems=\"flex-end\" spacing={0} ml=\"2\" color={color}>\n <Text textStyle=\"text.xs\" mb={1}>\n {data?.email}\n </Text>\n <Flex alignItems=\"center\">\n {data?.userRole && <Text textStyle=\"text.xs\">{data?.userRole || 'user'}</Text>}\n <Box h=\"3\" mx=\"1\" borderLeft=\"1px solid\" borderColor=\"neutral.400\" />\n {typeof data?.office === 'object' ? (\n <>\n <Text textStyle=\"text.xs\">{data.office[0]}</Text>\n {data.office.length > 1 && (\n <Badge ml=\"1\" pill variant=\"neutral-light\">\n {data.office.length - 1}+\n </Badge>\n )}\n </>\n ) : (\n <Text textStyle=\"text.xs\">{data?.office || 'office'}</Text>\n )}\n </Flex>\n </VStack>\n <PopoverTrigger>\n <Avatar\n size=\"sm\"\n bg={brandColor}\n color=\"white\"\n name={data?.name ?? data?.email}\n border=\"2px solid\"\n _hover={{\n borderColor: 'primary.50',\n }}\n />\n </PopoverTrigger>\n </HStack>\n </Box>\n <PopoverContent bg=\"white\" maxW={200}>\n <PopoverArrow bg=\"white\" />\n <PopoverBody p={1}>\n <Flex\n data-test-id=\"gA7F9pucPX_Q3_dkgXIYZ\"\n alignItems=\"center\"\n px={3}\n py={2}\n borderRadius=\"sm\"\n cursor=\"pointer\"\n _hover={{ bg: useColorModeValue('primary.500', 'mirage.900'), color: 'white' }}\n onClick={onLogout}\n textStyle=\"text.xs\"\n >\n <FiPower />\n <Text ml={2}>Logout</Text>\n </Flex>\n </PopoverBody>\n </PopoverContent>\n </Popover>\n );\n};\n\nProfile.defaultProps = {\n brandColor: 'primary.500',\n data: undefined,\n onLogout: undefined,\n color: undefined,\n};\n\nexport default Profile;\n","import { Box, useColorMode } from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiMoon, FiSun } from 'react-icons/fi';\n\nconst SwitchMode: React.FC = () => {\n const { colorMode, toggleColorMode } = useColorMode();\n return (\n <Box data-test-id=\"rhYuTDCiWkFqr96upiEEh\" mx={5} onClick={toggleColorMode} cursor=\"pointer\">\n {colorMode === 'light' ? <FiMoon size={20} /> : <FiSun size={20} />}\n </Box>\n );\n};\n\nexport default SwitchMode;\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport type { BadgeProps } from '@chakra-ui/react';\nimport { Box } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport { Badge } from '../../badge';\nimport type { Environment } from '../types';\nimport { environmentName } from '../utils/formatter';\n\nexport type VersionProps = {\n hideEnv?: boolean;\n environment?: Environment;\n version?: string;\n versionStyle?: BadgeProps;\n onOpenModalRelease?: () => void;\n};\n\nconst Version: React.FC<VersionProps> = ({ hideEnv, version, environment, onOpenModalRelease, versionStyle }) => (\n <>\n {version && (\n <Badge\n fontSize=\"8px\"\n data-test-id=\"dzl3esjhCphobaaIXpiUE\"\n variant=\"neutral-light\"\n onClick={onOpenModalRelease}\n cursor={onOpenModalRelease ? 'pointer' : 'auto'}\n {...versionStyle}\n >\n {version}\n </Badge>\n )}\n {!hideEnv && environmentName(environment) !== null && version && (\n <Box\n background=\"primary.50\"\n color=\"primary.500\"\n fontSize=\"text.xs\"\n py={1}\n px={2.5}\n fontWeight=\"bold\"\n borderRadius=\"md\"\n >\n {environmentName(environment)}\n </Box>\n )}\n </>\n);\n\nVersion.defaultProps = {\n hideEnv: false,\n environment: undefined,\n version: undefined,\n onOpenModalRelease: undefined,\n versionStyle: undefined,\n};\n\nexport default Version;\n","import type { Environment } from '../types';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function environmentName(env?: Environment) {\n switch (env) {\n case 'DEVELOPMENT':\n return 'Dev';\n case 'STAGING':\n return 'Staging';\n default:\n return null;\n }\n}\n","export { Icon, IconProps, Image, ImageProps } from '@chakra-ui/react';\n","export {\n Box,\n BoxProps,\n Center,\n Container,\n ContainerProps,\n Divider,\n DividerProps,\n Flex,\n FlexProps,\n Grid,\n GridItem,\n GridItemProps,\n GridProps,\n HStack,\n SimpleGrid,\n Spacer,\n Stack,\n StackProps,\n VStack,\n Wrap,\n WrapItem,\n WrapItemProps,\n WrapProps,\n} from '@chakra-ui/react';\n","export { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from '@chakra-ui/react';\n","import { ChevronLeftIcon } from '@chakra-ui/icons';\nimport { IconButton } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface ModalBackButtonProps {\n onClick: () => void;\n}\n\nconst ModalBackButton = ({ onClick }: ModalBackButtonProps) => {\n return (\n <IconButton\n icon={<ChevronLeftIcon w=\"4.5\" h=\"4.5\" />}\n size=\"sm\"\n minW=\"6\"\n h=\"6\"\n rounded=\"sm\"\n variant=\"solid\"\n bg=\"white\"\n onClick={onClick}\n _hover={{ bg: 'white' }}\n color=\"black\"\n aria-label=\"Back\"\n data-test-id=\"modal-back-button\"\n />\n );\n};\n\nexport default ModalBackButton;\n","import type { ModalBodyProps } from '@chakra-ui/react';\nimport { ModalBody as ChakraModalBody, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalBody px={4} py={2} ref={ref} background={useColorModeValue('white', 'mirage.900')} {...rest}>\n {children}\n </ChakraModalBody>\n );\n});\n\nexport default ModalBody;\n","import type { ButtonProps } from '@chakra-ui/react';\nimport { ModalCloseButton as ChakraModalCloseButton, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalCloseButton = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n return (\n <ChakraModalCloseButton\n ref={ref}\n top={2}\n right={2}\n size=\"sm\"\n data-test-id=\"modal-close-button\"\n background={useColorModeValue('neutral.50', 'mirage.900')}\n {...props}\n />\n );\n});\nexport default ModalCloseButton;\n","import type { ModalFooterProps } from '@chakra-ui/react';\nimport { ModalFooter as ChakraModalFooter, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalFooter\n ref={ref}\n background={useColorModeValue('neutral.200', 'mirage.900')}\n borderBottomRadius=\"sm\"\n {...rest}\n >\n {children}\n </ChakraModalFooter>\n );\n});\n\nexport default ModalFooter;\n","import type { ModalHeaderProps } from '@chakra-ui/react';\nimport { ModalHeader as ChakraModalHeader, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalHeader = forwardRef<HTMLDivElement, ModalHeaderProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalHeader\n ref={ref}\n background={useColorModeValue('neutral.200', 'mirage.900')}\n borderTopRadius=\"sm\"\n fontSize=\"text.lg\"\n fontWeight=\"400\"\n px={4}\n py={2}\n {...rest}\n >\n {children}\n </ChakraModalHeader>\n );\n});\n\nexport default ModalHeader;\n","export { default as ModalBackButton } from './components/modal-back-button';\nexport { default as ModalBody } from './components/modal-body';\nexport { default as ModalCloseButton } from './components/modal-close-button';\nexport { default as ModalFooter } from './components/modal-footer';\nexport { default as ModalHeader } from './components/modal-header';\nexport {\n AlertDialog,\n ModalBody as AlertDialogBody,\n ModalCloseButton as AlertDialogCloseButton,\n AlertDialogContent,\n ModalFooter as AlertDialogFooter,\n ModalHeader as AlertDialogHeader,\n ModalOverlay as AlertDialogOverlay,\n AlertDialogProps,\n Drawer,\n ModalBody as DrawerBody,\n ModalCloseButton as DrawerCloseButton,\n DrawerContent,\n DrawerContentProps,\n ModalFooter as DrawerFooter,\n ModalHeader as DrawerHeader,\n ModalOverlay as DrawerOverlay,\n DrawerProps,\n Modal,\n ModalBodyProps,\n ModalContent,\n ModalContentProps,\n ModalContextProvider,\n ModalFocusScope,\n ModalFooterProps,\n ModalHeaderProps,\n ModalOverlay,\n ModalOverlayProps,\n ModalProps,\n useDrawerContext,\n useModal,\n useModalContext,\n UseModalProps,\n UseModalReturn,\n useModalStyles,\n} from '@chakra-ui/react';\n","import type { LinkProps } from '@chakra-ui/react';\nimport { Link } from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { PropsWithChildren } from 'react';\nimport * as React from 'react';\n\nexport interface NavItemProps extends LinkProps, PropsWithChildren {\n isActive?: boolean;\n isChild?: boolean;\n isDisabled?: boolean;\n 'data-test-id'?: string;\n}\n\nexport const NavItem = ({ children, isActive, isChild, isDisabled, ...props }: NavItemProps) => {\n return (\n <Link\n data-test-id={props['data-test-id']}\n opacity={isDisabled ? '0.3' : 'initial'}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n h=\"7.5\"\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n w=\"full\"\n p=\"2\"\n pl={isChild ? '7' : '2'}\n color={isActive ? 'primary.500' : 'black.high'}\n bg={isActive ? 'primary.100' : 'white'}\n className={cx('catalyst-nav-item', props.className)}\n textStyle=\"text.xs\"\n fontWeight={isActive ? 'semibold' : 'regular'}\n rounded=\"sm\"\n _active={\n isDisabled\n ? {}\n : {\n bg: 'primary.100',\n }\n }\n _hover={\n isDisabled\n ? {}\n : {\n textDecoration: 'none',\n bg: isActive ? 'primary.100' : 'primary.50',\n }\n }\n {...props}\n onClick={isDisabled ? undefined : props.onClick}\n >\n {children}\n </Link>\n );\n};\n\nNavItem.displayName = 'NavItem';\nNavItem.defaultProps = {\n isActive: false,\n isChild: false,\n isDisabled: false,\n 'data-test-id': undefined,\n};\n\nexport default NavItem;\n","/* eslint-disable react-hooks/rules-of-hooks */\n\nimport type { As, BoxProps } from '@chakra-ui/react';\nimport {\n Box,\n Button,\n Flex,\n Link,\n Popover,\n PopoverContent,\n PopoverTrigger,\n Portal,\n Text,\n useColorModeValue,\n} from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport { css } from '@emotion/react';\nimport * as React from 'react';\n\nimport type { NavigationLink } from '../types';\nimport { mappingIcon } from './mapping-icon';\n\nexport type NavigationProps = BoxProps & {\n navigations?: NavigationLink[];\n activePath: string;\n as?: As;\n host?: string;\n};\n\nconst Navigation: React.FC<NavigationProps> = ({ navigations, activePath, as, host, ...props }) => {\n return (\n <Box borderRadius=\"md\" overflowX=\"auto\" {...props}>\n <Flex\n bg=\"white\"\n w=\"full\"\n rounded={'md'}\n flexWrap=\"wrap\"\n alignItems=\"center\"\n shadow=\"raised\"\n gap={1}\n px={4}\n py={2}\n >\n {navigations?.map(navigation => {\n const isActive = activePath.startsWith(navigation.navLink || '');\n const activeBg = isActive ? 'primary.500' : undefined;\n return (\n <Popover key={navigation.title} trigger=\"hover\" placement=\"bottom-start\">\n {({ isOpen }) => (\n <>\n <PopoverTrigger>\n <Button\n h={7.5}\n p={2}\n size=\"sm\"\n variant=\"ghost\"\n data-test-id={`CT_component_navigation_button-${navigation.title}${isActive ? '-active' : ''}`}\n _hover={{\n backgroundColor: !isActive ? 'neutral.400' : activeBg,\n }}\n backgroundColor={isOpen && !isActive ? 'neutral.400' : activeBg}\n color={isActive ? 'primary.50' : 'black.high'}\n leftIcon={mappingIcon.get(navigation.title)}\n rightIcon={<Icon.ChevronDown size={4} color=\"inherit\" />}\n >\n {navigation.title}\n </Button>\n </PopoverTrigger>\n {navigation.children && (\n <Portal>\n <Box zIndex=\"popover\">\n <PopoverContent\n key={navigation.title}\n bg={useColorModeValue('white', 'ebony-clay.800')}\n maxW={250}\n border=\"none\"\n borderRadius=\"md\"\n boxShadow=\"0 5px 25px rgb(0 0 0 / 10%)\"\n >\n {navigation.children.map(({ title, navHost, navLink }) => {\n const link = navHost ? `${navHost}${navLink}` : navLink;\n const isLocalLink = host === navHost;\n const isActiveSub = activePath === navLink;\n return (\n <Link\n as={isLocalLink ? as : undefined}\n key={title}\n href={link}\n _hover={{\n textDecoration: 'none',\n }}\n >\n <Box\n display=\"flex\"\n position=\"relative\"\n alignItems=\"center\"\n cursor=\"pointer\"\n transition=\"padding 0.35s ease 0s\"\n _hover={{\n backgroundColor: useColorModeValue('dove-gray.50', 'mirage.900'),\n color: useColorModeValue('primary.500', 'dove-gray.600'),\n px: 5,\n py: 4,\n _first: { borderTopRadius: 'md' },\n _last: { borderBottomRadius: 'md' },\n }}\n color={isActiveSub ? 'primary.500' : 'inherit'}\n css={css`\n border-spacing: 4px;\n `}\n px={6}\n py={4}\n >\n {mappingIcon.get(navigation.title)}\n <Text fontSize=\"text.sm\" ml={3}>\n {title}\n </Text>\n {isActiveSub && (\n <Box\n width={0.5}\n height={8}\n position=\"absolute\"\n bg=\"primary.500\"\n right={0}\n zIndex=\"popover\"\n />\n )}\n </Box>\n </Link>\n );\n })}\n </PopoverContent>\n </Box>\n </Portal>\n )}\n </>\n )}\n </Popover>\n );\n })}\n </Flex>\n </Box>\n );\n};\n\nNavigation.defaultProps = {\n navigations: undefined,\n as: 'a',\n host: undefined,\n};\n\nexport default Navigation;\n","/* eslint-disable import/prefer-default-export */\nimport * as Icon from '@ctlyst.id/internal-icon';\n\nexport const mappingIcon = new Map([\n ['Order', <Icon.ShoppingBag size={4} key=\"order\" color=\"inherit\" />],\n ['Fulfillment', <Icon.ShoppingCart size={4} key=\"fullfilment\" color=\"inherit\" />],\n ['Transfer Stock', <Icon.Repeat size={4} key=\"transfer-stock\" color=\"inherit\" />],\n ['Stock', <Icon.Box size={4} key=\"stock\" color=\"inherit\" />],\n ['Product Database', <Icon.Layers size={4} key=\"product-database\" color=\"inherit\" />],\n ['Purchasing', <Icon.DollarSign size={4} key=\"purchasing\" color=\"inherit\" />],\n ['Reseller', <Icon.Users size={4} key=\"reseller\" color=\"inherit\" />],\n ['Retur', <Icon.RotateCcw size={4} key=\"retur\" color=\"inherit\" />],\n ['Other', <Icon.Settings size={4} key=\"other\" color=\"inherit\" />],\n ['Content', <Icon.Layout size={4} key=\"content\" color=\"inherit\" />],\n ['Customer', <Icon.HelpCircle size={4} key=\"content\" color=\"inherit\" />],\n ['Voucher', <Icon.Gift size={4} key=\"content\" color=\"inherit\" />],\n]);\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport type { BoxProps } from '@chakra-ui/react';\nimport { Box, Button, Flex, Link, Popover, PopoverContent, PopoverTrigger, Text } from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nimport type { Menu, SubMenu } from '../types';\n\nexport type NavigationBarProps = BoxProps & {\n navigations?: Menu[];\n isFetched: boolean;\n pathname: string;\n asPath: string;\n mappingIcon: Map<string, JSX.Element>;\n};\n\nconst NavigationBar: React.FC<NavigationBarProps> = ({\n navigations,\n isFetched,\n pathname,\n asPath,\n mappingIcon,\n ...props\n}) => {\n const urlMenu = (subMenu: SubMenu) => {\n if (window.location.hostname === 'localhost') {\n return subMenu.navLink;\n }\n return subMenu.navHost + subMenu.navLink;\n };\n\n return (\n <Box hidden={isFetched && navigations === undefined} data-test-id=\"CT_component_navigation_cms\" {...props}>\n <Flex\n bg=\"white\"\n w=\"full\"\n rounded={'md'}\n flexWrap=\"wrap\"\n alignItems=\"center\"\n shadow=\"raised\"\n gap={1}\n px={4}\n py={2}\n >\n {navigations?.map((item: Menu) => {\n const childMenu = item.children.filter(subMenu => asPath?.includes(subMenu.navLink));\n\n const isActive = pathname?.startsWith(childMenu[0]?.navLink);\n const activeBg = isActive ? 'primary.500' : undefined;\n\n return (\n <Popover isLazy key={item.id} trigger=\"hover\" placement=\"bottom-start\" openDelay={100} closeDelay={100}>\n {({ isOpen, onClose }) => (\n <>\n <PopoverTrigger>\n <Button\n h={7.5}\n p={2}\n size=\"sm\"\n variant=\"ghost\"\n data-test-id={`CT_component_navigation_button-${item.title}${isActive ? '-active' : ''}`}\n _hover={{\n backgroundColor: !isActive ? 'neutral.400' : activeBg,\n }}\n backgroundColor={isOpen && !isActive ? 'neutral.400' : activeBg}\n color={isActive ? 'primary.50' : 'black.high'}\n leftIcon={mappingIcon.get(item.title)}\n rightIcon={<Icon.ChevronDown size={4} color=\"inherit\" />}\n >\n {item.title}\n </Button>\n </PopoverTrigger>\n\n {item.children && (\n <PopoverContent bg=\"white\" boxShadow=\"raised\" borderRadius=\"md\" py={1} width={240}>\n {item.children.map((subMenu: SubMenu) => (\n <Link\n key={subMenu.id}\n href={urlMenu(subMenu)}\n display=\"flex\"\n alignItems=\"center\"\n transition=\"padding 0.35s ease 0s\"\n _hover={{\n pl: 6,\n }}\n py={3}\n px={4}\n color={pathname?.startsWith(subMenu.navLink) ? 'primary.800' : 'black.high'}\n onClick={onClose}\n background={pathname?.startsWith(subMenu.navLink) ? 'primary.50' : 'transparent'}\n data-test-id={`CT_component_navigation_link-${item.id}`}\n >\n {mappingIcon.get(item.title)}\n <Text textStyle=\"text-sm\" ml={3}>\n {subMenu.title}\n </Text>\n </Link>\n ))}\n </PopoverContent>\n )}\n </>\n )}\n </Popover>\n );\n })}\n </Flex>\n </Box>\n );\n};\n\nNavigationBar.defaultProps = {\n navigations: undefined,\n};\n\nexport default NavigationBar;\n","import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon } from '@chakra-ui/icons';\nimport { Box, Text, useColorModeValue } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport PaginationButton from './pagination-button';\nimport PaginationButtonTrigger from './pagination-button-trigger';\n\nexport interface PaginationProps {\n /** Additional CSS classes to give to the pagination. */\n className?: string;\n /** The current page number. */\n current: number;\n /** Total number of pages. */\n total: number;\n /**\n * Callback to run when a page number is selected. You can use this to e.g.\n * run setState on your component's page state.\n */\n onSelect?: (page: number) => void;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({ className, current, total, onSelect }) => {\n const btnColorDisabled = useColorModeValue('secondary.100', 'primary.500');\n const btnColor = useColorModeValue('primary.500', 'secondary.100');\n const disabledPrevious = current === 1;\n const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;\n const disabledNext = current === total;\n const nextButtonColor = disabledNext ? btnColorDisabled : btnColor;\n\n const handleSelectPage = (page: number) => {\n if (onSelect) {\n onSelect(page);\n }\n };\n\n const generatePages = (): (number | string)[] => {\n const maxButtons = 5;\n const pageButtons: (number | string)[] = [];\n\n let startPage: number;\n let endPage: number;\n\n if (maxButtons && maxButtons < total) {\n startPage = Math.max(Math.min(current - Math.floor(maxButtons / 2), total - maxButtons + 1), 1);\n endPage = startPage + maxButtons - 1;\n } else {\n startPage = 1;\n endPage = total;\n }\n\n // eslint-disable-next-line no-plusplus\n for (let page = startPage; page <= endPage; ++page) {\n pageButtons.push(page);\n }\n\n return pageButtons;\n };\n\n return (\n <Box className={className} display=\"inline-flex\" alignItems=\"center\">\n <Box mr={1}>\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={previousButtonColor}\n isDisabled={disabledPrevious}\n onClick={() => handleSelectPage(1)}\n visuallyHidden=\"First Page\"\n icon={<ArrowLeftIcon width={2} />}\n />\n </Box>\n <Box bg=\"neutral.300\" borderRadius=\"full\">\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={previousButtonColor}\n isDisabled={disabledPrevious}\n onClick={() => handleSelectPage(current - 1)}\n visuallyHidden=\"Previous Page\"\n icon={<ChevronLeftIcon />}\n />\n {generatePages().map(page => {\n return (\n <PaginationButton\n data-test-id=\"Pagination-Button\"\n key={page}\n isActive={page === current}\n onClick={() => (typeof page === 'number' ? handleSelectPage(page) : null)}\n >\n <Text scale={300} fontSize=\"text.sm\" lineHeight={18} fontWeight={500}>\n {page}\n </Text>\n </PaginationButton>\n );\n })}\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={nextButtonColor}\n isDisabled={disabledNext}\n onClick={() => handleSelectPage(current + 1)}\n visuallyHidden=\"Next Page\"\n icon={<ChevronRightIcon />}\n />\n </Box>\n <Box ml={1}>\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={nextButtonColor}\n isDisabled={disabledNext}\n onClick={() => handleSelectPage(total)}\n visuallyHidden=\"Last Page\"\n icon={<ArrowRightIcon width={2} />}\n />\n </Box>\n </Box>\n );\n};\n\nPagination.defaultProps = {\n className: undefined,\n onSelect: undefined,\n};\n\nPagination.displayName = 'Pagination';\n\nexport default Pagination;\n","import type { ButtonProps } from '@chakra-ui/react';\nimport { Button, forwardRef, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface PaginationButtonProps {\n isActive?: boolean;\n}\n\nconst PaginationButton = forwardRef<ButtonProps, 'button'>(({ className, style, isActive, children, ...rest }, ref) => {\n const btnBg = useColorModeValue('neutral.300', 'mirage.900');\n const btnColor = useColorModeValue('black.high', 'primary.300');\n const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');\n const btnNotActiveColor = useColorModeValue('primary.500', 'white');\n return (\n <Button\n data-test-id=\"Pagination-Button\"\n ref={ref}\n className={className}\n style={style}\n borderRadius=\"full\"\n fontWeight=\"semibold\"\n m={0}\n px={3}\n py={2}\n h={8}\n minW=\"auto\"\n width={8}\n background={isActive ? 'primary.500' : btnBg}\n color={isActive ? 'white' : btnColor}\n _hover={\n !isActive\n ? {\n background: btnNotActiveBg,\n color: btnNotActiveColor,\n }\n : {}\n }\n _disabled={{\n background: useColorModeValue('neutral.300', 'mirage.900'),\n color: 'neutral.600',\n pointerEvents: 'none',\n }}\n {...rest}\n >\n {children}\n </Button>\n );\n});\n\nPaginationButton.displayName = 'PaginationButton';\n\nPaginationButton.defaultProps = {\n isActive: undefined,\n};\n\nexport default PaginationButton;\n","import { VisuallyHidden } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport PaginationButton from './pagination-button';\n\ntype PaginationButtonTriggerProps = {\n color?: string;\n isDisabled?: boolean;\n onClick?: () => void;\n visuallyHidden?: string;\n icon?: React.ReactNode;\n};\n\nconst PaginationButtonTrigger: React.FC<PaginationButtonTriggerProps> = ({\n color,\n isDisabled,\n onClick,\n visuallyHidden,\n icon,\n}) => (\n <PaginationButton data-test-id=\"DLVCc_fBK35spHm5WxjcJ\" color={color} isDisabled={isDisabled} onClick={onClick}>\n <VisuallyHidden>{visuallyHidden}</VisuallyHidden>\n {icon}\n </PaginationButton>\n);\n\nPaginationButtonTrigger.defaultProps = {\n color: undefined,\n isDisabled: undefined,\n onClick: undefined,\n visuallyHidden: undefined,\n icon: undefined,\n};\n\nexport default PaginationButtonTrigger;\n","import type { TextProps } from '@chakra-ui/react';\nimport { Text } from '@chakra-ui/react';\nimport * as React from 'react';\n\nexport interface PaginationDetailProps extends TextProps {\n // Current page of pages\n page: number;\n /** Total limit of pages. */\n limit: number;\n // Length of data\n length: number;\n}\n\nconst PaginationDetail: React.FC<PaginationDetailProps> = ({\n page,\n limit,\n length,\n scale = 300,\n fontSize = 'xs',\n lineHeight = 18,\n ...rest\n}) => {\n return (\n <Text scale={scale} fontSize={fontSize} lineHeight={lineHeight} {...rest}>\n {`${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item`}\n </Text>\n );\n};\n\nexport default PaginationDetail;\n","import { Box, Select, Text, useColorModeValue } from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiChevronDown } from 'react-icons/fi';\n\nexport interface PaginationFilterProps<T> {\n /** Total limit of pages. */\n limit?: number;\n /** Label in front of select input */\n label?: string;\n /** Label items. */\n items: T[];\n /** The change handler for the select. */\n onChange: (changes: T) => void;\n}\n\nconst PaginationFilter: React.FC<PaginationFilterProps<number>> = ({\n limit,\n label = 'Baris per halaman:',\n items,\n onChange,\n ...rest\n}) => {\n const [value, setValue] = React.useState(limit);\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Text fontSize=\"text.sm\" lineHeight={18} color={useColorModeValue('neutral.900', 'white')} {...rest}>\n {label}\n </Text>\n <Select\n textAlign=\"center\"\n size=\"xs\"\n outline=\"none\"\n border=\"none\"\n boxShadow=\"none\"\n width={18}\n icon={<FiChevronDown />}\n _focusVisible={{ boxShadow: 'none' }}\n onChange={e => {\n const numberValue = Number(e.target.value);\n onChange(numberValue);\n setValue(numberValue);\n }}\n value={value}\n >\n {items.map(item => {\n return (\n <option key={item} value={item}>\n {item}\n </option>\n );\n })}\n </Select>\n </Box>\n );\n};\n\nPaginationFilter.defaultProps = {\n limit: 10,\n label: undefined,\n};\n\nexport default PaginationFilter;\n","export {\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverArrowProps,\n PopoverBody,\n PopoverBodyProps,\n PopoverCloseButton,\n PopoverContent,\n PopoverContentProps,\n PopoverFooter,\n PopoverFooterProps,\n PopoverHeader,\n PopoverHeaderProps,\n PopoverProps,\n PopoverTrigger,\n Portal,\n PortalProps,\n} from '@chakra-ui/react';\n","/* eslint-disable no-nested-ternary */\nimport type { RadioProps as ChakraRadioProps } from '@chakra-ui/react';\nimport { Box, Radio as ChakraRadio, Text } from '@chakra-ui/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport interface RadioProps extends ChakraRadioProps, PropsWithChildren {\n isError?: boolean;\n helpText?: string;\n errorText?: string;\n}\n\nexport const Radio = ({\n isError = false,\n helpText = '',\n errorText = '',\n children,\n isDisabled,\n ...rest\n}: RadioProps) => {\n const variant = isError ? 'errors' : 'unstyled';\n return (\n <Box>\n <Box display=\"flex\">\n <ChakraRadio variant={variant} {...rest} isDisabled={isDisabled}>\n {children && (\n <Text as=\"span\" display=\"block\" textStyle=\"text.sm\" color={isDisabled ? 'black.medium' : 'black.high'}>\n {children}\n </Text>\n )}\n </ChakraRadio>\n </Box>\n <Box mt=\"5px\" ml=\"24px\">\n {isError ? (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"danger.500\">\n {errorText}\n </Text>\n ) : (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"black.medium\">\n {helpText}\n </Text>\n )}\n </Box>\n </Box>\n );\n};\n\nRadio.displayName = 'Radio';\nRadio.defaultProps = {\n isError: false,\n helpText: '',\n errorText: '',\n};\n\nexport default Radio;\n","/* eslint-disable no-nested-ternary */\nimport type { RadioGroupProps } from '@chakra-ui/react';\nimport { Box, RadioGroup as ChakraRadioGroup, Stack } from '@chakra-ui/react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\n\nexport interface RadioGroupComponentProps extends FieldProps, RadioGroupProps {\n label: string;\n helpText?: string;\n isError?: boolean;\n errorMessage?: string;\n}\n\nexport const RadioGroup = ({\n children,\n label,\n helpText,\n isError,\n errorMessage,\n ...props\n}: RadioGroupComponentProps) => {\n return (\n <Field {...props} label={label} leftHelperText={helpText} isError={isError} errorMessage={errorMessage}>\n <Box mt=\"12px\">\n <ChakraRadioGroup {...props}>\n <Stack spacing={[1, '16px']} direction={['column', 'row']}>\n {children}\n </Stack>\n </ChakraRadioGroup>\n </Box>\n </Field>\n );\n};\nRadioGroup.displayName = 'RadioGroup';\nRadioGroup.defaultProps = {\n helpText: '',\n isError: false,\n errorMessage: '',\n};\n\nexport default RadioGroup;\n","export * from './components/radio';\nexport * from './components/radio-group';\nexport {\n RadioGroupContext,\n useRadio,\n useRadioGroup,\n useRadioGroupContext,\n UseRadioGroupReturn,\n UseRadioProps,\n UseRadioReturn,\n} from '@chakra-ui/react';\n","import { Grid } from '@chakra-ui/react';\nimport { Rating as RatingIcon } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\ntype PropsValue = 0 | 1 | 2 | 3 | 4 | 5;\n\nexport interface RatingProps {\n value: PropsValue;\n}\n\nconst Rating = ({ value }: RatingProps) => {\n return (\n <Grid gap={'4px'} display=\"flex\">\n {[...Array(5)].map((_, i) => (\n <RatingIcon color={i < value ? '#FFA230' : '#E0E0E0'} size={24} />\n ))}\n </Grid>\n );\n};\n\nexport default Rating;\n","/* eslint-disable react/require-default-props */\nimport { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase, Props as ReactSelectProps } from 'react-select';\nimport ReactSelect from 'react-select';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectProps<\n Option = unknown,\n IsMulti extends boolean = boolean,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = ReactSelectProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nfunction Select<OptionType, Group extends GroupBase<OptionType>, IsMulti extends boolean = false>({\n styles,\n isError = false,\n ...rest\n}: SelectProps<OptionType, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelect<OptionType, IsMulti, Group>\n classNamePrefix=\"react-select\"\n {...(rest as ReactSelectProps<OptionType, IsMulti, Group>)}\n styles={{ ...selectStyles(colorMode, isError) }}\n theme={themeSelect}\n />\n );\n}\n\nexport default Select;\n","import { theme } from '@chakra-ui/react';\n\nconst shadows = {\n ...theme.shadows,\n raised: '0px 4px 20px rgba(0, 0, 0, 0.05)',\n};\n\nexport default shadows;\n","import { theme } from '@chakra-ui/react';\r\n\r\nconst sizes = {\r\n ...theme.sizes,\r\n 4.5: '1.125rem',\r\n 9.5: '2.375rem',\r\n 18: '4.5rem',\r\n 22: '5.5rem',\r\n 26: '6.5rem',\r\n 30: '7.5rem',\r\n};\r\n\r\nexport default sizes;\r\n","import { theme } from '@chakra-ui/react';\r\n\r\nconst spacing = {\r\n ...theme.space,\r\n 4.5: '1.125rem',\r\n 9.5: '2.375rem',\r\n 18: '4.5rem',\r\n 22: '5.5rem',\r\n 26: '6.5rem',\r\n 30: '7.5rem',\r\n};\r\n\r\nexport default spacing;\r\n","const fonts = {\r\n heading: `'Poppins', sans-serif`,\r\n body: `'Poppins', sans-serif`,\r\n};\r\n\r\nconst fontWeights = {\r\n hairline: 100,\r\n thin: 200,\r\n light: 300,\r\n normal: 400,\r\n medium: 500,\r\n semibold: 600,\r\n bold: 700,\r\n extrabold: 800,\r\n black: 900,\r\n};\r\n\r\nconst lineHeights = {\r\n normal: 'normal',\r\n none: 1,\r\n shorter: 1.25,\r\n short: 1.375,\r\n base: 1.5,\r\n tall: 1.625,\r\n 64: '4rem', // 64px\r\n 56: '3.5rem', // 56px\r\n 48: '3rem', // 48px\r\n 40: '2.5rem', // 40px\r\n 36: '2.25rem', // 36px\r\n 34: '2.125rem', // 34px\r\n 32: '2rem', // 32px\r\n 30: '1.875rem', // 30px\r\n 28: '1.75', // 28px\r\n 26: '1.625rem', // 26px\r\n 24: '1.5rem', // 24px\r\n 22: '1.375rem', // 22px\r\n 20: '1.25rem', // 20px\r\n 18: '1.125rem', // 18px\r\n 16: '1rem', // 16px\r\n 14: '0.875rem', // 14px\r\n 12: '0.75rem', // 12px\r\n};\r\n\r\nconst letterSpacings = {\r\n tighter: '-0.05em',\r\n tight: '-0.025em',\r\n normal: '0',\r\n wide: '0.025em',\r\n wider: '0.05em',\r\n widest: '0.1em',\r\n};\r\n\r\nconst fontSizes = {\r\n heading: {\r\n 1: '2.5rem', // 40px\r\n 2: '2rem', // 32px\r\n 3: '1.75rem', // 28px\r\n 4: '1.5rem', // 24px\r\n 5: '1.375rem', // 22px\r\n 6: '1.125rem', // 18px\r\n },\r\n text: {\r\n xl: '1.125rem', // 18px\r\n lg: '1rem', // 16px\r\n md: '0.875rem', // 14px\r\n sm: '0.75rem', // 12px\r\n xs: '0.625rem', // 10px\r\n },\r\n button: {\r\n lg: '1.125rem', // 18px\r\n md: '0.875rem', // 14px\r\n sm: '0.625rem', // 10px\r\n },\r\n field: {\r\n lg: '1rem', // 16px\r\n md: '0.875rem', // 14px\r\n sm: '0.75rem', // 12px\r\n },\r\n table: {\r\n header: '0.75rem', // 12px\r\n },\r\n};\r\n\r\nconst heading = {\r\n 1: {\r\n fontSize: fontSizes.heading[1],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[64],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 2: {\r\n fontSize: fontSizes.heading[2],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[56],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 3: {\r\n fontSize: fontSizes.heading[3],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[48],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 4: {\r\n fontSize: fontSizes.heading[4],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[40],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 5: {\r\n fontSize: fontSizes.heading[5],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[36],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 6: {\r\n fontSize: fontSizes.heading[6],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[32],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n};\r\n\r\nconst text = {\r\n xl: {\r\n fontSize: fontSizes.text.xl,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[28],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n lg: {\r\n fontSize: fontSizes.text.lg,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[24],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.text.md,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.text.sm,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[18],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n xs: {\r\n fontSize: fontSizes.text.xs,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[14],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n};\r\n\r\nconst button = {\r\n lg: {\r\n fontSize: fontSizes.button.lg,\r\n lineHeight: lineHeights[28],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.button.md,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.button.sm,\r\n lineHeight: lineHeights[14],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n};\r\n\r\nconst field = {\r\n lg: {\r\n fontSize: fontSizes.field.lg,\r\n lineHeight: lineHeights[24],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.field.md,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.field.sm,\r\n lineHeight: lineHeights[18],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n};\r\n\r\nconst textStyles = {\r\n heading,\r\n text,\r\n button,\r\n field,\r\n};\r\n\r\nexport { fonts, fontSizes, fontWeights, letterSpacings, lineHeights, textStyles };\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-nested-ternary */\n/* eslint-disable import/prefer-default-export */\nimport type { ColorMode } from '@chakra-ui/system';\nimport type { CSSObjectWithLabel, GroupBase, StylesConfig, Theme } from 'react-select';\n\nimport { textStyles } from '../../../config/theme/foundations';\n\nconst styleMd = textStyles.text.sm;\nconst selectStyle = {\n fontSize: styleMd.fontSize,\n lineHeight: styleMd.lineHeight,\n letterSpacing: 0,\n};\n\nexport function selectStyles<\n OptionType = unknown,\n IsMulti extends boolean = boolean,\n Group extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(colorMode: ColorMode, _isError: boolean): StylesConfig<OptionType, IsMulti, Group> | undefined {\n return {\n control: (base, { isFocused }) => {\n const style: CSSObjectWithLabel = {\n ...base,\n flexWrap: 'nowrap',\n borderColor: isFocused ? 'var(--chakra-colors-primary-500)' : 'var(--chakra-colors-neutral-400)',\n boxShadow: 'none',\n color: 'var(--chakra-colors-black-low)',\n '&:hover': {\n borderColor: _isError\n ? ''\n : isFocused\n ? 'var(--chakra-colors-primary-500)'\n : 'var(--chakra-colors-neutral-500)',\n },\n };\n if (_isError) {\n return {\n ...style,\n borderColor: 'var(--chakra-colors-danger-500)',\n };\n }\n return style;\n },\n option: (base: CSSObjectWithLabel) => ({\n ...base,\n ...selectStyle,\n color: 'var(--chakra-colors-neutral-900)',\n }),\n menu: (base: CSSObjectWithLabel) => {\n return {\n ...base,\n ...selectStyle,\n zIndex: 5,\n };\n },\n singleValue: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n input: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n dropdownIndicator: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n indicatorSeparator: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n placeholder: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle, color: 'var(--chakra-colors-black-low)' };\n },\n multiValue: base => {\n return {\n ...base,\n borderRadius: 4,\n backgroundColor: 'var(--chakra-colors-neutral-200)',\n };\n },\n multiValueLabel: base => ({\n ...base,\n borderRadius: 4,\n fontWeight: 'bold',\n }),\n multiValueRemove: base => ({\n ...base,\n color: 'var(--chakra-colors-neutral-900)',\n ':hover': {\n backgroundColor: 'var(--chakra-colors-neutral-300)',\n },\n }),\n };\n}\n\nexport const themeSelect = (theme: Theme) => {\n return {\n ...theme,\n colors: {\n ...theme.colors,\n primary: 'var(--chakra-colors-primary-100)',\n primary25: 'var(--chakra-colors-primary-50)',\n primary50: 'var(--chakra-colors-primary-100)',\n primary75: 'var(--chakra-colors-primary-200)',\n },\n };\n};\n","import { useColorMode } from '@chakra-ui/system';\nimport * as React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { AsyncPaginateProps } from 'react-select-async-paginate';\nimport { AsyncPaginate } from 'react-select-async-paginate';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectAsyncProps<\n OptionType = unknown,\n Group extends GroupBase<OptionType> = GroupBase<OptionType>,\n Additional = unknown,\n IsMulti extends boolean = false,\n> = AsyncPaginateProps<OptionType, Group, Additional, IsMulti> & ExtendedSelectProps;\n\nfunction SelectAsync<OptionType, Group extends GroupBase<OptionType>, Additional, IsMulti extends boolean = false>({\n styles,\n isError = false,\n ...rest\n}: SelectAsyncProps<OptionType, Group, Additional, IsMulti>) {\n const { colorMode } = useColorMode();\n\n return (\n <AsyncPaginate<OptionType, Group, Additional, IsMulti>\n classNamePrefix=\"react-select\"\n {...(rest as AsyncPaginateProps<OptionType, Group, Additional, IsMulti>)}\n styles={{ ...selectStyles<OptionType, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n\nexport default SelectAsync;\n","import { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { AsyncCreatableProps } from 'react-select/async-creatable';\nimport ReactSelectAsyncCreatable from 'react-select/async-creatable';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectAsyncCreatableProps<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = AsyncCreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nexport default function SelectAsyncCreatable<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n>({ styles, isError = false, ...rest }: SelectAsyncCreatableProps<Option, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelectAsyncCreatable\n classNamePrefix=\"react-select\"\n {...(rest as SelectAsyncCreatableProps<Option, IsMulti, Group>)}\n styles={{ ...selectStyles<Option, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n","import { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { CreatableProps } from 'react-select/creatable';\nimport ReactSelectCreatable from 'react-select/creatable';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectCreatableProps<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = CreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nexport default function SelectCreatable<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n>({ styles, isError = false, ...rest }: SelectCreatableProps<Option, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelectCreatable\n classNamePrefix=\"react-select\"\n {...(rest as SelectCreatableProps<Option, IsMulti, Group>)}\n styles={{ ...selectStyles<Option, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n","/* eslint-disable react/no-unstable-nested-components */\n/* eslint-disable react/require-default-props */\n\nimport { Checkbox, Flex, Text } from '@chakra-ui/react';\nimport { useColorMode } from '@chakra-ui/system';\nimport type { MultiValue, OptionProps, Props as ReactSelectProps } from 'react-select';\nimport ReactSelect, { components as ComponentRS } from 'react-select';\n\nimport { selectStyles, themeSelect } from './utils';\n\nexport type OptionGroup<Option> = {\n label: string;\n value: string | number | boolean;\n selectAllCheckbox?: boolean;\n} & Partial<Option>;\n\nexport type OptionMultiGroup<Option = unknown> = {\n label: string;\n value: string | number | boolean;\n group: string;\n selectAllCheckbox?: boolean;\n} & Partial<Option>;\n\nexport type OptionsGroup<Option> = {\n readonly label: string;\n readonly options: readonly OptionMultiGroup<Option>[];\n}[];\n\nexport const CHECKBOX_STATE = {\n UNCHECKED: 0,\n INDETERMINATE: 1,\n CHECKED: 2,\n} as const;\n\nexport const getSelectAllCheckboxState = (totalSelected: number, totalOption: number) => {\n if (totalSelected < 0 || totalOption < 0) {\n throw new Error('value less than 0');\n }\n if (totalSelected > totalOption) {\n throw new Error(\"totalSelected couldn't be more than totalOption\");\n }\n if (totalSelected === 0) {\n return CHECKBOX_STATE.UNCHECKED;\n }\n if (totalSelected < totalOption) {\n return CHECKBOX_STATE.INDETERMINATE;\n }\n if (totalSelected === totalOption) {\n return CHECKBOX_STATE.CHECKED;\n }\n return CHECKBOX_STATE.UNCHECKED;\n};\n\nconst InputOption = <T, IsMulti extends boolean>({\n getStyles,\n isDisabled,\n isFocused,\n isSelected,\n children,\n innerProps,\n data,\n checkedState,\n isMulti,\n ...rest\n}: OptionProps<OptionGroup<T>, IsMulti> & {\n checkedState: number;\n}) => {\n const style = {\n alignItems: 'center',\n color: 'inherit',\n display: 'flex ',\n };\n\n const props: JSX.IntrinsicElements['div'] = {\n ...innerProps,\n 'aria-disabled': isDisabled,\n onClick: isDisabled ? undefined : innerProps.onClick,\n style,\n };\n\n return (\n <>\n <ComponentRS.Option\n isMulti\n data={data}\n isDisabled={isDisabled}\n isFocused={isFocused}\n isSelected={isSelected}\n getStyles={getStyles}\n innerProps={props}\n {...rest}\n >\n <Flex\n alignItems=\"center\"\n width=\"100%\"\n mb=\"3px\"\n gap={2}\n data-test-id=\"CT_component_select-checkbox_options\"\n cursor={isDisabled ? 'not-allowed' : 'default'}\n >\n {data?.selectAllCheckbox ? (\n <Checkbox\n isChecked={checkedState === CHECKBOX_STATE.CHECKED}\n isIndeterminate={checkedState === CHECKBOX_STATE.INDETERMINATE}\n isDisabled={isDisabled}\n data-test-id=\"CT_component_select-checkbox_select-all-option\"\n />\n ) : (\n <Checkbox isChecked={isSelected} data-test-id=\"CT_component_select-checkbox_option-checkbox\" />\n )}\n <Text textStyle=\"text.sm\" data-test-id={`select-checkbox-option-label-${data.value}`}>\n {children}\n </Text>\n </Flex>\n </ComponentRS.Option>\n {data?.selectAllCheckbox ? <hr /> : null}\n </>\n );\n};\n\nexport interface SelectWithCheckboxBaseProps<\n T = OptionGroup<never> | OptionMultiGroup<never>,\n IsMulti extends boolean = boolean,\n> extends ReactSelectProps<T, IsMulti> {\n isError?: boolean;\n}\n\nconst SelectWithCheckboxBase = <T, IsMulti extends boolean>({\n isError = false,\n components,\n options,\n ...rest\n}: SelectWithCheckboxBaseProps<T, IsMulti>) => {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelect<T, IsMulti>\n classNamePrefix=\"react-select\"\n options={options}\n styles={{ ...selectStyles(colorMode, !!isError) }}\n theme={themeSelect}\n closeMenuOnSelect={false}\n hideSelectedOptions={false}\n components={{\n ...components,\n }}\n {...rest}\n />\n );\n};\n\nconst SelectCheckbox = <T, IsMulti extends boolean = boolean>(\n props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>\n) => {\n const { isMulti, options, value, ...rest } = props;\n const selectValue = (value || []) as MultiValue<OptionGroup<T>>;\n\n return (\n <SelectWithCheckboxBase\n isMulti={isMulti}\n options={options}\n components={{\n Option: optionProps => {\n const { isSelected, data } = optionProps;\n\n const optionLength = options?.length ? options.length - 1 : 0;\n const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;\n const checkedState = data.selectAllCheckbox\n ? getSelectAllCheckboxState(selectValue?.length, optionLength)\n : selectedValue;\n return <InputOption {...optionProps} checkedState={checkedState} />;\n },\n }}\n {...rest}\n />\n );\n};\n\nexport default SelectCheckbox;\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Flex } from '@chakra-ui/react';\nimport { motion } from 'framer-motion';\nimport React from 'react';\n\nexport interface SidebarProps extends BoxProps {\n isCollapse: boolean;\n}\n\nexport const Sidebar = ({ isCollapse, children, ...props }: SidebarProps) => {\n return (\n <Flex\n position=\"relative\"\n as={motion.div}\n w=\"174px\"\n bg=\"pureWhite\"\n h={props.h}\n flexDirection=\"column\"\n overflow=\"hidden\"\n shadow=\"raised\"\n animate={{ width: isCollapse ? '62px' : '174px' }}\n transition=\"10ms linear\"\n {...props}\n >\n {children}\n </Flex>\n );\n};\n\nSidebar.displayName = 'Sidebar';\n\nexport default Sidebar;\n","import { __assign } from 'tslib';\nimport { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layoutFeatures } from '../../motion/features/layout/index.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nvar featureBundle = __assign(__assign(__assign(__assign({}, animations), gestureAnimations), drag), layoutFeatures);\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nvar motion = /*@__PURE__*/ createMotionProxy(function (Component, config) {\n return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);\n});\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, featureBundle, createDomVisualElement, HTMLProjectionNode));\n}\n\nexport { createDomMotionComponent, motion };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures, featureDefinitions } from './features/definitions.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { useProjectionId } from '../projection/node/id.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { useProjection } from './features/use-projection.mjs';\nimport { VisualElementHandler } from './utils/VisualElementHandler.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n var layoutId = useLayoutId(props);\n props = __assign(__assign({}, props), { layoutId: layoutId });\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var config = useContext(MotionConfigContext);\n var features = null;\n var context = useCreateMotionContext(props);\n /**\n * Create a unique projection ID for this component. If a new component is added\n * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing\n * us to measure it as soon as any layout effect flushes pending layout animations.\n *\n * Performance note: It'd be better not to have to search the DOM for these elements.\n * For newly-entering components it could be enough to only correct treeScale, in which\n * case we could mount in a scale-correction mode. This wouldn't be enough for\n * shared element transitions however. Perhaps for those we could revert to a root node\n * that gets forceRendered and layout animations are triggered on its layout effect.\n */\n var projectionId = config.isStatic ? undefined : useProjectionId();\n /**\n *\n */\n var visualState = useVisualState(props, config.isStatic);\n if (!config.isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement);\n useProjection(projectionId, props, context.visualElement, projectionNodeConstructor ||\n featureDefinitions.projectionNodeConstructor);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) },\n features,\n React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))));\n }\n return forwardRef(MotionComponent);\n}\nfunction useLayoutId(_a) {\n var _b;\n var layoutId = _a.layoutId;\n var layoutGroupId = (_b = useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement)\n return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (env !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n }\n }\n return features;\n}\n\nexport { useFeatures };\n","/**\n * Browser-safe usage of process\n */\nvar defaultEnvironment = \"production\";\nvar env = typeof process === \"undefined\" || process.env === undefined\n ? defaultEnvironment\n : process.env.NODE_ENV || defaultEnvironment;\n\nexport { env };\n","var createDefinition = function (propNames) { return ({\n isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); },\n}); };\nvar featureDefinitions = {\n measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\"]),\n animation: createDefinition([\n \"animate\",\n \"exit\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"whileFocus\",\n \"whileDrag\",\n \"whileInView\",\n ]),\n exit: createDefinition([\"exit\"]),\n drag: createDefinition([\"drag\", \"dragControls\"]),\n focus: createDefinition([\"whileFocus\"]),\n hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n pan: createDefinition([\n \"onPan\",\n \"onPanStart\",\n \"onPanSessionStart\",\n \"onPanEnd\",\n ]),\n inView: createDefinition([\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n ]),\n};\nfunction loadFeatures(features) {\n for (var key in features) {\n if (features[key] === null)\n continue;\n if (key === \"projectionNodeConstructor\") {\n featureDefinitions.projectionNodeConstructor = features[key];\n }\n else {\n featureDefinitions[key].Component = features[key];\n }\n }\n}\n\nexport { featureDefinitions, loadFeatures };\n","var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\n","import { createContext } from 'react';\n\nvar LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n transformPagePoint: function (p) { return p; },\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useVisualElementContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { useReducedMotionConfig } from '../../utils/use-reduced-motion.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var shouldReduceMotion = useReducedMotionConfig();\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n if (!createVisualElement)\n createVisualElement = lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: props,\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n shouldReduceMotion: shouldReduceMotion,\n });\n }\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","var isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { isBrowser } from './is-browser.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n hasDetected = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n var setReducedMotionPreferences = function () {\n return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n };\n motionMediaQuery_1.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasDetected && initPrefersReducedMotion();\n var _a = __read(useState(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0];\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\nfunction useReducedMotionConfig() {\n var reducedMotionPreference = useReducedMotion();\n var reducedMotion = useContext(MotionConfigContext).reducedMotion;\n if (reducedMotion === \"never\") {\n return false;\n }\n else if (reducedMotion === \"always\") {\n return true;\n }\n else {\n return reducedMotionPreference;\n }\n}\n\nexport { useReducedMotion, useReducedMotionConfig };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n return useMemo(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","/**\n * Decides if the supplied variable is an array of variant labels\n */\nfunction isVariantLabels(v) {\n return Array.isArray(v);\n}\n/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || isVariantLabels(v);\n}\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n var current = {};\n visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); });\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n var velocity = {};\n visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); });\n return velocity;\n}\nfunction resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {\n var _a;\n if (currentValues === void 0) { currentValues = {}; }\n if (currentVelocity === void 0) { currentVelocity = {}; }\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n var props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\nfunction checkIfControllingVariants(props) {\n var _a;\n return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === \"function\" ||\n isVariantLabel(props.initial) ||\n isVariantLabel(props.animate) ||\n isVariantLabel(props.whileHover) ||\n isVariantLabel(props.whileDrag) ||\n isVariantLabel(props.whileTap) ||\n isVariantLabel(props.whileFocus) ||\n isVariantLabel(props.exit));\n}\nfunction checkIfVariantNode(props) {\n return Boolean(checkIfControllingVariants(props) || props.variants);\n}\n\nexport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel, isVariantLabels, resolveVariant, resolveVariantFromProps };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial, animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n var ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nvar globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { useConstant } from '../../utils/use-constant.mjs';\nimport { globalProjectionState } from './state.mjs';\n\nvar id = 1;\nfunction useProjectionId() {\n return useConstant(function () {\n if (globalProjectionState.hasEverUpdated) {\n return id++;\n }\n });\n}\n\nexport { useProjectionId };\n","import { createContext } from 'react';\n\nvar LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useContext } from 'react';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nfunction useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {\n var _b;\n var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll;\n var initialPromotionConfig = useContext(SwitchLayoutGroupContext);\n if (!ProjectionNodeConstructor ||\n !visualElement ||\n (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {\n return;\n }\n visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);\n visualElement.projection.setOptions({\n layoutId: layoutId,\n layout: layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement: visualElement,\n scheduleRender: function () { return visualElement.scheduleRender(); },\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialPromotionConfig,\n layoutScroll: layoutScroll,\n });\n}\n\nexport { useProjection };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nvar SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { __extends } from 'tslib';\nimport React__default from 'react';\n\nvar VisualElementHandler = /** @class */ (function (_super) {\n __extends(VisualElementHandler, _super);\n function VisualElementHandler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Update visual element props as soon as we know this update is going to be commited.\n */\n VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {\n this.updateProps();\n return null;\n };\n VisualElementHandler.prototype.componentDidUpdate = function () { };\n VisualElementHandler.prototype.updateProps = function () {\n var _a = this.props, visualElement = _a.visualElement, props = _a.props;\n if (visualElement)\n visualElement.setProps(props);\n };\n VisualElementHandler.prototype.render = function () {\n return this.props.children;\n };\n return VisualElementHandler;\n}(React__default.Component));\n\nexport { VisualElementHandler };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function (_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {\n var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component });\n}\n\nexport { createDomMotionConfig };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nvar lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"svg\",\n \"switch\",\n \"symbol\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n var useRender = function (Component, props, projectionId, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n if (projectionId) {\n elementProps[\"data-projection-id\"] = projectionId;\n }\n return createElement(Component, elementProps);\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n var vars = state.vars, style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n if (Boolean(props.drag) && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : \"pan-\".concat(props.drag === \"x\" ? \"y\" : \"x\");\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","var scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nvar transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nvar order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\n/**\n * Generate a list of every possible transform key.\n */\nvar transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach(function (operationKey) {\n return transformAxes.forEach(function (axesKey) {\n return transformProps.push(operationKey + axesKey);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nfunction sortTransformProps(a, b) {\n return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\n/**\n * A quick lookup for transform props.\n */\nvar transformPropSet = new Set(transformProps);\nfunction isTransformProp(key) {\n return transformPropSet.has(key);\n}\n/**\n * A quick lookup for transform origin props\n */\nvar transformOriginProps = new Set([\"originX\", \"originY\", \"originZ\"]);\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\n\nexport { isTransformOriginProp, isTransformProp, sortTransformProps, transformAxes, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, _a) {\n var layout = _a.layout, layoutId = _a.layoutId;\n return (isTransformProp(key) ||\n isTransformOriginProp(key) ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","var isMotionValue = function (value) {\n return Boolean(value !== null && typeof value === \"object\" && value.getVelocity);\n};\n\nexport { isMotionValue };\n","import { sortTransformProps } from './transform.mjs';\n\nvar translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(_a, _b, transformIsDefault, transformTemplate) {\n var transform = _a.transform, transformKeys = _a.transformKeys;\n var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d;\n // The transform string we're going to build into.\n var transformString = \"\";\n // Transform keys into their default order - this will determine the output order.\n transformKeys.sort(sortTransformProps);\n // Track whether the defined transform has a defined z so we don't add a\n // second to enable hardware acceleration\n var transformHasZ = false;\n // Loop over each transform and build them into transformString\n var numTransformKeys = transformKeys.length;\n for (var i = 0; i < numTransformKeys; i++) {\n var key = transformKeys[i];\n transformString += \"\".concat(translateAlias[key] || key, \"(\").concat(transform[key], \") \");\n if (key === \"z\")\n transformHasZ = true;\n }\n if (!transformHasZ && enableHardwareAcceleration) {\n transformString += \"translateZ(0)\";\n }\n else {\n transformString = transformString.trim();\n }\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n/**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\nfunction buildTransformOrigin(_a) {\n var _b = _a.originX, originX = _b === void 0 ? \"50%\" : _b, _c = _a.originY, originY = _c === void 0 ? \"50%\" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;\n return \"\".concat(originX, \" \").concat(originY, \" \").concat(originZ);\n}\n\nexport { buildTransform, buildTransformOrigin };\n","/**\n * Returns true if the provided key is a CSS variable\n */\nfunction isCSSVariable(key) {\n return key.startsWith(\"--\");\n}\n\nexport { isCSSVariable };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nvar getValueAsType = function (value, type) {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);\nconst sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { clamp } from '../utils.mjs';\n\nconst number = {\n test: (v) => typeof v === 'number',\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });\nconst scale = Object.assign(Object.assign({}, number), { default: 1 });\n\nexport { alpha, number, scale };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType('deg');\nconst percent = createUnitType('%');\nconst px = createUnitType('px');\nconst vh = createUnitType('vh');\nconst vw = createUnitType('vw');\nconst progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) });\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString('hsl', 'hue'),\n parse: splitColor('hue', 'saturation', 'lightness'),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return ('hsla(' +\n Math.round(hue) +\n ', ' +\n percent.transform(sanitize(saturation)) +\n ', ' +\n percent.transform(sanitize(lightness)) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')');\n },\n};\n\nexport { hsla };\n","import { number, alpha } from '../numbers/index.mjs';\nimport { sanitize, clamp } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = clamp(0, 255);\nconst rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });\nconst rgba = {\n test: isColorString('rgb', 'red'),\n parse: splitColor('red', 'green', 'blue'),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' +\n rgbUnit.transform(red) +\n ', ' +\n rgbUnit.transform(green) +\n ', ' +\n rgbUnit.transform(blue) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')',\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = '';\n let g = '';\n let b = '';\n let a = '';\n if (v.length > 5) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n a = v.substr(7, 2);\n }\n else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n a = v.substr(4, 1);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString('#'),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty('red')\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nconst colorToken = '${c}';\nconst numberToken = '${n}';\nfunction test(v) {\n var _a, _b, _c, _d;\n return (isNaN(v) &&\n isString(v) &&\n ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);\n}\nfunction analyse(v) {\n if (typeof v === 'number')\n v = `${v}`;\n const values = [];\n let numColors = 0;\n const colors = v.match(colorRegex);\n if (colors) {\n numColors = colors.length;\n v = v.replace(colorRegex, colorToken);\n values.push(...colors.map(color.parse));\n }\n const numbers = v.match(floatRegex);\n if (numbers) {\n v = v.replace(floatRegex, numberToken);\n values.push(...numbers.map(number.parse));\n }\n return { values, numColors, tokenised: v };\n}\nfunction parse(v) {\n return analyse(v).values;\n}\nfunction createTransformer(v) {\n const { values, numColors, tokenised } = analyse(v);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parse(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = { test, parse, createTransformer, getAnimatableNone };\n\nexport { complex };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\nconst maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);\nfunction applyDefaultFilter(v) {\n let [name, value] = v.slice(0, -1).split('(');\n if (name === 'drop-shadow')\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, '');\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + '(' + defaultValue + unit + ')';\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(' ') : v;\n } });\n\nexport { filter };\n","import { __assign } from 'tslib';\nimport { number } from 'style-value-types';\n\nvar int = __assign(__assign({}, number), { transform: Math.round });\n\nexport { int };\n","import { px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { int } from './type-int.mjs';\n\nvar numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale: scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { buildTransform, buildTransformOrigin } from './build-transform.mjs';\nimport { isCSSVariable } from '../../dom/utils/is-css-variable.mjs';\nimport { isTransformProp, isTransformOriginProp } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n var _a;\n var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin;\n // Empty the transformKeys array. As we're throwing out refs to its items\n // this might not be as cheap as suspected. Maybe using the array as a buffer\n // with a manual incrementation would be better.\n transformKeys.length = 0;\n // Track whether we encounter any transform or transformOrigin values.\n var hasTransform = false;\n var hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n var transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (var key in latestValues) {\n var value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariable(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n var valueType = numberValueTypes[key];\n var valueAsType = getValueAsType(value, valueType);\n if (isTransformProp(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n transformKeys.push(key);\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0))\n transformIsNone = false;\n }\n else if (isTransformOriginProp(key)) {\n transformOrigin[key] = valueAsType;\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (hasTransform) {\n style.transform = buildTransform(state, options, transformIsNone, transformTemplate);\n }\n else if (transformTemplate) {\n style.transform = transformTemplate({}, \"\");\n }\n else if (!latestValues.transform && style.transform) {\n style.transform = \"none\";\n }\n if (hasTransformOrigin) {\n style.transformOrigin = buildTransformOrigin(transformOrigin);\n }\n}\n\nexport { buildHTMLStyles };\n","var createHtmlRenderState = function () { return ({\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n \"initial\",\n \"animate\",\n \"exit\",\n \"style\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"layout\",\n \"layoutId\",\n \"layoutDependency\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"drag\",\n \"dragControls\",\n \"dragListener\",\n \"dragConstraints\",\n \"dragDirectionLock\",\n \"dragSnapToOrigin\",\n \"_dragX\",\n \"_dragY\",\n \"dragElastic\",\n \"dragMomentum\",\n \"dragPropagation\",\n \"dragTransition\",\n \"whileDrag\",\n \"onPan\",\n \"onPanStart\",\n \"onPanEnd\",\n \"onPanSessionStart\",\n \"onTap\",\n \"onTapStart\",\n \"onTapCancel\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"whileFocus\",\n \"whileTap\",\n \"whileHover\",\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"viewport\",\n \"layoutScroll\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = function (key) {\n return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n for (var key in props) {\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n }, [visualState]);\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { __rest } from 'tslib';\nimport { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, _a, options, transformTemplate) {\n var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, \n // This is object creation, which we try to avoid per-frame.\n latest = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n buildHTMLStyles(state, latest, options, transformTemplate);\n state.attrs = state.style;\n state.style = {};\n var attrs = state.attrs, style = state.style, dimensions = state.dimensions;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Treat x/y not as shortcuts but as actual attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { px } from 'style-value-types';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return \"\".concat(pxOriginX, \" \").concat(pxOriginY);\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from 'style-value-types';\n\nvar dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nvar camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n var pathLength = px.transform(length);\n var pathSpacing = px.transform(spacing);\n attrs[keys.array] = \"\".concat(pathLength, \" \").concat(pathSpacing);\n}\n\nexport { buildSVGPath };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = \"$1-$2\";\n/**\n * Convert camelCase to dash-case properties.\n */\nvar camelToDash = function (str) {\n return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\n\nexport { camelToDash };\n","function renderHTML(element, _a, styleProp, projection) {\n var style = _a.style, vars = _a.vars;\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (var key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nvar camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (var key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var style = props.style;\n var newValues = {};\n for (var key in style) {\n if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var newValues = scrapeMotionValuesFromProps$1(props);\n for (var key in props) {\n if (isMotionValue(props[key])) {\n var targetKey = key === \"x\" || key === \"y\" ? \"attr\" + key.toUpperCase() : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = function (instance) { return onMount(props, instance, state); };\n }\n return state;\n}\nvar makeUseVisualState = function (config) {\n return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic\n ? makeState(config, props, context, presenceContext)\n : useConstant(function () {\n return makeState(config, props, context, presenceContext);\n });\n };\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n var initial = props.initial, animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n }\n var initialAnimationIsBlocked = blockInitialAnimation || initial === false;\n var variantToSet = initialAnimationIsBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n for (var key in target) {\n var valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n var index = initialAnimationIsBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (var key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","var isKeyframesTarget = function (v) {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nvar isCustomValue = function (v) {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nvar resolveFinalValueInKeyframes = function (v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n var unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\n\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function (props, instance, _a) {\n var renderState = _a.renderState, latestValues = _a.latestValues;\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);\n renderSVG(instance, renderState);\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","var AnimationType;\n(function (AnimationType) {\n AnimationType[\"Animate\"] = \"animate\";\n AnimationType[\"Hover\"] = \"whileHover\";\n AnimationType[\"Tap\"] = \"whileTap\";\n AnimationType[\"Drag\"] = \"whileDrag\";\n AnimationType[\"Focus\"] = \"whileFocus\";\n AnimationType[\"InView\"] = \"whileInView\";\n AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };\n","import { useEffect } from 'react';\n\nfunction addDomEvent(target, eventName, handler, options) {\n if (options === void 0) { options = { passive: true }; }\n target.addEventListener(eventName, handler, options);\n return function () { return target.removeEventListener(eventName, handler); };\n}\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nfunction useDomEvent(ref, eventName, handler, options) {\n useEffect(function () {\n var element = ref.current;\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options);\n }\n }, [ref, eventName, handler, options]);\n}\n\nexport { addDomEvent, useDomEvent };\n","import { AnimationType } from '../render/utils/types.mjs';\nimport { useDomEvent } from '../events/use-dom-event.mjs';\n\n/**\n *\n * @param props\n * @param ref\n * @internal\n */\nfunction useFocusGesture(_a) {\n var whileFocus = _a.whileFocus, visualElement = _a.visualElement;\n var onFocus = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true);\n };\n var onBlur = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false);\n };\n useDomEvent(visualElement, \"focus\", whileFocus ? onFocus : undefined);\n useDomEvent(visualElement, \"blur\", whileFocus ? onBlur : undefined);\n}\n\nexport { useFocusGesture };\n","function isMouseEvent(event) {\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (typeof PointerEvent !== \"undefined\" && event instanceof PointerEvent) {\n return !!(event.pointerType === \"mouse\");\n }\n return event instanceof MouseEvent;\n}\nfunction isTouchEvent(event) {\n var hasTouches = !!event.touches;\n return hasTouches;\n}\n\nexport { isMouseEvent, isTouchEvent };\n","import { isTouchEvent } from '../gestures/utils/event-type.mjs';\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler) {\n return function (event) {\n var isMouseEvent = event instanceof MouseEvent;\n var isPrimaryPointer = !isMouseEvent ||\n (isMouseEvent && event.button === 0);\n if (isPrimaryPointer) {\n eventHandler(event);\n }\n };\n}\nvar defaultPagePoint = { pageX: 0, pageY: 0 };\nfunction pointFromTouch(e, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n var primaryTouch = e.touches[0] || e.changedTouches[0];\n var point = primaryTouch || defaultPagePoint;\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction pointFromMouse(point, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction extractEventInfo(event, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n point: isTouchEvent(event)\n ? pointFromTouch(event, pointType)\n : pointFromMouse(event, pointType),\n };\n}\nvar wrapHandler = function (handler, shouldFilterPrimaryPointer) {\n if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; }\n var listener = function (event) {\n return handler(event, extractEventInfo(event));\n };\n return shouldFilterPrimaryPointer\n ? filterPrimaryPointer(listener)\n : listener;\n};\n\nexport { extractEventInfo, wrapHandler };\n","import { isBrowser } from '../utils/is-browser.mjs';\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nvar supportsPointerEvents = function () {\n return isBrowser && window.onpointerdown === null;\n};\nvar supportsTouchEvents = function () {\n return isBrowser && window.ontouchstart === null;\n};\nvar supportsMouseEvents = function () {\n return isBrowser && window.onmousedown === null;\n};\n\nexport { supportsMouseEvents, supportsPointerEvents, supportsTouchEvents };\n","import { addDomEvent, useDomEvent } from './use-dom-event.mjs';\nimport { wrapHandler } from './event-info.mjs';\nimport { supportsPointerEvents, supportsTouchEvents, supportsMouseEvents } from './utils.mjs';\n\nvar mouseEventNames = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\",\n};\nvar touchEventNames = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\",\n};\nfunction getPointerEventName(name) {\n if (supportsPointerEvents()) {\n return name;\n }\n else if (supportsTouchEvents()) {\n return touchEventNames[name];\n }\n else if (supportsMouseEvents()) {\n return mouseEventNames[name];\n }\n return name;\n}\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\nfunction usePointerEvent(ref, eventName, handler, options) {\n return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nexport { addPointerEvent, usePointerEvent };\n","function createLock(name) {\n var lock = null;\n return function () {\n var openLock = function () {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n var lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n var openHorizontal_1 = globalHorizontalLock();\n var openVertical_1 = globalVerticalLock();\n if (openHorizontal_1 && openVertical_1) {\n lock = function () {\n openHorizontal_1();\n openVertical_1();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal_1)\n openHorizontal_1();\n if (openVertical_1)\n openVertical_1();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n var openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","import { isMouseEvent } from './utils/event-type.mjs';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\nfunction createHoverEvent(visualElement, isActive, callback) {\n return function (event, info) {\n var _a;\n if (!isMouseEvent(event) || isDragActive())\n return;\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive);\n callback === null || callback === void 0 ? void 0 : callback(event, info);\n };\n}\nfunction useHoverGesture(_a) {\n var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement;\n usePointerEvent(visualElement, \"pointerenter\", onHoverStart || whileHover\n ? createHoverEvent(visualElement, true, onHoverStart)\n : undefined, { passive: !onHoverStart });\n usePointerEvent(visualElement, \"pointerleave\", onHoverEnd || whileHover\n ? createHoverEvent(visualElement, false, onHoverEnd)\n : undefined, { passive: !onHoverEnd });\n}\n\nexport { useHoverGesture };\n","import { useRef } from 'react';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { usePointerEvent, addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { pipe } from 'popmotion';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\n/**\n * @param handlers -\n * @internal\n */\nfunction useTapGesture(_a) {\n var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement;\n var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;\n var isPressing = useRef(false);\n var cancelPointerEndListeners = useRef(null);\n /**\n * Only set listener to passive if there are no external listeners.\n */\n var eventOptions = {\n passive: !(onTapStart || onTap || onTapCancel || onPointerDown),\n };\n function removePointerEndListener() {\n var _a;\n (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);\n cancelPointerEndListeners.current = null;\n }\n function checkPointerEnd() {\n var _a;\n removePointerEndListener();\n isPressing.current = false;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false);\n return !isDragActive();\n }\n function onPointerUp(event, info) {\n if (!checkPointerEnd())\n return;\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n !isNodeOrChild(visualElement.getInstance(), event.target)\n ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info)\n : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);\n }\n function onPointerCancel(event, info) {\n if (!checkPointerEnd())\n return;\n onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);\n }\n function onPointerDown(event, info) {\n var _a;\n removePointerEndListener();\n if (isPressing.current)\n return;\n isPressing.current = true;\n cancelPointerEndListeners.current = pipe(addPointerEvent(window, \"pointerup\", onPointerUp, eventOptions), addPointerEvent(window, \"pointercancel\", onPointerCancel, eventOptions));\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true);\n onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPressListeners ? onPointerDown : undefined, eventOptions);\n useUnmountEffect(removePointerEndListener);\n}\n\nexport { useTapGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nvar isNodeOrChild = function (parent, child) {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(function () { return function () { return callback(); }; }, []);\n}\n\nexport { useUnmountEffect };\n","import { __rest } from 'tslib';\nimport { detectAnimationFromOptions } from './utils/detect-animation-from-options.mjs';\nimport sync, { cancelSync } from 'framesync';\nimport { interpolate } from '../utils/interpolate.mjs';\nimport { hasRepeatDelayElapsed, reverseElapsed, loopElapsed } from './utils/elapsed.mjs';\n\nconst framesync = (update) => {\n const passTimestamp = ({ delta }) => update(delta);\n return {\n start: () => sync.update(passTimestamp, true),\n stop: () => cancelSync.update(passTimestamp),\n };\n};\nfunction animate(_a) {\n var _b, _c;\n var { from, autoplay = true, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = \"loop\", repeatDelay = 0, onPlay, onStop, onComplete, onRepeat, onUpdate } = _a, options = __rest(_a, [\"from\", \"autoplay\", \"driver\", \"elapsed\", \"repeat\", \"repeatType\", \"repeatDelay\", \"onPlay\", \"onStop\", \"onComplete\", \"onRepeat\", \"onUpdate\"]);\n let { to } = options;\n let driverControls;\n let repeatCount = 0;\n let computedDuration = options.duration;\n let latest;\n let isComplete = false;\n let isForwardPlayback = true;\n let interpolateFromNumber;\n const animator = detectAnimationFromOptions(options);\n if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {\n interpolateFromNumber = interpolate([0, 100], [from, to], {\n clamp: false,\n });\n from = 0;\n to = 100;\n }\n const animation = animator(Object.assign(Object.assign({}, options), { from, to }));\n function repeat() {\n repeatCount++;\n if (repeatType === \"reverse\") {\n isForwardPlayback = repeatCount % 2 === 0;\n elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);\n }\n else {\n elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);\n if (repeatType === \"mirror\")\n animation.flipTarget();\n }\n isComplete = false;\n onRepeat && onRepeat();\n }\n function complete() {\n driverControls.stop();\n onComplete && onComplete();\n }\n function update(delta) {\n if (!isForwardPlayback)\n delta = -delta;\n elapsed += delta;\n if (!isComplete) {\n const state = animation.next(Math.max(0, elapsed));\n latest = state.value;\n if (interpolateFromNumber)\n latest = interpolateFromNumber(latest);\n isComplete = isForwardPlayback ? state.done : elapsed <= 0;\n }\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);\n if (isComplete) {\n if (repeatCount === 0)\n computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);\n if (repeatCount < repeatMax) {\n hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();\n }\n else {\n complete();\n }\n }\n }\n function play() {\n onPlay === null || onPlay === void 0 ? void 0 : onPlay();\n driverControls = driver(update);\n driverControls.start();\n }\n autoplay && play();\n return {\n stop: () => {\n onStop === null || onStop === void 0 ? void 0 : onStop();\n driverControls.stop();\n },\n };\n}\n\nexport { animate };\n","import { __rest } from 'tslib';\nimport { findSpring, calcAngularFreq } from '../utils/find-spring.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = Object.assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options);\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 });\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring(_a) {\n var { from = 0.0, to = 1.0, restSpeed = 2, restDelta } = _a, options = __rest(_a, [\"from\", \"to\", \"restSpeed\", \"restDelta\"]);\n const state = { done: false, value: from };\n let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n let resolveSpring = zero;\n let resolveVelocity = zero;\n function createSpring() {\n const initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n const initialDelta = to - from;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;\n if (restDelta === undefined) {\n restDelta = Math.min(Math.abs(to - from) / 100, 0.4);\n }\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (to -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (dampingRatio *\n undampedAngularFreq *\n envelope *\n ((Math.sin(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta)) /\n angularFreq +\n initialDelta * Math.cos(angularFreq * t)) -\n envelope *\n (Math.cos(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta) -\n angularFreq *\n initialDelta *\n Math.sin(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n resolveSpring = (t) => to -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) *\n t);\n }\n else {\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (to -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n }\n createSpring();\n return {\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = resolveVelocity(t) * 1000;\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? to : current;\n return state;\n },\n flipTarget: () => {\n velocity = -velocity;\n [from, to] = [to, from];\n createSpring();\n },\n };\n}\nspring.needsInterpolation = (a, b) => typeof a === \"string\" || typeof b === \"string\";\nconst zero = (_t) => 0;\n\nexport { spring };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { warning } from 'hey-listen';\nimport { clamp } from '../../utils/clamp.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= maxDuration * 1000, \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, duration / 1000);\n if (dampingRatio < 1) {\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = duration * 1000;\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","const progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","const mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","function hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { hsla, rgba, hex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\n\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nconst notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;\nconst mixColor = (from, to) => {\n let fromColorType = getColorType(from);\n let toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n let fromColor = fromColorType.parse(from);\n let toColor = toColorType.parse(to);\n if (fromColorType === hsla) {\n fromColor = hslaToRgba(fromColor);\n fromColorType = rgba;\n }\n if (toColorType === hsla) {\n toColor = hslaToRgba(toColor);\n toColorType = rgba;\n }\n const blended = Object.assign({}, fromColor);\n return (v) => {\n for (const key in blended) {\n if (key !== \"alpha\") {\n blended[key] = mixLinearColor(fromColor[key], toColor[key], v);\n }\n }\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","const zeroPoint = {\n x: 0,\n y: 0,\n z: 0\n};\nconst isNum = (v) => typeof v === 'number';\n\nexport { isNum, zeroPoint };\n","const combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","import { complex, color } from 'style-value-types';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { isNum } from './inc.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = Object.assign(Object.assign({}, origin), target);\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nfunction analyse(value) {\n const parsed = complex.parse(value);\n const numValues = parsed.length;\n let numNumbers = 0;\n let numRGB = 0;\n let numHSL = 0;\n for (let i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === \"number\") {\n numNumbers++;\n }\n else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n }\n else {\n numRGB++;\n }\n }\n }\n return { parsed, numNumbers, numRGB, numHSL };\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyse(origin);\n const targetStats = analyse(target);\n const canInterpolate = originStats.numHSL === targetStats.numHSL &&\n originStats.numRGB === targetStats.numRGB &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return (p) => `${p > 0 ? target : origin}`;\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","import { progress } from './progress.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { invariant } from 'hey-listen';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n }\n else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n }\n else {\n return mixComplex;\n }\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === 'object') {\n return mixObject;\n }\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction fastInterpolate([from, to], [mixer]) {\n return (v) => mixer(progress(from, to, v));\n}\nfunction slowInterpolate(input, mixers) {\n const inputLength = input.length;\n const lastInputIndex = inputLength - 1;\n return (v) => {\n let mixerIndex = 0;\n let foundMixerIndex = false;\n if (v <= input[0]) {\n foundMixerIndex = true;\n }\n else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n if (!foundMixerIndex) {\n let i = 1;\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n mixerIndex = i - 1;\n }\n const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const interpolator = inputLength === 2\n ? fastInterpolate(input, mixers)\n : slowInterpolate(input, mixers);\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","const reverseEasing = easing => p => 1 - easing(1 - p);\nconst mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\nconst createExpoIn = (power) => p => Math.pow(p, power);\nconst createBackIn = (power) => p => p * p * ((power + 1) * p - power);\nconst createAnticipate = (power) => {\n const backEasing = createBackIn(power);\n return p => (p *= 2) < 1\n ? 0.5 * backEasing(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n};\n\nexport { createAnticipate, createBackIn, createExpoIn, mirrorEasing, reverseEasing };\n","import { createExpoIn, reverseEasing, mirrorEasing, createBackIn, createAnticipate } from './utils.mjs';\n\nconst DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nconst BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nconst BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nconst BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\nconst linear = p => p;\nconst easeIn = createExpoIn(2);\nconst easeOut = reverseEasing(easeIn);\nconst easeInOut = mirrorEasing(easeIn);\nconst circIn = p => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\nconst backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nconst backOut = reverseEasing(backIn);\nconst backInOut = mirrorEasing(backIn);\nconst anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);\nconst ca = 4356.0 / 361.0;\nconst cb = 35442.0 / 1805.0;\nconst cc = 16061.0 / 1805.0;\nconst bounceOut = (p) => {\n if (p === 1 || p === 0)\n return p;\n const p2 = p * p;\n return p < BOUNCE_FIRST_THRESHOLD\n ? 7.5625 * p2\n : p < BOUNCE_SECOND_THRESHOLD\n ? 9.075 * p2 - 9.9 * p + 3.4\n : p < BOUNCE_THIRD_THRESHOLD\n ? ca * p2 - cb * p + cc\n : 10.8 * p * p - 20.52 * p + 10.72;\n};\nconst bounceIn = reverseEasing(bounceOut);\nconst bounceInOut = (p) => p < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0))\n : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n\nexport { anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, linear };\n","import { interpolate } from '../../utils/interpolate.mjs';\nimport { easeInOut } from '../../easing/index.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction defaultOffset(values) {\n const numValues = values.length;\n return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);\n}\nfunction convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\nfunction keyframes({ from = 0, to = 1, ease, offset, duration = 300, }) {\n const state = { done: false, value: from };\n const values = Array.isArray(to) ? to : [from, to];\n const times = convertOffsetToTimes(offset && offset.length === values.length\n ? offset\n : defaultOffset(values), duration);\n function createInterpolator() {\n return interpolate(times, values, {\n ease: Array.isArray(ease) ? ease : defaultEasing(values, ease),\n });\n }\n let interpolator = createInterpolator();\n return {\n next: (t) => {\n state.value = interpolator(t);\n state.done = t >= duration;\n return state;\n },\n flipTarget: () => {\n values.reverse();\n interpolator = createInterpolator();\n },\n };\n}\n\nexport { convertOffsetToTimes, defaultEasing, defaultOffset, keyframes };\n","function decay({ velocity = 0, from = 0, power = 0.8, timeConstant = 350, restDelta = 0.5, modifyTarget, }) {\n const state = { done: false, value: from };\n let amplitude = power * velocity;\n const ideal = from + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n if (target !== ideal)\n amplitude = target - from;\n return {\n next: (t) => {\n const delta = -amplitude * Math.exp(-t / timeConstant);\n state.done = !(delta > restDelta || delta < -restDelta);\n state.value = state.done ? target : target + delta;\n return state;\n },\n flipTarget: () => { },\n };\n}\n\nexport { decay };\n","import { spring } from '../generators/spring.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { decay } from '../generators/decay.mjs';\n\nconst types = { keyframes, spring, decay };\nfunction detectAnimationFromOptions(config) {\n if (Array.isArray(config.to)) {\n return keyframes;\n }\n else if (types[config.type]) {\n return types[config.type];\n }\n const keys = new Set(Object.keys(config));\n if (keys.has(\"ease\") ||\n (keys.has(\"duration\") && !keys.has(\"dampingRatio\"))) {\n return keyframes;\n }\n else if (keys.has(\"dampingRatio\") ||\n keys.has(\"stiffness\") ||\n keys.has(\"mass\") ||\n keys.has(\"damping\") ||\n keys.has(\"restSpeed\") ||\n keys.has(\"restDelta\")) {\n return spring;\n }\n return keyframes;\n}\n\nexport { detectAnimationFromOptions };\n","const defaultTimestep = (1 / 60) * 1000;\nconst getCurrentTime = typeof performance !== \"undefined\"\n ? () => performance.now()\n : () => Date.now();\nconst onNextFrame = typeof window !== \"undefined\"\n ? (callback) => window.requestAnimationFrame(callback)\n : (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);\n\nexport { defaultTimestep, onNextFrame };\n","function createRenderStep(runNextFrame) {\n let toRun = [];\n let toRunNextFrame = [];\n let numToRun = 0;\n let isProcessing = false;\n let flushNextFrame = false;\n const toKeepAlive = new WeakSet();\n const step = {\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const buffer = addToCurrentFrame ? toRun : toRunNextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (buffer.indexOf(callback) === -1) {\n buffer.push(callback);\n if (addToCurrentFrame && isProcessing)\n numToRun = toRun.length;\n }\n return callback;\n },\n cancel: (callback) => {\n const index = toRunNextFrame.indexOf(callback);\n if (index !== -1)\n toRunNextFrame.splice(index, 1);\n toKeepAlive.delete(callback);\n },\n process: (frameData) => {\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [toRun, toRunNextFrame] = [toRunNextFrame, toRun];\n toRunNextFrame.length = 0;\n numToRun = toRun.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = toRun[i];\n callback(frameData);\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { onNextFrame, defaultTimestep } from './on-next-frame.mjs';\nimport { createRenderStep } from './create-render-step.mjs';\n\nconst maxElapsed = 40;\nlet useDefaultElapsed = true;\nlet runNextFrame = false;\nlet isProcessing = false;\nconst frame = {\n delta: 0,\n timestamp: 0,\n};\nconst stepsOrder = [\n \"read\",\n \"update\",\n \"preRender\",\n \"render\",\n \"postRender\",\n];\nconst steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n}, {});\nconst sync = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n startLoop();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n}, {});\nconst cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = steps[key].cancel;\n return acc;\n}, {});\nconst flushSync = stepsOrder.reduce((acc, key) => {\n acc[key] = () => steps[key].process(frame);\n return acc;\n}, {});\nconst processStep = (stepId) => steps[stepId].process(frame);\nconst processFrame = (timestamp) => {\n runNextFrame = false;\n frame.delta = useDefaultElapsed\n ? defaultTimestep\n : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);\n frame.timestamp = timestamp;\n isProcessing = true;\n stepsOrder.forEach(processStep);\n isProcessing = false;\n if (runNextFrame) {\n useDefaultElapsed = false;\n onNextFrame(processFrame);\n }\n};\nconst startLoop = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!isProcessing)\n onNextFrame(processFrame);\n};\nconst getFrameData = () => frame;\n\nexport default sync;\nexport { cancelSync, flushSync, getFrameData };\n","function loopElapsed(elapsed, duration, delay = 0) {\n return elapsed - duration - delay;\n}\nfunction reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) {\n return isForwardPlayback\n ? loopElapsed(duration + -elapsed, duration, delay)\n : duration - (elapsed - duration) + delay;\n}\nfunction hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {\n return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;\n}\n\nexport { hasRepeatDelayElapsed, loopElapsed, reverseElapsed };\n","function velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { animate } from './index.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { getFrameData } from 'framesync';\n\nfunction inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant = 750, bounceStiffness = 500, bounceDamping = 10, restDelta = 1, modifyTarget, driver, onUpdate, onComplete, onStop, }) {\n let currentAnimation;\n function isOutOfBounds(v) {\n return (min !== undefined && v < min) || (max !== undefined && v > max);\n }\n function boundaryNearest(v) {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n }\n function startAnimation(options) {\n currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n currentAnimation = animate(Object.assign(Object.assign({}, options), { driver, onUpdate: (v) => {\n var _a;\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);\n }, onComplete,\n onStop }));\n }\n function startSpring(options) {\n startAnimation(Object.assign({ type: \"spring\", stiffness: bounceStiffness, damping: bounceDamping, restDelta }, options));\n }\n if (isOutOfBounds(from)) {\n startSpring({ from, velocity, to: boundaryNearest(from) });\n }\n else {\n let target = power * velocity + from;\n if (typeof modifyTarget !== \"undefined\")\n target = modifyTarget(target);\n const boundary = boundaryNearest(target);\n const heading = boundary === min ? -1 : 1;\n let prev;\n let current;\n const checkBoundary = (v) => {\n prev = current;\n current = v;\n velocity = velocityPerSecond(v - prev, getFrameData().delta);\n if ((heading === 1 && v > boundary) ||\n (heading === -1 && v < boundary)) {\n startSpring({ from: v, to: boundary, velocity });\n }\n };\n startAnimation({\n type: \"decay\",\n from,\n velocity,\n timeConstant,\n power,\n restDelta,\n modifyTarget,\n onUpdate: isOutOfBounds(target) ? checkBoundary : undefined,\n });\n }\n return {\n stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(),\n };\n}\n\nexport { inertia };\n","const isPoint = (point) => point.hasOwnProperty('x') && point.hasOwnProperty('y');\n\nexport { isPoint };\n","import { isPoint } from './is-point.mjs';\n\nconst isPoint3D = (point) => isPoint(point) && point.hasOwnProperty('z');\n\nexport { isPoint3D };\n","import { isPoint } from './is-point.mjs';\nimport { isPoint3D } from './is-point-3d.mjs';\nimport { isNum } from './inc.mjs';\n\nconst distance1D = (a, b) => Math.abs(a - b);\nfunction distance(a, b) {\n if (isNum(a) && isNum(b)) {\n return distance1D(a, b);\n }\n else if (isPoint(a) && isPoint(b)) {\n const xDelta = distance1D(a.x, b.x);\n const yDelta = distance1D(a.y, b.y);\n const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n }\n}\n\nexport { distance };\n","import { linear } from './index.mjs';\n\nconst a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;\nconst b = (a1, a2) => 3.0 * a2 - 6.0 * a1;\nconst c = (a1) => 3.0 * a1;\nconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\nconst getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 10;\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n }\n else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nconst newtonIterations = 8;\nconst newtonMinSlope = 0.001;\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (let i = 0; i < newtonIterations; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n if (mX1 === mY1 && mX2 === mY2)\n return linear;\n const sampleValues = new Float32Array(kSplineTableSize);\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n const dist = (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= newtonMinSlope) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n else if (initialSlope === 0.0) {\n return guessForT;\n }\n else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { env } from '../../../utils/process.mjs';\nimport { useRef, useEffect } from 'react';\nimport { AnimationType } from '../../../render/utils/types.mjs';\nimport { warnOnce } from '../../../utils/warn-once.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nfunction useViewport(_a) {\n var visualElement = _a.visualElement, whileInView = _a.whileInView, onViewportEnter = _a.onViewportEnter, onViewportLeave = _a.onViewportLeave, _b = _a.viewport, viewport = _b === void 0 ? {} : _b;\n var state = useRef({\n hasEnteredView: false,\n isInView: false,\n });\n var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);\n if (viewport.once && state.current.hasEnteredView)\n shouldObserve = false;\n var useObserver = typeof IntersectionObserver === \"undefined\"\n ? useMissingIntersectionObserver\n : useIntersectionObserver;\n useObserver(shouldObserve, state.current, visualElement, viewport);\n}\nvar thresholdNames = {\n some: 0,\n all: 1,\n};\nfunction useIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var root = _a.root, rootMargin = _a.margin, _b = _a.amount, amount = _b === void 0 ? \"some\" : _b, once = _a.once;\n useEffect(function () {\n if (!shouldObserve)\n return;\n var options = {\n root: root === null || root === void 0 ? void 0 : root.current,\n rootMargin: rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n var intersectionCallback = function (entry) {\n var _a;\n var isIntersecting = entry.isIntersecting;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (state.isInView === isIntersecting)\n return;\n state.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && state.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n state.hasEnteredView = true;\n }\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, isIntersecting);\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n var props = visualElement.getProps();\n var callback = isIntersecting\n ? props.onViewportEnter\n : props.onViewportLeave;\n callback === null || callback === void 0 ? void 0 : callback(entry);\n };\n return observeIntersection(visualElement.getInstance(), options, intersectionCallback);\n }, [shouldObserve, root, rootMargin, amount]);\n}\n/**\n * If IntersectionObserver is missing, we activate inView and fire onViewportEnter\n * on mount. This way, the page will be in the state the author expects users\n * to see it in for everyone.\n */\nfunction useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var _b = _a.fallback, fallback = _b === void 0 ? true : _b;\n useEffect(function () {\n if (!shouldObserve || !fallback)\n return;\n if (env !== \"production\") {\n warnOnce(false, \"IntersectionObserver not available on this device. whileInView animations will trigger on mount.\");\n }\n /**\n * Fire this in an rAF because, at this point, the animation state\n * won't have flushed for the first time and there's certain logic in\n * there that behaves differently on the initial animation.\n *\n * This hook should be quite rarely called so setting this in an rAF\n * is preferred to changing the behaviour of the animation state.\n */\n requestAnimationFrame(function () {\n var _a;\n state.hasEnteredView = true;\n var onViewportEnter = visualElement.getProps().onViewportEnter;\n onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, true);\n });\n }, [shouldObserve]);\n}\n\nexport { useViewport };\n","var warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","import { __rest, __assign } from 'tslib';\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nvar observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nvar observers = new WeakMap();\nvar fireObserverCallback = function (entry) {\n var _a;\n (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n};\nvar fireAllObserverCallbacks = function (entries) {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver(_a) {\n var root = _a.root, options = __rest(_a, [\"root\"]);\n var lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n var rootObservers = observers.get(lookupRoot);\n var key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __assign({ root: root }, options));\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n var rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return function () {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","var makeRenderlessComponent = function (hook) { return function (props) {\n hook(props);\n return null;\n}; };\n\nexport { makeRenderlessComponent };\n","import { useFocusGesture } from '../../gestures/use-focus-gesture.mjs';\nimport { useHoverGesture } from '../../gestures/use-hover-gesture.mjs';\nimport { useTapGesture } from '../../gestures/use-tap-gesture.mjs';\nimport { useViewport } from './viewport/use-viewport.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar gestureAnimations = {\n inView: makeRenderlessComponent(useViewport),\n tap: makeRenderlessComponent(useTapGesture),\n focus: makeRenderlessComponent(useFocusGesture),\n hover: makeRenderlessComponent(useHoverGesture),\n};\n\nexport { gestureAnimations };\n","import { __read } from 'tslib';\nimport { useEffect, useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { usePresence } from '../../components/AnimatePresence/use-presence.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { createAnimationState } from '../../render/utils/animation-state.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar animations = {\n animation: makeRenderlessComponent(function (_a) {\n var visualElement = _a.visualElement, animate = _a.animate;\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n if (isAnimationControls(animate)) {\n useEffect(function () { return animate.subscribe(visualElement); }, [animate]);\n }\n }),\n exit: makeRenderlessComponent(function (props) {\n var custom = props.custom, visualElement = props.visualElement;\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var presenceContext = useContext(PresenceContext);\n useEffect(function () {\n var _a, _b;\n visualElement.isPresent = isPresent;\n var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom });\n !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));\n }, [isPresent]);\n }),\n};\n\nexport { animations };\n","import { useContext, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n var context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n // Replace with useId when released in React\n var id = useId();\n useEffect(function () { return register(id); }, []);\n var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); };\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { useConstant } from './use-constant.mjs';\n\nvar counter = 0;\nvar incrementId = function () { return counter++; };\nvar useId = function () { return useConstant(incrementId); };\n/**\n * Ideally we'd use the following code to support React 18 optionally.\n * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).\n * Need to come up with a different way of figuring this out.\n */\n// export const useId = (React as any).useId\n// ? (React as any).useId\n// : () => useConstant(incrementId)\n\nexport { useId };\n","import { __spreadArray, __read, __assign, __rest } from 'tslib';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { animateVisualElement } from './animation.mjs';\nimport { AnimationType } from './types.mjs';\nimport { isVariantLabels, resolveVariant, isVariantLabel } from './variants.mjs';\n\nvar variantPriorityOrder = [\n AnimationType.Animate,\n AnimationType.InView,\n AnimationType.Focus,\n AnimationType.Hover,\n AnimationType.Tap,\n AnimationType.Drag,\n AnimationType.Exit,\n];\nvar reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder), false).reverse();\nvar numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return function (animations) {\n return Promise.all(animations.map(function (_a) {\n var animation = _a.animation, options = _a.options;\n return animateVisualElement(visualElement, animation, options);\n }));\n };\n}\nfunction createAnimationState(visualElement) {\n var animate = animateList(visualElement);\n var state = createState();\n var allAnimatedKeys = {};\n var isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n var buildResolvedTypeValues = function (acc, definition) {\n var resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, [\"transition\", \"transitionEnd\"]);\n acc = __assign(__assign(__assign({}, acc), target), transitionEnd);\n }\n return acc;\n };\n function isAnimated(key) {\n return allAnimatedKeys[key] !== undefined;\n }\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(options, changedActiveType) {\n var _a;\n var props = visualElement.getProps();\n var context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n var animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n var removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n var encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n var removedVariantIndex = Infinity;\n var _loop_1 = function (i) {\n var type = reversePriorityOrder[i];\n var typeState = state[type];\n var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n var propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n var activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = __assign({}, encounteredKeys);\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n return \"continue\";\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n var shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n var definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;\n var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n var markToAnimate = function (key) {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (var key in allKeys) {\n var next = resolvedValues[key];\n var prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev) || variantDidChange) {\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) { return ({\n animation: animation,\n options: __assign({ type: type }, options),\n }); })), false));\n }\n };\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (var i = 0; i < numAnimationTypes; i++) {\n _loop_1(i);\n }\n allAnimatedKeys = __assign({}, encounteredKeys);\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n var fallbackAnimation_1 = {};\n removedKeys.forEach(function (key) {\n var fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation_1[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation_1 });\n }\n var shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n var animations = animateChanges(options, type);\n for (var key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n isAnimated: isAnimated,\n animateChanges: animateChanges,\n setActive: setActive,\n setAnimateFunction: setAnimateFunction,\n getState: function () { return state; },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (isVariantLabels(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive) {\n if (isActive === void 0) { isActive = false; }\n return {\n isActive: isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n var _a;\n return _a = {},\n _a[AnimationType.Animate] = createTypeState(true),\n _a[AnimationType.InView] = createTypeState(),\n _a[AnimationType.Hover] = createTypeState(),\n _a[AnimationType.Tap] = createTypeState(),\n _a[AnimationType.Drag] = createTypeState(),\n _a[AnimationType.Focus] = createTypeState(),\n _a[AnimationType.Exit] = createTypeState(),\n _a;\n}\n\nexport { checkVariantsDidChange, createAnimationState, variantPriorityOrder };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n var prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (var i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { __read, __rest, __assign } from 'tslib';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { setTarget } from './setters.mjs';\nimport { resolveVariant } from './variants.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\n\nfunction animateVisualElement(visualElement, definition, options) {\n if (options === void 0) { options = {}; }\n visualElement.notifyAnimationStart(definition);\n var animation;\n if (Array.isArray(definition)) {\n var animations = definition.map(function (variant) {\n return animateVariant(visualElement, variant, options);\n });\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n var resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = animateTarget(visualElement, resolvedDefinition, options);\n }\n return animation.then(function () {\n return visualElement.notifyAnimationComplete(definition);\n });\n}\nfunction animateVariant(visualElement, variant, options) {\n var _a;\n if (options === void 0) { options = {}; }\n var resolved = resolveVariant(visualElement, variant, options.custom);\n var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getAnimation = resolved\n ? function () { return animateTarget(visualElement, resolved, options); }\n : function () { return Promise.resolve(); };\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size)\n ? function (forwardDelay) {\n if (forwardDelay === void 0) { forwardDelay = 0; }\n var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : function () { return Promise.resolve(); };\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n var when = transition.when;\n if (when) {\n var _c = __read(when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1];\n return first().then(last);\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\n/**\n * @internal\n */\nfunction animateTarget(visualElement, definition, _a) {\n var _b;\n var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type;\n var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, [\"transition\", \"transitionEnd\"]);\n if (transitionOverride)\n transition = transitionOverride;\n var animations = [];\n var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);\n for (var key in target) {\n var value = visualElement.getValue(key);\n var valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n var valueTransition = __assign({ delay: delay }, transition);\n /**\n * Make animation instant if this is a transform prop and we should reduce motion.\n */\n if (visualElement.shouldReduceMotion && isTransformProp(key)) {\n valueTransition = __assign(__assign({}, valueTransition), { type: false, delay: 0 });\n }\n var animation = startAnimation(key, value, valueTarget, valueTransition);\n animations.push(animation);\n }\n return Promise.all(animations).then(function () {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n}\nfunction animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {\n if (delayChildren === void 0) { delayChildren = 0; }\n if (staggerChildren === void 0) { staggerChildren = 0; }\n if (staggerDirection === void 0) { staggerDirection = 1; }\n var animations = [];\n var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n var generateStaggerDuration = staggerDirection === 1\n ? function (i) {\n if (i === void 0) { i = 0; }\n return i * staggerChildren;\n }\n : function (i) {\n if (i === void 0) { i = 0; }\n return maxStaggerDuration - i * staggerChildren;\n };\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach(function (child, i) {\n animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); }));\n });\n return Promise.all(animations);\n}\nfunction stopAnimation(visualElement) {\n visualElement.forEachValue(function (value) { return value.stop(); });\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(_a, key) {\n var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating;\n var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\n\nexport { animateVisualElement, sortByTreeOrder, stopAnimation };\n","import { __assign, __rest, __spreadArray, __read } from 'tslib';\nimport { inertia, animate } from 'popmotion';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { isEasingArray, easingDefinitionToFunction } from './easing.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { getDefaultTransition } from './default-transitions.mjs';\nimport { warning } from 'hey-listen';\nimport { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(_a) {\n _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, [\"when\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"repeat\", \"repeatType\", \"repeatDelay\", \"from\"]);\n return !!Object.keys(transition).length;\n}\nvar legacyRepeatWarning = false;\n/**\n * Convert Framer Motion's Transition type into Popmotion-compatible options.\n */\nfunction convertTransitionToAnimationOptions(_a) {\n var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, [\"ease\", \"times\", \"yoyo\", \"flip\", \"loop\"]);\n var options = __assign({}, transition);\n if (times)\n options[\"offset\"] = times;\n /**\n * Convert any existing durations from seconds to milliseconds\n */\n if (transition.duration)\n options[\"duration\"] = secondsToMilliseconds(transition.duration);\n if (transition.repeatDelay)\n options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);\n /**\n * Map easing names to Popmotion's easing functions\n */\n if (ease) {\n options[\"ease\"] = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n }\n /**\n * Support legacy transition API\n */\n if (transition.type === \"tween\")\n options.type = \"keyframes\";\n /**\n * TODO: These options are officially removed from the API.\n */\n if (yoyo || loop || flip) {\n warning(!legacyRepeatWarning, \"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.\");\n legacyRepeatWarning = true;\n if (yoyo) {\n options.repeatType = \"reverse\";\n }\n else if (loop) {\n options.repeatType = \"loop\";\n }\n else if (flip) {\n options.repeatType = \"mirror\";\n }\n options.repeat = loop || yoyo || flip || transition.repeat;\n }\n /**\n * TODO: Popmotion 9 has the ability to automatically detect whether to use\n * a keyframes or spring animation, but does so by detecting velocity and other spring options.\n * It'd be good to introduce a similar thing here.\n */\n if (transition.type !== \"spring\")\n options.type = \"keyframes\";\n return options;\n}\n/**\n * Get the delay for a value by checking Transition with decreasing specificity.\n */\nfunction getDelayFromTransition(transition, key) {\n var _a, _b;\n var valueTransition = getValueTransition(transition, key) || {};\n return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;\n}\nfunction hydrateKeyframes(options) {\n if (Array.isArray(options.to) && options.to[0] === null) {\n options.to = __spreadArray([], __read(options.to), false);\n options.to[0] = options.from;\n }\n return options;\n}\nfunction getPopmotionAnimationOptions(transition, options, key) {\n var _a;\n if (Array.isArray(options.to)) {\n (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8);\n }\n hydrateKeyframes(options);\n /**\n * Get a default transition if none is determined to be defined.\n */\n if (!isTransitionDefined(transition)) {\n transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to));\n }\n return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition));\n}\n/**\n *\n */\nfunction getAnimation(key, value, target, transition, onComplete) {\n var _a;\n var valueTransition = getValueTransition(transition, key);\n var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();\n var isTargetAnimatable = isAnimatable(key, target);\n if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\") {\n /**\n * If we're trying to animate from \"none\", try and get an animatable version\n * of the target. This could be improved to work both ways.\n */\n origin = getAnimatableNone(key, target);\n }\n else if (isZero(origin) && typeof target === \"string\") {\n origin = getZeroUnit(target);\n }\n else if (!Array.isArray(target) &&\n isZero(target) &&\n typeof origin === \"string\") {\n target = getZeroUnit(origin);\n }\n var isOriginAnimatable = isAnimatable(key, origin);\n warning(isOriginAnimatable === isTargetAnimatable, \"You are trying to animate \".concat(key, \" from \\\"\").concat(origin, \"\\\" to \\\"\").concat(target, \"\\\". \").concat(origin, \" is not an animatable value - to enable this animation set \").concat(origin, \" to a value animatable to \").concat(target, \" via the `style` property.\"));\n function start() {\n var options = {\n from: origin,\n to: target,\n velocity: value.getVelocity(),\n onComplete: onComplete,\n onUpdate: function (v) { return value.set(v); },\n };\n return valueTransition.type === \"inertia\" ||\n valueTransition.type === \"decay\"\n ? inertia(__assign(__assign({}, options), valueTransition))\n : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) {\n var _a;\n options.onUpdate(v);\n (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);\n }, onComplete: function () {\n var _a;\n options.onComplete();\n (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n } }));\n }\n function set() {\n var _a, _b;\n var finalTarget = resolveFinalValueInKeyframes(target);\n value.set(finalTarget);\n onComplete();\n (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);\n (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);\n return { stop: function () { } };\n }\n return !isOriginAnimatable ||\n !isTargetAnimatable ||\n valueTransition.type === false\n ? set\n : start;\n}\nfunction isZero(value) {\n return (value === 0 ||\n (typeof value === \"string\" &&\n parseFloat(value) === 0 &&\n value.indexOf(\" \") === -1));\n}\nfunction getZeroUnit(potentialUnitType) {\n return typeof potentialUnitType === \"number\"\n ? 0\n : getAnimatableNone(\"\", potentialUnitType);\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n/**\n * Start animation on a MotionValue. This function is an interface between\n * Framer Motion and Popmotion\n */\nfunction startAnimation(key, value, target, transition) {\n if (transition === void 0) { transition = {}; }\n if (instantAnimationState.current) {\n transition = { type: false };\n }\n return value.start(function (onComplete) {\n var delayTimer;\n var controls;\n var animation = getAnimation(key, value, target, transition, onComplete);\n var delay = getDelayFromTransition(transition, key);\n var start = function () { return (controls = animation()); };\n if (delay) {\n delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));\n }\n else {\n start();\n }\n return function () {\n clearTimeout(delayTimer);\n controls === null || controls === void 0 ? void 0 : controls.stop();\n };\n });\n}\n\nexport { convertTransitionToAnimationOptions, getDelayFromTransition, getPopmotionAnimationOptions, getValueTransition, getZeroUnit, hydrateKeyframes, isTransitionDefined, isZero, startAnimation };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nvar secondsToMilliseconds = function (seconds) { return seconds * 1000; };\n\nexport { secondsToMilliseconds };\n","import { __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\n\nvar easingLookup = {\n linear: linear,\n easeIn: easeIn,\n easeInOut: easeInOut,\n easeOut: easeOut,\n circIn: circIn,\n circInOut: circInOut,\n circOut: circOut,\n backIn: backIn,\n backInOut: backInOut,\n backOut: backOut,\n anticipate: anticipate,\n bounceIn: bounceIn,\n bounceInOut: bounceInOut,\n bounceOut: bounceOut,\n};\nvar easingDefinitionToFunction = function (definition) {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, \"Invalid easing type '\".concat(definition, \"'\"));\n return easingLookup[definition];\n }\n return definition;\n};\nvar isEasingArray = function (ease) {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { easingDefinitionToFunction, isEasingArray };\n","import { complex } from 'style-value-types';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nvar isAnimatable = function (key, value) {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n complex.test(value) && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { __assign } from 'tslib';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\nvar underDampedSpring = function () { return ({\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n}); };\nvar criticallyDampedSpring = function (to) { return ({\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n}); };\nvar linearTween = function () { return ({\n type: \"keyframes\",\n ease: \"linear\",\n duration: 0.3,\n}); };\nvar keyframes = function (values) { return ({\n type: \"keyframes\",\n duration: 0.8,\n values: values,\n}); };\nvar defaultTransitions = {\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: criticallyDampedSpring,\n scaleY: criticallyDampedSpring,\n scale: criticallyDampedSpring,\n opacity: linearTween,\n backgroundColor: linearTween,\n color: linearTween,\n default: criticallyDampedSpring,\n};\nvar getDefaultTransition = function (valueKey, to) {\n var transitionFactory;\n if (isKeyframesTarget(to)) {\n transitionFactory = keyframes;\n }\n else {\n transitionFactory =\n defaultTransitions[valueKey] || defaultTransitions.default;\n }\n return __assign({ to: to }, transitionFactory(to));\n};\n\nexport { criticallyDampedSpring, getDefaultTransition, linearTween, underDampedSpring };\n","import { __assign } from 'tslib';\nimport { color, filter } from 'style-value-types';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nvar defaultValueTypes = __assign(__assign({}, numberValueTypes), { \n // Color props\n color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, \n // Border props\n borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter });\n/**\n * Gets the default ValueType for the provided value key\n */\nvar getDefaultValueType = function (key) { return defaultValueTypes[key]; };\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { filter, complex } from 'style-value-types';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n var _a;\n var defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);\n}\n\nexport { getAnimatableNone };\n","var instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { complex } from 'style-value-types';\nimport { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n var resolved = resolveVariant(visualElement, definition);\n var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, [\"transitionEnd\", \"transition\"]);\n target = __assign(__assign({}, target), transitionEnd);\n for (var key in target) {\n var value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n var reversedLabels = __spreadArray([], __read(variantLabels), false).reverse();\n reversedLabels.forEach(function (key) {\n var _a;\n var variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n setVariants(child, variantLabels);\n });\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b, _c;\n var _d;\n var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); });\n var numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (var i = 0; i < numNewValues; i++) {\n var key = newValueKeys[i];\n var targetValue = target[key];\n var value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n if (value === undefined || value === null)\n continue;\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n visualElement.addValue(key, motionValue(value));\n (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value);\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n var valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n var _a, _b;\n var origin = {};\n for (var key in target) {\n origin[key] =\n (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nvar isNumericalString = function (v) { return /^\\-?\\d*\\.?\\d+$/.test(v); };\n\nexport { isNumericalString };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nvar isZeroValueString = function (v) { return /^0[^.\\s]+$/.test(v); };\n\nexport { isZeroValueString };\n","import { __read } from 'tslib';\n\nfunction addUniqueItem(arr, item) {\n arr.indexOf(item) === -1 && arr.push(item);\n}\nfunction removeItem(arr, item) {\n var index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem(_a, fromIndex, toIndex) {\n var _b = __read(_a), arr = _b.slice(0);\n var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n var _c = __read(arr.splice(fromIndex, 1), 1), item = _c[0];\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nvar SubscriptionManager = /** @class */ (function () {\n function SubscriptionManager() {\n this.subscriptions = [];\n }\n SubscriptionManager.prototype.add = function (handler) {\n var _this = this;\n addUniqueItem(this.subscriptions, handler);\n return function () { return removeItem(_this.subscriptions, handler); };\n };\n SubscriptionManager.prototype.notify = function (a, b, c) {\n var numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (var i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n var handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n };\n SubscriptionManager.prototype.getSize = function () {\n return this.subscriptions.length;\n };\n SubscriptionManager.prototype.clear = function () {\n this.subscriptions.length = 0;\n };\n return SubscriptionManager;\n}());\n\nexport { SubscriptionManager };\n","import sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond } from 'popmotion';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\n\nvar isFloat = function (value) {\n return !isNaN(parseFloat(value));\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nvar MotionValue = /** @class */ (function () {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n function MotionValue(init) {\n var _this = this;\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"6.5.1\";\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n this.lastUpdated = 0;\n /**\n * Functions to notify when the `MotionValue` updates.\n *\n * @internal\n */\n this.updateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the velocity updates.\n *\n * @internal\n */\n this.velocityUpdateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the `MotionValue` updates and `render` is set to `true`.\n *\n * @internal\n */\n this.renderSubscribers = new SubscriptionManager();\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n this.updateAndNotify = function (v, render) {\n if (render === void 0) { render = true; }\n _this.prev = _this.current;\n _this.current = v;\n // Update timestamp\n var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp;\n if (_this.lastUpdated !== timestamp) {\n _this.timeDelta = delta;\n _this.lastUpdated = timestamp;\n sync.postRender(_this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (_this.prev !== _this.current) {\n _this.updateSubscribers.notify(_this.current);\n }\n // Update velocity subscribers\n if (_this.velocityUpdateSubscribers.getSize()) {\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n // Update render subscribers\n if (render) {\n _this.renderSubscribers.notify(_this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.scheduleVelocityCheck = function () { return sync.postRender(_this.velocityCheck); };\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.velocityCheck = function (_a) {\n var timestamp = _a.timestamp;\n if (timestamp !== _this.lastUpdated) {\n _this.prev = _this.current;\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.onChange(updateOpacity)\n * const unsubscribeY = y.onChange(updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @privateRemarks\n *\n * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.\n *\n * ```jsx\n * useOnChange(x, () => {})\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @public\n */\n MotionValue.prototype.onChange = function (subscription) {\n return this.updateSubscribers.add(subscription);\n };\n MotionValue.prototype.clearListeners = function () {\n this.updateSubscribers.clear();\n };\n /**\n * Adds a function that will be notified when the `MotionValue` requests a render.\n *\n * @param subscriber - A function that's provided the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @internal\n */\n MotionValue.prototype.onRenderRequest = function (subscription) {\n // Render immediately\n subscription(this.get());\n return this.renderSubscribers.add(subscription);\n };\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n MotionValue.prototype.attach = function (passiveEffect) {\n this.passiveEffect = passiveEffect;\n };\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n MotionValue.prototype.set = function (v, render) {\n if (render === void 0) { render = true; }\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n };\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n MotionValue.prototype.get = function () {\n return this.current;\n };\n /**\n * @public\n */\n MotionValue.prototype.getPrevious = function () {\n return this.prev;\n };\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n MotionValue.prototype.getVelocity = function () {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity\n ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prev), this.timeDelta)\n : 0;\n };\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n MotionValue.prototype.start = function (animation) {\n var _this = this;\n this.stop();\n return new Promise(function (resolve) {\n _this.hasAnimated = true;\n _this.stopAnimation = animation(resolve);\n }).then(function () { return _this.clearAnimation(); });\n };\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n MotionValue.prototype.stop = function () {\n if (this.stopAnimation)\n this.stopAnimation();\n this.clearAnimation();\n };\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n MotionValue.prototype.isAnimating = function () {\n return !!this.stopAnimation;\n };\n MotionValue.prototype.clearAnimation = function () {\n this.stopAnimation = null;\n };\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n MotionValue.prototype.destroy = function () {\n this.updateSubscribers.clear();\n this.renderSubscribers.clear();\n this.stop();\n };\n return MotionValue;\n}());\nfunction motionValue(init) {\n return new MotionValue(init);\n}\n\nexport { MotionValue, motionValue };\n","import { __spreadArray, __read } from 'tslib';\nimport { color, complex } from 'style-value-types';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nvar valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes), false), [color, complex], false);\n/**\n * Tests a value against the list of ValueTypes\n */\nvar findValueType = function (v) { return valueTypes.find(testValueType(v)); };\n\nexport { findValueType };\n","/**\n * Tests a provided value against a ValueType\n */\nvar testValueType = function (v) { return function (type) { return type.test(v); }; };\n\nexport { testValueType };\n","/**\n * ValueType for \"auto\"\n */\nvar auto = {\n test: function (v) { return v === \"auto\"; },\n parse: function (v) { return v; },\n};\n\nexport { auto };\n","import { number, px, percent, degrees, vw, vh } from 'style-value-types';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nvar findDimensionValueType = function (v) {\n return dimensionValueTypes.find(testValueType(v));\n};\n\nexport { dimensionValueTypes, findDimensionValueType };\n","import { useEffect } from 'react';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * A hook that allows an element to be dragged.\n *\n * @internal\n */\nfunction useDrag(props) {\n var groupDragControls = props.dragControls, visualElement = props.visualElement;\n var dragControls = useConstant(function () { return new VisualElementDragControls(visualElement); });\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls, groupDragControls]);\n // Apply the event listeners to the element\n useEffect(function () { return dragControls.addListeners(); }, [dragControls]);\n}\n\nexport { useDrag };\n","import { __assign } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { PanSession } from '../PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/use-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\n\nvar elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: AnyPointerEvent\nvar VisualElementDragControls = /** @class */ (function () {\n function VisualElementDragControls(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n VisualElementDragControls.prototype.start = function (originEvent, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.snapToCursor, snapToCursor = _c === void 0 ? false : _c;\n /**\n * Don't start dragging if this component is exiting\n */\n if (this.visualElement.isPresent === false)\n return;\n var onSessionStart = function (event) {\n // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n _this.stopAnimation();\n if (snapToCursor) {\n _this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n var onStart = function (event, info) {\n var _a;\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n var _b = _this.getProps(), drag = _b.drag, dragPropagation = _b.dragPropagation, onDragStart = _b.onDragStart;\n if (drag && !dragPropagation) {\n if (_this.openGlobalLock)\n _this.openGlobalLock();\n _this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!_this.openGlobalLock)\n return;\n }\n _this.isDragging = true;\n _this.currentDirection = null;\n _this.resolveConstraints();\n if (_this.visualElement.projection) {\n _this.visualElement.projection.isAnimationBlocked = true;\n _this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis(function (axis) {\n var _a, _b;\n var current = _this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];\n if (measuredAxis) {\n var length_1 = calcLength(measuredAxis);\n current = length_1 * (parseFloat(current) / 100);\n }\n }\n _this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);\n (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Drag, true);\n };\n var onMove = function (event, info) {\n // latestPointerEvent = event\n var _a = _this.getProps(), dragPropagation = _a.dragPropagation, dragDirectionLock = _a.dragDirectionLock, onDirectionLock = _a.onDirectionLock, onDrag = _a.onDrag;\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !_this.openGlobalLock)\n return;\n var offset = info.offset;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && _this.currentDirection === null) {\n _this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (_this.currentDirection !== null) {\n onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n _this.updateAxis(\"x\", info.point, offset);\n _this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n _this.visualElement.syncRender();\n /**\n * This must fire after the syncRender call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);\n };\n var onSessionEnd = function (event, info) {\n return _this.stop(event, info);\n };\n this.panSession = new PanSession(originEvent, {\n onSessionStart: onSessionStart,\n onStart: onStart,\n onMove: onMove,\n onSessionEnd: onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n };\n VisualElementDragControls.prototype.stop = function (event, info) {\n var isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n var velocity = info.velocity;\n this.startAnimation(velocity);\n var onDragEnd = this.getProps().onDragEnd;\n onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);\n };\n VisualElementDragControls.prototype.cancel = function () {\n var _a, _b;\n this.isDragging = false;\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = false;\n }\n (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();\n this.panSession = undefined;\n var dragPropagation = this.getProps().dragPropagation;\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(AnimationType.Drag, false);\n };\n VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) {\n var drag = this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n var axisValue = this.getAxisMotionValue(axis);\n var next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n };\n VisualElementDragControls.prototype.resolveConstraints = function () {\n var _this = this;\n var _a = this.getProps(), dragConstraints = _a.dragConstraints, dragElastic = _a.dragElastic;\n var layout = (this.visualElement.projection || {}).layout;\n var prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis(function (axis) {\n if (_this.getAxisMotionValue(axis)) {\n _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);\n }\n });\n }\n };\n VisualElementDragControls.prototype.resolveRefConstraints = function () {\n var _a = this.getProps(), constraints = _a.dragConstraints, onMeasureDragConstraints = _a.onMeasureDragConstraints;\n if (!constraints || !isRefObject(constraints))\n return false;\n var constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n var projection = this.visualElement.projection;\n // TODO\n if (!projection || !projection.layout)\n return false;\n var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n };\n VisualElementDragControls.prototype.startAnimation = function (velocity) {\n var _this = this;\n var _a = this.getProps(), drag = _a.drag, dragMomentum = _a.dragMomentum, dragElastic = _a.dragElastic, dragTransition = _a.dragTransition, dragSnapToOrigin = _a.dragSnapToOrigin, onDragTransitionEnd = _a.onDragTransitionEnd;\n var constraints = this.constraints || {};\n var momentumAnimations = eachAxis(function (axis) {\n var _a;\n if (!shouldDrag(axis, drag, _this.currentDirection)) {\n return;\n }\n var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n var bounceStiffness = dragElastic ? 200 : 1000000;\n var bounceDamping = dragElastic ? 40 : 10000000;\n var inertia = __assign(__assign({ type: \"inertia\", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness, bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return _this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n };\n VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {\n var axisValue = this.getAxisMotionValue(axis);\n return startAnimation(axis, axisValue, 0, transition);\n };\n VisualElementDragControls.prototype.stopAnimation = function () {\n var _this = this;\n eachAxis(function (axis) { return _this.getAxisMotionValue(axis).stop(); });\n };\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {\n var _a, _b;\n var dragKey = \"_drag\" + axis.toUpperCase();\n var externalMotionValue = this.visualElement.getProps()[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);\n };\n VisualElementDragControls.prototype.snapToCursor = function (point) {\n var _this = this;\n eachAxis(function (axis) {\n var drag = _this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, _this.currentDirection))\n return;\n var projection = _this.visualElement.projection;\n var axisValue = _this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n var _a = projection.layout.actual[axis], min = _a.min, max = _a.max;\n axisValue.set(point[axis] - mix(min, max, 0.5));\n }\n });\n };\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n VisualElementDragControls.prototype.scalePositionWithinConstraints = function () {\n var _this = this;\n var _a;\n var _b = this.getProps(), drag = _b.drag, dragConstraints = _b.dragConstraints;\n var projection = this.visualElement.projection;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n var boxProgress = { x: 0, y: 0 };\n eachAxis(function (axis) {\n var axisValue = _this.getAxisMotionValue(axis);\n if (axisValue) {\n var latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, _this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n var transformTemplate = this.visualElement.getProps().transformTemplate;\n this.visualElement.getInstance().style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis(function (axis) {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n var axisValue = _this.getAxisMotionValue(axis);\n var _a = _this.constraints[axis], min = _a.min, max = _a.max;\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n };\n VisualElementDragControls.prototype.addListeners = function () {\n var _this = this;\n var _a;\n elementDragControls.set(this.visualElement, this);\n var element = this.visualElement.getInstance();\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n var stopPointerListener = addPointerEvent(element, \"pointerdown\", function (event) {\n var _a = _this.getProps(), drag = _a.drag, _b = _a.dragListener, dragListener = _b === void 0 ? true : _b;\n drag && dragListener && _this.start(event);\n });\n var measureDragConstraints = function () {\n var dragConstraints = _this.getProps().dragConstraints;\n if (isRefObject(dragConstraints)) {\n _this.constraints = _this.resolveRefConstraints();\n }\n };\n var projection = this.visualElement.projection;\n var stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n var stopResizeListener = addDomEvent(window, \"resize\", function () {\n return _this.scalePositionWithinConstraints();\n });\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n projection.addEventListener(\"didUpdate\", (function (_a) {\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged;\n if (_this.isDragging && hasLayoutChanged) {\n eachAxis(function (axis) {\n var motionValue = _this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n _this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n _this.visualElement.syncRender();\n }\n }));\n return function () {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n };\n };\n VisualElementDragControls.prototype.getProps = function () {\n var props = this.visualElement.getProps();\n var _a = props.drag, drag = _a === void 0 ? false : _a, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e = props.dragElastic, dragElastic = _e === void 0 ? defaultElastic : _e, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;\n return __assign(__assign({}, props), { drag: drag, dragDirectionLock: dragDirectionLock, dragPropagation: dragPropagation, dragConstraints: dragConstraints, dragElastic: dragElastic, dragMomentum: dragMomentum });\n };\n return VisualElementDragControls;\n}());\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold) {\n if (lockThreshold === void 0) { lockThreshold = 10; }\n var direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { __assign } from 'tslib';\nimport { isMouseEvent, isTouchEvent } from './utils/event-type.mjs';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { secondsToMilliseconds } from '../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { distance, pipe } from 'popmotion';\n\n/**\n * @internal\n */\nvar PanSession = /** @class */ (function () {\n function PanSession(event, handlers, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint;\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n this.updatePoint = function () {\n if (!(_this.lastMoveEvent && _this.lastMoveEventInfo))\n return;\n var info = getPanInfo(_this.lastMoveEventInfo, _this.history);\n var isPanStarted = _this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n var point = info.point;\n var timestamp = getFrameData().timestamp;\n _this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));\n var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;\n if (!isPanStarted) {\n onStart && onStart(_this.lastMoveEvent, info);\n _this.startEvent = _this.lastMoveEvent;\n }\n onMove && onMove(_this.lastMoveEvent, info);\n };\n this.handlePointerMove = function (event, info) {\n _this.lastMoveEvent = event;\n _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);\n // Because Safari doesn't trigger mouseup events when it's above a `<select>`\n if (isMouseEvent(event) && event.buttons === 0) {\n _this.handlePointerUp(event, info);\n return;\n }\n // Throttle mouse move event to once per frame\n sync.update(_this.updatePoint, true);\n };\n this.handlePointerUp = function (event, info) {\n _this.end();\n var _a = _this.handlers, onEnd = _a.onEnd, onSessionEnd = _a.onSessionEnd;\n var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);\n if (_this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (isTouchEvent(event) && event.touches.length > 1)\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n var info = extractEventInfo(event);\n var initialInfo = transformPoint(info, this.transformPagePoint);\n var point = initialInfo.point;\n var timestamp = getFrameData().timestamp;\n this.history = [__assign(__assign({}, point), { timestamp: timestamp })];\n var onSessionStart = handlers.onSessionStart;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n PanSession.prototype.updateHandlers = function (handlers) {\n this.handlers = handlers;\n };\n PanSession.prototype.end = function () {\n this.removeListeners && this.removeListeners();\n cancelSync.update(this.updatePoint);\n };\n return PanSession;\n}());\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo(_a, history) {\n var point = _a.point;\n return {\n point: point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n var i = history.length - 1;\n var timestampedPoint = null;\n var lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n var currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { __read } from 'tslib';\nimport { clamp, mix, progress } from 'popmotion';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, _a, elastic) {\n var min = _a.min, max = _a.max;\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, _a) {\n var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n var _a;\n var min = constraintsAxis.min - layoutAxis.min;\n var max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n _a = __read([max, min], 2), min = _a[0], max = _a[1];\n }\n return { min: min, max: max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n var origin = 0.5;\n var sourceLength = calcLength(source);\n var targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n var relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nvar defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic) {\n if (dragElastic === void 0) { dragElastic = defaultElastic; }\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n var _a;\n return typeof dragElastic === \"number\"\n ? dragElastic\n : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","import { mix, distance } from 'popmotion';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return distance(value, target) < maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin) {\n if (origin === void 0) { origin = 0.5; }\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);\n calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","var createAxisDelta = function () { return ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n}); };\nvar createDelta = function () { return ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n}); };\nvar createAxis = function () { return ({ min: 0, max: 0 }); };\nvar createBox = function () { return ({\n x: createAxis(),\n y: createAxis(),\n}); };\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox(_a) {\n var top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox(_a) {\n var x = _a.x, y = _a.y;\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n var topLeft = transformPoint({ x: point.left, y: point.top });\n var bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n var distanceFromOrigin = point - originPoint;\n var scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate, scale, originPoint, boxScale) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, _a) {\n var x = _a.x, y = _a.y;\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {\n var _a, _b;\n if (isSharedTransition === void 0) { isSharedTransition = false; }\n var treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n var node;\n var delta;\n for (var i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === \"contents\")\n continue;\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, { x: -node.scroll.x, y: -node.scroll.y });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, _a) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n var originPoint = mix(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale(_a) {\n var scale = _a.scale, scaleX = _a.scaleX, scaleY = _a.scaleY;\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n hasTranslate(values.x) ||\n hasTranslate(values.y) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction hasTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { hasScale, hasTransform };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n var viewportBox = measureViewportBox(element, transformPagePoint);\n var scroll = rootProjectionNode.scroll;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.x);\n translateAxis(viewportBox.y, scroll.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { useRef, useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { PanSession } from './PanSession.mjs';\n\n/**\n *\n * @param handlers -\n * @param ref -\n *\n * @privateRemarks\n * Currently this sets new pan gesture functions every render. The memo route has been explored\n * in the past but ultimately we're still creating new functions every render. An optimisation\n * to explore is creating the pan gestures and loading them into a `ref`.\n *\n * @internal\n */\nfunction usePanGesture(_a) {\n var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd, onPanSessionStart = _a.onPanSessionStart, visualElement = _a.visualElement;\n var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;\n var panSession = useRef(null);\n var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n var handlers = {\n onSessionStart: onPanSessionStart,\n onStart: onPanStart,\n onMove: onPan,\n onEnd: function (event, info) {\n panSession.current = null;\n onPanEnd && onPanEnd(event, info);\n },\n };\n useEffect(function () {\n if (panSession.current !== null) {\n panSession.current.updateHandlers(handlers);\n }\n });\n function onPointerDown(event) {\n panSession.current = new PanSession(event, handlers, {\n transformPagePoint: transformPagePoint,\n });\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPanEvents && onPointerDown);\n useUnmountEffect(function () { return panSession.current && panSession.current.end(); });\n}\n\nexport { usePanGesture };\n","import { useDrag } from '../../gestures/drag/use-drag.mjs';\nimport { usePanGesture } from '../../gestures/use-pan-gesture.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar drag = {\n pan: makeRenderlessComponent(usePanGesture),\n drag: makeRenderlessComponent(useDrag),\n};\n\nexport { drag };\n","import { __rest, __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariable } from '../dom/utils/is-css-variable.mjs';\nimport { parseDomVariant } from '../dom/utils/parse-dom-variant.mjs';\nimport { isTransformProp } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nvar htmlConfig = {\n treeType: \"dom\",\n readValueFromInstance: function (domElement, key) {\n if (isTransformProp(key)) {\n var defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n var computedStyle = getComputedStyle(domElement);\n return ((isCSSVariable(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0);\n }\n },\n sortNodePosition: function (a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n },\n getBaseTarget: function (props, key) {\n var _a;\n return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];\n },\n measureViewportBox: function (element, _a) {\n var transformPagePoint = _a.transformPagePoint;\n return measureViewportBox(element, transformPagePoint);\n },\n /**\n * Reset the transform on the current Element. This is called as part\n * of a batched process across the entire layout tree. To remove this write\n * cycle it'd be interesting to see if it's possible to \"undo\" all the current\n * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms\n * works\n */\n resetTransform: function (element, domElement, props) {\n var transformTemplate = props.transformTemplate;\n domElement.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n // Ensure that whatever happens next, we restore our transform on the next frame\n element.scheduleRender();\n },\n restoreTransform: function (instance, mutableState) {\n instance.style.transform = mutableState.style.transform;\n },\n removeValueFromRenderState: function (key, _a) {\n var vars = _a.vars, style = _a.style;\n delete vars[key];\n delete style[key];\n },\n /**\n * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`\n * can be animated by Motion.\n */\n makeTargetAnimatable: function (element, _a, _b, isMounted) {\n var transformValues = _b.transformValues;\n if (isMounted === void 0) { isMounted = true; }\n var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, [\"transition\", \"transitionEnd\"]);\n var origin = getOrigin(target, transition || {}, element);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n if (transformValues) {\n if (transitionEnd)\n transitionEnd = transformValues(transitionEnd);\n if (target)\n target = transformValues(target);\n if (origin)\n origin = transformValues(origin);\n }\n if (isMounted) {\n checkTargetForNewValues(element, target, origin);\n var parsed = parseDomVariant(element, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return __assign({ transition: transition, transitionEnd: transitionEnd }, target);\n },\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n build: function (element, renderState, latestValues, options, props) {\n if (element.isVisible !== undefined) {\n renderState.style.visibility = element.isVisible\n ? \"visible\"\n : \"hidden\";\n }\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n },\n render: renderHTML,\n};\nvar htmlVisualElement = visualElement(htmlConfig);\n\nexport { getComputedStyle, htmlConfig, htmlVisualElement };\n","import { __assign, __spreadArray, __read } from 'tslib';\nimport sync, { cancelSync } from 'framesync';\nimport { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { variantPriorityOrder } from './utils/animation-state.mjs';\nimport { createLifecycles } from './utils/lifecycles.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel } from './utils/variants.mjs';\n\nvar visualElement = function (_a) {\n var _b = _a.treeType, treeType = _b === void 0 ? \"\" : _b, build = _a.build, getBaseTarget = _a.getBaseTarget, makeTargetAnimatable = _a.makeTargetAnimatable, measureViewportBox = _a.measureViewportBox, renderInstance = _a.render, readValueFromInstance = _a.readValueFromInstance, removeValueFromRenderState = _a.removeValueFromRenderState, sortNodePosition = _a.sortNodePosition, scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;\n return function (_a, options) {\n var parent = _a.parent, props = _a.props, presenceId = _a.presenceId, blockInitialAnimation = _a.blockInitialAnimation, visualState = _a.visualState, shouldReduceMotion = _a.shouldReduceMotion;\n if (options === void 0) { options = {}; }\n var isMounted = false;\n var latestValues = visualState.latestValues, renderState = visualState.renderState;\n /**\n * The instance of the render-specific node that will be hydrated by the\n * exposed React ref. So for example, this visual element can host a\n * HTMLElement, plain object, or Three.js object. The functions provided\n * in VisualElementConfig allow us to interface with this instance.\n */\n var instance;\n /**\n * Manages the subscriptions for a visual element's lifecycle, for instance\n * onRender\n */\n var lifecycles = createLifecycles();\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n var values = new Map();\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n var valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n var prevMotionValues = {};\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n var baseTarget = __assign({}, latestValues);\n // Internal methods ========================\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n var removeFromVariantTree;\n /**\n * Render the element with the latest styles outside of the React\n * render lifecycle\n */\n function render() {\n if (!instance || !isMounted)\n return;\n triggerBuild();\n renderInstance(instance, renderState, props.style, element.projection);\n }\n function triggerBuild() {\n build(element, renderState, latestValues, options, props);\n }\n function update() {\n lifecycles.notifyUpdate(latestValues);\n }\n /**\n *\n */\n function bindToMotionValue(key, value) {\n var removeOnChange = value.onChange(function (latestValue) {\n latestValues[key] = latestValue;\n props.onUpdate && sync.update(update, false, true);\n });\n var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);\n valueSubscriptions.set(key, function () {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n var initialMotionValues = scrapeMotionValuesFromProps(props);\n for (var key in initialMotionValues) {\n var value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n var element = __assign(__assign({ treeType: treeType, \n /**\n * This is a mirror of the internal instance prop, which keeps\n * VisualElement type-compatible with React's RefObject.\n */\n current: null, \n /**\n * The depth of this visual element within the visual element tree.\n */\n depth: parent ? parent.depth + 1 : 0, parent: parent, children: new Set(), \n /**\n *\n */\n presenceId: presenceId, shouldReduceMotion: shouldReduceMotion, \n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren: isVariantNode ? new Set() : undefined, \n /**\n * Whether this instance is visible. This can be changed imperatively\n * by the projection tree, is analogous to CSS's visibility in that\n * hidden elements should take up layout, and needs enacting by the configured\n * render function.\n */\n isVisible: undefined, \n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()), \n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: blockInitialAnimation, \n /**\n * Determine whether this component has mounted yet. This is mostly used\n * by variant children to determine whether they need to trigger their\n * own animations on mount.\n */\n isMounted: function () { return Boolean(instance); }, mount: function (newInstance) {\n isMounted = true;\n instance = element.current = newInstance;\n if (element.projection) {\n element.projection.mount(newInstance);\n }\n if (isVariantNode && parent && !isControllingVariants) {\n removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);\n }\n values.forEach(function (value, key) { return bindToMotionValue(key, value); });\n parent === null || parent === void 0 ? void 0 : parent.children.add(element);\n element.setProps(props);\n }, \n /**\n *\n */\n unmount: function () {\n var _a;\n (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();\n cancelSync.update(update);\n cancelSync.render(render);\n valueSubscriptions.forEach(function (remove) { return remove(); });\n removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();\n parent === null || parent === void 0 ? void 0 : parent.children.delete(element);\n lifecycles.clearAllListeners();\n instance = undefined;\n isMounted = false;\n }, \n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild: function (child) {\n var _a;\n var closestVariantNode = element.getClosestVariantNode();\n if (closestVariantNode) {\n (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);\n return function () {\n return closestVariantNode.variantChildren.delete(child);\n };\n }\n }, sortNodePosition: function (other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!sortNodePosition || treeType !== other.treeType)\n return 0;\n return sortNodePosition(element.getInstance(), other.getInstance());\n }, \n /**\n * Returns the closest variant node in the tree starting from\n * this visual element.\n */\n getClosestVariantNode: function () {\n return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();\n }, \n /**\n * Expose the latest layoutId prop.\n */\n getLayoutId: function () { return props.layoutId; }, \n /**\n * Returns the current instance.\n */\n getInstance: function () { return instance; }, \n /**\n * Get/set the latest static values.\n */\n getStaticValue: function (key) { return latestValues[key]; }, setStaticValue: function (key, value) { return (latestValues[key] = value); }, \n /**\n * Returns the latest motion value state. Currently only used to take\n * a snapshot of the visual element - perhaps this can return the whole\n * visual state\n */\n getLatestValues: function () { return latestValues; }, \n /**\n * Set the visiblity of the visual element. If it's changed, schedule\n * a render to reflect these changes.\n */\n setVisibility: function (visibility) {\n if (element.isVisible === visibility)\n return;\n element.isVisible = visibility;\n element.scheduleRender();\n }, \n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable: function (target, canMutate) {\n if (canMutate === void 0) { canMutate = true; }\n return makeTargetAnimatable(element, target, props, canMutate);\n }, \n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox: function () {\n return measureViewportBox(instance, props);\n }, \n // Motion values ========================\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue: function (key, value) {\n // Remove existing value if it exists\n if (element.hasValue(key))\n element.removeValue(key);\n values.set(key, value);\n latestValues[key] = value.get();\n bindToMotionValue(key, value);\n }, \n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue: function (key) {\n var _a;\n values.delete(key);\n (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();\n valueSubscriptions.delete(key);\n delete latestValues[key];\n removeValueFromRenderState(key, renderState);\n }, \n /**\n * Check whether we have a motion value for this key\n */\n hasValue: function (key) { return values.has(key); }, \n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue: function (key, defaultValue) {\n var value = values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue);\n element.addValue(key, value);\n }\n return value;\n }, \n /**\n * Iterate over our motion values.\n */\n forEachValue: function (callback) { return values.forEach(callback); }, \n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue: function (key) {\n var _a;\n return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);\n }, \n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget: function (key, value) {\n baseTarget[key] = value;\n }, \n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget: function (key) {\n if (getBaseTarget) {\n var target = getBaseTarget(props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n }\n return baseTarget[key];\n } }, lifecycles), { \n /**\n * Build the renderer state based on the latest visual state.\n */\n build: function () {\n triggerBuild();\n return renderState;\n }, \n /**\n * Schedule a render on the next animation frame.\n */\n scheduleRender: function () {\n sync.render(render, false, true);\n }, \n /**\n * Synchronously fire render. It's prefered that we batch renders but\n * in many circumstances, like layout measurement, we need to run this\n * synchronously. However in those instances other measures should be taken\n * to batch reads/writes.\n */\n syncRender: render, \n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n setProps: function (newProps) {\n if (newProps.transformTemplate || props.transformTemplate) {\n element.scheduleRender();\n }\n props = newProps;\n lifecycles.updatePropListeners(newProps);\n prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);\n }, getProps: function () { return props; }, \n // Variants ==============================\n /**\n * Returns the variant definition with a given name.\n */\n getVariant: function (name) { var _a; return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; }, \n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition: function () { return props.transition; }, getTransformPagePoint: function () {\n return props.transformPagePoint;\n }, \n /**\n * Used by child variant nodes to get the closest ancestor variant props.\n */\n getVariantContext: function (startAtParent) {\n if (startAtParent === void 0) { startAtParent = false; }\n if (startAtParent)\n return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();\n if (!isControllingVariants) {\n var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};\n if (props.initial !== undefined) {\n context_1.initial = props.initial;\n }\n return context_1;\n }\n var context = {};\n for (var i = 0; i < numVariantProps; i++) {\n var name_1 = variantProps[i];\n var prop = props[name_1];\n if (isVariantLabel(prop) || prop === false) {\n context[name_1] = prop;\n }\n }\n return context;\n } });\n return element;\n };\n};\nvar variantProps = __spreadArray([\"initial\"], __read(variantPriorityOrder), false);\nvar numVariantProps = variantProps.length;\n\nexport { visualElement };\n","import { __spreadArray, __read } from 'tslib';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\n\nvar names = [\n \"LayoutMeasure\",\n \"BeforeLayoutMeasure\",\n \"LayoutUpdate\",\n \"ViewportBoxUpdate\",\n \"Update\",\n \"Render\",\n \"AnimationComplete\",\n \"LayoutAnimationComplete\",\n \"AnimationStart\",\n \"LayoutAnimationStart\",\n \"SetAxisTarget\",\n \"Unmount\",\n];\nfunction createLifecycles() {\n var managers = names.map(function () { return new SubscriptionManager(); });\n var propSubscriptions = {};\n var lifecycles = {\n clearAllListeners: function () { return managers.forEach(function (manager) { return manager.clear(); }); },\n updatePropListeners: function (props) {\n names.forEach(function (name) {\n var _a;\n var on = \"on\" + name;\n var propListener = props[on];\n // Unsubscribe existing subscription\n (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);\n // Add new subscription\n if (propListener) {\n propSubscriptions[name] = lifecycles[on](propListener);\n }\n });\n },\n };\n managers.forEach(function (manager, i) {\n lifecycles[\"on\" + names[i]] = function (handler) { return manager.add(handler); };\n lifecycles[\"notify\" + names[i]] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return manager.notify.apply(manager, __spreadArray([], __read(args), false));\n };\n });\n return lifecycles;\n}\n\nexport { createLifecycles };\n","import { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n var _a;\n for (var key in next) {\n var nextValue = next[key];\n var prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"6.5.1\", \"Attempting to mix Framer Motion versions \".concat(nextValue.version, \" with 6.5.1 may not work as expected.\"));\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping to a new motion value, create a new motion value\n * from that\n */\n element.addValue(key, motionValue(nextValue));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n var existingValue = element.getValue(key);\n // TODO: Only update values that aren't being animated or even looked at\n !existingValue.hasAnimated && existingValue.set(nextValue);\n }\n else {\n element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n }\n }\n }\n // Handle removed values\n for (var key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { __rest, __assign, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\n\nfunction isCSSVariable(value) {\n return typeof value === \"string\" && value.startsWith(\"var(--\");\n}\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nvar cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n var match = cssVariableRegex.exec(current);\n if (!match)\n return [,];\n var _a = __read(match, 3), token = _a[1], fallback = _a[2];\n return [token, fallback];\n}\nvar maxDepth = 4;\nfunction getVariableValue(current, element, depth) {\n if (depth === void 0) { depth = 1; }\n invariant(depth <= maxDepth, \"Max CSS variable fallback depth detected in property \\\"\".concat(current, \"\\\". This may indicate a circular fallback dependency.\"));\n var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n var resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n return resolved.trim();\n }\n else if (isCSSVariable(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n }\n else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, _a, transitionEnd) {\n var _b;\n var target = __rest(_a, []);\n var element = visualElement.getInstance();\n if (!(element instanceof Element))\n return { target: target, transitionEnd: transitionEnd };\n // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n if (transitionEnd) {\n transitionEnd = __assign({}, transitionEnd);\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.forEachValue(function (value) {\n var current = value.get();\n if (!isCSSVariable(current))\n return;\n var resolved = getVariableValue(current, element);\n if (resolved)\n value.set(resolved);\n });\n // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n for (var key in target) {\n var current = target[key];\n if (!isCSSVariable(current))\n continue;\n var resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n if (transitionEnd)\n (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : (transitionEnd[key] = current);\n }\n return { target: target, transitionEnd: transitionEnd };\n}\n\nexport { cssVariableRegex, parseCSSVariable, resolveCSSVariables };\n","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\n\nvar positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n]);\nvar isPositionalKey = function (key) { return positionalKeys.has(key); };\nvar hasPositionalKey = function (target) {\n return Object.keys(target).some(isPositionalKey);\n};\nvar setAndResetVelocity = function (value, to) {\n // Looks odd but setting it twice doesn't render, it'll just\n // set both prev and current to the latest value\n value.set(to, false);\n value.set(to);\n};\nvar isNumOrPxType = function (v) {\n return v === number || v === px;\n};\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar getPosFromMatrix = function (matrix, pos) {\n return parseFloat(matrix.split(\", \")[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n return function (_bbox, _a) {\n var transform = _a.transform;\n if (transform === \"none\" || !transform)\n return 0;\n var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n var matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n };\n};\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) { return !transformKeys.has(key); });\nfunction removeNonTranslationalTransform(visualElement) {\n var removedTransforms = [];\n nonTranslationalTransformKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.syncRender();\n return removedTransforms;\n}\nvar positionalValues = {\n // Dimensions\n width: function (_a, _b) {\n var x = _a.x;\n var _c = _b.paddingLeft, paddingLeft = _c === void 0 ? \"0\" : _c, _d = _b.paddingRight, paddingRight = _d === void 0 ? \"0\" : _d;\n return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: function (_a, _b) {\n var y = _a.y;\n var _c = _b.paddingTop, paddingTop = _c === void 0 ? \"0\" : _c, _d = _b.paddingBottom, paddingBottom = _d === void 0 ? \"0\" : _d;\n return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: function (_bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function (_bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function (_a, _b) {\n var y = _a.y;\n var top = _b.top;\n return parseFloat(top) + (y.max - y.min);\n },\n right: function (_a, _b) {\n var x = _a.x;\n var left = _b.left;\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\nvar convertChangedValueTypes = function (target, visualElement, changedKeys) {\n var originBbox = visualElement.measureViewportBox();\n var element = visualElement.getInstance();\n var elementComputedStyle = getComputedStyle(element);\n var display = elementComputedStyle.display;\n var origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach(function (key) {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.syncRender();\n var targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach(function (key) {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n var value = visualElement.getValue(key);\n setAndResetVelocity(value, origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nvar checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {\n if (origin === void 0) { origin = {}; }\n if (transitionEnd === void 0) { transitionEnd = {}; }\n target = __assign({}, target);\n transitionEnd = __assign({}, transitionEnd);\n var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n var removedTransformValues = [];\n var hasAttemptedToRemoveTransformValues = false;\n var changedValueTypeKeys = [];\n targetPositionalKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n var from = origin[key];\n var fromType = findDimensionValueType(from);\n var to = target[key];\n var toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n var numKeyframes = to.length;\n var fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (var i = fromIndex; i < numKeyframes; i++) {\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n var current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n setAndResetVelocity(value, to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n var scrollY_1 = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.syncRender();\n // Restore scroll position\n if (scrollY_1 !== null)\n window.scrollTo({ top: scrollY_1 });\n return { target: convertedTarget, transitionEnd: transitionEnd };\n }\n else {\n return { target: target, transitionEnd: transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target: target, transitionEnd: transitionEnd };\n}\n\nexport { BoundingBoxDimension, positionalValues, unitConversion };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nvar parseDomVariant = function (visualElement, target, origin, transitionEnd) {\n var resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","import { __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { htmlConfig } from '../html/visual-element.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\n\nvar svgVisualElement = visualElement(__assign(__assign({}, htmlConfig), { getBaseTarget: function (props, key) {\n return props[key];\n }, readValueFromInstance: function (domElement, key) {\n var _a;\n if (isTransformProp(key)) {\n return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return domElement.getAttribute(key);\n }, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, build: function (_element, renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);\n }, render: renderSVG }));\n\nexport { svgVisualElement };\n","import { htmlVisualElement } from '../html/visual-element.mjs';\nimport { svgVisualElement } from '../svg/visual-element.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nvar createDomVisualElement = function (Component, options) {\n return isSVGComponent(Component)\n ? svgVisualElement(options, { enableHardwareAcceleration: false })\n : htmlVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { __extends, __assign, __read } from 'tslib';\nimport sync from 'framesync';\nimport React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\n\nvar MeasureLayoutWithContext = /** @class */ (function (_super) {\n __extends(MeasureLayoutWithContext, _super);\n function MeasureLayoutWithContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n MeasureLayoutWithContext.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, switchLayoutGroup = _a.switchLayoutGroup, layoutId = _a.layoutId;\n var projection = visualElement.projection;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.add(projection);\n if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", function () {\n _this.safeToRemove();\n });\n projection.setOptions(__assign(__assign({}, projection.options), { onExitComplete: function () { return _this.safeToRemove(); } }));\n }\n globalProjectionState.hasEverUpdated = true;\n };\n MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) {\n var _this = this;\n var _a = this.props, layoutDependency = _a.layoutDependency, visualElement = _a.visualElement, drag = _a.drag, isPresent = _a.isPresent;\n var projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n sync.postRender(function () {\n var _a;\n if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {\n _this.safeToRemove();\n }\n });\n }\n }\n return null;\n };\n MeasureLayoutWithContext.prototype.componentDidUpdate = function () {\n var projection = this.props.visualElement.projection;\n if (projection) {\n projection.root.didUpdate();\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n }\n };\n MeasureLayoutWithContext.prototype.componentWillUnmount = function () {\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, promoteContext = _a.switchLayoutGroup;\n var projection = visualElement.projection;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n };\n MeasureLayoutWithContext.prototype.safeToRemove = function () {\n var safeToRemove = this.props.safeToRemove;\n safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();\n };\n MeasureLayoutWithContext.prototype.render = function () {\n return null;\n };\n return MeasureLayoutWithContext;\n}(React__default.Component));\nfunction MeasureLayout(props) {\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, __assign({}, props, { layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })));\n}\nvar defaultScaleCorrectors = {\n borderRadius: __assign(__assign({}, correctBorderRadius), { applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ] }),\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { px } from 'style-value-types';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nvar correctBorderRadius = {\n correct: function (latest, node) {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n var x = pixelsToPercent(latest, node.target.x);\n var y = pixelsToPercent(latest, node.target.y);\n return \"\".concat(x, \"% \").concat(y, \"%\");\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from 'popmotion';\nimport { complex } from 'style-value-types';\nimport { cssVariableRegex } from '../../render/dom/utils/css-variables-conversion.mjs';\n\nvar varToken = \"_$css\";\nvar correctBoxShadow = {\n correct: function (latest, _a) {\n var treeScale = _a.treeScale, projectionDelta = _a.projectionDelta;\n var original = latest;\n /**\n * We need to first strip and store CSS variables from the string.\n */\n var containsCSSVariables = latest.includes(\"var(\");\n var cssVariables = [];\n if (containsCSSVariables) {\n latest = latest.replace(cssVariableRegex, function (match) {\n cssVariables.push(match);\n return varToken;\n });\n }\n var shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n var template = complex.createTransformer(latest);\n var offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n var xScale = projectionDelta.x.scale * treeScale.x;\n var yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n var averageScale = mix(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n var output = template(shadow);\n if (containsCSSVariables) {\n var i_1 = 0;\n output = output.replace(varToken, function () {\n var cssVariable = cssVariables[i_1];\n i_1++;\n return cssVariable;\n });\n }\n return output;\n },\n};\n\nexport { correctBoxShadow };\n","import { MeasureLayout } from './MeasureLayout.mjs';\n\nvar layoutFeatures = {\n measureLayout: MeasureLayout,\n};\n\nexport { layoutFeatures };\n","import { __spreadArray, __read, __assign } from 'tslib';\nimport sync, { cancelSync, flushSync } from 'framesync';\nimport { mix } from 'popmotion';\nimport { animate } from '../../animation/animate.mjs';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEquals, isDeltaZero } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale } from '../utils/has-transform.mjs';\nimport { transformAxes } from '../../render/html/utils/transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nvar animationTarget = 1000;\nfunction createProjectionNode(_a) {\n var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, checkIsScrollRoot = _a.checkIsScrollRoot, resetTransform = _a.resetTransform;\n return /** @class */ (function () {\n function ProjectionNode(id, latestValues, parent) {\n var _this = this;\n if (latestValues === void 0) { latestValues = {}; }\n if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); }\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to actually\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n // Note: Currently only running on root node\n this.potentialNodes = new Map();\n this.checkUpdateFailed = function () {\n if (_this.isUpdating) {\n _this.isUpdating = false;\n _this.clearAllSnapshots();\n }\n };\n this.updateProjection = function () {\n _this.nodes.forEach(resolveTargetDelta);\n _this.nodes.forEach(calcProjection);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.id = id;\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? __spreadArray(__spreadArray([], __read(parent.path), false), [parent], false) : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n id && this.root.registerPotentialNode(id, this);\n for (var i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n ProjectionNode.prototype.addEventListener = function (name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n };\n ProjectionNode.prototype.notifyListeners = function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, __spreadArray([], __read(args), false));\n };\n ProjectionNode.prototype.hasListeners = function (name) {\n return this.eventHandlers.has(name);\n };\n ProjectionNode.prototype.registerPotentialNode = function (id, node) {\n this.potentialNodes.set(id, node);\n };\n /**\n * Lifecycles\n */\n ProjectionNode.prototype.mount = function (instance, isLayoutDirty) {\n var _this = this;\n var _a;\n if (isLayoutDirty === void 0) { isLayoutDirty = false; }\n if (this.instance)\n return;\n this.isSVG =\n instance instanceof SVGElement && instance.tagName !== \"svg\";\n this.instance = instance;\n var _b = this.options, layoutId = _b.layoutId, layout = _b.layout, visualElement = _b.visualElement;\n if (visualElement && !visualElement.getInstance()) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);\n this.id && this.root.potentialNodes.delete(this.id);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n var unblockTimeout_1;\n var resizeUnblockUpdate_1 = function () {\n return (_this.root.updateBlockedByResize = false);\n };\n attachResizeListener(instance, function () {\n _this.root.updateBlockedByResize = true;\n clearTimeout(unblockTimeout_1);\n unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n _this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", function (_a) {\n var _b, _c, _d, _e, _f;\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged, hasRelativeTargetChanged = _a.hasRelativeTargetChanged, newLayout = _a.layout;\n if (_this.isTreeAnimationBlocked()) {\n _this.target = undefined;\n _this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;\n var _g = visualElement.getProps(), onLayoutAnimationStart = _g.onLayoutAnimationStart, onLayoutAnimationComplete = _g.onLayoutAnimationComplete;\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n var targetChanged = !_this.targetLayout ||\n !boxEquals(_this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !_this.currentAnimation))) {\n if (_this.resumeFrom) {\n _this.resumingFrom = _this.resumeFrom;\n _this.resumingFrom.resumingFrom = undefined;\n }\n _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, \"layout\")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });\n if (visualElement.shouldReduceMotion) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n _this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged &&\n _this.animationProgress === 0) {\n _this.finishAnimation();\n }\n _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));\n }\n _this.targetLayout = newLayout;\n });\n }\n };\n ProjectionNode.prototype.unmount = function () {\n var _a, _b;\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);\n (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);\n this.instance = undefined;\n cancelSync.preRender(this.updateProjection);\n };\n // only on the root\n ProjectionNode.prototype.blockUpdate = function () {\n this.updateManuallyBlocked = true;\n };\n ProjectionNode.prototype.unblockUpdate = function () {\n this.updateManuallyBlocked = false;\n };\n ProjectionNode.prototype.isUpdateBlocked = function () {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n };\n ProjectionNode.prototype.isTreeAnimationBlocked = function () {\n var _a;\n return (this.isAnimationBlocked ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) ||\n false);\n };\n // Note: currently only running on root node\n ProjectionNode.prototype.startUpdate = function () {\n var _a;\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);\n };\n ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) {\n var _a, _b, _c;\n if (shouldNotifyListeners === void 0) { shouldNotifyListeners = true; }\n if (this.root.isUpdateBlocked()) {\n (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.shouldResetTransform = true;\n /**\n * TODO: Check we haven't updated the scroll\n * since the last didUpdate\n */\n node.updateScroll();\n }\n var _d = this.options, layoutId = _d.layoutId, layout = _d.layout;\n if (layoutId === undefined && !layout)\n return;\n var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;\n this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n };\n // Note: Currently only running on root node\n ProjectionNode.prototype.didUpdate = function () {\n var updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating)\n return;\n this.isUpdating = false;\n /**\n * Search for and mount newly-added projection elements.\n *\n * TODO: Every time a new component is rendered we could search up the tree for\n * the closest mounted node and query from there rather than document.\n */\n if (this.potentialNodes.size) {\n this.potentialNodes.forEach(mountNodeEarly);\n this.potentialNodes.clear();\n }\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n // Flush any scheduled updates\n flushSync.update();\n flushSync.preRender();\n flushSync.render();\n };\n ProjectionNode.prototype.clearAllSnapshots = function () {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n };\n ProjectionNode.prototype.scheduleUpdateProjection = function () {\n sync.preRender(this.updateProjection, false, true);\n };\n ProjectionNode.prototype.scheduleCheckAfterUnmount = function () {\n var _this = this;\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n sync.postRender(function () {\n if (_this.isLayoutDirty) {\n _this.root.didUpdate();\n }\n else {\n _this.root.checkUpdateFailed();\n }\n });\n };\n /**\n * Update measurements\n */\n ProjectionNode.prototype.updateSnapshot = function () {\n if (this.snapshot || !this.instance)\n return;\n var measured = this.measure();\n var layout = this.removeTransform(this.removeElementScroll(measured));\n roundBox(layout);\n this.snapshot = {\n measured: measured,\n layout: layout,\n latestValues: {},\n };\n };\n ProjectionNode.prototype.updateLayout = function () {\n var _a;\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.updateScroll();\n }\n }\n var measured = this.measure();\n roundBox(measured);\n var prevLayout = this.layout;\n this.layout = {\n measured: measured,\n actual: this.removeElementScroll(measured),\n };\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.actual);\n (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);\n };\n ProjectionNode.prototype.updateScroll = function () {\n if (this.options.layoutScroll && this.instance) {\n this.isScrollRoot = checkIsScrollRoot(this.instance);\n this.scroll = measureScroll(this.instance);\n }\n };\n ProjectionNode.prototype.resetTransform = function () {\n var _a;\n if (!resetTransform)\n return;\n var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n };\n ProjectionNode.prototype.measure = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return createBox();\n var box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n var scroll = this.root.scroll;\n if (scroll) {\n translateAxis(box.x, scroll.x);\n translateAxis(box.y, scroll.y);\n }\n return box;\n };\n ProjectionNode.prototype.removeElementScroll = function (box) {\n var boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n var scroll_1 = node.scroll, options = node.options, isScrollRoot = node.isScrollRoot;\n if (node !== this.root && scroll_1 && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (isScrollRoot) {\n copyBoxInto(boxWithoutScroll, box);\n var rootScroll = this.root.scroll;\n /**\n * Undo the application of page scroll that was originally added\n * to the measured bounding box.\n */\n if (rootScroll) {\n translateAxis(boxWithoutScroll.x, -rootScroll.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll_1.x);\n translateAxis(boxWithoutScroll.y, scroll_1.y);\n }\n }\n return boxWithoutScroll;\n };\n ProjectionNode.prototype.applyTransform = function (box, transformOnly) {\n if (transformOnly === void 0) { transformOnly = false; }\n var withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.x,\n y: -node.scroll.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n };\n ProjectionNode.prototype.removeTransform = function (box) {\n var _a;\n var boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n var sourceBox = createBox();\n var nodeBox = node.measure();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n };\n /**\n *\n */\n ProjectionNode.prototype.setTargetDelta = function (delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n };\n ProjectionNode.prototype.setOptions = function (options) {\n var _a;\n this.options = __assign(__assign(__assign({}, this.options), options), { crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true });\n };\n ProjectionNode.prototype.clearMeasurements = function () {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n };\n /**\n * Frame calculations\n */\n ProjectionNode.prototype.resolveTargetDelta = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n // TODO If this is unsuccessful this currently happens every frame\n if (!this.targetDelta && !this.relativeTarget) {\n // TODO: This is a semi-repetition of further down this function, make DRY\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent && this.relativeParent.layout) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.actual);\n }\n else {\n copyBoxInto(this.target, this.layout.actual);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.actual);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent &&\n Boolean(this.relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !this.relativeParent.options.layoutScroll &&\n this.relativeParent.target) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n };\n ProjectionNode.prototype.getClosestProjectingParent = function () {\n if (!this.parent || hasTransform(this.parent.latestValues))\n return undefined;\n if ((this.parent.relativeTarget || this.parent.targetDelta) &&\n this.parent.layout) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n };\n ProjectionNode.prototype.calcProjection = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n var lead = this.getLead();\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.actual);\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);\n var target = lead.target;\n if (!target)\n return;\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n var prevTreeScaleX = this.treeScale.x;\n var prevTreeScaleY = this.treeScale.y;\n var prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n };\n ProjectionNode.prototype.hide = function () {\n this.isVisible = false;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.show = function () {\n this.isVisible = true;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.scheduleRender = function (notifyAll) {\n var _a, _b, _c;\n if (notifyAll === void 0) { notifyAll = true; }\n (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);\n notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n };\n ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) {\n var _this = this;\n var _a;\n if (hasOnlyRelativeTargetChanged === void 0) { hasOnlyRelativeTargetChanged = false; }\n var snapshot = this.snapshot;\n var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};\n var mixedValues = __assign({}, this.latestValues);\n var targetDelta = createDelta();\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n var relativeLayout = createBox();\n var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;\n var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;\n var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n this.mixTargetDelta = function (latest) {\n var _a;\n var progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n _this.setTargetDelta(targetDelta);\n if (_this.relativeTarget &&\n _this.relativeTargetOrigin &&\n _this.layout &&\n ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {\n calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);\n mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);\n }\n if (isSharedLayoutAnimation) {\n _this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n _this.root.scheduleUpdateProjection();\n _this.scheduleRender();\n _this.animationProgress = progress;\n };\n this.mixTargetDelta(0);\n };\n ProjectionNode.prototype.startAnimation = function (options) {\n var _this = this;\n var _a, _b;\n this.notifyListeners(\"animationStart\");\n (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();\n if (this.resumingFrom) {\n (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();\n }\n if (this.pendingAnimation) {\n cancelSync.update(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = sync.update(function () {\n globalProjectionState.hasAnimatedSinceResize = true;\n _this.currentAnimation = animate(0, animationTarget, __assign(__assign({}, options), { onUpdate: function (latest) {\n var _a;\n _this.mixTargetDelta(latest);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);\n }, onComplete: function () {\n var _a;\n (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);\n _this.completeAnimation();\n } }));\n if (_this.resumingFrom) {\n _this.resumingFrom.currentAnimation = _this.currentAnimation;\n }\n _this.pendingAnimation = undefined;\n });\n };\n ProjectionNode.prototype.completeAnimation = function () {\n var _a;\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n };\n ProjectionNode.prototype.finishAnimation = function () {\n var _a;\n if (this.currentAnimation) {\n (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n };\n ProjectionNode.prototype.applyTransformsToTarget = function () {\n var _a = this.getLead(), targetWithTransforms = _a.targetWithTransforms, target = _a.target, layout = _a.layout, latestValues = _a.latestValues;\n if (!targetWithTransforms || !target || !layout)\n return;\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its actual layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n };\n ProjectionNode.prototype.registerSharedNode = function (layoutId, node) {\n var _a, _b, _c;\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n var stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n node.promote({\n transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,\n preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node),\n });\n };\n ProjectionNode.prototype.isLead = function () {\n var stack = this.getStack();\n return stack ? stack.lead === this : true;\n };\n ProjectionNode.prototype.getLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n };\n ProjectionNode.prototype.getPrevLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n };\n ProjectionNode.prototype.getStack = function () {\n var layoutId = this.options.layoutId;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n };\n ProjectionNode.prototype.promote = function (_a) {\n var _b = _a === void 0 ? {} : _a, needsReset = _b.needsReset, transition = _b.transition, preserveFollowOpacity = _b.preserveFollowOpacity;\n var stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition: transition });\n };\n ProjectionNode.prototype.relegate = function () {\n var stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n };\n ProjectionNode.prototype.resetRotation = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n var hasRotate = false;\n // Keep a record of all the values we've reset\n var resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (var i = 0; i < transformAxes.length; i++) {\n var axis = transformAxes[i];\n var key = \"rotate\" + axis;\n // If this rotation doesn't exist as a motion value, then we don't\n // need to reset it\n if (!visualElement.getStaticValue(key)) {\n continue;\n }\n hasRotate = true;\n // Record the rotation and then temporarily set it to 0\n resetValues[key] = visualElement.getStaticValue(key);\n visualElement.setStaticValue(key, 0);\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n // Put back all the values we reset\n for (var key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n };\n ProjectionNode.prototype.getProjectionStyles = function (styleProp) {\n var _a, _b, _c, _d, _e, _f;\n if (styleProp === void 0) { styleProp = {}; }\n // TODO: Return lifecycle-persistent object\n var styles = {};\n if (!this.instance || this.isSVG)\n return styles;\n if (!this.isVisible) {\n return { visibility: \"hidden\" };\n }\n else {\n styles.visibility = \"\";\n }\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n var lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n var emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n var valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n var _g = this.projectionDelta, x = _g.x, y = _g.y;\n styles.transformOrigin = \"\".concat(x.origin * 100, \"% \").concat(y.origin * 100, \"% 0\");\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its actual\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : \"\"\n : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;\n }\n /**\n * Apply scale correction\n */\n for (var key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n var _h = scaleCorrectors[key], correct = _h.correct, applyTo = _h.applyTo;\n var corrected = correct(valuesToRender[key], lead);\n if (applyTo) {\n var num = applyTo.length;\n for (var i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n };\n ProjectionNode.prototype.clearSnapshot = function () {\n this.resumeFrom = this.snapshot = undefined;\n };\n // Only run on root\n ProjectionNode.prototype.resetTree = function () {\n this.root.nodes.forEach(function (node) { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n };\n return ProjectionNode;\n }());\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a, _b, _c, _d;\n var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n var _e = node.layout, layout_1 = _e.actual, measuredLayout = _e.measured;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (node.options.animationType === \"size\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(axisSnapshot);\n axisSnapshot.min = layout_1[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (node.options.animationType === \"position\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(layout_1[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n var layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout_1, snapshot.layout);\n var visualDelta = createDelta();\n if (snapshot.isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);\n }\n else {\n calcBoxDelta(visualDelta, layout_1, snapshot.layout);\n }\n var hasLayoutChanged = !isDeltaZero(layoutDelta);\n var hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n node.relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (node.relativeParent && !node.relativeParent.resumeFrom) {\n var _f = node.relativeParent, parentSnapshot = _f.snapshot, parentLayout = _f.layout;\n if (parentSnapshot && parentLayout) {\n var relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);\n var relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);\n if (!boxEquals(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout: layout_1,\n snapshot: snapshot,\n delta: visualDelta,\n layoutDelta: layoutDelta,\n hasLayoutChanged: hasLayoutChanged,\n hasRelativeTargetChanged: hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction resetTransformStyle(node) {\n var visualElement = node.options.visualElement;\n if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notifyBeforeLayoutMeasure();\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetRotation(node) {\n node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mix(delta.translate, 0, p);\n output.scale = mix(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mix(from.min, to.min, p);\n output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nvar defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nfunction mountNodeEarly(node, id) {\n /**\n * Rather than searching the DOM from document we can search the\n * path for the deepest mounted ancestor and search from there\n */\n var searchNode = node.root;\n for (var i = node.path.length - 1; i >= 0; i--) {\n if (Boolean(node.path[i].instance)) {\n searchNode = node.path[i];\n break;\n }\n }\n var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;\n var element = searchElement.querySelector(\"[data-projection-id=\\\"\".concat(id, \"\\\"]\"));\n if (element)\n node.mount(element, true);\n}\nfunction roundAxis(axis) {\n axis.min = Math.round(axis.min);\n axis.max = Math.round(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\n\nexport { createProjectionNode, mixAxis, mixAxisDelta, mixBox };\n","import { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { startAnimation } from './utils/transitions.mjs';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n * const controls = animate(x, 100, {\n * type: \"spring\",\n * stiffness: 2000,\n * onComplete: v => {}\n * })\n *\n * return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n if (transition === void 0) { transition = {}; }\n var value = isMotionValue(from) ? from : motionValue(from);\n startAnimation(\"\", value, to, transition);\n return {\n stop: function () { return value.stop(); },\n isAnimating: function () { return value.isAnimating(); },\n };\n}\n\nexport { animate };\n","import { mix, progress, linear, circOut } from 'popmotion';\nimport { px, percent } from 'style-value-types';\n\nvar borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nvar numBorders = borders.length;\nvar asNumber = function (value) {\n return typeof value === \"string\" ? parseFloat(value) : value;\n};\nvar isPx = function (value) {\n return typeof value === \"number\" || px.test(value);\n};\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n var _a, _b, _c, _d;\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // (follow?.opacity as number) ?? 0,\n // TODO Reinstate this if only child\n (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (var i = 0; i < numBorders; i++) {\n var borderLabel = \"border\".concat(borders[i], \"Radius\");\n var followRadius = getRadius(follow, borderLabel);\n var leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n var canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n var _a;\n return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nvar easeCrossfadeIn = compress(0, 0.5, circOut);\nvar easeCrossfadeOut = compress(0.5, 0.95, linear);\nfunction compress(min, max, easing) {\n return function (p) {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n if (origin === void 0) { origin = 0.5; }\n if (originAxis === void 0) { originAxis = axis; }\n if (sourceAxis === void 0) { sourceAxis = axis; }\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n var relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n var originPoint = mix(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);\n removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","function isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\n\nexport { boxEquals, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nvar NodeStack = /** @class */ (function () {\n function NodeStack() {\n this.members = [];\n }\n NodeStack.prototype.add = function (node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n };\n NodeStack.prototype.remove = function (node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n var prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n };\n NodeStack.prototype.relegate = function (node) {\n var indexOfNode = this.members.findIndex(function (member) { return node === member; });\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n var prevLead;\n for (var i = indexOfNode; i >= 0; i--) {\n var member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n };\n NodeStack.prototype.promote = function (node, preserveFollowOpacity) {\n var _a;\n var prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n node.snapshot.isShared = true;\n }\n if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {\n node.isLayoutDirty = true;\n }\n var crossfade = node.options.crossfade;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n };\n NodeStack.prototype.exitAnimationComplete = function () {\n this.members.forEach(function (node) {\n var _a, _b, _c, _d, _e;\n (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);\n });\n };\n NodeStack.prototype.scheduleRender = function () {\n this.members.forEach(function (node) {\n node.instance && node.scheduleRender(false);\n });\n };\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n NodeStack.prototype.removeLeadSnapshot = function () {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n };\n return NodeStack;\n}());\n\nexport { NodeStack };\n","var identityProjection = \"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)\";\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n var xTranslate = delta.x.translate / treeScale.x;\n var yTranslate = delta.y.translate / treeScale.y;\n var transform = \"translate3d(\".concat(xTranslate, \"px, \").concat(yTranslate, \"px, 0) \");\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n transform += \"scale(\".concat(1 / treeScale.x, \", \").concat(1 / treeScale.y, \") \");\n if (latestTransform) {\n var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;\n if (rotate)\n transform += \"rotate(\".concat(rotate, \"deg) \");\n if (rotateX)\n transform += \"rotateX(\".concat(rotateX, \"deg) \");\n if (rotateY)\n transform += \"rotateY(\".concat(rotateY, \"deg) \");\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n var elementScaleX = delta.x.scale * treeScale.x;\n var elementScaleY = delta.y.scale * treeScale.y;\n transform += \"scale(\".concat(elementScaleX, \", \").concat(elementScaleY, \")\");\n return transform === identityProjection ? \"none\" : transform;\n}\n\nexport { buildProjectionTransform, identityProjection };\n","var compareByDepth = function (a, b) {\n return a.depth - b.depth;\n};\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nvar FlatTree = /** @class */ (function () {\n function FlatTree() {\n this.children = [];\n this.isDirty = false;\n }\n FlatTree.prototype.add = function (child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.remove = function (child) {\n removeItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.forEach = function (callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n };\n return FlatTree;\n}());\n\nexport { FlatTree };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\n\nvar DocumentProjectionNode = createProjectionNode({\n attachResizeListener: function (ref, notify) { return addDomEvent(ref, \"resize\", notify); },\n measureScroll: function () { return ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }); },\n checkIsScrollRoot: function () { return true; },\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nvar rootProjectionNode = {\n current: undefined,\n};\nvar HTMLProjectionNode = createProjectionNode({\n measureScroll: function (instance) { return ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }); },\n defaultParent: function () {\n if (!rootProjectionNode.current) {\n var documentNode = new DocumentProjectionNode(0, {});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: function (instance, value) {\n instance.style.transform = value !== null && value !== void 0 ? value : \"none\";\n },\n checkIsScrollRoot: function (instance) {\n return Boolean(window.getComputedStyle(instance).position === \"fixed\");\n },\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { __read, __spreadArray } from 'tslib';\nimport * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\n\nvar getChildKey = function (child) { return child.key || \"\"; };\nfunction updateChildLookup(children, allChildren) {\n children.forEach(function (child) {\n var key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n var filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, function (child) {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nvar AnimatePresence = function (_a) {\n var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n var _d = __read(useForceUpdate(), 1), forceRender = _d[0];\n var forceRenderLayoutGroup = useContext(LayoutGroupContext).forceRender;\n if (forceRenderLayoutGroup)\n forceRender = forceRenderLayoutGroup;\n var isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n var filteredChildren = onlyElements(children);\n var childrenToRender = filteredChildren;\n var exiting = new Set();\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n var presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n var allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n var isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(function () {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(function () {\n isInitialRender.current = true;\n allChildren.clear();\n exiting.clear();\n });\n if (isInitialRender.current) {\n return (React.createElement(React.Fragment, null, childrenToRender.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = __spreadArray([], __read(childrenToRender), false);\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n var presentKeys = presentChildren.current.map(getChildKey);\n var targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n var numPresent = presentKeys.length;\n for (var i = 0; i < numPresent; i++) {\n var key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1) {\n exiting.add(key);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (exitBeforeEnter && exiting.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exiting.forEach(function (key) {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n var child = allChildren.get(key);\n if (!child)\n return;\n var insertionIndex = presentKeys.indexOf(key);\n var onExit = function () {\n allChildren.delete(key);\n exiting.delete(key);\n // Remove this child from the present children\n var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });\n presentChildren.current.splice(removeIndex, 1);\n // Defer re-rendering until all exiting children have indeed left\n if (!exiting.size) {\n presentChildren.current = filteredChildren;\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n childrenToRender.splice(insertionIndex, 0, React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map(function (child) {\n var key = child.key;\n return exiting.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n if (env !== \"production\" &&\n exitBeforeEnter &&\n childrenToRender.length > 1) {\n console.warn(\"You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.\");\n }\n return (React.createElement(React.Fragment, null, exiting.size\n ? childrenToRender\n : childrenToRender.map(function (child) { return cloneElement(child); })));\n};\n\nexport { AnimatePresence };\n","import { __read } from 'tslib';\nimport sync from 'framesync';\nimport { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\n\nfunction useForceUpdate() {\n var isMounted = useIsMounted();\n var _a = __read(useState(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];\n var forceRender = useCallback(function () {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n var deferredForceRender = useCallback(function () { return sync.postRender(forceRender); }, [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n var isMounted = useRef(false);\n useIsomorphicLayoutEffect(function () {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { __values } from 'tslib';\nimport * as React from 'react';\nimport { useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\nvar PresenceChild = function (_a) {\n var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;\n var presenceChildren = useConstant(newChildrenMap);\n var id = useId();\n var context = useMemo(function () { return ({\n id: id,\n initial: initial,\n isPresent: isPresent,\n custom: custom,\n onExitComplete: function (childId) {\n var e_1, _a;\n presenceChildren.set(childId, true);\n try {\n for (var _b = __values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var isComplete = _c.value;\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();\n },\n register: function (childId) {\n presenceChildren.set(childId, false);\n return function () { return presenceChildren.delete(childId); };\n },\n }); }, \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? undefined : [isPresent]);\n useMemo(function () {\n presenceChildren.forEach(function (_, key) { return presenceChildren.set(key, false); });\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(function () {\n !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n }, [isPresent]);\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { Box, Flex, Text } from '@chakra-ui/react';\nimport { ArrowRight } from '@ctlyst.id/internal-icon';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport React from 'react';\n\nexport interface SidebarHeaderProps {\n isCollapse: boolean;\n setCollapse: (k: boolean) => void;\n}\n\nexport const SidebarHeader = ({ isCollapse, setCollapse }: SidebarHeaderProps) => {\n return (\n <Box\n px=\"2\"\n color=\"neutral.900\"\n borderY=\"1px solid\"\n borderColor=\"neutral.300\"\n _hover={{\n color: 'primary.500',\n }}\n >\n <Flex\n data-test-id=\"nLkz69YipW818FioeAxVI\"\n direction=\"row\"\n alignItems=\"center\"\n p=\"2\"\n onClick={() => setCollapse(!isCollapse)}\n cursor=\"pointer\"\n >\n <Box\n as={motion.div}\n boxSize=\"4\"\n animate={{ rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 }}\n transition=\"ease-in-out\"\n transitionDuration=\"1ms\"\n data-test-id=\"SWqE2JTMkS4Pj_2tdwy8O\"\n aria-label=\"toggle sidebar\"\n >\n <ArrowRight size={4} color=\"inherit\" />\n </Box>\n <AnimatePresence>\n {!isCollapse && (\n <Box h=\"3.5\" position=\"relative\" ml=\"2\">\n <Text\n as={motion.div}\n w=\"max-content\"\n position=\"absolute\"\n textStyle=\"text.xs\"\n initial={{ opacity: 0, x: 16 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 16 }}\n transition=\"10ms linear\"\n >\n Sembunyikan menu\n </Text>\n </Box>\n )}\n </AnimatePresence>\n </Flex>\n </Box>\n );\n};\n\nexport default SidebarHeader;\n","import {\n Accordion,\n AccordionButton,\n AccordionIcon,\n AccordionItem,\n AccordionPanel,\n Box,\n Popover,\n PopoverBody,\n PopoverContent,\n PopoverHeader,\n PopoverTrigger,\n Portal,\n Text,\n} from '@chakra-ui/react';\nimport { motion } from 'framer-motion';\nimport React from 'react';\n\nimport type { NavItemProps } from '../../nav-item';\nimport { NavItem } from '../../nav-item';\nimport type { MenuItem } from '../types';\n\nexport interface SidebarMenuProps {\n menu: MenuItem[];\n isCollapse: boolean;\n active: string | undefined;\n setActive: (active: string) => void;\n itemStyles?: NavItemProps;\n mappingIcon?: Map<string, JSX.Element>;\n}\n\nexport const SidebarMenu = ({ menu, isCollapse, mappingIcon, itemStyles, setActive, active }: SidebarMenuProps) => {\n return (\n <Box as={motion.div} animate={{ padding: isCollapse ? '8px 16px' : '8px' }}>\n <Accordion index={menu.findIndex(item => item.children.some(child => child.navLink === active))}>\n {menu.map(item => (\n <AccordionItem key={item.id} mt=\"4\">\n {({ isExpanded }) => (\n <>\n <Popover key={item.id} trigger=\"hover\" placement=\"right-start\" offset={[-4, 8]}>\n {({ isOpen, onClose }) => {\n const isActive = active?.includes(item.navLink);\n const activeOption = isOpen ? 'primary.50' : 'white';\n const backgroundColor = isOpen ? 'primary.50' : 'primary.100';\n const activeParent = isActive ? backgroundColor : activeOption;\n\n const isOpenOptions = isCollapse || (!isCollapse && !isExpanded);\n\n return (\n <>\n <PopoverTrigger key={item.id}>\n <AccordionButton\n key={item.id}\n data-test-id={`CTA_button-accordion-${item.title}`}\n p=\"0\"\n h=\"fit-content\"\n >\n <NavItem\n key={item.id}\n as={motion.div}\n justifyContent={isCollapse ? 'center' : 'space-between'}\n isActive={isActive}\n bg={activeParent}\n data-test-id={`CTA_nav-item-${item.title}`}\n onClick={() =>\n setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink)\n }\n position=\"relative\"\n {...itemStyles}\n >\n {mappingIcon && (\n <Box display=\"flex\" boxSize=\"3\" transition=\"50ms linear\">\n {mappingIcon.get(item.icon || '')}\n </Box>\n )}\n\n {!isCollapse && (\n <Box\n display=\"flex\"\n w=\"full\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n ml=\"2\"\n as={motion.div}\n transition=\"20ms ease-in\"\n initial={{ opacity: 0, x: 24 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 16 }}\n >\n <Box h=\"3.5\" position=\"relative\">\n <Text textStyle=\"text.xs\" w=\"max-content\" position=\"absolute\">\n {item.title}\n </Text>\n </Box>\n {!!item.children.length && (\n <Box>\n <AccordionIcon boxSize=\"3.5\" />\n </Box>\n )}\n </Box>\n )}\n </NavItem>\n </AccordionButton>\n </PopoverTrigger>\n {isOpenOptions && (\n <Portal>\n {item.children.length > 0 ? (\n <PopoverContent w=\"176px\" borderColor=\"neutral.200\" bg=\"white\" rounded=\"sm\">\n <PopoverHeader borderColor=\"neutral.300\" textStyle=\"text.xs\" p=\"2\">\n {mappingIcon && (\n <Box display=\"flex\" alignItems=\"center\">\n {mappingIcon.get(item.icon || '')}\n <Box as=\"span\" ml=\"2\">\n {item.title}\n </Box>\n </Box>\n )}\n </PopoverHeader>\n {!!item.children.length && (\n <PopoverBody pb=\"1\" px=\"0\" pt=\"0\">\n {item.children.map(submenu => (\n <NavItem\n data-test-id=\"2vqeuJQ2ml0uLZJ0xNNn-\"\n key={submenu.id}\n isChild\n isActive={active === submenu.navLink}\n onClick={() => {\n setActive(submenu.navLink);\n onClose();\n }}\n rounded=\"none\"\n {...itemStyles}\n >\n {submenu.title}\n </NavItem>\n ))}\n </PopoverBody>\n )}\n </PopoverContent>\n ) : (\n isCollapse && (\n <PopoverContent w=\"176px\" borderColor=\"neutral.200\" bg=\"white\" rounded=\"sm\">\n <PopoverBody py=\"1\" px=\"0\">\n <NavItem\n data-test-id=\"2vqeuJQ2ml0uLZJ0xNNn-\"\n key={item.id}\n justifyContent=\"flex-start\"\n isActive={active === item.navLink}\n onClick={() => {\n setActive(item.navLink);\n onClose();\n }}\n rounded=\"none\"\n {...itemStyles}\n >\n {mappingIcon && (\n <Box display=\"flex\" boxSize=\"3\" transition=\"50ms linear\">\n {mappingIcon.get(item.icon || '')}\n </Box>\n )}\n <Box h=\"3.5\" position=\"relative\" ml=\"2\">\n <Text textStyle=\"text.xs\" w=\"max-content\" position=\"absolute\">\n {item.title}\n </Text>\n </Box>\n </NavItem>\n </PopoverBody>\n </PopoverContent>\n )\n )}\n </Portal>\n )}\n </>\n );\n }}\n </Popover>\n {!isCollapse && (\n <AccordionPanel\n mt=\"1\"\n p=\"0\"\n as={motion.div}\n transition=\"50ms linear 100s\"\n initial={{ opacity: 0, y: 60 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: 16 }}\n >\n {item.children.map(submenu => (\n <NavItem\n mt=\"1\"\n key={submenu.id}\n data-test-id=\"8BmArEFEyzyZkSHEn8qnP\"\n isActive={active === submenu.navLink}\n isChild\n {...itemStyles}\n onClick={() => setActive(submenu.navLink)}\n >\n {submenu.title}\n </NavItem>\n ))}\n </AccordionPanel>\n )}\n </>\n )}\n </AccordionItem>\n ))}\n </Accordion>\n </Box>\n );\n};\n\nSidebarMenu.displayName = 'SidebarMenu';\nSidebarMenu.defaultProps = {\n itemStyles: undefined,\n mappingIcon: undefined,\n};\n\nexport default SidebarMenu;\n","import type {\n HTMLChakraProps,\n ResponsiveValue,\n SystemProps,\n SystemStyleObject,\n ThemingProps,\n UseCheckboxProps,\n} from '@chakra-ui/react';\nimport { chakra, Flex, forwardRef, omitThemingProps, useCheckbox, useMultiStyleConfig } from '@chakra-ui/react';\nimport { cx, dataAttr } from '@chakra-ui/shared-utils';\nimport { Check, Close } from '@ctlyst.id/internal-icon';\nimport React, { useMemo } from 'react';\n\nexport interface SwitchProps\n extends Omit<UseCheckboxProps, 'isIndeterminate'>,\n Omit<HTMLChakraProps<'label'>, keyof UseCheckboxProps>,\n ThemingProps<'Switch'> {\n /**\n * The spacing between the switch and its label text\n * @default 0.5rem\n * @type SystemProps[\"marginLeft\"]\n */\n spacing?: SystemProps['marginLeft'];\n size?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * The `Switch` component is used as an alternative for the checkbox component for switching between \"enabled\" and \"disabled\" states.\n *\n * @see Docs https://chakra-ui.com/docs/components/switch\n * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/\n */\nconst Switch = forwardRef<SwitchProps, 'input'>(function Switch(props, ref) {\n const styles = useMultiStyleConfig('Switch', props);\n\n const { spacing = '0.5rem', children, ...ownProps } = omitThemingProps(props);\n\n const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = useCheckbox(ownProps);\n\n const containerStyles: SystemStyleObject = useMemo(\n () => ({\n display: 'inline-block',\n position: 'relative',\n verticalAlign: 'middle',\n lineHeight: 0,\n ...styles.container,\n }),\n [styles.container]\n );\n\n const trackStyles: SystemStyleObject = useMemo(\n () => ({\n display: 'inline-flex',\n flexShrink: 0,\n justifyContent: 'flex-start',\n boxSizing: 'content-box',\n cursor: 'pointer',\n width: 200,\n ...styles.track,\n }),\n [styles.track]\n );\n\n const labelStyles: SystemStyleObject = useMemo(\n () => ({\n userSelect: 'none',\n marginStart: spacing,\n ...styles.label,\n }),\n [spacing, styles.label]\n );\n\n const getIconSize = (value?: ResponsiveValue<'sm' | 'md' | 'lg'>) => {\n const iconSize = {\n sm: 3,\n md: 4,\n lg: 5,\n };\n\n return iconSize[value as keyof typeof iconSize];\n };\n\n return (\n <chakra.label\n {...getRootProps()}\n display=\"flex\"\n alignItems=\"center\"\n className={cx('chakra-switch', props.className)}\n __css={containerStyles}\n >\n <input data-test-id=\"\" className=\"chakra-switch__input\" {...getInputProps({}, ref)} />\n <chakra.span {...getCheckboxProps()} className=\"chakra-switch__track\" pos=\"relative\" __css={trackStyles}>\n <Flex gap={2} pos=\"absolute\" top=\"50%\" left=\"50%\" transform=\"translate(-50%, -50%)\">\n <Check color=\"white\" size={getIconSize(props.size)} />\n <Close color={state.isDisabled ? 'neutral.600' : 'neutral.900'} size={getIconSize(props.size)} />\n </Flex>\n <chakra.span\n __css={styles.thumb}\n className=\"chakra-switch__thumb\"\n data-checked={dataAttr(state.isChecked)}\n data-hover={dataAttr(state.isHovered)}\n />\n </chakra.span>\n {children && (\n <chakra.span\n className=\"chakra-switch__label\"\n color={state.isDisabled ? 'black.low' : 'black.high'}\n {...getLabelProps()}\n __css={labelStyles}\n >\n {children}\n </chakra.span>\n )}\n </chakra.label>\n );\n});\n\nSwitch.defaultProps = {\n size: 'sm',\n};\n\nexport default Switch;\n","export {\n Table as ChakraTable,\n TableBodyProps,\n TableCellProps,\n TableColumnHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from '@chakra-ui/react';\n","import type { TabProps as ChakraTabProps } from '@chakra-ui/react';\nimport { Button, Flex, forwardRef, useMultiStyleConfig, useTab } from '@chakra-ui/react';\nimport * as React from 'react';\n\ntype AddonProps = {\n isSelected: boolean;\n};\n\ntype TabProps = ChakraTabProps & {\n 'data-test-id'?: string;\n leftAddon?({ isSelected }: AddonProps): React.ReactNode;\n rightAddon?({ isSelected }: AddonProps): React.ReactNode;\n};\n\nconst Tab = forwardRef<TabProps, 'button'>((props, ref) => {\n const tabProps = useTab({ ...props, ref });\n const isSelected = !!tabProps['aria-selected'];\n const styles = useMultiStyleConfig('Tabs', tabProps);\n return (\n <Button\n data-test-id={props['data-test-id']}\n p={4}\n fontSize=\"text.md\"\n _selected={{\n borderColor: 'primary.500',\n color: 'primary.500',\n _hover: {\n '& .chakra-badge': {\n bg: 'primary.500',\n },\n color: 'primary.500',\n },\n }}\n color=\"black.medium\"\n _focus={{ bg: 'none' }}\n _hover={{\n '& .chakra-badge': {\n bg: 'primary.400',\n },\n color: 'primary.400',\n }}\n __css={styles.tab}\n {...tabProps}\n >\n <Flex alignItems=\"center\">\n {props.leftAddon?.({ isSelected })}\n {tabProps.children}\n {props.rightAddon?.({ isSelected })}\n </Flex>\n </Button>\n );\n});\n\nexport default Tab;\n","export { default as Tab } from './components/tab';\n// export { default as TabList } from './components/tab-list';\n// export { default as TabPanel } from './components/tab-panel';\nexport {\n TabIndicator,\n TabIndicatorProps,\n TabList,\n TabListProps,\n TabPanel,\n TabPanelProps,\n TabPanels,\n TabPanelsProps,\n TabProps,\n Tabs,\n TabsDescendantsProvider,\n TabsProps,\n TabsProvider,\n useTab,\n useTabIndicator,\n useTabList,\n UseTabListProps,\n UseTabListReturn,\n UseTabOptions,\n useTabPanel,\n useTabPanels,\n UseTabPanelsProps,\n UseTabProps,\n useTabs,\n useTabsContext,\n useTabsDescendant,\n useTabsDescendants,\n useTabsDescendantsContext,\n UseTabsProps,\n UseTabsReturn,\n useTabsStyles,\n} from '@chakra-ui/react';\n","export { Code, CodeProps, Heading, HeadingProps, Link, LinkProps, Text, TextProps } from '@chakra-ui/react';\n","export { Tooltip, TooltipProps } from '@chakra-ui/react';\n","import type { FlexProps } from '@chakra-ui/react';\nimport { Flex, Heading, Stack, Text } from '@chakra-ui/react';\nimport * as React from 'react';\nimport type { DropzoneOptions, DropzoneState, FileRejection } from 'react-dropzone';\nimport { useDropzone } from 'react-dropzone';\n\nimport { messages } from '../constants';\n\nexport type UploaderProps = FlexProps &\n DropzoneOptions & {\n onHandleUploadFile?: (res: File[]) => void;\n onHandleRejections?: (rejections: FileRejection[]) => void;\n renderError?: (rejections: FileRejection[]) => React.ReactNode;\n selected?: boolean;\n };\n\nexport type UploaderState = DropzoneState;\n\nconst Uploader: React.FC<UploaderProps> = ({\n onHandleUploadFile,\n onHandleRejections,\n accept,\n multiple,\n selected,\n maxFiles = 1,\n renderError,\n validator,\n ...props\n}) => {\n const [selectedFirstFile, setSelectedFirstFile] = React.useState<File>();\n const [isSelected, setIsSelected] = React.useState<boolean>(selected || false);\n const onDrop = React.useCallback(\n (acceptedFiles: File[]) => {\n if (acceptedFiles.length > 0) {\n onHandleUploadFile?.(acceptedFiles);\n if (!multiple) {\n setIsSelected(true);\n setSelectedFirstFile(acceptedFiles[0]);\n }\n }\n },\n [multiple, onHandleUploadFile]\n );\n\n const { getRootProps, getInputProps, isDragActive, fileRejections } = useDropzone({\n onDrop,\n accept,\n maxFiles,\n multiple,\n validator,\n });\n\n React.useEffect(() => {\n if (fileRejections.length > 0 && onHandleRejections) {\n onHandleRejections(fileRejections);\n }\n }, [fileRejections, onHandleRejections]);\n\n const isError = React.useMemo(() => {\n const error = fileRejections.length > 0;\n if (error) {\n setIsSelected(false);\n }\n return error;\n }, [fileRejections]);\n\n React.useEffect(() => {\n setIsSelected(selected ?? false);\n }, [selected]);\n\n return (\n <Stack direction=\"column\">\n <Flex\n minH={200}\n border=\"1px dashed\"\n borderColor={isError ? 'danger.500' : 'primary.500'}\n alignItems=\"center\"\n justifyContent=\"center\"\n cursor=\"pointer\"\n {...props}\n {...getRootProps()}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <Text>{messages.dragActive}</Text>\n ) : (\n <Flex flexDirection=\"column\" alignItems=\"center\" color={isError ? 'danger.500' : 'primary.500'}>\n {!multiple && isSelected && (\n <Heading fontWeight={400} fontSize=\"18px\" lineHeight={28} color=\"black.high\" mb={2}>\n {selectedFirstFile?.name}\n </Heading>\n )}\n {!isSelected && (\n <Heading fontWeight={400} fontSize=\"18px\" lineHeight={28} mb={2}>\n {messages.uploadFile}\n </Heading>\n )}\n {isSelected ? <Text>{messages.dragReplace}</Text> : <Text>{messages.dragInActive}</Text>}\n </Flex>\n )}\n </Flex>\n {renderError?.(fileRejections)}\n </Stack>\n );\n};\n\nUploader.defaultProps = {\n onHandleUploadFile: undefined,\n onHandleRejections: undefined,\n renderError: undefined,\n selected: false,\n};\n\nexport default Uploader;\n","export const ONE_MEGA_BYTE = 1000000;\nexport const messages = {\n dragActive: 'Drop file disini...',\n dragInActive: `(Klik atau drag untuk input file)`,\n dragReplace: `(Klik atau drag untuk mengganti file)`,\n replaceFile: 'Ganti File',\n uploadFile: 'Upload File',\n};\n","export * from './accordion';\nexport * from './alert';\nexport * from './anchor';\nexport * from './badge';\nexport * from './breadcrumb';\nexport * from './button';\nexport * from './card';\nexport * from './checkbox';\nexport * from './chips';\nexport * from './counter';\nexport * from './data-table';\nexport * from './datepicker';\nexport * from './dialog';\nexport * from './empty-state';\nexport * from './field';\nexport * from './form';\nexport * from './header';\nexport * from './image';\nexport * from './layouting';\nexport * from './list';\nexport * from './loader';\nexport * from './modal';\nexport * from './nav-item';\nexport * from './navigation';\nexport * from './pagination';\nexport * from './popover';\nexport * from './radio';\nexport * from './rating';\nexport * from './select';\nexport * from './sidebar';\nexport * from './switch';\nexport * from './table';\nexport * from './tabs';\nexport * from './text';\nexport * from './tooltip';\nexport * from './uploader';\nexport {\n Avatar,\n AvatarBadge,\n AvatarBadgeProps,\n AvatarGroup,\n AvatarGroupProps,\n AvatarProps,\n Collapse,\n CollapseProps,\n Fade,\n FadeProps,\n Hide,\n HideProps,\n Img,\n ImgProps,\n ScaleFade,\n ScaleFadeProps,\n Show,\n ShowProps,\n Slide,\n SlideFade,\n SlideFadeProps,\n SlideProps,\n Step,\n StepDescription,\n StepIcon,\n StepIndicator,\n StepNumber,\n Stepper,\n StepSeparator,\n StepStatus,\n StepTitle,\n useBreakpoint,\n UseBreakpointOptions,\n useColorModePreference,\n useImage,\n UseImageProps,\n UseImageReturn,\n UseMediaQueryOptions,\n useQuery,\n UseQueryProps,\n useSteps,\n VisuallyHidden,\n VisuallyHiddenInput,\n} from '@chakra-ui/react';\n","import type { ThemeConfig, ThemeOverride } from '@chakra-ui/react';\nimport { extendTheme } from '@chakra-ui/react';\n\nimport * as components from './components';\n\nconst config: ThemeConfig = {\n initialColorMode: 'light',\n useSystemColorMode: false,\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getTheme = (foundations: Record<string, any>) => {\n return extendTheme({\n ...foundations,\n components: {\n ...components,\n },\n styles: {\n global: {\n body: {\n fontSize: 'text.sm',\n color: 'black.high',\n },\n },\n },\n config,\n });\n};\n\nconst theme = extendTheme(<ThemeOverride>{\n components: {\n ...components,\n },\n styles: {\n global: {\n '*::-webkit-scrollbar-thumb': {\n background: 'neutral.400',\n },\n body: {\n fontSize: 'text.sm',\n color: 'black.high',\n },\n },\n },\n config,\n});\n\ntype Theme = typeof theme;\n\nexport type { Theme };\nexport { theme };\nexport { ThemeTypings } from '@chakra-ui/styled-system';\n","export { default as Accordion } from './accordion';\r\nexport { default as Alert } from './alert';\r\nexport { default as Badge } from './badge';\r\nexport { default as Button } from './button';\r\nexport { default as Card } from './card';\r\nexport { default as Checkbox } from './checkbox';\r\nexport { default as Chips } from './chips';\r\nexport { default as FormLabel } from './form-label';\r\nexport { default as Input } from './input';\r\nexport { default as LoaderStyle } from './loader';\r\nexport { default as Modal } from './modal';\r\nexport { default as Popover } from './popover';\r\nexport { default as Radio } from './radio';\r\nexport { default as Switch } from './switch';\r\nexport { default as Table } from './table';\r\nexport { default as Tabs } from './tabs';\r\nexport { default as Textarea } from './textarea';\r\nexport { default as Tooltip } from './tooltip';\r\n","import { accordionAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\n\nconst baseStyleContainer = defineStyle({\n border: 'none',\n});\n\nconst baseStyleButton = defineStyle({\n height: 14,\n transitionProperty: 'common',\n transitionDuration: 'normal',\n gap: 4,\n fontSize: 'text.md',\n bg: 'neutral.50',\n _focusVisible: {\n bg: 'neutral.100',\n },\n _hover: {\n bg: 'neutral.100',\n\n '.eye-icon': {\n display: 'block',\n opacity: 1,\n visibility: 'visible',\n },\n },\n _disabled: {\n opacity: 0.4,\n cursor: 'not-allowed',\n },\n py: 2,\n px: 4,\n position: 'relative',\n '.eye-icon': {\n visibility: 'hidden',\n },\n});\n\nconst baseStylePanel = defineStyle({\n pt: '2',\n px: '4',\n pb: '5',\n});\n\nconst baseStyleIcon = defineStyle({\n fontSize: '1.25em',\n});\n\nconst baseStyle = definePartsStyle({\n container: baseStyleContainer,\n button: baseStyleButton,\n panel: baseStylePanel,\n icon: baseStyleIcon,\n});\n\nconst collapseStyleButton = defineStyle({\n height: 13,\n borderRadius: 'sm',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'neutral.300',\n});\n\nconst collapseStylePanel = defineStyle({\n py: 0,\n pr: 0,\n pl: 12,\n borderBottomRadius: 'sm',\n overflow: 'hidden',\n backgroundColor: 'neutral.200',\n});\nconst collapse = definePartsStyle({\n button: collapseStyleButton,\n panel: collapseStylePanel,\n});\n\nconst accordionTheme = defineMultiStyleConfig({\n baseStyle,\n variants: {\n collapse,\n },\n defaultProps: {\n variant: undefined,\n },\n});\nexport default accordionTheme;\n","import { alertAnatomy as parts } from '@chakra-ui/anatomy';\nimport type { StyleFunctionProps } from '@chakra-ui/styled-system';\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\n\nconst $fg = cssVar('alert-fg');\nconst $bg = cssVar('alert-bg');\n\nconst baseStyle = definePartsStyle(props => {\n return {\n container: {\n bg: $bg.reference,\n px: '4',\n py: '2',\n borderRadius: 'sm',\n },\n title: {\n fontWeight: 'regular',\n textStyle: 'text.sm',\n marginEnd: '2',\n },\n description: {\n lineHeight: '6',\n },\n icon: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: '3',\n w: '4',\n h: '4',\n },\n action: {\n color: props.colorScheme === 'neutral' && props.variant === 'light' ? 'primary.500' : 'inherit',\n '& +.chakra-alert__close': {\n ml: '3',\n },\n },\n close: {\n color: $fg.reference,\n w: '4',\n h: '4',\n },\n\n spinner: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: '3',\n w: '5',\n h: '5',\n },\n };\n});\n\nfunction getBg(props: StyleFunctionProps) {\n const { colorScheme: c } = props;\n\n return {\n light: c === 'neutral' ? `colors.${c}.300` : `colors.${c}.50`,\n };\n}\n\nconst variantLight = definePartsStyle(props => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.700`,\n [$bg.variable]: bg.light,\n color: $fg.reference,\n },\n };\n});\n\nconst variantSolid = definePartsStyle(props => {\n const { colorScheme: c } = props;\n return {\n container: {\n [$fg.variable]: `colors.white.high`,\n [$bg.variable]: c === 'neutral' ? `colors.${c}.700` : `colors.${c}.500`,\n },\n };\n});\n\nconst variants = {\n light: variantLight,\n solid: variantSolid,\n};\n\nconst alertTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: 'light',\n colorScheme: 'info',\n },\n});\n\nexport default alertTheme;\n","import type { ComponentStyleConfig } from '@chakra-ui/theme';\n\nconst Badge: ComponentStyleConfig = {\n baseStyle: {\n display: 'inline-block',\n fontSize: 'text.xs',\n fontWeight: 'semibold',\n lineHeight: '14',\n textTransform: 'none',\n px: 2,\n py: '0.5',\n },\n variants: {\n 'primary-solid': {\n bg: 'primary.500',\n color: 'white',\n },\n 'success-solid': {\n bg: 'success.500',\n color: 'white',\n },\n 'info-solid': {\n bg: 'info.500',\n color: 'white',\n },\n 'warning-solid': {\n bg: 'warning.500',\n color: 'white',\n },\n 'danger-solid': {\n bg: 'danger.500',\n color: 'white',\n },\n 'neutral-solid': {\n bg: 'neutral.900',\n color: 'white',\n },\n 'disabled-solid': {\n bg: 'neutral.600',\n color: 'white',\n },\n 'primary-light': {\n bg: 'primary.50',\n color: 'primary.500',\n },\n 'success-light': {\n bg: 'success.50',\n color: 'success.500',\n },\n 'info-light': {\n bg: 'info.50',\n color: 'info.500',\n },\n 'warning-light': {\n bg: 'warning.50',\n color: 'warning.500',\n },\n 'danger-light': {\n bg: 'danger.50',\n color: 'danger.500',\n },\n 'neutral-light': {\n bg: 'neutral.200',\n color: 'neutral.900',\n },\n 'disabled-light': {\n bg: 'neutral.200',\n color: 'neutral.600',\n },\n },\n // The default size and variant values\n defaultProps: {\n variant: 'primary-solid',\n },\n};\n\nexport default Badge;\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\r\nimport type { ComponentStyleConfig } from '@chakra-ui/theme';\r\n\r\n// You can also use the more specific type for\r\n// a single part component: ComponentSingleStyleConfig\r\n\r\nconst Button: ComponentStyleConfig = defineStyleConfig({\r\n // The styles all button have in common\r\n baseStyle: {\r\n fontSize: 'body.1',\r\n fontWeight: 'normal',\r\n px: 4,\r\n py: 2.5,\r\n borderRadius: 'sm',\r\n\r\n _disabled: {\r\n opacity: 1,\r\n bg: 'neutral.300',\r\n color: 'black.low',\r\n },\r\n\r\n _hover: {\r\n _disabled: {\r\n bg: 'neutral.300',\r\n color: 'black.low',\r\n },\r\n },\r\n },\r\n\r\n sizes: {\r\n lg: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.xl',\r\n h: 12,\r\n px: 4,\r\n py: 2.5,\r\n };\r\n const icon = {\r\n h: 10,\r\n w: 10,\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n md: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.md',\r\n h: 9,\r\n px: 3,\r\n py: '7px',\r\n };\r\n const icon = {\r\n h: 9,\r\n w: 9,\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n sm: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.sm',\r\n h: '26px',\r\n lineHeight: 4,\r\n px: 2,\r\n py: '5px',\r\n };\r\n const icon = {\r\n h: '26px',\r\n w: '26px',\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n },\r\n\r\n variants: {\r\n primary: props => {\r\n const { isLoading } = props;\r\n\r\n const basePrimary = {\r\n color: 'white.high',\r\n bg: 'primary.500',\r\n _hover: {\r\n bg: 'primary.600',\r\n },\r\n _active: {\r\n bg: 'primary.700',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n _disabled: {\r\n bg: 'primary.500',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'primary.500',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : basePrimary;\r\n },\r\n secondary: props => {\r\n const { isLoading } = props;\r\n\r\n const baseSecondary = {\r\n color: 'primary.500',\r\n borderWidth: 1,\r\n borderStyle: 'inside',\r\n bg: 'white.high',\r\n borderColor: 'primary.500',\r\n _hover: {\r\n bg: 'primary.50',\r\n },\r\n _active: {\r\n bg: 'primary.100',\r\n },\r\n _disabled: {\r\n border: 0,\r\n },\r\n '.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)': {\r\n marginEnd: '-1px',\r\n },\r\n '.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)': {\r\n marginBottom: '-1px',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseSecondary,\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseSecondary;\r\n },\r\n\r\n tertiary: props => {\r\n const { isLoading } = props;\r\n\r\n const baseTertiary = {\r\n color: 'primary.500',\r\n _hover: {\r\n bg: 'primary.50',\r\n },\r\n _active: {\r\n bg: 'primary.100',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseTertiary,\r\n _disabled: {\r\n bg: 'transparent',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'transparent',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseTertiary;\r\n },\r\n\r\n danger: props => {\r\n const { isLoading } = props;\r\n\r\n const baseDanger = {\r\n bg: 'danger.500',\r\n color: 'white.high',\r\n _hover: {\r\n bg: 'danger.600',\r\n },\r\n _active: {\r\n bg: 'danger.700',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseDanger,\r\n _disabled: {\r\n bg: 'danger.500',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'danger.500',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseDanger;\r\n },\r\n\r\n 'outline-danger': props => {\r\n const { isLoading } = props;\r\n\r\n const baseSecondary = {\r\n color: 'danger.500',\r\n borderWidth: 1,\r\n borderStyle: 'inside',\r\n bg: 'white.high',\r\n borderColor: 'danger.500',\r\n _hover: {\r\n bg: 'danger.50',\r\n },\r\n _active: {\r\n bg: 'danger.100',\r\n },\r\n _disabled: {\r\n border: 0,\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseSecondary,\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseSecondary;\r\n },\r\n\r\n link: {\r\n bg: 'transparent',\r\n color: 'primary.500',\r\n _disabled: {\r\n opacity: '1',\r\n bg: 'transparent',\r\n color: 'black.medium',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'transparent',\r\n color: 'black.medium',\r\n },\r\n },\r\n },\r\n\r\n icon: {\r\n bg: 'neutral.50',\r\n minW: 0,\r\n borderColor: 'neutral.200',\r\n borderWidth: '1px',\r\n\r\n _active: {\r\n bg: 'neutral.500',\r\n borderColor: 'neutral.50',\r\n },\r\n _disabled: {\r\n bg: 'neutral.500',\r\n opacity: 0.3,\r\n borderColor: 'neutral.50',\r\n },\r\n _hover: {\r\n bg: 'neutral.400',\r\n _disabled: {\r\n bg: 'neutral.500',\r\n opacity: 0.3,\r\n borderColor: 'neutral.50',\r\n },\r\n },\r\n },\r\n },\r\n\r\n defaultProps: {\r\n size: 'md',\r\n variant: 'primary',\r\n colorScheme: 'primary',\r\n },\r\n});\r\n\r\nexport default Button;\r\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\n\nconst CardStyle = defineStyleConfig({\n baseStyle: props => {\n return {\n shadow: props.withShadow ? 'raised' : 'none',\n borderRadius: props.isRounded ? 'sm' : 'none',\n };\n },\n});\n\nexport default CardStyle;\n","import { checkboxAnatomy } from '@chakra-ui/anatomy';\r\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\r\n\r\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(checkboxAnatomy.keys);\r\n\r\nconst baseStyle = definePartsStyle({\r\n control: {\r\n borderRadius: 'sm',\r\n w: 4,\r\n h: 4,\r\n border: '1px solid',\r\n },\r\n icon: {\r\n color: 'neutral.50',\r\n },\r\n label: {\r\n textStyle: 'text.sm',\r\n color: 'black.high',\r\n ml: 2,\r\n },\r\n _disabled: {\r\n background: 'neutral.200',\r\n border: '0',\r\n borderColor: 'neutral.500',\r\n cursor: 'not-allowed',\r\n },\r\n});\r\n\r\nconst errors = definePartsStyle({\r\n control: {\r\n borderColor: 'danger.500',\r\n _checked: {\r\n borderColor: 'danger.500',\r\n backgroundColor: 'danger.500',\r\n _hover: {\r\n borderColor: 'danger.600',\r\n backgroundColor: 'danger.600',\r\n },\r\n },\r\n _indeterminate: {\r\n borderColor: 'danger.500',\r\n backgroundColor: 'danger.500',\r\n },\r\n },\r\n label: {\r\n textStyle: 'text.xs',\r\n },\r\n icon: {\r\n fontSize: '8px',\r\n },\r\n});\r\n\r\nconst unstyled = definePartsStyle({\r\n control: {\r\n borderColor: 'neutral.600',\r\n _checked: {\r\n borderColor: 'primary.500',\r\n backgroundColor: 'primary.500',\r\n _hover: {\r\n borderColor: 'primary.600',\r\n backgroundColor: 'primary.600',\r\n },\r\n _disabled: {\r\n backgroundColor: 'primary.500',\r\n borderColor: 'primary.500',\r\n opacity: 0.3,\r\n },\r\n },\r\n _disabled: {\r\n backgroundColor: 'neutral.200',\r\n borderColor: 'neutral.200',\r\n },\r\n _indeterminate: {\r\n borderColor: 'primary.500',\r\n backgroundColor: 'primary.500',\r\n _disabled: {\r\n backgroundColor: 'primary.500',\r\n borderColor: 'primary.500',\r\n opacity: 0.3,\r\n },\r\n },\r\n },\r\n label: {\r\n textStyle: 'text.xs',\r\n _disabled: {\r\n opacity: 1,\r\n },\r\n },\r\n icon: {\r\n fontSize: '8px',\r\n },\r\n});\r\n\r\nconst variants = {\r\n errors,\r\n unstyled,\r\n};\r\n\r\nconst Checkbox = defineMultiStyleConfig({\r\n baseStyle,\r\n variants,\r\n defaultProps: {\r\n variant: 'unstyled',\r\n },\r\n});\r\n\r\nexport default Checkbox;\r\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\n\nconst Chips = defineStyleConfig({\n baseStyle: props => {\n const { isDisabled, isActive } = props;\n\n const defaultProps = {\n color: 'primary.500',\n textStyle: 'text.sm',\n borderRadius: '2xl',\n borderWidth: '1px',\n borderColor: 'primary.500',\n bg: 'white.high',\n px: 3,\n py: 1,\n cursor: 'default',\n _hover: {\n bg: 'primary.50',\n },\n };\n\n let chipsProps = { ...defaultProps };\n\n if (isActive) {\n const isActiveProps = {\n bg: 'primary.500',\n color: 'white.high',\n _hover: {\n bg: 'primary.500',\n },\n };\n chipsProps = { ...chipsProps, ...isActiveProps };\n }\n\n if (isDisabled) {\n const isDisabledProps = {\n bg: 'neutral.200',\n color: 'black.low',\n borderColor: 'neutral.200',\n cursor: 'not-allowed',\n _hover: {\n bg: 'neutral.200',\n },\n };\n chipsProps = { ...chipsProps, ...isDisabledProps };\n }\n\n return {\n ...chipsProps,\n };\n },\n sizes: {\n sm: {\n textStyle: 'text.sm',\n },\n md: {\n textStyle: 'text.md',\n py: 2,\n },\n },\n defaultProps: {\n size: 'sm',\n },\n});\n\nexport default Chips;\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system';\r\n\r\nconst baseStyle = defineStyle({\r\n fontSize: 'field.sm',\r\n fontWeight: 'normal',\r\n marginEnd: 1,\r\n mb: 1,\r\n});\r\n\r\nconst FormLabel = defineStyleConfig({\r\n baseStyle,\r\n});\r\n\r\nexport default FormLabel;\r\n","import { inputAnatomy as parts } from '@chakra-ui/anatomy';\r\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\r\nimport { mode } from '@chakra-ui/theme-tools';\r\n\r\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\r\n\r\nconst baseStyle = definePartsStyle({\r\n field: {\r\n width: '100%',\r\n minWidth: 0,\r\n outline: 0,\r\n px: 2,\r\n py: 2,\r\n paddingInlineStart: 2,\r\n paddingInlineEnd: 2,\r\n position: 'relative',\r\n appearance: 'none',\r\n color: 'black.high',\r\n _disabled: {\r\n bg: 'neutral.300',\r\n border: 0,\r\n cursor: 'not-allowed',\r\n opacity: 1,\r\n boxShadow: 'none',\r\n color: 'black.medium',\r\n },\r\n _placeholder: {\r\n color: 'black.low',\r\n },\r\n },\r\n});\r\n\r\nconst size = {\r\n lg: defineStyle({\r\n textStyle: 'text.lg',\r\n h: 12,\r\n borderRadius: 'sm',\r\n }),\r\n md: defineStyle({\r\n textStyle: 'text.md',\r\n h: 10,\r\n borderRadius: 'sm',\r\n }),\r\n sm: defineStyle({\r\n textStyle: 'text.sm',\r\n h: 9.5,\r\n borderRadius: 'sm',\r\n }),\r\n xs: defineStyle({\r\n textStyle: 'text.sm',\r\n p: 1,\r\n h: 5.5,\r\n borderRadius: 'sm',\r\n }),\r\n};\r\n\r\nconst sizes = {\r\n lg: definePartsStyle({\r\n field: size.lg,\r\n addon: size.lg,\r\n }),\r\n md: definePartsStyle({\r\n field: size.md,\r\n addon: size.md,\r\n }),\r\n sm: definePartsStyle({\r\n field: size.sm,\r\n addon: size.sm,\r\n }),\r\n xs: definePartsStyle({\r\n field: size.xs,\r\n addon: size.xs,\r\n }),\r\n};\r\n\r\nconst outline = definePartsStyle(props => {\r\n const field = {\r\n border: 0,\r\n outline: 0,\r\n bg: mode('white', 'inherit')(props),\r\n color: mode('inherit', 'white')(props),\r\n\r\n _hover: {\r\n borderColor: mode('neutral.400', 'inherit')(props),\r\n },\r\n _invalid: {\r\n boxShadow: 'none',\r\n },\r\n _focusVisible: {\r\n zIndex: 1,\r\n boxShadow: 'none',\r\n },\r\n };\r\n\r\n return {\r\n field,\r\n };\r\n});\r\n\r\nconst unstyled = definePartsStyle({\r\n field: {\r\n bg: 'transparent',\r\n px: '0',\r\n height: 'auto',\r\n },\r\n addon: {\r\n bg: 'transparent',\r\n px: '0',\r\n height: 'auto',\r\n },\r\n});\r\n\r\nconst variants = {\r\n outline,\r\n unstyled,\r\n};\r\n\r\nconst Input = defineMultiStyleConfig({\r\n baseStyle,\r\n sizes,\r\n variants,\r\n defaultProps: {\r\n size: 'sm',\r\n variant: 'outline',\r\n },\r\n});\r\n\r\nexport default Input;\r\n","/* eslint-disable prefer-destructuring */\nimport { defineStyleConfig } from '@chakra-ui/styled-system';\nimport { keyframes } from '@emotion/react';\n\nconst rotate = keyframes({\n '0%': {\n transform: 'rotate(0deg)',\n },\n '100%': {\n transform: 'rotate(360deg)',\n },\n});\n\nconst getLoaderColor = (color: string) => {\n if (!color) {\n return 'var(--chakra-colors-white-high)';\n }\n\n const colorValue = color.split('.');\n let backgroundColor: string;\n\n switch (colorValue.length) {\n case 1:\n backgroundColor = colorValue[0];\n break;\n case 2:\n backgroundColor = `var(--chakra-colors-${colorValue[0]}-${colorValue[1]})`;\n break;\n default:\n backgroundColor = 'var(--chakra-colors-white-high)';\n break;\n }\n\n if (color === 'primary') return 'var(--chakra-colors-primary-600)';\n if (color === 'danger') return 'var(--chakra-colors-danger-500)';\n if (color === 'warning') return 'var(--chakra-colors-warning-700)';\n return backgroundColor;\n};\n\nconst LoaderStyle = defineStyleConfig({\n baseStyle: props => {\n const colors = getLoaderColor(props.color);\n return {\n borderRadius: '50%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n animation: `${rotate} 1s linear infinite`,\n background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,\n ':before': {\n content: `''`,\n display: 'block',\n borderRadius: '50%',\n width: '6px',\n height: '6px',\n position: 'absolute',\n bottom: 0,\n background: colors,\n },\n };\n },\n sizes: {\n xs: {\n width: '12px',\n height: '12px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',\n ':before': {\n width: '1.4px',\n height: '1.4px',\n },\n },\n sm: {\n width: '16px',\n height: '16px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',\n ':before': {\n width: '1.87px',\n height: '1.87px',\n },\n },\n md: {\n width: '24px',\n height: '24px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',\n ':before': {\n width: '2.8px',\n height: '2.8px',\n },\n },\n lg: {\n width: '50px',\n height: '50px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',\n ':before': {\n width: '5.83px',\n height: '5.83px',\n },\n },\n xl: {\n width: '75px',\n height: '75px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',\n ':before': {\n width: '8.75px',\n height: '8.75px',\n },\n },\n xxl: {\n width: '100px',\n height: '100px',\n WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,\n ':before': {\n width: '11.67px',\n height: '11.67px',\n },\n },\n },\n defaultProps: {\n size: 'lg',\n },\n});\n\nexport default LoaderStyle;\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\nimport type { ComponentStyleConfig } from '@chakra-ui/theme';\n\nconst Modal: ComponentStyleConfig = defineStyleConfig({\n sizes: {\n sm: { dialog: { minW: 400 } },\n md: { dialog: { minW: 600 } },\n lg: { dialog: { minW: 800 } },\n },\n\n defaultProps: {\n size: 'md',\n },\n});\n\nexport default Modal;\n","import { popoverAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nconst baseStyle = definePartsStyle({\n content: {\n bg: 'white',\n },\n});\nconst popoverTheme = defineMultiStyleConfig({ baseStyle });\n\nexport default popoverTheme;\n","import { radioAnatomy } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(radioAnatomy.keys);\n\nconst baseStyle = definePartsStyle({\n control: {\n border: '1px solid',\n width: '16px',\n height: '16px',\n },\n label: {\n marginLeft: '8px',\n textStyle: 'text.sm',\n color: 'black.high',\n _disabled: {\n opacity: 1,\n color: 'black.medium',\n },\n },\n});\n\nconst errors = definePartsStyle({\n control: {\n borderColor: 'danger.500',\n _checked: {\n borderColor: 'danger.500',\n bg: 'white',\n _before: {\n h: '10px',\n w: '10px',\n bg: 'danger.500',\n },\n _hover: {\n borderColor: 'danger.500',\n bg: 'neutral.200',\n },\n _disabled: {\n borderColor: 'danger.500',\n bg: 'white.high',\n _before: {\n h: '10px',\n w: '10px',\n bg: 'primary.500',\n opacity: 0.3,\n },\n },\n },\n _disabled: {\n borderColor: 'danger.500',\n bg: 'neutral.200',\n },\n },\n label: {\n fontSize: '12px',\n },\n});\n\nconst unstyled = definePartsStyle({\n control: {\n borderColor: 'neutral.600',\n _checked: {\n borderColor: 'primary.500',\n bg: 'white',\n _before: {\n h: '10px',\n w: '10px',\n bg: 'primary.500',\n },\n _hover: {\n borderColor: 'primary.500',\n bg: 'gray.200',\n },\n _disabled: {\n borderColor: 'primary.500',\n bg: 'white.high',\n opacity: 0.3,\n _before: {\n h: '10px',\n w: '10px',\n bg: 'primary.500',\n },\n },\n },\n _disabled: {\n borderColor: 'neutral.200',\n bg: 'neutral.200',\n },\n },\n label: {\n fontSize: '12px',\n },\n});\n\nconst variants = {\n errors,\n unstyled,\n};\n\nconst Radio = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: 'unstyled',\n },\n});\n\nexport default Radio;\n","import { switchAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\nimport { calc, cssVar } from '@chakra-ui/theme-tools';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst $width = cssVar('switch-track-width');\nconst $height = cssVar('switch-track-height');\nconst $diff = cssVar('switch-track-diff');\nconst diffValue = calc.subtract($width, $height);\nconst $translateX = cssVar('switch-thumb-x');\n\nconst baseStyleThumb = defineStyle({\n bg: 'white',\n transitionProperty: 'transform',\n transitionDuration: 'normal',\n borderRadius: 'inherit',\n width: [$height.reference],\n height: [$height.reference],\n _checked: {\n transform: `translateX(${$translateX.reference})`,\n },\n});\n\nconst baseStyle = definePartsStyle(() => ({\n container: {\n [$diff.variable]: diffValue,\n [$translateX.variable]: $diff.reference,\n _rtl: {\n [$translateX.variable]: calc($diff).negate().toString(),\n },\n },\n track: {\n bg: 'neutral.400',\n p: 1,\n _checked: {\n bg: 'primary.500',\n _disabled: {\n bg: 'neutral.600',\n },\n },\n _disabled: {\n bg: 'neutral.500',\n opacity: '100%',\n },\n },\n thumb: baseStyleThumb,\n}));\n\nconst sizes = {\n sm: definePartsStyle({\n container: {\n [$width.variable]: '1.875rem',\n [$height.variable]: '0.75rem',\n },\n thumb: {\n [$width.variable]: '0.75rem',\n [$height.variable]: '0.75rem',\n },\n }),\n md: definePartsStyle({\n container: {\n [$width.variable]: '2.375rem',\n [$height.variable]: '1rem',\n },\n thumb: {\n [$width.variable]: '1rem',\n [$height.variable]: '1rem',\n },\n }),\n lg: definePartsStyle({\n container: {\n [$width.variable]: '3.25rem',\n [$height.variable]: '1.375rem',\n },\n thumb: {\n [$width.variable]: '1.375rem',\n [$height.variable]: '1.375rem',\n },\n }),\n};\n\nconst Switch = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: 'md',\n },\n});\n\nexport default Switch;\n","import { tableAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\nimport { mode } from '@chakra-ui/theme-tools';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst baseStyle = definePartsStyle({\n table: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n borderCollapse: 'separate',\n borderSpacing: 0,\n width: 'full',\n tableLayout: 'fixed',\n },\n th: {\n fontFamily: 'heading',\n fontWeight: 'semibold',\n textTransform: 'uppercase',\n letterSpacing: 'normal',\n textAlign: 'start',\n height: '50px',\n color: mode('neutral.900', 'white'),\n fontSize: 'text.sm',\n lineHeight: '18px',\n backgroundColor: 'neutral.50',\n '&:first-of-type': {\n pl: 6,\n },\n '&:last-of-type': {\n pr: 6,\n },\n },\n tbody: {\n tr: {\n cursor: 'pointer',\n _hover: {\n td: {\n backgroundColor: 'neutral.200',\n '&>div': {\n backgroundColor: 'neutral.200',\n },\n },\n },\n '&[data-active=\"true\"]': {\n td: {\n backgroundColor: 'neutral.100',\n '&>div': {\n backgroundColor: 'neutral.200',\n },\n },\n },\n },\n },\n td: {\n // backgroundColor: 'neutral.50',\n textAlign: 'start',\n height: '56px',\n\n '&:first-of-type': {\n pl: 6,\n },\n '&:last-of-type': {\n pr: 6,\n },\n _disabled: {\n opacity: 0.5,\n },\n },\n caption: {\n mt: 4,\n fontFamily: 'heading',\n textAlign: 'center',\n fontWeight: 'medium',\n },\n});\n\nconst numericStyles = defineStyle({\n '&[data-is-numeric=true]': {\n textAlign: 'end',\n },\n});\n\nconst variantSimple = definePartsStyle(props => {\n const { colorScheme: c } = props;\n\n return {\n th: {\n color: mode('gray.600', 'gray.400')(props),\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n td: {\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n caption: {\n color: mode('gray.600', 'gray.100')(props),\n },\n tfoot: {\n tr: {\n '&:last-of-type': {\n th: { borderBottomWidth: 0 },\n },\n },\n },\n };\n});\n\nconst variantStripe = definePartsStyle(props => {\n const { colorScheme: c } = props;\n\n return {\n th: {\n color: mode('gray.600', 'gray.400')(props),\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n td: {\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n caption: {\n color: mode('gray.600', 'gray.100')(props),\n },\n tbody: {\n tr: {\n '&:nth-of-type(odd)': {\n 'th, td': {\n borderBottomWidth: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n },\n td: {\n background: mode(`${c}.100`, `${c}.700`)(props),\n },\n },\n },\n },\n tfoot: {\n tr: {\n '&:last-of-type': {\n th: { borderBottomWidth: 0 },\n },\n },\n },\n };\n});\n\nconst variants = {\n simple: variantSimple,\n striped: variantStripe,\n unstyled: defineStyle({}),\n};\n\nconst sizes = {\n sm: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '4',\n fontSize: 'xs',\n },\n td: {\n px: '2',\n py: '4',\n fontSize: 'sm',\n lineHeight: '4',\n },\n caption: {\n px: '4',\n py: '2',\n fontSize: 'xs',\n },\n }),\n md: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '4',\n fontSize: 'xs',\n },\n td: {\n px: '2',\n py: '4',\n lineHeight: '5',\n },\n caption: {\n px: '6',\n py: '2',\n fontSize: 'sm',\n },\n }),\n lg: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '5',\n fontSize: 'sm',\n },\n td: {\n px: '2',\n py: '4',\n lineHeight: '6',\n },\n caption: {\n px: '6',\n py: '2',\n fontSize: 'md',\n },\n }),\n};\n\nconst tableTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: 'simple',\n size: 'md',\n colorScheme: 'gray',\n },\n});\nexport default tableTheme;\n","import { tabsAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst variantLine = definePartsStyle(props => {\n const { orientation } = props;\n const isVertical = orientation === 'vertical';\n const borderProp = isVertical ? 'borderStart' : 'borderBottom';\n const marginProp = isVertical ? 'marginStart' : 'marginBottom';\n\n return {\n tablist: {\n [borderProp]: '1px solid',\n borderColor: 'inherit',\n },\n tab: {\n [borderProp]: '1px solid',\n borderColor: 'transparent',\n [marginProp]: '-1px',\n },\n };\n});\n\nconst variantUnstyled = definePartsStyle({});\n\nconst variants = {\n line: variantLine,\n unstyled: variantUnstyled,\n};\n\nconst tabsTheme = defineMultiStyleConfig({\n variants,\n defaultProps: {\n size: 'md',\n variant: 'line',\n },\n});\n\nexport default tabsTheme;\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/react';\nimport type { TextAreaProps } from 'packages/internal-ui/src/components/form';\n\nconst getProps = (props: TextAreaProps) => {\n const { isError, isSuccess, isDisabled } = props;\n\n let borderColor = 'neutral.400';\n let focusBorderColor = 'primary.500';\n\n if (isError) {\n borderColor = 'danger.500';\n focusBorderColor = 'danger.500';\n } else if (isSuccess) {\n borderColor = 'success.500';\n focusBorderColor = 'success.500';\n } else if (isDisabled && !isError && !isSuccess) {\n borderColor = 'neutral.400';\n focusBorderColor = 'danger.500';\n }\n\n return {\n focusBorderColor,\n borderColor,\n };\n};\n\nconst outline = defineStyle(props => {\n const { focusBorderColor, borderColor } = getProps(props);\n\n return {\n background: 'white.high',\n color: 'black.high',\n borderColor,\n fontSize: 'text.sm',\n padding: 2,\n borderRadius: 'sm',\n borderWidth: '1px',\n outline: 'none',\n\n _disabled: {\n opacity: 1,\n color: 'black.medium',\n background: 'neutral.300',\n },\n _placeholder: {\n color: 'black.low',\n },\n _hover: {\n borderColor,\n },\n _focus: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _focusVisible: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _focusWithin: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _invalid: {\n outline: 'none',\n borderColor: 'danger.500',\n boxShadow: 'none',\n },\n };\n});\n\nexport const Textarea = defineStyleConfig({\n variants: { outline },\n defaultProps: {\n variant: 'outline',\n },\n});\n\nexport default Textarea;\n","import type { ComponentStyleConfig } from '@chakra-ui/react';\nimport { cssVar, defineStyleConfig } from '@chakra-ui/react';\n\nconst $arrowBg = cssVar('popper-arrow-bg');\nconst baseStyle = {\n bg: 'neutral.700',\n fontSize: 'text.sm',\n [$arrowBg.variable]: 'var(--chakra-colors-neutral-700)',\n};\n\nconst Tooltip: ComponentStyleConfig = defineStyleConfig({ baseStyle });\n\nexport default Tooltip;\n","import type { AxiosRequestConfig } from 'axios';\nimport axios from 'axios';\nimport { useMemo } from 'react';\n\nimport { useInternalUI } from '../provider';\n\nexport default function useFetcher() {\n const { instance } = useInternalUI();\n const axiosInstance = useMemo(() => instance || axios, [instance]);\n\n const fetcher = async <TResponse = unknown>({ url, data, method, headers, ...config }: AxiosRequestConfig) => {\n const response = await axiosInstance.request<TResponse>({\n data,\n url,\n method,\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n ...headers,\n },\n ...config,\n });\n return response;\n };\n\n return {\n fetcher,\n };\n}\n","import axios from 'axios';\nimport type { FC } from 'react';\nimport React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';\nimport { ToastContainer } from 'react-toastify';\n\nimport type { ProviderContextObject, ProviderProps } from '../types';\n\nexport const ProviderContext = createContext<ProviderContextObject>({\n instance: undefined,\n});\n\nexport const useInternalUI = (): ProviderContextObject => {\n const { instance } = useContext(ProviderContext);\n return { instance };\n};\n\nconst Provider: FC<ProviderProps> = ({ children, config, requestInterceptors, responseInterceptors }) => {\n const instanceRef = useRef(axios.create(config));\n\n useEffect(() => {\n requestInterceptors?.forEach(interceptor => {\n instanceRef.current.interceptors.request.use(interceptor);\n });\n responseInterceptors?.forEach(interceptor => {\n instanceRef.current.interceptors.response.use(interceptor);\n });\n }, [requestInterceptors, responseInterceptors]);\n\n const provider = useMemo(() => ({ instance: instanceRef.current }), []);\n\n return (\n <ProviderContext.Provider value={provider}>\n <ToastContainer />\n {children}\n </ProviderContext.Provider>\n );\n};\n\nProvider.displayName = 'Provider';\n\nexport default Provider;\n","export { default as Provider } from './components/provider';\nexport * from './components/provider';\nexport {\n ChakraProvider,\n ChakraProviderProps,\n ColorMode,\n ColorModeScript,\n ColorModeScriptProps,\n} from '@chakra-ui/react';\n","export { default as useFetcher } from './useFetcher';\nexport {\n useBoolean,\n useClipboard,\n useColorMode,\n useColorModeValue,\n useConst,\n useControllableProp,\n useControllableState,\n useDimensions,\n useDisclosure,\n UseDisclosureProps,\n useMergeRefs,\n useOutsideClick,\n useTheme,\n useToken,\n} from '@chakra-ui/react';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AANA,IAQO;AARP;AAAA;AAAA;AAQA,IAAO,sBAAQ;AAAA;AAAA;;;ACRf;AAAA;AAAA;AAAA;AAAA,IAEI,iBAEA,OAUG;AAdP;AAAA;AAAA;AAAA;AAEA,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,MAAQ,SAAU,MAAM;AAClC,eAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,MAC1B;AAAA;AAAA,IAEA;AAEA,IAAO,4BAAQ;AAAA;AAAA;;;ACdf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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;AAAA,EACF;AACF;;;AG1BA,IAAAC,kBAeO;;;AzSZP,IAAAC,kBAAwC;","names":["theme","import_react","import_jsx_runtime","import_react","import_internal_icon","import_jsx_runtime","import_jsx_runtime","Alert","import_shared_utils","import_react","import_react","import_jsx_runtime","import_react","import_jsx_runtime","size","getLoaderColor","ButtonChakra","import_jsx_runtime","css","import_shared_utils","import_system","import_internal_icon","import_jsx_runtime","css","import_shared_utils","import_system","import_jsx_runtime","AlertDescription","import_shared_utils","import_system","import_jsx_runtime","css","import_shared_utils","import_system","import_jsx_runtime","AlertTitle","import_react","import_shared_utils","import_jsx_runtime","import_react","import_jsx_runtime","BadgeChakra","import_react","import_react","import_jsx_runtime","spacing","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_internal_icon","import_jsx_runtime","import_react","import_fi","import_react","import_jsx_runtime","import_react","import_react","import_internal_icon","import_jsx_runtime","React","size","outlineColor","focusColor","ChakraInput","import_react","import_jsx_runtime","React","ChakraTextarea","import_react","import_jsx_runtime","size","import_icons","import_react","React","import_jsx_runtime","table","index","import_react","import_shared_utils","import_fi","import_system","import_react","import_jsx_runtime","import_react","import_jsx_runtime","React","import_jsx_runtime","id","ReactDatePicker","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","styled","React","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_react","import_fi","import_jsx_runtime","color","import_react","import_fi","import_jsx_runtime","import_react","env","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_react","import_icons","import_react","import_jsx_runtime","import_react","import_jsx_runtime","ModalBody","React","ChakraModalBody","import_react","import_jsx_runtime","ChakraModalCloseButton","import_react","import_jsx_runtime","ModalFooter","ChakraModalFooter","import_react","import_jsx_runtime","ModalHeader","ChakraModalHeader","import_react","import_react","import_shared_utils","import_jsx_runtime","import_react","Icon","Icon","import_jsx_runtime","import_jsx_runtime","import_react","Icon","import_jsx_runtime","mappingIcon","import_icons","import_react","import_react","import_jsx_runtime","import_react","import_jsx_runtime","color","import_jsx_runtime","import_react","import_jsx_runtime","scale","import_react","React","import_fi","import_jsx_runtime","import_react","import_react","import_jsx_runtime","ChakraRadio","import_react","import_jsx_runtime","ChakraRadioGroup","import_react","import_react","import_internal_icon","import_jsx_runtime","RatingIcon","import_system","import_react","import_react","import_react","theme","import_jsx_runtime","Select","ReactSelect","import_system","import_jsx_runtime","import_system","import_jsx_runtime","ReactSelectAsyncCreatable","import_system","import_jsx_runtime","ReactSelectCreatable","import_react","import_system","import_react_select","import_jsx_runtime","ComponentRS","ReactSelect","import_react","import_tslib","import_tslib","React","import_react","React","import_react","import_react","visualElement","import_react","import_react","import_react","import_react","import_react","import_tslib","import_react","visualElement","import_react","visualElement","import_react","visualElement","animate","animate","import_react","import_react","import_react","import_react","visualElement","drag","import_tslib","import_react","VisualElementHandler","visualElement","React__default","config","import_tslib","import_tslib","import_react","import_tslib","import_react","a","b","transformKeys","a","b","c","alpha","b","a","v","number","import_tslib","transformKeys","hasTransform","import_tslib","import_react","import_tslib","size","spacing","import_tslib","scrapeMotionValuesFromProps","import_tslib","import_react","scrapeMotionValuesFromProps","config","animate","key","index","scrapeMotionValuesFromProps","AnimationType","import_react","visualElement","_a","isMouseEvent","drag","visualElement","import_react","import_react","import_tslib","import_tslib","clamp","clamp","undampedFreq","a","b","c","a","b","progress","alpha","color","a","b","analyse","clamp","config","runNextFrame","isProcessing","index","process","startAnimation","heading","a","b","visualElement","_a","import_react","import_tslib","visualElement","_a","import_tslib","import_react","import_react","id","import_tslib","import_tslib","import_tslib","import_tslib","import_tslib","keyframes","import_tslib","getAnimatableNone","getAnimatableNone","_a","import_tslib","import_tslib","index","SubscriptionManager","a","b","c","MotionValue","import_tslib","visualElement","visualElement","key","getAnimatableNone","visualElement","animations","getAnimation","_a","a","b","visualElement","animations","animate","i","key","_a","visualElement","animate","_a","import_react","import_tslib","import_tslib","PanSession","info","point","timestamp","_a","event","a","b","getVelocity","import_tslib","calcOrigin","clamp","transformPoint","import_tslib","scale","scale","distance","transformPoint","rootProjectionNode","VisualElementDragControls","visualElement","_a","_b","drag","inertia","calcOrigin","motionValue","visualElement","import_react","visualElement","import_tslib","import_tslib","import_tslib","measureViewportBox","scrapeMotionValuesFromProps","_a","key","value","import_tslib","isCSSVariable","visualElement","current","resolved","import_tslib","BoundingBoxDimension","visualElement","visualElement","getComputedStyle","a","b","import_tslib","scrapeMotionValuesFromProps","import_tslib","import_react","MeasureLayoutWithContext","visualElement","drag","_a","React__default","import_tslib","animate","progress","import_tslib","scale","xKeys","yKeys","a","b","NodeStack","member","rotate","a","b","FlatTree","id","_a","visualElement","_b","progress","animate","config","import_tslib","React","import_react","import_tslib","import_react","import_react","import_tslib","React","import_react","id","_a","key","import_jsx_runtime","import_react","import_internal_icon","import_jsx_runtime","import_react","import_jsx_runtime","mappingIcon","import_react","import_shared_utils","import_internal_icon","import_jsx_runtime","Switch","spacing","import_react","import_react","import_jsx_runtime","import_react","import_react","import_react","import_react","React","import_jsx_runtime","isDragActive","import_react","import_react","badge_default","button_default","card_default","checkbox_default","chips_default","loader_default","switch_default","textarea_default","parts","import_anatomy","import_styled_system","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","c","Badge","badge_default","import_styled_system","Button","button_default","import_styled_system","card_default","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","baseStyle","variants","Checkbox","checkbox_default","import_styled_system","Chips","chips_default","import_styled_system","baseStyle","FormLabel","import_anatomy","import_styled_system","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","sizes","field","unstyled","variants","Input","import_styled_system","import_react","color","loader_default","import_styled_system","Modal","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","baseStyle","errors","unstyled","variants","Radio","import_anatomy","import_styled_system","import_theme_tools","defineMultiStyleConfig","definePartsStyle","parts","baseStyle","sizes","Switch","switch_default","import_anatomy","import_styled_system","import_theme_tools","defineMultiStyleConfig","definePartsStyle","parts","baseStyle","c","variants","sizes","import_anatomy","import_styled_system","defineMultiStyleConfig","definePartsStyle","parts","variants","import_react","outline","textarea_default","import_react","baseStyle","Tooltip","import_styled_system","theme","import_axios","import_react","import_react","import_jsx_runtime","config","axios","import_react","axios","config","import_react","import_react"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@emotion+memoize@0.7.4/node_modules/@emotion/memoize/dist/memoize.esm.js","../../../node_modules/.pnpm/@emotion+is-prop-valid@0.8.8/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../src/index.ts","../src/components/accordion/components/accordion-eye.tsx","../src/components/accordion/components/accordion-indicator.tsx","../src/components/accordion/components/index.ts","../src/components/alert/components/alert.tsx","../src/components/alert/components/alert-context.ts","../src/components/alert/components/icons.tsx","../src/components/alert/components/alert-action.tsx","../src/components/button/components/button.tsx","../src/components/loader/components/loader.tsx","../src/components/loader/index.ts","../src/components/alert/components/alert-close.tsx","../src/components/alert/components/alert-description.tsx","../src/components/alert/components/alert-icon.tsx","../src/components/alert/components/alert-title.tsx","../src/components/anchor/components/anchor.tsx","../src/components/badge/components/badge.tsx","../src/components/breadcrumb/components/bread-crumb.tsx","../src/components/button/index.ts","../src/components/card/components/card.tsx","../src/components/checkbox/components/checkbox.tsx","../src/components/checkbox/components/checkbox-group.tsx","../src/components/field/components/field.tsx","../src/components/checkbox/index.ts","../src/components/chips/components/chips.tsx","../src/components/counter/components/counter.tsx","../src/components/form/components/input-addon.tsx","../src/components/form/components/input-element.tsx","../src/components/form/components/input-field.tsx","../src/components/form/components/textarea.tsx","../src/components/form/index.ts","../src/components/data-table/components/data-table.tsx","../src/components/datepicker/components/datepicker.tsx","../src/components/datepicker/components/styles.tsx","../src/components/datepicker/components/time-input.tsx","../src/components/datepicker/components/datepicker-month/datepicker-month.tsx","../src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx","../src/components/dialog/components/dialog.tsx","../src/components/empty-state/components/empty-state.tsx","../src/components/empty-state/components/layout.tsx","../src/components/header/components/header.tsx","../src/components/header/components/logo.tsx","../src/components/header/components/profile.tsx","../src/components/nav-item/components/nav-item.tsx","../src/components/header/components/switch-mode.tsx","../src/components/header/components/version.tsx","../src/components/header/utils/formatter.ts","../src/components/header/components/navbar.tsx","../src/components/image/index.ts","../src/components/layouting/index.ts","../src/components/list/index.tsx","../src/components/modal/components/modal-back-button.tsx","../src/components/modal/components/modal-body.tsx","../src/components/modal/components/modal-close-button.tsx","../src/components/modal/components/modal-footer.tsx","../src/components/modal/components/modal-header.tsx","../src/components/modal/index.ts","../src/components/navigation/components/navigation.tsx","../src/components/navigation/components/mapping-icon.tsx","../src/components/navigation/components/navigation-bar.tsx","../src/components/pagination/components/pagination.tsx","../src/components/pagination/components/pagination-button.tsx","../src/components/pagination/components/pagination-button-trigger.tsx","../src/components/pagination/components/pagination-detail.tsx","../src/components/pagination/components/pagination-filter.tsx","../src/components/popover/index.ts","../src/components/radio/components/radio.tsx","../src/components/radio/components/radio-group.tsx","../src/components/radio/index.ts","../src/components/rating/components/rating.tsx","../src/components/select/components/select.tsx","../src/config/theme/foundations/shadows.ts","../src/config/theme/foundations/sizes.ts","../src/config/theme/foundations/spacing.ts","../src/config/theme/foundations/typography.ts","../src/components/select/components/utils.ts","../src/components/select/components/select-async.tsx","../src/components/select/components/select-async-creatable.tsx","../src/components/select/components/select-creatable.tsx","../src/components/select/components/select-with-checkbox.tsx","../src/components/sidebar/components/sidebar.tsx","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/use-features.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/process.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../../node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/PresenceContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-browser.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/variants.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-constant.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/id.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/use-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/utils.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/numbers/units.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/utils.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hsla.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/rgba.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/hex.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/color/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/index.mjs","../../../node_modules/.pnpm/style-value-types@5.0.0/node_modules/style-value-types/dist/es/complex/filter.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/types.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/use-dom-event.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/event-info.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/spring.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/clamp.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/progress.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-color.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/inc.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/pipe.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/mix-complex.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/interpolate.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/utils.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/generators/decay.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/on-next-frame.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/create-render-step.mjs","../../../node_modules/.pnpm/framesync@6.0.1/node_modules/framesync/dist/es/index.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/animations/inertia.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/is-point-3d.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/utils/distance.mjs","../../../node_modules/.pnpm/popmotion@11.0.3/node_modules/popmotion/dist/es/easing/cubic-bezier.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/warn-once.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-id.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/animation.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/easing.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/setters.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/array.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/PanSession.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/drag.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animate.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../src/components/sidebar/components/sidebar-header.tsx","../src/components/sidebar/components/sidebar-menu.tsx","../src/components/switch/components/switch.tsx","../src/components/table/index.tsx","../src/components/tabs/components/tab.tsx","../src/components/tabs/index.ts","../src/components/text/index.ts","../src/components/toast/components/toast.tsx","../src/components/toast/index.ts","../src/components/tooltip/components/tooltip.tsx","../src/components/uploader/components/uploader.tsx","../src/components/uploader/constants.ts","../src/components/index.ts","../src/config/theme/themeConfiguration.ts","../src/config/theme/components/index.ts","../src/config/theme/components/accordion.ts","../src/config/theme/components/alert.ts","../src/config/theme/components/badge.ts","../src/config/theme/components/button.ts","../src/config/theme/components/card.ts","../src/config/theme/components/checkbox.ts","../src/config/theme/components/chips.ts","../src/config/theme/components/form-label.ts","../src/config/theme/components/input.ts","../src/config/theme/components/loader.ts","../src/config/theme/components/modal.ts","../src/config/theme/components/popover.ts","../src/config/theme/components/radio.ts","../src/config/theme/components/switch.ts","../src/config/theme/components/table.ts","../src/config/theme/components/tabs.ts","../src/config/theme/components/textarea.ts","../src/config/theme/components/tooltip.ts","../src/hooks/useFetcher.ts","../src/provider/components/provider.tsx","../src/provider/index.ts","../src/hooks/index.ts"],"sourcesContent":["function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","export * from './components';\nexport * from './config';\nexport * from './hooks';\nexport * from './provider';\nexport { extendTheme, forwardRef } from '@chakra-ui/react';\n","import { Box } from '@chakra-ui/react';\nimport { Eye } from '@ctlyst.id/internal-icon';\n// eslint-disable-next-line import/prefer-default-export, react/require-default-props\nexport const AccordionEye = ({ position = 'left' }: { position?: 'left' | 'right' }) => {\n return (\n <Box\n boxSize={4}\n className=\"eye-icon\"\n {...(position === 'right' ? { position: 'relative', zIndex: 2, display: 'none' } : {})}\n >\n <Eye size={4} />\n </Box>\n );\n};\n","import { Box, useAccordionItemState } from '@chakra-ui/react';\n// eslint-disable-next-line import/prefer-default-export\nexport const AccordionIndicator = () => {\n const { isOpen } = useAccordionItemState();\n if (isOpen) {\n return <Box position=\"absolute\" left={0} width=\"2px\" height=\"100%\" bg=\"primary.500\" />;\n }\n return null;\n};\n","export * from './accordion-eye';\nexport * from './accordion-indicator';\nexport {\n Accordion,\n AccordionButton,\n AccordionButtonProps,\n AccordionIcon,\n AccordionIconProps,\n AccordionItem,\n AccordionItemProps,\n AccordionPanel,\n AccordionPanelProps,\n AccordionProps,\n AccordionProvider,\n useAccordion,\n useAccordionContext,\n useAccordionItem,\n UseAccordionItemProps,\n UseAccordionItemReturn,\n useAccordionItemState,\n UseAccordionProps,\n UseAccordionReturn,\n useAccordionStyles,\n} from '@chakra-ui/react';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps, SystemStyleObject, ThemingProps } from '@chakra-ui/system';\nimport { chakra, forwardRef, omitThemingProps, useMultiStyleConfig } from '@chakra-ui/system';\nimport React from 'react';\n\nimport type { AlertStatus } from './alert-context';\nimport { AlertProvider, AlertStylesProvider, getStatusColorScheme } from './alert-context';\n\ninterface AlertOptions {\n /**\n * The status of the alert\n * @default \"info\"\n */\n status?: AlertStatus;\n}\nexport type AlertVariant = 'solid' | 'light';\n\nexport interface AlertProps extends HTMLChakraProps<'div'>, AlertOptions, ThemingProps<'Alert'> {\n /**\n * @default false\n */\n addRole?: boolean;\n}\n\n/**\n * Alert is used to communicate the state or status of a\n * page, feature or action\n *\n * @see Docs https://chakra-ui.com/docs/components/alert\n * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/alert/\n */\nexport const Alert = forwardRef<AlertProps, 'div'>(function Alert(props, ref) {\n const { status = 'info', addRole = true, children, ...rest } = omitThemingProps(props);\n const colorScheme = props.colorScheme ?? getStatusColorScheme(status);\n\n const styles = useMultiStyleConfig('Alert', { ...props, colorScheme });\n\n const alertStyles: SystemStyleObject = {\n width: '100%',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto auto',\n alignItems: 'center',\n position: 'relative',\n overflow: 'hidden',\n ...styles.container,\n };\n\n return (\n <AlertProvider value={{ status }}>\n <AlertStylesProvider value={styles}>\n <chakra.div\n data-status={status}\n role={addRole ? 'alert' : undefined}\n ref={ref}\n {...rest}\n className={cx('chakra-alert', props.className)}\n __css={alertStyles}\n >\n {children}\n </chakra.div>\n </AlertStylesProvider>\n </AlertProvider>\n );\n});\n\nAlert.displayName = 'Alert';\n","import { createContext } from '@chakra-ui/react-context';\nimport type { SystemStyleObject } from '@chakra-ui/system';\n\nimport { CheckIcon, InfoIcon, WarningIcon } from './icons';\n\nexport const [AlertProvider, useAlertContext] = createContext<AlertContext>({\n name: 'AlertContext',\n hookName: 'useAlertContext',\n providerName: '<Alert />',\n});\n\nexport const [AlertStylesProvider, useAlertStyles] = createContext<Record<string, SystemStyleObject>>({\n name: `AlertStylesContext`,\n hookName: `useAlertStyles`,\n providerName: '<Alert />',\n});\n\nconst STATUSES = {\n info: { icon: InfoIcon, colorScheme: 'info' },\n warning: { icon: InfoIcon, colorScheme: 'warning' },\n success: { icon: CheckIcon, colorScheme: 'success' },\n error: { icon: WarningIcon, colorScheme: 'danger' },\n neutral: { icon: InfoIcon, colorScheme: 'neutral' },\n};\n\nexport function getStatusColorScheme(status: AlertStatus) {\n return STATUSES[status].colorScheme;\n}\n\nexport function getStatusIcon(status: AlertStatus) {\n return STATUSES[status].icon;\n}\n\nexport type AlertStatus = keyof typeof STATUSES;\n\nexport interface AlertContext {\n status: AlertStatus;\n}\n","/* eslint-disable react/require-default-props */\nimport { AlertTriangle, CheckCircle, Info } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nexport function CheckIcon() {\n return <CheckCircle color=\"inherit\" size={4} />;\n}\n\nexport function InfoIcon() {\n return <Info color=\"inherit\" size={4} />;\n}\n\nexport function WarningIcon() {\n return <AlertTriangle color=\"inherit\" size={4} />;\n}\n","/* eslint-disable import/prefer-default-export */\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\n\nimport Button from '../../button/components/button';\nimport { useAlertStyles } from './alert-context';\n\nexport type AlertActionProps = HTMLChakraProps<'button'>;\n\nexport function AlertAction({ children, className }: AlertActionProps) {\n const styles = useAlertStyles();\n const css = styles.action;\n\n return (\n <Button\n data-test-id=\"alert-action\"\n className={cx('chakra-alert__action', className)}\n variant=\"link\"\n fontWeight=\"semibold\"\n textStyle=\"text.xs\"\n __css={css}\n >\n {children}\n </Button>\n );\n}\n\nAlertAction.displayName = 'AlertAction';\n","/* eslint-disable test-selectors/button */\nimport type { ButtonProps as ButtonChakraProps } from '@chakra-ui/react';\nimport { Button as ButtonChakra, forwardRef } from '@chakra-ui/react';\nimport React from 'react';\n\nimport { Loader } from '../../loader';\n\nexport type ButtonProps = ButtonChakraProps;\n\nconst Button = forwardRef<ButtonProps, 'button'>((props, ref) => {\n const { children, variant, size, ...rest } = props;\n\n const getLoaderSize = () => {\n if (size === 'lg') return 'md';\n if (size === 'md') return 'sm';\n return 'xs';\n };\n\n const getLoaderColor = () => {\n if (variant === 'primary' || variant === 'danger') return 'white';\n if (variant === 'outline-danger') return 'danger';\n return 'primary';\n };\n\n return (\n <ButtonChakra\n size={size}\n variant={variant}\n spinner={<Loader size={getLoaderSize()} color={getLoaderColor()} />}\n ref={ref}\n {...rest}\n >\n {children}\n </ButtonChakra>\n );\n});\n\nexport default Button;\n","import type { HTMLChakraProps, ThemingProps } from '@chakra-ui/react';\nimport { Box, forwardRef, useStyleConfig } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface LoaderProps {\n size?: string;\n variant?: string;\n thickness?: string;\n}\n\nexport interface CustomLoaderProps\n extends HTMLChakraProps<'span'>,\n Omit<ThemingProps, 'size' | 'variant'>,\n LoaderProps {}\n\nconst Loader = forwardRef<CustomLoaderProps, 'div'>((props: CustomLoaderProps, ref) => {\n const styles = useStyleConfig('LoaderStyle', props);\n\n return <Box ref={ref} __css={styles} />;\n});\n\nLoader.defaultProps = {\n size: 'md',\n};\n\nexport default Loader;\n","export { default as Loader } from './components/loader';\nexport * from './components/loader';\nexport { Skeleton } from '@chakra-ui/react';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra } from '@chakra-ui/system';\nimport { Close } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nimport { useAlertStyles } from './alert-context';\n\nexport type AlertCloseProps = HTMLChakraProps<'span'>;\n\nexport function AlertClose({ className, children, ...rest }: AlertCloseProps) {\n const styles = useAlertStyles();\n const css = styles.close;\n\n return (\n <chakra.span\n display=\"inherit\"\n data-status={'alert-close'}\n {...rest}\n className={cx('chakra-alert__close', className)}\n __css={css}\n >\n {children || <Close color=\"inherit\" size={4} />}\n </chakra.span>\n );\n}\n\nAlertClose.displayName = 'AlertClose';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps, SystemStyleObject } from '@chakra-ui/system';\nimport { chakra, forwardRef } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertDescriptionProps = HTMLChakraProps<'div'>;\n\nexport const AlertDescription = forwardRef<AlertDescriptionProps, 'div'>(function AlertDescription(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n const descriptionStyles: SystemStyleObject = {\n display: 'inline',\n ...styles.description,\n };\n\n return (\n <chakra.div\n ref={ref}\n data-status={status}\n {...props}\n className={cx('chakra-alert__desc', props.className)}\n __css={descriptionStyles}\n />\n );\n});\n\nAlertDescription.displayName = 'AlertDescription';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { getStatusIcon, useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertIconProps = HTMLChakraProps<'span'>;\n\nexport function AlertIcon({ className, children, ...rest }: AlertIconProps) {\n const { status } = useAlertContext();\n const BaseIcon = getStatusIcon(status);\n const styles = useAlertStyles();\n const css = styles.icon;\n\n return (\n <chakra.span\n display=\"inherit\"\n data-status={status}\n {...rest}\n className={cx('chakra-alert__icon', className)}\n __css={css}\n >\n {children || <BaseIcon />}\n </chakra.span>\n );\n}\n\nAlertIcon.displayName = 'AlertIcon';\n","import { cx } from '@chakra-ui/shared-utils';\nimport type { HTMLChakraProps } from '@chakra-ui/system';\nimport { chakra, forwardRef } from '@chakra-ui/system';\nimport React from 'react';\n\nimport { useAlertContext, useAlertStyles } from './alert-context';\n\nexport type AlertTitleProps = HTMLChakraProps<'div'>;\n\nexport const AlertTitle = forwardRef<AlertTitleProps, 'div'>(function AlertTitle(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n\n return (\n <chakra.div\n ref={ref}\n data-status={status}\n {...props}\n className={cx('chakra-alert__title', props.className)}\n __css={styles.title}\n />\n );\n});\n\nAlertTitle.displayName = 'AlertTitle';\n","import type { LinkProps } from '@chakra-ui/react';\nimport { Link } from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { PropsWithChildren } from 'react';\nimport * as React from 'react';\n\nexport interface AnchorProps extends LinkProps, PropsWithChildren {\n isActive?: boolean;\n isChild?: boolean;\n}\n\nexport const Anchor = ({ children, isActive, isChild, ...props }: AnchorProps) => {\n return (\n <Link\n display=\"inline-block\"\n w=\"full\"\n p=\"4\"\n textStyle=\"text.md\"\n pl={isChild ? '10' : '4'}\n borderLeft=\"1px solid\"\n borderLeftColor={isActive ? 'primary.500' : 'neutral.400'}\n color={isActive ? 'primary.500' : 'black.high'}\n bg={isActive ? 'neutral.100' : 'white'}\n className={cx('catalyst-anchor', props.className)}\n _hover={{\n textDecoration: 'none',\n }}\n {...props}\n >\n {children}\n </Link>\n );\n};\n\nAnchor.displayName = 'Anchor';\nAnchor.defaultProps = {\n isActive: false,\n isChild: false,\n};\n\nexport default Anchor;\n","/* eslint-disable test-selectors/button */\nimport type { BadgeProps as BadgeChakraProps } from '@chakra-ui/react';\nimport { Badge as BadgeChakra } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface BadgeProps extends BadgeChakraProps {\n pill?: boolean;\n}\n\nconst Badge = (props: BadgeProps) => {\n const { children, pill, ...rest } = props;\n\n return (\n <BadgeChakra\n borderRadius={pill ? 'xl' : 'sm'}\n display=\"inline-flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n textTransform=\"none\"\n {...rest}\n >\n {children}\n </BadgeChakra>\n );\n};\n\nBadge.defaultProps = {\n pill: false,\n};\n\nexport default Badge;\n","import { Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, IconButton, Text } from '@chakra-ui/react';\nimport { ChevronLeft, ChevronsRight, Home } from '@ctlyst.id/internal-icon';\nimport * as React from 'react';\n\nexport interface BreadCrumbParentProps {\n name: string;\n onClick?: () => void;\n disable?: boolean;\n link: string;\n}\n\nexport interface BreadCrumbProps {\n title: string;\n children?: React.ReactNode;\n parents?: BreadCrumbParentProps[];\n className?: string;\n disableHome?: boolean;\n spacing?: number;\n backButton?: () => void;\n}\n\nconst BreadCrumb: React.FC<BreadCrumbProps> = props => {\n const { title, children, parents, className, disableHome, spacing = 2, backButton } = props;\n\n return (\n <Box\n data-test-id=\"CT_component_breadcrumb\"\n className={className}\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n paddingY={2}\n >\n <Box display=\"flex\" alignItems=\"center\">\n <Flex gap={2} align=\"center\">\n {backButton && (\n <IconButton\n data-test-id=\"\"\n border=\"1px solid\"\n borderColor=\"neutral.100\"\n size=\"sm\"\n minH=\"9\"\n minW=\"9\"\n bg=\"white\"\n variant=\"ghost\"\n aria-label=\"Edit\"\n icon={<ChevronLeft size={5} />}\n />\n )}\n <Text pr=\"2\" textStyle=\"heading.6\" color=\"neutral.700\">\n {title}\n </Text>\n </Flex>\n <Box h=\"5.5\" borderLeft=\"1px solid\" borderColor=\"neutral.600\" />\n <Breadcrumb\n alignItems=\"center\"\n separator={\n <Box boxSize=\"3.5\">\n <ChevronsRight color=\"neutral.600\" size={3.5} />\n </Box>\n }\n pl=\"2\"\n pr=\"4\"\n spacing={spacing}\n >\n <BreadcrumbItem>\n <BreadcrumbLink\n alignItems=\"center\"\n href={!disableHome ? '/' : undefined}\n style={{ ...(disableHome && { cursor: 'default' }) }}\n >\n <Box boxSize=\"3.5\">\n <Home size={3.5} color=\"primary.500\" />\n </Box>\n </BreadcrumbLink>\n </BreadcrumbItem>\n {parents?.map(val => (\n <BreadcrumbItem key={val.name}>\n <BreadcrumbLink\n data-test-id=\"\"\n href={!val.disable ? val.link : undefined}\n onClick={val.onClick}\n style={{\n ...(val.disable && {\n cursor: 'default',\n }),\n }}\n _hover={{ textDecoration: 'none' }}\n >\n <Text color={val.disable ? 'neutral.600' : 'primary.500'} textStyle=\"text.sm\">\n {val.name}\n </Text>\n </BreadcrumbLink>\n </BreadcrumbItem>\n ))}\n <BreadcrumbItem>\n <BreadcrumbLink _hover={{ textDecor: 'none', cursor: 'default' }}>\n <Text color=\"neutral.600\" textStyle=\"text.sm\">\n {title}\n </Text>\n </BreadcrumbLink>\n </BreadcrumbItem>\n </Breadcrumb>\n </Box>\n {children && <Box>{children}</Box>}\n </Box>\n );\n};\n\nBreadCrumb.defaultProps = {\n children: undefined,\n parents: undefined,\n className: undefined,\n disableHome: undefined,\n spacing: 2,\n backButton: undefined,\n};\n\nexport default BreadCrumb;\n","export { default as Button } from './components/button';\nexport * from './components/button';\nexport {\n ButtonGroup,\n ButtonGroupProps,\n CloseButton,\n CloseButtonProps,\n IconButton,\n IconButtonProps,\n} from '@chakra-ui/react';\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Card, useStyleConfig } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nexport interface CardProps extends BoxProps {\n withShadow?: boolean;\n isRounded?: boolean;\n}\n\nconst CardCustom = forwardRef<HTMLDivElement, CardProps>(({ children, ...rest }, ref) => {\n const styles = useStyleConfig('Card', rest);\n\n return (\n <Card __css={styles} backgroundColor=\"white.high\" ref={ref} {...rest}>\n {children}\n </Card>\n );\n});\n\nCardCustom.defaultProps = {\n withShadow: true,\n isRounded: true,\n};\n\nexport default CardCustom;\n","/* eslint-disable no-nested-ternary */\nimport type { BoxProps, CheckboxProps } from '@chakra-ui/react';\nimport { Box, Checkbox, forwardRef, Text, useCheckbox } from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {\n isError?: boolean;\n helpText?: string;\n errorText?: string;\n boxProps?: BoxProps;\n}\n\nconst CheckboxComponent = forwardRef<CheckboxComponentProps, 'input'>(\n ({ isError = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {\n const { state } = useCheckbox(rest);\n const variant = isError ? 'errors' : 'unstyled';\n\n return (\n <Box>\n <Box display=\"flex\" {...boxProps}>\n <Checkbox\n variant={variant}\n ref={ref}\n {...rest}\n isDisabled={isDisabled}\n color=\"white\"\n icon={\n state.isIndeterminate ? (\n <Icon.MinusLine size={3} color=\"inherit\" />\n ) : (\n <Icon.Check size={3} color=\"inherit\" />\n )\n }\n >\n {children && (\n <Text as=\"span\" display=\"block\" textStyle=\"text.sm\" color={isDisabled ? 'black.medium' : 'black.high'}>\n {children}\n </Text>\n )}\n </Checkbox>\n </Box>\n {((isError && errorText) || helpText) && (\n <Box mt=\"1\" ml=\"6\">\n {isError ? (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"danger.500\">\n {errorText}\n </Text>\n ) : (\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"black.medium\">\n {helpText}\n </Text>\n )}\n </Box>\n )}\n </Box>\n );\n }\n);\n\nCheckboxComponent.displayName = 'Checkbox';\nCheckboxComponent.defaultProps = {\n isError: false,\n helpText: undefined,\n errorText: undefined,\n boxProps: undefined,\n};\n\nexport default CheckboxComponent;\n","/* eslint-disable no-nested-ternary */\nimport type { CheckboxGroupProps } from '@chakra-ui/react';\nimport { Box, CheckboxGroup, Stack } from '@chakra-ui/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\n\nexport interface CheckboxGroupComponentProps extends FieldProps, CheckboxGroupProps, PropsWithChildren {\n label: string;\n helpText?: string;\n isError?: boolean;\n errorMessage?: string;\n}\n\nfunction CheckboxGroupComponent(props: CheckboxGroupComponentProps) {\n const { children, label, helpText, isError, errorMessage, ...rest } = props;\n return (\n <Field {...rest} label={label} leftHelperText={helpText} isError={isError} errorMessage={errorMessage}>\n <Box mt=\"2\" mb=\"1\">\n <CheckboxGroup {...rest}>\n <Stack spacing={[1, '16px']} direction={['column', 'row']}>\n {children}\n </Stack>\n </CheckboxGroup>\n </Box>\n </Field>\n );\n}\n\nCheckboxGroupComponent.defaultProps = {\n helpText: '',\n isError: false,\n errorMessage: '',\n};\n\nexport default CheckboxGroupComponent;\n","/* eslint-disable no-nested-ternary */\nimport type { FormControlProps } from '@chakra-ui/react';\nimport { Box, FormControl, FormErrorMessage, FormHelperText, FormLabel } from '@chakra-ui/react';\nimport type { FC, PropsWithChildren, ReactNode } from 'react';\nimport React from 'react';\n\nexport interface Props {\n label?: string | ReactNode;\n isError?: boolean;\n isSuccess?: boolean;\n errorMessage?: string | ReactNode;\n leftHelperText?: string | ReactNode;\n rightHelperText?: string | ReactNode;\n isRequired?: boolean;\n boxProps?: FormControlProps;\n}\n\nexport type FieldProps<T = unknown> = Props & T;\n\nconst Field: FC<PropsWithChildren<Props>> = props => {\n const {\n label,\n isError,\n errorMessage,\n leftHelperText,\n rightHelperText,\n isRequired,\n children,\n isSuccess,\n boxProps = {},\n } = props;\n\n const getHelperColor = () => {\n if (isError) return 'danger.500';\n if (isSuccess) return 'success.500';\n return 'black.medium';\n };\n\n const getJustifyContentHelper = () => {\n if (rightHelperText && (!leftHelperText || (isError && !errorMessage))) return 'flex-end';\n return 'space-between';\n };\n\n const helperColor = getHelperColor();\n const justifyHelper = getJustifyContentHelper();\n\n return (\n <FormControl isInvalid={isError} {...boxProps}>\n {label &&\n (typeof label === 'string' ? (\n <FormLabel mb={1} fontSize=\"text.sm\" requiredIndicator={undefined}>\n {isRequired && (\n <Box as=\"span\" color=\"danger.500\" ml={0} mr={1}>\n *\n </Box>\n )}\n {label}\n </FormLabel>\n ) : (\n label\n ))}\n {children}\n {((isError && errorMessage) || leftHelperText || rightHelperText) && (\n <Box display=\"flex\" width=\"full\" justifyContent={justifyHelper}>\n {!isError ? (\n leftHelperText &&\n (typeof leftHelperText === 'string' ? (\n <FormHelperText fontSize=\"text.xs\" color={helperColor} mt={1}>\n {leftHelperText}\n </FormHelperText>\n ) : (\n leftHelperText\n ))\n ) : typeof errorMessage === 'string' ? (\n <FormErrorMessage fontSize=\"text.xs\" color=\"danger.500\" mt={1}>\n {errorMessage}\n </FormErrorMessage>\n ) : (\n errorMessage\n )}\n {rightHelperText &&\n (typeof rightHelperText === 'string' ? (\n <FormHelperText fontSize=\"text.xs\" color={helperColor} mt={1}>\n {rightHelperText}\n </FormHelperText>\n ) : (\n rightHelperText\n ))}\n </Box>\n )}\n </FormControl>\n );\n};\n\nField.defaultProps = {\n label: '',\n isError: false,\n isSuccess: false,\n errorMessage: undefined,\n leftHelperText: undefined,\n rightHelperText: undefined,\n isRequired: false,\n boxProps: {},\n};\n\nexport default Field;\n","export { default as Checkbox } from './components/checkbox';\nexport * from './components/checkbox';\nexport { default as CheckboxGroup } from './components/checkbox-group';\nexport * from './components/checkbox-group';\nexport {\n CheckboxGroupContext,\n CheckboxGroupProps,\n CheckboxIcon,\n CheckboxIconProps,\n CheckboxState,\n useCheckbox,\n useCheckboxGroup,\n UseCheckboxGroupProps,\n UseCheckboxGroupReturn,\n UseCheckboxProps,\n UseCheckboxReturn,\n} from '@chakra-ui/react';\n","/* eslint-disable react/require-default-props */\nimport { Tag, TagCloseButton, TagLabel } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface ChipsProps {\n isDisabled?: boolean;\n isActive?: boolean;\n onClose?: () => void;\n label?: string;\n size?: 'sm' | 'md';\n onClick?: () => void;\n}\n\nconst Chips = ({ label, size, onClick, ...rest }: ChipsProps) => {\n const { isActive, isDisabled, onClose } = rest;\n\n const variant = isDisabled ? 'disabled' : 'outline';\n\n const handleClose = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n if (onClose) {\n e.stopPropagation();\n onClose();\n }\n };\n\n return (\n <Tag\n data-test-id=\"\"\n onClick={onClick}\n size={size}\n key={size}\n borderRadius=\"full\"\n variant={isActive ? 'solid' : variant}\n >\n <TagLabel>{label}</TagLabel>\n {onClose && <TagCloseButton data-test-id=\"\" onClick={handleClose} />}\n </Tag>\n );\n};\n\nChips.defaultProps = {\n isDisabled: false,\n isActive: false,\n onClose: undefined,\n label: undefined,\n size: 'sm',\n};\n\nexport default Chips;\n","/* eslint-disable react/require-default-props */\nimport { Box, HStack, IconButton, Text } from '@chakra-ui/react';\nimport React, { useCallback } from 'react';\nimport { FiMinus, FiPlus } from 'react-icons/fi';\n\nimport { InputField } from '../../form';\n\nexport interface CounterProps {\n value: number;\n size?: string;\n min?: number;\n max?: number;\n onChange: (val: number) => void;\n isError?: boolean;\n disabled?: boolean;\n error?: string | React.ReactNode;\n helperText?: string | React.ReactNode;\n isReadOnly?: boolean;\n}\n\nconst Counter = ({\n value,\n size = 'xs',\n min = 0,\n max = 9999,\n onChange,\n isError = false,\n disabled = false,\n error = '',\n helperText = '',\n isReadOnly = false,\n}: CounterProps) => {\n const decrement = () => {\n onChange(value - 1);\n };\n\n const increment = () => {\n onChange(value + 1);\n };\n\n const handleChangeInput = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleanedInputValue = inputValue.replace(/^0+/, '') || '0';\n const parsedValue = parseInt(cleanedInputValue, 10);\n const newValue = Math.max(Math.min(parsedValue, max), min);\n e.target.value = newValue.toString();\n\n onChange(newValue);\n },\n [onChange, max, min]\n );\n\n return (\n <Box>\n <HStack gap=\"1\">\n <IconButton\n aria-label=\"minus\"\n data-test-id=\"CT_Component_Counter_decrement\"\n onClick={decrement}\n isDisabled={disabled || +value <= min}\n size={size}\n icon={<FiMinus />}\n />\n <InputField\n data-test-id=\"CT_Component_Counter_input\"\n value={value}\n isError={isError}\n isDisabled={disabled || max === 0}\n textAlign=\"center\"\n size={size}\n min={min}\n max={max}\n onChange={handleChangeInput}\n isReadOnly={isReadOnly}\n width={11.5}\n type=\"number\"\n onFocus={e => e.target.select()}\n borderColor={isError ? 'danger.500' : 'neutral.400'}\n />\n <IconButton\n aria-label=\"plus\"\n data-test-id=\"CT_Component_Counter_decrement\"\n onClick={increment}\n isDisabled={disabled || +value >= max}\n size={size}\n icon={<FiPlus />}\n />\n </HStack>\n {!isError ? (\n <Text mt={1} color=\"black.medium\" textStyle={'text.xs'}>\n {helperText}\n </Text>\n ) : (\n <Text mt={1} color=\"danger.500\" textStyle={'text.xs'}>\n {error}\n </Text>\n )}\n </Box>\n );\n};\n\nexport default Counter;\n","import { InputLeftAddon, InputRightAddon } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface InputAddonProps {\n children: React.ReactNode;\n}\n\nexport const InputAddonLeft = ({ children, ...props }: InputAddonProps) => {\n return (\n <InputLeftAddon backgroundColor=\"neutral.200\" px={3} py={2.5} style={{ border: 0, marginInlineEnd: 0 }} {...props}>\n {children}\n </InputLeftAddon>\n );\n};\n\nexport const InputAddonRight = ({ children, ...props }: InputAddonProps) => {\n return (\n <InputRightAddon\n backgroundColor=\"neutral.200\"\n px={3}\n py={2.5}\n style={{ border: 0, marginInlineStart: 0 }}\n {...props}\n >\n {children}\n </InputRightAddon>\n );\n};\n","export { InputLeftElement as InputElementLeft } from '@chakra-ui/react';\nexport { InputRightElement as InputElementRight } from '@chakra-ui/react';\n","import type { InputProps as ChakraInputProps } from '@chakra-ui/react';\nimport { Box, Input as ChakraInput, InputGroup } from '@chakra-ui/react';\nimport { Close, Eye, EyeOff } from '@ctlyst.id/internal-icon';\nimport type { ReactNode } from 'react';\nimport React, { useMemo, useState } from 'react';\n\nimport type { FieldProps } from '../../field/components/field';\nimport Field from '../../field/components/field';\nimport { Loader } from '../../loader';\n\nexport interface InputFieldProps extends ChakraInputProps, FieldProps {\n addOnLeft?: ReactNode;\n addOnRight?: ReactNode;\n withClear?: boolean;\n isLoading?: boolean;\n onClear?: () => void;\n}\n\nconst InputField = React.forwardRef<HTMLInputElement, InputFieldProps>((props, ref) => {\n const {\n value,\n type,\n addOnLeft,\n addOnRight,\n size,\n isRequired,\n label,\n isError,\n isSuccess,\n isDisabled,\n errorMessage,\n leftHelperText,\n rightHelperText,\n withClear,\n onClear,\n isLoading,\n ...inputProps\n } = props;\n\n const getProperties = () => {\n let outlineColor = 'neutral.400';\n let focusColor = 'primary.500';\n\n if (isError || isDisabled || isSuccess) {\n if (isError) outlineColor = 'danger.500';\n else if (isSuccess) outlineColor = 'success.500';\n focusColor = outlineColor;\n }\n\n return {\n outlineColor,\n focusColor,\n };\n };\n\n const [isShowPassword, setIsShowPassword] = useState(false);\n\n const inputType = useMemo(() => {\n return type === 'password' && isShowPassword ? 'text' : type;\n }, [isShowPassword, type]);\n\n const fontSize = useMemo(() => {\n if (type === 'password') {\n if (!isShowPassword && value) return 'text.xl';\n }\n return 'text.sm';\n }, [isShowPassword, type, value]);\n\n const iconColor = useMemo(() => {\n return isDisabled ? 'black.low' : 'black.medium';\n }, [isDisabled]);\n\n const { outlineColor, focusColor } = getProperties();\n\n return (\n <Field\n label={label}\n isSuccess={isSuccess}\n isError={isError}\n errorMessage={errorMessage}\n leftHelperText={leftHelperText}\n rightHelperText={rightHelperText}\n isRequired={isRequired}\n >\n <Box\n transition=\"all 0.15s\"\n boxShadow=\"none\"\n borderRadius=\"sm\"\n border=\"1px solid\"\n borderColor={outlineColor}\n _focusWithin={{\n borderColor: focusColor,\n }}\n >\n <InputGroup\n size={size}\n borderRadius=\"sm\"\n backgroundColor={isDisabled ? 'neutral.300' : 'white.high'}\n cursor={isDisabled ? 'not-allowed' : 'default'}\n >\n {addOnLeft}\n <ChakraInput\n ref={ref}\n type={inputType}\n value={value}\n isDisabled={isDisabled}\n isSuccess={isSuccess}\n {...inputProps}\n fontSize={fontSize}\n />\n {(withClear || isLoading || type === 'password') && (\n <Box\n data-test-id=\"CT_Component_ClearInput\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n width=\"16px\"\n mr=\"10px\"\n >\n {withClear && !isLoading && (\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n onClick={!isDisabled ? onClear : undefined}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n >\n <Close size={4} color={iconColor} />\n </Box>\n )}\n {type === 'password' && !isShowPassword && !isLoading && (\n <Box\n data-test-id=\"q2Bj2G4FlamXyHuRKMZ1Q\"\n onClick={() => {\n if (!isDisabled) setIsShowPassword(true);\n }}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n display=\"flex\"\n justifyContent=\"center\"\n >\n <EyeOff size={4} color={iconColor} />\n </Box>\n )}\n {type === 'password' && isShowPassword && !isLoading && (\n <Box\n data-test-id=\"sfc2388bmeXBmdla45Ibk\"\n onClick={() => {\n if (!isDisabled) setIsShowPassword(false);\n }}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n display=\"flex\"\n justifyContent=\"center\"\n >\n <Eye size={4} color={iconColor} />\n </Box>\n )}\n {isLoading && <Loader size=\"sm\" />}\n </Box>\n )}\n {addOnRight}\n </InputGroup>\n </Box>\n </Field>\n );\n});\n\nInputField.displayName = 'InputField';\nInputField.defaultProps = {\n addOnLeft: undefined,\n addOnRight: undefined,\n withClear: undefined,\n isLoading: undefined,\n onClear: undefined,\n};\n\nexport default InputField;\n","import type { TextareaProps as ChakraTextareaProps } from '@chakra-ui/react';\nimport { Box, Textarea as ChakraTextarea } from '@chakra-ui/react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\nimport { Loader } from '../../loader';\n\nexport interface TextAreaProps extends ChakraTextareaProps, FieldProps {\n isLoading?: boolean;\n}\n\nconst TextareaField = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, ref) => {\n const { value, isLoading, ...inputProps } = props;\n\n return (\n <Field {...inputProps}>\n <Box position=\"relative\">\n <ChakraTextarea ref={ref} value={value} {...inputProps} />\n {isLoading && (\n <Box zIndex={999} top={2} right={2} position=\"absolute\">\n <Loader size=\"sm\" />\n </Box>\n )}\n </Box>\n </Field>\n );\n});\n\nTextareaField.defaultProps = {\n isLoading: undefined,\n};\n\nexport default TextareaField;\n","export * from './components/input-addon';\nexport * from './components/input-element';\nexport { default as InputField } from './components/input-field';\nexport * from './components/input-field';\nexport { default as TextareaField } from './components/textarea';\nexport * from './components/textarea';\nexport {\n FormControl,\n FormControlProps,\n FormErrorMessage,\n FormHelperText,\n FormLabel,\n FormLabelProps,\n InputGroup,\n InputGroupProps,\n InputLeftAddon,\n InputLeftAddonProps,\n InputLeftElement,\n InputLeftElementProps,\n InputProps,\n InputRightAddon,\n InputRightAddonProps,\n InputRightElement,\n InputRightElementProps,\n RequiredIndicator,\n RequiredIndicatorProps,\n} from '@chakra-ui/react';\n","/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable react/no-unstable-nested-components */\nimport { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from '@chakra-ui/icons';\nimport type {\n BoxProps,\n SystemStyleObject,\n TableBodyProps,\n TableCellProps,\n TableColumnHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from '@chakra-ui/react';\nimport {\n Box,\n Checkbox,\n Flex,\n Skeleton,\n Table,\n Tbody,\n Td,\n Text,\n Th,\n Thead,\n Tr,\n useColorModeValue,\n} from '@chakra-ui/react';\nimport { css } from '@emotion/react';\nimport type {\n Column,\n ColumnDef,\n ColumnPinningState,\n OnChangeFn,\n RowSelectionInstance,\n RowSelectionState,\n SortingState,\n Updater,\n} from '@tanstack/react-table';\nimport { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';\nimport * as React from 'react';\nimport { useRef } from 'react';\n\nexport interface TableStyleProps {\n table?: TableProps;\n tableHead?: TableHeadProps;\n tableRow?: TableRowProps;\n tableBody?: TableBodyProps;\n tableColumnHeader?: TableColumnHeaderProps;\n tableCell?: TableCellProps;\n}\n\nexport interface DataTableProps<T extends { disabled?: Record<string, boolean> }> {\n container?: BoxProps;\n styles?: TableStyleProps;\n columns: ColumnDef<T>[];\n dataSource: T[] | undefined;\n isLoading?: boolean;\n withSelectedRow?: boolean | undefined;\n onSelectedRow?: (data: T[]) => void;\n onSort?: (data: SortingState) => void;\n manualSorting?: boolean;\n sortingState?: SortingState;\n sortDescFirst?: boolean;\n headerSticky?: boolean;\n columnPinning?: ColumnPinningState;\n onRowClick?: (data: T) => void;\n}\n\nconst getCommonPinningStyles = <T,>(column: Column<T>): SystemStyleObject => {\n const isPinned = column.getIsPinned();\n const isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');\n const isFirstRightPinnedColumn = isPinned === 'right' && column.getIsFirstColumn('right');\n\n return {\n left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,\n right: isPinned === 'right' ? `${column.getAfter('right')}px` : undefined,\n position: isPinned ? 'sticky' : 'relative',\n zIndex: isPinned ? 1 : 0,\n backgroundColor: 'white',\n ...(isLastLeftPinnedColumn\n ? {\n padding: 0,\n '&:after': {\n content: \"''\",\n position: 'absolute',\n width: '30px',\n right: '0px',\n bottom: '-1px',\n top: 0,\n transform: 'translateX(100%)',\n boxShadow: 'inset 14px 0px 20px -10px #00000010',\n },\n }\n : {}),\n ...(isFirstRightPinnedColumn\n ? {\n padding: '0px 0px 0px 8px',\n '&:after': {\n content: \"''\",\n position: 'absolute',\n width: '30px',\n left: '0%',\n top: 0,\n bottom: '-1px',\n transform: 'translateX(-100%)',\n boxShadow: 'inset -14px 0px 20px -10px #00000010',\n },\n }\n : {}),\n };\n};\nexport type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;\n\nexport const useDataTable = <T extends { disabled?: Record<string, boolean> }>({\n columns,\n dataSource = [],\n withSelectedRow,\n onSelectedRow,\n onSort,\n sortDescFirst,\n sortingState,\n manualSorting,\n columnPinning,\n}: DataTableProps<T>) => {\n const [isFirstLoad, setIsFirstLoad] = React.useState<boolean>(true);\n const [sorting, setSorting] = React.useState<SortingState>(sortingState ?? []);\n const [rowSelection, onRowSelectionChange] = React.useState<RowSelectionState>({});\n const dataColumns = React.useMemo<ColumnDef<T>[]>(() => columns, [columns]);\n const checkboxColumn = React.useMemo<ColumnDef<T>[]>(\n () => [\n {\n id: 'select',\n size: 32,\n header: ({ table }) => (\n <Checkbox\n data-test-id=\"select-header-data-table\"\n {...{\n isChecked: table.getIsAllRowsSelected(),\n isIndeterminate: table.getIsSomeRowsSelected(),\n onChange: table.getToggleAllRowsSelectedHandler(),\n }}\n />\n ),\n cell: ({ row }) => (\n <Checkbox\n data-test-id={`select-data-table-${row.index}`}\n {...{\n isChecked: row.getIsSelected(),\n isIndeterminate: row.getIsSomeSelected(),\n onChange: row.getToggleSelectedHandler(),\n }}\n />\n ),\n },\n ],\n []\n );\n\n const generateColumn = () => {\n if (withSelectedRow) {\n return [...checkboxColumn, ...dataColumns];\n }\n return dataColumns;\n };\n\n const onSortingChange: OnChangeFn<SortingState> = (data: Updater<SortingState>) => {\n setSorting(data);\n };\n\n const table = useReactTable({\n data: dataSource,\n columns: generateColumn(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n manualPagination: true,\n manualSorting,\n sortDescFirst,\n state: {\n sorting,\n rowSelection,\n ...(columnPinning ? { columnPinning } : {}),\n },\n onRowSelectionChange,\n onSortingChange,\n });\n\n const { getSelectedRowModel, toggleAllRowsSelected } = table;\n const { flatRows } = getSelectedRowModel();\n React.useEffect(() => {\n const rowData = flatRows.map(row => row.original);\n if (onSelectedRow) {\n onSelectedRow(rowData);\n }\n }, [flatRows]);\n\n React.useEffect(() => {\n if (onSort && !isFirstLoad) {\n onSort(sorting);\n }\n }, [sorting]);\n\n React.useEffect(() => {\n setIsFirstLoad(false);\n }, []);\n return {\n table,\n toggleAllRowsSelected,\n generateColumn,\n };\n};\n\nconst DataTable = React.forwardRef(\n <T extends { disabled?: Record<string, boolean> }>(props: DataTableProps<T>, ref?: React.Ref<DataTableRefs<T>>) => {\n const { isLoading, styles, headerSticky, onRowClick, container } = props;\n const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);\n React.useImperativeHandle(ref, () => ({\n toggleAllRowsSelected,\n }));\n\n return (\n <Box overflowX=\"auto\" position=\"relative\" maxW=\"100%\" minH={400} w=\"full\" {...container}>\n {isLoading ? (\n <Table {...styles?.table} data-loading=\"true\">\n <Thead {...(styles?.tableHead, headerSticky ? { position: 'sticky', top: 0, bg: 'white', zIndex: 1 } : {})}>\n {table.getHeaderGroups().map(headerGroup => (\n <Tr mx=\"2\" key={headerGroup.id} {...styles?.tableRow}>\n {headerGroup.headers.map((header, index) => (\n <Th\n key={header.id}\n colSpan={header.colSpan}\n width={`${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`}\n {...styles?.tableColumnHeader}\n >\n <Flex\n data-test-id=\"CT_component_data-table_loader\"\n textTransform=\"capitalize\"\n align=\"center\"\n gap={2}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n </Flex>\n </Th>\n ))}\n </Tr>\n ))}\n </Thead>\n\n <Tbody>\n {[...Array(5)].map(num => (\n <Tr mx=\"2\" key={num}>\n {[...Array(generateColumn().length)].map(i => (\n <Td key={i} width={210}>\n <Skeleton startColor=\"gray.50\" endColor=\"gray.100\" key={i} h=\"30px\" w=\"100%\" />\n </Td>\n ))}\n </Tr>\n ))}\n </Tbody>\n </Table>\n ) : (\n <Table {...styles?.table}>\n <Thead {...(styles?.tableHead, headerSticky ? { position: 'sticky', top: 0, bg: 'white', zIndex: 1 } : {})}>\n {table.getHeaderGroups().map(headerGroup => (\n <Tr key={headerGroup.id} bg={useColorModeValue('initial', 'ebony-clay.700')} {...styles?.tableRow}>\n {headerGroup.headers.map((header, index) => (\n <Th\n key={header.id}\n colSpan={header.colSpan}\n sx={getCommonPinningStyles(header.column)}\n width={`${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`}\n {...styles?.tableColumnHeader}\n >\n <Flex\n backgroundColor=\"white\"\n height={'100%'}\n data-test-id={`CT_Container_TableHeader_${header.id}`}\n textTransform=\"capitalize\"\n userSelect=\"none\"\n align=\"center\"\n gap={2}\n >\n <Text>{flexRender(header.column.columnDef.header, header.getContext())}</Text>\n <Box\n as=\"span\"\n cursor={header.column.getCanSort() ? 'pointer' : 'default'}\n data-test-id={`CT_Container_SortingIcon_${header.id}`}\n onClick={header.column.getToggleSortingHandler()}\n >\n {(header.column.getCanSort() &&\n {\n asc: <ChevronUpIcon h={4} w={4} color=\"neutral.500\" />,\n desc: <ChevronDownIcon h={4} w={4} color=\"neutral.500\" />,\n }[header.column.getIsSorted() as string]) ?? <UpDownIcon h={4} w={4} color=\"neutral.500\" />}\n </Box>\n </Flex>\n </Th>\n ))}\n </Tr>\n ))}\n </Thead>\n <Tbody {...styles?.tableBody}>\n {table.getRowModel().rows.map(row => {\n const trRef = useRef<HTMLTableRowElement>();\n return (\n <Tr\n data-test-id=\"-RU0hNYGRzeVM3HQ4cXHl\"\n tabindex=\"0\"\n ref={trRef}\n key={row.id}\n {...styles?.tableRow}\n css={css`\n &:last-child {\n td {\n border-bottom: none;\n }\n }\n `}\n onMouseDown={() => {\n trRef.current?.setAttribute('data-active', 'true');\n }}\n onMouseUp={() => {\n trRef.current?.removeAttribute('data-active');\n }}\n onClick={() => {\n if (onRowClick) {\n onRowClick(row.original);\n }\n }}\n >\n {row.getVisibleCells().map(cell => {\n const isDisabled = cell.row.original?.disabled?.[cell.column.id];\n return (\n <Td\n data-test-id={`CT_Component_TableCell_${cell.id}`}\n key={cell.id}\n fontSize=\"text.sm\"\n sx={getCommonPinningStyles(cell.column)}\n {...styles?.tableCell}\n >\n <Flex height={'100%'} align=\"center\" opacity={isDisabled ? 0.5 : 1}>\n <Flex\n tabIndex={0}\n display=\"inline-flex\"\n cursor=\"auto\"\n data-test-id={`CT_Component_TableCell_Content-${cell.id}`}\n onMouseUp={e => e.stopPropagation()}\n onMouseDown={e => e.stopPropagation()}\n onClick={e => {\n e.stopPropagation();\n }}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Flex>\n </Flex>\n </Td>\n );\n })}\n </Tr>\n );\n })}\n </Tbody>\n </Table>\n )}\n </Box>\n );\n }\n);\n\nexport default DataTable as <T extends { disabled?: Record<string, boolean> }>(\n props: DataTableProps<T> & {\n ref?: React.Ref<DataTableRefs<T>>;\n }\n) => JSX.Element;\n","import {\n FormControl,\n FormErrorMessage,\n FormHelperText,\n FormLabel,\n IconButton,\n InputGroup,\n InputRightElement,\n} from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport { Calendar, Close } from '@ctlyst.id/internal-icon';\nimport React from 'react';\nimport type { DatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\n\nimport { InputField } from '../../form';\nimport Styles from './styles';\nimport TimeInput from './time-input';\n\nexport type DatepickerProps = DatePickerProps & {\n id?: string;\n isRequired?: boolean;\n label?: string;\n error?: string | React.ReactNode;\n isError?: boolean;\n helperText?: string | React.ReactNode;\n withTime?: boolean;\n onClear?: () => void;\n showMonth?: boolean;\n shortMonth?: boolean;\n};\n\nconst Datepicker: React.FC<DatepickerProps> = ({\n id,\n label,\n error,\n isError,\n helperText,\n isRequired,\n withTime,\n value,\n name,\n onClear,\n showMonth,\n shortMonth,\n ...props\n}) => {\n const selected = value ? new Date(value) : undefined;\n const dateFormat = props.dateFormat ?? withTime ? 'dd MMMM yyyy, HH:mm' : 'dd MMMM yyyy';\n\n const getTimeProps = (): Pick<DatePickerProps, 'showTimeInput' | 'customTimeInput' | 'timeInputLabel'> => {\n if (!withTime) return {};\n return {\n timeInputLabel: '',\n showTimeInput: true,\n customTimeInput: <TimeInput />,\n };\n };\n const hasMultipleMonthShow = (props?.monthsShown ?? 1) < 2;\n const component = (\n <>\n <Styles showHeader={!hasMultipleMonthShow} />\n <ReactDatePicker\n id={id}\n name={name}\n selected={selected}\n customInput={<InputField autoComplete=\"off\" />}\n showPopperArrow={false}\n calendarClassName={cx({ inline: props.inline })}\n dropdownMode=\"select\"\n showMonthDropdown={hasMultipleMonthShow}\n showYearDropdown={hasMultipleMonthShow}\n shouldCloseOnSelect={!(props.selectsRange || withTime)}\n useShortMonthInDropdown={showMonth ? shortMonth : false}\n dateFormat={dateFormat}\n {...getTimeProps()}\n {...props}\n />\n </>\n );\n\n if (props.inline) {\n return component;\n }\n\n return (\n <FormControl isRequired={isRequired} data-test-id=\"CT_Component_datepicker_wrapper\" isInvalid={isError}>\n {label && <FormLabel fontSize=\"text.sm\">{label}</FormLabel>}\n <InputGroup>\n {component}\n <InputRightElement alignSelf={'center'} bottom={0} flexDir=\"row-reverse\" width={'auto'} mr={2} gap={2}>\n <Calendar size={4} color={'neutral.400'} />\n {value && (\n <IconButton\n data-test-id=\"H0rseVCzGIaqoLho-EPbu\"\n display={'flex'}\n alignItems={'center'}\n variant={'unstyled'}\n aria-label=\"Remove\"\n onClick={onClear}\n cursor=\"pointer\"\n size=\"sm\"\n minW={'unset'}\n icon={<Close size={4} color={'neutral.600'} />}\n />\n )}\n </InputRightElement>\n </InputGroup>\n {!isError ? (\n <FormHelperText fontSize=\"text.xs\" mt={1}>\n {helperText}\n </FormHelperText>\n ) : (\n <FormErrorMessage fontSize=\"text.xs\" mt={1}>\n {error}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nDatepicker.defaultProps = {\n id: undefined,\n isRequired: undefined,\n label: undefined,\n error: undefined,\n isError: undefined,\n helperText: undefined,\n withTime: undefined,\n onClear: undefined,\n shortMonth: false,\n showMonth: false,\n};\n\nexport default Datepicker;\n","import { useColorMode } from '@chakra-ui/system';\nimport { Global } from '@emotion/react';\n\nconst Styles = ({ showHeader }: { showHeader: boolean }) => {\n const { colorMode } = useColorMode();\n\n return (\n <Global\n styles={`\n @charset \"UTF-8\";\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {\n border-color: ${colorMode === 'light' ? '#6E6B7B' : '#d0d1d2'};\n border-style: solid;\n border-width: 1px 1px 0 0;\n content: \"\";\n display: block;\n height: 7px;\n position: absolute;\n top: 13px;\n width: 7px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {\n margin-left: -4px;\n position: absolute;\n width: 0;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n box-sizing: content-box;\n position: absolute;\n border: 8px solid transparent;\n height: 0;\n width: 1px;\n content: \"\";\n z-index: -1;\n border-width: 8px;\n left: -8px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {\n border-bottom-color: #aeaeae;\n }\n\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {\n top: 0;\n margin-top: -8px;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n border-top: none;\n border-bottom-color: #f0f0f0;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {\n top: 0;\n }\n .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {\n top: -1px;\n border-bottom-color: #aeaeae;\n }\n\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle {\n bottom: 0;\n margin-bottom: -8px;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {\n border-bottom: none;\n border-top-color: #fff;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {\n bottom: 0;\n }\n .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before {\n bottom: -1px;\n border-top-color: #aeaeae;\n }\n\n .react-datepicker-wrapper {\n display: inline-block;\n padding: 0;\n border: 0;\n width: 100%;\n }\n\n .react-datepicker {\n font-family: Poppins;\n background-color: ${colorMode === 'light' ? '#ffffff' : '#283046'};\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.08));\n border-radius: 0.3rem;\n display: inline-block;\n position: relative;\n }\n\n .react-datepicker.inline {\n filter: none;\n }\n\n .react-datepicker--time-only .react-datepicker__triangle {\n left: 35px;\n }\n .react-datepicker--time-only .react-datepicker__time-container {\n border-left: 0;\n }\n .react-datepicker--time-only .react-datepicker__time,\n .react-datepicker--time-only .react-datepicker__time-box {\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n }\n\n .react-datepicker__triangle {\n position: absolute;\n left: 50px;\n }\n\n .react-datepicker-popper {\n z-index: 1;\n }\n .react-datepicker-popper[data-placement^=bottom] {\n padding-top: 10px;\n }\n .react-datepicker-popper[data-placement=bottom-end] .react-datepicker__triangle, .react-datepicker-popper[data-placement=top-end] .react-datepicker__triangle {\n left: auto;\n right: 50px;\n }\n .react-datepicker-popper[data-placement^=top] {\n padding-bottom: 10px;\n }\n .react-datepicker-popper[data-placement^=right] {\n padding-left: 8px;\n }\n .react-datepicker-popper[data-placement^=right] .react-datepicker__triangle {\n left: auto;\n right: 42px;\n }\n .react-datepicker-popper[data-placement^=left] {\n padding-right: 8px;\n }\n .react-datepicker-popper[data-placement^=left] .react-datepicker__triangle {\n left: 42px;\n right: auto;\n }\n\n .react-datepicker__header {\n text-align: center;\n background-color: '#ffffff';\n border-top-left-radius: 0.3rem;\n padding-top:16px;\n position: relative;\n }\n .react-datepicker__header--time {\n padding-bottom: 8px;\n padding-left: 5px;\n padding-right: 5px;\n }\n .react-datepicker__header--time:not(.react-datepicker__header--time--only) {\n border-top-left-radius: 0;\n }\n .react-datepicker__header:not(.react-datepicker__header--has-time-select) {\n border-top-right-radius: 0.3rem;\n }\n\n .react-datepicker__year-dropdown-container--select,\n .react-datepicker__month-dropdown-container--select,\n .react-datepicker__month-year-dropdown-container--select,\n .react-datepicker__year-dropdown-container--scroll,\n .react-datepicker__month-dropdown-container--scroll,\n .react-datepicker__month-year-dropdown-container--scroll {\n display: inline-block;\n margin: 0 2px;\n }\n .react-datepicker__header__dropdown.react-datepicker__header__dropdown--select {\n font-weight: 600;\n line-height: 22px;\n color: #111111;\n }\n\n .react-datepicker__current-month,\n .react-datepicker-time__header,\n .react-datepicker-year-header {\n display:${showHeader ? 'block' : 'none'};\n margin-top: 0;\n color: ${colorMode === 'light' ? '#111111' : '#d0d1d2'};\n font-size:14px;\n font-weight:600;\n }\n\n .react-datepicker-time__header {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n .react-datepicker__navigation {\n align-items: center;\n background: none;\n display: flex;\n justify-content: center;\n text-align: center;\n cursor: pointer;\n position: absolute;\n top: 10px;\n padding: 0;\n border: none;\n z-index: 1;\n height: 32px;\n width: 32px;\n text-indent: -999em;\n overflow: hidden;\n }\n .react-datepicker__navigation--previous {\n left: 22px;\n border:1px solid var(--chakra-colors-neutral-400);\n border-radius:4px;\n }\n .react-datepicker__navigation--next {\n right: 22px;\n border:1px solid var(--chakra-colors-neutral-400);\n border-radius:4px;\n }\n .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {\n right: 85px;\n }\n .react-datepicker__navigation--years {\n position: relative;\n top: 0;\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n .react-datepicker__navigation--years-previous {\n top: 4px;\n }\n .react-datepicker__navigation--years-upcoming {\n top: -4px;\n }\n .react-datepicker__navigation:hover *::before {\n border-color: #a6a6a6;\n }\n\n .react-datepicker__navigation-icon {\n position: relative;\n top: -1px;\n font-size: 20px;\n width: 0;\n }\n .react-datepicker__navigation-icon--next {\n left: -2px;\n }\n .react-datepicker__navigation-icon--next::before {\n transform: rotate(45deg);\n left: -4px;\n }\n .react-datepicker__navigation-icon--previous {\n right: -2px;\n }\n .react-datepicker__navigation-icon--previous::before {\n transform: rotate(225deg);\n right: -4px;\n }\n\n .react-datepicker__month-container {\n float: left;\n border-radius: 8px;\n }\n\n .react-datepicker__year {\n margin: 0.4rem;\n text-align: center;\n }\n .react-datepicker__year-wrapper {\n display: flex;\n flex-wrap: wrap;\n max-width: 180px;\n }\n .react-datepicker__year .react-datepicker__year-text {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n }\n\n .react-datepicker__month {\n padding: 0 1rem 1rem 1rem;\n text-align: center;\n }\n .react-datepicker__month .react-datepicker__month-text,\n .react-datepicker__month .react-datepicker__quarter-text {\n display: inline-block;\n width: 4rem;\n margin: 2px;\n }\n\n .react-datepicker__input-time-container {\n width: 100%;\n }\n .react-datepicker__input-time-container .react-datepicker-time__caption {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {\n width: 100%;\n display: inline-block;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {\n width: auto;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {\n -moz-appearance: textfield;\n }\n .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {\n width: 100%;\n display: inline-block;\n }\n\n .react-datepicker__time-container {\n float: right;\n border-left: 1px solid #aeaeae;\n width: 85px;\n }\n .react-datepicker__time-container--with-today-button {\n display: inline;\n border: 1px solid #aeaeae;\n border-radius: 0.3rem;\n position: absolute;\n right: -72px;\n top: 0;\n }\n .react-datepicker__time-container .react-datepicker__time {\n position: relative;\n background: white;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {\n width: 85px;\n overflow-x: hidden;\n margin: 0 auto;\n text-align: center;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {\n list-style: none;\n margin: 0;\n height: calc(195px + (1.7rem / 2));\n overflow-y: scroll;\n padding-right: 0;\n padding-left: 0;\n width: 100%;\n box-sizing: content-box;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {\n height: 30px;\n padding: 5px 10px;\n white-space: nowrap;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {\n cursor: pointer;\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: white;\n font-weight: bold;\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {\n color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};\n }\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {\n cursor: default;\n background-color: transparent;\n }\n\n .react-datepicker__week-number {\n color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};\n display: inline-block;\n width: 1.7rem;\n line-height: 1.7rem;\n text-align: center;\n margin: 0.166rem;\n }\n .react-datepicker__week-number.react-datepicker__week-number--clickable {\n cursor: pointer;\n }\n .react-datepicker__week-number.react-datepicker__week-number--clickable:hover {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n\n .react-datepicker__day-names,\n .react-datepicker__week {\n white-space: nowrap;\n }\n\n .react-datepicker__day-names {\n margin-bottom: 0px;\n margin-top: 8px;\n }\n\n .react-datepicker__day-name,\n .react-datepicker__day,\n .react-datepicker__time-name {\n colors: #000;\n display: inline-block;\n width: 2.25rem;\n line-height: 2.25rem;\n text-align: center;\n }\n .react-datepicker__day-name{\n color:var(--chakra-colors-black-medium)\n }\n\n .react-datepicker__month--selected, .react-datepicker__month--in-selecting-range, .react-datepicker__month--in-range,\n .react-datepicker__quarter--selected,\n .react-datepicker__quarter--in-selecting-range,\n .react-datepicker__quarter--in-range {\n border-radius: 0.3rem;\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: #fff;\n }\n .react-datepicker__month--selected:hover, .react-datepicker__month--in-selecting-range:hover, .react-datepicker__month--in-range:hover,\n .react-datepicker__quarter--selected:hover,\n .react-datepicker__quarter--in-selecting-range:hover,\n .react-datepicker__quarter--in-range:hover {\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n }\n .react-datepicker__month--disabled,\n .react-datepicker__quarter--disabled {\n color: #ccc;\n pointer-events: none;\n }\n .react-datepicker__month--disabled:hover,\n .react-datepicker__quarter--disabled:hover {\n cursor: default;\n background-color: transparent;\n }\n\n .react-datepicker__day,\n .react-datepicker__month-text,\n .react-datepicker__quarter-text,\n .react-datepicker__year-text {\n cursor: pointer;\n }\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n border-radius: 2rem;\n background-color: var(--chakra-colors-neutral-200);\n }\n .react-datepicker__day--highlighted,\n .react-datepicker__month-text--highlighted,\n .react-datepicker__quarter-text--highlighted,\n .react-datepicker__year-text--highlighted {\n border-radius: 0.3rem;\n background-color: #3dcc4a;\n color: #fff;\n }\n .react-datepicker__day--highlighted:hover,\n .react-datepicker__month-text--highlighted:hover,\n .react-datepicker__quarter-text--highlighted:hover,\n .react-datepicker__year-text--highlighted:hover {\n background-color: #32be3f;\n }\n .react-datepicker__day--highlighted-custom-1,\n .react-datepicker__month-text--highlighted-custom-1,\n .react-datepicker__quarter-text--highlighted-custom-1,\n .react-datepicker__year-text--highlighted-custom-1 {\n color: magenta;\n }\n .react-datepicker__day--highlighted-custom-2,\n .react-datepicker__month-text--highlighted-custom-2,\n .react-datepicker__quarter-text--highlighted-custom-2,\n .react-datepicker__year-text--highlighted-custom-2 {\n color: green;\n }\n .react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,\n .react-datepicker__month-text--selected,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--selected,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--selected,\n .react-datepicker__year-text--in-selecting-range,\n .react-datepicker__year-text--in-range {\n border-radius: var(--chakra-radii-2xl);\n background-color: var(--chakra-colors-primary-500);\n color: #fff;\n }\n .react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,\n .react-datepicker__month-text--selected:hover,\n .react-datepicker__month-text--in-selecting-range:hover,\n .react-datepicker__month-text--in-range:hover,\n .react-datepicker__quarter-text--selected:hover,\n .react-datepicker__quarter-text--in-selecting-range:hover,\n .react-datepicker__quarter-text--in-range:hover,\n .react-datepicker__year-text--selected:hover,\n .react-datepicker__year-text--in-selecting-range:hover,\n .react-datepicker__year-text--in-range:hover {\n background-color: var(--chakra-colors-primary-500);\n }\n .react-datepicker__day--keyboard-selected,\n .react-datepicker__month-text--keyboard-selected,\n .react-datepicker__quarter-text--keyboard-selected,\n .react-datepicker__year-text--keyboard-selected {\n border-radius: 2rem;\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n color: #fff;\n }\n .react-datepicker__day--keyboard-selected:hover,\n .react-datepicker__month-text--keyboard-selected:hover,\n .react-datepicker__quarter-text--keyboard-selected:hover,\n .react-datepicker__year-text--keyboard-selected:hover {\n background-color: ${colorMode === 'light' ? '#075331' : '#131620'};\n }\n .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range),\n .react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--in-range) {\n background-color: var(--chakra-colors-primary-50);\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n }\n .react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range),\n .react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__year-text--in-selecting-range) {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};\n }\n .react-datepicker__day--disabled,\n .react-datepicker__month-text--disabled,\n .react-datepicker__quarter-text--disabled,\n .react-datepicker__year-text--disabled {\n cursor: default;\n color: #ccc;\n }\n .react-datepicker__day--disabled:hover,\n .react-datepicker__month-text--disabled:hover,\n .react-datepicker__quarter-text--disabled:hover,\n .react-datepicker__year-text--disabled:hover {\n background-color: transparent;\n }\n\n .react-datepicker__month-text.react-datepicker__month--selected:hover, .react-datepicker__month-text.react-datepicker__month--in-range:hover, .react-datepicker__month-text.react-datepicker__quarter--selected:hover, .react-datepicker__month-text.react-datepicker__quarter--in-range:hover,\n .react-datepicker__quarter-text.react-datepicker__month--selected:hover,\n .react-datepicker__quarter-text.react-datepicker__month--in-range:hover,\n .react-datepicker__quarter-text.react-datepicker__quarter--selected:hover,\n .react-datepicker__quarter-text.react-datepicker__quarter--in-range:hover {\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n }\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n }\n\n .react-datepicker__input-container {\n position: relative;\n display: inline-block;\n width: 100%;\n }\n\n .react-datepicker__year-read-view,\n .react-datepicker__month-read-view,\n .react-datepicker__month-year-read-view {\n border: 1px solid transparent;\n border-radius: 0.3rem;\n position: relative;\n }\n .react-datepicker__year-read-view:hover,\n .react-datepicker__month-read-view:hover,\n .react-datepicker__month-year-read-view:hover {\n cursor: pointer;\n }\n .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {\n border-top-color: #b3b3b3;\n }\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow {\n transform: rotate(135deg);\n right: -16px;\n top: 5px;\n width: 5px;\n height: 5px;\n fill: #111111;\n\n }\n .react-datepicker__header:not(.react-datepicker__header--has-time-select) {\n background:var(--chakra-colors-neutral-50);\n\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n\n .react-datepicker__year-dropdown,\n .react-datepicker__month-dropdown,\n .react-datepicker__month-year-dropdown {\n background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};\n position: absolute;\n width: 50%;\n left: 25%;\n top: 30px;\n z-index: 1;\n text-align: center;\n border-radius: 0.3rem;\n border: 1px solid #aeaeae;\n }\n .react-datepicker__year-dropdown:hover,\n .react-datepicker__month-dropdown:hover,\n .react-datepicker__month-year-dropdown:hover {\n cursor: pointer;\n }\n .react-datepicker__year-dropdown--scrollable,\n .react-datepicker__month-dropdown--scrollable,\n .react-datepicker__month-year-dropdown--scrollable {\n height: 150px;\n overflow-y: scroll;\n }\n\n .react-datepicker__year-option,\n .react-datepicker__month-option,\n .react-datepicker__month-year-option {\n line-height: 20px;\n width: 100%;\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n .react-datepicker__year-option:first-of-type,\n .react-datepicker__month-option:first-of-type,\n .react-datepicker__month-year-option:first-of-type {\n border-top-left-radius: 0.3rem;\n border-top-right-radius: 0.3rem;\n }\n .react-datepicker__year-option:last-of-type,\n .react-datepicker__month-option:last-of-type,\n .react-datepicker__month-year-option:last-of-type {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-bottom-left-radius: 0.3rem;\n border-bottom-right-radius: 0.3rem;\n }\n .react-datepicker__year-option:hover,\n .react-datepicker__month-option:hover,\n .react-datepicker__month-year-option:hover {\n background-color: #ccc;\n }\n .react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,\n .react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,\n .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {\n border-bottom-color: #b3b3b3;\n }\n .react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,\n .react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,\n .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {\n border-top-color: #b3b3b3;\n }\n .react-datepicker__year-option--selected,\n .react-datepicker__month-option--selected,\n .react-datepicker__month-year-option--selected {\n position: absolute;\n left: 15px;\n }\n\n .react-datepicker__close-icon {\n cursor: pointer;\n background-color: transparent;\n border: 0;\n outline: 0;\n padding: 0 6px 0 0;\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n }\n .react-datepicker__close-icon::after {\n cursor: pointer;\n background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};\n color: #fff;\n border-radius: 50%;\n height: 16px;\n width: 16px;\n padding: 2px;\n font-size: 12px;\n line-height: 1;\n text-align: center;\n display: table-cell;\n vertical-align: middle;\n content: \"×\";\n }\n\n .react-datepicker__today-button {\n background: #f0f0f0;\n border-top: 1px solid #aeaeae;\n cursor: pointer;\n text-align: center;\n font-weight: bold;\n padding: 5px 0;\n clear: left;\n }\n\n .react-datepicker__portal {\n position: fixed;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.8);\n left: 0;\n top: 0;\n justify-content: center;\n align-items: center;\n display: flex;\n z-index: 2147483647;\n }\n .react-datepicker__portal .react-datepicker__day-name,\n .react-datepicker__portal .react-datepicker__day,\n .react-datepicker__portal .react-datepicker__time-name {\n width: 3rem;\n line-height: 3rem;\n }\n @media (max-width: 400px), (max-height: 550px) {\n .react-datepicker__portal .react-datepicker__day-name,\n .react-datepicker__portal .react-datepicker__day,\n .react-datepicker__portal .react-datepicker__time-name {\n width: 2rem;\n line-height: 2rem;\n }\n }\n .react-datepicker__portal .react-datepicker__current-month,\n .react-datepicker__portal .react-datepicker-time__header {\n font-size: 1.44rem;\n }\n\n /** injected styles **/\n .react-datepicker__day--outside-month {\n color: ${colorMode === 'light' ? '#B9B9C3' : '#4D4D4D'};\n }\n .react-datepicker__day.react-datepicker__day--in-range {\n border-radius: 0;\n background: var(--chakra-colors-primary-50);\n color: #111111;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range,\n .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {\n background: var(--chakra-colors-primary-500);\n color: #fff;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range {\n border-radius: 100px 0px 0px 100px;\n }\n .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {\n border-radius: 0px 100px 100px 0px;\n }\n .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day.react-datepicker__day--range-end {\n border-radius: 100px;\n padding: 0;\n }\n .react-datepicker__day.react-datepicker__day--outside-month:empty {\n padding: 0;\n }\n .react-datepicker.inline .react-datepicker__header {\n background-color: inherit;\n }\n .react-datepicker__day--keyboard-selected, .react-datepicker__day--keyboard-selected:hover {\n background-color: var(--chakra-colors-primary-50);\n color: inherit;\n }\n .react-datepicker__day--today, .react-datepicker__day--today:hover {\n border-radius: 2rem;\n border-color: var(--chakra-colors-primary-500);\n border-width: 1px;\n line-height: 34px;\n }\n .react-datepicker__day--today:hover:not(.react-datepicker__day--in-range) {\n background: var(--chakra-colors-neutral-200);\n border-color:transparent;\n color:var(--chakra-colors-black-high);\n }\n .react-datepicker__day--selected.react-datepicker__day--today {\n color: white;\n background: var(--chakra-colors-primary-500);\n }\n .react-datepicker__aria-live {\n position: absolute;\n clip-path: circle(0);\n border: 0;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n width: 1px;\n white-space: nowrap;\n }\n .react-datepicker__day.react-datepicker__day--in-range.react-datepicker__day--today{\n border-radius:0px;\n border-color:transparent;\n background-color:var(--chakra-colors-primary-50);\n }\n .react-datepicker__month-select,.react-datepicker__year-select {\n background-color:transparent;\n font-size:14px;\n font-weight:600;\n text-align:center;\n }\n `}\n />\n );\n};\n\nexport default Styles;\n","import { Flex, Input, InputGroup, InputRightAddon, Text } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface TimeInputProps {\n value?: string;\n onChange?: (time: string) => void;\n label?: string;\n rightAddon?: React.ReactNode | string;\n}\n\nconst TimeInput: React.FC<TimeInputProps> = ({ value, onChange, label, rightAddon }) => {\n const [time, setTime] = React.useState(value || '00:00');\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setTime(e.target?.value || '00:00');\n if (onChange) onChange(e.target?.value || '00:00');\n };\n\n return (\n <Flex flexDir=\"column\" p={4} pt={0}>\n <Text mb={2}>{label}</Text>\n <InputGroup alignItems=\"center\" borderColor=\"neutral.400\">\n <Input\n onChange={handleChange}\n type=\"time\"\n value={time}\n data-test-id=\"CT_Component_datepicker_input_time\"\n flex={1}\n borderRadius=\"sm\"\n border=\"1px solid\"\n borderColor=\"inherit\"\n _focusWithin={{\n borderColor: 'primary.500',\n }}\n />\n {rightAddon && <InputRightAddon>{rightAddon}</InputRightAddon>}\n </InputGroup>\n </Flex>\n );\n};\n\nTimeInput.displayName = 'DatepickerTimeInput';\n\nTimeInput.defaultProps = {\n value: '00:00',\n onChange: undefined,\n label: 'Pilih Waktu',\n rightAddon: 'WIB',\n};\nexport default TimeInput;\n","import { Box, Input } from '@chakra-ui/react';\nimport { css } from '@emotion/react';\nimport type { FC } from 'react';\nimport React from 'react';\n\nexport interface DatePickerMonthProps {\n onChange: (date: string) => void;\n\n 'data-test-id'?: string;\n min: string;\n max: string;\n}\n\nconst DatePickerMonth: FC<DatePickerMonthProps> = ({ onChange, min, max, ...props }) => {\n const [date, setDate] = React.useState<string | null>(null);\n return (\n <Box\n fontSize={'12px'}\n lineHeight={'18px'}\n css={css`\n input[type='date']::-webkit-inner-spin-button,\n input[type='date']::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n input[value=''] {\n width: 58px;\n }\n `}\n >\n <Input\n data-test-id={props['data-test-id']}\n type=\"date\"\n width={date ? '51px' : '58px'}\n onChange={e => {\n onChange(e.target.value);\n setDate(e.target.value);\n }}\n p={'8px'}\n min={min}\n max={max}\n required\n css={css`\n border: 1px solid transparent;\n\n &:focus,\n &:hover {\n border: 1px solid transparent;\n }\n\n &::placeholder {\n color: #111111;\n }\n `}\n value={date ?? ''}\n />\n </Box>\n );\n};\n\nDatePickerMonth.defaultProps = {\n 'data-test-id': '',\n};\n\nexport default DatePickerMonth;\n","import { Box } from '@chakra-ui/react';\nimport styled from '@emotion/styled';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport DatePickerMonth from './datepicker-month';\n\nexport interface MultiDatePickerMonthProps {\n onChange: (startDate: string | null, endDate: string | null) => void;\n\n min?: string;\n max?: string;\n isError?: boolean;\n}\n\nconst MultiDateWrapper = styled(Box)<{ isError: boolean }>`\n display: flex;\n align-items: center;\n width: fit-content;\n border: 1px solid;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);\n border-radius: 4px;\n border-color: ${({ isError }) => (isError ? 'var(--chakra-colors-danger-500)' : 'var(--chakra-colors-primary-500)')};\n`;\n\nconst MultiDatePickerMonth: FC<MultiDatePickerMonthProps> = ({\n onChange,\n isError = false,\n min = '2020-01-01',\n max = '2020-12-31',\n}) => {\n const [date, setDate] = React.useState<(string | null)[]>([null, null]);\n return (\n <MultiDateWrapper isError={isError}>\n <DatePickerMonth\n data-test-id=\"CT_DatePickerMonth_StartDate\"\n onChange={val => {\n onChange(val, date[1]);\n setDate([val, date[1]]);\n }}\n min={min}\n max={max}\n />\n <Box>-</Box>\n <DatePickerMonth\n data-test-id=\"CT_DatePickerMonth_EndDate\"\n onChange={val => {\n onChange(date[0], val);\n setDate([date[0], val]);\n }}\n min={min}\n max={max}\n />\n </MultiDateWrapper>\n );\n};\n\nMultiDatePickerMonth.defaultProps = {\n min: '2020-01-01',\n max: '2020-12-31',\n isError: false,\n};\n\nexport default MultiDatePickerMonth;\n","import type { ModalProps as ChakraModalProps } from '@chakra-ui/react';\nimport { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface DialogProps extends Omit<ChakraModalProps, 'children'> {\n title: string;\n content: React.ReactNode;\n footer: React.ReactNode;\n isModalOverlay?: boolean;\n width?: string;\n isOverlayClickable?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = ({\n title,\n content,\n footer,\n isModalOverlay,\n width,\n isOverlayClickable,\n ...props\n}) => {\n return (\n <Modal {...props}>\n {isModalOverlay && <ModalOverlay pointerEvents={isOverlayClickable ? 'auto' : 'none'} />}\n\n <ModalContent bgColor=\"neutral.50\" fontFamily=\"Poppins\" width={width} minW={'400px'}>\n <ModalHeader bgColor=\"neutral.200\" py={2} px={4} borderTopRadius={'sm'}>\n <Text textStyle=\"text.lg\" fontWeight=\"normal\">\n {title}\n </Text>\n </ModalHeader>\n <ModalBody p={4} textStyle=\"text.md\">\n {content}\n </ModalBody>\n <ModalFooter bgColor=\"neutral.200\" p={4} borderBottomRadius={'sm'}>\n {footer}\n </ModalFooter>\n </ModalContent>\n </Modal>\n );\n};\n\nDialog.defaultProps = {\n isModalOverlay: true,\n width: '400px',\n isOverlayClickable: true,\n};\n\nexport default Dialog;\n","/* eslint-disable import/prefer-default-export */\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nimport type { EmptyStateProps } from './layout';\nimport BaseEmptyState from './layout';\n\nconst EmptyStateData: React.FC<EmptyStateProps> = ({\n title = 'Belum ada data',\n description = 'Jika data tersedia, akan tampil di sini.',\n icon = <Icon.ImgFolder size={110} />,\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} />;\n};\n\nconst EmptyStatePage: React.FC<EmptyStateProps> = ({\n title = 'Halaman tidak ditemukan',\n description = 'Halaman yang dituju mungkin\\n telah berubah atau dihapus.',\n icon = <Icon.Img404 size={110} />,\n buttonText = 'Kembali ke Home',\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} buttonText={buttonText} {...rest} />;\n};\n\nconst EmptyStateFilter: React.FC<EmptyStateProps> = ({\n title = 'Halaman filter tidak ditemukan',\n description = 'Coba ubah atau reset filter.',\n icon = <Icon.ImgNotFound size={110} />,\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} />;\n};\n\nconst EmptyStateSearch: React.FC<EmptyStateProps> = ({\n title = 'Pencarian tidak ditemukan',\n description = 'Keyword yang dicari tidak ditemukan.\\n Coba gunakan keyword lainnya.',\n icon = <Icon.ImgNotFound size={110} />,\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} />;\n};\n\nconst EmptyStateNoConnection: React.FC<EmptyStateProps> = ({\n title = 'Koneksi terputus',\n description = 'Silakan cek koneksi internet Anda\\n dan coba lagi.',\n icon = <Icon.ImgLostConnection size={110} />,\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} />;\n};\n\nconst EmptyStateMaintenance: React.FC<EmptyStateProps> = ({\n title = 'Sistem sedang dalam perbaikan',\n description = 'Maaf, sistem kami sedang dalam perbaikan.\\n Kami akan segera kembali.',\n icon = <Icon.ImgWarning size={110} />,\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} />;\n};\n\nconst EmptyStateNotAuthorize: React.FC<EmptyStateProps> = ({\n title = 'Halaman tidak dapat diakses',\n description = 'Anda tidak memiliki izin untuk mengakses halaman ini.',\n icon = <Icon.ImgWarning size={110} />,\n buttonText = 'Kembali ke Home',\n ...rest\n}) => {\n return <BaseEmptyState title={title} description={description} icon={icon} {...rest} buttonText={buttonText} />;\n};\n\ntype EmptyStateComponent = React.FC<EmptyStateProps> & {\n Data: React.FC<EmptyStateProps>;\n Page: React.FC<EmptyStateProps>;\n Filter: React.FC<EmptyStateProps>;\n Search: React.FC<EmptyStateProps>;\n NoConnection: React.FC<EmptyStateProps>;\n Maintenance: React.FC<EmptyStateProps>;\n NotAuthorize: React.FC<EmptyStateProps>;\n};\n\nconst EmptyState = BaseEmptyState as EmptyStateComponent;\n\nEmptyState.Data = EmptyStateData;\nEmptyState.Page = EmptyStatePage;\nEmptyState.Filter = EmptyStateFilter;\nEmptyState.Search = EmptyStateSearch;\nEmptyState.NoConnection = EmptyStateNoConnection;\nEmptyState.Maintenance = EmptyStateMaintenance;\nEmptyState.NotAuthorize = EmptyStateNotAuthorize;\n\nexport default EmptyState;\n","/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable react/require-default-props */\nimport { Box, Button, Flex, Text, VStack } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface EmptyStateProps {\n icon?: React.ReactNode;\n title?: string;\n description?: string;\n buttonText?: string;\n onClick?: () => void;\n}\n\nconst EmptyState = (props: EmptyStateProps) => {\n const { icon, title, description, buttonText, onClick } = props;\n\n const handleClick = () => {\n if (onClick) {\n onClick();\n }\n };\n\n return (\n <Flex align=\"center\" justify=\"center\">\n <VStack textAlign=\"center\">\n {icon}\n\n <VStack spacing={2} textAlign=\"center\" mt={3}>\n <Text textStyle=\"text.lg\" fontWeight=\"bold\">\n {title}\n </Text>\n <Text textStyle=\"text.md\" color=\"black.medium\" whiteSpace=\"pre-wrap\">\n {description}\n </Text>\n </VStack>\n\n {buttonText && (\n <Box mt={3}>\n <Button size=\"lg\" data-test-id=\"CT_component-action-button\" onClick={handleClick}>\n {buttonText}\n </Button>\n </Box>\n )}\n </VStack>\n </Flex>\n );\n};\n\nexport default EmptyState;\n","import type { BadgeProps, BoxProps } from '@chakra-ui/react';\nimport { Flex, HStack } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport type { HeaderDataProps } from '../types';\nimport { Logo } from './logo';\nimport { Profile } from './profile';\nimport SwitchMode from './switch-mode';\nimport { Version } from './version';\n\nexport type HeaderProps = BoxProps & {\n brandColor?: BoxProps['bgColor'];\n data?: HeaderDataProps;\n onLogout?: () => void;\n onOpenModalRelease?: () => void;\n hideSwitchMode?: boolean;\n mainLogo?: string;\n mainLogoSize?: BoxProps['h'];\n centerLogo?: string;\n centerLogoSize?: BoxProps['h'];\n hideEnv?: boolean;\n urlLogo?: string;\n profile?: React.ReactNode;\n versionStyle?: BadgeProps;\n};\n\nexport const Header: React.FC<HeaderProps> = ({\n brandColor,\n data,\n onLogout,\n onOpenModalRelease,\n hideSwitchMode,\n mainLogo,\n centerLogo,\n mainLogoSize,\n centerLogoSize = 4,\n hideEnv = false,\n urlLogo,\n children,\n profile,\n bg = 'white',\n versionStyle,\n ...props\n}) => (\n <Flex minH={15} bg={bg} shadow=\"raised\" px={6} py={3} alignItems=\"center\" {...props}>\n <Flex\n h=\"auto\"\n w=\"full\"\n alignItems=\"center\"\n justifyContent={!mainLogo ? 'flex-end' : 'space-between'}\n pos=\"relative\"\n >\n {mainLogo && (\n <Flex alignItems=\"center\">\n <Logo url={urlLogo} imageUrl={mainLogo} height={mainLogoSize} />\n {children && children}\n </Flex>\n )}\n\n {centerLogo && (\n <HStack w=\"fit-content\" spacing={2} alignItems=\"center\" pos=\"absolute\" left=\"50%\" transform=\"translate(-50%,0)\">\n <Logo url={urlLogo} imageUrl={centerLogo} height={centerLogoSize} />\n <Version\n hideEnv={hideEnv}\n version={data?.version}\n environment={data?.environment}\n onOpenModalRelease={onOpenModalRelease}\n versionStyle={versionStyle}\n />\n </HStack>\n )}\n\n {profile || (\n <Flex alignItems=\"center\">\n {!hideSwitchMode && <SwitchMode />}\n <Profile color={props.color} brandColor={brandColor} data={data} onLogout={onLogout} />\n </Flex>\n )}\n </Flex>\n </Flex>\n);\n\nHeader.defaultProps = {\n brandColor: undefined,\n data: undefined,\n onLogout: undefined,\n onOpenModalRelease: undefined,\n hideSwitchMode: true,\n mainLogo: undefined,\n mainLogoSize: undefined,\n centerLogo: undefined,\n centerLogoSize: undefined,\n hideEnv: false,\n urlLogo: undefined,\n profile: undefined,\n versionStyle: undefined,\n};\n\nexport default Header;\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Box, Image, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface LogoProps {\n url?: string;\n imageUrl: string;\n height?: BoxProps['h'];\n}\nexport const Logo: React.FC<LogoProps> = ({ url, imageUrl, height }) => {\n if (url)\n return (\n <Box as=\"a\" href={url} cursor=\"pointer\" target=\"_self\">\n <Image w=\"100%\" h={height ?? 9} maxH={height ?? 9} src={imageUrl} alt={imageUrl} />\n </Box>\n );\n\n return <Image w=\"100%\" h={height ?? 9} maxH={height ?? 9} src={imageUrl} alt={imageUrl} />;\n};\n\nexport const XMSLogo = () => (\n <Image\n height={8}\n src={useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')}\n />\n);\n\nexport const VoilaLogo = () => (\n <Image\n src=\"https://assets.voila.id/xms/logo-voila-black.png?v=1\"\n filter={useColorModeValue('none', 'invert(1)')}\n maxW={24}\n />\n);\n\nLogo.defaultProps = {\n url: undefined,\n height: undefined,\n};\n","import type { BoxProps } from '@chakra-ui/react';\nimport {\n Avatar,\n Box,\n Flex,\n HStack,\n Popover,\n PopoverArrow,\n PopoverBody,\n PopoverContent,\n PopoverTrigger,\n Text,\n useDisclosure,\n VStack,\n} from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiPower } from 'react-icons/fi';\n\nimport type { BadgeProps } from '../../badge';\nimport { Badge } from '../../badge';\nimport { NavItem } from '../../nav-item';\nimport type { HeaderDataProps } from '../types';\n\nexport interface ProfileProps extends BoxProps {\n brandColor?: BoxProps['bgColor'];\n data?: HeaderDataProps;\n onLogout?: () => void;\n badgeStyle?: BadgeProps;\n}\n\nexport const Profile = ({ color, brandColor, data, badgeStyle, children, onLogout, ...props }: ProfileProps) => {\n const { isOpen, onToggle, onClose } = useDisclosure();\n\n return (\n <Popover placement=\"bottom-end\" isOpen={isOpen} onClose={onClose}>\n <Box\n data-test-id=\"CTA_Navbar_Profile_wrapper\"\n as=\"button\"\n cursor=\"pointer\"\n w=\"fit-content\"\n _hover={{\n textDecor: 'none',\n '.catalyst-header-avatar': {\n border: '2px solid',\n borderColor: 'primary.100',\n },\n }}\n onClick={onToggle}\n color={color}\n {...props}\n >\n <HStack>\n <VStack alignItems=\"flex-end\" spacing=\"0\" ml=\"2\" color={color}>\n <Text textStyle=\"text.xs\" mb=\"1\">\n {data?.email}\n </Text>\n <Flex alignItems=\"center\">\n {data?.userRole && (\n <>\n <Text textStyle=\"text.xs\">{data?.userRole || 'user'}</Text>\n <Box\n className=\"catalyst_header-profile-divider\"\n h=\"3\"\n mx=\"1\"\n borderLeft=\"1px solid\"\n borderColor=\"neutral.400\"\n />\n </>\n )}\n {typeof data?.office === 'object' ? (\n <>\n <Text textStyle=\"text.xs\">{data.office[0]}</Text>\n {data.office.length > 1 && (\n <Badge\n ml=\"1\"\n pill\n variant=\"neutral-light\"\n boxSize=\"4.5\"\n justifyContent=\"center\"\n p=\"0.5\"\n {...badgeStyle}\n >\n {data.office.length - 1}+\n </Badge>\n )}\n </>\n ) : (\n <Text textStyle=\"text.xs\">{data?.office || 'office'}</Text>\n )}\n </Flex>\n </VStack>\n <PopoverTrigger>\n <Box border=\"2px solid\" borderColor=\"transparent\" className=\"catalyst-header-avatar\" rounded=\"full\">\n <Avatar size=\"sm\" bg={brandColor} color=\"white\" name={data?.name ?? data?.email} />\n </Box>\n </PopoverTrigger>\n </HStack>\n </Box>\n {children || (\n <PopoverContent bg=\"white\" maxW={200}>\n <PopoverArrow bg=\"white\" />\n <PopoverBody py=\"1\" px=\"0\">\n <NavItem data-test-id=\"CTA_Navbar_logout-button\" onClick={onLogout} rounded=\"none\" px=\"4\">\n <Box display=\"flex\" alignItems=\"center\">\n <FiPower />\n <Text ml=\"2\">Logout</Text>\n </Box>\n </NavItem>\n </PopoverBody>\n </PopoverContent>\n )}\n </Popover>\n );\n};\n\nProfile.defaultProps = {\n brandColor: 'primary.500',\n data: undefined,\n onLogout: undefined,\n badgeStyle: undefined,\n};\n\nexport default Profile;\n","import type { LinkProps } from '@chakra-ui/react';\nimport { Link } from '@chakra-ui/react';\nimport { cx } from '@chakra-ui/shared-utils';\nimport type { PropsWithChildren } from 'react';\nimport * as React from 'react';\n\nexport interface NavItemProps extends LinkProps, PropsWithChildren {\n isActive?: boolean;\n isChild?: boolean;\n isDisabled?: boolean;\n 'data-test-id'?: string;\n}\n\nexport const NavItem = ({ children, isActive, isChild, isDisabled, ...props }: NavItemProps) => {\n return (\n <Link\n data-test-id={props['data-test-id']}\n opacity={isDisabled ? '0.3' : 'initial'}\n cursor={isDisabled ? 'not-allowed' : 'pointer'}\n h=\"7.5\"\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n w=\"full\"\n p=\"2\"\n pl={isChild ? '7' : '2'}\n color={isActive ? 'primary.500' : 'black.high'}\n bg={isActive ? 'primary.100' : 'white'}\n className={cx('catalyst-nav-item', props.className)}\n textStyle=\"text.xs\"\n fontWeight={isActive ? 'semibold' : 'regular'}\n rounded=\"sm\"\n _active={\n isDisabled\n ? {}\n : {\n bg: 'primary.100',\n }\n }\n _hover={\n isDisabled\n ? {}\n : {\n textDecoration: 'none',\n bg: isActive ? 'primary.100' : 'primary.50',\n }\n }\n {...props}\n onClick={isDisabled ? undefined : props.onClick}\n >\n {children}\n </Link>\n );\n};\n\nNavItem.displayName = 'NavItem';\nNavItem.defaultProps = {\n isActive: false,\n isChild: false,\n isDisabled: false,\n 'data-test-id': undefined,\n};\n\nexport default NavItem;\n","import { Box, useColorMode } from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiMoon, FiSun } from 'react-icons/fi';\n\nconst SwitchMode: React.FC = () => {\n const { colorMode, toggleColorMode } = useColorMode();\n return (\n <Box data-test-id=\"rhYuTDCiWkFqr96upiEEh\" mx={5} onClick={toggleColorMode} cursor=\"pointer\">\n {colorMode === 'light' ? <FiMoon size={20} /> : <FiSun size={20} />}\n </Box>\n );\n};\n\nexport default SwitchMode;\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport { Box } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport type { BadgeProps } from '../../badge';\nimport { Badge } from '../../badge';\nimport type { Environment } from '../types';\nimport { environmentName } from '../utils/formatter';\n\nexport type VersionProps = {\n hideEnv?: boolean;\n environment?: Environment;\n version?: React.ReactNode;\n versionStyle?: BadgeProps;\n onOpenModalRelease?: () => void;\n};\n\nexport const Version: React.FC<VersionProps> = ({\n hideEnv,\n version,\n environment,\n onOpenModalRelease,\n versionStyle,\n}) => (\n <>\n {typeof version === 'string' ? (\n <Badge\n data-test-id=\"CTA_header-version-badge\"\n fontSize=\"8px\"\n variant=\"neutral-light\"\n px=\"2\"\n py=\"px\"\n onClick={onOpenModalRelease}\n cursor={onOpenModalRelease ? 'pointer' : 'auto'}\n {...versionStyle}\n >\n {version}\n </Badge>\n ) : (\n version\n )}\n\n {!hideEnv && environmentName(environment) !== null && version && (\n <Box\n background=\"primary.50\"\n color=\"primary.500\"\n fontSize=\"text.xs\"\n py={1}\n px={2.5}\n fontWeight=\"bold\"\n borderRadius=\"md\"\n >\n {environmentName(environment)}\n </Box>\n )}\n </>\n);\n\nVersion.defaultProps = {\n hideEnv: false,\n environment: undefined,\n version: undefined,\n onOpenModalRelease: undefined,\n versionStyle: undefined,\n};\n\nexport default Version;\n","import type { Environment } from '../types';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function environmentName(env?: Environment) {\n switch (env) {\n case 'DEVELOPMENT':\n return 'Dev';\n case 'STAGING':\n return 'Staging';\n default:\n return null;\n }\n}\n","import { Flex, type FlexProps } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface NavbarProps extends FlexProps {}\n\nexport const Navbar = ({ bg = 'white', children, ...props }: NavbarProps) => {\n return (\n <Flex\n minH=\"15\"\n h=\"15\"\n w=\"full\"\n bg={bg}\n shadow=\"raised\"\n px={6}\n py={2}\n alignItems=\"center\"\n position=\"relative\"\n justifyContent=\"space-between\"\n {...props}\n >\n {children}\n </Flex>\n );\n};\n\nNavbar.displayName = 'Navbar';\n\nexport default Navbar;\n","export { Icon, IconProps, Image, ImageProps } from '@chakra-ui/react';\n","export {\n Box,\n BoxProps,\n Center,\n Container,\n ContainerProps,\n Divider,\n DividerProps,\n Flex,\n FlexProps,\n Grid,\n GridItem,\n GridItemProps,\n GridProps,\n HStack,\n SimpleGrid,\n Spacer,\n Stack,\n StackProps,\n VStack,\n Wrap,\n WrapItem,\n WrapItemProps,\n WrapProps,\n} from '@chakra-ui/react';\n","export { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from '@chakra-ui/react';\n","import { ChevronLeftIcon } from '@chakra-ui/icons';\nimport { IconButton } from '@chakra-ui/react';\nimport React from 'react';\n\ninterface ModalBackButtonProps {\n onClick: () => void;\n}\n\nconst ModalBackButton = ({ onClick }: ModalBackButtonProps) => {\n return (\n <IconButton\n icon={<ChevronLeftIcon w=\"4.5\" h=\"4.5\" />}\n size=\"sm\"\n minW=\"6\"\n h=\"6\"\n rounded=\"sm\"\n variant=\"solid\"\n bg=\"white\"\n onClick={onClick}\n _hover={{ bg: 'white' }}\n color=\"black\"\n aria-label=\"Back\"\n data-test-id=\"modal-back-button\"\n />\n );\n};\n\nexport default ModalBackButton;\n","import type { ModalBodyProps } from '@chakra-ui/react';\nimport { ModalBody as ChakraModalBody, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nconst ModalBody = React.forwardRef<HTMLDivElement, ModalBodyProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalBody px={4} py={2} ref={ref} background={useColorModeValue('white', 'mirage.900')} {...rest}>\n {children}\n </ChakraModalBody>\n );\n});\n\nexport default ModalBody;\n","import type { ButtonProps } from '@chakra-ui/react';\nimport { ModalCloseButton as ChakraModalCloseButton, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalCloseButton = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n return (\n <ChakraModalCloseButton\n ref={ref}\n top={2}\n right={2}\n size=\"sm\"\n data-test-id=\"modal-close-button\"\n background={useColorModeValue('neutral.50', 'mirage.900')}\n {...props}\n />\n );\n});\nexport default ModalCloseButton;\n","import type { ModalFooterProps } from '@chakra-ui/react';\nimport { ModalFooter as ChakraModalFooter, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalFooter\n ref={ref}\n background={useColorModeValue('neutral.200', 'mirage.900')}\n borderBottomRadius=\"sm\"\n {...rest}\n >\n {children}\n </ChakraModalFooter>\n );\n});\n\nexport default ModalFooter;\n","import type { ModalHeaderProps } from '@chakra-ui/react';\nimport { ModalHeader as ChakraModalHeader, useColorModeValue } from '@chakra-ui/react';\nimport React, { forwardRef } from 'react';\n\nconst ModalHeader = forwardRef<HTMLDivElement, ModalHeaderProps>(({ children, ...rest }, ref) => {\n return (\n <ChakraModalHeader\n ref={ref}\n background={useColorModeValue('neutral.200', 'mirage.900')}\n borderTopRadius=\"sm\"\n fontSize=\"text.lg\"\n fontWeight=\"400\"\n px={4}\n py={2}\n {...rest}\n >\n {children}\n </ChakraModalHeader>\n );\n});\n\nexport default ModalHeader;\n","export { default as ModalBackButton } from './components/modal-back-button';\nexport { default as ModalBody } from './components/modal-body';\nexport { default as ModalCloseButton } from './components/modal-close-button';\nexport { default as ModalFooter } from './components/modal-footer';\nexport { default as ModalHeader } from './components/modal-header';\nexport {\n AlertDialog,\n ModalBody as AlertDialogBody,\n ModalCloseButton as AlertDialogCloseButton,\n AlertDialogContent,\n ModalFooter as AlertDialogFooter,\n ModalHeader as AlertDialogHeader,\n ModalOverlay as AlertDialogOverlay,\n AlertDialogProps,\n Drawer,\n ModalBody as DrawerBody,\n ModalCloseButton as DrawerCloseButton,\n DrawerContent,\n DrawerContentProps,\n ModalFooter as DrawerFooter,\n ModalHeader as DrawerHeader,\n ModalOverlay as DrawerOverlay,\n DrawerProps,\n Modal,\n ModalBodyProps,\n ModalContent,\n ModalContentProps,\n ModalContextProvider,\n ModalFocusScope,\n ModalFooterProps,\n ModalHeaderProps,\n ModalOverlay,\n ModalOverlayProps,\n ModalProps,\n useDrawerContext,\n useModal,\n useModalContext,\n UseModalProps,\n UseModalReturn,\n useModalStyles,\n} from '@chakra-ui/react';\n","/* eslint-disable react-hooks/rules-of-hooks */\n\nimport type { As, BoxProps } from '@chakra-ui/react';\nimport {\n Box,\n Button,\n Flex,\n Link,\n Popover,\n PopoverContent,\n PopoverTrigger,\n Portal,\n Text,\n useColorModeValue,\n} from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport { css } from '@emotion/react';\nimport * as React from 'react';\n\nimport type { NavigationLink } from '../types';\nimport { mappingIcon } from './mapping-icon';\n\nexport type NavigationProps = BoxProps & {\n navigations?: NavigationLink[];\n activePath: string;\n as?: As;\n host?: string;\n};\n\nconst Navigation: React.FC<NavigationProps> = ({ navigations, activePath, as, host, ...props }) => {\n return (\n <Box borderRadius=\"md\" overflowX=\"auto\" {...props}>\n <Flex\n bg=\"white\"\n w=\"full\"\n rounded={'md'}\n flexWrap=\"wrap\"\n alignItems=\"center\"\n shadow=\"raised\"\n gap={1}\n px={4}\n py={2}\n >\n {navigations?.map(navigation => {\n const isActive = activePath.startsWith(navigation.navLink || '');\n const activeBg = isActive ? 'primary.500' : undefined;\n return (\n <Popover key={navigation.title} trigger=\"hover\" placement=\"bottom-start\">\n {({ isOpen }) => (\n <>\n <PopoverTrigger>\n <Button\n h={7.5}\n p={2}\n size=\"sm\"\n variant=\"ghost\"\n data-test-id={`CT_component_navigation_button-${navigation.title}${isActive ? '-active' : ''}`}\n _hover={{\n backgroundColor: !isActive ? 'neutral.400' : activeBg,\n }}\n backgroundColor={isOpen && !isActive ? 'neutral.400' : activeBg}\n color={isActive ? 'primary.50' : 'black.high'}\n leftIcon={mappingIcon.get(navigation.title)}\n rightIcon={<Icon.ChevronDown size={4} color=\"inherit\" />}\n >\n {navigation.title}\n </Button>\n </PopoverTrigger>\n {navigation.children && (\n <Portal>\n <Box zIndex=\"popover\">\n <PopoverContent\n key={navigation.title}\n bg={useColorModeValue('white', 'ebony-clay.800')}\n maxW={250}\n border=\"none\"\n borderRadius=\"md\"\n boxShadow=\"0 5px 25px rgb(0 0 0 / 10%)\"\n >\n {navigation.children.map(({ title, navHost, navLink }) => {\n const link = navHost ? `${navHost}${navLink}` : navLink;\n const isLocalLink = host === navHost;\n const isActiveSub = activePath === navLink;\n return (\n <Link\n as={isLocalLink ? as : undefined}\n key={title}\n href={link}\n _hover={{\n textDecoration: 'none',\n }}\n >\n <Box\n display=\"flex\"\n position=\"relative\"\n alignItems=\"center\"\n cursor=\"pointer\"\n transition=\"padding 0.35s ease 0s\"\n _hover={{\n backgroundColor: useColorModeValue('dove-gray.50', 'mirage.900'),\n color: useColorModeValue('primary.500', 'dove-gray.600'),\n px: 5,\n py: 4,\n _first: { borderTopRadius: 'md' },\n _last: { borderBottomRadius: 'md' },\n }}\n color={isActiveSub ? 'primary.500' : 'inherit'}\n css={css`\n border-spacing: 4px;\n `}\n px={6}\n py={4}\n >\n {mappingIcon.get(navigation.title)}\n <Text fontSize=\"text.sm\" ml={3}>\n {title}\n </Text>\n {isActiveSub && (\n <Box\n width={0.5}\n height={8}\n position=\"absolute\"\n bg=\"primary.500\"\n right={0}\n zIndex=\"popover\"\n />\n )}\n </Box>\n </Link>\n );\n })}\n </PopoverContent>\n </Box>\n </Portal>\n )}\n </>\n )}\n </Popover>\n );\n })}\n </Flex>\n </Box>\n );\n};\n\nNavigation.defaultProps = {\n navigations: undefined,\n as: 'a',\n host: undefined,\n};\n\nexport default Navigation;\n","/* eslint-disable import/prefer-default-export */\nimport * as Icon from '@ctlyst.id/internal-icon';\n\nexport const mappingIcon = new Map([\n ['Order', <Icon.ShoppingBag size={4} key=\"order\" color=\"inherit\" />],\n ['Fulfillment', <Icon.ShoppingCart size={4} key=\"fullfilment\" color=\"inherit\" />],\n ['Transfer Stock', <Icon.Repeat size={4} key=\"transfer-stock\" color=\"inherit\" />],\n ['Stock', <Icon.Box size={4} key=\"stock\" color=\"inherit\" />],\n ['Product Database', <Icon.Layers size={4} key=\"product-database\" color=\"inherit\" />],\n ['Purchasing', <Icon.DollarSign size={4} key=\"purchasing\" color=\"inherit\" />],\n ['Reseller', <Icon.Users size={4} key=\"reseller\" color=\"inherit\" />],\n ['Retur', <Icon.RotateCcw size={4} key=\"retur\" color=\"inherit\" />],\n ['Other', <Icon.Settings size={4} key=\"other\" color=\"inherit\" />],\n ['Content', <Icon.Layout size={4} key=\"content\" color=\"inherit\" />],\n ['Customer', <Icon.HelpCircle size={4} key=\"content\" color=\"inherit\" />],\n ['Voucher', <Icon.Gift size={4} key=\"content\" color=\"inherit\" />],\n]);\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport type { BoxProps } from '@chakra-ui/react';\nimport { Box, Button, Flex, Link, Popover, PopoverContent, PopoverTrigger, Text } from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\nimport type { Menu, SubMenu } from '../types';\n\nexport type NavigationBarProps = BoxProps & {\n navigations?: Menu[];\n isFetched: boolean;\n pathname: string;\n asPath: string;\n mappingIcon: Map<string, JSX.Element>;\n};\n\nconst NavigationBar: React.FC<NavigationBarProps> = ({\n navigations,\n isFetched,\n pathname,\n asPath,\n mappingIcon,\n ...props\n}) => {\n const urlMenu = (subMenu: SubMenu) => {\n if (window.location.hostname === 'localhost') {\n return subMenu.navLink;\n }\n return subMenu.navHost + subMenu.navLink;\n };\n\n return (\n <Box hidden={isFetched && navigations === undefined} data-test-id=\"CT_component_navigation_cms\" {...props}>\n <Flex\n bg=\"white\"\n w=\"full\"\n rounded={'md'}\n flexWrap=\"wrap\"\n alignItems=\"center\"\n shadow=\"raised\"\n gap={1}\n px={4}\n py={2}\n >\n {navigations?.map((item: Menu) => {\n const childMenu = item.children.filter(subMenu => asPath?.includes(subMenu.navLink));\n\n const isActive = pathname?.startsWith(childMenu[0]?.navLink);\n const activeBg = isActive ? 'primary.500' : undefined;\n\n return (\n <Popover isLazy key={item.id} trigger=\"hover\" placement=\"bottom-start\" openDelay={100} closeDelay={100}>\n {({ isOpen, onClose }) => (\n <>\n <PopoverTrigger>\n <Button\n h={7.5}\n p={2}\n size=\"sm\"\n variant=\"ghost\"\n data-test-id={`CT_component_navigation_button-${item.title}${isActive ? '-active' : ''}`}\n _hover={{\n backgroundColor: !isActive ? 'neutral.400' : activeBg,\n }}\n backgroundColor={isOpen && !isActive ? 'neutral.400' : activeBg}\n color={isActive ? 'primary.50' : 'black.high'}\n leftIcon={mappingIcon.get(item.title)}\n rightIcon={<Icon.ChevronDown size={4} color=\"inherit\" />}\n >\n {item.title}\n </Button>\n </PopoverTrigger>\n\n {item.children && (\n <PopoverContent bg=\"white\" boxShadow=\"raised\" borderRadius=\"md\" py={1} width={240}>\n {item.children.map((subMenu: SubMenu) => (\n <Link\n key={subMenu.id}\n href={urlMenu(subMenu)}\n display=\"flex\"\n alignItems=\"center\"\n transition=\"padding 0.35s ease 0s\"\n _hover={{\n pl: 6,\n }}\n py={3}\n px={4}\n color={pathname?.startsWith(subMenu.navLink) ? 'primary.800' : 'black.high'}\n onClick={onClose}\n background={pathname?.startsWith(subMenu.navLink) ? 'primary.50' : 'transparent'}\n data-test-id={`CT_component_navigation_link-${item.id}`}\n >\n {mappingIcon.get(item.title)}\n <Text textStyle=\"text-sm\" ml={3}>\n {subMenu.title}\n </Text>\n </Link>\n ))}\n </PopoverContent>\n )}\n </>\n )}\n </Popover>\n );\n })}\n </Flex>\n </Box>\n );\n};\n\nNavigationBar.defaultProps = {\n navigations: undefined,\n};\n\nexport default NavigationBar;\n","import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon } from '@chakra-ui/icons';\nimport { Box, Text, useColorModeValue } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport PaginationButton from './pagination-button';\nimport PaginationButtonTrigger from './pagination-button-trigger';\n\nexport interface PaginationProps {\n /** Additional CSS classes to give to the pagination. */\n className?: string;\n /** The current page number. */\n current: number;\n /** Total number of pages. */\n total: number;\n /**\n * Callback to run when a page number is selected. You can use this to e.g.\n * run setState on your component's page state.\n */\n onSelect?: (page: number) => void;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({ className, current, total, onSelect }) => {\n const btnColorDisabled = useColorModeValue('secondary.100', 'primary.500');\n const btnColor = useColorModeValue('primary.500', 'secondary.100');\n const disabledPrevious = current === 1;\n const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;\n const disabledNext = current === total;\n const nextButtonColor = disabledNext ? btnColorDisabled : btnColor;\n\n const handleSelectPage = (page: number) => {\n if (onSelect) {\n onSelect(page);\n }\n };\n\n const generatePages = (): (number | string)[] => {\n const maxButtons = 5;\n const pageButtons: (number | string)[] = [];\n\n let startPage: number;\n let endPage: number;\n\n if (maxButtons && maxButtons < total) {\n startPage = Math.max(Math.min(current - Math.floor(maxButtons / 2), total - maxButtons + 1), 1);\n endPage = startPage + maxButtons - 1;\n } else {\n startPage = 1;\n endPage = total;\n }\n\n // eslint-disable-next-line no-plusplus\n for (let page = startPage; page <= endPage; ++page) {\n pageButtons.push(page);\n }\n\n return pageButtons;\n };\n\n return (\n <Box className={className} display=\"inline-flex\" alignItems=\"center\">\n <Box mr={1}>\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={previousButtonColor}\n isDisabled={disabledPrevious}\n onClick={() => handleSelectPage(1)}\n visuallyHidden=\"First Page\"\n icon={<ArrowLeftIcon width={2} />}\n />\n </Box>\n <Box bg=\"neutral.300\" borderRadius=\"full\">\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={previousButtonColor}\n isDisabled={disabledPrevious}\n onClick={() => handleSelectPage(current - 1)}\n visuallyHidden=\"Previous Page\"\n icon={<ChevronLeftIcon />}\n />\n {generatePages().map(page => {\n return (\n <PaginationButton\n data-test-id=\"Pagination-Button\"\n key={page}\n isActive={page === current}\n onClick={() => (typeof page === 'number' ? handleSelectPage(page) : null)}\n >\n <Text scale={300} fontSize=\"text.sm\" lineHeight={18} fontWeight={500}>\n {page}\n </Text>\n </PaginationButton>\n );\n })}\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={nextButtonColor}\n isDisabled={disabledNext}\n onClick={() => handleSelectPage(current + 1)}\n visuallyHidden=\"Next Page\"\n icon={<ChevronRightIcon />}\n />\n </Box>\n <Box ml={1}>\n <PaginationButtonTrigger\n data-test-id=\"Pagination-Button\"\n color={nextButtonColor}\n isDisabled={disabledNext}\n onClick={() => handleSelectPage(total)}\n visuallyHidden=\"Last Page\"\n icon={<ArrowRightIcon width={2} />}\n />\n </Box>\n </Box>\n );\n};\n\nPagination.defaultProps = {\n className: undefined,\n onSelect: undefined,\n};\n\nPagination.displayName = 'Pagination';\n\nexport default Pagination;\n","import type { ButtonProps } from '@chakra-ui/react';\nimport { Button, forwardRef, useColorModeValue } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface PaginationButtonProps {\n isActive?: boolean;\n}\n\nconst PaginationButton = forwardRef<ButtonProps, 'button'>(({ className, style, isActive, children, ...rest }, ref) => {\n const btnBg = useColorModeValue('neutral.300', 'mirage.900');\n const btnColor = useColorModeValue('black.high', 'primary.300');\n const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');\n const btnNotActiveColor = useColorModeValue('primary.500', 'white');\n return (\n <Button\n data-test-id=\"Pagination-Button\"\n ref={ref}\n className={className}\n style={style}\n borderRadius=\"full\"\n fontWeight=\"semibold\"\n m={0}\n px={3}\n py={2}\n h={8}\n minW=\"auto\"\n width={8}\n background={isActive ? 'primary.500' : btnBg}\n color={isActive ? 'white' : btnColor}\n _hover={\n !isActive\n ? {\n background: btnNotActiveBg,\n color: btnNotActiveColor,\n }\n : {}\n }\n _disabled={{\n background: useColorModeValue('neutral.300', 'mirage.900'),\n color: 'neutral.600',\n pointerEvents: 'none',\n }}\n {...rest}\n >\n {children}\n </Button>\n );\n});\n\nPaginationButton.displayName = 'PaginationButton';\n\nPaginationButton.defaultProps = {\n isActive: undefined,\n};\n\nexport default PaginationButton;\n","import { VisuallyHidden } from '@chakra-ui/react';\nimport * as React from 'react';\n\nimport PaginationButton from './pagination-button';\n\ntype PaginationButtonTriggerProps = {\n color?: string;\n isDisabled?: boolean;\n onClick?: () => void;\n visuallyHidden?: string;\n icon?: React.ReactNode;\n};\n\nconst PaginationButtonTrigger: React.FC<PaginationButtonTriggerProps> = ({\n color,\n isDisabled,\n onClick,\n visuallyHidden,\n icon,\n}) => (\n <PaginationButton data-test-id=\"DLVCc_fBK35spHm5WxjcJ\" color={color} isDisabled={isDisabled} onClick={onClick}>\n <VisuallyHidden>{visuallyHidden}</VisuallyHidden>\n {icon}\n </PaginationButton>\n);\n\nPaginationButtonTrigger.defaultProps = {\n color: undefined,\n isDisabled: undefined,\n onClick: undefined,\n visuallyHidden: undefined,\n icon: undefined,\n};\n\nexport default PaginationButtonTrigger;\n","import type { TextProps } from '@chakra-ui/react';\nimport { Text } from '@chakra-ui/react';\nimport * as React from 'react';\n\nexport interface PaginationDetailProps extends TextProps {\n // Current page of pages\n page: number;\n /** Total limit of pages. */\n limit: number;\n // Length of data\n length: number;\n}\n\nconst PaginationDetail: React.FC<PaginationDetailProps> = ({\n page,\n limit,\n length,\n scale = 300,\n fontSize = 'xs',\n lineHeight = 18,\n ...rest\n}) => {\n return (\n <Text scale={scale} fontSize={fontSize} lineHeight={lineHeight} {...rest}>\n {`${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item`}\n </Text>\n );\n};\n\nexport default PaginationDetail;\n","import { Box, Select, Text, useColorModeValue } from '@chakra-ui/react';\nimport * as React from 'react';\nimport { FiChevronDown } from 'react-icons/fi';\n\nexport interface PaginationFilterProps<T> {\n /** Total limit of pages. */\n limit?: number;\n /** Label in front of select input */\n label?: string;\n /** Label items. */\n items: T[];\n /** The change handler for the select. */\n onChange: (changes: T) => void;\n}\n\nconst PaginationFilter: React.FC<PaginationFilterProps<number>> = ({\n limit,\n label = 'Baris per halaman:',\n items,\n onChange,\n ...rest\n}) => {\n const [value, setValue] = React.useState(limit);\n\n return (\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Text fontSize=\"text.sm\" lineHeight={18} color={useColorModeValue('neutral.900', 'white')} {...rest}>\n {label}\n </Text>\n <Select\n textAlign=\"center\"\n size=\"xs\"\n outline=\"none\"\n border=\"none\"\n boxShadow=\"none\"\n width={18}\n icon={<FiChevronDown />}\n _focusVisible={{ boxShadow: 'none' }}\n onChange={e => {\n const numberValue = Number(e.target.value);\n onChange(numberValue);\n setValue(numberValue);\n }}\n value={value}\n >\n {items.map(item => {\n return (\n <option key={item} value={item}>\n {item}\n </option>\n );\n })}\n </Select>\n </Box>\n );\n};\n\nPaginationFilter.defaultProps = {\n limit: 10,\n label: undefined,\n};\n\nexport default PaginationFilter;\n","export {\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverArrowProps,\n PopoverBody,\n PopoverBodyProps,\n PopoverCloseButton,\n PopoverContent,\n PopoverContentProps,\n PopoverFooter,\n PopoverFooterProps,\n PopoverHeader,\n PopoverHeaderProps,\n PopoverProps,\n PopoverTrigger,\n Portal,\n PortalProps,\n} from '@chakra-ui/react';\n","/* eslint-disable no-nested-ternary */\nimport type { RadioProps as ChakraRadioProps } from '@chakra-ui/react';\nimport { Box, Radio as ChakraRadio, Text } from '@chakra-ui/react';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport interface RadioProps extends ChakraRadioProps, PropsWithChildren {\n isError?: boolean;\n helpText?: string;\n errorText?: string;\n}\n\nexport const Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }: RadioProps) => {\n const variant = isError ? 'errors' : 'unstyled';\n return (\n <Box>\n <Box display=\"flex\">\n <ChakraRadio variant={variant} {...rest} isDisabled={isDisabled}>\n {children && (\n <Text as=\"span\" display=\"block\" textStyle=\"text.sm\" color={isDisabled ? 'black.medium' : 'black.high'}>\n {children}\n </Text>\n )}\n </ChakraRadio>\n </Box>\n {isError && errorText ? (\n <Box mt=\"2\" ml=\"6\">\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"danger.500\">\n {errorText}\n </Text>\n </Box>\n ) : helpText ? (\n <Box mt=\"2\" ml=\"6\">\n <Text as=\"span\" display=\"block\" textStyle=\"text.xs\" color=\"black.medium\">\n {helpText}\n </Text>\n </Box>\n ) : null}\n </Box>\n );\n};\n\nRadio.displayName = 'Radio';\nRadio.defaultProps = {\n isError: false,\n helpText: undefined,\n errorText: undefined,\n};\n\nexport default Radio;\n","/* eslint-disable no-nested-ternary */\nimport type { RadioGroupProps } from '@chakra-ui/react';\nimport { Box, RadioGroup as ChakraRadioGroup, Stack } from '@chakra-ui/react';\nimport React from 'react';\n\nimport type { FieldProps } from '../../field';\nimport { Field } from '../../field';\n\nexport interface RadioGroupComponentProps extends FieldProps, RadioGroupProps {\n label: string;\n helpText?: string;\n isError?: boolean;\n errorMessage?: string;\n}\n\nexport const RadioGroup = ({\n children,\n label,\n helpText,\n isError,\n errorMessage,\n ...props\n}: RadioGroupComponentProps) => {\n return (\n <Field {...props} label={label} leftHelperText={helpText} isError={isError} errorMessage={errorMessage}>\n <Box mt=\"2\" mb=\"1\">\n <ChakraRadioGroup {...props}>\n <Stack spacing={[1, '16px']} direction={['column', 'row']}>\n {children}\n </Stack>\n </ChakraRadioGroup>\n </Box>\n </Field>\n );\n};\nRadioGroup.displayName = 'RadioGroup';\nRadioGroup.defaultProps = {\n helpText: '',\n isError: false,\n errorMessage: '',\n};\n\nexport default RadioGroup;\n","export * from './components/radio';\nexport * from './components/radio-group';\nexport {\n RadioGroupContext,\n useRadio,\n useRadioGroup,\n useRadioGroupContext,\n UseRadioGroupReturn,\n UseRadioProps,\n UseRadioReturn,\n} from '@chakra-ui/react';\n","import { Grid } from '@chakra-ui/react';\nimport { Rating as RatingIcon } from '@ctlyst.id/internal-icon';\nimport React from 'react';\n\ntype PropsValue = 0 | 1 | 2 | 3 | 4 | 5;\n\nexport interface RatingProps {\n value: PropsValue;\n}\n\nconst Rating = ({ value }: RatingProps) => {\n return (\n <Grid gap={'4px'} display=\"flex\">\n {[...Array(5)].map((_, i) => (\n <RatingIcon color={i < value ? '#FFA230' : '#E0E0E0'} size={24} />\n ))}\n </Grid>\n );\n};\n\nexport default Rating;\n","/* eslint-disable react/require-default-props */\nimport { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase, Props as ReactSelectProps } from 'react-select';\nimport ReactSelect from 'react-select';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectProps<\n Option = unknown,\n IsMulti extends boolean = boolean,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = ReactSelectProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nfunction Select<OptionType, Group extends GroupBase<OptionType>, IsMulti extends boolean = false>({\n styles,\n isError = false,\n ...rest\n}: SelectProps<OptionType, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelect<OptionType, IsMulti, Group>\n classNamePrefix=\"react-select\"\n {...(rest as ReactSelectProps<OptionType, IsMulti, Group>)}\n styles={{ ...selectStyles(colorMode, isError) }}\n theme={themeSelect}\n />\n );\n}\n\nexport default Select;\n","import { theme } from '@chakra-ui/react';\n\nconst shadows = {\n ...theme.shadows,\n raised: '0px 4px 20px rgba(0, 0, 0, 0.05)',\n};\n\nexport default shadows;\n","import { theme } from '@chakra-ui/react';\r\n\r\nconst sizes = {\r\n ...theme.sizes,\r\n 4.5: '1.125rem',\r\n 9.5: '2.375rem',\r\n 18: '4.5rem',\r\n 22: '5.5rem',\r\n 26: '6.5rem',\r\n 30: '7.5rem',\r\n};\r\n\r\nexport default sizes;\r\n","import { theme } from '@chakra-ui/react';\r\n\r\nconst spacing = {\r\n ...theme.space,\r\n 4.5: '1.125rem',\r\n 9.5: '2.375rem',\r\n 18: '4.5rem',\r\n 22: '5.5rem',\r\n 26: '6.5rem',\r\n 30: '7.5rem',\r\n};\r\n\r\nexport default spacing;\r\n","const fonts = {\r\n heading: `'Poppins', sans-serif`,\r\n body: `'Poppins', sans-serif`,\r\n};\r\n\r\nconst fontWeights = {\r\n hairline: 100,\r\n thin: 200,\r\n light: 300,\r\n normal: 400,\r\n medium: 500,\r\n semibold: 600,\r\n bold: 700,\r\n extrabold: 800,\r\n black: 900,\r\n};\r\n\r\nconst lineHeights = {\r\n normal: 'normal',\r\n none: 1,\r\n shorter: 1.25,\r\n short: 1.375,\r\n base: 1.5,\r\n tall: 1.625,\r\n 64: '4rem', // 64px\r\n 56: '3.5rem', // 56px\r\n 48: '3rem', // 48px\r\n 40: '2.5rem', // 40px\r\n 36: '2.25rem', // 36px\r\n 34: '2.125rem', // 34px\r\n 32: '2rem', // 32px\r\n 30: '1.875rem', // 30px\r\n 28: '1.75', // 28px\r\n 26: '1.625rem', // 26px\r\n 24: '1.5rem', // 24px\r\n 22: '1.375rem', // 22px\r\n 20: '1.25rem', // 20px\r\n 18: '1.125rem', // 18px\r\n 16: '1rem', // 16px\r\n 14: '0.875rem', // 14px\r\n 12: '0.75rem', // 12px\r\n};\r\n\r\nconst letterSpacings = {\r\n tighter: '-0.05em',\r\n tight: '-0.025em',\r\n normal: '0',\r\n wide: '0.025em',\r\n wider: '0.05em',\r\n widest: '0.1em',\r\n};\r\n\r\nconst fontSizes = {\r\n heading: {\r\n 1: '2.5rem', // 40px\r\n 2: '2rem', // 32px\r\n 3: '1.75rem', // 28px\r\n 4: '1.5rem', // 24px\r\n 5: '1.375rem', // 22px\r\n 6: '1.125rem', // 18px\r\n },\r\n text: {\r\n xl: '1.125rem', // 18px\r\n lg: '1rem', // 16px\r\n md: '0.875rem', // 14px\r\n sm: '0.75rem', // 12px\r\n xs: '0.625rem', // 10px\r\n },\r\n button: {\r\n lg: '1.125rem', // 18px\r\n md: '0.875rem', // 14px\r\n sm: '0.625rem', // 10px\r\n },\r\n field: {\r\n lg: '1rem', // 16px\r\n md: '0.875rem', // 14px\r\n sm: '0.75rem', // 12px\r\n },\r\n table: {\r\n header: '0.75rem', // 12px\r\n },\r\n};\r\n\r\nconst heading = {\r\n 1: {\r\n fontSize: fontSizes.heading[1],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[64],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 2: {\r\n fontSize: fontSizes.heading[2],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[56],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 3: {\r\n fontSize: fontSizes.heading[3],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[48],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 4: {\r\n fontSize: fontSizes.heading[4],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[40],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 5: {\r\n fontSize: fontSizes.heading[5],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[36],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n 6: {\r\n fontSize: fontSizes.heading[6],\r\n fontWeight: fontWeights.semibold,\r\n lineHeight: lineHeights[32],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n};\r\n\r\nconst text = {\r\n xl: {\r\n fontSize: fontSizes.text.xl,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[28],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n lg: {\r\n fontSize: fontSizes.text.lg,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[24],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.text.md,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.text.sm,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[18],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n xs: {\r\n fontSize: fontSizes.text.xs,\r\n fontWeight: fontWeights.normal,\r\n lineHeight: lineHeights[14],\r\n letterSpacing: letterSpacings.normal,\r\n },\r\n};\r\n\r\nconst button = {\r\n lg: {\r\n fontSize: fontSizes.button.lg,\r\n lineHeight: lineHeights[28],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.button.md,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.button.sm,\r\n lineHeight: lineHeights[14],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n};\r\n\r\nconst field = {\r\n lg: {\r\n fontSize: fontSizes.field.lg,\r\n lineHeight: lineHeights[24],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n md: {\r\n fontSize: fontSizes.field.md,\r\n lineHeight: lineHeights[22],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n sm: {\r\n fontSize: fontSizes.field.sm,\r\n lineHeight: lineHeights[18],\r\n letterSpacing: letterSpacings.normal,\r\n fontWeight: fontWeights.normal,\r\n },\r\n};\r\n\r\nconst textStyles = {\r\n heading,\r\n text,\r\n button,\r\n field,\r\n};\r\n\r\nexport { fonts, fontSizes, fontWeights, letterSpacings, lineHeights, textStyles };\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-nested-ternary */\n/* eslint-disable import/prefer-default-export */\nimport type { ColorMode } from '@chakra-ui/system';\nimport type { CSSObjectWithLabel, GroupBase, StylesConfig, Theme } from 'react-select';\n\nimport { textStyles } from '../../../config/theme/foundations';\n\nconst styleMd = textStyles.text.sm;\nconst selectStyle = {\n fontSize: styleMd.fontSize,\n lineHeight: styleMd.lineHeight,\n letterSpacing: 0,\n};\n\nexport function selectStyles<\n OptionType = unknown,\n IsMulti extends boolean = boolean,\n Group extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(colorMode: ColorMode, _isError: boolean): StylesConfig<OptionType, IsMulti, Group> | undefined {\n return {\n control: (base, { isFocused }) => {\n const style: CSSObjectWithLabel = {\n ...base,\n flexWrap: 'nowrap',\n borderColor: isFocused ? 'var(--chakra-colors-primary-500)' : 'var(--chakra-colors-neutral-400)',\n boxShadow: 'none',\n color: 'var(--chakra-colors-black-low)',\n '&:hover': {\n borderColor: _isError\n ? ''\n : isFocused\n ? 'var(--chakra-colors-primary-500)'\n : 'var(--chakra-colors-neutral-500)',\n },\n };\n if (_isError) {\n return {\n ...style,\n borderColor: 'var(--chakra-colors-danger-500)',\n };\n }\n return style;\n },\n option: (base: CSSObjectWithLabel) => ({\n ...base,\n ...selectStyle,\n color: 'var(--chakra-colors-neutral-900)',\n }),\n menu: (base: CSSObjectWithLabel) => {\n return {\n ...base,\n ...selectStyle,\n zIndex: 5,\n };\n },\n singleValue: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n input: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n dropdownIndicator: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n indicatorSeparator: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle };\n },\n placeholder: (base: CSSObjectWithLabel) => {\n return { ...base, ...selectStyle, color: 'var(--chakra-colors-black-low)' };\n },\n multiValue: base => {\n return {\n ...base,\n borderRadius: 4,\n backgroundColor: 'var(--chakra-colors-neutral-200)',\n };\n },\n multiValueLabel: base => ({\n ...base,\n borderRadius: 4,\n fontWeight: 'bold',\n }),\n multiValueRemove: base => ({\n ...base,\n color: 'var(--chakra-colors-neutral-900)',\n ':hover': {\n backgroundColor: 'var(--chakra-colors-neutral-300)',\n },\n }),\n };\n}\n\nexport const themeSelect = (theme: Theme) => {\n return {\n ...theme,\n colors: {\n ...theme.colors,\n primary: 'var(--chakra-colors-primary-100)',\n primary25: 'var(--chakra-colors-primary-50)',\n primary50: 'var(--chakra-colors-primary-100)',\n primary75: 'var(--chakra-colors-primary-200)',\n },\n };\n};\n","import { useColorMode } from '@chakra-ui/system';\nimport * as React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { AsyncPaginateProps } from 'react-select-async-paginate';\nimport { AsyncPaginate } from 'react-select-async-paginate';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectAsyncProps<\n OptionType = unknown,\n Group extends GroupBase<OptionType> = GroupBase<OptionType>,\n Additional = unknown,\n IsMulti extends boolean = false,\n> = AsyncPaginateProps<OptionType, Group, Additional, IsMulti> & ExtendedSelectProps;\n\nfunction SelectAsync<OptionType, Group extends GroupBase<OptionType>, Additional, IsMulti extends boolean = false>({\n styles,\n isError = false,\n ...rest\n}: SelectAsyncProps<OptionType, Group, Additional, IsMulti>) {\n const { colorMode } = useColorMode();\n\n return (\n <AsyncPaginate<OptionType, Group, Additional, IsMulti>\n classNamePrefix=\"react-select\"\n {...(rest as AsyncPaginateProps<OptionType, Group, Additional, IsMulti>)}\n styles={{ ...selectStyles<OptionType, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n\nexport default SelectAsync;\n","import { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { AsyncCreatableProps } from 'react-select/async-creatable';\nimport ReactSelectAsyncCreatable from 'react-select/async-creatable';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectAsyncCreatableProps<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = AsyncCreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nexport default function SelectAsyncCreatable<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n>({ styles, isError = false, ...rest }: SelectAsyncCreatableProps<Option, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelectAsyncCreatable\n classNamePrefix=\"react-select\"\n {...(rest as SelectAsyncCreatableProps<Option, IsMulti, Group>)}\n styles={{ ...selectStyles<Option, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n","import { useColorMode } from '@chakra-ui/system';\nimport React from 'react';\nimport type { GroupBase } from 'react-select';\nimport type { CreatableProps } from 'react-select/creatable';\nimport ReactSelectCreatable from 'react-select/creatable';\n\nimport type { ExtendedSelectProps } from './types/select.types';\nimport { selectStyles, themeSelect } from './utils';\n\nexport type SelectCreatableProps<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n> = CreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;\n\nexport default function SelectCreatable<\n Option = unknown,\n IsMulti extends boolean = false,\n Group extends GroupBase<Option> = GroupBase<Option>,\n>({ styles, isError = false, ...rest }: SelectCreatableProps<Option, IsMulti, Group>) {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelectCreatable\n classNamePrefix=\"react-select\"\n {...(rest as SelectCreatableProps<Option, IsMulti, Group>)}\n styles={{ ...selectStyles<Option, IsMulti, Group>(colorMode, isError), ...styles }}\n theme={themeSelect}\n />\n );\n}\n","/* eslint-disable react/no-unstable-nested-components */\n/* eslint-disable react/require-default-props */\n\nimport { Checkbox, Flex, Text } from '@chakra-ui/react';\nimport { useColorMode } from '@chakra-ui/system';\nimport type { MultiValue, OptionProps, Props as ReactSelectProps } from 'react-select';\nimport ReactSelect, { components as ComponentRS } from 'react-select';\n\nimport { selectStyles, themeSelect } from './utils';\n\nexport type OptionGroup<Option> = {\n label: string;\n value: string | number | boolean;\n selectAllCheckbox?: boolean;\n} & Partial<Option>;\n\nexport type OptionMultiGroup<Option = unknown> = {\n label: string;\n value: string | number | boolean;\n group: string;\n selectAllCheckbox?: boolean;\n} & Partial<Option>;\n\nexport type OptionsGroup<Option> = {\n readonly label: string;\n readonly options: readonly OptionMultiGroup<Option>[];\n}[];\n\nexport const CHECKBOX_STATE = {\n UNCHECKED: 0,\n INDETERMINATE: 1,\n CHECKED: 2,\n} as const;\n\nexport const getSelectAllCheckboxState = (totalSelected: number, totalOption: number) => {\n if (totalSelected < 0 || totalOption < 0) {\n throw new Error('value less than 0');\n }\n if (totalSelected > totalOption) {\n throw new Error(\"totalSelected couldn't be more than totalOption\");\n }\n if (totalSelected === 0) {\n return CHECKBOX_STATE.UNCHECKED;\n }\n if (totalSelected < totalOption) {\n return CHECKBOX_STATE.INDETERMINATE;\n }\n if (totalSelected === totalOption) {\n return CHECKBOX_STATE.CHECKED;\n }\n return CHECKBOX_STATE.UNCHECKED;\n};\n\nconst InputOption = <T, IsMulti extends boolean>({\n getStyles,\n isDisabled,\n isFocused,\n isSelected,\n children,\n innerProps,\n data,\n checkedState,\n isMulti,\n ...rest\n}: OptionProps<OptionGroup<T>, IsMulti> & {\n checkedState: number;\n}) => {\n const style = {\n alignItems: 'center',\n color: 'inherit',\n display: 'flex ',\n };\n\n const props: JSX.IntrinsicElements['div'] = {\n ...innerProps,\n 'aria-disabled': isDisabled,\n onClick: isDisabled ? undefined : innerProps.onClick,\n style,\n };\n\n return (\n <>\n <ComponentRS.Option\n isMulti\n data={data}\n isDisabled={isDisabled}\n isFocused={isFocused}\n isSelected={isSelected}\n getStyles={getStyles}\n innerProps={props}\n {...rest}\n >\n <Flex\n alignItems=\"center\"\n width=\"100%\"\n mb=\"3px\"\n gap={2}\n data-test-id=\"CT_component_select-checkbox_options\"\n cursor={isDisabled ? 'not-allowed' : 'default'}\n >\n {data?.selectAllCheckbox ? (\n <Checkbox\n isChecked={checkedState === CHECKBOX_STATE.CHECKED}\n isIndeterminate={checkedState === CHECKBOX_STATE.INDETERMINATE}\n isDisabled={isDisabled}\n data-test-id=\"CT_component_select-checkbox_select-all-option\"\n />\n ) : (\n <Checkbox isChecked={isSelected} data-test-id=\"CT_component_select-checkbox_option-checkbox\" />\n )}\n <Text textStyle=\"text.sm\" data-test-id={`select-checkbox-option-label-${data.value}`}>\n {children}\n </Text>\n </Flex>\n </ComponentRS.Option>\n {data?.selectAllCheckbox ? <hr /> : null}\n </>\n );\n};\n\nexport interface SelectWithCheckboxBaseProps<\n T = OptionGroup<never> | OptionMultiGroup<never>,\n IsMulti extends boolean = boolean,\n> extends ReactSelectProps<T, IsMulti> {\n isError?: boolean;\n}\n\nconst SelectWithCheckboxBase = <T, IsMulti extends boolean>({\n isError = false,\n components,\n options,\n ...rest\n}: SelectWithCheckboxBaseProps<T, IsMulti>) => {\n const { colorMode } = useColorMode();\n\n return (\n <ReactSelect<T, IsMulti>\n classNamePrefix=\"react-select\"\n options={options}\n styles={{ ...selectStyles(colorMode, !!isError) }}\n theme={themeSelect}\n closeMenuOnSelect={false}\n hideSelectedOptions={false}\n components={{\n ...components,\n }}\n {...rest}\n />\n );\n};\n\nconst SelectCheckbox = <T, IsMulti extends boolean = boolean>(\n props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>\n) => {\n const { isMulti, options, value, ...rest } = props;\n const selectValue = (value || []) as MultiValue<OptionGroup<T>>;\n\n return (\n <SelectWithCheckboxBase\n isMulti={isMulti}\n options={options}\n components={{\n Option: optionProps => {\n const { isSelected, data } = optionProps;\n\n const optionLength = options?.length ? options.length - 1 : 0;\n const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;\n const checkedState = data.selectAllCheckbox\n ? getSelectAllCheckboxState(selectValue?.length, optionLength)\n : selectedValue;\n return <InputOption {...optionProps} checkedState={checkedState} />;\n },\n }}\n {...rest}\n />\n );\n};\n\nexport default SelectCheckbox;\n","import type { BoxProps } from '@chakra-ui/react';\nimport { Flex } from '@chakra-ui/react';\nimport { motion } from 'framer-motion';\nimport React from 'react';\n\nexport interface SidebarProps extends BoxProps {\n isCollapse: boolean;\n}\n\nexport const Sidebar = ({ isCollapse, children, ...props }: SidebarProps) => {\n return (\n <Flex\n position=\"relative\"\n as={motion.div}\n w=\"174px\"\n bg=\"pureWhite\"\n h={props.h}\n flexDirection=\"column\"\n overflow=\"hidden\"\n shadow=\"raised\"\n animate={{ width: isCollapse ? '62px' : '174px' }}\n transition=\"10ms linear\"\n {...props}\n >\n {children}\n </Flex>\n );\n};\n\nSidebar.displayName = 'Sidebar';\n\nexport default Sidebar;\n","import { __assign } from 'tslib';\nimport { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layoutFeatures } from '../../motion/features/layout/index.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nvar featureBundle = __assign(__assign(__assign(__assign({}, animations), gestureAnimations), drag), layoutFeatures);\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nvar motion = /*@__PURE__*/ createMotionProxy(function (Component, config) {\n return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);\n});\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, featureBundle, createDomVisualElement, HTMLProjectionNode));\n}\n\nexport { createDomMotionComponent, motion };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures, featureDefinitions } from './features/definitions.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { useProjectionId } from '../projection/node/id.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { useProjection } from './features/use-projection.mjs';\nimport { VisualElementHandler } from './utils/VisualElementHandler.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n var layoutId = useLayoutId(props);\n props = __assign(__assign({}, props), { layoutId: layoutId });\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var config = useContext(MotionConfigContext);\n var features = null;\n var context = useCreateMotionContext(props);\n /**\n * Create a unique projection ID for this component. If a new component is added\n * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing\n * us to measure it as soon as any layout effect flushes pending layout animations.\n *\n * Performance note: It'd be better not to have to search the DOM for these elements.\n * For newly-entering components it could be enough to only correct treeScale, in which\n * case we could mount in a scale-correction mode. This wouldn't be enough for\n * shared element transitions however. Perhaps for those we could revert to a root node\n * that gets forceRendered and layout animations are triggered on its layout effect.\n */\n var projectionId = config.isStatic ? undefined : useProjectionId();\n /**\n *\n */\n var visualState = useVisualState(props, config.isStatic);\n if (!config.isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement);\n useProjection(projectionId, props, context.visualElement, projectionNodeConstructor ||\n featureDefinitions.projectionNodeConstructor);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) },\n features,\n React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))));\n }\n return forwardRef(MotionComponent);\n}\nfunction useLayoutId(_a) {\n var _b;\n var layoutId = _a.layoutId;\n var layoutGroupId = (_b = useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement)\n return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (env !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n }\n }\n return features;\n}\n\nexport { useFeatures };\n","/**\n * Browser-safe usage of process\n */\nvar defaultEnvironment = \"production\";\nvar env = typeof process === \"undefined\" || process.env === undefined\n ? defaultEnvironment\n : process.env.NODE_ENV || defaultEnvironment;\n\nexport { env };\n","var createDefinition = function (propNames) { return ({\n isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); },\n}); };\nvar featureDefinitions = {\n measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\"]),\n animation: createDefinition([\n \"animate\",\n \"exit\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"whileFocus\",\n \"whileDrag\",\n \"whileInView\",\n ]),\n exit: createDefinition([\"exit\"]),\n drag: createDefinition([\"drag\", \"dragControls\"]),\n focus: createDefinition([\"whileFocus\"]),\n hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n pan: createDefinition([\n \"onPan\",\n \"onPanStart\",\n \"onPanSessionStart\",\n \"onPanEnd\",\n ]),\n inView: createDefinition([\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n ]),\n};\nfunction loadFeatures(features) {\n for (var key in features) {\n if (features[key] === null)\n continue;\n if (key === \"projectionNodeConstructor\") {\n featureDefinitions.projectionNodeConstructor = features[key];\n }\n else {\n featureDefinitions[key].Component = features[key];\n }\n }\n}\n\nexport { featureDefinitions, loadFeatures };\n","var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\n","import { createContext } from 'react';\n\nvar LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n transformPagePoint: function (p) { return p; },\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useVisualElementContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { useReducedMotionConfig } from '../../utils/use-reduced-motion.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var shouldReduceMotion = useReducedMotionConfig();\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n if (!createVisualElement)\n createVisualElement = lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: props,\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n shouldReduceMotion: shouldReduceMotion,\n });\n }\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","var isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { isBrowser } from './is-browser.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n hasDetected = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n var setReducedMotionPreferences = function () {\n return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n };\n motionMediaQuery_1.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasDetected && initPrefersReducedMotion();\n var _a = __read(useState(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0];\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\nfunction useReducedMotionConfig() {\n var reducedMotionPreference = useReducedMotion();\n var reducedMotion = useContext(MotionConfigContext).reducedMotion;\n if (reducedMotion === \"never\") {\n return false;\n }\n else if (reducedMotion === \"always\") {\n return true;\n }\n else {\n return reducedMotionPreference;\n }\n}\n\nexport { useReducedMotion, useReducedMotionConfig };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n return useMemo(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","/**\n * Decides if the supplied variable is an array of variant labels\n */\nfunction isVariantLabels(v) {\n return Array.isArray(v);\n}\n/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || isVariantLabels(v);\n}\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n var current = {};\n visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); });\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n var velocity = {};\n visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); });\n return velocity;\n}\nfunction resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {\n var _a;\n if (currentValues === void 0) { currentValues = {}; }\n if (currentVelocity === void 0) { currentVelocity = {}; }\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n var props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\nfunction checkIfControllingVariants(props) {\n var _a;\n return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === \"function\" ||\n isVariantLabel(props.initial) ||\n isVariantLabel(props.animate) ||\n isVariantLabel(props.whileHover) ||\n isVariantLabel(props.whileDrag) ||\n isVariantLabel(props.whileTap) ||\n isVariantLabel(props.whileFocus) ||\n isVariantLabel(props.exit));\n}\nfunction checkIfVariantNode(props) {\n return Boolean(checkIfControllingVariants(props) || props.variants);\n}\n\nexport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel, isVariantLabels, resolveVariant, resolveVariantFromProps };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial, animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n var ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nvar globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { useConstant } from '../../utils/use-constant.mjs';\nimport { globalProjectionState } from './state.mjs';\n\nvar id = 1;\nfunction useProjectionId() {\n return useConstant(function () {\n if (globalProjectionState.hasEverUpdated) {\n return id++;\n }\n });\n}\n\nexport { useProjectionId };\n","import { createContext } from 'react';\n\nvar LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useContext } from 'react';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nfunction useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {\n var _b;\n var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll;\n var initialPromotionConfig = useContext(SwitchLayoutGroupContext);\n if (!ProjectionNodeConstructor ||\n !visualElement ||\n (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {\n return;\n }\n visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);\n visualElement.projection.setOptions({\n layoutId: layoutId,\n layout: layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement: visualElement,\n scheduleRender: function () { return visualElement.scheduleRender(); },\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialPromotionConfig,\n layoutScroll: layoutScroll,\n });\n}\n\nexport { useProjection };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nvar SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { __extends } from 'tslib';\nimport React__default from 'react';\n\nvar VisualElementHandler = /** @class */ (function (_super) {\n __extends(VisualElementHandler, _super);\n function VisualElementHandler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Update visual element props as soon as we know this update is going to be commited.\n */\n VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {\n this.updateProps();\n return null;\n };\n VisualElementHandler.prototype.componentDidUpdate = function () { };\n VisualElementHandler.prototype.updateProps = function () {\n var _a = this.props, visualElement = _a.visualElement, props = _a.props;\n if (visualElement)\n visualElement.setProps(props);\n };\n VisualElementHandler.prototype.render = function () {\n return this.props.children;\n };\n return VisualElementHandler;\n}(React__default.Component));\n\nexport { VisualElementHandler };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function (_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {\n var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component });\n}\n\nexport { createDomMotionConfig };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nvar lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"svg\",\n \"switch\",\n \"symbol\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n var useRender = function (Component, props, projectionId, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n if (projectionId) {\n elementProps[\"data-projection-id\"] = projectionId;\n }\n return createElement(Component, elementProps);\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n var vars = state.vars, style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n if (Boolean(props.drag) && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : \"pan-\".concat(props.drag === \"x\" ? \"y\" : \"x\");\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","var scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nvar transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nvar order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\n/**\n * Generate a list of every possible transform key.\n */\nvar transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach(function (operationKey) {\n return transformAxes.forEach(function (axesKey) {\n return transformProps.push(operationKey + axesKey);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nfunction sortTransformProps(a, b) {\n return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\n/**\n * A quick lookup for transform props.\n */\nvar transformPropSet = new Set(transformProps);\nfunction isTransformProp(key) {\n return transformPropSet.has(key);\n}\n/**\n * A quick lookup for transform origin props\n */\nvar transformOriginProps = new Set([\"originX\", \"originY\", \"originZ\"]);\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\n\nexport { isTransformOriginProp, isTransformProp, sortTransformProps, transformAxes, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, _a) {\n var layout = _a.layout, layoutId = _a.layoutId;\n return (isTransformProp(key) ||\n isTransformOriginProp(key) ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","var isMotionValue = function (value) {\n return Boolean(value !== null && typeof value === \"object\" && value.getVelocity);\n};\n\nexport { isMotionValue };\n","import { sortTransformProps } from './transform.mjs';\n\nvar translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(_a, _b, transformIsDefault, transformTemplate) {\n var transform = _a.transform, transformKeys = _a.transformKeys;\n var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d;\n // The transform string we're going to build into.\n var transformString = \"\";\n // Transform keys into their default order - this will determine the output order.\n transformKeys.sort(sortTransformProps);\n // Track whether the defined transform has a defined z so we don't add a\n // second to enable hardware acceleration\n var transformHasZ = false;\n // Loop over each transform and build them into transformString\n var numTransformKeys = transformKeys.length;\n for (var i = 0; i < numTransformKeys; i++) {\n var key = transformKeys[i];\n transformString += \"\".concat(translateAlias[key] || key, \"(\").concat(transform[key], \") \");\n if (key === \"z\")\n transformHasZ = true;\n }\n if (!transformHasZ && enableHardwareAcceleration) {\n transformString += \"translateZ(0)\";\n }\n else {\n transformString = transformString.trim();\n }\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n/**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\nfunction buildTransformOrigin(_a) {\n var _b = _a.originX, originX = _b === void 0 ? \"50%\" : _b, _c = _a.originY, originY = _c === void 0 ? \"50%\" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;\n return \"\".concat(originX, \" \").concat(originY, \" \").concat(originZ);\n}\n\nexport { buildTransform, buildTransformOrigin };\n","/**\n * Returns true if the provided key is a CSS variable\n */\nfunction isCSSVariable(key) {\n return key.startsWith(\"--\");\n}\n\nexport { isCSSVariable };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nvar getValueAsType = function (value, type) {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);\nconst sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { clamp } from '../utils.mjs';\n\nconst number = {\n test: (v) => typeof v === 'number',\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });\nconst scale = Object.assign(Object.assign({}, number), { default: 1 });\n\nexport { alpha, number, scale };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType('deg');\nconst percent = createUnitType('%');\nconst px = createUnitType('px');\nconst vh = createUnitType('vh');\nconst vw = createUnitType('vw');\nconst progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) });\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString('hsl', 'hue'),\n parse: splitColor('hue', 'saturation', 'lightness'),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return ('hsla(' +\n Math.round(hue) +\n ', ' +\n percent.transform(sanitize(saturation)) +\n ', ' +\n percent.transform(sanitize(lightness)) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')');\n },\n};\n\nexport { hsla };\n","import { number, alpha } from '../numbers/index.mjs';\nimport { sanitize, clamp } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = clamp(0, 255);\nconst rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });\nconst rgba = {\n test: isColorString('rgb', 'red'),\n parse: splitColor('red', 'green', 'blue'),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' +\n rgbUnit.transform(red) +\n ', ' +\n rgbUnit.transform(green) +\n ', ' +\n rgbUnit.transform(blue) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')',\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = '';\n let g = '';\n let b = '';\n let a = '';\n if (v.length > 5) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n a = v.substr(7, 2);\n }\n else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n a = v.substr(4, 1);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString('#'),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty('red')\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nconst colorToken = '${c}';\nconst numberToken = '${n}';\nfunction test(v) {\n var _a, _b, _c, _d;\n return (isNaN(v) &&\n isString(v) &&\n ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);\n}\nfunction analyse(v) {\n if (typeof v === 'number')\n v = `${v}`;\n const values = [];\n let numColors = 0;\n const colors = v.match(colorRegex);\n if (colors) {\n numColors = colors.length;\n v = v.replace(colorRegex, colorToken);\n values.push(...colors.map(color.parse));\n }\n const numbers = v.match(floatRegex);\n if (numbers) {\n v = v.replace(floatRegex, numberToken);\n values.push(...numbers.map(number.parse));\n }\n return { values, numColors, tokenised: v };\n}\nfunction parse(v) {\n return analyse(v).values;\n}\nfunction createTransformer(v) {\n const { values, numColors, tokenised } = analyse(v);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parse(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = { test, parse, createTransformer, getAnimatableNone };\n\nexport { complex };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\nconst maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);\nfunction applyDefaultFilter(v) {\n let [name, value] = v.slice(0, -1).split('(');\n if (name === 'drop-shadow')\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, '');\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + '(' + defaultValue + unit + ')';\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(' ') : v;\n } });\n\nexport { filter };\n","import { __assign } from 'tslib';\nimport { number } from 'style-value-types';\n\nvar int = __assign(__assign({}, number), { transform: Math.round });\n\nexport { int };\n","import { px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { int } from './type-int.mjs';\n\nvar numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale: scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { buildTransform, buildTransformOrigin } from './build-transform.mjs';\nimport { isCSSVariable } from '../../dom/utils/is-css-variable.mjs';\nimport { isTransformProp, isTransformOriginProp } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n var _a;\n var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin;\n // Empty the transformKeys array. As we're throwing out refs to its items\n // this might not be as cheap as suspected. Maybe using the array as a buffer\n // with a manual incrementation would be better.\n transformKeys.length = 0;\n // Track whether we encounter any transform or transformOrigin values.\n var hasTransform = false;\n var hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n var transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (var key in latestValues) {\n var value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariable(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n var valueType = numberValueTypes[key];\n var valueAsType = getValueAsType(value, valueType);\n if (isTransformProp(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n transformKeys.push(key);\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0))\n transformIsNone = false;\n }\n else if (isTransformOriginProp(key)) {\n transformOrigin[key] = valueAsType;\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (hasTransform) {\n style.transform = buildTransform(state, options, transformIsNone, transformTemplate);\n }\n else if (transformTemplate) {\n style.transform = transformTemplate({}, \"\");\n }\n else if (!latestValues.transform && style.transform) {\n style.transform = \"none\";\n }\n if (hasTransformOrigin) {\n style.transformOrigin = buildTransformOrigin(transformOrigin);\n }\n}\n\nexport { buildHTMLStyles };\n","var createHtmlRenderState = function () { return ({\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n \"initial\",\n \"animate\",\n \"exit\",\n \"style\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"layout\",\n \"layoutId\",\n \"layoutDependency\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"drag\",\n \"dragControls\",\n \"dragListener\",\n \"dragConstraints\",\n \"dragDirectionLock\",\n \"dragSnapToOrigin\",\n \"_dragX\",\n \"_dragY\",\n \"dragElastic\",\n \"dragMomentum\",\n \"dragPropagation\",\n \"dragTransition\",\n \"whileDrag\",\n \"onPan\",\n \"onPanStart\",\n \"onPanEnd\",\n \"onPanSessionStart\",\n \"onTap\",\n \"onTapStart\",\n \"onTapCancel\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"whileFocus\",\n \"whileTap\",\n \"whileHover\",\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"viewport\",\n \"layoutScroll\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = function (key) {\n return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n for (var key in props) {\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n }, [visualState]);\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { __rest } from 'tslib';\nimport { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, _a, options, transformTemplate) {\n var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, \n // This is object creation, which we try to avoid per-frame.\n latest = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n buildHTMLStyles(state, latest, options, transformTemplate);\n state.attrs = state.style;\n state.style = {};\n var attrs = state.attrs, style = state.style, dimensions = state.dimensions;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Treat x/y not as shortcuts but as actual attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { px } from 'style-value-types';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return \"\".concat(pxOriginX, \" \").concat(pxOriginY);\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from 'style-value-types';\n\nvar dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nvar camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n var pathLength = px.transform(length);\n var pathSpacing = px.transform(spacing);\n attrs[keys.array] = \"\".concat(pathLength, \" \").concat(pathSpacing);\n}\n\nexport { buildSVGPath };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = \"$1-$2\";\n/**\n * Convert camelCase to dash-case properties.\n */\nvar camelToDash = function (str) {\n return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\n\nexport { camelToDash };\n","function renderHTML(element, _a, styleProp, projection) {\n var style = _a.style, vars = _a.vars;\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (var key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nvar camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (var key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var style = props.style;\n var newValues = {};\n for (var key in style) {\n if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var newValues = scrapeMotionValuesFromProps$1(props);\n for (var key in props) {\n if (isMotionValue(props[key])) {\n var targetKey = key === \"x\" || key === \"y\" ? \"attr\" + key.toUpperCase() : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = function (instance) { return onMount(props, instance, state); };\n }\n return state;\n}\nvar makeUseVisualState = function (config) {\n return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic\n ? makeState(config, props, context, presenceContext)\n : useConstant(function () {\n return makeState(config, props, context, presenceContext);\n });\n };\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n var initial = props.initial, animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n }\n var initialAnimationIsBlocked = blockInitialAnimation || initial === false;\n var variantToSet = initialAnimationIsBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n for (var key in target) {\n var valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n var index = initialAnimationIsBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (var key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","var isKeyframesTarget = function (v) {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nvar isCustomValue = function (v) {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nvar resolveFinalValueInKeyframes = function (v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n var unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\n\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function (props, instance, _a) {\n var renderState = _a.renderState, latestValues = _a.latestValues;\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);\n renderSVG(instance, renderState);\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","var AnimationType;\n(function (AnimationType) {\n AnimationType[\"Animate\"] = \"animate\";\n AnimationType[\"Hover\"] = \"whileHover\";\n AnimationType[\"Tap\"] = \"whileTap\";\n AnimationType[\"Drag\"] = \"whileDrag\";\n AnimationType[\"Focus\"] = \"whileFocus\";\n AnimationType[\"InView\"] = \"whileInView\";\n AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };\n","import { useEffect } from 'react';\n\nfunction addDomEvent(target, eventName, handler, options) {\n if (options === void 0) { options = { passive: true }; }\n target.addEventListener(eventName, handler, options);\n return function () { return target.removeEventListener(eventName, handler); };\n}\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nfunction useDomEvent(ref, eventName, handler, options) {\n useEffect(function () {\n var element = ref.current;\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options);\n }\n }, [ref, eventName, handler, options]);\n}\n\nexport { addDomEvent, useDomEvent };\n","import { AnimationType } from '../render/utils/types.mjs';\nimport { useDomEvent } from '../events/use-dom-event.mjs';\n\n/**\n *\n * @param props\n * @param ref\n * @internal\n */\nfunction useFocusGesture(_a) {\n var whileFocus = _a.whileFocus, visualElement = _a.visualElement;\n var onFocus = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true);\n };\n var onBlur = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false);\n };\n useDomEvent(visualElement, \"focus\", whileFocus ? onFocus : undefined);\n useDomEvent(visualElement, \"blur\", whileFocus ? onBlur : undefined);\n}\n\nexport { useFocusGesture };\n","function isMouseEvent(event) {\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (typeof PointerEvent !== \"undefined\" && event instanceof PointerEvent) {\n return !!(event.pointerType === \"mouse\");\n }\n return event instanceof MouseEvent;\n}\nfunction isTouchEvent(event) {\n var hasTouches = !!event.touches;\n return hasTouches;\n}\n\nexport { isMouseEvent, isTouchEvent };\n","import { isTouchEvent } from '../gestures/utils/event-type.mjs';\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler) {\n return function (event) {\n var isMouseEvent = event instanceof MouseEvent;\n var isPrimaryPointer = !isMouseEvent ||\n (isMouseEvent && event.button === 0);\n if (isPrimaryPointer) {\n eventHandler(event);\n }\n };\n}\nvar defaultPagePoint = { pageX: 0, pageY: 0 };\nfunction pointFromTouch(e, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n var primaryTouch = e.touches[0] || e.changedTouches[0];\n var point = primaryTouch || defaultPagePoint;\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction pointFromMouse(point, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction extractEventInfo(event, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n point: isTouchEvent(event)\n ? pointFromTouch(event, pointType)\n : pointFromMouse(event, pointType),\n };\n}\nvar wrapHandler = function (handler, shouldFilterPrimaryPointer) {\n if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; }\n var listener = function (event) {\n return handler(event, extractEventInfo(event));\n };\n return shouldFilterPrimaryPointer\n ? filterPrimaryPointer(listener)\n : listener;\n};\n\nexport { extractEventInfo, wrapHandler };\n","import { isBrowser } from '../utils/is-browser.mjs';\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nvar supportsPointerEvents = function () {\n return isBrowser && window.onpointerdown === null;\n};\nvar supportsTouchEvents = function () {\n return isBrowser && window.ontouchstart === null;\n};\nvar supportsMouseEvents = function () {\n return isBrowser && window.onmousedown === null;\n};\n\nexport { supportsMouseEvents, supportsPointerEvents, supportsTouchEvents };\n","import { addDomEvent, useDomEvent } from './use-dom-event.mjs';\nimport { wrapHandler } from './event-info.mjs';\nimport { supportsPointerEvents, supportsTouchEvents, supportsMouseEvents } from './utils.mjs';\n\nvar mouseEventNames = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\",\n};\nvar touchEventNames = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\",\n};\nfunction getPointerEventName(name) {\n if (supportsPointerEvents()) {\n return name;\n }\n else if (supportsTouchEvents()) {\n return touchEventNames[name];\n }\n else if (supportsMouseEvents()) {\n return mouseEventNames[name];\n }\n return name;\n}\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\nfunction usePointerEvent(ref, eventName, handler, options) {\n return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nexport { addPointerEvent, usePointerEvent };\n","function createLock(name) {\n var lock = null;\n return function () {\n var openLock = function () {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n var lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n var openHorizontal_1 = globalHorizontalLock();\n var openVertical_1 = globalVerticalLock();\n if (openHorizontal_1 && openVertical_1) {\n lock = function () {\n openHorizontal_1();\n openVertical_1();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal_1)\n openHorizontal_1();\n if (openVertical_1)\n openVertical_1();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n var openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","import { isMouseEvent } from './utils/event-type.mjs';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\nfunction createHoverEvent(visualElement, isActive, callback) {\n return function (event, info) {\n var _a;\n if (!isMouseEvent(event) || isDragActive())\n return;\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive);\n callback === null || callback === void 0 ? void 0 : callback(event, info);\n };\n}\nfunction useHoverGesture(_a) {\n var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement;\n usePointerEvent(visualElement, \"pointerenter\", onHoverStart || whileHover\n ? createHoverEvent(visualElement, true, onHoverStart)\n : undefined, { passive: !onHoverStart });\n usePointerEvent(visualElement, \"pointerleave\", onHoverEnd || whileHover\n ? createHoverEvent(visualElement, false, onHoverEnd)\n : undefined, { passive: !onHoverEnd });\n}\n\nexport { useHoverGesture };\n","import { useRef } from 'react';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { usePointerEvent, addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { pipe } from 'popmotion';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\n/**\n * @param handlers -\n * @internal\n */\nfunction useTapGesture(_a) {\n var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement;\n var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;\n var isPressing = useRef(false);\n var cancelPointerEndListeners = useRef(null);\n /**\n * Only set listener to passive if there are no external listeners.\n */\n var eventOptions = {\n passive: !(onTapStart || onTap || onTapCancel || onPointerDown),\n };\n function removePointerEndListener() {\n var _a;\n (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);\n cancelPointerEndListeners.current = null;\n }\n function checkPointerEnd() {\n var _a;\n removePointerEndListener();\n isPressing.current = false;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false);\n return !isDragActive();\n }\n function onPointerUp(event, info) {\n if (!checkPointerEnd())\n return;\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n !isNodeOrChild(visualElement.getInstance(), event.target)\n ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info)\n : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);\n }\n function onPointerCancel(event, info) {\n if (!checkPointerEnd())\n return;\n onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);\n }\n function onPointerDown(event, info) {\n var _a;\n removePointerEndListener();\n if (isPressing.current)\n return;\n isPressing.current = true;\n cancelPointerEndListeners.current = pipe(addPointerEvent(window, \"pointerup\", onPointerUp, eventOptions), addPointerEvent(window, \"pointercancel\", onPointerCancel, eventOptions));\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true);\n onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPressListeners ? onPointerDown : undefined, eventOptions);\n useUnmountEffect(removePointerEndListener);\n}\n\nexport { useTapGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nvar isNodeOrChild = function (parent, child) {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(function () { return function () { return callback(); }; }, []);\n}\n\nexport { useUnmountEffect };\n","import { __rest } from 'tslib';\nimport { detectAnimationFromOptions } from './utils/detect-animation-from-options.mjs';\nimport sync, { cancelSync } from 'framesync';\nimport { interpolate } from '../utils/interpolate.mjs';\nimport { hasRepeatDelayElapsed, reverseElapsed, loopElapsed } from './utils/elapsed.mjs';\n\nconst framesync = (update) => {\n const passTimestamp = ({ delta }) => update(delta);\n return {\n start: () => sync.update(passTimestamp, true),\n stop: () => cancelSync.update(passTimestamp),\n };\n};\nfunction animate(_a) {\n var _b, _c;\n var { from, autoplay = true, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = \"loop\", repeatDelay = 0, onPlay, onStop, onComplete, onRepeat, onUpdate } = _a, options = __rest(_a, [\"from\", \"autoplay\", \"driver\", \"elapsed\", \"repeat\", \"repeatType\", \"repeatDelay\", \"onPlay\", \"onStop\", \"onComplete\", \"onRepeat\", \"onUpdate\"]);\n let { to } = options;\n let driverControls;\n let repeatCount = 0;\n let computedDuration = options.duration;\n let latest;\n let isComplete = false;\n let isForwardPlayback = true;\n let interpolateFromNumber;\n const animator = detectAnimationFromOptions(options);\n if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {\n interpolateFromNumber = interpolate([0, 100], [from, to], {\n clamp: false,\n });\n from = 0;\n to = 100;\n }\n const animation = animator(Object.assign(Object.assign({}, options), { from, to }));\n function repeat() {\n repeatCount++;\n if (repeatType === \"reverse\") {\n isForwardPlayback = repeatCount % 2 === 0;\n elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);\n }\n else {\n elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);\n if (repeatType === \"mirror\")\n animation.flipTarget();\n }\n isComplete = false;\n onRepeat && onRepeat();\n }\n function complete() {\n driverControls.stop();\n onComplete && onComplete();\n }\n function update(delta) {\n if (!isForwardPlayback)\n delta = -delta;\n elapsed += delta;\n if (!isComplete) {\n const state = animation.next(Math.max(0, elapsed));\n latest = state.value;\n if (interpolateFromNumber)\n latest = interpolateFromNumber(latest);\n isComplete = isForwardPlayback ? state.done : elapsed <= 0;\n }\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);\n if (isComplete) {\n if (repeatCount === 0)\n computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);\n if (repeatCount < repeatMax) {\n hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();\n }\n else {\n complete();\n }\n }\n }\n function play() {\n onPlay === null || onPlay === void 0 ? void 0 : onPlay();\n driverControls = driver(update);\n driverControls.start();\n }\n autoplay && play();\n return {\n stop: () => {\n onStop === null || onStop === void 0 ? void 0 : onStop();\n driverControls.stop();\n },\n };\n}\n\nexport { animate };\n","import { __rest } from 'tslib';\nimport { findSpring, calcAngularFreq } from '../utils/find-spring.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = Object.assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options);\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 });\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring(_a) {\n var { from = 0.0, to = 1.0, restSpeed = 2, restDelta } = _a, options = __rest(_a, [\"from\", \"to\", \"restSpeed\", \"restDelta\"]);\n const state = { done: false, value: from };\n let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n let resolveSpring = zero;\n let resolveVelocity = zero;\n function createSpring() {\n const initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n const initialDelta = to - from;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;\n if (restDelta === undefined) {\n restDelta = Math.min(Math.abs(to - from) / 100, 0.4);\n }\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (to -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (dampingRatio *\n undampedAngularFreq *\n envelope *\n ((Math.sin(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta)) /\n angularFreq +\n initialDelta * Math.cos(angularFreq * t)) -\n envelope *\n (Math.cos(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta) -\n angularFreq *\n initialDelta *\n Math.sin(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n resolveSpring = (t) => to -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) *\n t);\n }\n else {\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (to -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n }\n createSpring();\n return {\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = resolveVelocity(t) * 1000;\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? to : current;\n return state;\n },\n flipTarget: () => {\n velocity = -velocity;\n [from, to] = [to, from];\n createSpring();\n },\n };\n}\nspring.needsInterpolation = (a, b) => typeof a === \"string\" || typeof b === \"string\";\nconst zero = (_t) => 0;\n\nexport { spring };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { warning } from 'hey-listen';\nimport { clamp } from '../../utils/clamp.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= maxDuration * 1000, \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, duration / 1000);\n if (dampingRatio < 1) {\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = duration * 1000;\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","const progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","const mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","function hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { hsla, rgba, hex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\n\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nconst notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;\nconst mixColor = (from, to) => {\n let fromColorType = getColorType(from);\n let toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n let fromColor = fromColorType.parse(from);\n let toColor = toColorType.parse(to);\n if (fromColorType === hsla) {\n fromColor = hslaToRgba(fromColor);\n fromColorType = rgba;\n }\n if (toColorType === hsla) {\n toColor = hslaToRgba(toColor);\n toColorType = rgba;\n }\n const blended = Object.assign({}, fromColor);\n return (v) => {\n for (const key in blended) {\n if (key !== \"alpha\") {\n blended[key] = mixLinearColor(fromColor[key], toColor[key], v);\n }\n }\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","const zeroPoint = {\n x: 0,\n y: 0,\n z: 0\n};\nconst isNum = (v) => typeof v === 'number';\n\nexport { isNum, zeroPoint };\n","const combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","import { complex, color } from 'style-value-types';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { isNum } from './inc.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = Object.assign(Object.assign({}, origin), target);\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nfunction analyse(value) {\n const parsed = complex.parse(value);\n const numValues = parsed.length;\n let numNumbers = 0;\n let numRGB = 0;\n let numHSL = 0;\n for (let i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === \"number\") {\n numNumbers++;\n }\n else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n }\n else {\n numRGB++;\n }\n }\n }\n return { parsed, numNumbers, numRGB, numHSL };\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyse(origin);\n const targetStats = analyse(target);\n const canInterpolate = originStats.numHSL === targetStats.numHSL &&\n originStats.numRGB === targetStats.numRGB &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return (p) => `${p > 0 ? target : origin}`;\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","import { progress } from './progress.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { invariant } from 'hey-listen';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n }\n else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n }\n else {\n return mixComplex;\n }\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === 'object') {\n return mixObject;\n }\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction fastInterpolate([from, to], [mixer]) {\n return (v) => mixer(progress(from, to, v));\n}\nfunction slowInterpolate(input, mixers) {\n const inputLength = input.length;\n const lastInputIndex = inputLength - 1;\n return (v) => {\n let mixerIndex = 0;\n let foundMixerIndex = false;\n if (v <= input[0]) {\n foundMixerIndex = true;\n }\n else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n if (!foundMixerIndex) {\n let i = 1;\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n mixerIndex = i - 1;\n }\n const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const interpolator = inputLength === 2\n ? fastInterpolate(input, mixers)\n : slowInterpolate(input, mixers);\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","const reverseEasing = easing => p => 1 - easing(1 - p);\nconst mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\nconst createExpoIn = (power) => p => Math.pow(p, power);\nconst createBackIn = (power) => p => p * p * ((power + 1) * p - power);\nconst createAnticipate = (power) => {\n const backEasing = createBackIn(power);\n return p => (p *= 2) < 1\n ? 0.5 * backEasing(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n};\n\nexport { createAnticipate, createBackIn, createExpoIn, mirrorEasing, reverseEasing };\n","import { createExpoIn, reverseEasing, mirrorEasing, createBackIn, createAnticipate } from './utils.mjs';\n\nconst DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nconst BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nconst BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nconst BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\nconst linear = p => p;\nconst easeIn = createExpoIn(2);\nconst easeOut = reverseEasing(easeIn);\nconst easeInOut = mirrorEasing(easeIn);\nconst circIn = p => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\nconst backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nconst backOut = reverseEasing(backIn);\nconst backInOut = mirrorEasing(backIn);\nconst anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);\nconst ca = 4356.0 / 361.0;\nconst cb = 35442.0 / 1805.0;\nconst cc = 16061.0 / 1805.0;\nconst bounceOut = (p) => {\n if (p === 1 || p === 0)\n return p;\n const p2 = p * p;\n return p < BOUNCE_FIRST_THRESHOLD\n ? 7.5625 * p2\n : p < BOUNCE_SECOND_THRESHOLD\n ? 9.075 * p2 - 9.9 * p + 3.4\n : p < BOUNCE_THIRD_THRESHOLD\n ? ca * p2 - cb * p + cc\n : 10.8 * p * p - 20.52 * p + 10.72;\n};\nconst bounceIn = reverseEasing(bounceOut);\nconst bounceInOut = (p) => p < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0))\n : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n\nexport { anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, linear };\n","import { interpolate } from '../../utils/interpolate.mjs';\nimport { easeInOut } from '../../easing/index.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction defaultOffset(values) {\n const numValues = values.length;\n return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);\n}\nfunction convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\nfunction keyframes({ from = 0, to = 1, ease, offset, duration = 300, }) {\n const state = { done: false, value: from };\n const values = Array.isArray(to) ? to : [from, to];\n const times = convertOffsetToTimes(offset && offset.length === values.length\n ? offset\n : defaultOffset(values), duration);\n function createInterpolator() {\n return interpolate(times, values, {\n ease: Array.isArray(ease) ? ease : defaultEasing(values, ease),\n });\n }\n let interpolator = createInterpolator();\n return {\n next: (t) => {\n state.value = interpolator(t);\n state.done = t >= duration;\n return state;\n },\n flipTarget: () => {\n values.reverse();\n interpolator = createInterpolator();\n },\n };\n}\n\nexport { convertOffsetToTimes, defaultEasing, defaultOffset, keyframes };\n","function decay({ velocity = 0, from = 0, power = 0.8, timeConstant = 350, restDelta = 0.5, modifyTarget, }) {\n const state = { done: false, value: from };\n let amplitude = power * velocity;\n const ideal = from + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n if (target !== ideal)\n amplitude = target - from;\n return {\n next: (t) => {\n const delta = -amplitude * Math.exp(-t / timeConstant);\n state.done = !(delta > restDelta || delta < -restDelta);\n state.value = state.done ? target : target + delta;\n return state;\n },\n flipTarget: () => { },\n };\n}\n\nexport { decay };\n","import { spring } from '../generators/spring.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { decay } from '../generators/decay.mjs';\n\nconst types = { keyframes, spring, decay };\nfunction detectAnimationFromOptions(config) {\n if (Array.isArray(config.to)) {\n return keyframes;\n }\n else if (types[config.type]) {\n return types[config.type];\n }\n const keys = new Set(Object.keys(config));\n if (keys.has(\"ease\") ||\n (keys.has(\"duration\") && !keys.has(\"dampingRatio\"))) {\n return keyframes;\n }\n else if (keys.has(\"dampingRatio\") ||\n keys.has(\"stiffness\") ||\n keys.has(\"mass\") ||\n keys.has(\"damping\") ||\n keys.has(\"restSpeed\") ||\n keys.has(\"restDelta\")) {\n return spring;\n }\n return keyframes;\n}\n\nexport { detectAnimationFromOptions };\n","const defaultTimestep = (1 / 60) * 1000;\nconst getCurrentTime = typeof performance !== \"undefined\"\n ? () => performance.now()\n : () => Date.now();\nconst onNextFrame = typeof window !== \"undefined\"\n ? (callback) => window.requestAnimationFrame(callback)\n : (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);\n\nexport { defaultTimestep, onNextFrame };\n","function createRenderStep(runNextFrame) {\n let toRun = [];\n let toRunNextFrame = [];\n let numToRun = 0;\n let isProcessing = false;\n let flushNextFrame = false;\n const toKeepAlive = new WeakSet();\n const step = {\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const buffer = addToCurrentFrame ? toRun : toRunNextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (buffer.indexOf(callback) === -1) {\n buffer.push(callback);\n if (addToCurrentFrame && isProcessing)\n numToRun = toRun.length;\n }\n return callback;\n },\n cancel: (callback) => {\n const index = toRunNextFrame.indexOf(callback);\n if (index !== -1)\n toRunNextFrame.splice(index, 1);\n toKeepAlive.delete(callback);\n },\n process: (frameData) => {\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [toRun, toRunNextFrame] = [toRunNextFrame, toRun];\n toRunNextFrame.length = 0;\n numToRun = toRun.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = toRun[i];\n callback(frameData);\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { onNextFrame, defaultTimestep } from './on-next-frame.mjs';\nimport { createRenderStep } from './create-render-step.mjs';\n\nconst maxElapsed = 40;\nlet useDefaultElapsed = true;\nlet runNextFrame = false;\nlet isProcessing = false;\nconst frame = {\n delta: 0,\n timestamp: 0,\n};\nconst stepsOrder = [\n \"read\",\n \"update\",\n \"preRender\",\n \"render\",\n \"postRender\",\n];\nconst steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n}, {});\nconst sync = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n startLoop();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n}, {});\nconst cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = steps[key].cancel;\n return acc;\n}, {});\nconst flushSync = stepsOrder.reduce((acc, key) => {\n acc[key] = () => steps[key].process(frame);\n return acc;\n}, {});\nconst processStep = (stepId) => steps[stepId].process(frame);\nconst processFrame = (timestamp) => {\n runNextFrame = false;\n frame.delta = useDefaultElapsed\n ? defaultTimestep\n : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);\n frame.timestamp = timestamp;\n isProcessing = true;\n stepsOrder.forEach(processStep);\n isProcessing = false;\n if (runNextFrame) {\n useDefaultElapsed = false;\n onNextFrame(processFrame);\n }\n};\nconst startLoop = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!isProcessing)\n onNextFrame(processFrame);\n};\nconst getFrameData = () => frame;\n\nexport default sync;\nexport { cancelSync, flushSync, getFrameData };\n","function loopElapsed(elapsed, duration, delay = 0) {\n return elapsed - duration - delay;\n}\nfunction reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) {\n return isForwardPlayback\n ? loopElapsed(duration + -elapsed, duration, delay)\n : duration - (elapsed - duration) + delay;\n}\nfunction hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {\n return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;\n}\n\nexport { hasRepeatDelayElapsed, loopElapsed, reverseElapsed };\n","function velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { animate } from './index.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { getFrameData } from 'framesync';\n\nfunction inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant = 750, bounceStiffness = 500, bounceDamping = 10, restDelta = 1, modifyTarget, driver, onUpdate, onComplete, onStop, }) {\n let currentAnimation;\n function isOutOfBounds(v) {\n return (min !== undefined && v < min) || (max !== undefined && v > max);\n }\n function boundaryNearest(v) {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n }\n function startAnimation(options) {\n currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n currentAnimation = animate(Object.assign(Object.assign({}, options), { driver, onUpdate: (v) => {\n var _a;\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);\n }, onComplete,\n onStop }));\n }\n function startSpring(options) {\n startAnimation(Object.assign({ type: \"spring\", stiffness: bounceStiffness, damping: bounceDamping, restDelta }, options));\n }\n if (isOutOfBounds(from)) {\n startSpring({ from, velocity, to: boundaryNearest(from) });\n }\n else {\n let target = power * velocity + from;\n if (typeof modifyTarget !== \"undefined\")\n target = modifyTarget(target);\n const boundary = boundaryNearest(target);\n const heading = boundary === min ? -1 : 1;\n let prev;\n let current;\n const checkBoundary = (v) => {\n prev = current;\n current = v;\n velocity = velocityPerSecond(v - prev, getFrameData().delta);\n if ((heading === 1 && v > boundary) ||\n (heading === -1 && v < boundary)) {\n startSpring({ from: v, to: boundary, velocity });\n }\n };\n startAnimation({\n type: \"decay\",\n from,\n velocity,\n timeConstant,\n power,\n restDelta,\n modifyTarget,\n onUpdate: isOutOfBounds(target) ? checkBoundary : undefined,\n });\n }\n return {\n stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(),\n };\n}\n\nexport { inertia };\n","const isPoint = (point) => point.hasOwnProperty('x') && point.hasOwnProperty('y');\n\nexport { isPoint };\n","import { isPoint } from './is-point.mjs';\n\nconst isPoint3D = (point) => isPoint(point) && point.hasOwnProperty('z');\n\nexport { isPoint3D };\n","import { isPoint } from './is-point.mjs';\nimport { isPoint3D } from './is-point-3d.mjs';\nimport { isNum } from './inc.mjs';\n\nconst distance1D = (a, b) => Math.abs(a - b);\nfunction distance(a, b) {\n if (isNum(a) && isNum(b)) {\n return distance1D(a, b);\n }\n else if (isPoint(a) && isPoint(b)) {\n const xDelta = distance1D(a.x, b.x);\n const yDelta = distance1D(a.y, b.y);\n const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n }\n}\n\nexport { distance };\n","import { linear } from './index.mjs';\n\nconst a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;\nconst b = (a1, a2) => 3.0 * a2 - 6.0 * a1;\nconst c = (a1) => 3.0 * a1;\nconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\nconst getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 10;\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n }\n else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nconst newtonIterations = 8;\nconst newtonMinSlope = 0.001;\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (let i = 0; i < newtonIterations; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n if (mX1 === mY1 && mX2 === mY2)\n return linear;\n const sampleValues = new Float32Array(kSplineTableSize);\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n const dist = (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= newtonMinSlope) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n else if (initialSlope === 0.0) {\n return guessForT;\n }\n else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { env } from '../../../utils/process.mjs';\nimport { useRef, useEffect } from 'react';\nimport { AnimationType } from '../../../render/utils/types.mjs';\nimport { warnOnce } from '../../../utils/warn-once.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nfunction useViewport(_a) {\n var visualElement = _a.visualElement, whileInView = _a.whileInView, onViewportEnter = _a.onViewportEnter, onViewportLeave = _a.onViewportLeave, _b = _a.viewport, viewport = _b === void 0 ? {} : _b;\n var state = useRef({\n hasEnteredView: false,\n isInView: false,\n });\n var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);\n if (viewport.once && state.current.hasEnteredView)\n shouldObserve = false;\n var useObserver = typeof IntersectionObserver === \"undefined\"\n ? useMissingIntersectionObserver\n : useIntersectionObserver;\n useObserver(shouldObserve, state.current, visualElement, viewport);\n}\nvar thresholdNames = {\n some: 0,\n all: 1,\n};\nfunction useIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var root = _a.root, rootMargin = _a.margin, _b = _a.amount, amount = _b === void 0 ? \"some\" : _b, once = _a.once;\n useEffect(function () {\n if (!shouldObserve)\n return;\n var options = {\n root: root === null || root === void 0 ? void 0 : root.current,\n rootMargin: rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n var intersectionCallback = function (entry) {\n var _a;\n var isIntersecting = entry.isIntersecting;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (state.isInView === isIntersecting)\n return;\n state.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && state.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n state.hasEnteredView = true;\n }\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, isIntersecting);\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n var props = visualElement.getProps();\n var callback = isIntersecting\n ? props.onViewportEnter\n : props.onViewportLeave;\n callback === null || callback === void 0 ? void 0 : callback(entry);\n };\n return observeIntersection(visualElement.getInstance(), options, intersectionCallback);\n }, [shouldObserve, root, rootMargin, amount]);\n}\n/**\n * If IntersectionObserver is missing, we activate inView and fire onViewportEnter\n * on mount. This way, the page will be in the state the author expects users\n * to see it in for everyone.\n */\nfunction useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var _b = _a.fallback, fallback = _b === void 0 ? true : _b;\n useEffect(function () {\n if (!shouldObserve || !fallback)\n return;\n if (env !== \"production\") {\n warnOnce(false, \"IntersectionObserver not available on this device. whileInView animations will trigger on mount.\");\n }\n /**\n * Fire this in an rAF because, at this point, the animation state\n * won't have flushed for the first time and there's certain logic in\n * there that behaves differently on the initial animation.\n *\n * This hook should be quite rarely called so setting this in an rAF\n * is preferred to changing the behaviour of the animation state.\n */\n requestAnimationFrame(function () {\n var _a;\n state.hasEnteredView = true;\n var onViewportEnter = visualElement.getProps().onViewportEnter;\n onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, true);\n });\n }, [shouldObserve]);\n}\n\nexport { useViewport };\n","var warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","import { __rest, __assign } from 'tslib';\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nvar observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nvar observers = new WeakMap();\nvar fireObserverCallback = function (entry) {\n var _a;\n (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n};\nvar fireAllObserverCallbacks = function (entries) {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver(_a) {\n var root = _a.root, options = __rest(_a, [\"root\"]);\n var lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n var rootObservers = observers.get(lookupRoot);\n var key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __assign({ root: root }, options));\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n var rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return function () {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","var makeRenderlessComponent = function (hook) { return function (props) {\n hook(props);\n return null;\n}; };\n\nexport { makeRenderlessComponent };\n","import { useFocusGesture } from '../../gestures/use-focus-gesture.mjs';\nimport { useHoverGesture } from '../../gestures/use-hover-gesture.mjs';\nimport { useTapGesture } from '../../gestures/use-tap-gesture.mjs';\nimport { useViewport } from './viewport/use-viewport.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar gestureAnimations = {\n inView: makeRenderlessComponent(useViewport),\n tap: makeRenderlessComponent(useTapGesture),\n focus: makeRenderlessComponent(useFocusGesture),\n hover: makeRenderlessComponent(useHoverGesture),\n};\n\nexport { gestureAnimations };\n","import { __read } from 'tslib';\nimport { useEffect, useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { usePresence } from '../../components/AnimatePresence/use-presence.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { createAnimationState } from '../../render/utils/animation-state.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar animations = {\n animation: makeRenderlessComponent(function (_a) {\n var visualElement = _a.visualElement, animate = _a.animate;\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n if (isAnimationControls(animate)) {\n useEffect(function () { return animate.subscribe(visualElement); }, [animate]);\n }\n }),\n exit: makeRenderlessComponent(function (props) {\n var custom = props.custom, visualElement = props.visualElement;\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var presenceContext = useContext(PresenceContext);\n useEffect(function () {\n var _a, _b;\n visualElement.isPresent = isPresent;\n var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom });\n !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));\n }, [isPresent]);\n }),\n};\n\nexport { animations };\n","import { useContext, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n var context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n // Replace with useId when released in React\n var id = useId();\n useEffect(function () { return register(id); }, []);\n var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); };\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { useConstant } from './use-constant.mjs';\n\nvar counter = 0;\nvar incrementId = function () { return counter++; };\nvar useId = function () { return useConstant(incrementId); };\n/**\n * Ideally we'd use the following code to support React 18 optionally.\n * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).\n * Need to come up with a different way of figuring this out.\n */\n// export const useId = (React as any).useId\n// ? (React as any).useId\n// : () => useConstant(incrementId)\n\nexport { useId };\n","import { __spreadArray, __read, __assign, __rest } from 'tslib';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { animateVisualElement } from './animation.mjs';\nimport { AnimationType } from './types.mjs';\nimport { isVariantLabels, resolveVariant, isVariantLabel } from './variants.mjs';\n\nvar variantPriorityOrder = [\n AnimationType.Animate,\n AnimationType.InView,\n AnimationType.Focus,\n AnimationType.Hover,\n AnimationType.Tap,\n AnimationType.Drag,\n AnimationType.Exit,\n];\nvar reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder), false).reverse();\nvar numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return function (animations) {\n return Promise.all(animations.map(function (_a) {\n var animation = _a.animation, options = _a.options;\n return animateVisualElement(visualElement, animation, options);\n }));\n };\n}\nfunction createAnimationState(visualElement) {\n var animate = animateList(visualElement);\n var state = createState();\n var allAnimatedKeys = {};\n var isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n var buildResolvedTypeValues = function (acc, definition) {\n var resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, [\"transition\", \"transitionEnd\"]);\n acc = __assign(__assign(__assign({}, acc), target), transitionEnd);\n }\n return acc;\n };\n function isAnimated(key) {\n return allAnimatedKeys[key] !== undefined;\n }\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(options, changedActiveType) {\n var _a;\n var props = visualElement.getProps();\n var context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n var animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n var removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n var encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n var removedVariantIndex = Infinity;\n var _loop_1 = function (i) {\n var type = reversePriorityOrder[i];\n var typeState = state[type];\n var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n var propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n var activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = __assign({}, encounteredKeys);\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n return \"continue\";\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n var shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n var definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;\n var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n var markToAnimate = function (key) {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (var key in allKeys) {\n var next = resolvedValues[key];\n var prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev) || variantDidChange) {\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) { return ({\n animation: animation,\n options: __assign({ type: type }, options),\n }); })), false));\n }\n };\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (var i = 0; i < numAnimationTypes; i++) {\n _loop_1(i);\n }\n allAnimatedKeys = __assign({}, encounteredKeys);\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n var fallbackAnimation_1 = {};\n removedKeys.forEach(function (key) {\n var fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation_1[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation_1 });\n }\n var shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n var animations = animateChanges(options, type);\n for (var key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n isAnimated: isAnimated,\n animateChanges: animateChanges,\n setActive: setActive,\n setAnimateFunction: setAnimateFunction,\n getState: function () { return state; },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (isVariantLabels(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive) {\n if (isActive === void 0) { isActive = false; }\n return {\n isActive: isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n var _a;\n return _a = {},\n _a[AnimationType.Animate] = createTypeState(true),\n _a[AnimationType.InView] = createTypeState(),\n _a[AnimationType.Hover] = createTypeState(),\n _a[AnimationType.Tap] = createTypeState(),\n _a[AnimationType.Drag] = createTypeState(),\n _a[AnimationType.Focus] = createTypeState(),\n _a[AnimationType.Exit] = createTypeState(),\n _a;\n}\n\nexport { checkVariantsDidChange, createAnimationState, variantPriorityOrder };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n var prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (var i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { __read, __rest, __assign } from 'tslib';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { setTarget } from './setters.mjs';\nimport { resolveVariant } from './variants.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\n\nfunction animateVisualElement(visualElement, definition, options) {\n if (options === void 0) { options = {}; }\n visualElement.notifyAnimationStart(definition);\n var animation;\n if (Array.isArray(definition)) {\n var animations = definition.map(function (variant) {\n return animateVariant(visualElement, variant, options);\n });\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n var resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = animateTarget(visualElement, resolvedDefinition, options);\n }\n return animation.then(function () {\n return visualElement.notifyAnimationComplete(definition);\n });\n}\nfunction animateVariant(visualElement, variant, options) {\n var _a;\n if (options === void 0) { options = {}; }\n var resolved = resolveVariant(visualElement, variant, options.custom);\n var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getAnimation = resolved\n ? function () { return animateTarget(visualElement, resolved, options); }\n : function () { return Promise.resolve(); };\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size)\n ? function (forwardDelay) {\n if (forwardDelay === void 0) { forwardDelay = 0; }\n var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : function () { return Promise.resolve(); };\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n var when = transition.when;\n if (when) {\n var _c = __read(when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1];\n return first().then(last);\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\n/**\n * @internal\n */\nfunction animateTarget(visualElement, definition, _a) {\n var _b;\n var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type;\n var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, [\"transition\", \"transitionEnd\"]);\n if (transitionOverride)\n transition = transitionOverride;\n var animations = [];\n var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);\n for (var key in target) {\n var value = visualElement.getValue(key);\n var valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n var valueTransition = __assign({ delay: delay }, transition);\n /**\n * Make animation instant if this is a transform prop and we should reduce motion.\n */\n if (visualElement.shouldReduceMotion && isTransformProp(key)) {\n valueTransition = __assign(__assign({}, valueTransition), { type: false, delay: 0 });\n }\n var animation = startAnimation(key, value, valueTarget, valueTransition);\n animations.push(animation);\n }\n return Promise.all(animations).then(function () {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n}\nfunction animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {\n if (delayChildren === void 0) { delayChildren = 0; }\n if (staggerChildren === void 0) { staggerChildren = 0; }\n if (staggerDirection === void 0) { staggerDirection = 1; }\n var animations = [];\n var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n var generateStaggerDuration = staggerDirection === 1\n ? function (i) {\n if (i === void 0) { i = 0; }\n return i * staggerChildren;\n }\n : function (i) {\n if (i === void 0) { i = 0; }\n return maxStaggerDuration - i * staggerChildren;\n };\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach(function (child, i) {\n animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); }));\n });\n return Promise.all(animations);\n}\nfunction stopAnimation(visualElement) {\n visualElement.forEachValue(function (value) { return value.stop(); });\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(_a, key) {\n var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating;\n var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\n\nexport { animateVisualElement, sortByTreeOrder, stopAnimation };\n","import { __assign, __rest, __spreadArray, __read } from 'tslib';\nimport { inertia, animate } from 'popmotion';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { isEasingArray, easingDefinitionToFunction } from './easing.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { getDefaultTransition } from './default-transitions.mjs';\nimport { warning } from 'hey-listen';\nimport { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(_a) {\n _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, [\"when\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"repeat\", \"repeatType\", \"repeatDelay\", \"from\"]);\n return !!Object.keys(transition).length;\n}\nvar legacyRepeatWarning = false;\n/**\n * Convert Framer Motion's Transition type into Popmotion-compatible options.\n */\nfunction convertTransitionToAnimationOptions(_a) {\n var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, [\"ease\", \"times\", \"yoyo\", \"flip\", \"loop\"]);\n var options = __assign({}, transition);\n if (times)\n options[\"offset\"] = times;\n /**\n * Convert any existing durations from seconds to milliseconds\n */\n if (transition.duration)\n options[\"duration\"] = secondsToMilliseconds(transition.duration);\n if (transition.repeatDelay)\n options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);\n /**\n * Map easing names to Popmotion's easing functions\n */\n if (ease) {\n options[\"ease\"] = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n }\n /**\n * Support legacy transition API\n */\n if (transition.type === \"tween\")\n options.type = \"keyframes\";\n /**\n * TODO: These options are officially removed from the API.\n */\n if (yoyo || loop || flip) {\n warning(!legacyRepeatWarning, \"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.\");\n legacyRepeatWarning = true;\n if (yoyo) {\n options.repeatType = \"reverse\";\n }\n else if (loop) {\n options.repeatType = \"loop\";\n }\n else if (flip) {\n options.repeatType = \"mirror\";\n }\n options.repeat = loop || yoyo || flip || transition.repeat;\n }\n /**\n * TODO: Popmotion 9 has the ability to automatically detect whether to use\n * a keyframes or spring animation, but does so by detecting velocity and other spring options.\n * It'd be good to introduce a similar thing here.\n */\n if (transition.type !== \"spring\")\n options.type = \"keyframes\";\n return options;\n}\n/**\n * Get the delay for a value by checking Transition with decreasing specificity.\n */\nfunction getDelayFromTransition(transition, key) {\n var _a, _b;\n var valueTransition = getValueTransition(transition, key) || {};\n return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;\n}\nfunction hydrateKeyframes(options) {\n if (Array.isArray(options.to) && options.to[0] === null) {\n options.to = __spreadArray([], __read(options.to), false);\n options.to[0] = options.from;\n }\n return options;\n}\nfunction getPopmotionAnimationOptions(transition, options, key) {\n var _a;\n if (Array.isArray(options.to)) {\n (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8);\n }\n hydrateKeyframes(options);\n /**\n * Get a default transition if none is determined to be defined.\n */\n if (!isTransitionDefined(transition)) {\n transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to));\n }\n return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition));\n}\n/**\n *\n */\nfunction getAnimation(key, value, target, transition, onComplete) {\n var _a;\n var valueTransition = getValueTransition(transition, key);\n var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();\n var isTargetAnimatable = isAnimatable(key, target);\n if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\") {\n /**\n * If we're trying to animate from \"none\", try and get an animatable version\n * of the target. This could be improved to work both ways.\n */\n origin = getAnimatableNone(key, target);\n }\n else if (isZero(origin) && typeof target === \"string\") {\n origin = getZeroUnit(target);\n }\n else if (!Array.isArray(target) &&\n isZero(target) &&\n typeof origin === \"string\") {\n target = getZeroUnit(origin);\n }\n var isOriginAnimatable = isAnimatable(key, origin);\n warning(isOriginAnimatable === isTargetAnimatable, \"You are trying to animate \".concat(key, \" from \\\"\").concat(origin, \"\\\" to \\\"\").concat(target, \"\\\". \").concat(origin, \" is not an animatable value - to enable this animation set \").concat(origin, \" to a value animatable to \").concat(target, \" via the `style` property.\"));\n function start() {\n var options = {\n from: origin,\n to: target,\n velocity: value.getVelocity(),\n onComplete: onComplete,\n onUpdate: function (v) { return value.set(v); },\n };\n return valueTransition.type === \"inertia\" ||\n valueTransition.type === \"decay\"\n ? inertia(__assign(__assign({}, options), valueTransition))\n : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) {\n var _a;\n options.onUpdate(v);\n (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);\n }, onComplete: function () {\n var _a;\n options.onComplete();\n (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n } }));\n }\n function set() {\n var _a, _b;\n var finalTarget = resolveFinalValueInKeyframes(target);\n value.set(finalTarget);\n onComplete();\n (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);\n (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);\n return { stop: function () { } };\n }\n return !isOriginAnimatable ||\n !isTargetAnimatable ||\n valueTransition.type === false\n ? set\n : start;\n}\nfunction isZero(value) {\n return (value === 0 ||\n (typeof value === \"string\" &&\n parseFloat(value) === 0 &&\n value.indexOf(\" \") === -1));\n}\nfunction getZeroUnit(potentialUnitType) {\n return typeof potentialUnitType === \"number\"\n ? 0\n : getAnimatableNone(\"\", potentialUnitType);\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n/**\n * Start animation on a MotionValue. This function is an interface between\n * Framer Motion and Popmotion\n */\nfunction startAnimation(key, value, target, transition) {\n if (transition === void 0) { transition = {}; }\n if (instantAnimationState.current) {\n transition = { type: false };\n }\n return value.start(function (onComplete) {\n var delayTimer;\n var controls;\n var animation = getAnimation(key, value, target, transition, onComplete);\n var delay = getDelayFromTransition(transition, key);\n var start = function () { return (controls = animation()); };\n if (delay) {\n delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));\n }\n else {\n start();\n }\n return function () {\n clearTimeout(delayTimer);\n controls === null || controls === void 0 ? void 0 : controls.stop();\n };\n });\n}\n\nexport { convertTransitionToAnimationOptions, getDelayFromTransition, getPopmotionAnimationOptions, getValueTransition, getZeroUnit, hydrateKeyframes, isTransitionDefined, isZero, startAnimation };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nvar secondsToMilliseconds = function (seconds) { return seconds * 1000; };\n\nexport { secondsToMilliseconds };\n","import { __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\n\nvar easingLookup = {\n linear: linear,\n easeIn: easeIn,\n easeInOut: easeInOut,\n easeOut: easeOut,\n circIn: circIn,\n circInOut: circInOut,\n circOut: circOut,\n backIn: backIn,\n backInOut: backInOut,\n backOut: backOut,\n anticipate: anticipate,\n bounceIn: bounceIn,\n bounceInOut: bounceInOut,\n bounceOut: bounceOut,\n};\nvar easingDefinitionToFunction = function (definition) {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, \"Invalid easing type '\".concat(definition, \"'\"));\n return easingLookup[definition];\n }\n return definition;\n};\nvar isEasingArray = function (ease) {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { easingDefinitionToFunction, isEasingArray };\n","import { complex } from 'style-value-types';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nvar isAnimatable = function (key, value) {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n complex.test(value) && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { __assign } from 'tslib';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\nvar underDampedSpring = function () { return ({\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n}); };\nvar criticallyDampedSpring = function (to) { return ({\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n}); };\nvar linearTween = function () { return ({\n type: \"keyframes\",\n ease: \"linear\",\n duration: 0.3,\n}); };\nvar keyframes = function (values) { return ({\n type: \"keyframes\",\n duration: 0.8,\n values: values,\n}); };\nvar defaultTransitions = {\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: criticallyDampedSpring,\n scaleY: criticallyDampedSpring,\n scale: criticallyDampedSpring,\n opacity: linearTween,\n backgroundColor: linearTween,\n color: linearTween,\n default: criticallyDampedSpring,\n};\nvar getDefaultTransition = function (valueKey, to) {\n var transitionFactory;\n if (isKeyframesTarget(to)) {\n transitionFactory = keyframes;\n }\n else {\n transitionFactory =\n defaultTransitions[valueKey] || defaultTransitions.default;\n }\n return __assign({ to: to }, transitionFactory(to));\n};\n\nexport { criticallyDampedSpring, getDefaultTransition, linearTween, underDampedSpring };\n","import { __assign } from 'tslib';\nimport { color, filter } from 'style-value-types';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nvar defaultValueTypes = __assign(__assign({}, numberValueTypes), { \n // Color props\n color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, \n // Border props\n borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter });\n/**\n * Gets the default ValueType for the provided value key\n */\nvar getDefaultValueType = function (key) { return defaultValueTypes[key]; };\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { filter, complex } from 'style-value-types';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n var _a;\n var defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);\n}\n\nexport { getAnimatableNone };\n","var instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { complex } from 'style-value-types';\nimport { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n var resolved = resolveVariant(visualElement, definition);\n var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, [\"transitionEnd\", \"transition\"]);\n target = __assign(__assign({}, target), transitionEnd);\n for (var key in target) {\n var value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n var reversedLabels = __spreadArray([], __read(variantLabels), false).reverse();\n reversedLabels.forEach(function (key) {\n var _a;\n var variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n setVariants(child, variantLabels);\n });\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b, _c;\n var _d;\n var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); });\n var numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (var i = 0; i < numNewValues; i++) {\n var key = newValueKeys[i];\n var targetValue = target[key];\n var value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n if (value === undefined || value === null)\n continue;\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n visualElement.addValue(key, motionValue(value));\n (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value);\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n var valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n var _a, _b;\n var origin = {};\n for (var key in target) {\n origin[key] =\n (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nvar isNumericalString = function (v) { return /^\\-?\\d*\\.?\\d+$/.test(v); };\n\nexport { isNumericalString };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nvar isZeroValueString = function (v) { return /^0[^.\\s]+$/.test(v); };\n\nexport { isZeroValueString };\n","import { __read } from 'tslib';\n\nfunction addUniqueItem(arr, item) {\n arr.indexOf(item) === -1 && arr.push(item);\n}\nfunction removeItem(arr, item) {\n var index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem(_a, fromIndex, toIndex) {\n var _b = __read(_a), arr = _b.slice(0);\n var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n var _c = __read(arr.splice(fromIndex, 1), 1), item = _c[0];\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nvar SubscriptionManager = /** @class */ (function () {\n function SubscriptionManager() {\n this.subscriptions = [];\n }\n SubscriptionManager.prototype.add = function (handler) {\n var _this = this;\n addUniqueItem(this.subscriptions, handler);\n return function () { return removeItem(_this.subscriptions, handler); };\n };\n SubscriptionManager.prototype.notify = function (a, b, c) {\n var numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (var i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n var handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n };\n SubscriptionManager.prototype.getSize = function () {\n return this.subscriptions.length;\n };\n SubscriptionManager.prototype.clear = function () {\n this.subscriptions.length = 0;\n };\n return SubscriptionManager;\n}());\n\nexport { SubscriptionManager };\n","import sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond } from 'popmotion';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\n\nvar isFloat = function (value) {\n return !isNaN(parseFloat(value));\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nvar MotionValue = /** @class */ (function () {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n function MotionValue(init) {\n var _this = this;\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"6.5.1\";\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n this.lastUpdated = 0;\n /**\n * Functions to notify when the `MotionValue` updates.\n *\n * @internal\n */\n this.updateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the velocity updates.\n *\n * @internal\n */\n this.velocityUpdateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the `MotionValue` updates and `render` is set to `true`.\n *\n * @internal\n */\n this.renderSubscribers = new SubscriptionManager();\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n this.updateAndNotify = function (v, render) {\n if (render === void 0) { render = true; }\n _this.prev = _this.current;\n _this.current = v;\n // Update timestamp\n var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp;\n if (_this.lastUpdated !== timestamp) {\n _this.timeDelta = delta;\n _this.lastUpdated = timestamp;\n sync.postRender(_this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (_this.prev !== _this.current) {\n _this.updateSubscribers.notify(_this.current);\n }\n // Update velocity subscribers\n if (_this.velocityUpdateSubscribers.getSize()) {\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n // Update render subscribers\n if (render) {\n _this.renderSubscribers.notify(_this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.scheduleVelocityCheck = function () { return sync.postRender(_this.velocityCheck); };\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.velocityCheck = function (_a) {\n var timestamp = _a.timestamp;\n if (timestamp !== _this.lastUpdated) {\n _this.prev = _this.current;\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.onChange(updateOpacity)\n * const unsubscribeY = y.onChange(updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @privateRemarks\n *\n * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.\n *\n * ```jsx\n * useOnChange(x, () => {})\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @public\n */\n MotionValue.prototype.onChange = function (subscription) {\n return this.updateSubscribers.add(subscription);\n };\n MotionValue.prototype.clearListeners = function () {\n this.updateSubscribers.clear();\n };\n /**\n * Adds a function that will be notified when the `MotionValue` requests a render.\n *\n * @param subscriber - A function that's provided the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @internal\n */\n MotionValue.prototype.onRenderRequest = function (subscription) {\n // Render immediately\n subscription(this.get());\n return this.renderSubscribers.add(subscription);\n };\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n MotionValue.prototype.attach = function (passiveEffect) {\n this.passiveEffect = passiveEffect;\n };\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n MotionValue.prototype.set = function (v, render) {\n if (render === void 0) { render = true; }\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n };\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n MotionValue.prototype.get = function () {\n return this.current;\n };\n /**\n * @public\n */\n MotionValue.prototype.getPrevious = function () {\n return this.prev;\n };\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n MotionValue.prototype.getVelocity = function () {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity\n ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prev), this.timeDelta)\n : 0;\n };\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n MotionValue.prototype.start = function (animation) {\n var _this = this;\n this.stop();\n return new Promise(function (resolve) {\n _this.hasAnimated = true;\n _this.stopAnimation = animation(resolve);\n }).then(function () { return _this.clearAnimation(); });\n };\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n MotionValue.prototype.stop = function () {\n if (this.stopAnimation)\n this.stopAnimation();\n this.clearAnimation();\n };\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n MotionValue.prototype.isAnimating = function () {\n return !!this.stopAnimation;\n };\n MotionValue.prototype.clearAnimation = function () {\n this.stopAnimation = null;\n };\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n MotionValue.prototype.destroy = function () {\n this.updateSubscribers.clear();\n this.renderSubscribers.clear();\n this.stop();\n };\n return MotionValue;\n}());\nfunction motionValue(init) {\n return new MotionValue(init);\n}\n\nexport { MotionValue, motionValue };\n","import { __spreadArray, __read } from 'tslib';\nimport { color, complex } from 'style-value-types';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nvar valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes), false), [color, complex], false);\n/**\n * Tests a value against the list of ValueTypes\n */\nvar findValueType = function (v) { return valueTypes.find(testValueType(v)); };\n\nexport { findValueType };\n","/**\n * Tests a provided value against a ValueType\n */\nvar testValueType = function (v) { return function (type) { return type.test(v); }; };\n\nexport { testValueType };\n","/**\n * ValueType for \"auto\"\n */\nvar auto = {\n test: function (v) { return v === \"auto\"; },\n parse: function (v) { return v; },\n};\n\nexport { auto };\n","import { number, px, percent, degrees, vw, vh } from 'style-value-types';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nvar findDimensionValueType = function (v) {\n return dimensionValueTypes.find(testValueType(v));\n};\n\nexport { dimensionValueTypes, findDimensionValueType };\n","import { useEffect } from 'react';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * A hook that allows an element to be dragged.\n *\n * @internal\n */\nfunction useDrag(props) {\n var groupDragControls = props.dragControls, visualElement = props.visualElement;\n var dragControls = useConstant(function () { return new VisualElementDragControls(visualElement); });\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls, groupDragControls]);\n // Apply the event listeners to the element\n useEffect(function () { return dragControls.addListeners(); }, [dragControls]);\n}\n\nexport { useDrag };\n","import { __assign } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { PanSession } from '../PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/use-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\n\nvar elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: AnyPointerEvent\nvar VisualElementDragControls = /** @class */ (function () {\n function VisualElementDragControls(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n VisualElementDragControls.prototype.start = function (originEvent, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.snapToCursor, snapToCursor = _c === void 0 ? false : _c;\n /**\n * Don't start dragging if this component is exiting\n */\n if (this.visualElement.isPresent === false)\n return;\n var onSessionStart = function (event) {\n // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n _this.stopAnimation();\n if (snapToCursor) {\n _this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n var onStart = function (event, info) {\n var _a;\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n var _b = _this.getProps(), drag = _b.drag, dragPropagation = _b.dragPropagation, onDragStart = _b.onDragStart;\n if (drag && !dragPropagation) {\n if (_this.openGlobalLock)\n _this.openGlobalLock();\n _this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!_this.openGlobalLock)\n return;\n }\n _this.isDragging = true;\n _this.currentDirection = null;\n _this.resolveConstraints();\n if (_this.visualElement.projection) {\n _this.visualElement.projection.isAnimationBlocked = true;\n _this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis(function (axis) {\n var _a, _b;\n var current = _this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];\n if (measuredAxis) {\n var length_1 = calcLength(measuredAxis);\n current = length_1 * (parseFloat(current) / 100);\n }\n }\n _this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);\n (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Drag, true);\n };\n var onMove = function (event, info) {\n // latestPointerEvent = event\n var _a = _this.getProps(), dragPropagation = _a.dragPropagation, dragDirectionLock = _a.dragDirectionLock, onDirectionLock = _a.onDirectionLock, onDrag = _a.onDrag;\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !_this.openGlobalLock)\n return;\n var offset = info.offset;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && _this.currentDirection === null) {\n _this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (_this.currentDirection !== null) {\n onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n _this.updateAxis(\"x\", info.point, offset);\n _this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n _this.visualElement.syncRender();\n /**\n * This must fire after the syncRender call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);\n };\n var onSessionEnd = function (event, info) {\n return _this.stop(event, info);\n };\n this.panSession = new PanSession(originEvent, {\n onSessionStart: onSessionStart,\n onStart: onStart,\n onMove: onMove,\n onSessionEnd: onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n };\n VisualElementDragControls.prototype.stop = function (event, info) {\n var isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n var velocity = info.velocity;\n this.startAnimation(velocity);\n var onDragEnd = this.getProps().onDragEnd;\n onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);\n };\n VisualElementDragControls.prototype.cancel = function () {\n var _a, _b;\n this.isDragging = false;\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = false;\n }\n (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();\n this.panSession = undefined;\n var dragPropagation = this.getProps().dragPropagation;\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(AnimationType.Drag, false);\n };\n VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) {\n var drag = this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n var axisValue = this.getAxisMotionValue(axis);\n var next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n };\n VisualElementDragControls.prototype.resolveConstraints = function () {\n var _this = this;\n var _a = this.getProps(), dragConstraints = _a.dragConstraints, dragElastic = _a.dragElastic;\n var layout = (this.visualElement.projection || {}).layout;\n var prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis(function (axis) {\n if (_this.getAxisMotionValue(axis)) {\n _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);\n }\n });\n }\n };\n VisualElementDragControls.prototype.resolveRefConstraints = function () {\n var _a = this.getProps(), constraints = _a.dragConstraints, onMeasureDragConstraints = _a.onMeasureDragConstraints;\n if (!constraints || !isRefObject(constraints))\n return false;\n var constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n var projection = this.visualElement.projection;\n // TODO\n if (!projection || !projection.layout)\n return false;\n var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n };\n VisualElementDragControls.prototype.startAnimation = function (velocity) {\n var _this = this;\n var _a = this.getProps(), drag = _a.drag, dragMomentum = _a.dragMomentum, dragElastic = _a.dragElastic, dragTransition = _a.dragTransition, dragSnapToOrigin = _a.dragSnapToOrigin, onDragTransitionEnd = _a.onDragTransitionEnd;\n var constraints = this.constraints || {};\n var momentumAnimations = eachAxis(function (axis) {\n var _a;\n if (!shouldDrag(axis, drag, _this.currentDirection)) {\n return;\n }\n var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n var bounceStiffness = dragElastic ? 200 : 1000000;\n var bounceDamping = dragElastic ? 40 : 10000000;\n var inertia = __assign(__assign({ type: \"inertia\", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness, bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return _this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n };\n VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {\n var axisValue = this.getAxisMotionValue(axis);\n return startAnimation(axis, axisValue, 0, transition);\n };\n VisualElementDragControls.prototype.stopAnimation = function () {\n var _this = this;\n eachAxis(function (axis) { return _this.getAxisMotionValue(axis).stop(); });\n };\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {\n var _a, _b;\n var dragKey = \"_drag\" + axis.toUpperCase();\n var externalMotionValue = this.visualElement.getProps()[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);\n };\n VisualElementDragControls.prototype.snapToCursor = function (point) {\n var _this = this;\n eachAxis(function (axis) {\n var drag = _this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, _this.currentDirection))\n return;\n var projection = _this.visualElement.projection;\n var axisValue = _this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n var _a = projection.layout.actual[axis], min = _a.min, max = _a.max;\n axisValue.set(point[axis] - mix(min, max, 0.5));\n }\n });\n };\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n VisualElementDragControls.prototype.scalePositionWithinConstraints = function () {\n var _this = this;\n var _a;\n var _b = this.getProps(), drag = _b.drag, dragConstraints = _b.dragConstraints;\n var projection = this.visualElement.projection;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n var boxProgress = { x: 0, y: 0 };\n eachAxis(function (axis) {\n var axisValue = _this.getAxisMotionValue(axis);\n if (axisValue) {\n var latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, _this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n var transformTemplate = this.visualElement.getProps().transformTemplate;\n this.visualElement.getInstance().style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis(function (axis) {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n var axisValue = _this.getAxisMotionValue(axis);\n var _a = _this.constraints[axis], min = _a.min, max = _a.max;\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n };\n VisualElementDragControls.prototype.addListeners = function () {\n var _this = this;\n var _a;\n elementDragControls.set(this.visualElement, this);\n var element = this.visualElement.getInstance();\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n var stopPointerListener = addPointerEvent(element, \"pointerdown\", function (event) {\n var _a = _this.getProps(), drag = _a.drag, _b = _a.dragListener, dragListener = _b === void 0 ? true : _b;\n drag && dragListener && _this.start(event);\n });\n var measureDragConstraints = function () {\n var dragConstraints = _this.getProps().dragConstraints;\n if (isRefObject(dragConstraints)) {\n _this.constraints = _this.resolveRefConstraints();\n }\n };\n var projection = this.visualElement.projection;\n var stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n var stopResizeListener = addDomEvent(window, \"resize\", function () {\n return _this.scalePositionWithinConstraints();\n });\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n projection.addEventListener(\"didUpdate\", (function (_a) {\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged;\n if (_this.isDragging && hasLayoutChanged) {\n eachAxis(function (axis) {\n var motionValue = _this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n _this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n _this.visualElement.syncRender();\n }\n }));\n return function () {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n };\n };\n VisualElementDragControls.prototype.getProps = function () {\n var props = this.visualElement.getProps();\n var _a = props.drag, drag = _a === void 0 ? false : _a, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e = props.dragElastic, dragElastic = _e === void 0 ? defaultElastic : _e, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;\n return __assign(__assign({}, props), { drag: drag, dragDirectionLock: dragDirectionLock, dragPropagation: dragPropagation, dragConstraints: dragConstraints, dragElastic: dragElastic, dragMomentum: dragMomentum });\n };\n return VisualElementDragControls;\n}());\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold) {\n if (lockThreshold === void 0) { lockThreshold = 10; }\n var direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { __assign } from 'tslib';\nimport { isMouseEvent, isTouchEvent } from './utils/event-type.mjs';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { secondsToMilliseconds } from '../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { distance, pipe } from 'popmotion';\n\n/**\n * @internal\n */\nvar PanSession = /** @class */ (function () {\n function PanSession(event, handlers, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint;\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n this.updatePoint = function () {\n if (!(_this.lastMoveEvent && _this.lastMoveEventInfo))\n return;\n var info = getPanInfo(_this.lastMoveEventInfo, _this.history);\n var isPanStarted = _this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n var point = info.point;\n var timestamp = getFrameData().timestamp;\n _this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));\n var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;\n if (!isPanStarted) {\n onStart && onStart(_this.lastMoveEvent, info);\n _this.startEvent = _this.lastMoveEvent;\n }\n onMove && onMove(_this.lastMoveEvent, info);\n };\n this.handlePointerMove = function (event, info) {\n _this.lastMoveEvent = event;\n _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);\n // Because Safari doesn't trigger mouseup events when it's above a `<select>`\n if (isMouseEvent(event) && event.buttons === 0) {\n _this.handlePointerUp(event, info);\n return;\n }\n // Throttle mouse move event to once per frame\n sync.update(_this.updatePoint, true);\n };\n this.handlePointerUp = function (event, info) {\n _this.end();\n var _a = _this.handlers, onEnd = _a.onEnd, onSessionEnd = _a.onSessionEnd;\n var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);\n if (_this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (isTouchEvent(event) && event.touches.length > 1)\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n var info = extractEventInfo(event);\n var initialInfo = transformPoint(info, this.transformPagePoint);\n var point = initialInfo.point;\n var timestamp = getFrameData().timestamp;\n this.history = [__assign(__assign({}, point), { timestamp: timestamp })];\n var onSessionStart = handlers.onSessionStart;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n PanSession.prototype.updateHandlers = function (handlers) {\n this.handlers = handlers;\n };\n PanSession.prototype.end = function () {\n this.removeListeners && this.removeListeners();\n cancelSync.update(this.updatePoint);\n };\n return PanSession;\n}());\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo(_a, history) {\n var point = _a.point;\n return {\n point: point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n var i = history.length - 1;\n var timestampedPoint = null;\n var lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n var currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { __read } from 'tslib';\nimport { clamp, mix, progress } from 'popmotion';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, _a, elastic) {\n var min = _a.min, max = _a.max;\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, _a) {\n var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n var _a;\n var min = constraintsAxis.min - layoutAxis.min;\n var max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n _a = __read([max, min], 2), min = _a[0], max = _a[1];\n }\n return { min: min, max: max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n var origin = 0.5;\n var sourceLength = calcLength(source);\n var targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n var relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nvar defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic) {\n if (dragElastic === void 0) { dragElastic = defaultElastic; }\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n var _a;\n return typeof dragElastic === \"number\"\n ? dragElastic\n : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","import { mix, distance } from 'popmotion';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return distance(value, target) < maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin) {\n if (origin === void 0) { origin = 0.5; }\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);\n calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","var createAxisDelta = function () { return ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n}); };\nvar createDelta = function () { return ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n}); };\nvar createAxis = function () { return ({ min: 0, max: 0 }); };\nvar createBox = function () { return ({\n x: createAxis(),\n y: createAxis(),\n}); };\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox(_a) {\n var top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox(_a) {\n var x = _a.x, y = _a.y;\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n var topLeft = transformPoint({ x: point.left, y: point.top });\n var bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n var distanceFromOrigin = point - originPoint;\n var scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate, scale, originPoint, boxScale) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, _a) {\n var x = _a.x, y = _a.y;\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {\n var _a, _b;\n if (isSharedTransition === void 0) { isSharedTransition = false; }\n var treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n var node;\n var delta;\n for (var i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === \"contents\")\n continue;\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, { x: -node.scroll.x, y: -node.scroll.y });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, _a) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n var originPoint = mix(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale(_a) {\n var scale = _a.scale, scaleX = _a.scaleX, scaleY = _a.scaleY;\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n hasTranslate(values.x) ||\n hasTranslate(values.y) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction hasTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { hasScale, hasTransform };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n var viewportBox = measureViewportBox(element, transformPagePoint);\n var scroll = rootProjectionNode.scroll;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.x);\n translateAxis(viewportBox.y, scroll.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { useRef, useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { PanSession } from './PanSession.mjs';\n\n/**\n *\n * @param handlers -\n * @param ref -\n *\n * @privateRemarks\n * Currently this sets new pan gesture functions every render. The memo route has been explored\n * in the past but ultimately we're still creating new functions every render. An optimisation\n * to explore is creating the pan gestures and loading them into a `ref`.\n *\n * @internal\n */\nfunction usePanGesture(_a) {\n var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd, onPanSessionStart = _a.onPanSessionStart, visualElement = _a.visualElement;\n var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;\n var panSession = useRef(null);\n var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n var handlers = {\n onSessionStart: onPanSessionStart,\n onStart: onPanStart,\n onMove: onPan,\n onEnd: function (event, info) {\n panSession.current = null;\n onPanEnd && onPanEnd(event, info);\n },\n };\n useEffect(function () {\n if (panSession.current !== null) {\n panSession.current.updateHandlers(handlers);\n }\n });\n function onPointerDown(event) {\n panSession.current = new PanSession(event, handlers, {\n transformPagePoint: transformPagePoint,\n });\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPanEvents && onPointerDown);\n useUnmountEffect(function () { return panSession.current && panSession.current.end(); });\n}\n\nexport { usePanGesture };\n","import { useDrag } from '../../gestures/drag/use-drag.mjs';\nimport { usePanGesture } from '../../gestures/use-pan-gesture.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar drag = {\n pan: makeRenderlessComponent(usePanGesture),\n drag: makeRenderlessComponent(useDrag),\n};\n\nexport { drag };\n","import { __rest, __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariable } from '../dom/utils/is-css-variable.mjs';\nimport { parseDomVariant } from '../dom/utils/parse-dom-variant.mjs';\nimport { isTransformProp } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nvar htmlConfig = {\n treeType: \"dom\",\n readValueFromInstance: function (domElement, key) {\n if (isTransformProp(key)) {\n var defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n var computedStyle = getComputedStyle(domElement);\n return ((isCSSVariable(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0);\n }\n },\n sortNodePosition: function (a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n },\n getBaseTarget: function (props, key) {\n var _a;\n return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];\n },\n measureViewportBox: function (element, _a) {\n var transformPagePoint = _a.transformPagePoint;\n return measureViewportBox(element, transformPagePoint);\n },\n /**\n * Reset the transform on the current Element. This is called as part\n * of a batched process across the entire layout tree. To remove this write\n * cycle it'd be interesting to see if it's possible to \"undo\" all the current\n * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms\n * works\n */\n resetTransform: function (element, domElement, props) {\n var transformTemplate = props.transformTemplate;\n domElement.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n // Ensure that whatever happens next, we restore our transform on the next frame\n element.scheduleRender();\n },\n restoreTransform: function (instance, mutableState) {\n instance.style.transform = mutableState.style.transform;\n },\n removeValueFromRenderState: function (key, _a) {\n var vars = _a.vars, style = _a.style;\n delete vars[key];\n delete style[key];\n },\n /**\n * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`\n * can be animated by Motion.\n */\n makeTargetAnimatable: function (element, _a, _b, isMounted) {\n var transformValues = _b.transformValues;\n if (isMounted === void 0) { isMounted = true; }\n var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, [\"transition\", \"transitionEnd\"]);\n var origin = getOrigin(target, transition || {}, element);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n if (transformValues) {\n if (transitionEnd)\n transitionEnd = transformValues(transitionEnd);\n if (target)\n target = transformValues(target);\n if (origin)\n origin = transformValues(origin);\n }\n if (isMounted) {\n checkTargetForNewValues(element, target, origin);\n var parsed = parseDomVariant(element, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return __assign({ transition: transition, transitionEnd: transitionEnd }, target);\n },\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n build: function (element, renderState, latestValues, options, props) {\n if (element.isVisible !== undefined) {\n renderState.style.visibility = element.isVisible\n ? \"visible\"\n : \"hidden\";\n }\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n },\n render: renderHTML,\n};\nvar htmlVisualElement = visualElement(htmlConfig);\n\nexport { getComputedStyle, htmlConfig, htmlVisualElement };\n","import { __assign, __spreadArray, __read } from 'tslib';\nimport sync, { cancelSync } from 'framesync';\nimport { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { variantPriorityOrder } from './utils/animation-state.mjs';\nimport { createLifecycles } from './utils/lifecycles.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel } from './utils/variants.mjs';\n\nvar visualElement = function (_a) {\n var _b = _a.treeType, treeType = _b === void 0 ? \"\" : _b, build = _a.build, getBaseTarget = _a.getBaseTarget, makeTargetAnimatable = _a.makeTargetAnimatable, measureViewportBox = _a.measureViewportBox, renderInstance = _a.render, readValueFromInstance = _a.readValueFromInstance, removeValueFromRenderState = _a.removeValueFromRenderState, sortNodePosition = _a.sortNodePosition, scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;\n return function (_a, options) {\n var parent = _a.parent, props = _a.props, presenceId = _a.presenceId, blockInitialAnimation = _a.blockInitialAnimation, visualState = _a.visualState, shouldReduceMotion = _a.shouldReduceMotion;\n if (options === void 0) { options = {}; }\n var isMounted = false;\n var latestValues = visualState.latestValues, renderState = visualState.renderState;\n /**\n * The instance of the render-specific node that will be hydrated by the\n * exposed React ref. So for example, this visual element can host a\n * HTMLElement, plain object, or Three.js object. The functions provided\n * in VisualElementConfig allow us to interface with this instance.\n */\n var instance;\n /**\n * Manages the subscriptions for a visual element's lifecycle, for instance\n * onRender\n */\n var lifecycles = createLifecycles();\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n var values = new Map();\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n var valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n var prevMotionValues = {};\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n var baseTarget = __assign({}, latestValues);\n // Internal methods ========================\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n var removeFromVariantTree;\n /**\n * Render the element with the latest styles outside of the React\n * render lifecycle\n */\n function render() {\n if (!instance || !isMounted)\n return;\n triggerBuild();\n renderInstance(instance, renderState, props.style, element.projection);\n }\n function triggerBuild() {\n build(element, renderState, latestValues, options, props);\n }\n function update() {\n lifecycles.notifyUpdate(latestValues);\n }\n /**\n *\n */\n function bindToMotionValue(key, value) {\n var removeOnChange = value.onChange(function (latestValue) {\n latestValues[key] = latestValue;\n props.onUpdate && sync.update(update, false, true);\n });\n var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);\n valueSubscriptions.set(key, function () {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n var initialMotionValues = scrapeMotionValuesFromProps(props);\n for (var key in initialMotionValues) {\n var value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n var element = __assign(__assign({ treeType: treeType, \n /**\n * This is a mirror of the internal instance prop, which keeps\n * VisualElement type-compatible with React's RefObject.\n */\n current: null, \n /**\n * The depth of this visual element within the visual element tree.\n */\n depth: parent ? parent.depth + 1 : 0, parent: parent, children: new Set(), \n /**\n *\n */\n presenceId: presenceId, shouldReduceMotion: shouldReduceMotion, \n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren: isVariantNode ? new Set() : undefined, \n /**\n * Whether this instance is visible. This can be changed imperatively\n * by the projection tree, is analogous to CSS's visibility in that\n * hidden elements should take up layout, and needs enacting by the configured\n * render function.\n */\n isVisible: undefined, \n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()), \n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: blockInitialAnimation, \n /**\n * Determine whether this component has mounted yet. This is mostly used\n * by variant children to determine whether they need to trigger their\n * own animations on mount.\n */\n isMounted: function () { return Boolean(instance); }, mount: function (newInstance) {\n isMounted = true;\n instance = element.current = newInstance;\n if (element.projection) {\n element.projection.mount(newInstance);\n }\n if (isVariantNode && parent && !isControllingVariants) {\n removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);\n }\n values.forEach(function (value, key) { return bindToMotionValue(key, value); });\n parent === null || parent === void 0 ? void 0 : parent.children.add(element);\n element.setProps(props);\n }, \n /**\n *\n */\n unmount: function () {\n var _a;\n (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();\n cancelSync.update(update);\n cancelSync.render(render);\n valueSubscriptions.forEach(function (remove) { return remove(); });\n removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();\n parent === null || parent === void 0 ? void 0 : parent.children.delete(element);\n lifecycles.clearAllListeners();\n instance = undefined;\n isMounted = false;\n }, \n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild: function (child) {\n var _a;\n var closestVariantNode = element.getClosestVariantNode();\n if (closestVariantNode) {\n (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);\n return function () {\n return closestVariantNode.variantChildren.delete(child);\n };\n }\n }, sortNodePosition: function (other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!sortNodePosition || treeType !== other.treeType)\n return 0;\n return sortNodePosition(element.getInstance(), other.getInstance());\n }, \n /**\n * Returns the closest variant node in the tree starting from\n * this visual element.\n */\n getClosestVariantNode: function () {\n return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();\n }, \n /**\n * Expose the latest layoutId prop.\n */\n getLayoutId: function () { return props.layoutId; }, \n /**\n * Returns the current instance.\n */\n getInstance: function () { return instance; }, \n /**\n * Get/set the latest static values.\n */\n getStaticValue: function (key) { return latestValues[key]; }, setStaticValue: function (key, value) { return (latestValues[key] = value); }, \n /**\n * Returns the latest motion value state. Currently only used to take\n * a snapshot of the visual element - perhaps this can return the whole\n * visual state\n */\n getLatestValues: function () { return latestValues; }, \n /**\n * Set the visiblity of the visual element. If it's changed, schedule\n * a render to reflect these changes.\n */\n setVisibility: function (visibility) {\n if (element.isVisible === visibility)\n return;\n element.isVisible = visibility;\n element.scheduleRender();\n }, \n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable: function (target, canMutate) {\n if (canMutate === void 0) { canMutate = true; }\n return makeTargetAnimatable(element, target, props, canMutate);\n }, \n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox: function () {\n return measureViewportBox(instance, props);\n }, \n // Motion values ========================\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue: function (key, value) {\n // Remove existing value if it exists\n if (element.hasValue(key))\n element.removeValue(key);\n values.set(key, value);\n latestValues[key] = value.get();\n bindToMotionValue(key, value);\n }, \n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue: function (key) {\n var _a;\n values.delete(key);\n (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();\n valueSubscriptions.delete(key);\n delete latestValues[key];\n removeValueFromRenderState(key, renderState);\n }, \n /**\n * Check whether we have a motion value for this key\n */\n hasValue: function (key) { return values.has(key); }, \n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue: function (key, defaultValue) {\n var value = values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue);\n element.addValue(key, value);\n }\n return value;\n }, \n /**\n * Iterate over our motion values.\n */\n forEachValue: function (callback) { return values.forEach(callback); }, \n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue: function (key) {\n var _a;\n return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);\n }, \n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget: function (key, value) {\n baseTarget[key] = value;\n }, \n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget: function (key) {\n if (getBaseTarget) {\n var target = getBaseTarget(props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n }\n return baseTarget[key];\n } }, lifecycles), { \n /**\n * Build the renderer state based on the latest visual state.\n */\n build: function () {\n triggerBuild();\n return renderState;\n }, \n /**\n * Schedule a render on the next animation frame.\n */\n scheduleRender: function () {\n sync.render(render, false, true);\n }, \n /**\n * Synchronously fire render. It's prefered that we batch renders but\n * in many circumstances, like layout measurement, we need to run this\n * synchronously. However in those instances other measures should be taken\n * to batch reads/writes.\n */\n syncRender: render, \n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n setProps: function (newProps) {\n if (newProps.transformTemplate || props.transformTemplate) {\n element.scheduleRender();\n }\n props = newProps;\n lifecycles.updatePropListeners(newProps);\n prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);\n }, getProps: function () { return props; }, \n // Variants ==============================\n /**\n * Returns the variant definition with a given name.\n */\n getVariant: function (name) { var _a; return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; }, \n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition: function () { return props.transition; }, getTransformPagePoint: function () {\n return props.transformPagePoint;\n }, \n /**\n * Used by child variant nodes to get the closest ancestor variant props.\n */\n getVariantContext: function (startAtParent) {\n if (startAtParent === void 0) { startAtParent = false; }\n if (startAtParent)\n return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();\n if (!isControllingVariants) {\n var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};\n if (props.initial !== undefined) {\n context_1.initial = props.initial;\n }\n return context_1;\n }\n var context = {};\n for (var i = 0; i < numVariantProps; i++) {\n var name_1 = variantProps[i];\n var prop = props[name_1];\n if (isVariantLabel(prop) || prop === false) {\n context[name_1] = prop;\n }\n }\n return context;\n } });\n return element;\n };\n};\nvar variantProps = __spreadArray([\"initial\"], __read(variantPriorityOrder), false);\nvar numVariantProps = variantProps.length;\n\nexport { visualElement };\n","import { __spreadArray, __read } from 'tslib';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\n\nvar names = [\n \"LayoutMeasure\",\n \"BeforeLayoutMeasure\",\n \"LayoutUpdate\",\n \"ViewportBoxUpdate\",\n \"Update\",\n \"Render\",\n \"AnimationComplete\",\n \"LayoutAnimationComplete\",\n \"AnimationStart\",\n \"LayoutAnimationStart\",\n \"SetAxisTarget\",\n \"Unmount\",\n];\nfunction createLifecycles() {\n var managers = names.map(function () { return new SubscriptionManager(); });\n var propSubscriptions = {};\n var lifecycles = {\n clearAllListeners: function () { return managers.forEach(function (manager) { return manager.clear(); }); },\n updatePropListeners: function (props) {\n names.forEach(function (name) {\n var _a;\n var on = \"on\" + name;\n var propListener = props[on];\n // Unsubscribe existing subscription\n (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);\n // Add new subscription\n if (propListener) {\n propSubscriptions[name] = lifecycles[on](propListener);\n }\n });\n },\n };\n managers.forEach(function (manager, i) {\n lifecycles[\"on\" + names[i]] = function (handler) { return manager.add(handler); };\n lifecycles[\"notify\" + names[i]] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return manager.notify.apply(manager, __spreadArray([], __read(args), false));\n };\n });\n return lifecycles;\n}\n\nexport { createLifecycles };\n","import { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n var _a;\n for (var key in next) {\n var nextValue = next[key];\n var prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"6.5.1\", \"Attempting to mix Framer Motion versions \".concat(nextValue.version, \" with 6.5.1 may not work as expected.\"));\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping to a new motion value, create a new motion value\n * from that\n */\n element.addValue(key, motionValue(nextValue));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n var existingValue = element.getValue(key);\n // TODO: Only update values that aren't being animated or even looked at\n !existingValue.hasAnimated && existingValue.set(nextValue);\n }\n else {\n element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n }\n }\n }\n // Handle removed values\n for (var key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { __rest, __assign, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\n\nfunction isCSSVariable(value) {\n return typeof value === \"string\" && value.startsWith(\"var(--\");\n}\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nvar cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n var match = cssVariableRegex.exec(current);\n if (!match)\n return [,];\n var _a = __read(match, 3), token = _a[1], fallback = _a[2];\n return [token, fallback];\n}\nvar maxDepth = 4;\nfunction getVariableValue(current, element, depth) {\n if (depth === void 0) { depth = 1; }\n invariant(depth <= maxDepth, \"Max CSS variable fallback depth detected in property \\\"\".concat(current, \"\\\". This may indicate a circular fallback dependency.\"));\n var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n var resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n return resolved.trim();\n }\n else if (isCSSVariable(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n }\n else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, _a, transitionEnd) {\n var _b;\n var target = __rest(_a, []);\n var element = visualElement.getInstance();\n if (!(element instanceof Element))\n return { target: target, transitionEnd: transitionEnd };\n // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n if (transitionEnd) {\n transitionEnd = __assign({}, transitionEnd);\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.forEachValue(function (value) {\n var current = value.get();\n if (!isCSSVariable(current))\n return;\n var resolved = getVariableValue(current, element);\n if (resolved)\n value.set(resolved);\n });\n // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n for (var key in target) {\n var current = target[key];\n if (!isCSSVariable(current))\n continue;\n var resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n if (transitionEnd)\n (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : (transitionEnd[key] = current);\n }\n return { target: target, transitionEnd: transitionEnd };\n}\n\nexport { cssVariableRegex, parseCSSVariable, resolveCSSVariables };\n","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\n\nvar positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n]);\nvar isPositionalKey = function (key) { return positionalKeys.has(key); };\nvar hasPositionalKey = function (target) {\n return Object.keys(target).some(isPositionalKey);\n};\nvar setAndResetVelocity = function (value, to) {\n // Looks odd but setting it twice doesn't render, it'll just\n // set both prev and current to the latest value\n value.set(to, false);\n value.set(to);\n};\nvar isNumOrPxType = function (v) {\n return v === number || v === px;\n};\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar getPosFromMatrix = function (matrix, pos) {\n return parseFloat(matrix.split(\", \")[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n return function (_bbox, _a) {\n var transform = _a.transform;\n if (transform === \"none\" || !transform)\n return 0;\n var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n var matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n };\n};\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) { return !transformKeys.has(key); });\nfunction removeNonTranslationalTransform(visualElement) {\n var removedTransforms = [];\n nonTranslationalTransformKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.syncRender();\n return removedTransforms;\n}\nvar positionalValues = {\n // Dimensions\n width: function (_a, _b) {\n var x = _a.x;\n var _c = _b.paddingLeft, paddingLeft = _c === void 0 ? \"0\" : _c, _d = _b.paddingRight, paddingRight = _d === void 0 ? \"0\" : _d;\n return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: function (_a, _b) {\n var y = _a.y;\n var _c = _b.paddingTop, paddingTop = _c === void 0 ? \"0\" : _c, _d = _b.paddingBottom, paddingBottom = _d === void 0 ? \"0\" : _d;\n return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: function (_bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function (_bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function (_a, _b) {\n var y = _a.y;\n var top = _b.top;\n return parseFloat(top) + (y.max - y.min);\n },\n right: function (_a, _b) {\n var x = _a.x;\n var left = _b.left;\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\nvar convertChangedValueTypes = function (target, visualElement, changedKeys) {\n var originBbox = visualElement.measureViewportBox();\n var element = visualElement.getInstance();\n var elementComputedStyle = getComputedStyle(element);\n var display = elementComputedStyle.display;\n var origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach(function (key) {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.syncRender();\n var targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach(function (key) {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n var value = visualElement.getValue(key);\n setAndResetVelocity(value, origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nvar checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {\n if (origin === void 0) { origin = {}; }\n if (transitionEnd === void 0) { transitionEnd = {}; }\n target = __assign({}, target);\n transitionEnd = __assign({}, transitionEnd);\n var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n var removedTransformValues = [];\n var hasAttemptedToRemoveTransformValues = false;\n var changedValueTypeKeys = [];\n targetPositionalKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n var from = origin[key];\n var fromType = findDimensionValueType(from);\n var to = target[key];\n var toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n var numKeyframes = to.length;\n var fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (var i = fromIndex; i < numKeyframes; i++) {\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n var current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n setAndResetVelocity(value, to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n var scrollY_1 = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.syncRender();\n // Restore scroll position\n if (scrollY_1 !== null)\n window.scrollTo({ top: scrollY_1 });\n return { target: convertedTarget, transitionEnd: transitionEnd };\n }\n else {\n return { target: target, transitionEnd: transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target: target, transitionEnd: transitionEnd };\n}\n\nexport { BoundingBoxDimension, positionalValues, unitConversion };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nvar parseDomVariant = function (visualElement, target, origin, transitionEnd) {\n var resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","import { __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { htmlConfig } from '../html/visual-element.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\n\nvar svgVisualElement = visualElement(__assign(__assign({}, htmlConfig), { getBaseTarget: function (props, key) {\n return props[key];\n }, readValueFromInstance: function (domElement, key) {\n var _a;\n if (isTransformProp(key)) {\n return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return domElement.getAttribute(key);\n }, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, build: function (_element, renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);\n }, render: renderSVG }));\n\nexport { svgVisualElement };\n","import { htmlVisualElement } from '../html/visual-element.mjs';\nimport { svgVisualElement } from '../svg/visual-element.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nvar createDomVisualElement = function (Component, options) {\n return isSVGComponent(Component)\n ? svgVisualElement(options, { enableHardwareAcceleration: false })\n : htmlVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { __extends, __assign, __read } from 'tslib';\nimport sync from 'framesync';\nimport React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\n\nvar MeasureLayoutWithContext = /** @class */ (function (_super) {\n __extends(MeasureLayoutWithContext, _super);\n function MeasureLayoutWithContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n MeasureLayoutWithContext.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, switchLayoutGroup = _a.switchLayoutGroup, layoutId = _a.layoutId;\n var projection = visualElement.projection;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.add(projection);\n if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", function () {\n _this.safeToRemove();\n });\n projection.setOptions(__assign(__assign({}, projection.options), { onExitComplete: function () { return _this.safeToRemove(); } }));\n }\n globalProjectionState.hasEverUpdated = true;\n };\n MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) {\n var _this = this;\n var _a = this.props, layoutDependency = _a.layoutDependency, visualElement = _a.visualElement, drag = _a.drag, isPresent = _a.isPresent;\n var projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n sync.postRender(function () {\n var _a;\n if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {\n _this.safeToRemove();\n }\n });\n }\n }\n return null;\n };\n MeasureLayoutWithContext.prototype.componentDidUpdate = function () {\n var projection = this.props.visualElement.projection;\n if (projection) {\n projection.root.didUpdate();\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n }\n };\n MeasureLayoutWithContext.prototype.componentWillUnmount = function () {\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, promoteContext = _a.switchLayoutGroup;\n var projection = visualElement.projection;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n };\n MeasureLayoutWithContext.prototype.safeToRemove = function () {\n var safeToRemove = this.props.safeToRemove;\n safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();\n };\n MeasureLayoutWithContext.prototype.render = function () {\n return null;\n };\n return MeasureLayoutWithContext;\n}(React__default.Component));\nfunction MeasureLayout(props) {\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, __assign({}, props, { layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })));\n}\nvar defaultScaleCorrectors = {\n borderRadius: __assign(__assign({}, correctBorderRadius), { applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ] }),\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { px } from 'style-value-types';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nvar correctBorderRadius = {\n correct: function (latest, node) {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n var x = pixelsToPercent(latest, node.target.x);\n var y = pixelsToPercent(latest, node.target.y);\n return \"\".concat(x, \"% \").concat(y, \"%\");\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from 'popmotion';\nimport { complex } from 'style-value-types';\nimport { cssVariableRegex } from '../../render/dom/utils/css-variables-conversion.mjs';\n\nvar varToken = \"_$css\";\nvar correctBoxShadow = {\n correct: function (latest, _a) {\n var treeScale = _a.treeScale, projectionDelta = _a.projectionDelta;\n var original = latest;\n /**\n * We need to first strip and store CSS variables from the string.\n */\n var containsCSSVariables = latest.includes(\"var(\");\n var cssVariables = [];\n if (containsCSSVariables) {\n latest = latest.replace(cssVariableRegex, function (match) {\n cssVariables.push(match);\n return varToken;\n });\n }\n var shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n var template = complex.createTransformer(latest);\n var offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n var xScale = projectionDelta.x.scale * treeScale.x;\n var yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n var averageScale = mix(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n var output = template(shadow);\n if (containsCSSVariables) {\n var i_1 = 0;\n output = output.replace(varToken, function () {\n var cssVariable = cssVariables[i_1];\n i_1++;\n return cssVariable;\n });\n }\n return output;\n },\n};\n\nexport { correctBoxShadow };\n","import { MeasureLayout } from './MeasureLayout.mjs';\n\nvar layoutFeatures = {\n measureLayout: MeasureLayout,\n};\n\nexport { layoutFeatures };\n","import { __spreadArray, __read, __assign } from 'tslib';\nimport sync, { cancelSync, flushSync } from 'framesync';\nimport { mix } from 'popmotion';\nimport { animate } from '../../animation/animate.mjs';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEquals, isDeltaZero } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale } from '../utils/has-transform.mjs';\nimport { transformAxes } from '../../render/html/utils/transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nvar animationTarget = 1000;\nfunction createProjectionNode(_a) {\n var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, checkIsScrollRoot = _a.checkIsScrollRoot, resetTransform = _a.resetTransform;\n return /** @class */ (function () {\n function ProjectionNode(id, latestValues, parent) {\n var _this = this;\n if (latestValues === void 0) { latestValues = {}; }\n if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); }\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to actually\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n // Note: Currently only running on root node\n this.potentialNodes = new Map();\n this.checkUpdateFailed = function () {\n if (_this.isUpdating) {\n _this.isUpdating = false;\n _this.clearAllSnapshots();\n }\n };\n this.updateProjection = function () {\n _this.nodes.forEach(resolveTargetDelta);\n _this.nodes.forEach(calcProjection);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.id = id;\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? __spreadArray(__spreadArray([], __read(parent.path), false), [parent], false) : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n id && this.root.registerPotentialNode(id, this);\n for (var i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n ProjectionNode.prototype.addEventListener = function (name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n };\n ProjectionNode.prototype.notifyListeners = function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, __spreadArray([], __read(args), false));\n };\n ProjectionNode.prototype.hasListeners = function (name) {\n return this.eventHandlers.has(name);\n };\n ProjectionNode.prototype.registerPotentialNode = function (id, node) {\n this.potentialNodes.set(id, node);\n };\n /**\n * Lifecycles\n */\n ProjectionNode.prototype.mount = function (instance, isLayoutDirty) {\n var _this = this;\n var _a;\n if (isLayoutDirty === void 0) { isLayoutDirty = false; }\n if (this.instance)\n return;\n this.isSVG =\n instance instanceof SVGElement && instance.tagName !== \"svg\";\n this.instance = instance;\n var _b = this.options, layoutId = _b.layoutId, layout = _b.layout, visualElement = _b.visualElement;\n if (visualElement && !visualElement.getInstance()) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);\n this.id && this.root.potentialNodes.delete(this.id);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n var unblockTimeout_1;\n var resizeUnblockUpdate_1 = function () {\n return (_this.root.updateBlockedByResize = false);\n };\n attachResizeListener(instance, function () {\n _this.root.updateBlockedByResize = true;\n clearTimeout(unblockTimeout_1);\n unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n _this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", function (_a) {\n var _b, _c, _d, _e, _f;\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged, hasRelativeTargetChanged = _a.hasRelativeTargetChanged, newLayout = _a.layout;\n if (_this.isTreeAnimationBlocked()) {\n _this.target = undefined;\n _this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;\n var _g = visualElement.getProps(), onLayoutAnimationStart = _g.onLayoutAnimationStart, onLayoutAnimationComplete = _g.onLayoutAnimationComplete;\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n var targetChanged = !_this.targetLayout ||\n !boxEquals(_this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !_this.currentAnimation))) {\n if (_this.resumeFrom) {\n _this.resumingFrom = _this.resumeFrom;\n _this.resumingFrom.resumingFrom = undefined;\n }\n _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, \"layout\")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });\n if (visualElement.shouldReduceMotion) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n _this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged &&\n _this.animationProgress === 0) {\n _this.finishAnimation();\n }\n _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));\n }\n _this.targetLayout = newLayout;\n });\n }\n };\n ProjectionNode.prototype.unmount = function () {\n var _a, _b;\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);\n (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);\n this.instance = undefined;\n cancelSync.preRender(this.updateProjection);\n };\n // only on the root\n ProjectionNode.prototype.blockUpdate = function () {\n this.updateManuallyBlocked = true;\n };\n ProjectionNode.prototype.unblockUpdate = function () {\n this.updateManuallyBlocked = false;\n };\n ProjectionNode.prototype.isUpdateBlocked = function () {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n };\n ProjectionNode.prototype.isTreeAnimationBlocked = function () {\n var _a;\n return (this.isAnimationBlocked ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) ||\n false);\n };\n // Note: currently only running on root node\n ProjectionNode.prototype.startUpdate = function () {\n var _a;\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);\n };\n ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) {\n var _a, _b, _c;\n if (shouldNotifyListeners === void 0) { shouldNotifyListeners = true; }\n if (this.root.isUpdateBlocked()) {\n (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.shouldResetTransform = true;\n /**\n * TODO: Check we haven't updated the scroll\n * since the last didUpdate\n */\n node.updateScroll();\n }\n var _d = this.options, layoutId = _d.layoutId, layout = _d.layout;\n if (layoutId === undefined && !layout)\n return;\n var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;\n this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n };\n // Note: Currently only running on root node\n ProjectionNode.prototype.didUpdate = function () {\n var updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating)\n return;\n this.isUpdating = false;\n /**\n * Search for and mount newly-added projection elements.\n *\n * TODO: Every time a new component is rendered we could search up the tree for\n * the closest mounted node and query from there rather than document.\n */\n if (this.potentialNodes.size) {\n this.potentialNodes.forEach(mountNodeEarly);\n this.potentialNodes.clear();\n }\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n // Flush any scheduled updates\n flushSync.update();\n flushSync.preRender();\n flushSync.render();\n };\n ProjectionNode.prototype.clearAllSnapshots = function () {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n };\n ProjectionNode.prototype.scheduleUpdateProjection = function () {\n sync.preRender(this.updateProjection, false, true);\n };\n ProjectionNode.prototype.scheduleCheckAfterUnmount = function () {\n var _this = this;\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n sync.postRender(function () {\n if (_this.isLayoutDirty) {\n _this.root.didUpdate();\n }\n else {\n _this.root.checkUpdateFailed();\n }\n });\n };\n /**\n * Update measurements\n */\n ProjectionNode.prototype.updateSnapshot = function () {\n if (this.snapshot || !this.instance)\n return;\n var measured = this.measure();\n var layout = this.removeTransform(this.removeElementScroll(measured));\n roundBox(layout);\n this.snapshot = {\n measured: measured,\n layout: layout,\n latestValues: {},\n };\n };\n ProjectionNode.prototype.updateLayout = function () {\n var _a;\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.updateScroll();\n }\n }\n var measured = this.measure();\n roundBox(measured);\n var prevLayout = this.layout;\n this.layout = {\n measured: measured,\n actual: this.removeElementScroll(measured),\n };\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.actual);\n (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);\n };\n ProjectionNode.prototype.updateScroll = function () {\n if (this.options.layoutScroll && this.instance) {\n this.isScrollRoot = checkIsScrollRoot(this.instance);\n this.scroll = measureScroll(this.instance);\n }\n };\n ProjectionNode.prototype.resetTransform = function () {\n var _a;\n if (!resetTransform)\n return;\n var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n };\n ProjectionNode.prototype.measure = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return createBox();\n var box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n var scroll = this.root.scroll;\n if (scroll) {\n translateAxis(box.x, scroll.x);\n translateAxis(box.y, scroll.y);\n }\n return box;\n };\n ProjectionNode.prototype.removeElementScroll = function (box) {\n var boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n var scroll_1 = node.scroll, options = node.options, isScrollRoot = node.isScrollRoot;\n if (node !== this.root && scroll_1 && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (isScrollRoot) {\n copyBoxInto(boxWithoutScroll, box);\n var rootScroll = this.root.scroll;\n /**\n * Undo the application of page scroll that was originally added\n * to the measured bounding box.\n */\n if (rootScroll) {\n translateAxis(boxWithoutScroll.x, -rootScroll.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll_1.x);\n translateAxis(boxWithoutScroll.y, scroll_1.y);\n }\n }\n return boxWithoutScroll;\n };\n ProjectionNode.prototype.applyTransform = function (box, transformOnly) {\n if (transformOnly === void 0) { transformOnly = false; }\n var withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.x,\n y: -node.scroll.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n };\n ProjectionNode.prototype.removeTransform = function (box) {\n var _a;\n var boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n var sourceBox = createBox();\n var nodeBox = node.measure();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n };\n /**\n *\n */\n ProjectionNode.prototype.setTargetDelta = function (delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n };\n ProjectionNode.prototype.setOptions = function (options) {\n var _a;\n this.options = __assign(__assign(__assign({}, this.options), options), { crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true });\n };\n ProjectionNode.prototype.clearMeasurements = function () {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n };\n /**\n * Frame calculations\n */\n ProjectionNode.prototype.resolveTargetDelta = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n // TODO If this is unsuccessful this currently happens every frame\n if (!this.targetDelta && !this.relativeTarget) {\n // TODO: This is a semi-repetition of further down this function, make DRY\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent && this.relativeParent.layout) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.actual);\n }\n else {\n copyBoxInto(this.target, this.layout.actual);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.actual);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent &&\n Boolean(this.relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !this.relativeParent.options.layoutScroll &&\n this.relativeParent.target) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n };\n ProjectionNode.prototype.getClosestProjectingParent = function () {\n if (!this.parent || hasTransform(this.parent.latestValues))\n return undefined;\n if ((this.parent.relativeTarget || this.parent.targetDelta) &&\n this.parent.layout) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n };\n ProjectionNode.prototype.calcProjection = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n var lead = this.getLead();\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.actual);\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);\n var target = lead.target;\n if (!target)\n return;\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n var prevTreeScaleX = this.treeScale.x;\n var prevTreeScaleY = this.treeScale.y;\n var prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n };\n ProjectionNode.prototype.hide = function () {\n this.isVisible = false;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.show = function () {\n this.isVisible = true;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.scheduleRender = function (notifyAll) {\n var _a, _b, _c;\n if (notifyAll === void 0) { notifyAll = true; }\n (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);\n notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n };\n ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) {\n var _this = this;\n var _a;\n if (hasOnlyRelativeTargetChanged === void 0) { hasOnlyRelativeTargetChanged = false; }\n var snapshot = this.snapshot;\n var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};\n var mixedValues = __assign({}, this.latestValues);\n var targetDelta = createDelta();\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n var relativeLayout = createBox();\n var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;\n var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;\n var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n this.mixTargetDelta = function (latest) {\n var _a;\n var progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n _this.setTargetDelta(targetDelta);\n if (_this.relativeTarget &&\n _this.relativeTargetOrigin &&\n _this.layout &&\n ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {\n calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);\n mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);\n }\n if (isSharedLayoutAnimation) {\n _this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n _this.root.scheduleUpdateProjection();\n _this.scheduleRender();\n _this.animationProgress = progress;\n };\n this.mixTargetDelta(0);\n };\n ProjectionNode.prototype.startAnimation = function (options) {\n var _this = this;\n var _a, _b;\n this.notifyListeners(\"animationStart\");\n (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();\n if (this.resumingFrom) {\n (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();\n }\n if (this.pendingAnimation) {\n cancelSync.update(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = sync.update(function () {\n globalProjectionState.hasAnimatedSinceResize = true;\n _this.currentAnimation = animate(0, animationTarget, __assign(__assign({}, options), { onUpdate: function (latest) {\n var _a;\n _this.mixTargetDelta(latest);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);\n }, onComplete: function () {\n var _a;\n (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);\n _this.completeAnimation();\n } }));\n if (_this.resumingFrom) {\n _this.resumingFrom.currentAnimation = _this.currentAnimation;\n }\n _this.pendingAnimation = undefined;\n });\n };\n ProjectionNode.prototype.completeAnimation = function () {\n var _a;\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n };\n ProjectionNode.prototype.finishAnimation = function () {\n var _a;\n if (this.currentAnimation) {\n (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n };\n ProjectionNode.prototype.applyTransformsToTarget = function () {\n var _a = this.getLead(), targetWithTransforms = _a.targetWithTransforms, target = _a.target, layout = _a.layout, latestValues = _a.latestValues;\n if (!targetWithTransforms || !target || !layout)\n return;\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its actual layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n };\n ProjectionNode.prototype.registerSharedNode = function (layoutId, node) {\n var _a, _b, _c;\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n var stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n node.promote({\n transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,\n preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node),\n });\n };\n ProjectionNode.prototype.isLead = function () {\n var stack = this.getStack();\n return stack ? stack.lead === this : true;\n };\n ProjectionNode.prototype.getLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n };\n ProjectionNode.prototype.getPrevLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n };\n ProjectionNode.prototype.getStack = function () {\n var layoutId = this.options.layoutId;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n };\n ProjectionNode.prototype.promote = function (_a) {\n var _b = _a === void 0 ? {} : _a, needsReset = _b.needsReset, transition = _b.transition, preserveFollowOpacity = _b.preserveFollowOpacity;\n var stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition: transition });\n };\n ProjectionNode.prototype.relegate = function () {\n var stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n };\n ProjectionNode.prototype.resetRotation = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n var hasRotate = false;\n // Keep a record of all the values we've reset\n var resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (var i = 0; i < transformAxes.length; i++) {\n var axis = transformAxes[i];\n var key = \"rotate\" + axis;\n // If this rotation doesn't exist as a motion value, then we don't\n // need to reset it\n if (!visualElement.getStaticValue(key)) {\n continue;\n }\n hasRotate = true;\n // Record the rotation and then temporarily set it to 0\n resetValues[key] = visualElement.getStaticValue(key);\n visualElement.setStaticValue(key, 0);\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n // Put back all the values we reset\n for (var key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n };\n ProjectionNode.prototype.getProjectionStyles = function (styleProp) {\n var _a, _b, _c, _d, _e, _f;\n if (styleProp === void 0) { styleProp = {}; }\n // TODO: Return lifecycle-persistent object\n var styles = {};\n if (!this.instance || this.isSVG)\n return styles;\n if (!this.isVisible) {\n return { visibility: \"hidden\" };\n }\n else {\n styles.visibility = \"\";\n }\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n var lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n var emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n var valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n var _g = this.projectionDelta, x = _g.x, y = _g.y;\n styles.transformOrigin = \"\".concat(x.origin * 100, \"% \").concat(y.origin * 100, \"% 0\");\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its actual\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : \"\"\n : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;\n }\n /**\n * Apply scale correction\n */\n for (var key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n var _h = scaleCorrectors[key], correct = _h.correct, applyTo = _h.applyTo;\n var corrected = correct(valuesToRender[key], lead);\n if (applyTo) {\n var num = applyTo.length;\n for (var i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n };\n ProjectionNode.prototype.clearSnapshot = function () {\n this.resumeFrom = this.snapshot = undefined;\n };\n // Only run on root\n ProjectionNode.prototype.resetTree = function () {\n this.root.nodes.forEach(function (node) { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n };\n return ProjectionNode;\n }());\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a, _b, _c, _d;\n var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n var _e = node.layout, layout_1 = _e.actual, measuredLayout = _e.measured;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (node.options.animationType === \"size\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(axisSnapshot);\n axisSnapshot.min = layout_1[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (node.options.animationType === \"position\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(layout_1[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n var layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout_1, snapshot.layout);\n var visualDelta = createDelta();\n if (snapshot.isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);\n }\n else {\n calcBoxDelta(visualDelta, layout_1, snapshot.layout);\n }\n var hasLayoutChanged = !isDeltaZero(layoutDelta);\n var hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n node.relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (node.relativeParent && !node.relativeParent.resumeFrom) {\n var _f = node.relativeParent, parentSnapshot = _f.snapshot, parentLayout = _f.layout;\n if (parentSnapshot && parentLayout) {\n var relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);\n var relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);\n if (!boxEquals(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout: layout_1,\n snapshot: snapshot,\n delta: visualDelta,\n layoutDelta: layoutDelta,\n hasLayoutChanged: hasLayoutChanged,\n hasRelativeTargetChanged: hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction resetTransformStyle(node) {\n var visualElement = node.options.visualElement;\n if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notifyBeforeLayoutMeasure();\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetRotation(node) {\n node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mix(delta.translate, 0, p);\n output.scale = mix(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mix(from.min, to.min, p);\n output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nvar defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nfunction mountNodeEarly(node, id) {\n /**\n * Rather than searching the DOM from document we can search the\n * path for the deepest mounted ancestor and search from there\n */\n var searchNode = node.root;\n for (var i = node.path.length - 1; i >= 0; i--) {\n if (Boolean(node.path[i].instance)) {\n searchNode = node.path[i];\n break;\n }\n }\n var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;\n var element = searchElement.querySelector(\"[data-projection-id=\\\"\".concat(id, \"\\\"]\"));\n if (element)\n node.mount(element, true);\n}\nfunction roundAxis(axis) {\n axis.min = Math.round(axis.min);\n axis.max = Math.round(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\n\nexport { createProjectionNode, mixAxis, mixAxisDelta, mixBox };\n","import { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { startAnimation } from './utils/transitions.mjs';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n * const controls = animate(x, 100, {\n * type: \"spring\",\n * stiffness: 2000,\n * onComplete: v => {}\n * })\n *\n * return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n if (transition === void 0) { transition = {}; }\n var value = isMotionValue(from) ? from : motionValue(from);\n startAnimation(\"\", value, to, transition);\n return {\n stop: function () { return value.stop(); },\n isAnimating: function () { return value.isAnimating(); },\n };\n}\n\nexport { animate };\n","import { mix, progress, linear, circOut } from 'popmotion';\nimport { px, percent } from 'style-value-types';\n\nvar borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nvar numBorders = borders.length;\nvar asNumber = function (value) {\n return typeof value === \"string\" ? parseFloat(value) : value;\n};\nvar isPx = function (value) {\n return typeof value === \"number\" || px.test(value);\n};\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n var _a, _b, _c, _d;\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // (follow?.opacity as number) ?? 0,\n // TODO Reinstate this if only child\n (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (var i = 0; i < numBorders; i++) {\n var borderLabel = \"border\".concat(borders[i], \"Radius\");\n var followRadius = getRadius(follow, borderLabel);\n var leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n var canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n var _a;\n return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nvar easeCrossfadeIn = compress(0, 0.5, circOut);\nvar easeCrossfadeOut = compress(0.5, 0.95, linear);\nfunction compress(min, max, easing) {\n return function (p) {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n if (origin === void 0) { origin = 0.5; }\n if (originAxis === void 0) { originAxis = axis; }\n if (sourceAxis === void 0) { sourceAxis = axis; }\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n var relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n var originPoint = mix(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);\n removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","function isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\n\nexport { boxEquals, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nvar NodeStack = /** @class */ (function () {\n function NodeStack() {\n this.members = [];\n }\n NodeStack.prototype.add = function (node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n };\n NodeStack.prototype.remove = function (node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n var prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n };\n NodeStack.prototype.relegate = function (node) {\n var indexOfNode = this.members.findIndex(function (member) { return node === member; });\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n var prevLead;\n for (var i = indexOfNode; i >= 0; i--) {\n var member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n };\n NodeStack.prototype.promote = function (node, preserveFollowOpacity) {\n var _a;\n var prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n node.snapshot.isShared = true;\n }\n if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {\n node.isLayoutDirty = true;\n }\n var crossfade = node.options.crossfade;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n };\n NodeStack.prototype.exitAnimationComplete = function () {\n this.members.forEach(function (node) {\n var _a, _b, _c, _d, _e;\n (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);\n });\n };\n NodeStack.prototype.scheduleRender = function () {\n this.members.forEach(function (node) {\n node.instance && node.scheduleRender(false);\n });\n };\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n NodeStack.prototype.removeLeadSnapshot = function () {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n };\n return NodeStack;\n}());\n\nexport { NodeStack };\n","var identityProjection = \"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)\";\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n var xTranslate = delta.x.translate / treeScale.x;\n var yTranslate = delta.y.translate / treeScale.y;\n var transform = \"translate3d(\".concat(xTranslate, \"px, \").concat(yTranslate, \"px, 0) \");\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n transform += \"scale(\".concat(1 / treeScale.x, \", \").concat(1 / treeScale.y, \") \");\n if (latestTransform) {\n var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;\n if (rotate)\n transform += \"rotate(\".concat(rotate, \"deg) \");\n if (rotateX)\n transform += \"rotateX(\".concat(rotateX, \"deg) \");\n if (rotateY)\n transform += \"rotateY(\".concat(rotateY, \"deg) \");\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n var elementScaleX = delta.x.scale * treeScale.x;\n var elementScaleY = delta.y.scale * treeScale.y;\n transform += \"scale(\".concat(elementScaleX, \", \").concat(elementScaleY, \")\");\n return transform === identityProjection ? \"none\" : transform;\n}\n\nexport { buildProjectionTransform, identityProjection };\n","var compareByDepth = function (a, b) {\n return a.depth - b.depth;\n};\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nvar FlatTree = /** @class */ (function () {\n function FlatTree() {\n this.children = [];\n this.isDirty = false;\n }\n FlatTree.prototype.add = function (child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.remove = function (child) {\n removeItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.forEach = function (callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n };\n return FlatTree;\n}());\n\nexport { FlatTree };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\n\nvar DocumentProjectionNode = createProjectionNode({\n attachResizeListener: function (ref, notify) { return addDomEvent(ref, \"resize\", notify); },\n measureScroll: function () { return ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }); },\n checkIsScrollRoot: function () { return true; },\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nvar rootProjectionNode = {\n current: undefined,\n};\nvar HTMLProjectionNode = createProjectionNode({\n measureScroll: function (instance) { return ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }); },\n defaultParent: function () {\n if (!rootProjectionNode.current) {\n var documentNode = new DocumentProjectionNode(0, {});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: function (instance, value) {\n instance.style.transform = value !== null && value !== void 0 ? value : \"none\";\n },\n checkIsScrollRoot: function (instance) {\n return Boolean(window.getComputedStyle(instance).position === \"fixed\");\n },\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { __read, __spreadArray } from 'tslib';\nimport * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\n\nvar getChildKey = function (child) { return child.key || \"\"; };\nfunction updateChildLookup(children, allChildren) {\n children.forEach(function (child) {\n var key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n var filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, function (child) {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nvar AnimatePresence = function (_a) {\n var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n var _d = __read(useForceUpdate(), 1), forceRender = _d[0];\n var forceRenderLayoutGroup = useContext(LayoutGroupContext).forceRender;\n if (forceRenderLayoutGroup)\n forceRender = forceRenderLayoutGroup;\n var isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n var filteredChildren = onlyElements(children);\n var childrenToRender = filteredChildren;\n var exiting = new Set();\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n var presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n var allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n var isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(function () {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(function () {\n isInitialRender.current = true;\n allChildren.clear();\n exiting.clear();\n });\n if (isInitialRender.current) {\n return (React.createElement(React.Fragment, null, childrenToRender.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = __spreadArray([], __read(childrenToRender), false);\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n var presentKeys = presentChildren.current.map(getChildKey);\n var targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n var numPresent = presentKeys.length;\n for (var i = 0; i < numPresent; i++) {\n var key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1) {\n exiting.add(key);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (exitBeforeEnter && exiting.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exiting.forEach(function (key) {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n var child = allChildren.get(key);\n if (!child)\n return;\n var insertionIndex = presentKeys.indexOf(key);\n var onExit = function () {\n allChildren.delete(key);\n exiting.delete(key);\n // Remove this child from the present children\n var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });\n presentChildren.current.splice(removeIndex, 1);\n // Defer re-rendering until all exiting children have indeed left\n if (!exiting.size) {\n presentChildren.current = filteredChildren;\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n childrenToRender.splice(insertionIndex, 0, React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map(function (child) {\n var key = child.key;\n return exiting.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n if (env !== \"production\" &&\n exitBeforeEnter &&\n childrenToRender.length > 1) {\n console.warn(\"You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.\");\n }\n return (React.createElement(React.Fragment, null, exiting.size\n ? childrenToRender\n : childrenToRender.map(function (child) { return cloneElement(child); })));\n};\n\nexport { AnimatePresence };\n","import { __read } from 'tslib';\nimport sync from 'framesync';\nimport { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\n\nfunction useForceUpdate() {\n var isMounted = useIsMounted();\n var _a = __read(useState(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];\n var forceRender = useCallback(function () {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n var deferredForceRender = useCallback(function () { return sync.postRender(forceRender); }, [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n var isMounted = useRef(false);\n useIsomorphicLayoutEffect(function () {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { __values } from 'tslib';\nimport * as React from 'react';\nimport { useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\nvar PresenceChild = function (_a) {\n var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;\n var presenceChildren = useConstant(newChildrenMap);\n var id = useId();\n var context = useMemo(function () { return ({\n id: id,\n initial: initial,\n isPresent: isPresent,\n custom: custom,\n onExitComplete: function (childId) {\n var e_1, _a;\n presenceChildren.set(childId, true);\n try {\n for (var _b = __values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var isComplete = _c.value;\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();\n },\n register: function (childId) {\n presenceChildren.set(childId, false);\n return function () { return presenceChildren.delete(childId); };\n },\n }); }, \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? undefined : [isPresent]);\n useMemo(function () {\n presenceChildren.forEach(function (_, key) { return presenceChildren.set(key, false); });\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(function () {\n !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n }, [isPresent]);\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { Box, Flex, Text } from '@chakra-ui/react';\nimport { ArrowRight } from '@ctlyst.id/internal-icon';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport React from 'react';\n\nexport interface SidebarHeaderProps {\n isCollapse: boolean;\n setCollapse: (k: boolean) => void;\n title?: string;\n}\n\nexport const SidebarHeader = ({ isCollapse, setCollapse, title }: SidebarHeaderProps) => {\n return (\n <Box\n px=\"2\"\n color=\"neutral.900\"\n borderY=\"1px solid\"\n borderColor=\"neutral.300\"\n _hover={{\n color: 'primary.500',\n }}\n >\n <Flex\n data-test-id=\"nLkz69YipW818FioeAxVI\"\n direction=\"row\"\n alignItems=\"center\"\n p=\"2\"\n onClick={() => setCollapse(!isCollapse)}\n cursor=\"pointer\"\n >\n <Box\n as={motion.div}\n boxSize=\"4\"\n animate={{ rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 }}\n transition=\"ease-in-out\"\n transitionDuration=\"1ms\"\n aria-label=\"toggle sidebar\"\n >\n <ArrowRight size={4} color=\"inherit\" />\n </Box>\n <AnimatePresence>\n {!isCollapse && (\n <Box h=\"3.5\" position=\"relative\" ml=\"2\">\n <Text\n as={motion.div}\n w=\"max-content\"\n position=\"absolute\"\n textStyle=\"text.xs\"\n initial={{ opacity: 0, x: 16 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 16 }}\n transition=\"10ms linear\"\n >\n {title}\n </Text>\n </Box>\n )}\n </AnimatePresence>\n </Flex>\n </Box>\n );\n};\n\nSidebarHeader.displayName = 'SidebarHeader';\nSidebarHeader.defaultProps = {\n title: 'Sembunyikan menu',\n};\n\nexport default SidebarHeader;\n","import {\n Accordion,\n AccordionButton,\n AccordionItem,\n AccordionPanel,\n Box,\n Popover,\n PopoverBody,\n PopoverContent,\n PopoverHeader,\n PopoverTrigger,\n Portal,\n Text,\n} from '@chakra-ui/react';\nimport * as Icon from '@ctlyst.id/internal-icon';\nimport { motion } from 'framer-motion';\nimport React from 'react';\n\nimport type { NavItemProps } from '../../nav-item';\nimport { NavItem } from '../../nav-item';\nimport type { MenuItem } from '../types';\n\nexport interface SidebarMenuProps {\n menu: MenuItem[];\n isCollapse: boolean;\n active: string | undefined;\n setActive: (active: string) => void;\n itemStyles?: NavItemProps;\n mappingIcon?: Map<string, JSX.Element>;\n}\n\nexport const SidebarMenu = ({ menu, isCollapse, mappingIcon, itemStyles, setActive, active }: SidebarMenuProps) => {\n return (\n <Box as={motion.div} animate={{ padding: isCollapse ? '8px 16px' : '8px' }}>\n <Accordion index={menu.findIndex(item => item.children.some(child => child.navLink === active))}>\n {menu.map(item => {\n const isActive = active?.includes(item.navLink);\n return (\n <AccordionItem key={item.id} mt=\"4\">\n {({ isExpanded }) => {\n const isOpenOptions = isCollapse || (!isCollapse && !isExpanded);\n const noChild = !item.children.length;\n // eslint-disable-next-line no-nested-ternary\n const offsetStyle: [number, number] = isCollapse ? (noChild ? [-5, 16] : [-1, 16]) : [-1, 8];\n return (\n <>\n <Popover key={item.id} trigger=\"hover\" placement=\"right-start\" offset={offsetStyle}>\n {({ isOpen, onClose }) => {\n const activeOption = isOpen ? 'primary.50' : 'white';\n const backgroundColor = isOpen && !isActive ? 'primary.50' : 'primary.100';\n const activeParent = isActive ? backgroundColor : activeOption;\n\n return (\n <>\n <PopoverTrigger key={item.id}>\n <AccordionButton\n key={item.id}\n data-test-id={`CTA_button-accordion-${item.title}`}\n p=\"0\"\n h=\"fit-content\"\n >\n <NavItem\n key={item.id}\n as={motion.div}\n justifyContent={isCollapse ? 'center' : 'space-between'}\n isActive={isActive}\n bg={activeParent}\n data-test-id={`CTA_nav-item-${item.title}`}\n onClick={() =>\n setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink)\n }\n position=\"relative\"\n {...itemStyles}\n >\n {mappingIcon && (\n <Box display=\"flex\" boxSize=\"3\" transition=\"50ms linear\">\n {mappingIcon.get(item.icon || '')}\n </Box>\n )}\n\n {!isCollapse && (\n <Box\n display=\"flex\"\n w=\"full\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n ml=\"2\"\n as={motion.div}\n transition=\"20ms ease-in\"\n initial={{ opacity: 0, x: 24 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 16 }}\n >\n <Box h=\"3.5\" position=\"relative\">\n <Text textStyle=\"text.xs\" w=\"max-content\" position=\"absolute\">\n {item.title}\n </Text>\n </Box>\n {!!item.children.length && (\n <Box\n display=\"flex\"\n boxSize=\"3\"\n as={motion.div}\n animate={{ transform: isExpanded ? 'rotate(-180deg)' : 'rotate(0)' }}\n >\n <Icon.ChevronDown size={3} />\n </Box>\n )}\n </Box>\n )}\n </NavItem>\n </AccordionButton>\n </PopoverTrigger>\n {isOpenOptions && (\n <Portal>\n {item.children.length > 0 ? (\n <PopoverContent w=\"176px\" borderColor=\"neutral.200\" bg=\"white\" rounded=\"sm\">\n <PopoverHeader borderColor=\"neutral.300\" textStyle=\"text.xs\" p=\"2\">\n {mappingIcon && (\n <Box display=\"flex\" alignItems=\"center\">\n {mappingIcon.get(item.icon || '')}\n <Box as=\"span\" ml=\"2\">\n {item.title}\n </Box>\n </Box>\n )}\n </PopoverHeader>\n {!!item.children.length && (\n <PopoverBody pb=\"1\" px=\"0\" pt=\"0\">\n {item.children.map(submenu => (\n <NavItem\n data-test-id={`CTA_Sidebar-popover-item-${submenu.id}`}\n key={submenu.id}\n isChild\n isActive={active === submenu.navLink}\n onClick={() => {\n setActive(submenu.navLink);\n onClose();\n }}\n rounded=\"none\"\n {...itemStyles}\n >\n {submenu.title}\n </NavItem>\n ))}\n </PopoverBody>\n )}\n </PopoverContent>\n ) : (\n isCollapse && (\n <PopoverContent w=\"174px\" borderColor=\"neutral.200\" bg=\"white\" rounded=\"sm\">\n <PopoverBody py=\"1\" px=\"0\">\n <NavItem\n data-test-id={`CTA_Sidebar-popover-item-${item.id}`}\n key={item.id}\n justifyContent=\"flex-start\"\n isActive={active === item.navLink}\n onClick={() => {\n setActive(item.navLink);\n onClose();\n }}\n rounded=\"none\"\n {...itemStyles}\n >\n {mappingIcon && (\n <Box display=\"flex\" boxSize=\"3\" transition=\"50ms linear\">\n {mappingIcon.get(item.icon || '')}\n </Box>\n )}\n <Box h=\"3.5\" position=\"relative\" ml=\"2\">\n <Text textStyle=\"text.xs\" w=\"max-content\" position=\"absolute\">\n {item.title}\n </Text>\n </Box>\n </NavItem>\n </PopoverBody>\n </PopoverContent>\n )\n )}\n </Portal>\n )}\n </>\n );\n }}\n </Popover>\n {!isCollapse && (\n <AccordionPanel mt=\"1\" p=\"0\">\n {item.children.map(submenu => (\n <NavItem\n mt=\"1\"\n key={submenu.id}\n data-test-id={`CTA_Sidebar-accordion-item-${submenu.id}`}\n isActive={active === submenu.navLink}\n isChild\n {...itemStyles}\n onClick={() => setActive(submenu.navLink)}\n >\n {submenu.title}\n </NavItem>\n ))}\n </AccordionPanel>\n )}\n </>\n );\n }}\n </AccordionItem>\n );\n })}\n </Accordion>\n </Box>\n );\n};\n\nSidebarMenu.displayName = 'SidebarMenu';\nSidebarMenu.defaultProps = {\n itemStyles: undefined,\n mappingIcon: undefined,\n};\n\nexport default SidebarMenu;\n","import type {\n HTMLChakraProps,\n ResponsiveValue,\n SystemProps,\n SystemStyleObject,\n ThemingProps,\n UseCheckboxProps,\n} from '@chakra-ui/react';\nimport { chakra, Flex, forwardRef, omitThemingProps, useCheckbox, useMultiStyleConfig } from '@chakra-ui/react';\nimport { cx, dataAttr } from '@chakra-ui/shared-utils';\nimport { Check, Close } from '@ctlyst.id/internal-icon';\nimport React, { useMemo } from 'react';\n\nexport interface SwitchProps\n extends Omit<UseCheckboxProps, 'isIndeterminate'>,\n Omit<HTMLChakraProps<'label'>, keyof UseCheckboxProps>,\n ThemingProps<'Switch'> {\n /**\n * The spacing between the switch and its label text\n * @default 0.5rem\n * @type SystemProps[\"marginLeft\"]\n */\n spacing?: SystemProps['marginLeft'];\n size?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * The `Switch` component is used as an alternative for the checkbox component for switching between \"enabled\" and \"disabled\" states.\n *\n * @see Docs https://chakra-ui.com/docs/components/switch\n * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/\n */\nconst Switch = forwardRef<SwitchProps, 'input'>(function Switch(props, ref) {\n const styles = useMultiStyleConfig('Switch', props);\n\n const { spacing = '0.5rem', children, ...ownProps } = omitThemingProps(props);\n\n const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = useCheckbox(ownProps);\n\n const containerStyles: SystemStyleObject = useMemo(\n () => ({\n display: 'inline-block',\n position: 'relative',\n verticalAlign: 'middle',\n lineHeight: 0,\n ...styles.container,\n }),\n [styles.container]\n );\n\n const trackStyles: SystemStyleObject = useMemo(\n () => ({\n display: 'inline-flex',\n flexShrink: 0,\n justifyContent: 'flex-start',\n boxSizing: 'content-box',\n cursor: 'pointer',\n width: 200,\n ...styles.track,\n }),\n [styles.track]\n );\n\n const labelStyles: SystemStyleObject = useMemo(\n () => ({\n userSelect: 'none',\n marginStart: spacing,\n ...styles.label,\n }),\n [spacing, styles.label]\n );\n\n const getIconSize = (value?: ResponsiveValue<'sm' | 'md' | 'lg'>) => {\n const iconSize = {\n sm: 3,\n md: 4,\n lg: 5,\n };\n\n return iconSize[value as keyof typeof iconSize];\n };\n\n return (\n <chakra.label\n {...getRootProps()}\n display=\"flex\"\n alignItems=\"center\"\n className={cx('chakra-switch', props.className)}\n __css={containerStyles}\n >\n <input data-test-id=\"\" className=\"chakra-switch__input\" {...getInputProps({}, ref)} />\n <chakra.span {...getCheckboxProps()} className=\"chakra-switch__track\" pos=\"relative\" __css={trackStyles}>\n <Flex gap={1} pos=\"absolute\" top=\"50%\" left=\"50%\" transform=\"translate(-50%, -50%)\">\n <Check color=\"white\" size={getIconSize(props.size)} />\n <Close color={state.isDisabled ? 'neutral.600' : 'neutral.900'} size={getIconSize(props.size)} />\n </Flex>\n <chakra.span\n __css={styles.thumb}\n className=\"chakra-switch__thumb\"\n data-checked={dataAttr(state.isChecked)}\n data-hover={dataAttr(state.isHovered)}\n />\n </chakra.span>\n {children && (\n <chakra.span\n className=\"chakra-switch__label\"\n color={state.isDisabled ? 'black.low' : 'black.high'}\n cursor=\"pointer\"\n {...getLabelProps()}\n __css={labelStyles}\n >\n {children}\n </chakra.span>\n )}\n </chakra.label>\n );\n});\n\nSwitch.defaultProps = {\n size: 'sm',\n};\n\nexport default Switch;\n","export {\n Table as ChakraTable,\n TableBodyProps,\n TableCellProps,\n TableColumnHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from '@chakra-ui/react';\n","import type { TabProps as ChakraTabProps } from '@chakra-ui/react';\nimport { Button, Flex, forwardRef, useMultiStyleConfig, useTab } from '@chakra-ui/react';\nimport * as React from 'react';\n\ntype AddonProps = {\n isSelected: boolean;\n};\n\ntype TabProps = ChakraTabProps & {\n 'data-test-id'?: string;\n leftAddon?({ isSelected }: AddonProps): React.ReactNode;\n rightAddon?({ isSelected }: AddonProps): React.ReactNode;\n};\n\nconst Tab = forwardRef<TabProps, 'button'>((props, ref) => {\n const tabProps = useTab({ ...props, ref });\n const isSelected = !!tabProps['aria-selected'];\n const styles = useMultiStyleConfig('Tabs', tabProps);\n return (\n <Button\n data-test-id={props['data-test-id']}\n p={4}\n fontSize=\"text.md\"\n _selected={{\n borderColor: 'primary.500',\n color: 'primary.500',\n _hover: {\n '& .chakra-badge': {\n bg: 'primary.500',\n },\n color: 'primary.500',\n },\n }}\n color=\"black.medium\"\n _focus={{ bg: 'none' }}\n _hover={{\n '& .chakra-badge': {\n bg: 'primary.400',\n },\n color: 'primary.400',\n }}\n __css={styles.tab}\n {...tabProps}\n >\n <Flex alignItems=\"center\">\n {props.leftAddon?.({ isSelected })}\n {tabProps.children}\n {props.rightAddon?.({ isSelected })}\n </Flex>\n </Button>\n );\n});\n\nexport default Tab;\n","export { default as Tab } from './components/tab';\n// export { default as TabList } from './components/tab-list';\n// export { default as TabPanel } from './components/tab-panel';\nexport {\n TabIndicator,\n TabIndicatorProps,\n TabList,\n TabListProps,\n TabPanel,\n TabPanelProps,\n TabPanels,\n TabPanelsProps,\n TabProps,\n Tabs,\n TabsDescendantsProvider,\n TabsProps,\n TabsProvider,\n useTab,\n useTabIndicator,\n useTabList,\n UseTabListProps,\n UseTabListReturn,\n UseTabOptions,\n useTabPanel,\n useTabPanels,\n UseTabPanelsProps,\n UseTabProps,\n useTabs,\n useTabsContext,\n useTabsDescendant,\n useTabsDescendants,\n useTabsDescendantsContext,\n UseTabsProps,\n UseTabsReturn,\n useTabsStyles,\n} from '@chakra-ui/react';\n","export { Code, CodeProps, Heading, HeadingProps, Link, LinkProps, Text, TextProps } from '@chakra-ui/react';\n","/* eslint-disable import/prefer-default-export */\nimport 'react-toastify/dist/ReactToastify.css';\nimport '@fontsource/poppins/400.css';\n\nimport { chakra, Flex, Link, useToken } from '@chakra-ui/react';\nimport React from 'react';\nimport type { ToastOptions, ToastPosition } from 'react-toastify';\nimport { Bounce, toast } from 'react-toastify';\nimport type { ToastIcon, TypeOptions } from 'react-toastify/dist/types';\n\nconst toastStyles = `\n .Toastify__toast-container {\n width: 380px;\n }\n\n .container-toast {\n height: 64px;\n width: 380px;\n border-radius: 4px;\n font-family: Poppins;\n }\n\n @media (max-width: 480px) {\n .container-toast {\n margin: 16px !important;\n width: calc(100% - 32px); /* Adjust width to fit within the margin */\n }\n\n .Toastify__toast-container {\n width: 100%;\n }\n }\n`;\n\n// Inject the custom CSS into the document\nconst styleSheet = document.createElement('style');\nstyleSheet.innerText = toastStyles;\ndocument.head.appendChild(styleSheet);\n\ninterface CustomIconProps {\n theme: 'light' | 'dark' | 'colored' | 'auto';\n type: TypeOptions;\n}\n\ninterface CustomToastOptions extends Omit<ToastOptions, 'icon'> {\n icon?: ToastIcon;\n link?: { url: string; label: string };\n}\n\ninterface ToastOptionsWithDefaults extends CustomToastOptions {\n position?: ToastPosition;\n autoClose?: number;\n hideProgressBar?: boolean;\n closeOnClick?: boolean;\n pauseOnHover?: boolean;\n draggable?: boolean;\n progress?: undefined;\n}\n\nconst DEFAULT_OPTIONS: ToastOptionsWithDefaults = {\n position: 'top-right',\n autoClose: 5000,\n hideProgressBar: false,\n closeOnClick: true,\n pauseOnHover: true,\n draggable: true,\n icon: false,\n theme: 'colored',\n closeButton: false,\n className: 'container-toast',\n transition: Bounce,\n};\n\nconst renderIcon = (icon: ToastIcon, type: TypeOptions) => {\n const iconProps: CustomIconProps = { theme: 'colored', type };\n if (typeof icon === 'function') {\n return icon(iconProps);\n }\n return icon;\n};\n\nexport const useToast = () => {\n const [primary500, neutral500, info500, danger500, warning500, success500] = useToken('colors', [\n 'primary.500',\n 'neutral.500',\n 'info.500',\n 'danger.500',\n 'warning.500',\n 'success.500',\n ]);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const content = (icon: any, message: string, link?: { url: string; label: string }) => {\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\" gap={4}>\n <Flex alignItems=\"center\">\n {icon && (\n <chakra.span mr={2} w={4} h={4}>\n {renderIcon(icon, 'default')}\n </chakra.span>\n )}\n <chakra.span noOfLines={2}>{message}</chakra.span>\n </Flex>\n {link && (\n <Link\n href={link.url}\n textDecoration=\"underline\"\n minW=\"max-content\"\n textAlign=\"right\"\n textStyle=\"text.sm\"\n fontWeight=\"semibold\"\n >\n {link.label}\n </Link>\n )}\n </Flex>\n );\n };\n\n return {\n primary: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.success(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: primary500 },\n });\n },\n neutral: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.success(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: neutral500 },\n });\n },\n success: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.success(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: success500 },\n });\n },\n error: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.error(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: danger500 },\n });\n },\n warning: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.warning(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: warning500 },\n });\n },\n info: (message: string, options?: CustomToastOptions) => {\n const { icon, link, ...restOptions } = options || {};\n toast.info(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: info500 },\n });\n },\n custom: (message: string, options?: CustomToastOptions) => {\n const { icon, link, style, ...restOptions } = options || {};\n toast.info(content(icon, message, link), {\n ...DEFAULT_OPTIONS,\n ...restOptions,\n style: { backgroundColor: style?.backgroundColor, color: style?.color },\n });\n },\n };\n};\n","// eslint-disable-next-line import/prefer-default-export\nexport * from './components/toast';\nexport { ToastContainer } from 'react-toastify';\n","/* eslint-disable react/destructuring-assignment */\nimport type { ColorProps, PopoverContentProps, TooltipProps as ChakraTooltipProps } from '@chakra-ui/react';\nimport {\n Popover,\n PopoverArrow,\n PopoverBody,\n PopoverContent,\n PopoverTrigger,\n Portal,\n Tooltip as ChakraTooltip,\n} from '@chakra-ui/react';\n\nexport interface BaseTooltipProps extends Omit<ChakraTooltipProps, 'color'> {\n isInteractive?: false;\n color?: ColorProps['color'];\n}\n\nexport interface InteractiveTooltipProps\n extends PopoverContentProps,\n Pick<ChakraTooltipProps, 'hasArrow' | 'placement' | 'children' | 'label'> {\n isInteractive?: true;\n portal?: boolean;\n}\n\nexport type TooltipProps = BaseTooltipProps | InteractiveTooltipProps;\n\nexport const Tooltip = (props: TooltipProps) => {\n const { children, bg = 'neutral.700', textStyle = 'text.sm', color = 'white' } = props;\n const content = (\n <PopoverContent border=\"none\" bg={bg} textStyle={textStyle} borderRadius={props.borderRadius}>\n {props.hasArrow && <PopoverArrow color={color} bg={bg} />}\n <PopoverBody color={color} {...props}>\n {props.label}\n </PopoverBody>\n </PopoverContent>\n );\n\n return props.isInteractive === true ? (\n <Popover trigger=\"hover\" placement={props.placement}>\n <PopoverTrigger>{children}</PopoverTrigger>\n {props.portal ? <Portal>{content}</Portal> : content}\n </Popover>\n ) : (\n <ChakraTooltip {...props}>{children}</ChakraTooltip>\n );\n};\n\nexport default Tooltip;\n","/* eslint-disable react/require-default-props */\nimport {\n Box,\n Button,\n Flex,\n FormControl,\n FormLabel,\n Heading,\n Image as ChakraImage,\n ListItem,\n RequiredIndicator,\n Text,\n UnorderedList,\n} from '@chakra-ui/react';\nimport { Close as X, Plus } from '@ctlyst.id/internal-icon';\nimport type { FlexProps } from '@ctlyst.id/internal-ui';\nimport type { ReactNode } from 'react';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { useToast } from '../../toast/components/toast';\nimport { DEFAULT_IMAGE_MIME_TYPE, formatValidationMessage, messages } from '../constants';\n\nexport type UploaderProps = FlexProps & {\n /**\n * callback when validation is valid\n */\n onHandleUploadFile?: (file: File | null, image: HTMLImageElement | null) => void;\n\n /**\n * callback when validation is not valid\n */\n onHandleRejections?: (file: File, image: HTMLImageElement | null) => void;\n\n /**\n * Text for drag active\n * - if `dragActiveText` is undefined. Text will take from default constant.\n */\n dragActiveText?: string;\n\n /**\n * Text for drag inactive\n * - if `dragInActiveText` is undefined. Text will take from default constant.\n */\n dragInActiveText?: string;\n\n /**\n * Text for drag replace\n * - if `dragReplaceText` is undefined. Text will take from default constant.\n */\n dragReplaceText?: string;\n\n /**\n * Text for upload file\n * - if `uploadFileText` is undefined. Text will take from default constant.\n */\n uploadFileText?: string;\n\n /**\n * Text for button preview\n * - if `changeFileText` is undefined. Text will take from default constant.\n */\n changeFileText?: string;\n\n label?: string | ReactNode;\n\n isRequired?: boolean;\n\n helperText?: string[] | ReactNode;\n\n value?: File | string;\n\n /**\n * validate width x height dimension\n */\n dimension?: {\n /**\n * [width, height]\n */\n validate: [number, number];\n message: string;\n };\n\n /**\n * validate max file size\n */\n maxFileSize?: {\n /**\n * in bytes\n */\n validate: number;\n message: string;\n };\n\n /**\n * validate image format\n * @default acceptFormat.validate - @see DEFAULT_IMAGE_MIME_TYPE\n * @default acceptFormat.message - Hanya diperbolehkan upload gambar\n */\n acceptFormat?: {\n /**\n * Example :\n * ['.jpg', '.png', '.jpeg', ...]\n */\n validate: string[];\n message?: string;\n };\n\n /**\n * Custom validation\n * custom validation will run first\n */\n customValidation?: (file: File, image: HTMLImageElement) => string | null;\n\n isShowCloseButton?: boolean;\n isClosableToast?: boolean;\n\n isError?: boolean;\n isDisabled?: boolean;\n errorText?: string;\n\n /**\n * provide unique test id\n */\n testId?: string;\n isShowReupload?: boolean;\n\n size?: 'sm' | 'lg';\n};\n\nconst Uploader: React.FC<UploaderProps> = ({\n onHandleUploadFile,\n onHandleRejections,\n dragActiveText,\n dragInActiveText,\n dragReplaceText,\n changeFileText,\n uploadFileText,\n helperText,\n label,\n isRequired,\n isDisabled,\n dimension,\n acceptFormat = {\n validate: DEFAULT_IMAGE_MIME_TYPE,\n },\n maxFileSize,\n customValidation,\n value,\n isShowCloseButton = true,\n isClosableToast,\n testId,\n isError,\n errorText,\n isShowReupload = true,\n size = 'lg',\n ...props\n}) => {\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [filePreview, setFilePreview] = useState<string>();\n\n const toast = useToast();\n\n const handleRejection = useCallback(\n (message: string, file: File, image: HTMLImageElement | null) => {\n if (onHandleRejections) {\n onHandleRejections(file, image);\n }\n\n return toast.error(message, {\n closeButton: isClosableToast,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onHandleRejections]\n );\n\n const onDrop = useCallback(\n (files: File[]) => {\n const file = files[0];\n const fileFormat = file.name.split('.').pop() as string;\n\n // If user not upload image mime type, just return validation error\n // error message is either default or custom from props\n if (!acceptFormat?.validate.includes(fileFormat)) {\n return handleRejection(acceptFormat.message ?? formatValidationMessage(acceptFormat.validate), file, null);\n }\n\n const imageUrl = URL.createObjectURL(file);\n const img = new Image();\n\n img.src = imageUrl as string;\n img.onload = () => {\n const imgWidth = img.width;\n const imgheight = img.height;\n\n // validate by provided custom validator\n if (customValidation && customValidation(file, img) !== null) {\n return handleRejection(customValidation(file, img) as string, file, img);\n }\n\n // validate file format\n if (!acceptFormat.validate.includes(fileFormat)) {\n return handleRejection(acceptFormat.message ?? formatValidationMessage(acceptFormat.validate), file, img);\n }\n\n // validate image dimension\n if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {\n return handleRejection(dimension.message, file, img);\n }\n\n if (maxFileSize && file.size > maxFileSize.validate) {\n return handleRejection(maxFileSize.message, file, null);\n }\n\n onHandleUploadFile?.(file, img);\n setFilePreview(URL.createObjectURL(file));\n\n return null;\n };\n\n return null;\n },\n [acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]\n );\n\n const { getRootProps, getInputProps, isDragActive, acceptedFiles } = useDropzone({\n onDrop,\n maxFiles: 1,\n noClick: isDisabled,\n disabled: !!filePreview,\n noDrag: isDisabled,\n });\n\n const renderHelperText = () => {\n if (Array.isArray(helperText)) {\n return (\n <UnorderedList pl={2} fontSize={12} color=\"gray.600\" data-test-id=\"CT_component_base-image-uploader_helperText\">\n {helperText.map(text => (\n <ListItem key={text}>{text}</ListItem>\n ))}\n </UnorderedList>\n );\n }\n\n return helperText;\n };\n\n const renderErrorText = (text: string | undefined) => (\n <Box mb={2}>\n <Text textStyle=\"text.xs\" color=\"danger.500\">\n {text}\n </Text>\n </Box>\n );\n\n const handleRemove = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n e.stopPropagation();\n setFilePreview(undefined);\n onHandleUploadFile?.(null, null);\n acceptedFiles.pop();\n };\n\n /**\n * Immediately set file preview if value exist\n */\n useEffect(() => {\n if (value) {\n if (typeof value === 'string') {\n setFilePreview(value);\n } else {\n setFilePreview(URL.createObjectURL(value));\n }\n } else {\n setFilePreview(undefined);\n acceptedFiles.pop();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n const isSmall = size === 'sm';\n const color = isDisabled ? 'neutral.500' : 'primary.500';\n const containerHeight = !isSmall ? '160px' : '120px';\n const cursorType = filePreview ? 'initial' : 'pointer';\n\n return (\n <FormControl isRequired={isRequired}>\n {label && typeof label === 'string' ? (\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <FormLabel requiredIndicator={<></>} fontSize=\"text.sm\">\n {isRequired && <RequiredIndicator mr={1} ml={0} />}\n {label}\n </FormLabel>\n ) : (\n label\n )}\n <Flex\n minH={containerHeight}\n maxW={!isSmall ? 'full' : '120px'}\n mb={2}\n bg=\"white\"\n border=\"1px dashed\"\n rounded=\"sm\"\n borderColor={isError ? 'danger.500' : color}\n alignItems=\"center\"\n justifyContent=\"center\"\n cursor={isDisabled ? 'not-allowed' : cursorType}\n pos=\"relative\"\n _hover={{ bg: !filePreview && !isDisabled ? 'primary.50' : '' }}\n {...props}\n {...getRootProps()}\n >\n {filePreview && isShowCloseButton && (\n <Box position=\"absolute\" top={1} right={1}>\n <Button\n data-test-id={`CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ''}`}\n aria-label=\"remove-image\"\n rounded=\"full\"\n variant=\"icon\"\n bg=\"neutral.600\"\n _hover={{ bg: 'neutral.700' }}\n size=\"sm\"\n h=\"20px\"\n w=\"20px\"\n border=\"none\"\n zIndex={1}\n onClick={handleRemove}\n >\n <X size={3} color=\"white\" />\n </Button>\n </Box>\n )}\n\n {filePreview && (\n <Box w=\"full\">\n <Flex\n position=\"relative\"\n data-test-id={`CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ''}`}\n justify=\"center\"\n align=\"center\"\n >\n <ChakraImage\n h={size === 'lg' ? '120' : '100'}\n src={filePreview}\n alt=\"uploader-preview\"\n objectFit={'contain'}\n />\n </Flex>\n </Box>\n )}\n\n {!filePreview && (\n <>\n <input\n data-test-id={`CT_component_base-image-uploader_input-file${testId ? `_${testId}` : ''}`}\n {...getInputProps()}\n />\n\n {isDragActive ? (\n <Text>{dragActiveText ?? messages.dragActive}</Text>\n ) : (\n <Flex gap={2} flexDirection=\"column\" alignItems=\"center\" color={isError ? 'danger.500' : color}>\n {size === 'sm' && <Plus size={6} color={color} />}\n\n <Box>\n {!filePreview && (\n <Heading\n fontWeight=\"400\"\n fontSize={size === 'sm' ? 'text.md' : 'text.xl'}\n mb={size === 'sm' ? '0' : '2'}\n textAlign=\"center\"\n >\n {uploadFileText && size === 'lg' ? messages.uploadFile : 'Upload'}\n </Heading>\n )}\n\n {size === 'lg' && (\n <Text fontSize={12}>\n {filePreview\n ? dragReplaceText ?? messages.dragReplace\n : dragInActiveText ?? messages.dragInActive}\n </Text>\n )}\n </Box>\n </Flex>\n )}\n </>\n )}\n </Flex>\n {filePreview && !isSmall && (\n <Flex align=\"center\" justify=\"center\" my={2}>\n <input\n {...getInputProps()}\n key={Math.random()}\n ref={inputRef}\n accept=\"image/*\"\n data-test-id={`CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ''}`}\n />\n\n {isShowReupload && (\n <Button\n data-test-id={`CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ''}`}\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => {\n inputRef?.current?.click();\n }}\n >\n Ubah Foto\n </Button>\n )}\n </Flex>\n )}\n {renderErrorText(errorText)}\n {renderHelperText()}\n </FormControl>\n );\n};\n\nexport default Uploader;\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable no-underscore-dangle */\nexport const ONE_MEGA_BYTE = 1000000;\nexport const messages = {\n dragActive: 'Drop file disini...',\n dragInActive: `(Klik atau drag untuk input file)`,\n dragReplace: `(Klik atau drag untuk mengganti file)`,\n replaceFile: 'Ganti File',\n uploadFile: 'Upload File',\n};\n\nexport const IMG_EXT = {\n jpg: 'jpg',\n jpeg: 'jpeg',\n png: 'png',\n gif: 'gif',\n} as const;\n\nexport const DEFAULT_IMAGE_MIME_TYPE = [IMG_EXT.jpg, IMG_EXT.jpeg, IMG_EXT.png, IMG_EXT.gif];\n\nexport const concatList = (list: string[]) => {\n let _concatedList = '';\n if (list.length > 1) {\n _concatedList = `${list.slice(0, -1).join(', ')} dan ${list[list.length - 1]}`;\n } else {\n _concatedList = list[0];\n }\n return _concatedList;\n};\n\nexport const formatValidationMessage = (extension: string[]) =>\n `Foto harus dalam format ${concatList(extension.map(ext => `.${ext}`))}.`;\n","export * from './accordion';\nexport * from './alert';\nexport * from './anchor';\nexport * from './badge';\nexport * from './breadcrumb';\nexport * from './button';\nexport * from './card';\nexport * from './checkbox';\nexport * from './chips';\nexport * from './counter';\nexport * from './data-table';\nexport * from './datepicker';\nexport * from './dialog';\nexport * from './empty-state';\nexport * from './field';\nexport * from './form';\nexport * from './header';\nexport * from './image';\nexport * from './layouting';\nexport * from './list';\nexport * from './loader';\nexport * from './modal';\nexport * from './nav-item';\nexport * from './navigation';\nexport * from './pagination';\nexport * from './popover';\nexport * from './radio';\nexport * from './rating';\nexport * from './select';\nexport * from './sidebar';\nexport * from './switch';\nexport * from './table';\nexport * from './tabs';\nexport * from './text';\nexport * from './toast';\nexport * from './tooltip';\nexport * from './uploader';\nexport {\n Avatar,\n AvatarBadge,\n AvatarBadgeProps,\n AvatarGroup,\n AvatarGroupProps,\n AvatarProps,\n Collapse,\n CollapseProps,\n Fade,\n FadeProps,\n Hide,\n HideProps,\n Img,\n ImgProps,\n ScaleFade,\n ScaleFadeProps,\n Show,\n ShowProps,\n Slide,\n SlideFade,\n SlideFadeProps,\n SlideProps,\n Step,\n StepDescription,\n StepIcon,\n StepIndicator,\n StepNumber,\n Stepper,\n StepSeparator,\n StepStatus,\n StepTitle,\n useBreakpoint,\n UseBreakpointOptions,\n useColorModePreference,\n useImage,\n UseImageProps,\n UseImageReturn,\n UseMediaQueryOptions,\n useQuery,\n UseQueryProps,\n useSteps,\n VisuallyHidden,\n VisuallyHiddenInput,\n} from '@chakra-ui/react';\n","import type { ThemeConfig, ThemeOverride } from '@chakra-ui/react';\nimport { extendTheme } from '@chakra-ui/react';\n\nimport * as components from './components';\n\nconst config: ThemeConfig = {\n initialColorMode: 'light',\n useSystemColorMode: false,\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getTheme = (foundations: Record<string, any>) => {\n return extendTheme({\n ...foundations,\n components: {\n ...components,\n },\n styles: {\n global: {\n body: {\n fontSize: 'text.sm',\n color: 'black.high',\n },\n },\n },\n config,\n });\n};\n\nconst theme = extendTheme(<ThemeOverride>{\n components: {\n ...components,\n },\n styles: {\n global: {\n '*::-webkit-scrollbar-thumb': {\n background: 'neutral.400',\n },\n body: {\n fontSize: 'text.sm',\n color: 'black.high',\n },\n },\n },\n config,\n});\n\ntype Theme = typeof theme;\n\nexport type { Theme };\nexport { theme };\nexport { ThemeTypings } from '@chakra-ui/styled-system';\n","export { default as Accordion } from './accordion';\r\nexport { default as Alert } from './alert';\r\nexport { default as Badge } from './badge';\r\nexport { default as Button } from './button';\r\nexport { default as Card } from './card';\r\nexport { default as Checkbox } from './checkbox';\r\nexport { default as Tag } from './chips';\r\nexport { default as FormLabel } from './form-label';\r\nexport { default as Input } from './input';\r\nexport { default as LoaderStyle } from './loader';\r\nexport { default as Modal } from './modal';\r\nexport { default as Popover } from './popover';\r\nexport { default as Radio } from './radio';\r\nexport { default as Switch } from './switch';\r\nexport { default as Table } from './table';\r\nexport { default as Tabs } from './tabs';\r\nexport { default as Textarea } from './textarea';\r\nexport { default as Tooltip } from './tooltip';\r\n","import { accordionAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\n\nconst baseStyleContainer = defineStyle({\n border: 'none',\n});\n\nconst baseStyleButton = defineStyle({\n height: 14,\n transitionProperty: 'common',\n transitionDuration: 'normal',\n gap: 4,\n fontSize: 'text.md',\n bg: 'neutral.50',\n _expanded: {\n bg: 'neutral.100',\n },\n _focusVisible: {\n bg: 'neutral.100',\n },\n _hover: {\n bg: 'neutral.100',\n '.eye-icon': {\n display: 'block',\n opacity: 1,\n visibility: 'visible',\n },\n },\n _disabled: {\n opacity: 0.4,\n cursor: 'not-allowed',\n },\n py: 2,\n px: 4,\n position: 'relative',\n '.eye-icon': {\n visibility: 'hidden',\n },\n});\n\nconst baseStylePanel = defineStyle({\n pt: '2',\n px: '4',\n pb: '5',\n});\n\nconst baseStyleIcon = defineStyle({\n fontSize: '1.25em',\n boxSize: 6,\n p: 1,\n});\n\nconst baseStyle = definePartsStyle({\n container: baseStyleContainer,\n button: baseStyleButton,\n panel: baseStylePanel,\n icon: baseStyleIcon,\n});\n\nconst collapseStyleButton = defineStyle({\n height: 13,\n borderRadius: 'sm',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'neutral.300',\n bg: 'neutral.50',\n _expanded: {\n bg: 'neutral.50',\n },\n});\n\nconst collapseStylePanel = defineStyle({\n py: 0,\n pr: 0,\n pl: 12,\n borderBottomRadius: 'sm',\n overflow: 'hidden',\n backgroundColor: 'neutral.200',\n});\nconst collapse = definePartsStyle({\n button: collapseStyleButton,\n panel: collapseStylePanel,\n});\n\nconst accordionTheme = defineMultiStyleConfig({\n baseStyle,\n variants: {\n collapse,\n },\n defaultProps: {\n variant: undefined,\n },\n});\nexport default accordionTheme;\n","import { alertAnatomy as parts } from '@chakra-ui/anatomy';\nimport type { StyleFunctionProps } from '@chakra-ui/styled-system';\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\n\nconst $fg = cssVar('alert-fg');\nconst $bg = cssVar('alert-bg');\n\nconst baseStyle = definePartsStyle(props => {\n return {\n container: {\n bg: $bg.reference,\n px: '4',\n py: '2',\n borderRadius: 'sm',\n },\n title: {\n fontWeight: 'regular',\n textStyle: 'text.sm',\n marginEnd: '2',\n },\n description: {\n lineHeight: '6',\n },\n icon: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: '3',\n w: '4',\n h: '4',\n },\n action: {\n color: props.colorScheme === 'neutral' && props.variant === 'light' ? 'primary.500' : 'inherit',\n '& +.chakra-alert__close': {\n ml: '3',\n },\n },\n close: {\n color: $fg.reference,\n w: '4',\n h: '4',\n },\n\n spinner: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: '3',\n w: '5',\n h: '5',\n },\n };\n});\n\nfunction getBg(props: StyleFunctionProps) {\n const { colorScheme: c } = props;\n\n return {\n light: c === 'neutral' ? `colors.${c}.200` : `colors.${c}.50`,\n };\n}\n\nconst variantLight = definePartsStyle(props => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: c === 'neutral' ? `colors.black.high` : `colors.${c}.700`,\n [$bg.variable]: bg.light,\n color: $fg.reference,\n },\n };\n});\n\nconst variantSolid = definePartsStyle(props => {\n const { colorScheme: c } = props;\n return {\n container: {\n [$fg.variable]: `colors.white.high`,\n [$bg.variable]: c === 'neutral' ? `colors.${c}.700` : `colors.${c}.500`,\n },\n };\n});\n\nconst variants = {\n light: variantLight,\n solid: variantSolid,\n};\n\nconst alertTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: 'light',\n colorScheme: 'info',\n },\n});\n\nexport default alertTheme;\n","import type { ComponentStyleConfig } from '@chakra-ui/theme';\n\nconst Badge: ComponentStyleConfig = {\n baseStyle: {\n h: 'fit-content',\n display: 'inline-block',\n fontSize: 'text.xs',\n fontWeight: 'semibold',\n lineHeight: '14',\n textTransform: 'none',\n px: 2,\n py: '0.5',\n },\n variants: {\n 'primary-solid': {\n bg: 'primary.500',\n color: 'white',\n },\n 'success-solid': {\n bg: 'success.500',\n color: 'white',\n },\n 'info-solid': {\n bg: 'info.500',\n color: 'white',\n },\n 'warning-solid': {\n bg: 'warning.500',\n color: 'white',\n },\n 'danger-solid': {\n bg: 'danger.500',\n color: 'white',\n },\n 'neutral-solid': {\n bg: 'neutral.900',\n color: 'white',\n },\n 'disabled-solid': {\n bg: 'neutral.600',\n color: 'white',\n },\n 'primary-light': {\n bg: 'primary.50',\n color: 'primary.500',\n },\n 'success-light': {\n bg: 'success.50',\n color: 'success.500',\n },\n 'info-light': {\n bg: 'info.50',\n color: 'info.500',\n },\n 'warning-light': {\n bg: 'warning.50',\n color: 'warning.500',\n },\n 'danger-light': {\n bg: 'danger.50',\n color: 'danger.500',\n },\n 'neutral-light': {\n bg: 'neutral.200',\n color: 'neutral.900',\n },\n 'disabled-light': {\n bg: 'neutral.200',\n color: 'neutral.600',\n },\n },\n // The default size and variant values\n defaultProps: {\n variant: 'primary-solid',\n },\n};\n\nexport default Badge;\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\r\nimport type { ComponentStyleConfig } from '@chakra-ui/theme';\r\n\r\n// You can also use the more specific type for\r\n// a single part component: ComponentSingleStyleConfig\r\n\r\nconst Button: ComponentStyleConfig = defineStyleConfig({\r\n // The styles all button have in common\r\n baseStyle: {\r\n fontSize: 'body.1',\r\n fontWeight: 'normal',\r\n px: 4,\r\n py: 2.5,\r\n borderRadius: 'sm',\r\n\r\n _disabled: {\r\n opacity: 1,\r\n bg: 'neutral.300',\r\n color: 'black.low',\r\n },\r\n\r\n _hover: {\r\n _disabled: {\r\n bg: 'neutral.300',\r\n color: 'black.low',\r\n },\r\n },\r\n },\r\n\r\n sizes: {\r\n lg: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.xl',\r\n h: 12,\r\n px: 4,\r\n py: 2.5,\r\n };\r\n const icon = {\r\n h: 10,\r\n w: 10,\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n md: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.md',\r\n h: 9,\r\n px: 3,\r\n py: '7px',\r\n };\r\n const icon = {\r\n h: 9,\r\n w: 9,\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n sm: props => {\r\n const { variant } = props;\r\n const base = {\r\n fontSize: 'text.sm',\r\n h: '26px',\r\n lineHeight: 4,\r\n px: 2,\r\n py: '5px',\r\n };\r\n const icon = {\r\n h: '26px',\r\n w: '26px',\r\n p: 0,\r\n };\r\n return variant === 'icon' ? icon : base;\r\n },\r\n },\r\n\r\n variants: {\r\n primary: props => {\r\n const { isLoading } = props;\r\n\r\n const basePrimary = {\r\n color: 'white.high',\r\n bg: 'primary.500',\r\n _hover: {\r\n bg: 'primary.600',\r\n },\r\n _active: {\r\n bg: 'primary.700',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n _disabled: {\r\n bg: 'primary.500',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'primary.500',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : basePrimary;\r\n },\r\n secondary: props => {\r\n const { isLoading } = props;\r\n\r\n const baseSecondary = {\r\n color: 'primary.500',\r\n borderWidth: 1,\r\n borderStyle: 'inside',\r\n bg: 'white.high',\r\n borderColor: 'primary.500',\r\n _hover: {\r\n bg: 'primary.50',\r\n },\r\n _active: {\r\n bg: 'primary.100',\r\n },\r\n _disabled: {\r\n border: 0,\r\n },\r\n '.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)': {\r\n marginEnd: '-1px',\r\n },\r\n '.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)': {\r\n marginBottom: '-1px',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseSecondary,\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseSecondary;\r\n },\r\n\r\n tertiary: props => {\r\n const { isLoading } = props;\r\n\r\n const baseTertiary = {\r\n color: 'primary.500',\r\n _hover: {\r\n bg: 'primary.50',\r\n },\r\n _active: {\r\n bg: 'primary.100',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseTertiary,\r\n _disabled: {\r\n bg: 'transparent',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'transparent',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseTertiary;\r\n },\r\n\r\n danger: props => {\r\n const { isLoading } = props;\r\n\r\n const baseDanger = {\r\n bg: 'danger.500',\r\n color: 'white.high',\r\n _hover: {\r\n bg: 'danger.600',\r\n },\r\n _active: {\r\n bg: 'danger.700',\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseDanger,\r\n _disabled: {\r\n bg: 'danger.500',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'danger.500',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseDanger;\r\n },\r\n\r\n 'outline-danger': props => {\r\n const { isLoading } = props;\r\n\r\n const baseSecondary = {\r\n color: 'danger.500',\r\n borderWidth: 1,\r\n borderStyle: 'inside',\r\n bg: 'white.high',\r\n borderColor: 'danger.500',\r\n _hover: {\r\n bg: 'danger.50',\r\n },\r\n _active: {\r\n bg: 'danger.100',\r\n },\r\n _disabled: {\r\n border: 0,\r\n },\r\n };\r\n\r\n const disabledLoading = {\r\n ...baseSecondary,\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'white.high',\r\n },\r\n },\r\n };\r\n\r\n return isLoading ? disabledLoading : baseSecondary;\r\n },\r\n\r\n link: {\r\n bg: 'transparent',\r\n color: 'primary.500',\r\n _disabled: {\r\n opacity: '1',\r\n bg: 'transparent',\r\n color: 'black.medium',\r\n },\r\n _hover: {\r\n _disabled: {\r\n bg: 'transparent',\r\n color: 'black.medium',\r\n },\r\n },\r\n },\r\n\r\n icon: {\r\n bg: 'neutral.50',\r\n minW: 0,\r\n borderColor: 'neutral.200',\r\n borderWidth: '1px',\r\n\r\n _active: {\r\n bg: 'neutral.500',\r\n borderColor: 'neutral.50',\r\n },\r\n _disabled: {\r\n bg: 'neutral.500',\r\n opacity: 0.3,\r\n borderColor: 'neutral.50',\r\n },\r\n _hover: {\r\n bg: 'neutral.400',\r\n _disabled: {\r\n bg: 'neutral.500',\r\n opacity: 0.3,\r\n borderColor: 'neutral.50',\r\n },\r\n },\r\n },\r\n },\r\n\r\n defaultProps: {\r\n size: 'md',\r\n variant: 'primary',\r\n colorScheme: 'primary',\r\n },\r\n});\r\n\r\nexport default Button;\r\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\n\nconst CardStyle = defineStyleConfig({\n baseStyle: props => {\n return {\n shadow: props.withShadow ? 'raised' : 'none',\n borderRadius: props.isRounded ? 'sm' : 'none',\n };\n },\n});\n\nexport default CardStyle;\n","import { checkboxAnatomy } from '@chakra-ui/anatomy';\r\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\r\n\r\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(checkboxAnatomy.keys);\r\n\r\nconst baseStyle = definePartsStyle({\r\n control: {\r\n borderRadius: 'sm',\r\n w: 4,\r\n h: 4,\r\n border: '1px solid',\r\n },\r\n icon: {\r\n color: 'neutral.50',\r\n },\r\n label: {\r\n textStyle: 'text.sm',\r\n color: 'black.high',\r\n ml: 2,\r\n },\r\n _disabled: {\r\n background: 'neutral.200',\r\n border: '0',\r\n borderColor: 'neutral.500',\r\n cursor: 'not-allowed',\r\n },\r\n});\r\n\r\nconst errors = definePartsStyle({\r\n control: {\r\n borderColor: 'danger.500',\r\n _checked: {\r\n borderColor: 'danger.500',\r\n backgroundColor: 'danger.500',\r\n _hover: {\r\n borderColor: 'danger.600',\r\n backgroundColor: 'danger.600',\r\n },\r\n },\r\n _indeterminate: {\r\n borderColor: 'danger.500',\r\n backgroundColor: 'danger.500',\r\n },\r\n },\r\n label: {\r\n textStyle: 'text.xs',\r\n },\r\n icon: {\r\n fontSize: '8px',\r\n },\r\n});\r\n\r\nconst unstyled = definePartsStyle({\r\n control: {\r\n borderColor: 'neutral.600',\r\n _checked: {\r\n borderColor: 'primary.500',\r\n backgroundColor: 'primary.500',\r\n _hover: {\r\n borderColor: 'primary.600',\r\n backgroundColor: 'primary.600',\r\n },\r\n _disabled: {\r\n backgroundColor: 'primary.500',\r\n borderColor: 'primary.500',\r\n opacity: 0.3,\r\n },\r\n },\r\n _disabled: {\r\n backgroundColor: 'neutral.200',\r\n borderColor: 'neutral.200',\r\n },\r\n _indeterminate: {\r\n borderColor: 'primary.500',\r\n backgroundColor: 'primary.500',\r\n _disabled: {\r\n backgroundColor: 'primary.500',\r\n borderColor: 'primary.500',\r\n opacity: 0.3,\r\n },\r\n },\r\n },\r\n label: {\r\n textStyle: 'text.xs',\r\n _disabled: {\r\n opacity: 1,\r\n },\r\n },\r\n icon: {\r\n fontSize: '8px',\r\n },\r\n});\r\n\r\nconst variants = {\r\n errors,\r\n unstyled,\r\n};\r\n\r\nconst Checkbox = defineMultiStyleConfig({\r\n baseStyle,\r\n variants,\r\n defaultProps: {\r\n variant: 'unstyled',\r\n },\r\n});\r\n\r\nexport default Checkbox;\r\n","import { tagAnatomy } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(tagAnatomy.keys);\n\nconst baseStyle = definePartsStyle({\n container: {\n px: 3,\n py: 1,\n color: 'primary.500',\n userSelect: 'none',\n boxShadow: 'none',\n border: '1px solid',\n borderColor: 'primary.500',\n bg: 'transparent',\n cursor: 'pointer',\n fontWeight: 400,\n },\n});\n\nconst solid = definePartsStyle({\n container: {\n bg: 'primary.500',\n color: 'white',\n },\n closeButton: {\n color: 'white',\n opacity: 1,\n },\n});\n\nconst outline = definePartsStyle({\n container: {\n bg: 'transparent',\n _hover: {\n bg: 'primary.50',\n },\n },\n closeButton: {\n color: 'primary.500',\n opacity: 1,\n },\n});\n\nconst disabled = definePartsStyle({\n container: {\n bg: 'neutral.200',\n color: 'black.low',\n borderColor: 'neutral.200',\n cursor: 'not-allowed',\n _hover: {\n bg: 'neutral.200',\n },\n },\n closeButton: {\n color: 'neutral.500',\n opacity: 1,\n },\n});\n\nconst Tag = defineMultiStyleConfig({\n baseStyle,\n sizes: {\n sm: {\n container: {\n textStyle: 'text.sm',\n },\n },\n md: {\n container: {\n textStyle: 'text.md',\n py: 2,\n },\n },\n },\n variants: {\n solid,\n outline,\n disabled,\n },\n});\n\nexport default Tag;\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system';\r\n\r\nconst baseStyle = defineStyle({\r\n fontSize: 'field.sm',\r\n fontWeight: 'normal',\r\n marginEnd: 1,\r\n mb: 1,\r\n});\r\n\r\nconst FormLabel = defineStyleConfig({\r\n baseStyle,\r\n});\r\n\r\nexport default FormLabel;\r\n","import { inputAnatomy as parts } from '@chakra-ui/anatomy';\r\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\r\nimport { mode } from '@chakra-ui/theme-tools';\r\n\r\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\r\n\r\nconst baseStyle = definePartsStyle({\r\n field: {\r\n width: '100%',\r\n minWidth: 0,\r\n outline: 0,\r\n px: 2,\r\n py: 2,\r\n paddingInlineStart: 2,\r\n paddingInlineEnd: 2,\r\n position: 'relative',\r\n appearance: 'none',\r\n color: 'black.high',\r\n _disabled: {\r\n bg: 'neutral.300',\r\n border: 0,\r\n cursor: 'not-allowed',\r\n opacity: 1,\r\n boxShadow: 'none',\r\n color: 'black.medium',\r\n },\r\n _placeholder: {\r\n color: 'black.low',\r\n },\r\n },\r\n});\r\n\r\nconst size = {\r\n lg: defineStyle({\r\n textStyle: 'text.lg',\r\n h: 12,\r\n borderRadius: 'sm',\r\n }),\r\n md: defineStyle({\r\n textStyle: 'text.md',\r\n h: 10,\r\n borderRadius: 'sm',\r\n }),\r\n sm: defineStyle({\r\n textStyle: 'text.sm',\r\n h: 9.5,\r\n borderRadius: 'sm',\r\n }),\r\n xs: defineStyle({\r\n textStyle: 'text.sm',\r\n p: 1,\r\n h: 5.5,\r\n borderRadius: 'sm',\r\n }),\r\n};\r\n\r\nconst sizes = {\r\n lg: definePartsStyle({\r\n field: size.lg,\r\n addon: size.lg,\r\n }),\r\n md: definePartsStyle({\r\n field: size.md,\r\n addon: size.md,\r\n }),\r\n sm: definePartsStyle({\r\n field: size.sm,\r\n addon: size.sm,\r\n }),\r\n xs: definePartsStyle({\r\n field: size.xs,\r\n addon: size.xs,\r\n }),\r\n};\r\n\r\nconst outline = definePartsStyle(props => {\r\n const field = {\r\n border: 0,\r\n outline: 0,\r\n bg: mode('white', 'inherit')(props),\r\n color: mode('inherit', 'white')(props),\r\n\r\n _hover: {\r\n borderColor: mode('neutral.400', 'inherit')(props),\r\n },\r\n _invalid: {\r\n boxShadow: 'none',\r\n },\r\n _focusVisible: {\r\n zIndex: 1,\r\n boxShadow: 'none',\r\n },\r\n };\r\n\r\n return {\r\n field,\r\n };\r\n});\r\n\r\nconst unstyled = definePartsStyle({\r\n field: {\r\n bg: 'transparent',\r\n px: '0',\r\n height: 'auto',\r\n },\r\n addon: {\r\n bg: 'transparent',\r\n px: '0',\r\n height: 'auto',\r\n },\r\n});\r\n\r\nconst variants = {\r\n outline,\r\n unstyled,\r\n};\r\n\r\nconst Input = defineMultiStyleConfig({\r\n baseStyle,\r\n sizes,\r\n variants,\r\n defaultProps: {\r\n size: 'sm',\r\n variant: 'outline',\r\n },\r\n});\r\n\r\nexport default Input;\r\n","/* eslint-disable prefer-destructuring */\nimport { defineStyleConfig } from '@chakra-ui/styled-system';\nimport { keyframes } from '@emotion/react';\n\nconst rotate = keyframes({\n '0%': {\n transform: 'rotate(0deg)',\n },\n '100%': {\n transform: 'rotate(360deg)',\n },\n});\n\nconst getLoaderColor = (color: string) => {\n if (!color) {\n return 'var(--chakra-colors-white-high)';\n }\n\n const colorValue = color.split('.');\n let backgroundColor: string;\n\n switch (colorValue.length) {\n case 1:\n backgroundColor = colorValue[0];\n break;\n case 2:\n backgroundColor = `var(--chakra-colors-${colorValue[0]}-${colorValue[1]})`;\n break;\n default:\n backgroundColor = 'var(--chakra-colors-white-high)';\n break;\n }\n\n if (color === 'primary') return 'var(--chakra-colors-primary-600)';\n if (color === 'danger') return 'var(--chakra-colors-danger-500)';\n if (color === 'warning') return 'var(--chakra-colors-warning-700)';\n return backgroundColor;\n};\n\nconst LoaderStyle = defineStyleConfig({\n baseStyle: props => {\n const colors = getLoaderColor(props.color);\n return {\n borderRadius: '50%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n animation: `${rotate} 1s linear infinite`,\n background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,\n ':before': {\n content: `''`,\n display: 'block',\n borderRadius: '50%',\n width: '6px',\n height: '6px',\n position: 'absolute',\n bottom: 0,\n background: colors,\n },\n };\n },\n sizes: {\n xs: {\n width: '12px',\n height: '12px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',\n ':before': {\n width: '1.4px',\n height: '1.4px',\n },\n },\n sm: {\n width: '16px',\n height: '16px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',\n ':before': {\n width: '1.87px',\n height: '1.87px',\n },\n },\n md: {\n width: '24px',\n height: '24px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',\n ':before': {\n width: '2.8px',\n height: '2.8px',\n },\n },\n lg: {\n width: '50px',\n height: '50px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',\n ':before': {\n width: '5.83px',\n height: '5.83px',\n },\n },\n xl: {\n width: '75px',\n height: '75px',\n WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',\n ':before': {\n width: '8.75px',\n height: '8.75px',\n },\n },\n xxl: {\n width: '100px',\n height: '100px',\n WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,\n ':before': {\n width: '11.67px',\n height: '11.67px',\n },\n },\n },\n defaultProps: {\n size: 'lg',\n },\n});\n\nexport default LoaderStyle;\n","import { defineStyleConfig } from '@chakra-ui/styled-system';\nimport type { ComponentStyleConfig } from '@chakra-ui/theme';\n\nconst Modal: ComponentStyleConfig = defineStyleConfig({\n sizes: {\n sm: { dialog: { minW: 400 } },\n md: { dialog: { minW: 600 } },\n lg: { dialog: { minW: 800 } },\n },\n\n defaultProps: {\n size: 'md',\n },\n});\n\nexport default Modal;\n","import { popoverAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nconst baseStyle = definePartsStyle({\n content: {\n bg: 'white',\n },\n});\nconst popoverTheme = defineMultiStyleConfig({ baseStyle });\n\nexport default popoverTheme;\n","import { radioAnatomy } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/react';\n\nconst { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(radioAnatomy.keys);\n\nconst baseStyle = definePartsStyle({\n control: {\n border: '1px solid',\n width: 4,\n height: 4,\n },\n label: {\n marginLeft: 2,\n textStyle: 'text.sm',\n color: 'black.high',\n _disabled: {\n opacity: 1,\n color: 'black.medium',\n },\n },\n});\n\nconst errors = definePartsStyle({\n control: {\n borderColor: 'danger.500',\n _checked: {\n borderColor: 'danger.500',\n bg: 'white',\n _before: {\n h: 2.5,\n w: 2.5,\n bg: 'danger.500',\n },\n _hover: {\n borderColor: 'danger.500',\n bg: 'neutral.200',\n },\n _disabled: {\n borderColor: 'danger.500',\n bg: 'white.high',\n _before: {\n h: 2.5,\n w: 2.5,\n bg: 'primary.500',\n opacity: 0.3,\n },\n },\n },\n _disabled: {\n borderColor: 'danger.500',\n bg: 'neutral.200',\n },\n },\n label: {\n textStyle: 'text.sm',\n },\n});\n\nconst unstyled = definePartsStyle({\n control: {\n borderColor: 'neutral.600',\n _checked: {\n borderColor: 'primary.500',\n bg: 'white',\n _before: {\n h: 2.5,\n w: 2.5,\n bg: 'primary.500',\n },\n _hover: {\n borderColor: 'primary.500',\n bg: 'transparent',\n },\n _disabled: {\n borderColor: 'primary.500',\n bg: 'white.high',\n opacity: 0.3,\n _before: {\n h: 2.5,\n w: 2.5,\n bg: 'primary.500',\n },\n },\n },\n _disabled: {\n borderColor: 'neutral.200',\n bg: 'neutral.200',\n },\n },\n label: {\n textStyle: 'text.sm',\n },\n});\n\nconst variants = {\n errors,\n unstyled,\n};\n\nconst Radio = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: 'unstyled',\n },\n});\n\nexport default Radio;\n","import { switchAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\nimport { calc, cssVar } from '@chakra-ui/theme-tools';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst $width = cssVar('switch-track-width');\nconst $height = cssVar('switch-track-height');\nconst $diff = cssVar('switch-track-diff');\nconst diffValue = calc.subtract($width, $height);\nconst $translateX = cssVar('switch-thumb-x');\n\nconst baseStyleThumb = defineStyle({\n bg: 'white',\n transitionProperty: 'transform',\n transitionDuration: 'normal',\n borderRadius: 'inherit',\n width: [$height.reference],\n height: [$height.reference],\n _checked: {\n transform: `translateX(${$translateX.reference})`,\n },\n});\n\nconst baseStyle = definePartsStyle(() => ({\n container: {\n [$diff.variable]: diffValue,\n [$translateX.variable]: $diff.reference,\n _rtl: {\n [$translateX.variable]: calc($diff).negate().toString(),\n },\n },\n track: {\n bg: 'neutral.400',\n p: 1,\n _checked: {\n bg: 'primary.500',\n _disabled: {\n bg: 'neutral.600',\n },\n },\n _disabled: {\n bg: 'neutral.500',\n opacity: '100%',\n },\n },\n thumb: baseStyleThumb,\n}));\n\nconst sizes = {\n sm: definePartsStyle({\n container: {\n [$width.variable]: '1.875rem',\n [$height.variable]: '0.8rem',\n },\n thumb: {\n [$width.variable]: '0.8rem',\n [$height.variable]: '0.8rem',\n },\n }),\n md: definePartsStyle({\n container: {\n [$width.variable]: '2.375rem',\n [$height.variable]: '1rem',\n },\n thumb: {\n [$width.variable]: '1rem',\n [$height.variable]: '1rem',\n },\n }),\n lg: definePartsStyle({\n container: {\n [$width.variable]: '3.25rem',\n [$height.variable]: '1.375rem',\n },\n thumb: {\n [$width.variable]: '1.375rem',\n [$height.variable]: '1.375rem',\n },\n }),\n};\n\nconst Switch = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: 'md',\n },\n});\n\nexport default Switch;\n","import { tableAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/styled-system';\nimport { mode } from '@chakra-ui/theme-tools';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst baseStyle = definePartsStyle({\n table: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n borderCollapse: 'separate',\n borderSpacing: 0,\n width: 'full',\n tableLayout: 'fixed',\n '&:not([data-loading=true])': {\n tbody: {\n tr: {\n cursor: 'pointer',\n _hover: {\n td: {\n backgroundColor: 'neutral.200',\n },\n },\n '&[data-active=\"true\"]': {\n td: {\n backgroundColor: 'neutral.100',\n },\n },\n },\n },\n },\n },\n th: {\n fontFamily: 'heading',\n fontWeight: 'semibold',\n textTransform: 'uppercase',\n letterSpacing: 'normal',\n textAlign: 'start',\n height: '50px',\n color: 'black.high',\n fontSize: 'text.sm',\n lineHeight: '18px',\n backgroundColor: 'neutral.50',\n '&:first-of-type': {\n pl: 6,\n },\n '&:last-of-type': {\n pr: 6,\n },\n },\n\n td: {\n // backgroundColor: 'neutral.50',\n textAlign: 'start',\n height: '56px',\n\n '&:first-of-type': {\n pl: 6,\n },\n '&:last-of-type': {\n pr: 6,\n },\n _disabled: {\n opacity: 0.5,\n },\n },\n caption: {\n mt: 4,\n fontFamily: 'heading',\n textAlign: 'center',\n fontWeight: 'medium',\n },\n});\n\nconst numericStyles = defineStyle({\n '&[data-is-numeric=true]': {\n textAlign: 'end',\n },\n});\n\nconst variantSimple = definePartsStyle(props => {\n const { colorScheme: c } = props;\n\n return {\n th: {\n color: 'black.high',\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n td: {\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n caption: {\n color: mode('gray.600', 'gray.100')(props),\n },\n tfoot: {\n tr: {\n '&:last-of-type': {\n th: { borderBottomWidth: 0 },\n },\n },\n },\n };\n});\n\nconst variantStripe = definePartsStyle(props => {\n const { colorScheme: c } = props;\n\n return {\n th: {\n color: 'black.high',\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n td: {\n borderBottom: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles,\n },\n caption: {\n color: mode('gray.600', 'gray.100')(props),\n },\n tbody: {\n tr: {\n '&:nth-of-type(odd)': {\n 'th, td': {\n borderBottomWidth: '1px',\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n },\n td: {\n background: mode(`${c}.100`, `${c}.700`)(props),\n },\n },\n },\n },\n tfoot: {\n tr: {\n '&:last-of-type': {\n th: { borderBottomWidth: 0 },\n },\n },\n },\n };\n});\n\nconst variants = {\n simple: variantSimple,\n striped: variantStripe,\n unstyled: defineStyle({}),\n};\n\nconst sizes = {\n sm: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '4',\n fontSize: 'xs',\n },\n td: {\n px: '2',\n py: '4',\n fontSize: 'sm',\n lineHeight: '4',\n },\n caption: {\n px: '4',\n py: '2',\n fontSize: 'xs',\n },\n }),\n md: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '4',\n fontSize: 'xs',\n },\n td: {\n px: '2',\n py: '4',\n lineHeight: '5',\n },\n caption: {\n px: '6',\n py: '2',\n fontSize: 'sm',\n },\n }),\n lg: definePartsStyle({\n th: {\n px: '2',\n py: '4',\n lineHeight: '5',\n fontSize: 'sm',\n },\n td: {\n px: '2',\n py: '4',\n lineHeight: '6',\n },\n caption: {\n px: '6',\n py: '2',\n fontSize: 'md',\n },\n }),\n};\n\nconst tableTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: 'simple',\n size: 'md',\n colorScheme: 'gray',\n },\n});\nexport default tableTheme;\n","import { tabsAnatomy as parts } from '@chakra-ui/anatomy';\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system';\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\n\nconst variantLine = definePartsStyle(props => {\n const { orientation } = props;\n const isVertical = orientation === 'vertical';\n const borderProp = isVertical ? 'borderStart' : 'borderBottom';\n const marginProp = isVertical ? 'marginStart' : 'marginBottom';\n\n return {\n tablist: {\n [borderProp]: '1px solid',\n borderColor: 'inherit',\n },\n tab: {\n [borderProp]: '1px solid',\n borderColor: 'neutral.400',\n [marginProp]: '-1px',\n },\n };\n});\n\nconst variantUnstyled = definePartsStyle({});\n\nconst variants = {\n line: variantLine,\n unstyled: variantUnstyled,\n};\n\nconst tabsTheme = defineMultiStyleConfig({\n variants,\n defaultProps: {\n size: 'md',\n variant: 'line',\n },\n});\n\nexport default tabsTheme;\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/react';\nimport type { TextAreaProps } from 'packages/internal-ui/src/components/form';\n\nconst getProps = (props: TextAreaProps) => {\n const { isError, isSuccess, isDisabled } = props;\n\n let borderColor = 'neutral.400';\n let focusBorderColor = 'primary.500';\n\n if (isError) {\n borderColor = 'danger.500';\n focusBorderColor = 'danger.500';\n } else if (isSuccess) {\n borderColor = 'success.500';\n focusBorderColor = 'success.500';\n } else if (isDisabled && !isError && !isSuccess) {\n borderColor = 'neutral.400';\n focusBorderColor = 'danger.500';\n }\n\n return {\n focusBorderColor,\n borderColor,\n };\n};\n\nconst outline = defineStyle(props => {\n const { focusBorderColor, borderColor } = getProps(props);\n\n return {\n background: 'white.high',\n color: 'black.high',\n borderColor,\n fontSize: 'text.sm',\n padding: 2,\n borderRadius: 'sm',\n borderWidth: '1px',\n outline: 'none',\n\n _disabled: {\n opacity: 1,\n color: 'black.medium',\n background: 'neutral.300',\n },\n _placeholder: {\n color: 'black.low',\n },\n _hover: {\n borderColor,\n },\n _focus: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _focusVisible: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _focusWithin: {\n outline: 'none',\n borderColor: focusBorderColor,\n boxShadow: 'none',\n },\n _invalid: {\n outline: 'none',\n borderColor: 'danger.500',\n boxShadow: 'none',\n },\n };\n});\n\nexport const Textarea = defineStyleConfig({\n variants: { outline },\n defaultProps: {\n variant: 'outline',\n },\n});\n\nexport default Textarea;\n","import type { ComponentStyleConfig } from '@chakra-ui/react';\nimport { cssVar, defineStyleConfig } from '@chakra-ui/react';\n\nconst $arrowBg = cssVar('popper-arrow-bg');\nconst baseStyle = {\n bg: 'neutral.700',\n textStyle: 'text.sm',\n fontSize: 'text.sm',\n [$arrowBg.variable]: 'var(--chakra-colors-neutral-700)',\n};\n\nconst Tooltip: ComponentStyleConfig = defineStyleConfig({ baseStyle });\n\nexport default Tooltip;\n","import type { AxiosRequestConfig } from 'axios';\nimport axios from 'axios';\nimport { useMemo } from 'react';\n\nimport { useInternalUI } from '../provider';\n\nexport default function useFetcher() {\n const { instance } = useInternalUI();\n const axiosInstance = useMemo(() => instance || axios, [instance]);\n\n const fetcher = async <TResponse = unknown>({ url, data, method, headers, ...config }: AxiosRequestConfig) => {\n const response = await axiosInstance.request<TResponse>({\n data,\n url,\n method,\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n ...headers,\n },\n ...config,\n });\n return response;\n };\n\n return {\n fetcher,\n };\n}\n","import axios from 'axios';\nimport type { FC } from 'react';\nimport React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';\nimport { ToastContainer } from 'react-toastify';\n\nimport type { ProviderContextObject, ProviderProps } from '../types';\n\nexport const ProviderContext = createContext<ProviderContextObject>({\n instance: undefined,\n});\n\nexport const useInternalUI = (): ProviderContextObject => {\n const { instance } = useContext(ProviderContext);\n return { instance };\n};\n\nconst Provider: FC<ProviderProps> = ({ children, config, requestInterceptors, responseInterceptors }) => {\n const instanceRef = useRef(axios.create(config));\n\n useEffect(() => {\n requestInterceptors?.forEach(interceptor => {\n instanceRef.current.interceptors.request.use(interceptor);\n });\n responseInterceptors?.forEach(interceptor => {\n instanceRef.current.interceptors.response.use(interceptor);\n });\n }, [requestInterceptors, responseInterceptors]);\n\n const provider = useMemo(() => ({ instance: instanceRef.current }), []);\n\n return (\n <ProviderContext.Provider value={provider}>\n <ToastContainer />\n {children}\n </ProviderContext.Provider>\n );\n};\n\nProvider.displayName = 'Provider';\n\nexport default Provider;\n","export { default as Provider } from './components/provider';\nexport * from './components/provider';\nexport {\n ChakraProvider,\n ChakraProviderProps,\n ColorMode,\n ColorModeScript,\n ColorModeScriptProps,\n} from '@chakra-ui/react';\n","export { default as useFetcher } from './useFetcher';\nexport {\n useBoolean,\n useClipboard,\n useColorMode,\n useColorModeValue,\n useConst,\n useControllableProp,\n useControllableState,\n useDimensions,\n useDisclosure,\n UseDisclosureProps,\n useMergeRefs,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Aa,QAAQ,IAAI,WAAW;AAAA,IAC1D;AACA,iEAAsB,QAAQ,iBAAe;AAC3C,kBAAY,QAAQ,aAAa,SAAS,IAAI,WAAW;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC,qBAAqB,oBAAoB,CAAC;AAE9C,QAAM,eAAW,yBAAQ,OAAO,EAAE,UAAU,YAAY,QAAQ,IAAI,CAAC,CAAC;AAEtE,SACE,+CAAC,gBAAgB,UAAhB,EAAyB,OAAO,UAC/B;AAAA,kDAAC,yCAAe;AAAA,IACf;AAAA,KACH;AAEJ;AAEA,SAAS,cAAc;AAEvB,IAAO,mBAAQ;;;ACtCf,IAAAE,kBAMO;;;AFFQ,SAAR,aAA8B;AACnC,QAAM,EAAE,SAAS,IAAI,cAAc;AACnC,QAAM,oBAAgB,yBAAQ,MAAM,YAAY,cAAAC,SAAO,CAAC,QAAQ,CAAC;AAEjE,QAAM,UAAU,OAA4B,EAAE,KAAK,MAAM,QAAQ,SAAS,GAAGC,QAAO,MAA0B;AAC5G,UAAM,WAAW,MAAM,cAAc,QAAmB;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP,gBAAgB;AAAA,QAChB,GAAG;AAAA,MACL;AAAA,MACA,GAAGA;AAAA,IACL,CAAC;AACD,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,EACF;AACF;;;AG1BA,IAAAC,kBAeO;;;A5SZP,IAAAC,kBAAwC;","names":["theme","import_react","import_jsx_runtime","import_react","import_internal_icon","import_jsx_runtime","import_jsx_runtime","Alert","import_shared_utils","import_react","import_react","import_jsx_runtime","import_react","import_jsx_runtime","size","getLoaderColor","ButtonChakra","import_jsx_runtime","css","import_shared_utils","import_system","import_internal_icon","import_jsx_runtime","css","import_shared_utils","import_system","import_jsx_runtime","AlertDescription","import_shared_utils","import_system","import_jsx_runtime","css","import_shared_utils","import_system","import_jsx_runtime","AlertTitle","import_react","import_shared_utils","import_jsx_runtime","import_react","import_jsx_runtime","BadgeChakra","import_react","import_internal_icon","import_jsx_runtime","spacing","import_react","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_jsx_runtime","size","import_react","import_react","import_jsx_runtime","import_react","import_react","import_internal_icon","import_jsx_runtime","React","size","outlineColor","focusColor","ChakraInput","import_react","import_jsx_runtime","React","ChakraTextarea","import_react","import_jsx_runtime","size","disabled","import_icons","import_react","React","import_jsx_runtime","table","index","import_react","import_shared_utils","import_internal_icon","import_system","import_react","import_jsx_runtime","import_react","import_jsx_runtime","React","import_jsx_runtime","id","ReactDatePicker","import_react","import_jsx_runtime","React","import_react","import_jsx_runtime","styled","React","import_react","import_jsx_runtime","Icon","import_react","import_jsx_runtime","import_jsx_runtime","EmptyState","import_react","import_react","import_jsx_runtime","import_react","import_fi","import_react","import_shared_utils","import_jsx_runtime","import_jsx_runtime","color","import_react","import_fi","import_jsx_runtime","import_react","env","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_react","import_react","import_icons","import_react","import_jsx_runtime","import_react","import_jsx_runtime","ModalBody","React","ChakraModalBody","import_react","import_jsx_runtime","ChakraModalCloseButton","import_react","import_jsx_runtime","ModalFooter","ChakraModalFooter","import_react","import_jsx_runtime","ModalHeader","ChakraModalHeader","import_react","import_react","Icon","Icon","import_jsx_runtime","import_jsx_runtime","import_react","Icon","import_jsx_runtime","mappingIcon","import_icons","import_react","import_react","import_jsx_runtime","import_react","import_jsx_runtime","color","import_jsx_runtime","import_react","import_jsx_runtime","scale","import_react","React","import_fi","import_jsx_runtime","import_react","import_react","import_jsx_runtime","ChakraRadio","import_react","import_jsx_runtime","ChakraRadioGroup","import_react","import_react","import_internal_icon","import_jsx_runtime","RatingIcon","import_system","import_react","import_react","import_react","theme","import_jsx_runtime","Select","ReactSelect","import_system","import_jsx_runtime","import_system","import_jsx_runtime","ReactSelectAsyncCreatable","import_system","import_jsx_runtime","ReactSelectCreatable","import_react","import_system","import_react_select","import_jsx_runtime","ComponentRS","ReactSelect","import_react","import_tslib","import_tslib","React","import_react","React","import_react","import_react","visualElement","import_react","import_react","import_react","import_react","import_react","import_tslib","import_react","visualElement","import_react","visualElement","import_react","visualElement","animate","animate","import_react","import_react","import_react","import_react","visualElement","drag","import_tslib","import_react","VisualElementHandler","visualElement","React__default","config","import_tslib","import_tslib","import_react","import_tslib","import_react","a","b","transformKeys","a","b","c","alpha","b","a","v","number","import_tslib","transformKeys","hasTransform","import_tslib","import_react","import_tslib","size","spacing","import_tslib","scrapeMotionValuesFromProps","import_tslib","import_react","scrapeMotionValuesFromProps","config","animate","key","index","scrapeMotionValuesFromProps","AnimationType","import_react","visualElement","_a","isMouseEvent","drag","visualElement","import_react","import_react","import_tslib","import_tslib","clamp","clamp","undampedFreq","a","b","c","a","b","progress","alpha","color","a","b","analyse","clamp","config","runNextFrame","isProcessing","index","process","startAnimation","heading","a","b","visualElement","_a","import_react","import_tslib","visualElement","_a","import_tslib","import_react","import_react","id","import_tslib","import_tslib","import_tslib","import_tslib","import_tslib","keyframes","import_tslib","getAnimatableNone","getAnimatableNone","_a","import_tslib","import_tslib","index","SubscriptionManager","a","b","c","MotionValue","import_tslib","visualElement","visualElement","key","getAnimatableNone","visualElement","animations","getAnimation","_a","a","b","visualElement","animations","animate","i","key","_a","visualElement","animate","_a","import_react","import_tslib","import_tslib","PanSession","info","point","timestamp","_a","event","a","b","getVelocity","import_tslib","calcOrigin","clamp","transformPoint","import_tslib","scale","scale","distance","transformPoint","rootProjectionNode","VisualElementDragControls","visualElement","_a","_b","drag","inertia","calcOrigin","motionValue","visualElement","import_react","visualElement","import_tslib","import_tslib","import_tslib","measureViewportBox","scrapeMotionValuesFromProps","_a","key","value","import_tslib","isCSSVariable","visualElement","current","resolved","import_tslib","BoundingBoxDimension","visualElement","visualElement","getComputedStyle","a","b","import_tslib","scrapeMotionValuesFromProps","import_tslib","import_react","MeasureLayoutWithContext","visualElement","drag","_a","React__default","import_tslib","animate","progress","import_tslib","scale","xKeys","yKeys","a","b","NodeStack","member","rotate","a","b","FlatTree","id","_a","visualElement","_b","progress","animate","config","import_tslib","React","import_react","import_tslib","import_react","import_react","import_tslib","React","import_react","id","_a","key","import_jsx_runtime","import_react","import_internal_icon","import_jsx_runtime","import_react","Icon","import_jsx_runtime","mappingIcon","import_react","import_shared_utils","import_internal_icon","import_jsx_runtime","Switch","spacing","import_react","import_react","import_jsx_runtime","import_react","import_react","import_react","import_jsx_runtime","import_react_toastify","import_react","import_jsx_runtime","color","ChakraTooltip","import_react","import_internal_icon","import_jsx_runtime","import_react","size","toast","_a","isDragActive","text","color","X","ChakraImage","import_react","import_react","badge_default","button_default","card_default","checkbox_default","loader_default","switch_default","chips_default","textarea_default","parts","import_anatomy","import_styled_system","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","c","Badge","badge_default","import_styled_system","Button","button_default","import_styled_system","card_default","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","baseStyle","variants","Checkbox","checkbox_default","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","baseStyle","Tag","chips_default","import_styled_system","baseStyle","FormLabel","import_anatomy","import_styled_system","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","sizes","outline","field","unstyled","variants","Input","import_styled_system","import_react","color","loader_default","import_styled_system","Modal","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","parts","baseStyle","import_anatomy","import_react","definePartsStyle","defineMultiStyleConfig","baseStyle","errors","unstyled","variants","Radio","import_anatomy","import_styled_system","import_theme_tools","defineMultiStyleConfig","definePartsStyle","parts","baseStyle","sizes","Switch","switch_default","import_anatomy","import_styled_system","import_theme_tools","defineMultiStyleConfig","definePartsStyle","parts","baseStyle","c","variants","sizes","import_anatomy","import_styled_system","defineMultiStyleConfig","definePartsStyle","parts","variants","import_react","outline","textarea_default","import_react","baseStyle","Tooltip","import_styled_system","theme","import_axios","import_react","import_react","import_react_toastify","import_jsx_runtime","config","axios","import_react","axios","config","import_react","import_react"]}